1var ee=(f,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(f,t)).next())});import{_ as cn}from"./chunk.C6PXV3Pxc_ps.js";import{k as Ai,O as hn,aa as dn,p as no,au as ro,P as oo,w as ye,r as Ns,n as zi,j as lo,s as co,z as ho,y as uo,av as fo}from"./chunk.BhnF8lqErK1Y.js";import"./chunk.DMiigLJ6-phQ.js";import"./chunk.DGksOcLQgZEB.js";var po=Object.defineProperty,go=Object.defineProperties,xo=Object.getOwnPropertyDescriptors,$i=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable,Bs=(f,t,e)=>t in f?po(f,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):f[t]=e,K=(f,t)=>{for(var e in t||(t={}))mo.call(t,e)&&Bs(f,e,t[e]);if($i)for(var e of $i(t))bo.call(t,e)&&Bs(f,e,t[e]);return f},rt=(f,t)=>go(f,xo(t)),st=(f,t,e)=>Bs(f,typeof t!="symbol"?t+"":t,e),yo=(f,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(f,t)).next())});let j=class{static isSSR(){return typeof window=="undefined"||typeof document=="undefined"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return this.isSSR()?!1:typeof window[t]!="undefined"}static getApex(){return typeof window!="undefined"&&window.Apex?window.Apex:typeof global!="undefined"&&global.Apex?global.Apex:{}}},Ys=class un{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new fn,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 un(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}},fn=class{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(" ")}},pn=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new Ys(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 Ys("root");return s.innerHTML=t,{documentElement:s}}}}},xt=null,Ht=null,Wt=null,Q=class{static init(){j.isSSR()&&!xt&&(xt=new pn)}static createElement(t){return j.isSSR()?(xt||this.init(),xt.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return j.isSSR()?(xt||this.init(),xt.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return j.isSSR()?(xt||this.init(),xt.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return j.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return j.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return j.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(j.isSSR()||typeof window.matchMedia!="function")return null;try{return window.matchMedia(t)}catch(e){return null}}static getBoundingClientRect(t){return j.isSSR()?(xt||this.init(),xt.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return j.isSSR()?(xt||this.init(),Ht||(Ht=xt.createXMLSerializer()),Ht):(Ht||(Ht=new XMLSerializer),Ht)}static getDOMParser(){return j.isSSR()?(xt||this.init(),Wt||(Wt=xt.createDOMParser()),Wt):(Wt||(Wt=new DOMParser),Wt)}static addWindowEventListener(t,e,s){j.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){j.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return j.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){j.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?j.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}
1static getWindow(){return j.isBrowser()?window:null}static getDocument(){return j.isBrowser()?document:null}static _getShim(){return xt}static _resetShim(){xt=null,Ht=null,Wt=null}};const Hi=new WeakMap;let wo=0,O=class Nt{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 j.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(Nt.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 stringifyForCompare(t){return JSON.stringify(t,(e,s)=>{if(typeof s!="function")return s;let i=Hi.get(s);return i===void 0&&(i=++wo,Hi.set(s,i)),`__apx_fn_${i}`})}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(j.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch(a){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(j.isSSR())return Q.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!="undefined"&&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=Nt.parseHex(t),i=Nt.parseHex(e);if(!s||!i)return 0;
1const a=Nt.relativeLuminance(s),n=Nt.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)).toString(16).slice(1)}shadeColor(t,e){return Nt.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(!Nt.isCSSVariable(t)||j.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(j.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}},yt=class{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);if(typeof t!="string")return NaN;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(S,_=2){let k=S+"";for(;k.length<_;)k="0"+k;return k}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"+
1o[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+l(d)),e=e.replace(/(^|[^\\])d/g,"$1"+d);const u=i?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u)),e=e.replace(/(^|[^\\])H/g,"$1"+u);const p=u>12?u-12:u===0?12:u;e=e.replace(/(^|[^\\])hh+/g,"$1"+l(p)),e=e.replace(/(^|[^\\])h/g,"$1"+p);const g=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g)),e=e.replace(/(^|[^\\])m/g,"$1"+g);const x=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x)),e=e.replace(/(^|[^\\])s/g,"$1"+x);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=u<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 S=Math.floor(v/60),_=v%60;y+=l(S)+":"+l(_)}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=O.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}},me=class{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 yt(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(O.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(O.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(O.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 vo="en",Ao={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"}},gn={name:vo,options:Ao};let Yt=class{constructor(){this.yAxis={show:!0,showAlways:!1,show
vendor: 8,591 bytes, line 1
1ForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[gn],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",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",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0}
vendor: 6,956 bytes, line 1
1,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}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter(t){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,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(t){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:!0},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],c
vendor: 4,082 bytes, line 1
1olorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(t){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}
1,fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}};const Si={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin"},xn="_apexOwnedByType",Xt=(f,t)=>{const e=t;return e[xn]=f,t},So=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],Ne=(f,t)=>{let e=f;for(const s of t.split(".")){if(e==null||typeof e!="object")return;e=e[s]}return e},_o=(f,t,e)=>{const s=t.split("."),i=s.pop();let a=f;for(const n of s)(a[n]==null||typeof a[n]!="object")&&(a[n]={}),a=a[n];e===void 0?delete a[i]:a[i]=e},Wi=(f,t)=>{var e,s;const i=Si[f];return{chart:{type:i||f,requestedType:i?f:void 0,stacked:(e=t.chart)==null?void 0:e.stacked},plotOptions:{bar:{isFunnel:f==="funnel"||f==="pyramid"},histogram:(s=t.plotOptions)==null?void 0:s.histogram},series:t.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},Co=(f,t)=>{if(typeof f=="function")return Array.isArray(f[xn])?!0:typeof t=="function"&&String(f)===String(t);if(typeof t=="function")return f===void 0;if(f===t)return!0;try{return JSON.stringify(f)===JSON.stringify(t)}catch(e){return!1}},se=({isTimeline:f,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,u={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:o};typeof d=="function"&&(c=d(c,u)),(n=a.config.series[t].data[e])!=null&&n.x&&(l=a.config.series[t].data[e].x),f||a.config.xaxis.type==="datetime"&&(l=new me(a).xLabelFormat(a.formatters.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new yt(a).formatDate,w:a})),typeof h=="function"&&(l=h(l,u)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,o=i);let p="",g="";const x=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){const b=new yt(a);p=b.formatDate(b.getDate(r),a.config.tooltip.x.format),g=b.formatDate(b.getDate(o),a.config.tooltip.x.format)}else p=r,g=o;else p=a.config.tooltip.x.formatter(r),g=a.config.tooltip.x.formatter(o);return{start:r,end:o,startVal:p,endVal:g,ylabel:l,color:x,seriesName:c}},we=f=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:n,dataPointIndex:r}=f;const o=f.w.globals.tooltip.tooltipLabels.getFormatters(n);i=o.yLbFormatter(i),a=o.yLbFormatter(a);const l=o.yLbFormatter(f.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 f.w.globals.comboCharts?f.w.config.series[n].type==="rangeArea"||f.w.config.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>"};let zt=class qe{constructor(t){this.opts=t}static forType(t){var e,s;const i=new qe(t),a=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],n=t.chart.requestedType;let r;return n==="funnel"||n==="pyramid"?r=i[n]():n==="gauge"?r=i.gauge():n==="histogram"?r=i.histogram():n==="waterfall"?r=i.waterfall():n==="dumbbell"?r=i.dumbbell():n==="streamgraph"?r=i.streamgraph():n==="raincloud"?r=i.raincloud():a.indexOf(t.chart.type)!==-1?r=i[t.chart.type]():r=i.line(),(s=(e=t.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(r=i.funnel()),t.chart.stacked&&t.chart.type==="bar"&&(r=i.stackedBars()),r}static handOverTypeDefaults(t,e,s){const i=t.chart.requestedType||t.chart.type;if(!e||e===i)return;const a=new Yt().init(),n=O.extend(a,qe.forType(Wi(e,t))),r=O.extend(a,qe.forType(Wi(i,t)));for(const o of So){if(s&&Ne(s,o)!==void 0)continue;const l=Ne(n,o),c=Ne(r,o);l===void 0&&c===void 0||Co(Ne(t,o),l)&&_o(t,o,c)}}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 O.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}}
5,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(),rt(K({},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 rt(K({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}waterfall(){const t=this.rangeBar();return rt(K({},t),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:rt(K({},t.plotOptions),{bar:rt(K({},t.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:rt(K({},t.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:"#fff",foreColor:"#373d3f",borderColor:"#e3e8ee",opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var t,e,s,i;const a=Array.isArray((t=this.opts)==null?void 0:t.series)&&this.opts.series.length>1&&((i=(s=(e=this.opts)==null?void 0:e.plotOptions)==null?void 0:s.histogram)==null?void 0:i.overlap)!==!1;return rt(K({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(n,r)=>{var o,l;const c=(l=(o=r==null?void 0:r.w)==null?void 0:o.histogramData)==null?void 0:l.edges,h=r==null?void 0:r.dataPointIndex;if(!Array.isArray(c)||typeof h!="number"||h<0)return String(n);const d=c[h],u=c[h+1];if(d===void 0||u===void 0)return String(n);const p=g=>Number.isInteger(g)?String(g):g.toFixed(2);return`${p(d)} to ${p(u)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Xt(["candlestick"],({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:Xt(["boxPlot"],({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:Xt(["violin"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var t,e,s;const i=this.violin(),a=((s=(e=(t=this.opts)==null?void 0:t.plotOptions)==null?void 0:e.bar)==null?void 0:s.horizontal)===!0;return rt(K({},i),{plotOptions:{violin:{side:a?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:a?"bottom":"left",jitter:.85}}},tooltip:rt(K({},i.tooltip),{custom:Xt(["raincloud"],({seriesIndex:n,dataPointIndex:r,w:o})=>this._getRaincloudTooltip(o,n,r))})})}rangeBar(){const t=s=>{const{color:i,seriesName:a,ylabel:n,startVal:r,endVal:o}=se(rt(K({},s),{isTimeline:!0}));return we(rt(K({}
5,s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))},e=s=>{const{color:i,seriesName:a,ylabel:n,start:r,end:o}=se(s);return we(rt(K({},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:Xt(["rangeBar"],s=>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(){const t=this.rangeBar(),e=(i,a,n)=>'<div class="apexcharts-tooltip-dumbbell-endpoint"><span class="series-name" style="color: '+a+'">'+i+'</span> <span class="value">'+n+"</span></div>",s=i=>{var a;const{w:n,dataPointIndex:r,seriesIndex:o}=i,l=n.dumbbellData;if(!l||l.form!=="series"){const{color:x,seriesName:b,ylabel:m,start:A,end:v}=se(i);return we(rt(K({},i),{color:x,seriesName:b,ylabel:m,start:A,end:v}))}const c=l.values[r]||[],h=n.globals.tooltip.tooltipLabels.getFormatters(o),d=(a=n.labelData.labels[r])!=null?a:"";let u="";const p=[];for(let x=0;x<c.length;x++)c[x]===null||l.hidden.indexOf(x)!==-1||(p.push(c[x]),u+=e(l.names[x],n.globals.colors[x],h.yLbFormatter(c[x])));const g=p.length===2?'<div class="apexcharts-tooltip-dumbbell-gap"><span class="category">'+n.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': </span><span class="value">'+h.yLbFormatter(Math.abs(p[1]-p[0]))+"</span></div>":"";return'<div class="apexcharts-tooltip-rangebar apexcharts-tooltip-dumbbell"><div><span class="category">'+d+"</span></div>"+u+g+"</div>"};return rt(K({},t),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:rt(K({},t.plotOptions),{bar:rt(K({},t.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:rt(K({},t.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:Xt(["rangeBar"],s)}})}dumbbellSizing(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}=se(e);return we(rt(K({},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:Xt(["rangeArea"],e=>t(e))}}}streamgraph(){const t=this.rangeArea(),e=s=>{var i;const{w:a,dataPointIndex:n,seriesIndex:r}=s,o=a.streamgraphData;if(!o||!Array.isArray(o.order)){const{color:x,seriesName:b,ylabel:m,start:A,end:v}=se(s);return we(rt(K({},s),{color:x,seriesName:b,ylabel:m,start:A,end:v}))}const{ylabel:l}=se(s),c=(()=>{const x=a.streamgraphData,b=a.dom.baseEl&&a.dom.baseEl.querySelector(".apexcharts-svg"),m=a.interact&&a.interact.clientY,A=a.globals.maxY-a.globals.minY;if(!b||m==null||!A||!isFinite(A))return r;const v=b.getBoundingClientRect(),y=a.globals.svgWidth?v.width/a.globals.svgWidth:1,w=(m-v.top)/(y||1)-a.layout.translateY,S=a.layout.gridHeight,_=C=>{var L;const T=(C-a.globals.minY)/A;return(L=a.config.yaxis[0])!=null&&L.reversed?T*S:S-T*S};let k=r,M=1/0;for(let C=0;C<x.order.length;C++){const L=x.order[C],T=x.lows[L]&&x.lows[L][n],D=x.highs[L]&&x.highs[L][n];if(T==null||D==null)continue;const E=_(D),R=_(T),P=Math.min(E,R),F=Math.max(E,R);if(w>=P&&w<=F)return L;const I=w<P?P-w:w-F;I<M&&(M=I,k=L)}return k})(),h=a.formatters.ttVal!==void 0,d=(x,b)=>{if(h){const m=a.globals.tooltip.tooltipLabels.getFormatters(x);if(typeof m.yLbFormatter=="function")return m.yLbFormatter(b)}
5return Number.isInteger(b)?String(b):String(Number(b.toFixed(6)))};let u="",p=0;for(let x=o.order.length-1;x>=0;x--){const b=o.order[x],m=(i=o.values[b])==null?void 0:i[n];m==null||!isFinite(m)||(p+=m,u+='<div class="apexcharts-tooltip-stream-band'+(b===c?" apexcharts-active":"")+'"><span class="apexcharts-tooltip-marker" style="background-color: '+a.globals.colors[b]+'"></span><span class="series-name">'+o.names[b]+'</span> <span class="value">'+d(b,m)+"</span></div>")}const g=o.offset==="expand"?"":'<div class="apexcharts-tooltip-stream-total"><span class="series-name">Total</span> <span class="value">'+d(r,p)+"</span></div>";return'<div class="apexcharts-tooltip-stream"><div class="apexcharts-tooltip-title">'+l+"</div>"+u+g+"</div>"};return rt(K({},t),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:Xt(["streamgraph"],s=>e(s))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}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 O.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 rt(K({},t),{plotOptions:rt(K({},t.plotOptions),{bar:rt(K({},t.plotOptions.bar),{borderRadiusApplication:"end"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return O.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 O.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},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,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>`}_getRaincloudTooltip(t,e,s){var i,a;const n=(i=t.violinData.seriesViolinSummary[e])==null?void 0:i[s];if(!n)return this._getViolinTooltip(t,e,s);const r=((a=t.violinData.seriesViolinPoints[e])==null?void 0:a[s])||[],o=t.config.series[e].name||"series-"+(e+1),l=g=>{if(!isFinite(g))return String(g);const x=Math.round(g);return Math.abs(g-x)<1e-6?String(x):String(Number(g.toFixed(2)))},[c,h,d,u,p]=n;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${o}</div><div>Whisker high: <span class="value">${l(p)}</span></div><div>Q3: <span class="value">${l(u)}</span></div><div>Median: <span class="value">${l(d)}</span></div><div>Q1: <span class="value">${l(h)}</span></div><div>Whisker low: <span class="value">${l(c)}</span></div><div>Observations: <span class="value">${r.length}</span></div></div>`}},fe=class{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,n,r,o,l;let c=this.opts;const h=new Yt,d=new zt(c);c=this.normalizeAliasedChartType(c),this.chartType=c.chart.type,c=this.extendYAxis(c),c=this.extendAnnotations(c);let u=h.init(),p={};if(c&&typeof c=="object"){let x=zt.forType(c);(e=c.chart.brush)!=null&&e.enabled&&(x=d.brush(x)),(i=(s=c.plotOptions)==null?void 0:s.line)!=null&&i.isSlopeChart&&(x=d.slope()),c.chart.stacked&&c.chart.stackType==="100%"&&(c=d.stacked100(c)),(n=(a=c.plotOptions)==null?void 0:a.bar)!=null&&n.isDumbbell&&c.chart.requestedType!=="dumbbell"&&(c=d.dumbbellSizing(c)),this.checkForDarkTheme(j.getApex()),this.checkForDarkTheme(c),c.xaxis=c.xaxis||j.getApex().xaxis||{},t||(c.xaxis.convertedCatToNumeric=!1),c=this.checkForCatToNumericXAxis(this.chartType,x,c),((r=c.chart.sparkline)!=null&&r.enabled||(l=(o=j.getApex().chart)==null?void 0:o.sparkline)!=null&&l.enabled)&&(x=d.sparkline(x)),p=O.extend(u,x)}const g=O.extend(p,j.getApex());return u=O.extend(g,c),u=this.handleUserInputErrors(u),u}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return!e||!Si[e]||(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":e==="waterfall"?(t.chart.stacked=!1,t.chart.type="rangeBar"):e==="dumbbell"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isDumbbell=!0,t.plotOptions.bar.horizontal==null&&(t.plotOptions.bar.horizontal=!0),t.chart.stacked=!1,t.chart.type="rangeBar"):e==="streamgraph"?(t.chart.stacked=!1,t.yaxis=t.yaxis||{},!Array.isArray(t.yaxis)&&t.yaxis.show==null&&(t.yaxis.show=!1),t.chart.type="rangeArea"):e==="histogram"?(t.xaxis=t.xaxis||{},t.xaxis.type==null&&(t.xaxis.type="numeric"),t.chart.type="bar"):e==="raincloud"&&(t.chart.type="violin")),t}checkForCatToNumericXAxis(t,e,s){var i,a,n,r,o;const l=new zt(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",u=(t==="scatter"||t==="bubble")&&((o=(r=(n=s.plotOptions)==null?void 0:n.scatter)==null?void 0:r.jitter)==null?void 0:o.enabled),p=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!c&&!h&&!u&&d&&p!=="between"&&(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new Yt;(typeof t.yaxis=="undefined"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});const i=j.getApex();
7t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=O.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[O.extend(s.yAxis,t.yaxis)]:t.yaxis=O.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=O.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=="undefined"&&(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 Yt;return t.annotations.yaxis=O.extendArray(typeof t.annotations.yaxis!="undefined"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new Yt;return t.annotations.xaxis=O.extendArray(typeof t.annotations.xaxis!="undefined"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new Yt;return t.annotations.points=O.extendArray(typeof t.annotations.points!="undefined"?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 ts=1.618,_i=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],es=[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];let Ci=class{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","collapsingSeriesIndices","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,batched:!1},LINE_HEIGHT_RATIO:ts,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:_i,niceScaleDefaultTicks:es,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get(){return s===null&&(s=O.clone(e)),s},set(i){e=Array.isArray(i)?i.map(a=>a&&typeof a=="object"&&!Array.isArray(a)?K({},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=O.extend({},t),e.initialSeries=t.series,e.lastXAxis=O.clone(e.initialConfig.xaxis),e.lastYAxis=O.clone(e.initialConfig.yaxis),e}},mn=class{constructor(t){this.opts=t}init(){const t=new fe(this.opts).init({responsiveOverride:!1}),e=new Ci().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:j.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:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,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:[],gridPad:{top:0,right:0,bottom:0,left:0}}};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","gridPad"])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}},St=class{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!="undefined"&&t.forEach(n=>{(n.type==="bar"||n.type==="column"||n.type==="candlestick"||n.type==="boxPlot"||n.type==="violin")&&i++,typeof n.type!="undefined"&&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]!="undefined"&&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!=null?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(u=>{e.series.forEach((p,g)=>{if(p.name===u){let x=g;c===g||n?!n||a.indexOf(g)>-1?s[c].push([c,g]):console.warn("Series '"+p.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]),x=c),h=!0,x=a.indexOf(x),x!==-1&&a.splice(x,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,u)=>{const p=t.config.yaxis[t.globals.seriesYAxisReverseMap[u]];if(!p||p.logarithmic)return 0;const g=d<0?-1:1;return d=Math.abs(d),-g*d/s[u]};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(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];return e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic?(i.yLogRatio[n]=1/this.w.layout.gridHeight,1):s.yRange[n]}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e!=null&&e.yaxis&&(e=t.extendYAxis(e,s)),e!=null&&e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e==null?void 0:e.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e==null?void 0: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 ht="http://www.w3.org/2000/svg";let Mt=class bn{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 bn(this.x,this.y)}},je=class Ze{constructor(t,e,s,i,a,n){this.a=t!=null?t:1,this.b=e!=null?e:0,this.c=s!=null?s:0,this.d=i!=null?i:1,this.e=a!=null?a:0,this.f=n!=null?n:0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new Ze(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new Ze(t,0,0,e!=null?e:t,0,0))}multiply(t){return new Ze(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)}},yn=class{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 Pe(f){if(!f||typeof f!="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(f))!==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]:f.length,c=f.substring(o,l),h=[];let d;for(s.lastIndex=0;(d=s.exec(c))!==null;)h.push(parseFloat(d[0]));const u=a[r].toUpperCase();if(u==="Z")t.push(["Z"]);else if(u==="M"||u==="L"||u==="T")for(let p=0;p<h.length;p+=2)t.push([u,h[p],h[p+1]]);else if(u==="H")for(let p=0;p<h.length;p++)t.push([u,h[p]]);else if(u==="V")for(let p=0;p<h.length;p++)t.push([u,h[p]]);else if(u==="C")for(let p=0;p<h.length;p+=6)t.push([u,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5]]);else if(u==="S"||u==="Q")for(let p=0;p<h.length;p+=4)t.push([u,h[p],h[p+1],h[p+2],h[p+3]]);else if(u==="A")for(let p=0;p<h.length;p+=7)t.push([u,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5],h[p+6]])}return t.length===0&&t.push(["M",0,0]),t}function Re(f){let t=1/0,e=1/0,s=-1/0,i=-1/0;return f.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 wn(f){return f.map(t=>t.join(" ")).join(" ")}function Gi(f){switch(f[0]){case"z":case"Z":f[0]="L",f[1]=this.start[0],f[2]=this.start[1];break;case"H":f[0]="L",f[2]=this.pos[1];break;case"V":f[0]="L",f[2]=f[1],f[1]=this.pos[0];break;case"T":f[0]="Q",f[3]=f[1],f[4]=f[2],f[1]=this.reflection[1],f[2]=this.reflection[0];break;case"S":f[0]="C",f[6]=f[4],f[5]=f[3],f[4]=f[2],f[3]=f[1],f[2]=this.reflection[1],f[1]=this.reflection[0];break}return f}function Vi(f){var t=f.length;return this.pos=[f[t-2],f[t-1]],"SCQT".indexOf(f[0])!=-1&&(this.reflection=[2*this.pos[0]-f[t-4],2*this.pos[1]-f[t-3]]),f}function Ui(f){var t,e=[f];switch(f[0]){case"M":return this.pos=this.start=[f[1],f[2]],e;case"L":f[5]=f[3]=f[1],f[6]=f[4]=f[2],f[1]=this.pos[0],f[2]=this.pos[1];break;case"Q":f[6]=f[4],f[5]=f[3],f[4]=f[4]*1/3+f[2]*2/3,f[3]=f[3]*1/3+f[1]*2/3,f[2]=this.pos[1]*1/3+f[2]*2/3,f[1]=this.pos[0]*1/3+f[1]*2/3;break;case"A":e=ko((t=this.pos)!=null?t:[],f),f=e[0];break}return f[0]="C",this.pos=[f[5],f[6]],this.reflection=[2*f[5]-f[3],2*f[6]-f[4]],e}function qi(f,t){if(t===!1)return!1;for(var e=t,s=f.length;e<s;++e)if(f[e][0]=="M")return e;return!1}function ko(f,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(f[0],f[1]),c=new Mt(r,o),h,d,u,p,g,x,b,m,A,v,y,w,S,_,k,M,C,L,T,D,E,R,P=[],F,I,B,Y;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 je().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),u=new je().rotate(i).scale(1/e,1/s).rotate(-i),l=l.transform(u),c=c.transform(u),p=[c.x-l.x,c.y-l.y],x=p[
70]*p[0]+p[1]*p[1],g=Math.sqrt(x),p[0]/=g,p[1]/=g,b=x<4?Math.sqrt(1-x/4):0,a===n&&(b*=-1),m=new Mt((c.x+l.x)/2+b*-p[1],(c.y+l.y)/2+b*p[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),_=Math.ceil(Math.abs(y-w)*2/Math.PI),M=[],C=y,S=(w-y)/_,k=4*Math.tan(S/4)/3,E=0;E<=_;E++)T=Math.cos(C),L=Math.sin(C),D=new Mt(m.x+T,m.y+L),M[E]=[new Mt(D.x+k*L,D.y-k*T),D,new Mt(D.x-k*L,D.y+k*T)],C+=S;for(M[0][0]=M[0][1].clone(),M[M.length-1][2]=M[M.length-1][1].clone(),u=new je().rotate(i).scale(e,s).rotate(-i),E=0,R=M.length;E<R;E++)M[E][0]=M[E][0].transform(u),M[E][1]=M[E][1].transform(u),M[E][2]=M[E][2].transform(u);for(E=1,R=M.length;E<R;E++)D=M[E-1][2],F=D.x,I=D.y,D=M[E][0],B=D.x,Y=D.y,D=M[E][1],r=D.x,o=D.y,P.push(["C",F,I,B,Y,r,o]);return P}function Mo(f,t,e,s,i,a){for(var n=f.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]=Gi.call(l,n[o]),r[o]=Gi.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(Ui.call(l,n[o]))),Array.prototype.splice.apply(r,[o,1].concat(Ui.call(c,r[o])))):(n[o]=Vi.call(l,n[o]),r[o]=Vi.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 Lo(f,t){for(var e=Pe(f),s=Pe(t),i=0,a=0,n=!1,r=!1,o;!(i===!1&&a===!1);){if(n=qi(e,i===!1?!1:i+1),r=qi(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=Mo(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 vn(f,t){var e=Lo(f,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 wn(n)}}let Gt=null,ve=null;function ji(f,t){const e=new Array(t);if(!j.isBrowser()){const i=Pe(f),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}Gt||(Gt=document.createElementNS("http://www.w3.org/2000/svg","svg"),Gt.setAttribute("width","0"),Gt.setAttribute("height","0"),Gt.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),ve=document.createElementNS("http://www.w3.org/2000/svg","path"),Gt.appendChild(ve),document.body.appendChild(Gt)),ve.setAttribute("d",f||"M0 0");let s=0;try{s=ve.getTotalLength()}catch(i){s=0}if(!s||!isFinite(s)){const i=Pe(f),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=ve.getPointAtLength(i/t*s);e[i]={x:a.x,y:a.y}}catch(a){e[i]={x:0,y:0}}return e}function Do(f,t,e=96){const s=ji(f,e),i=ji(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],u=h.x-d.x,p=h.y-d.y;if(l+=u*u+p*p,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],u=h.x+(d.x-h.x)*o,p=h.y+(d.y-h.y)*o;l+=(c===0?"M":"L")+u.toFixed(3)+" "+p.toFixed(3)+" "}return l+"Z"}}function An(f){return-Math.cos(f*Math.PI)/2+.5}let Sn=An;function To(f){Sn=typeof f=="function"?f:An}function Zi(f){if(!f||typeof f!="string")return null;if(f[0]==="#"){let e=f.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=f.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 Eo(f,t,e){return`rgba(${Math.round(f[0]+(t[0]-f[0])*e)},${Math.round(f[1]+(t[1]-f[1])*e)},${Math.round(f[2]+(t[2]-f[2])*e)},${f[3]+(t[3]-f[3])*e})`}let _n=class Cn{constructor(t,e,s){this.el=t,this.duration=e!=null?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 Cn(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 u=e.attr(d);a[d]=u;const p=Zi(u),g=Zi(String(this._attrTarget[d]));p&&g&&(n[d]=p,r[d]=g)}let o=null;if(this._plotTarget){const d=e.attr("d")||"";try{o=this._plotAlgorithm==="polygons"?Do(d,this._plotTarget):vn(d,this._plotTarget)}catch(u){o=null}}const l=performance.now(),c=this._easing||Sn,h=d=>{const u=d-l,p=Math.min(u/s,1),g=c(p);if(this._attrTarget)if(p>=1)e.attr(this._attrTarget);else{const x={};for(const b of Object.keys(this._attrTarget))if(n[b]&&r[b])x[b]=Eo(n[b],r[b],g);else{const m=parseFloat(a[b]),A=parseFloat(this._attrTarget[b]);!isNaN(m)&&!isNaN(A)&&(x[b]=m+(A-m)*g)}e.attr(x)}o&&p<1&&e.attr("d",o(g)),this._duringCb&&this._duringCb(g),p<1?Q.requestAnimationFrame(h):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};Q.requestAnimationFrame(h)};t>0?setTimeout(i,t):i()}};function kn(f){f.prototype.animate=function(t,e){return new _n(this,t,e)}}function Mn(f){return-Math.cos(f*Math.PI)/2+.5}function Po(f,t,e,s){f=Math.min(Math.max(f,0),1),e=Math.min(Math.max(e,0),1);const i=3*f,a=3*(e-f)-i,n=1-i-a,r=3*t,o=3*(s-t)-r,l=1-r-o,c=u=>((n*u+a)*u+i)*u,h=u=>((l*u+o)*u+r)*u,d=u=>{let p=0,g=1,x=u;if(x<p)return p;if(x>g)return g;for(;p<g;){const b=c(x);if(Math.abs(b-u)<1e-4)return x;u>b?p=x:g=x,x=(p+g)/2}return x};return u=>u<=0?0:u>=1?1:h(d(u))}const bt=new Map,Ro=f=>f;bt.set("linear",Ro);bt.set("easeInOutSine",Mn);bt.set("easeInSine",f=>1-Math.cos(f*Math.PI/2));bt.set("easeOutSine",f=>Math.sin(f*Math.PI/2));bt.set("easeInQuad",f=>f*f);bt.set("easeOutQuad",f=>1-(1-f)*(1-f));bt.set("easeInOutQuad",f=>f<.5?2*f*f:1-Math.pow(-2*f+2,2)/2);bt.set("easeInCubic",f=>f*f*f);bt.set("easeOutCubic",f=>1-Math.pow(1-f,3));bt.set("easeInOutCubic",f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2);bt.set("easeOutBack",f=>1+2.70158*Math.pow(f-1,3)+1.70158*Math.pow(f-1,2));bt.set("easeInOutBack",f=>{const e=2.5949095;return f<.5?Math.pow(2*f,2)*((e+1)*2*f-e)/2:(Math.pow(2*f-2,2)*((e+1)*(f*2-2)+e)+2)/2});function Fo(f,t){typeof f=="string"&&f&&typeof t=="function"&&bt.set(f,t)}function Oo(f){return Array.isArray(f)&&f.length===4&&f.every(t=>typeof t=="number")}function ss(f){return typeof f=="function"?Ki(f):Oo(f)?Po(f[0],f[1],f[2],f[3]):typeof f=="string"&&bt.has(f)?Ki(bt.get(f)):Mn}function Ki(f){return t=>{const e=f(t);return typeof e=="number"&&isFinite(e)?e:t}}const vs="http://www.w3.org/2000/svg";function Ji(f){return 1-Math.pow(1-f,3)}function Xo(f){return 1+2.70158*Math.pow(f-1,3)+1.70158*Math.pow(f-1,2)}let As=null;function Ln(){if(!j.isBrowser())return!1;try{return As||(As=window.matchMedia("(prefers-reduced-motion: reduce)")),!!As.matches}catch(f){return!1}}function is(f,t,e){if(!j.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=f.node.style;c.opacity="0";let h=null;const d=u=>{h===null&&(h=u),u-h>=o?c.opacity="":Q.requestAnimationFrame(d)};return Q.requestAnimationFrame(d),!0}function zs(f){const t=f.config.chart.animations;t&&(t.respectReducedMotion!==!1&&Ln()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),To(ss(t.easing)))}function Dn(f){const t=f.style,e=f.index||0,s=typeof f.baseDelay=="number"?f.baseDelay:40,i=f.row||0,a=f.col||0,n=f.groupIndex||0,r=f.perGroup||1,o=f.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}}let us=class{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(!j.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(${Xo(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?Q.requestAnimationFrame(l):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};Q.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,u=this.w;let p=0;u.config.chart.animations.animateGradually.enabled&&(p=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!=="bar"&&(p=0),d.morphSVG(e,s,i,u.config.chart.type==="line"&&!u.globals.comboCharts?"stroke":a,n,r,l,c*p,h,o)}revealBulk(t){const e=this.w;if(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),!j.isBrowser()||!e.globals.shouldAnimate){this.animationCompleted(t);return}e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,Q.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(!j.isBrowser()||!l.globals.shouldAnimate||n<1){h();return}const d=t.node,u=()=>{const x=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!=null?s:0}-${i?"f":"s"}`,w=Q.createElementNS(vs,"mask");w.setAttribute("id",y),w.setAttribute("maskUnits","userSpaceOnUse");let S;if(x){const M=v;w.setAttribute("x",String(m-M)),w.setAttribute("y",String(A-M)),w.setAttribute("width",String(M*2)),w.setAttribute("height",String(M*2)),S=Q.createElementNS(vs,"circle"),S.setAttribute("cx",String(m)),S.setAttribute("cy",String(A)),S.setAttribute("r","0"),S.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)),S=Q.createElementNS(vs,"rect"),S.setAttribute("x",String(-4)),S.setAttribute("y",String(-4)),S.setAttribute("width","0"),S.setAttribute("height",String(l.layout.gridHeight+8)),S.setAttribute("fill","#fff");w.appendChild(S),l.dom.elDefs.node.appendChild(w),d.setAttribute("mask",`url(#${y})`);const _=performance.now()+(r||0),k=M=>{if(l.globals.isDestroyed)return;const C=Math.max(0,Math.min(1,(M-_)/n)),L=Ji(C);x?S.setAttribute("r",String(L*v)):S.setAttribute("width",String(L*b)),C<1?Q.requestAnimationFrame(k):(d.removeAttribute("mask"),w.parentNode&&w.parentNode.removeChild(w),h())};Q.requestAnimationFrame(k)},p=g=>{d.setAttribute("stroke-dasharray",String(g)),d.setAttribute("stroke-dashoffset",String(g));const x=performance.now()+(r||0),b=m=>{if(l.globals.isDestroyed)return;const A=Math.max(0,Math.min(1,(m-x)/n));d.setAttribute("stroke-dashoffset",String(g*(1-Ji(A)))),A<1?Q.requestAnimationFrame(b):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};Q.requestAnimationFrame(b)};Q.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i){u();return}const g=d.getAttribute("stroke-dasharray");
7if(!!g&&g!=="0"&&g!==""){u();return}let b=0;try{typeof d.getTotalLength=="function"&&(b=d.getTotalLength())}catch(m){b=0}if(!b){h();return}p(b)})}morphSVG(t,e,s,i,a,n,r,o,l,c){var h,d;const u=this.w;a||(a=t.attr("pathFrom")),n||(n=t.attr("pathTo"));const p=()=>(u.config.chart.type==="radar"&&(r=1),`M 0 ${u.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=p()),(!n.trim()||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=p(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),u.globals.shouldAnimate||(r=1);const x=((d=(h=this.ctx)==null?void 0:h.morphTypeChange)==null?void 0:d.isActive())===!0?"polygons":"commands";let b=null;if(u.globals.dataChanged){const A=u.config.chart.animations.dynamicAnimation.easing;A!=null?b=ss(A):l&&(b=ss("linear"))}const m=t.plot(a).animate(r,o);b&&m.ease(b),m.plot(c||n,x,c?n:void 0).after(()=>{if(O.isNumber(s)){const A=u.seriesData.series[u.globals.maxValsInArrayIndex];A&&s===A.length-2&&u.globals.shouldAnimate&&this.animationCompleted(t)}else i!=="none"&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&e===u.seriesData.series.length-1||u.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}};const Qi={lighten:.15,darken:.35};let At=class re{constructor(t){this.w=t}static isSliceChart(t){const e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"}static hoverOutlineOwnsHoverState(t){var e;return re.isSliceChart(t)&&t.config.states.hover.filter.type!=="none"&&((e=t.config.plotOptions.pie.hoverOutline)==null?void 0:e.show)===!0}static sliceOffsetOwnsActiveState(t){return re.isSliceChart(t)&&t.config.chart.type!=="polarArea"&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!re.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;return re.isSliceChart(t)&&((e=t.config.drilldown)==null?void 0:e.enabled)===!0}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"?Qi.lighten:Qi.darken,h=Math.max(0,Math.min(1,typeof i=="number"?i:c)),d=1-h,u=s==="lighten"?h:0;t.filterWith&&(t.filterWith(p=>{p.colorMatrix({type:"matrix",values:` 8 ${d} 0 0 0 ${u} 9 0 ${d} 0 0 ${u} 10 0 0 ${d} 0 ${u} 11 0 0 0 1 0 12 `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(p,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),O.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]!="undefined"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){if(t.node.setAttribute("selected",!0),re.sliceOffsetOwnsActiveState(i))return;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%"})}},tt=class Ut{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(k,M,C){var L=M.x-k.x,T=M.y-k.y,D=Math.sqrt(L*L+T*T);return D?i(k,M,Math.min(1,C/D)):{x:k.x,y:k.y}}function i(k,M,C){return{x:k.x+(M.x-k.x)*C,y:k.y+(M.y-k.y)*C}}function a(k,M){k.length>2&&(k[k.length-2]=M.x,k[k.length-1]=M.y)}function n(k){return{x:parseFloat(k[k.length-2]),y:parseFloat(k[k.length-1])}}
12var r=t.split(/[,\s]/).reduce(function(k,M){var C=M.match(/^([a-zA-Z])(.+)/);return C?(k.push(C[1]),k.push(C[2])):k.push(M),k},[]),o=r.reduce(function(k,M){return parseFloat(M)==M&&k.length?k[k.length-1].push(M):k.push([M]),k},[]),l=[];if(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 u=l[l.length-1],p=o[d],g=p==h?o[1]:o[d+1];if(g&&u&&u.length>2&&p[0]=="L"&&g.length>2&&g[0]=="L"){var x=n(u),b=n(p),m=n(g),A,v;A=s(b,x,e),v=s(b,m,e),a(p,A),p.origPoint=b,l.push(p);var y=i(A,b,.5),w=i(b,v,.5),S=["C",y.x,y.y,w.x,w.y,v.x,v.y];S.origPoint=b,l.push(S)}else l.push(p)}if(h){var _=n(l[l.length-1]);l.push(["Z"]),a(l[0],_)}}else l=o;return l.reduce(function(k,M){return k+M.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:u,chartType:p,shouldClipToGrid:g=!0,bindEventsOnPaths:x=!0,drawShadow:b=!0,drawMask:m=null,scrollMorph:A=!1}){var v,y,w,S;const _=this.w,k=new At(this.w),M=new us(this.w,(v=this.ctx)!=null?v:void 0),C=this.w.config.chart.animations.enabled,L=C&&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 T;const D=((w=(y=this.ctx)==null?void 0:y.morphTypeChange)==null?void 0:w.isActive())===!0,E=!!(C&&!_.globals.resized||L&&_.globals.dataChanged&&_.globals.shouldAnimate||D&&C&&_.globals.shouldAnimate),R=typeof u=="string"&&(u.indexOf("apexcharts-line")>-1||u.indexOf("apexcharts-area")>-1||u.indexOf("apexcharts-rangeArea")>-1||u.indexOf("apexcharts-radar")>-1),P=!!(C&&!_.globals.resized&&!_.globals.dataChanged&&R),F=(S=_.config.chart.animations.largeDatasetThreshold)!=null?S:0,I=!!(E&&!P&&F>0&&_.globals.dataPoints>F),Y=!!((p==="candlestick"||p==="boxPlot")&&E&&!P&&_.globals.dataChanged&&!D),$=I||Y;E&&!P&&!$?T=s:(T=i,E||(_.globals.animationEnded=!0));const X=_.config.stroke.dashArray;let W=0;Array.isArray(X)?W=X[e]:W=_.config.stroke.dashArray;const N=this.drawPath({d:T,stroke:n,strokeWidth:r,fill:l,fillOpacity:1,classes:u,strokeLinecap:o,strokeDashArray:W});N.attr("index",e),g&&(p==="bar"&&!_.globals.isBarHorizontal||_.globals.comboCharts?N.attr({"clip-path":`url(#gridRectBarMask${_.globals.cuid})`}):N.attr({"clip-path":`url(#gridRectMask${_.globals.cuid})`})),_.config.chart.dropShadow.enabled&&b&&k.dropShadow(N,_.config.chart.dropShadow,e),x&&(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 H={el:N,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:l,strokeWidth:r,delay:c,scrollMorph:A};if(C&&!_.globals.resized&&!_.globals.dataChanged)if(P){const V=h*2,J=n==="none"||r===0,et=_.seriesData.series.length,at=_.globals.comboCharts?!0:e===et-1;M.animateDraw(N,{realIndex:e,j:t,isFill:J,isLast:at,speed:V,delay:0,mask:m})}else $||M.animatePathsGradually(rt(K({},H),{speed:h}
12));else(_.globals.resized||!_.globals.dataChanged)&&!$&&M.showDelayedElements();return E&&!$&&(_.globals.dataChanged&&L||D)&&M.animatePathsGradually(rt(K({},H),{speed:d})),$&&M.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,c=!1){const h=this.w;let d;e.length<9&&e.indexOf("#")===0&&(e=O.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=O.hexToRgba(s,a));let u=0,p=1,g=1,x=null;r!==null&&(u=typeof r[0]!="undefined"?r[0]/100:0,p=typeof r[1]!="undefined"?r[1]/100:1,g=typeof r[2]!="undefined"?r[2]/100:1,x=typeof r[3]!="undefined"?r[3]/100:null);const b=h.config.chart.type==="donut"||h.config.chart.type==="pie"||h.config.chart.type==="polarArea"||h.config.chart.type==="bubble";if(!o||o.length===0?d=h.dom.Paper.gradient(b?"radial":"linear",m=>{m.stop(u,e,i),m.stop(p,s,a),m.stop(g,s,a),x!==null&&m.stop(x,e,i)}):d=h.dom.Paper.gradient(b?"radial":"linear",m=>{(Array.isArray(o[l])?o[l]:Array.isArray(o[0])?o[0]||[]:o).forEach(v=>{m.stop(v.offset/100,v.color,v.opacity)})}),!b)t==="vertical"?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):t==="diagonal"?d.from(0,0).to(1,1):t==="horizontal"?d.from(0,1).to(1,1):t==="diagonal2"&&d.from(1,0).to(0,1);else{const m=h.layout.gridWidth/2,A=h.layout.gridHeight/2;h.config.chart.type!=="bubble"?d.attr({gradientUnits:"userSpaceOnUse",cx:m,cy:A,r:n}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return d}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:u="auto"}){const p=this.w;typeof s=="undefined"&&(s="");let g=s;i||(i="start"),(!o||!o.length)&&(o=p.config.chart.foreColor),n=n||p.config.chart.fontFamily,a=a||"11px",r=r||"regular";const x={maxWidth:c,fontSize:a,fontFamily:n};let b;return Array.isArray(s)?b=p.dom.Paper.text(m=>{for(let A=0;A<s.length;A++)g=s[A],c&&(g=this.getTextBasedOnMaxWidth(K({text:s[A]},x))),A===0?m.tspan(g):m.tspan(g).newLine()}):(c&&(g=this.getTextBasedOnMaxWidth(K({text:s},x))),b=d?p.dom.Paper.plain(s):p.dom.Paper.text(m=>m.tspan(g))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":u,"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 u="";switch(s){case"cross":i=i/1.4,u=`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,u=`M ${t-i} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let p=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,p=4);const g=Math.PI/p;for(let x=0;x<=2*p;x++){const b=x*g,m=x%2===0?i:i/2,A=t+m*Math.sin(b),v=e-m*Math.cos(b);u+=(x===0?"M":"L")+A+","+v}u+="Z";break}case"triangle":u=`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,u=`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,u=`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,u=`M ${t-i} ${e} 24 L ${t+i} ${e}`;break;default:i=i*2,u=`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 u}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 O.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s==null?void 0:s.shape,i,K(K({},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 At(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}),Ut._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&!At.hoverOutlineOwnsHoverState(a)&&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 At(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}),Ut._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&(At.hoverOutlineOwnsHoverState(a)||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]=="undefined"&&(a.interact.selectedDataPoints[s]=[]),a.interact.selectedDataPoints[s].push(i),"true"}_applyPointSelectionFilter(t,e,s,i){const a=this.w;if(!At.sliceOffsetOwnsActiveState(a)){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 At(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&&Ut._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=Ut._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?Ut._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=Ut._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,n){const r=this.w,o=[t,e,s,i,a,n].join("\0"),l=r.globals.textRectsCache;if(l&&l.has(o))return l.get(o);const c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,fontWeight:n,foreColor:"#fff",opacity:0});i&&c.attr("transform",i),r.dom.Paper.add(c);let h=c.bbox();const d=h.y;a||(h=c.node.getBoundingClientRect()),c.remove();const u={width:h.width,height:h.height,centerOffset:a?d+h.height/2- -200:0};return l&&l.set(o,u),u}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="."}}},ki=class{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=="undefined"&&typeof t.height=="undefined"?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=Q.createElementNS(ht,"pattern");tt.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});const h=Q.createElementNS(ht,"image");c.appendChild(h);const d=j.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),tt.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}getSeriesAxisRange(t){var e,s,i;const a=this.w,n=(s=(e=a.globals.seriesYAxisReverseMap)==null?void 0:e[t])!=null?s:0;return{minY:O.isNumber(a.globals.minYArr[t])?a.globals.minYArr[t]:a.globals.minY,maxY:O.isNumber(a.globals.maxYArr[t])?a.globals.maxYArr[t]:a.globals.maxY,reversed:!!((i=a.config.yaxis[n])!=null&&i.reversed)}}computeColorStops(t,e){const s=this.w,{threshold:i,colorAboveThreshold:a,colorBelowThreshold:n}=e,{minY:r,maxY:o}=t,l=o-r;let c=l===0?i>o?0:100:(o-i)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));const h=Array.isArray(s.config.fill.opacity)?s.config.fill.opacity[this.seriesIndex]:s.config.fill.opacity,d={offset:c,color:a,opacity:h},u={offset:c,color:n,opacity:h};return t.reversed?[u,d]:[d,u]}fillPath(t){var e,s,i,a,n,r,o;const l=this.w;this.opts=t;const c=this.w.config;let h,d,u;this.seriesIndex=this.getSeriesIndex(t);const p=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold;let x=this.getFillColors()[this.seriesIndex];l.seriesData.seriesColors[this.seriesIndex]!==void 0&&(x=l.seriesData.seriesColors[this.seriesIndex]),typeof x=="function"&&(x=x({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:l}));const b=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let m=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity;const A=b==="gradient"||p;t.color&&(x=t.color);const v=l.config.series[this.seriesIndex];(s=(e=v==null?void 0:v.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(x=(a=(i=v==null?void 0:v.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),x||(x="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(m=t.opacity);let y=x;O.isCSSVariable(x)?y=O.applyOpacityToColor(x,m):x.indexOf("rgb")===-1?x.indexOf("#")===-1?y=x:x.length<9&&(y=O.hexToRgba(x,m)):x.indexOf("rgba")>-1?m=O.getOpacityFromRGBA(x):y=O.hexToRgba(O.rgb2hex(x),m);const w=O.isCSSVariable(x)?O.getThemeColor(x):x;if(b==="pattern"&&(d=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:d,fillColor:w,defaultColor:y})),A){const S=c.fill.gradient.colorStops?[...c.fill.gradient.colorStops]:[];let _=(o=(r=(n=t.fillConfig)==null?void 0:n.gradient)==null?void 0:r.type)!=null?o:c.fill.gradient.type;p&&(S[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),c.plotOptions.line.colors),_="vertical"),u=this.handleGradientFill({type:_,fillConfig:t.fillConfig,fillColor:w,fillOpacity:m,colorStops:S,i:this.seriesIndex,verticalUserSpace:p})}if(b==="image"){const S=c.fill.image.src,_=t.patternID?t.patternID:"",k=`pattern${l.globals.cuid}${t.seriesNumber+1}${_}`;this.patternIDs.indexOf(k)===-1&&(this.clippedImgArea({opacity:m,image:Array.isArray(S)?t.seriesNumber<S.length?S[t.seriesNumber]:S[0]:S,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:k}),this.patternIDs.push(k)),h=`url(#${k})`}else A?h=u:b==="pattern"?h=d:h=y;return t.solid&&(h=y),h}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!="undefined"&&(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 tt(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]!="undefined"?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,verticalUserSpace:r=!1}){let o=this.w.config.fill;i&&(o=K(K({},o),i));const l=this.opts,c=new tt(this.w),h=new O;t=t||o.gradient.type;let d=e,u,p=o.gradient.opacityFrom===void 0?s:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[n]:o.gradient.opacityFrom;d.indexOf("rgba")>-1&&(p=O.getOpacityFromRGBA(d));let g=o.gradient.opacityTo===void 0?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;
27if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)o.gradient.shade==="dark"?u=h.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?O.rgb2hex(e):e):u=h.shadeColor(parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?O.rgb2hex(e):e);else if(o.gradient.gradientToColors[l.seriesNumber]){const x=o.gradient.gradientToColors[l.seriesNumber];u=x,x.indexOf("rgba")>-1&&(g=O.getOpacityFromRGBA(x))}else u=e;if(o.gradient.gradientFrom&&(d=o.gradient.gradientFrom),o.gradient.gradientTo&&(u=o.gradient.gradientTo),o.gradient.inverseColors){const x=d;d=u,u=x}return d.indexOf("rgb")>-1&&(d=O.rgb2hex(d)),u.indexOf("rgb")>-1&&(u=O.rgb2hex(u)),c.drawGradient(t,d,u,p,g,l.size,o.gradient.stops,a,n,r)}};const ta=["none","lighten","darken"];function $s(f,t){const e=f&&f.renderer;return e&&e.kind&&e.kind!=="svg"?e:t}function Io(f){const t=f.config.series||[],e=f.config.chart.type,s=e==="scatter"||e==="bubble",i=f.config.markers&&f.config.markers.size,a=Array.isArray(i)?i.some(h=>h>0):(i||0)>0,n=!!(f.config.dataLabels&&f.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 ea(f){var t,e;const s=f.config.fill&&f.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=f.config.plotOptions)==null?void 0:t.line)==null?void 0:e.colors;if(a&&a.colorAboveThreshold&&a.colorBelowThreshold)return!0;const n=f.config.states||{},r=n.hover&&n.hover.filter&&n.hover.filter.type,o=n.active&&n.active.filter&&n.active.filter.type;return!!(r&&!ta.includes(r)||o&&!ta.includes(o))}let Fe=class Ke{constructor(t,e){this.w=t,this.ctx=e,this._filters=new At(this.w),this._graphics=new tt(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(t){const e=t.config.chart.type;return(e==="line"||e==="area")&&!t.globals.comboCharts&&!t.config.tooltip.intersect}_shouldBatch(){var t,e,s,i,a;const n=this.w,r=n.config.markers,o=(t=r.largeDatasetThreshold)!=null?t:0;if(o<=0||((s=(e=this.ctx)==null?void 0:e.renderer)==null?void 0:s.kind)==="canvas"||!Ke.markersAreInert(n)||r.discrete&&r.discrete.length||r.onClick||r.onDblClick||(i=n.config.chart.events)!=null&&i.dataPointSelection)return!1;const l=n.seriesData.series;if(!Array.isArray(l)||!l.length)return!1;let c=!1;for(let h=0;h<l.length;h++){if(!Array.isArray(l[h]))return!1;let d=!1,u=!1;const p=(a=n.config.series[h])==null?void 0:a.data;for(let x=0;x<l[h].length;x++){l[h][x]===null&&(d=!0);const b=Array.isArray(p)?p[x]:null;if(b&&(b.fillColor||b.strokeColor)){u=!0;break}}if(u)return!1;(n.globals.markers.size[h]>0||d&&r.showNullDataPoints)&&l[h].length>o&&(c=!0)}return c}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]=="undefined"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size);t.globals.markers.batched=this._shouldBatch()}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 tt(this.w),d=$s(this.ctx,h),u=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let p=0;p<l.x.length;p++){let g,x=s,b=!O.isNumber(l.y[p]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[o][s+1]!==null&&!n&&(b=!0),s===1&&p===0&&(x=0),s===1&&p===1&&(x=1);let m="apexcharts-marker";Ke.markersAreInert(r)&&(m+=" no-pointer-events");const A=Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0;if(r.globals.markers.batched&&(A||a)&&!u&&!n){this._batchPoint(e,x,l.x[p],l.y[p],{invalid:b,graphics:h,pSize:a?i:void 0,trackPoint:!a});continue}if(A||a||u){d.kind==="canvas"&&(typeof r.globals.pointsArray[e]=="undefined"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e][x]=[l.x[p],l.y[p]]),b||(m+=` w${O.randomId()}`);const y=this.getMarkerConfig({cssClass:m,seriesIndex:e,dataPointIndex:x}),w=r.config.series[o];if(w.data[x]&&(w.data[x].fillColor&&(y.pointFillColor=w.data[x].fillColor),w.data[x].strokeColor&&(y.pointStrokeColor=w.data[x].strokeColor)),typeof i!="undefined"&&(y.pSize=i),(l.x[p]<-r.globals.markers.largestSize||l.x[p]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[p]<-r.globals.markers.largestSize||l.y[p]>r.layout.gridHeight+r.globals.markers.largestSize)&&(y.pSize=0),!b){if((r.globals.markers.size[e]>0||a||u)&&!c){const _=!a&&!u;_&&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[p],l.y[p],y),g.attr("rel",x),g.attr("j",x),g.attr("index",e),g.node.setAttribute("default-marker-size",y.pSize),is(g,l.x[p],r),this._filters.setSelectionFilter(g,e,x),c&&c.add(g)}}else typeof r.globals.pointsArray[e]=="undefined"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[p],l.y[p]])}return c}_batchPoint(t,e,s,i,{invalid:a,graphics:n,pSize:r,trackPoint:o}){const l=this.w;if(o&&(typeof l.globals.pointsArray[t]=="undefined"&&(l.globals.pointsArray[t]=[]),l.globals.pointsArray[t][e]=[s,i]),a)return;(!this._batch||this._batch.seriesIndex!==t)&&(this._batch={seriesIndex:t,opts:this.getMarkerConfig({cssClass:"",seriesIndex:t}),sizes:new Map});const c=r===void 0?this._batch.opts.pSize:r;if(!(c>0))return;const h=l.globals.markers.largestSize;if(s<-h||s>l.layout.gridWidth+h||i<-h||i>l.layout.gridHeight+h)return;let d=this._batch.sizes.get(c);d||(d=[],this._batch.sizes.set(c,d)),d.push(n.getMarkerPath(s,i,this._batch.opts.shape,c))}flushBatch(t,e){const s=this._batch;if(this._batch=null,!s||s.seriesIndex!==e||!s.sizes.size)return[];const i=this.w,a=new tt(this.w),n=s.opts,r=n.shape==="line"||n.shape==="plus"||n.shape==="cross",o=r?n.pointFillColor:n.pointStrokeColor,l=r?n.pointFillOpacity:n.pointStrokeOpacity,c=[];
27return s.sizes.forEach((h,d)=>{if(!h.length)return;const u=a.drawPath({d:h.join(" "),fill:n.pointFillColor,fillOpacity:n.pointFillOpacity,stroke:o,strokeOpacity:l,strokeWidth:n.pointStrokeWidth,strokeDashArray:n.pointStrokeDashArray});u.attr({class:`apexcharts-marker-batch${Ke.markersAreInert(i)?" no-pointer-events":""}`,"clip-path":`url(#gridRectMarkerMask${i.globals.cuid})`,shape:n.shape,index:e,"default-marker-size":d}),t.add(u),c.push(u)}),c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth: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&&(h.strokeColor!==void 0&&(o.pointStrokeColor=h.strokeColor),h.fillColor!==void 0&&(o.pointFillColor=h.fillColor),h.size!==void 0&&(l=h.size),h.shape!==void 0&&(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&&tt._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&tt._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{const a=tt._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{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}}},Tn=class{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new us(this.w),this.filters=new At(this.w),this.fill=new ki(this.w),this.markers=new Fe(this.w,this.ctx),this.graphics=new tt(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){const i=this.w,a=this.graphics,n=$s(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 u=e+1,p=!0;e===0&&d===0&&(u=0),e===0&&d===1&&(u=1);let g=i.globals.markers.size[r];if(l!==1/0){const m=i.config.plotOptions.bubble;g=i.seriesData.seriesZ[r][u],m.zScaling&&(g/=l),m.minBubbleRadius&&g<m.minBubbleRadius&&(g=m.minBubbleRadius),m.maxBubbleRadius&&g>m.maxBubbleRadius&&(g=m.maxBubbleRadius)}const x=o.x[d],b=o.y[d];if(g=g||0,(b===null||typeof i.seriesData.series[r][u]=="undefined")&&(p=!1),p){const m=this.drawPoint(x,b,g,r,u,e);h.add(m),n.kind==="canvas"&&(typeof i.globals.pointsArray[r]=="undefined"&&(i.globals.pointsArray[r]=[]),i.globals.pointsArray[r][u]=[x,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,u=this.markers;let p=this._perSeries;(!p||p.realIndex!==i)&&(p=this._perSeries=this._buildPerSeriesCache(i,$s(this.ctx,this.graphics)));const g=p.emit;let x;p.canCacheConfig?(p.markerConfig||(p.markerConfig=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:p.isBubble?s:null})),x=p.markerConfig,p.isBubble&&(x.pSize=s,x.pRadius=s)):x=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:p.isBubble?s:null});const m=o.config.series[l].data[a];let A;p.fillCircle!==void 0?A=p.fillCircle:(A=d.fillPath({seriesNumber:i,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[i][n]}),p.fillCacheable===void 0&&(p.fillCacheable=p.canCacheConfig&&d.getFillType(i)==="solid"&&typeof x.pointFillColor=="string"&&!!x.pointFillColor),p.fillCacheable&&!(m!=null&&m.fillColor)&&(p.fillCircle=A));const v=g.drawMarker(t,e,x);m!=null&&m.fillColor&&(A=m.fillColor);const y=p.jitter;if(y!=null&&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}),p.dropShadowEnabled){const w=o.config.chart.dropShadow;h.dropShadow(v,w,i)}if(p.doInitialAnim){if(!p.anim){const S=o.config.chart.animations,_=o.globals.dataPoints||1,k=S.animateGradually,M=k&&k.enabled!==!1;p.anim={popSpeed:S.speed,baseDelay:M?Math.min(20,S.speed*.5/Math.max(1,_)):0}}const w=Dn({style:p.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:p.anim.baseDelay});c.animatePop(v,{speed:p.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":x.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}}};const Be=(f,t,e,s)=>{if(typeof f!="function")return f;const i=f({series:t.seriesData.series,seriesIndex:e,dataPointIndex:s,w:t});return Number.isFinite(i)?i:0};let Hs=class{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,n,r){const o=this.w,l=new tt(this.w);let c=!1;const h=l.getTextRects(s,r),d=h.width,u=h.height;e<0&&(e=0),e>o.layout.gridHeight+u&&(e=o.layout.gridHeight+u/2),typeof o.globals.dataLabelsRects[i]=="undefined"&&(o.globals.dataLabelsRects[i]=[]),o.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:u});const p=o.globals.dataLabelsRects[i].length-2,g=typeof o.globals.lastDrawnDataLabelsIndexes[i]!="undefined"?o.globals.lastDrawnDataLabelsIndexes[i][o.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof o.globals.dataLabelsRects[i][p]!="undefined"){const x=o.globals.dataLabelsRects[i][g];(t>x.x+x.width||e>x.y+x.height||e+u<x.y||t+d<x.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 tt(this.w),l=r.config.dataLabels;let c=0,h=0,d=i,u=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!l.enabled||!Array.isArray(e.x))return u;u=o.group({class:"apexcharts-data-labels"});for(let g=0;g<e.x.length;g++)if(i===1&&g===0&&(d=0),i===1&&g===1&&(d=1),c=e.x[g]+Be(l.offsetX,r,s,d),h=e.y[g]+Be(l.offsetY,r,s,d)+n,!isNaN(c)){let x=r.seriesData.series[s][d];t==="rangeArea"&&(a?x=r.rangeData.seriesRangeStart[s][d]:x=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"?(x=r.seriesData.seriesZ[s][d],b=m(x),h=e.y[g],h=new Tn(this.w,this.ctx).centerTextInBubble(h).y):typeof x!="undefined"&&(b=m(x));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:u,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:A})}return u}plotDataLabelsText(t){const e=this.w,s=new tt(this.w);let{x:i,y:a,i:n,j:r,text:o,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:u,alwaysDrawDataLabel:p,offsetCorrection:g,className:x,seriesIndex:b=n,dataPointIndex:m=r}=t,A=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(n)<0)return A;let v={x:i,y:a,drawnextLabel:!0,textRects:null};if(g&&(v=this.dataLabelsCorrection(i,a,o,n,r,p,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=v.x,a=v.y),v.textRects){const C=e.globals.barPadForNumericAxis||
270;(i<-(C+20)-v.textRects.width||i>e.layout.gridWidth+v.textRects.width+C+30)&&(o="")}let y=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)&&(y=e.globals.dataLabels.style.colors[r]),typeof y=="function"&&(y=y({series:e.seriesData.series,seriesIndex:n,dataPointIndex:r,w:e})),u&&(y=u);const w=e.config.chart.type==="bar"||e.config.chart.type==="rangeBar",S=w?0:Be(d.offsetX,e,b,m),_=w?0:Be(d.offsetY,e,b,m);let k=S;const M=_;if(e.globals.isSlopeChart&&(r!==0&&(k=S*-2+5),r!==0&&r!==e.config.series[n].data.length-1&&(k=0)),v.drawnextLabel){if(l==="middle"&&i===e.layout.gridWidth&&(l="end"),A=s.drawText({x:i+k,y:a+M,foreColor:y,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),A.attr({class:x||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const C=d.dropShadow;new At(this.w).dropShadow(A,C)}h.add(A),is(A,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[n]=="undefined"&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(r)}return A}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 tt(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 At(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&&is(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)}},fs=class{static invalidateAll(t){!t||!t.globals||(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){!t||!t.globals||(t.globals.dimensionCache={})}static invalidateSelectors(t){!t||!t.globals||t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,s){return!t||!t.globals?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}},Kt=class{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]=="undefined"?"":t[i];let c=l;const h=o.formatters.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=new me(this.w),p=l;r&&(c=u.xLabelFormat(h,l,p,{i,dateFormatter:new yt(this.w).formatDate,w:o}),d!==void 0&&(c=d(l,t[i],{i,dateFormatter:new yt(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=="undefined"&&(c=""),c=Array.isArray(c)?c:c.toString();const g=new tt(this.w);let x={};o.layout.rotateXLabels&&r?x=g.getTextRects(c,parseInt(n,10).toString(),null,`rotate(${o.config.xaxis.labels.rotate} 0 0)`,!1):x=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:x}}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 St(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 tt(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}}}},Jt=class{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Kt(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 tt(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,u=r.xaxisFontSize||this.xaxisFontSize,p=r.xaxisFontFamily||this.xaxisFontFamily,g=r.xaxisForeColors||this.xaxisForeColors,x=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 S=A-n(w,m)/2+d.config.xaxis.labels.offsetX;w===0&&v===1&&m/2===A&&y===1&&(S=d.layout.gridWidth/2);let _=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,S,w,c,u,t),k=28;d.layout.rotateXLabels&&t&&(k=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(k+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(k=k+parseFloat(u)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount!="undefined"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?_=this.axesUtils.checkLabelBasedOnTickamount(w,_,v):_=this.axesUtils.checkForOverflowingLabels(w,_,v,c,h);const C=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+w-1]:g[w],T=((l=(o=_.textRect)==null?void 0:o.width)!=null?l:0)/2,D=_.x+T<0;if(d.config.xaxis.labels.show&&!D){const E=e.drawText({x:_.x,y:this.offY+d.config.xaxis.labels.offsetY+k-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:_.text,textAnchor:"middle",fontWeight:x,fontSize:u,fontFamily:p,foreColor:Array.isArray(g)?C():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(s.add(E),E.on("click",R=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){const P=Object.assign({},d,{labelIndex:w});d.config.chart.events.xAxisLabelClick(R,this.ctx,P)}}),t){const R=Q.createElementNS(ht,"title");R.textContent=Array.isArray(_.text)?_.text.join(" "):_.text,E.node.appendChild(R),_.text!==""&&(c.push(_.text),h.push(_))}}w<v-1&&(A=A+n(w+1,m))}}drawXaxisInversed(t){const e=this.w,s=new tt(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 p=0;p<this.xaxisLabels.length;p++)r.push(this.xaxisLabels[p]);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 p=0;p<=r.length-1;p++){let g=typeof r[p]=="undefined"?"":r[p];g=c(g,{seriesIndex:t,dataPointIndex:p,w:e});const x=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(x)?x[p]:x;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",S=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){const _=Object.assign({},e,{labelIndex:p});e.config.chart.events.xAxisLabelClick(S,this.ctx,_)}});const w=Q.createElementNS(ht,"title");if(w.textContent=Array.isArray(g)?g.join(" "):g,y.node.appendChild(w),e.config.yaxis[t].labels.rotate!==0){const S=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${S.y})`)}l=l+o}if(e.config.yaxis[0].title.text!==void 0){const p=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});p.add(g),a.add(p)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const u=e.config.xaxis.axisBorder;if(u.show){const p=s.drawLine(e.globals.padHorizontal+u.offsetX+d,1+u.offsetY,e.globals.padHorizontal+u.offsetX+d,e.layout.gridHeight+u.offsetY,u.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(p):a.add(p)}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 tt(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 tt(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==null||n.setAttribute("transform","translate(0, -10)");const d=r[c].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,u=>{a.placeTextWithEllipsis(u,u.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,u=>{a.placeTextWithEllipsis(u,u.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)}}},as=class{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Kt(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 tt(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 tt(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{const d=Q.createElementNS(ht,"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.layout.gridPad.left,e.barPadForNumericAxis),o=Math.max(t.layout.gridPad.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 u=0;for(let p=0;u<t&&p<d.length;p++)u+=d[p].cols;u===t&&(c=o.layout.xAxisLabelsHeight*.6)}}new Jt(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),u=new tt(this.w).drawLine(e-(l?c:0),s,i+(l?c:0),a,o.config.grid.borderColor,o.config.grid.strokeDashArray);u.node.classList.add("apexcharts-gridline"),h&&o.config.grid.show?this.elGridBorders.add(u):r.add(u)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:n}){const r=this.w,o=new tt(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,!(o<0||o-2>i.layout.gridWidth)&&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 Jt(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 tt(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,u,p,g)=>{for(let x=0,b=0;x<h;x++,b++)b>
27=o.config.grid[c].colors.length&&(b=0),this._drawGridBandRect({c:b,x1:d,y1:u,x2:p,y2:g,type:c}),u+=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 u=o.globals.padHorizontal+o.layout.gridWidth/c;const p=o.layout.gridHeight;for(let g=0,x=0;g<t;g++,x++)x>=o.config.grid.column.colors.length&&(x=0),o.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[g].position,u=(((r=this.xaxisLabels[g+1])==null?void 0:r.position)||o.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGridBandRect({c:x,x1:h,y1:d,x2:u,y2:p,type:"column"}),h+=o.layout.gridWidth/c}}},En=class{constructor(t){this.w=t,this.coreUtils=new St(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)),O.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,u=d?r.tickAmount:es[Math.min(Math.round(o/2),es.length-1)];if(n.isMultipleYAxis&&!d&&n.multiAxisTickAmount>0&&(u=n.multiAxisTickAmount,d=!0),u==="dataPoints"?u=n.dataPoints-1:u=Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&e===0||!O.isNumber(t)&&!O.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=O.isNumber(r.min)?r.min:0,e=O.isNumber(r.max)?r.max:t+u,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 p=[];u<1&&(u=1);let g=u,x=Math.abs(e-t);const b=.15;!l&&t>0&&t/x<b&&(t=0,l=!0),!c&&e<0&&-e/x<b&&(e=0,c=!0),x=Math.abs(e-t);let m=x/g,A=m;const v=Math.floor(Math.log10(A)),y=Math.pow(10,v);let w=Math.ceil(A/y);if(w=_i[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=x/g;if(d)if(h)if(O.mod(x,m)!=0){const T=O.getGCD(m,L);L/T<10?m=T:m=L}else O.mod(m,L)==0?m=L:(L=m,d=!1);else m=L;else if(h)O.mod(x,m)==0?L=m:m=L;else if(O.mod(x,m)==0)L=m;else{g=Math.ceil(x/m),L=x/g;const T=O.getGCD(x,m);x/T<o&&(L=T),m=L}g=Math.round(x/m)}else{if(!l&&!c)if(n.isMultipleYAxis&&d){const L=m*Math.floor(t/m);let T=L+m*g;T<e&&(m*=2),t=L,T=e,e=t+m*g,x=Math.abs(e-t),t>0&&t<Math.abs(T-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)/O.getGCD(x,m)>o&&(t=e-m*u,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)/O.getGCD(x,m)>o&&(e=t+m*u,e+=m*Math.ceil((L-e)/m))}x=Math.abs(e-t),m=O.getGCD(x,m),g=Math.round(x/m)}if(!d&&!(l||c)&&(g=Math.ceil((x-1e-11)/(m+1e-11)),g>16&&O.getPrimeFactors(g).length<2&&g++),!d&&r.forceNiceScale&&n.yValueDecimal===0&&g>x&&(g=x,m=Math.round(x/g)),g>o&&(!(d||h)||r.forceNiceScale)){const L=O.getPrimeFactors(g),T=L.length-1;let D=g;t:for(var S=0;S<T;S++)for(var _=0;_<=T-S;_++){const E=Math.min(_+S,T);let R=D,P=1;for(var k=_;k<=E;k++)P*=L[k];if(R/=P,R<o){D=R;break t}}D===g?m=x:m=x/D,g=Math.round(x/m)}n.isMultipleYAxis&&n.multiAxisTickAmount==0&&n.ignoreYAxisIndexes.indexOf(s)<0&&(n.multiAxisTickAmount=g);let M=t-m;const C=m*1e-11;do M+=m,p.push(O.stripNumber(M,7));while(e-M>C);return{result:p,niceMin:p[0],niceMax:p[p.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)),u=Math.max(l,-d+l),p=Math.pow(10,u);a=Math.round((a+Number.EPSILON)*p)/p}let c=s===Number.MAX_VALUE?5:o;s===Number.MAX_VALUE&&(a=1);let h=t;for(;c>=0;)r.push(h),h=O.preciseAddition(h,a),c-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}_resolveLogTickAmount(t){let e=t.tickAmount;return e==="dataPoints"&&(e=this.w.globals.dataPoints-1),O.isNumber(e)&&e>=1?Number(e):null}_thinToTickAmount(t,e){if(e===null||!O.isNumber(e)||e<1)return t;const s=e+1;if(t.length<=s)return t;const i=t.length-1;let a=null;for(let r=1;r<=i;r++){if(i%r!==0)continue;const o=i/r+1;o>s||(a===null||o>a.count)&&(a={stride:r,count:o})}if(!a)return[t[0],t[t.length-1]];const n=[];for(let r=0;r<t.length;r+=a.stride)n.push(t[r]);return n}logarithmicScaleNice(t,e,s,i=null){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const a=[],n=Math.ceil(Math.log(e)/Math.log(s)+1),r=Math.floor(Math.log(t)/Math.log(s));for(let l=r;l<n;l++)a.push(Math.pow(s,l));const o=this._thinToTickAmount(a,i);return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_logDomainSpan(t,e,s){return s||(s=10),s<=1||(e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s)),t<=0||e<=0)?0:Math.abs(Math.log(e)/Math.log(s)-Math.log(t)/Math.log(s))}logarithmicScale(t,e,s,i=null){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const a=[],n=Math.log(e)/Math.log(s),r=Math.log(t)/Math.log(s),o=n-r,l=i!==null?i:Math.max(1,Math.round(o)),c=o/l;for(let h=0,d=r;h<l;h++,d+=c)a.push(Math.pow(s,d));return a.push(Math.pow(s,n)),{result:a,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(typeof e!="undefined"&&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));O.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]=="undefined"&&(i.yAxisScale[t]=[]);const r=Math.abs(s-e),o=n.logarithmic&&this._logDomainSpan(e,s,n.logBase)>=1,l=n.logarithmic&&(o||r>5);if(n.logarithmic&&!l&&(i.invalidLogScale=!0),l){i.allSeriesCollapsed=!1;const c=this._resolveLogTickAmount(n);i.yAxisScale[t]=n.forceNiceScale?this.logarithmicScaleNice(e,s,n.logBase,c):this.logarithmicScale(e,s,n.logBase,c)}else s===-Number.MAX_VALUE||!O.isNumber(s)||e===Number.MAX_VALUE||!O.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||!O.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 u=(d=t.series[h])==null?void 0:d.group;c.indexOf(u)<0&&c.push(u)}),o.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=h,p=d,g,x;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 S=0;S<o.length;S++){!g&&t.series[o[S]].type&&(g=t.series[o[S]].type);const _=o[S];t.series[_].group?x=t.series[_].group:x="axis-".concat(l.toString()),!(e.collapsedSeriesIndices.indexOf(_)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(_)<0)||(e.allSeriesCollapsed=!1,c.forEach((M,C)=>{if(t.series[_].group===M)for(let L=0;L<this.w.seriesData.series[_].length;L++){const T=this.w.seriesData.series[_][L];T>=0?y[C][L]+=T:w[C][L]+=T,v[C][L]+=T,u=Math.min(u,T),p=Math.max(p,T)}})),(g==="bar"||g==="column")&&e.barGroups.push(x)}g||(g=t.chart.type),g==="bar"||g==="column"?c.forEach((S,_)=>{h=Math.min(h,Math.min.apply(null,w[_])),d=Math.max(d,Math.max.apply(null,y[_]))}):(c.forEach((S,_)=>{u=Math.min(u,Math.min.apply(null,v[_])),p=Math.max(p,Math.max.apply(null,v[_]))}),h=u,d=p),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&&O.isNumber(h)&&O.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 u=-h.niceMin/d;u>o&&(o=u)}}),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),u=c/d;let p;return u<=1+1e-9?p=1:u<=2+1e-9?p=2:u<=2.5+1e-9?p=2.5:u<=5+1e-9?p=5:p=10,p*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 u=-h.niceMin/d;if(Math.abs(u-o)<=1e-9)return;const p=u<o&&o<1-1e-9,g=!p&&u>o&&o>1e-9;if(!p&&!g)return;const x=p?-o*h.niceMax/(1-o):h.niceMin,b=g?-h.niceMin*(1-o)/o:h.niceMax,m=b-x;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(p){y=Math.floor(x/v+1e-9)*v;const S=o>1e-9?y*(o-1)/o:h.niceMax,_=Math.max(S,h.niceMax);w=Math.ceil(_/v-1e-9)*v}else{w=Math.ceil(b/v-1e-9)*v;const S=o<1-1e-9?-o*w/(1-o):h.niceMin,_=Math.min(S,h.niceMin);y=Math.floor(_/v+1e-9)*v}h.result=[];for(let S=y;S<=w+v*1e-9;S=O.preciseAddition(S,v))h.result.push(O.stripNumber(S,7));h.niceMin=y,h.niceMax=w,s[c.ai].forEach(S=>{i[S]=h.niceMin,a[S]=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})}}},ns=class{constructor(t){this.w=t,this.scales=new En(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){const e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;const s=this.w.config.xaxis,i=typeof s.min=="number"?s.min:t[0],a=typeof s.max=="number"?s.max:t[t.length-1];return a>i?(a-i)/e:0}_autoScaleYEnabled(){var t;const e=this.w.config,s=(t=this.w.globals.brushSource)==null?void 0:t.w.config.chart.brush;return!!(e.chart.zoom.enabled&&e.chart.zoom.autoScaleYaxis||s!=null&&s.enabled&&(s!=null&&s.autoScaleYaxis))}_autoScaleXBounds(t){const e=this.w.config.xaxis;if(!e.min&&!e.max)return null;const s=this._xPixelTolerance(this.w.seriesData.seriesX[t]);return{lo:e.min?e.min-s:-1/0,hi:e.max?e.max+s:1/0}}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,n,r,o,l,c,h,d;const u=this.w.config,p=this.w.globals;let g=-Number.MAX_VALUE,x=Number.MIN_VALUE;i===null&&(i=t+1);const b=this.w.seriesData.series;let m=b,A=b;u.chart.type==="candlestick"?(m=this.w.candleData.seriesCandleL,A=this.w.candleData.seriesCandleH):u.chart.type==="boxPlot"?(m=this.w.candleData.seriesCandleO,A=this.w.candleData.seriesCandleC):u.chart.type==="violin"?(m=this.w.violinData.seriesViolinMin,A=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(m=this.w.rangeData.seriesRangeStart,A=this.w.rangeData.seriesRangeEnd);let v=!1,y=!1;this.w.seriesData.seriesX.length>=i&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(v=!0);for(let w=t;w<i;w++){p.dataPoints=Math.max(p.dataPoints,b[w].length);const S=u.series[w].type;this.w.labelData.categoryLabels.length&&(p.dataPoints=this.w.labelData.categoryLabels.filter(C=>typeof C!="undefined").length),this.w.labelData.labels.length&&u.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((C,L)=>C+L.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let _=0,k=b[w].length-1;if(v){const C=this.w.seriesData.seriesX[w],L=this._autoScaleXBounds(w);if(L&&u.xaxis.min)for(;_<k&&C[_]<L.lo;_++);if(L&&u.xaxis.max)for(;k>_&&C[k]>L.hi;k--);L&&C&&C.length&&(C[_]>=L.lo&&C[_]<=L.hi||(C[0]<L.lo&&C[C.length-1]>L.hi&&_>0?(k=_,_=k-1):(_=0,k=-1,y=!0)))}if(m===b&&A===b&&u.chart.type!=="boxPlot"&&S!=="candlestick"&&S!=="boxPlot"&&S!=="violin"&&S!=="rangeArea"&&S!=="rangeBar"&&!(this.w.seriesData.seriesGoals[w]&&this.w.seriesData.seriesGoals[w].length)){const C=b[w],L=Math.min(k,C.length-1),T=(a=this.w.seriesData._parsedExtrema)==null?void 0:a[w];if(T&&T.ref===C&&T.len===C.length&&_===0&&L===C.length-1)T.maxY>g&&(g=T.maxY),T.lowestY<e&&(e=T.lowestY),T.negMinY<0&&T.negMinY<x&&(x=T.negMinY),T.yDec>p.yValueDecimal&&(p.yValueDecimal=T.yDec),T.hasNulls&&(p.hasNullValues=!0);else{let D=p.yValueDecimal,E=!1;for(let R=_;R<=L;R++){const P=C[R];if(P!==null&&typeof P=="number"&&P===P&&P!==1/0&&P!==-1/0){if(P>g&&(g=P),P<e&&(e=P),x>P&&P<0&&(x=P),!Number.isInteger(P)){const F=P<0?-P:P;if(F>=1e-6&&F<1e21){const I=""+P,B=I.indexOf("."),Y=B===-1?0:I.length-B-1;Y>D&&(D=Y)}else{const I=O.noExponents(P);O.isFloat(I)&&(D=Math.max(D,I.toString().split(".")[1].length))}}}else E=!0}p.yValueDecimal=D,E&&(p.hasNullValues=!0)}s=g,(S==="bar"||S==="column")&&(x<0&&g<0&&(g=0,s=Math.max(s,0)),x===Number.MIN_VALUE&&(x=0,e=Math.min(e,0)));continue}for(let C=_;C<=k&&C<this.w.seriesData.series[w].length;C++){let L=b[w][C];if(L!==null&&O.isNumber(L)){switch(typeof((n=A[w])==null?void 0:n[C])!="undefined"&&(g=Math.max(g,A[w][C]),e=Math.min(e,A[w][C])),typeof((r=m[w])==null?void 0:r[C])!="undefined"&&(e=Math.min(e,m[w][C]),s=Math.max(s,m[w][C])),S){case"candlestick":typeof this.w.candleData.seriesCandleC[w][C]!="undefined"&&(g=Math.max(g,this.w.candleData.seriesCandleH[w][C]),e=Math.min(e,this.w.candleData.seriesCandleL[w][C]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[w][C]!="undefined"&&(g=Math.max(g,this.w.candleData.seriesCandleC[w][C]),e=Math.min(e,this.w.candleData.seriesCandleO[w][C]));break;case"violin":typeof((o=this.w.violinData.seriesViolinMax[w])==null?void 0:o[C])!="undefined"&&(g=Math.max(g,this.w.violinData.seriesViolinMax[w][C]),e=Math.min(e,this.w.violinData.seriesViolinMin[w][C]));break}
27if(S&&S!=="candlestick"&&S!=="boxPlot"&&S!=="violin"&&S!=="rangeArea"&&S!=="rangeBar"&&(g=Math.max(g,this.w.seriesData.series[w][C]),e=Math.min(e,this.w.seriesData.series[w][C])),this.w.seriesData.seriesGoals[w]&&this.w.seriesData.seriesGoals[w][C]&&Array.isArray(this.w.seriesData.seriesGoals[w][C])&&this.w.seriesData.seriesGoals[w][C].forEach(T=>{g=Math.max(g,T.value),e=Math.min(e,T.value)}),this.w.config.chart.type==="boxPlot"||S==="boxPlot"){const T=(c=(l=this.w.candleData.seriesBoxPoints)==null?void 0:l[w])==null?void 0:c[C];if(T)for(let D=0;D<T.length;D++){const E=T[D];typeof E=="number"&&(g=Math.max(g,E),e=Math.min(e,E))}}s=g,L=O.noExponents(L),O.isFloat(L)&&(p.yValueDecimal=Math.max(p.yValueDecimal,L.toString().split(".")[1].length)),x>((h=m[w])==null?void 0:h[C])&&((d=m[w])==null?void 0:d[C])<0&&(x=m[w][C])}else p.hasNullValues=!0}(S==="bar"||S==="column")&&(x<0&&g<0&&(g=0,s=Math.max(s,0)),x===Number.MIN_VALUE&&(x=0,e=Math.min(e,0)))}if(u.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(x=e),u.chart.type==="bar"&&(x<0&&g<0&&(g=0),x===Number.MIN_VALUE&&(x=0)),y&&g===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(t,Number.MAX_VALUE,-Number.MAX_VALUE,i)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:x,maxY:g,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(){var t;const e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let i=0;i<this.w.seriesData.series.length;i++)if(typeof this.w.seriesData.seriesZ[i]!="undefined")for(let a=0;a<this.w.seriesData.seriesZ[i].length;a++)this.w.seriesData.seriesZ[i][a]!==null&&O.isNumber(this.w.seriesData.seriesZ[i][a])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[i][a]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[i][a]));const s=((t=this.w.config.plotOptions)==null?void 0:t.bubble)||{};O.isNumber(s.minZ)&&s.minZ<e.minZ&&(e.minZ=s.minZ),O.isNumber(s.maxZ)&&s.maxZ>e.maxZ&&(e.maxZ=s.maxZ)}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new yt(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,e=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;let s=this.w.labelData.seriesGroups;s.length||(s=[this.w.seriesData.seriesNames.map(n=>n)]);const i={},a={};s.forEach(n=>{i[n]=[],a[n]=[],this.w.config.series.map((o,l)=>n.indexOf(this.w.seriesData.seriesNames[l])>-1?l:null).filter(o=>o!==null).forEach(o=>{var l,c,h,d;const u=e?this._autoScaleXBounds(o):null,p=this.w.seriesData.seriesX[o],g=!!(u&&p&&p.length);for(let x=0;x<this.w.seriesData.series[t.maxValsInArrayIndex].length;x++){if(g&&(p[x]<u.lo||p[x]>u.hi))continue;typeof i[n][x]=="undefined"&&(i[n][x]=0,a[n][x]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((c=(l=this.w.config.series)==null?void 0:l[o])==null?void 0:c.type)==="bar"||((d=(h=this.w.config.series)==null?void 0:h[o])==null?void 0:d.type)==="column"))&&this.w.seriesData.series[o][x]!==null&&O.isNumber(this.w.seriesData.series[o][x])&&(this.w.seriesData.series[o][x]>0?i[n][x]+=parseFloat(String(this.w.seriesData.series[o][x]))+1e-4:a[n][x]+=parseFloat(String(this.w.seriesData.series[o][x])))}})}
27),Object.entries(i).forEach(([n])=>{i[n].forEach((r,o)=>{t.maxY=Math.max(t.maxY,i[n][o]),t.minY=Math.min(t.minY,a[n][o])})})}};function rs(){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"]}}let Oe=class{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 Kt(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new tt(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],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let p=1;if(e.config.chart.type==="heatmap"&&!e.config.yaxis[t].labels.formatter){const g=parseInt(a,10)||11,x=Math.max(1,Math.floor(e.layout.gridHeight/(g*1.4))),b=c+1;b>x&&(p=Math.ceil(b/x))}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 x=null;for(let b=c;b>=0;b--){const A=p>1&&b%p!==0?"":d(u[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),S=Array.isArray(w)?w[b]:w,_=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(M=>M.textContent),k=s.drawText({x:v,y:g,text:_.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:S,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(k),this.addTooltip(k,A),x===null&&(x=k),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,k,x,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=Q.createElementNS(ht,"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 tt(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 u=l==null?void 0:l(c[d],d,e),p=e.layout.gridWidth+e.globals.padHorizontal-(o-r+e.config.xaxis.labels.offsetX);if(h.length){const x=this.axesUtils.getLabel(c,h,p,d,this.drawnLabels,this.xaxisFontSize);p=x.x,u=x.text,this.drawnLabels.push(x.text),d===0&&e.globals.skipFirstTimelinelabel&&(u=""),d===c.length-1&&e.globals.skipLastTimelinelabel&&(u="")}const g=s.drawText({x:p,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:u,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,u),o+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new tt(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 tt(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 tt(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)`)}})}},Pn=class{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==null||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}},Rn=class{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=j.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=O.extend(gn,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")}},Fn=class{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new Jt(this.w,this.ctx,e),n=new Oe(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))}}))}}},os=class{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 tt(this.w),s=new At(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",u=a.enabled,p=a.left,g=a.top,x=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;(!O.isNumber(y)||y<0)&&(y=0);let w=t.config.xaxis.crosshairs.width;(!O.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}),u&&(v=s.dropShadow(v,{left:p,top:g,blur:x,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 tt(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 On(f,t){if(!O.isObject(f)||!O.isObject(t))return t!==void 0?t:f;const e=K({},f);for(const s of Object.keys(t)){const i=t[s];i!==void 0&&(O.isObject(i)&&O.isObject(f[s])?e[s]=On(f[s],i):e[s]=i)}return e}let Xn=class{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 fe({}),n=(r={})=>{var o;const l=i[0].breakpoint,c=j.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;const h=O.clone(e.globals.initialConfig);h.series=O.clone(e.config.series);const d=St.extendArrayProps(a,h,e);r=O.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?O.clone(i[h].options.yaxis):null;if(r=St.extendArrayProps(a,i[h].options,e),r=O.extend(e.config,r),Array.isArray(e.config.yaxis)&&d){const u=Array.isArray(d)?d:[d];r=rt(K({},r),{yaxis:e.config.yaxis.map((p,g)=>On(p,u[g]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=St.extendArrayProps(a,t,e);r=O.extend(e.config,r),r=O.extend(r,t),n(r)}else n({})}overrideResponsiveOptions(t){const e=new fe(t).init({responsiveOverride:!0});this.w.config=e}};function No(f){var t,e,s;const i=f.globals;if(i.streamScrolled=!1,!i.axisCharts||!f.seriesData||!Array.isArray(f.seriesData.series)||f.seriesData.series.length===0){i.prevStreamFrame=null;return}const a=[];(e=(t=f.dom)==null?void 0:t.baseEl)!=null&&e.querySelectorAll&&f.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(n=>{var r,o,l,c,h;const d=parseInt((r=n.getAttribute("index"))!=null?r:"",10),u=parseInt((l=(o=n.getAttribute("j"))!=null?o:n.getAttribute("rel"))!=null?l:"",10),p=parseFloat((h=(c=n.getAttribute("r"))!=null?c:n.getAttribute("default-marker-size"))!=null?h:"");isFinite(d)&&isFinite(u)&&isFinite(p)&&((a[d]=a[d]||[])[u]=p)}),i.prevStreamFrame={seriesX:(f.seriesData.seriesX||[]).slice(),seriesY:f.seriesData.series.slice(),xPixels:(i.seriesXvalues||[]).slice(),yPixels:(i.seriesYvalues||[]).slice(),rPixels:a,labels:(i.labels||[]).slice(),isXNumeric:!!((s=f.axisFlags)!=null&&s.isXNumeric)}}function Bo(f,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;f.forEach(n=>{var r;const o=n==null?void 0: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 u=0;for(;u<o.length&&((r=a(o[u]))!=null?r:d)<d;)u++;u>0&&(n.data=o.slice(u))})}function Mi(f){var t;const e=f.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&&f.globals.dataPoints>s?!1:!!(j.isBrowser()&&f.globals.dataChanged&&f.globals.shouldAnimate)}function Yo(f,t,e){var s,i,a,n;if((s=f.axisFlags)!=null&&s.isXNumeric){const o=(a=(i=f.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=f.globals.labels)==null?void 0:n[e];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+e}function zo(f,t,e){var s,i;if(f.isXNumeric){const n=(s=f.seriesX)==null?void 0:s[t];if(n&&n.length&&n[e]!=null)return"x:"+n[e]}const a=(i=f.labels)==null?void 0:i[e];return a!=null&&String(a)!==""?"c:"+(Array.isArray(a)?a.join(" "):String(a)):"j:"+e}function $o(f,t){const e=new Map;f.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=f.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<f.length;l++)i.has(l)||o.push(l);return{toOld:s,exits:o,ordered:n,changed:!r}}function sa(f){const t=new Map;return f.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),s===0?e:`${e}#${s}`})}function Ho(f,t,e=!1,s=!1){var i,a;if(!Mi(f))return null;const n=f.globals.prevStreamFrame;if(!n)return null;const r=(i=n.seriesY)==null?void 0:i[t],o=(a=f.seriesData.series)==null?void 0:a[t];if(!Array.isArray(r)||!Array.isArray(o)||!r.length||!o.length)return null;const l=sa(r.map((d,u)=>zo(n,t,u))),c=sa(o.map((d,u)=>Yo(f,t,u))),h=$o(l,c);return!h.ordered&&!s||!h.changed&&!e?null:{join:h,oldKeys:l,newKeys:c}}function In(f){var t,e;const s=f.config.chart.animations;return ss((e=(t=s.dynamicAnimation)==null?void 0:t.easing)!=null?e:s.easing)}function te(f,t,e,s,i){const a=performance.now(),n=r=>{if(f.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(r-a)/t));s(e(o),o),o<1?Q.requestAnimationFrame(n):i&&i()};Q.requestAnimationFrame(n)}function ia(f,t,e){return[...f.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 aa(f,t,e){return[...f.querySelectorAll(t)].map(s=>parseFloat(s.getAttribute(e)||""))}const ps=":not(.apexcharts-tick-ghost)",Nn=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${ps}`,Bn=`.apexcharts-yaxis-texts-g text${ps}`,Yn=`.apexcharts-gridlines-vertical line${ps}
27`,zn=`.apexcharts-gridlines-horizontal line${ps}`;function $n(f){var t,e;const s=f.globals;if(!((t=f.axisFlags)!=null&&t.isXNumeric)||s.isBarHorizontal||(e=f.config.xaxis)!=null&&e.reversed)return null;const i=s.minX,a=s.maxX,n=f.layout.gridWidth;return!isFinite(i)||!isFinite(a)||!(a>i)||!(n>0)?null:{min:i,max:a,width:n}}function Hn(f,t){var e;const s=f.globals;if(s.isBarHorizontal||!Array.isArray(f.config.yaxis)||f.config.yaxis.length!==1||(e=f.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 Wo(f,t){if(!f||!t)return null;const e=f.max-f.min,s=t.max-t.min;return!(e>0)||!(s>0)||!(f.width>0)||!(t.width>0)?null:{toNew:i=>(f.min+i/f.width*e-t.min)/s*t.width,toOld:i=>(t.min+i/t.width*s-f.min)/e*f.width}}function Go(f,t){if(!f||!t)return null;const e=f.pHi-f.pLo,s=t.pHi-t.pLo,i=f.max-f.min,a=t.max-t.min;if(!e||!s||!(i>0)||!(a>0))return null;const n=o=>f.min+(o-f.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=>f.pLo+(r(o)-f.min)/i*e}}function Vo(f){const t=f.globals;if(t.prevChromeFrame=null,!t.axisCharts||!j.isBrowser())return;const e=f.dom.baseEl;if(O.elementExists(e))try{const s=ia(e,Bn,"y");t.prevChromeFrame={xLabels:ia(e,Nn,"x"),yLabels:s,vGrid:aa(e,Yn,"x1"),hGrid:aa(e,zn,"y1"),xScale:$n(f),yAnchors:Hn(f,s)}}catch(s){t.prevChromeFrame=null}}function na(f,t,e,s){const i=t.style;i.opacity="0",te(f,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function Ye(f,t,e,s,i,a,n){e.forEach(r=>t.setAttribute(r,String(s))),te(f,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 ra(f,{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),te(f,n,r,h=>{const d=String(i+(a-i)*h);s.forEach(u=>l.setAttribute(u,d)),c.opacity=String(1-h)},()=>{l.parentNode&&l.parentNode.removeChild(l)})}const Uo=20;function oa(f,{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,rt(K({},y),{i:w}))});const h=new Set,d=i.length===t.length,u=a.length===e.length,p=e.map(y=>y.pos).concat(t.map(y=>parseFloat(y.getAttribute(s)||""))).filter(y=>isFinite(y)),g=Math.min(...p),x=Math.max(...p),b=Math.max(40,(x-g)*.25),m=y=>Math.max(g-b,Math.min(x+b,y)),A=(y,w)=>{if(!y)return;const S=parseFloat(y.getAttribute(n[0])||""),_=a[w.i];isFinite(S)&&isFinite(_)&&Ye(f,y,n,_,S,r,o)};if(t.forEach((y,w)=>{const S=parseFloat(y.getAttribute(s)||""),_=c.get(y.textContent||""),k=d?i[w]:null;_&&h.add(_.i);const M=y.getAttribute("transform");if(!_||!isFinite(_.pos)){if(!_){if(l&&isFinite(S)&&!M){const C=isFinite(l.toOld(S))?m(l.toOld(S)):NaN;isFinite(C)&&Math.abs(C-S)>.5&&(Ye(f,y,[s],C,S,r,o),k&&Ye(f,k,n,C,S,r,o))}na(f,y,r,o),k&&na(f,k,r,o)}return}if(!(!isFinite(S)||Math.abs(_.pos-S)<.5)){if(M||_.transform){const C=_.pos-S;if(isFinite(C)){const L=M||"";te(f,r,o,T=>{const D=C*(1-T),E=s==="x"?`translate(${D} 0)`:`translate(0 ${D})`;y.setAttribute("transform",`${E} ${L}`.trim())},()=>{L?y.setAttribute("transform",L):y.removeAttribute("transform")})}A(k,_);return}Ye(f,y,[s],_.pos,S,r,o),A(k,_)}}),!l||!t.length)return;let v=0;e.forEach((y,w)=>{if(h.has(w)||!isFinite(y.pos)||y.transform||v>=Uo)return;const S=l.toNew(y.pos);!isFinite(S)||Math.abs(S-y.pos)<.5||(v++,ra(f,{template:t[0],display:y.display,attrs:[s],from:y.pos,to:m(S),duration:r,ease:o}),u&&i.length&&isFinite(a[w])&&ra(f,{template:i[0],attrs:n,from:a[w],to:m(l.toNew(a[w])),duration:r,ease:o}))})}function la(f){const t=f.globals,e=t.prevChromeFrame;if(t.prevChromeFrame=null,!e||!t.axisCharts||!j.isBrowser()||!Mi(f)||!(f.seriesData.series||[]).some((r,o)=>
27Ho(f,o,!0,!0)!==null))return;const i=f.dom.baseEl;if(!O.elementExists(i))return;const a=Math.max(1,f.config.chart.animations.dynamicAnimation.speed||1),n=In(f);try{const r=[...i.querySelectorAll(Bn)],o=Wo(e.xScale,$n(f)),l=Go(e.yAnchors,Hn(f,r.map(c=>({pos:parseFloat(c.getAttribute("y")||"")}))));oa(f,{newLabels:[...i.querySelectorAll(Nn)],oldLabels:e.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Yn)],oldLines:e.vGrid,lineAttrs:["x1","x2"],duration:a,ease:n,project:o}),oa(f,{newLabels:r,oldLabels:e.yLabels,posAttr:"y",newLines:[...i.querySelectorAll(zn)],oldLines:e.hGrid,lineAttrs:["y1","y2"],duration:a,ease:n,project:l})}catch(r){}}const Wn=".apexcharts-data-labels[data\\:dlKey]",Li=".apexcharts-datalabel",Gn=".apexcharts-datalabel-total[data\\:dlTotalKey]";function Vn(f){var t,e;const s=f.config.dataLabels;return!!((t=s==null?void 0:s.animate)!=null&&t.enabled||(e=s==null?void 0:s.countUp)!=null&&e.enabled)}function ca(f){if(!isFinite(f))return 0;const t=String(Math.abs(f)),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 Ss(f,t){const e=f.querySelector("tspan");e?e.textContent=t:f.textContent=t}function qo(f){const t=f.globals;if(t.prevDataLabels=null,!t.axisCharts||!j.isBrowser()||!Vn(f))return;const e=f.dom.baseEl;if(O.elementExists(e))try{const s=new Map;e.querySelectorAll(Wn).forEach(i=>{const a=i.getAttribute("data:dlKey");if(!a)return;const n=i.querySelector(Li);n&&s.set(a,{cx:parseFloat(n.getAttribute("cx")||""),cy:parseFloat(n.getAttribute("cy")||""),val:parseFloat(i.getAttribute("data:dlVal")||"")})}),e.querySelectorAll(Gn).forEach(i=>{const a=i.getAttribute("data:dlTotalKey");a&&s.set(`total::${a}`,{cx:parseFloat(i.getAttribute("cx")||""),cy:parseFloat(i.getAttribute("cy")||""),val:parseFloat(i.getAttribute("data:dlTotalVal")||"")})}),t.prevDataLabels=s.size?s:null}catch(s){t.prevDataLabels=null}}function jo(f,t,e,s){const i=t.style;i.opacity="0",te(f,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function ha(f,{el:t,oldCx:e,oldCy:s,duration:i,ease:a,delay:n=0}){const r=t.hasAttribute("cx")?t:t.querySelector(Li);if(!r)return;const o=e-parseFloat(r.getAttribute("cx")||""),l=s-parseFloat(r.getAttribute("cy")||"");if(!isFinite(o)||!isFinite(l)||Math.abs(o)+Math.abs(l)<=.5)return;const c=t.getAttribute("transform")||"",h=()=>te(f,i,a,d=>{const u=1-d;t.setAttribute("transform",`translate(${o*u} ${l*u}) ${c}`.trim())},()=>{c?t.setAttribute("transform",c):t.removeAttribute("transform")});n>0?(t.setAttribute("transform",`translate(${o} ${l}) ${c}`.trim()),setTimeout(()=>{f.globals.isDestroyed||h()},n)):h()}function da(f,{el:t,from:e,to:s,formatter:i,fmtOpts:a,duration:n,ease:r,delay:o=0}){if(!isFinite(e)||!isFinite(s)||Math.abs(s-e)<=1e-9)return;const l=Math.max(ca(e),ca(s)),c=d=>{const u=Number(d.toFixed(l));let p=u;if(typeof i=="function")try{p=i(u,a)}catch(g){p=u}return String(p)},h=()=>te(f,n,r,d=>{Ss(t,c(e+(s-e)*d))},()=>{Ss(t,c(s))});o>0?(Ss(t,c(e)),setTimeout(()=>{f.globals.isDestroyed||h()},o)):h()}function ua(f){var t,e;const s=f.globals,i=s.prevDataLabels;if(s.prevDataLabels=null,!i||!s.axisCharts||!j.isBrowser()||!Vn(f)||!Mi(f))return;const a=f.dom.baseEl;if(!O.elementExists(a))return;const n=f.config.dataLabels,r=!!((t=n.animate)!=null&&t.enabled),o=!!((e=n.countUp)!=null&&e.enabled),l=n.formatter,c=Math.max(1,f.config.chart.animations.dynamicAnimation.speed||1),h=In(f);try{a.querySelectorAll(Wn).forEach(u=>{const p=u.getAttribute("data:dlKey");if(!p)return;const g=u.querySelector(Li);if(!g)return;const x=i.get(p),b=parseInt(u.getAttribute("data:dlDelay")||"0",10)||0;if(r&&(x&&isFinite(x.cx)&&isFinite(x.cy)?ha(f,{el:u,oldCx:x.cx,oldCy:x.cy,duration:c,ease:h,delay:b}):x||jo(f,u,c,h)),o&&x){const m=parseInt(p,10),A=parseInt(u.getAttribute("data:dlJ")||"",10);da(f,{el:g,from:x.val,to:parseFloat(u.getAttribute("data:dlVal")||""),formatter:l,fmtOpts:rt(K({},f),{seriesIndex:m,dataPointIndex:isFinite(A)?A:0,w:f}),duration:c,ease:h,delay:b})}});const d=f.config.plotOptions.bar.dataLabels.total.formatter||l;
27a.querySelectorAll(Gn).forEach(u=>{const p=u.getAttribute("data:dlTotalKey");if(!p)return;const g=i.get(`total::${p}`);if(!g)return;const x=parseInt(u.getAttribute("data:dlDelay")||"0",10)||0;if(r&&isFinite(g.cx)&&isFinite(g.cy)&&ha(f,{el:u,oldCx:g.cx,oldCy:g.cy,duration:c,ease:h,delay:x}),o){const b=parseInt(u.getAttribute("data:dlTotalSeries")||p,10);da(f,{el:u,from:g.val,to:parseFloat(u.getAttribute("data:dlTotalVal")||""),formatter:d,fmtOpts:rt(K({},f),{seriesIndex:b,dataPointIndex:0,w:f}),duration:c,ease:h,delay:x})}})}catch(d){}}let Qt=class Un{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='${O.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){Un.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){let i=!1;function a(o){for(let l=0;l<o.length;l++)o[l].index===s&&(e.node.classList.add("apexcharts-series-collapsed"),i=!0)}if(a(t.globals.collapsedSeries),a(t.globals.ancillaryCollapsedSeries),!i||(t.globals.collapsingSeriesIndices||[]).indexOf(s)===-1||(e.node.classList.add("apexcharts-series-collapsing"),!j.isBrowser()))return;const n=t.config.chart.animations,r=(n.dynamicAnimation.speed||0)+(n.speed||0)+100;setTimeout(()=>{t.globals.isDestroyed||e.node.classList.remove("apexcharts-series-collapsing")},r)}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=O.clone(n.globals.initialSeries);Array.isArray(r)||(r=O.clone(n.config.series)||[]),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;if(!Array.isArray(t))return t;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==null?void 0: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==null||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}getActiveConfigSeriesIndexByGroup(t=[]){const e=this.w;return(e.labelData.seriesGroups||[]).map(i=>{let a=-1;return e.config.series.forEach((n,r)=>{if(i.indexOf(e.seriesData.seriesNames[r])===-1||e.globals.comboCharts&&t.length&&t.indexOf(n.type)===-1)return;n.data&&n.data.length>0&&e.globals.collapsedSeriesIndices.indexOf(r)===-1&&(a=r)}),a})}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(No(a),Vo(a),qo(a),!a.globals.axisCharts){a.globals.previousPaths=a.seriesData.series;return}if(!O.elementExists(a.dom.baseEl)){a.globals.previousPaths=[];return}a.globals.previousPaths=[];function n(c,h,d){const u=c[h].childNodes,p={type:d,paths:[],realIndex:c[h].getAttribute("data:realIndex")};for(let g=0;g<u.length;g++)if(u[g].hasAttribute("pathTo")){const x=u[g].getAttribute("pathTo");p.paths.push({d:x,key:u[g].getAttribute("data:pathKey"),fill:u[g].getAttribute("fill"),flip:u[g].classList.contains("apexcharts-flip-y")||u[g].classList.contains("apexcharts-flip-x")})}a.globals.previousPaths.push(p)}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 u=0;u<h.length;u++){const p=x=>h[u].getAttribute(x),g={x:parseFloat((t=p("x"))!=null?t:"0"),y:parseFloat((e=p("y"))!=null?e:"0"),width:parseFloat((s=p("width"))!=null?s:"0"),height:parseFloat((i=p("height"))!=null?i:"0")};d.push({rect:g,color:h[u].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 tt(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 fa={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"},Zo=24;function Ko(f){if(!j.isBrowser())return{};const t=f.dom&&(f.dom.elWrap||f.dom.baseEl)||null;if(!t)return{};const e=Q.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 fa){const r=s(fa[n]);r&&(i[n]=r)}const a=[];for(let n=1;n<=Zo;n++){const r=s(`--apx-series-${n}`);if(!r)break;a.push(r)}return a.length&&(i.series=a),i}const Ws="__apexcharts_themes__";globalThis[Ws]||(globalThis[Ws]={});function Di(){return globalThis[Ws]}function Jo(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerTheme requires a non-empty name.");return}if(t!=null&&(typeof t!="object"||Array.isArray(t))){console.warn(`ApexCharts: registerTheme("${f}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}Di()[f]=t||{}}function Qo(f){return f&&Di()[f]||null}function tl(f){f&&delete Di()[f]}const _s="#373d3f",Cs="#f6f7f8",ks="#e0e0e0";let qn=class{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 O;this._namedTheme=Qo(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===_s&&(t.config.chart.foreColor=Cs),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===Cs&&(t.config.chart.foreColor=_s),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=K(K({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?Ko(this.w):{};return K(K({},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===_s||e.config.chart.foreColor===Cs)&&(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===ks&&(e.config.grid.borderColor=t.grid);const n=r=>{r&&(r.axisBorder&&r.axisBorder.color===ks&&(r.axisBorder.color=t.grid),r.axisTicks&&r.axisTicks.color===ks&&(r.axisTicks.color=t.grid))};n(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(n):n(e.config.yaxis)}const s=e.globals.tokenSurface,i=e.config.chart.background,a=!i||i===s;if(t.surface){if(a){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;const n=e.dom.Paper&&e.dom.Paper.node;n&&n.style&&(n.style.background=t.surface)}}else if(s&&i===s){e.config.chart.background="",e.globals.tokenSurface=void 0;const n=e.dom.Paper&&e.dom.Paper.node;n&&n.style&&(n.style.background="")}}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=rs();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=rs(),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}},jn=class{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 tt(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)}}};class Zn{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({},O.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=(u=>t.config.dataLabels.formatter(u,{seriesIndex:o,dataPointIndex:c,w:t}))(t.seriesData.series[o][c]);e.push(d)})});const s=O.getLargestStringFromArr(e),i=new tt(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}getSparklineStrokeInset(){const t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,s=e/2;if(!t.config.stroke.show||!(s>0))return{top:0,bottom:0};const i=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();
27if(!this._strokeTracesDataPoints()||!(i>0)||!a)return{top:s,bottom:s};const n=Math.max(t.globals.svgHeight-e,0),r=n*(t.globals.maxY-a.max)/i,o=n*(a.min-t.globals.minY)/i;return{top:Math.min(Math.max(s-r,0),s),bottom:Math.min(Math.max(s-o,0),s)}}_strokeTracesDataPoints(){const t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;const e=["line","area","scatter"];return t.config.series.every(s=>e.includes(s.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(s=>{Array.isArray(s)&&s.forEach(i=>{Number.isFinite(i)&&(i<t&&(t=i),i>e&&(e=i))})}),t===1/0?null:{min:t,max:e}}}class Kn{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}else{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=O.getLargestStringFromArr(e),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,u)=>d.length>u.length?d:u,0),n=a);const r=new me(this.w),o=a;a=r.xLabelFormat(i,a,o,{i:void 0,dateFormatter:new yt(this.w).formatDate,w:t}),n=r.xLabelFormat(i,n,o,{i:void 0,dateFormatter:new yt(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a=="undefined"||String(a).trim()==="")&&(a="1",n=a);const l=new tt(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=u=>l.getTextRects(u,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=O.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i),o=new tt(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 tt(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=="undefined"?(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 tt(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],p=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+n/1.75-this.dCtx.yAxisWidthRight,g=d.position-n/1.75+this.dCtx.yAxisWidthLeft,x=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;p>s.svgWidth-e.layout.translateX-x&&(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 Jn{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 Kt(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],u=c.niceMin===Number.MIN_VALUE?0:c.niceMin;let p=c.result.reduce((v,y)=>{var w,S;return((w=String(d(v,l)))==null?void 0:w.length)>((S=String(d(y,l)))==null?void 0:S.length)?v:y},u);p=d(p,l);let g=p;if((typeof p=="undefined"||p.length===0)&&(p=c.niceMax),String(p).length===1&&(p=p+".0",g=p),t.globals.isBarHorizontal){a=0;const v=t.labelData.labels.slice();p=O.getLargestStringFromArr(v),p=d(p,{seriesIndex:o,dataPointIndex:-1,w:t}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,v)}const x=new tt(this.w),b="rotate(".concat(r.labels.rotate," 0 0)"),m=x.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1);let A=m;p!==g&&(A=x.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 tt(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 Kt(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 Qn{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}gridPadForStackedTotalDataLabels(){const{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||t.config.chart.stackType!=="100%"||!e.enabled)return;const s=t.seriesData.stackedSeriesTotals||[];if(!s.length)return;const i=e.formatter||t.config.dataLabels.formatter,a=s.map((l,c)=>String(i?i(l,rt(K({},t),{seriesIndex:0,dataPointIndex:c,w:t})):l)),o=new tt(t).getTextRects(O.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,o)}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");this.dCtx.titleBlockPad=s,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 Kt(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))})}}const el=18,sl=23;function pa(f,t){const e=f.config.drilldown&&f.config.drilldown.breadcrumb||{};return K(K({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},e),t||{})}let Ti=class{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 Zn(this),this.dimYAxis=new Jn(this),this.dimXAxis=new Kn(this),this.dimGrid=new Qn(this),this.lgWidthForSideLegends=0,this.gridPad=K({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;if(this.gridPad=K({},t.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([a,n])=>{this.gridPad[a]=Math.max(n,this.w.globals.markers.largestSize/1.5)});const i=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(i.top,this.gridPad.top),this.gridPad.bottom=Math.max(i.bottom,this.gridPad.bottom)}e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),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 s=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-s*2,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords,gridPad:K({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,s,i,a,n;const r=this.w,o=r.config.chart.type==="treemap";if(o){const u=(e=(t=r.config.plotOptions)==null?void 0:t.treemap)==null?void 0:e.zoom;if(u&&u.enabled){if(pa(r,u.breadcrumb).show===!1)return;this.gridPad.top+=el+4;return}}if(!r.globals.axisCharts||!this.ctx.drilldown||!r.config.drilldown||!r.config.drilldown.enabled||pa(r).show===!1)return;const l=parseFloat(String((n=(a=(i=(s=r.config.yaxis)==null?void 0:s[0])==null?void 0:i.labels)==null?void 0:a.style)==null?void 0:n.fontSize))||11,c=o?0:Math.ceil(l*ts/2),h=sl+1+c,d=o?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,h-d)}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((u,p)=>{t.layout.yLabelsCoords.push({width:s[p].width,index:p}),t.layout.yTitleCoords.push({width:i[p].width,index:p})}),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)||12)/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 Oe(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:ts,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(u=>{h+=u.labels.minWidth,d+=u.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}};
27const Ce=1e3,ke=60*Ce,Me=60*ke,pe=24*Me,ga=7*pe,Ms=30*pe,Vt=365*pe,il=10/(1440*60),Ls=[{unit:"second",step:1,approxMs:Ce},{unit:"second",step:5,approxMs:5*Ce},{unit:"second",step:15,approxMs:15*Ce},{unit:"second",step:30,approxMs:30*Ce},{unit:"minute",step:1,approxMs:ke},{unit:"minute",step:5,approxMs:5*ke},{unit:"minute",step:15,approxMs:15*ke},{unit:"minute",step:30,approxMs:30*ke},{unit:"hour",step:1,approxMs:Me},{unit:"hour",step:3,approxMs:3*Me},{unit:"hour",step:6,approxMs:6*Me},{unit:"hour",step:12,approxMs:12*Me},{unit:"day",step:1,approxMs:pe},{unit:"day",step:2,approxMs:2*pe},{unit:"week",step:1,approxMs:ga},{unit:"week",step:2,approxMs:2*ga},{unit:"month",step:1,approxMs:Ms},{unit:"month",step:3,approxMs:3*Ms},{unit:"month",step:6,approxMs:6*Ms},{unit:"year",step:1,approxMs:Vt},{unit:"year",step:2,approxMs:2*Vt},{unit:"year",step:5,approxMs:5*Vt},{unit:"year",step:10,approxMs:10*Vt},{unit:"year",step:25,approxMs:25*Vt},{unit:"year",step:50,approxMs:50*Vt},{unit:"year",step:100,approxMs:100*Vt}],tr=10;let er=class{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/pe;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<il?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const n=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:tr;this.tickInterval=al(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 yt(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 u=a.getDateFields(c,n),p=o>0?(c-t)/o*r:0;l.push({timestamp:c,position:p,unit:s.unit,year:u.year,month:u.month+1,day:u.date,hour:u.hour,minute:u.minute,second:u.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 Ti(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(n.layout)}formatDates(t){const e=this.w,s=new yt(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 tt(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 al(f,t){if((!Number.isFinite(t)||t<=0)&&(t=tr),f<=0)return Ls[0];const e=f/t;let s=Ls[0],i=1/0;for(const a of Ls){const n=Math.abs(Math.log(a.approxMs/e));n<i&&(i=n,s=a)}return s}const Gs="__apexcharts_registry__",Vs="__apexcharts_custom_types__";globalThis[Gs]||(globalThis[Gs]={});globalThis[Vs]||(globalThis[Vs]=new Set);function gs(){return globalThis[Gs]}function Ei(){return globalThis[Vs]}function nl(f){Ei().add(f)}function Ot(f){return Ei().has(f)}function rl(f){return!!gs()[f]}function ol(f){delete gs()[f],Ei().delete(f)}function Us(f){Object.assign(gs(),f)}function ut(f){const t=gs()[f];if(!t)throw new Error(`ApexCharts: chart type "${f}" is not registered. Bundler: import 'apexcharts/${f}'. Script tag: add <script src=".../dist/${f}.js"> after apexcharts.core.js, or load the full apexcharts.js instead.`);return t}let sr=class{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)&&Ot(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=Q.createElementNS("http://www.w3.org/1999/xhtml","div"),tt.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=Q.createElementNS(ht,"foreignObject"),tt.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=Q.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=Q.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=Q.createElementNS(ht,"de
27sc");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"}),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,u;const p=((d=t[h])==null?void 0:d.type)==="column"?"bar":((u=t[h])==null?void 0:u.type)||(r==="column"?"bar":r),g=a;g[p]?(p==="rangeArea"?(g[p].series.push(this.w.rangeData.seriesRangeStart[h]),g[p].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[h])):g[p].series.push(c),g[p].i.push(h),p==="bar"&&(e.globals.columnSeries=a.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(p)?o=p:Ot(p)?(n[p]||(n[p]={series:[],i:[]}),n[p].series.push(c),n[p].i.push(h)):console.warn(`You have specified an unrecognized series type (${p}).`),r!==p&&p!=="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(p=>{p&&p.node&&d.appendChild(p.node)}),[]}const h=i.renderer.present();if(h){const d=new tt(s).group({class:"apexcharts-canvas-series-wrap"});return d.add(h),(Array.isArray(l)?l:[l]).forEach(p=>{p&&d.add(p)}),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(ut("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(ut("candlestick"))(i.w,i,e):null,d=t.violin.series.length>0||!n.comboCharts&&a.chart.type==="violin"?new(ut("violin"))(i.w,i,e):null,u=!n.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=u?new(ut("pie"))(i.w,i):null;const p=t.rangeBar.series.length>0||!n.comboCharts&&a.chart.type==="rangeBar";return i.rangeBar=p?new(ut("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 u=new St(this.w);if(t.area.series.length>0&&d.push(...u.drawSeriesByGroup(t.area,o.areaGroups,"area",l)),t.bar.series.length>0)if(r.chart.stacked){const p=new(ut("barStacked"))(n.w,n,i);d.push(p.draw(t.bar.series,t.bar.i))}else n.bar=new(ut("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(...u.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 p=new(ut("line"))(n.w,n,i,!0);d.push(p.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){const p=new(ut("line"))(n.w,n,i,!0);d.push(p.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(p=>{const g=e[p];if(g.series.length>
270){const x=new(ut(p))(n.w,n,i);d.push(x.draw(g.series,p,g.i))}})}else{const u=r.chart.type;switch(u){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(ut("barStacked"))(n.w,n,i).draw(this.w.seriesData.series):(n.bar=new(ut("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,u);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(ut("heatmap"))(n.w,n,i).draw(this.w.seriesData.series);break}case"treemap":{d=new(ut("treemap"))(n.w,n).draw(this.w.seriesData.series);break}case"unit":{d=new(ut("unit"))(n.w,n).draw(this.w.seriesData.series);break}case"sunburst":{d=new(ut("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(ut("radialBar"))(n.w,n).draw(this.w.seriesData.series);break}case"radar":{d=new(ut("radar"))(n.w,n).draw(this.w.seriesData.series);break}default:Ot(u)?d=new(ut(u))(n.w,n,i).draw(this.w.seriesData.series,u):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=O.getDimensions(this.el);const r=this._extractDimensionUnit(i);r==="%"?O.isNumber(n[0])&&(n[0].width===0&&(n=O.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=O.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),tt.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),o!=="%"&&j.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=O.getDimensions(this.el);r[0]||(r=O.getDimensions(this.el.parentNode)),i=r[0]||0}s.endsWith("%")&&(a=O.getDimensions(this.el.parentNode)[1]||0);const n={w:Math.round(i),h:Math.round(a)};return t.responsive&&t.responsive.length&&j.isBrowser()&&(n.iw=window.innerWidth),n}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;tt.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,n,r,o,l;const{w:c}=this,h=c.config.chart.height?String(c.config.chart.height):"",d=h!==""&&h!=="auto",u=h.includes("%");let p=0,g=c.config.chart.sparkline.enabled?1:15;g+=c.layout.gridPad.bottom,["top","bottom"].includes(c.config.legend.position)&&c.config.legend.show&&!c.config.legend.floating&&(p=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+7);const x=c.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),b=c.globals.pieExternalLabelMarginY||0;let m=b>0?c.globals.radialSize*2+b*2:c.globals.radialSize*2.05;const A=c.config.chart.type==="sunburst"?"sunburst":c.config.chart.type==="pie"||c.config.chart.type==="donut"||c.config.chart.type==="polarArea"?"pie":"radialBar",v=Math.abs(c.config.plotOptions[A].endAngle-c.config.plotOptions[A].startAngle);if(x&&!c.config.chart.sparkline.enabled&&v<360){const w=O.getBoundingClientRect(this.w.dom.Paper.node);let S=1/0,_=-1/0;const k=R=>{var P,F,I,B;if((P=R.classList)!=null&&P.contains("apexcharts-radialbar-hollow"))return;const Y=(I=(F=R.tagName)==null?void 0:F.toLowerCase)==null?void 0:I.call(F);if(Y==="text"||Y==="tspan")return;const $=Array.from((B=R.children)!=null?B:[]);if($.length>0){$.forEach(N=>k(N));return}const X=O.getBoundingClientRect(R);if(X.bottom-X.top>0){const N=X.top-w.top,H=X.bottom-w.top;N<S&&(S=N),H>_&&(_=H)}};
27Array.from((s=x.children)!=null?s:[]).forEach(R=>k(R)),Number.isFinite(S)||(S=0),Number.isFinite(_)||(_=O.getBoundingClientRect(x).bottom-w.top);const M=Math.max(g,c.globals.radialSize*.2),C=Math.max(M-S,0);C!==0&&(c.layout.translateY=((i=c.layout.translateY)!=null?i:0)+C,tt.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=c.layout.translateX)!=null?a:0}, ${c.layout.translateY})`}),_+=C),m=_>0?_:c.globals.radialSize*2.05;const L=Math.max(M,S),T=Math.ceil(m+p+L),D=(n=c.config.chart.offsetY)!=null?n:0,E=T+Math.max(D,0);if(!u){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(E)),this.w.dom.elWrap.style.height=`${E}px`,tt.setAttrs(this.w.dom.Paper.node,{height:T}),j.isBrowser()){const R=(r=this.w.dom.Paper.node.parentNode)==null?void 0:r.parentNode;R&&(R.style.minHeight=`${E}px`)}c.globals.svgHeight=T,c.config.legend.position==="bottom"&&c.config.legend.show&&!c.config.legend.floating&&((o=this.ctx.legend)==null||o.setLegendWrapXY(20,0))}return}const y=Math.ceil(m+this.w.layout.translateY+p+g);if(!d&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(y)),this.w.dom.elWrap.style.height=`${y}px`,tt.setAttrs(this.w.dom.Paper.node,{height:y}),j.isBrowser())){const w=(l=this.w.dom.Paper.node.parentNode)==null?void 0:l.parentNode;w&&(w.style.minHeight=`${y}px`)}}coreCalculations(){new ns(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new Ci,{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 os(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new os(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new er(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 St(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)=>{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=>
27typeof 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(". ")}};const qs="__apexcharts_series_transforms__";globalThis[qs]||(globalThis[qs]={});function ll(){return globalThis[qs]}function cl(f){return f&&ll()[f]||null}function hl(f,t){const e=f.config.drilldown;return(e&&Array.isArray(e.series)?e.series:[]).find(i=>i&&i.id===t)}function js(f,t,e,s,i,a=null,n={}){var r,o,l;const c=t&&typeof t=="object",h=c&&(o=(r=t.x)!=null?r:t.name)!=null?o:"",d=Number(c?(l=t.y)!=null?l:t.value:t),u={name:String(h),value:isNaN(d)?null:d,color:c&&t.color?t.color:void 0,_key:`${i}/${e}:${h}`};if(s&&!u.color&&(u.color=s[e%s.length]),n.keepDatum&&(u._datum=t),c&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((p,g)=>js(f,p,g,null,u._key,a,n));else if(c&&t.drilldown!=null&&n.expandDrilldown!==!1){const p=a||new Set;if(!p.has(t.drilldown)){const g=hl(f,t.drilldown);if(g&&Array.isArray(g.data)&&g.data.length){const x=new Set(p);x.add(t.drilldown);const b=Array.isArray(g.colors)?g.colors:null;u.children=g.data.map((m,A)=>js(f,m,A,b,u._key,x,n))}}}return u}function dl(f,t,e={}){const s=t||f.config.series;return Array.isArray(s)?s.map((i,a)=>{var n,r;const o=i&&Array.isArray(i.data)?i.data:[],l=`${a}:${(n=i==null?void 0:i.name)!=null?n:""}`;return{name:String((r=i==null?void 0:i.name)!=null?r:""),value:null,color:(i==null?void 0:i.color)||void 0,_key:l,_seriesIndex:a,children:o.map((h,d)=>js(f,h,d,null,l,null,e))}}):[]}function ir(f){f.children&&f.children.length&&(f.children.forEach(t=>ir(t)),(f.value==null||isNaN(f.value))&&(f.value=f.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(f.value==null||isNaN(f.value))&&(f.value=0)}function ul(f,t={}){if(!Array.isArray(f))return!1;const e=t.drilldown!==!1;for(let s=0;s<f.length;s++){const i=f[s]&&f[s].data;if(Array.isArray(i))for(let a=0;a<i.length;a++){const n=i[a];if(!(!n||typeof n!="object")&&(Array.isArray(n.children)&&n.children.length||e&&n.drilldown!=null))return!0}}return!1}function ar(f){var t,e,s,i;return!!((i=(s=(e=(t=f==null?void 0:f.config)==null?void 0:t.plotOptions)==null?void 0:e.treemap)==null?void 0:s.nested)!=null&&i.drilldownAsLevels)}function fl(f,t){var e,s,i;const a=(i=(s=(e=f==null?void 0:f.config)==null?void 0:e.plotOptions)==null?void 0:s.treemap)==null?void 0:i.nested;return a&&a.enabled===!1?!1:ul(t,{drilldown:ar(f)})}function pl(f){const t=[];let e=0;return f.forEach((s,i)=>{const a=[],n=(r,o,l)=>{r._parent=l,r._depth=o,r._si=i,r._leaf=!(r.children&&r.children.length),o>e&&(e=o),r._leaf?(r._di=a.length,a.push(r)):(r._di=-1,r.children.forEach(c=>n(c,o+1,r)))};n(s,0,null),t.push(a)}),{leaves:t,maxDepth:e}}function gl(f){const t=f._datum;if(t&&typeof t=="object"){const e=rt(K({},t),{x:f.name,y:f.value});return delete e.children,e}return{x:f.name,y:f.value}}function xl(f,t){const e=dl(f,t,{keepDatum:!0,expandDrilldown:ar(f)});e.forEach(ir);const{leaves:s,maxDepth:i}=pl(e),a=t.map((n,r)=>rt(K({},n),{data:(s[r]||[]).map(gl)}));return{roots:e,leafSeries:a,maxDepth:i}}const ml={histogram:"stats",raincloud:"raincloud"};let Pi=class Bt{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new St(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new Qt(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]!="undefined"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||typeof e.x=="undefined")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!="undefined";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,u=!0,p=1/0,g=-1/0,x=!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],S=y[1];if(u)if(typeof w=="number"){w===w&&(w<p&&(p=w),w>g&&(g=w));const _=w-m;_>0?_<b&&(b=_):_<0&&(x=!1),m=w}else u=!1;if(typeof S=="number")if(S===S&&S!==1/0&&S!==-1/0){if(S>o&&(o=S),S<l&&(l=S),S<0&&S<c&&(c=S),!Number.isInteger(S)){const _=S<0?-S:S;
27if(_>=1e-6&&_<1e21){const k=""+S,M=k.indexOf("."),C=M===-1?0:k.length-M-1;C>d&&(d=C)}else{const k=O.noExponents(S);O.isFloat(k)&&(d=Math.max(d,k.toString().split(".")[1].length))}}}else h=!0;else if(S===null)h=!0;else return!1;n[v]=S,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:u,minX:p,maxX:g,xSorted:x,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!="undefined"&&(Array.isArray(l)&&l.length===4&&!a?this.twoDSeries.push(O.parseNumber(l[3])):r.length>=5?this.twoDSeries.push(O.parseNumber(r[4])):this.twoDSeries.push(O.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!="undefined"&&(this.threeDSeries.push(c),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new yt(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!="undefined"){const h=Array.isArray(c.y)?O.parseNumber(c.y[c.y.length-1]):O.parseNumber(c.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]=="undefined"&&(this.seriesGoals[e]=[]),typeof c.goals!="undefined"&&Array.isArray(c.goals)?this.seriesGoals[e].push(c.goals):this.seriesGoals[e].push(null),typeof c.z!="undefined"&&(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",u=Array.isArray(h),p=!u&&!!a.isValidDate(h);if(d||p)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(h instanceof Date?h.getTime():a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(h instanceof Date?h.getTime():parseFloat(h)));else u?(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=>{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 u=n[d],p=u.y1,g=u.y2;if(c<=g&&p<=h){const x=a;x.overlaps.add(l.rangeName),x.overlaps.add(u.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(u=>O.parseNumber(u)).filter(u=>u!==null&&!isNaN(u));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=O.parseNumber(h[0]),c=O.parseNumber(h[h.length-1])):l=c=O.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,l,c;const h=this.w,d=t[e].data,u=[],p=[],g=[],x=[],b=[],m=[];for(let A=0;A<d.length;A++){const v=d[A],y=(a=(i=(s=v==null?void 0:v.y)==null?void 0:s.density)!=null?i:v==null?void 0:v[1])!=null?a:[],w=(o=(r=(n=v==null?void 0:v.y)==null?void 0:n.points)!=null?r:v==null?void 0:v[2])!=null?o:[],S=this._parseViolinSummary((c=(l=v==null?void 0:v.y)==null?void 0:l.summary)!=null?c:v==null?void 0:v[3]),_=[],k=[];let M=0,C=null,L=1/0,T=-1/0;for(let E=0;E<y.length;E++){const R=O.parseNumber(y[E][0]),P=O.parseNumber(y[E][1]);R===null||P===null||(_.push(R),k.push(P),P>M&&(M=P,C=R),R<L&&(L=R),R>T&&(T=R))}const D=[];for(let E=0;E<w.length;E++){const R=O.parseNumber(w[E]);R!==null&&(D.push(R),R<L&&(L=R),R>T&&(T=R))}S&&(S[0]<L&&(L=S[0]),S[4]>T&&(T=S[4])),u.push({values:_,weights:k,maxWeight:M}
27),p.push(D),g.push(S),x.push(L===1/0?0:L),b.push(T===-1/0?0:T),m.push(C!==null?C:D.length?D[Math.floor(D.length/2)]:0)}h.violinData.seriesViolinDensity[e]=u,h.violinData.seriesViolinPoints[e]=p,h.violinData.seriesViolinSummary[e]=g,h.violinData.seriesViolinMin[e]=x,h.violinData.seriesViolinMax[e]=b,this.twoDSeries=m}_parseViolinSummary(t){if(!Array.isArray(t)||t.length!==5)return null;const e=[];for(let s=0;s<5;s++){const i=O.parseNumber(t[s]);if(i===null||s>0&&i<e[s-1])return null;e.push(i)}return e}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=O.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},u=this.w.globals;u.seriesRangeName||(u.seriesRangeName={}),u.seriesRangeName[s]||(u.seriesRangeName[s]={}),u.seriesRangeName[s][o]=c;const p=n.get(h);p&&p.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 u;if(t==="array"){const p=d[0];a&&p&&p.length===6||!a&&p&&p.length===5?u=x=>x.slice(1):u=x=>Array.isArray(x[1])?x[1]:[]}else u=p=>Array.isArray(p.y)?p.y:[];for(let p=0;p<d.length;p++){const g=u(d[p]);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 x=d[p]&&d[p].points;h.push(Array.isArray(x)?x:[])}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 yt(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,x)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(x+1),10))}),this.coreUtils.setSeriesYAxisMappings();const d=[],u=[...new Set(o.series.map(g=>g.group))];o.series.forEach((g,x)=>{const b=u.indexOf(g.group);d[b]||(d[b]=[]),d[b].push(this.w.seriesData.seriesNames[x])}),this.w.labelData.seriesGroups=d;const p=()=>{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=="undefined"&&(console.error("It is a possibility that you may have not included 'data' property in series."),t[g]=rt(K({},t[g]),{data:[]}));const x=o.chart.dataReducer,b=(s=(e=l.dataReducerRawSeries)==null?void 0:e[g])==null?void 0:s.data;if(x!=null&&x.enabled&&this.isMultiFormat()&&Array.isArray(b)&&b.length>((i=x.threshold)!=null?i:500)){const A=(a=x.targetPoints)!=null?a:250,v=o.xaxis.min,y=o.xaxis.max,w=v==null&&y==null?b:Bt.sliceByXRange(b,v,y);let S=w;if(w.length>A){const _=Array.isArray(w[0])?(r=w[0])==null?void 0:r[1]:(n=w[0])==null?void 0:n.y;Array.isArray(_)?_.length===4?S=Bt.ohlcAggregate(w,A):_.length===2&&(S=Bt.rangeAggregate(w,A)):S=Bt.lttbDownsample(w,A)}t[g]=rt(K({},t[g]),{data:S})}(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(Ot(m)){const A=ut(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,p(),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=>O.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=O.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!=null?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(O.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 zt(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,u,p;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==null?void 0:i.x),y:((h=o.parsing)==null?void 0:h.y)||(i==null?void 0:i.y),z:((d=o.parsing)==null?void 0:d.z)||(i==null?void 0:i.z)};if(!g.x&&!g.y)return o;const x=o.data[0];if(typeof x=="object"&&x!==null&&(Object.prototype.hasOwnProperty.call(x,"x")||Object.prototype.hasOwnProperty.call(x,"y"))||Array.isArray(x))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=(u=o.name)!=null?u:`series[${l}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${A}" has a parseData config but is missing the '${m.join("', '")}' field specification.`,{parsing:(p=o.parsing)!=null?p: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 _=g.y.map(k=>this.getNestedValue(m,k));this.w.config.chart.type==="bubble"?(_.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=_[0]):y=_}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 S={x:v,y,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(g.y)&&g.y.length===2){const _=this.getNestedValue(m,g.y[1]);_!==void 0&&(S.z=_)}return w!==void 0&&(S.z=w),S});return rt(K({},o),{data:b,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=O.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}applySeriesTransform(t){const e=this.w.config,s=e.chart.requestedType||e.chart.type;s!=="waterfall"&&this.w.waterfallData.geometry&&(this.w.waterfallData={values:[],cumulative:[],kinds:[],geometry:null}),s!=="dumbbell"&&this.w.dumbbellData&&(this.w.dumbbellData=null),s!=="streamgraph"&&this.w.streamgraphData&&(this.w.streamgraphData=null);const i=cl(s);if(i)return i(t,this.w);const a=ml[s];return!Array.isArray(t)||!a?t:(this._warnedMissingTransform||(this._warnedMissingTransform=!0,console.warn(`ApexCharts: chart.type '${s}' requires the ${a} feature, which is not in this bundle. Bundler: import 'apexcharts/features/${a}' (or from 'apexcharts/${s}'). Script tag: add <script src='.../dist/features/${a}.js'> after apexcharts.js.`)),t.map(n=>rt(K({},n),{data:[]})))}flattenTreemapHierarchy(t){const e=this.w,s=e.globals;if(e.config.chart.type!=="treemap"||!Array.isArray(t))return t;if(!s.treemapRawSeries){if(!fl(e,t))return s.treemapRoots=null,t;s.treemapRawSeries=t.map(r=>rt(K({},r),{data:Array.isArray(r==null?void 0:r.data)?r.data.slice():r==null?void 0:r.data}))}const{roots:i,leafSeries:a,maxDepth:n}=xl(e,s.treemapRawSeries);return s.treemapRoots=i,s.treemapMaxDepth=n,a}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==null?void 0:d.data)&&d.data.some(u=>u&&!Array.isArray(u)&&Array.isArray(u.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==null?void 0:d.data)&&d.data.forEach(u=>{if(u&&Array.isArray(u.y)){const p=String(u.x);l.has(p)||(l.set(p,o.length),o.push(u.x))}})});const c=n.maxPoints||5e3,h=t.map(d=>{if(!Array.isArray(d==null?void 0:d.data))return d;const u=[];return d.data.forEach(p=>{if(p&&Array.isArray(p.y)){const g=l.get(String(p.x)),x=p.y,b=x.length>c?Math.ceil(x.length/c):1;for(let m=0;m<x.length;m+=b){const A=O.parseNumber(x[m]);A!==null&&u.push({x:g,y:A})}}else if(p&&typeof p=="object"&&!Array.isArray(p)){const g=String(p.x);u.push({x:l.has(g)?l.get(g):p.x,y:p.y})}else u.push(p)}),rt(K({},d),{data:u})});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)
27){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.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),(e=c.chart.dataReducer)!=null&&e.enabled&&h.axisCharts&&!h.dataReducerRawSeries){h.dataReducerRawSeries=t.map(g=>({data:Array.isArray(g==null?void 0:g.data)?g.data.slice():g==null?void 0:g.data}));let u=1/0,p=-1/0;for(const g of t){const x=g==null?void 0:g.data;if(!Array.isArray(x)||x.length===0)continue;const b=!Array.isArray(x[0]),m=b?(s=x[0])==null?void 0:s.x:(i=x[0])==null?void 0:i[0],A=b?(a=x[x.length-1])==null?void 0:a.x:(n=x[x.length-1])==null?void 0:n[0];typeof m=="number"&&(u=Math.min(u,m)),typeof A=="number"&&(p=Math.max(p,A))}u!==1/0&&(h.dataReducerRawMinX=u,h.dataReducerRawMaxX=p)}if(h.dataReducerRawSeries&&((r=c.chart.dataReducer)!=null&&r.enabled)&&(t=t.map(u=>K({},u))),c.series=t,h.dataReducerRawSeries&&((o=c.chart.dataReducer)!=null&&o.enabled)){const u=h.dataReducerRawSeries;h.initialSeries=t.map((p,g)=>{var x,b,m;return rt(K({},p),{data:(m=(b=(x=u[g])==null?void 0:x.data)==null?void 0:b.slice())!=null?m:p.data})})}else h.histogramRawSeries?h.initialSeries=h.histogramRawSeries:h.dumbbellRawSeries?h.initialSeries=h.dumbbellRawSeries:h.streamgraphRawSeries?h.initialSeries=h.streamgraphRawSeries:h.waterfallRawSeries?h.initialSeries=h.waterfallRawSeries:h.treemapRawSeries?h.initialSeries=h.treemapRawSeries: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 u=new Qt(this.w);this.w.seriesData.series=u.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),h.axisCharts?(Bt._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),Bt._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),Bt._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 u=0;u<d.length;u++)if(Array.isArray(d[u])){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||
27(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 u=0,p=0;const g=d-h;for(let w=h;w<d;w++)u+=a(t[w]),p+=n(t[w]);u/=g,p/=g;const x=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=x;for(let w=x;w<b;w++){const S=Math.abs((m-u)*(n(t[w])-A)-(m-a(t[w]))*(p-A))*.5;S>v&&(v=S,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);if(d<=h)continue;const u=n(t[h]),p=u[0];let g=u[1],x=u[2],b=u[3];for(let m=h+1;m<d;m++){const A=n(t[m]);A[1]>g&&(g=A[1]),A[2]<x&&(x=A[2]),b=A[3]}o.push(r(a(t[h]),[p,g,x,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 u=1/0,p=-1/0;for(let g=h;g<d;g++){const x=n(t[g]);if(x!=null)for(let b=0;b<2;b++){const m=x[b];m==null||!isFinite(m)||(m<u&&(u=m),m>p&&(p=m))}}o.push(r(a(t[h]),u===1/0?[null,null]:[u,p]))}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)}},nr=class{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 u=l.w;u.globals.shouldAnimate=s,e||(u.globals.resized=!0,u.globals.dataChanged=!0,s&&u.config.chart.animations.enabled&&l.series.getPreviousPaths());const p=u.config.chart.requestedType||u.config.chart.type;if(s&&t&&typeof t=="object"){const g=(h=t==null?void 0:t.chart)==null?void 0:h.type;g&&g!==p&&((d=l.morphTypeChange)==null||d.captureBeforeDestroy({fromType:p,toType:g,newSeries:t.series||u.config.series}))}if(t&&typeof t=="object"){l.config=new fe(t);const g=t.chart&&t.chart.type,x=g==="funnel"||g==="pyramid"||g==="gauge",b=!!u.config.chart.requestedType;if(g&&!x&&b){t.chart=t.chart||{},t.chart.requestedType=g;const m=u.config.chart.requestedType;(m==="funnel"||m==="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=St.extendArrayProps(l.config,t,u),l.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),u.config=O.extend(u.config,t),zt.handOverTypeDefaults(u.config,p,t),a&&(u.globals.lastXAxis=t.xaxis?O.clone(t.xaxis):[],u.globals.lastYAxis=t.yaxis?O.clone(t.yaxis):[],u.globals.initialConfig=O.extend({},u.config),u.globals.initialSeries=u.config.series),t.series&&(u.globals.collapsedSeriesIndices.length>0||u.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});fs.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,u;return(u=(d=h==null?void 0:h.data)==null?void 0:d.length)!=null?u:0});s&&(n.globals.dataReducerRawSeries=null,n.globals.histogramRawSeries=null,n.globals.waterfallRawSeries=null,n.globals.dumbbellRawSeries=null,n.globals.streamgraphRawSeries=null,n.globals.treemapRawSeries=null),this.ctx.data.resetParsingFlags();const c=this.ctx.data.parseData(t);
27return 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==null?void 0: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 rt(K({},s.config.series[e]),{name:t.name?t.name:i==null?void 0:i.name,color:t.color?t.color:i==null?void 0:i.color,type:t.type?t.type:i==null?void 0:i.type,group:t.group?t.group:i==null?void 0:i.group,hidden:typeof t.hidden!="undefined"?t.hidden:i==null?void 0:i.hidden,data:t.data?t.data:i==null?void 0:i.data,zIndex:typeof t.zIndex!="undefined"?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=="undefined"&&(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 tt(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]!="undefined"&&(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 zt(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]!="undefined"){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]!="undefined"?n(o):typeof this.ctx.opts.yaxis[o]!="undefined"&&(r.min=this.ctx.opts.yaxis[o].min,r.max=this.ctx.opts.yaxis[o].max)})}},rr=class Zs{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)/Zs.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*Zs.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,i=s&&s.querySelector(".apexcharts-svg");if(!i)return e-t.layout.translateX;const a=i.getBoundingClientRect(),n=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(n||1)-t.layout.translateX}};class Lt{constructor(t){this.w=t.w,this.ttCtx=t}static hoverTarget(t){return t?(t.eventPhase&&t.target&&(t.apexHoverTarget=t.target),t.apexHoverTarget||t.target):null}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a;const n=this.w,r=e.getBoundingClientRect(),o=n.layout.gridWidth,l=r.height;let c=o/(n.globals.dataPoints-1);const h=l/n.globals.dataPoints,d=this.hasBars();(n.globals.comboCharts||d)&&!n.config.xaxis.convertedCatToNumeric&&(c=o/n.globals.dataPoints);const u=rr.screenXToPlotPx(n,s),p=i-r.top,g=n.globals.barPadForNumericAxis||0;u<-g||p<0||u>o+g||p>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):n.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):n.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let b=Math.round(u/c);const m=Math.floor(p/h);d&&!n.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(u/c),b=b-1);let A=null,v=null;const y=n.globals.seriesXvalues.map(S=>S.filter(_=>O.isNumber(_))),w=n.globals.seriesYvalues.map(S=>S.filter(_=>O.isNumber(_)));if(n.axisFlags.isXNumeric){v=this.closestInMultiArray(u,p,y,w),A=v.index,b=(a=v.j)!=null?a:0;const S=y.some((_,k)=>_.length!==n.globals.seriesXvalues[k].length);if(A!==null&&S){const _=n.globals.seriesXvalues[A];let k=null,M=1/0;for(let C=0;C<_.length;C++){if(!O.isNumber(_[C]))continue;const L=Math.abs(u-_[C]);L<M&&(M=L,k=C)}k!==null&&(b=k)}}return n.interact.capturedSeriesIndex=A===null?-1:A,(!b||b<1)&&(b=0),n.globals.isBarHorizontal?n.interact.capturedDataPointIndex=m:n.interact.capturedDataPointIndex=b,{c
27apturedSeries:A,j:n.globals.isBarHorizontal?m:b,hoverX:u,hoverY:p}}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 u=0;u<s.length;u++){if(!n(u))continue;const p=s[u],g=i[u],x=Math.min(p.length,g.length);for(let b=0;b<x;b++){const m=Math.abs(t-p[b]);m<d&&(d=m,h=b)}}if(h!==null)if(o){let u=1/0;for(let p=0;p<s.length;p++){if(!n(p))continue;const g=s[p],x=i[p],b=Math.min(g.length,x.length);if(b<2){const m=x[h];if(typeof m!="number")continue;const A=Math.abs(e-m);A<u&&(u=A,c=p);continue}for(let m=0;m<b-1;m++){const A=this._distanceToSegment(t,e,g[m],x[m],g[m+1],x[m+1]);A.dist<u&&(u=A.dist,c=p)}}}else{let u=1/0;for(let p=0;p<s.length;p++){if(!n(p))continue;const g=i[p][h];if(typeof g!="number")continue;const x=Math.abs(e-g);x<u&&(u=x,c=p)}}return{index:c,j:h}}for(let d=0;d<s.length;d++){if(!n(d))continue;const u=s[d],p=i[d],g=Math.min(u.length,p.length);if(o&&g>=2){for(let x=0;x<g-1;x++){const b=this._distanceToSegment(t,e,u[x],p[x],u[x+1],p[x+1]);b.dist<l&&(l=b.dist,c=d,h=b.t<.5?x:x+1)}continue}for(let x=0;x<g;x++){const b=u[x],m=t-b,A=p[x],v=e-A,y=Math.sqrt(m*m+v*v);y<l&&(l=y,c=d,h=x)}}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,u=t-h,p=e-d;return{dist:Math.sqrt(u*u+p*p),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]!="undefined");if(i.length>0)for(let a=0;a<i.length-1;a++)typeof i[a][t]!="undefined"&&typeof i[a+1][t]!="undefined"&&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;if(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 tt(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")}}let or=class{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new Lt(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 u=0;u<h;u++){const p=r.config.tooltip.inverseOrder?h-1-u:u,g=this.computeSeriesRow({i:t,j:e,t:u,tIndex:p,shared:a,e:n,basePColor:d});this.DOMHandling({i:t,t:p,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}
27):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],rt(K({},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,l=o.waterfallData&&o.waterfallData.values;return l&&l[e]&&l[e][s]!=null?t.yLbFormatter(l[e][s],{series:l,seriesIndex:e,dataPointIndex:s,w:o}):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,n;const r=this.w,o=(i=(s=Lt.hoverTarget(t))==null?void 0:s.getAttribute)==null?void 0:i.call(s,"fill");if(!o)return e;if(o.indexOf("url")===-1)return o;if(o.indexOf("Pattern")===-1)return e;const l=r.dom.baseEl.querySelector(o.substr(4).slice(0,-1));return(n=(a=l==null?void 0:l.childNodes[0])==null?void 0:a.getAttribute("stroke"))!=null?n: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[0]?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:u,zVal:p}=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=u!==""?u:d);const x=s[t].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=a||"");const b=s[t].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=typeof c!="undefined"?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(S=>{y+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${S.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${S.attrs.name}</div>`,w+=`<div>${S.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()}
27else m.innerHTML="",A.innerHTML="";if(p!==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 p!="undefined"?p:""}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=="undefined"||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 u="",p="",g=null,x=null;const b={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},m=h.formatters.ttZFormatter;if(e===null)x=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(u=d[t][e],d[t].length===0){const v=this.tooltipUtil.getFirstActiveXArray(d);u=d[v][e]}}else new Pi(this.w).isFormatXY()?u=typeof h.config.series[t].data[e]!="undefined"?h.config.series[t].data[e].x:"":u=typeof h.labelData.labels[e]!="undefined"?h.labelData.labels[e]:"";const A=u;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?u=new me(this.w).xLabelFormat(h.formatters.ttKeyFormatter,A,A,{i:void 0,dateFormatter:new yt(this.w).formatDate,w:this.w}):h.globals.isBarHorizontal?u=h.formatters.yLabelFormatters[0](A,b):u=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,A,b))!=null?a:A,h.config.tooltip.x.formatter!==void 0&&(u=(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==null?void 0:m(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?p=(c=(l=h.formatters).xaxisTooltipFormatter)==null?void 0:c.call(l,A,b):p=u,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(u)?u.join(" "):u,xAxisTTVal:Array.isArray(p)?p.join(" "):p,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 Pt=7,bl=0;let Ri=class{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&&tt.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&tt.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 tt(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;
27let c;const h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),d=i.dom.elWrap.getBoundingClientRect();if(h){const u=h.getBoundingClientRect();u.width>0&&(c=u.left+u.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,u=d.tooltipRect,p=!!h.config.tooltip.arrow,g=s!==null?parseFloat(String(s)):1,x=u.ttHeight||0,b=u.ttWidth||0,m=parseFloat(String(t)),A=parseFloat(String(e));if(isNaN(m)||isNaN(A))return null;const v=g+(p?Pt:0)+bl;let y=m+v;const w=A+h.layout.translateY;let S=p?w-x/2+g/2:A+g/2,_="right";if(y>h.layout.gridWidth/2&&(y=m-b-v,_="left"),y>h.layout.gridWidth-b-10&&(y=_==="left"?Math.min(h.layout.gridWidth-b,y):h.layout.gridWidth-b),y<-20&&(y=-20),h.config.tooltip.followCursor){const C=d.getElGrid();if(!C)return null;const L=C.getBoundingClientRect();y=d.e.clientX-L.left,y>h.layout.gridWidth/2?(y=y-b,_="left"):_="right",S=d.e.clientY+h.layout.translateY-L.top,S>h.layout.gridHeight/2&&(S=S-x)}else if(!h.globals.isBarHorizontal)if(p){const C=h.layout.translateY,L=h.layout.translateY+h.layout.gridHeight;S+x>L&&(S=L-x),S<C&&(S=C)}else x/2+S>h.layout.gridHeight&&(S=h.layout.gridHeight-x+h.layout.translateY);if(isNaN(y))return null;y=y+h.layout.translateX;const k=(a=(i=h.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(k!=null&&k.enabled&&((r=(n=k==null?void 0:k.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 C=p?w:A,L=(g||1)+12,T=S,D=S+x;!isNaN(C)&&x>0&&T<C+L&&D>C-L&&(S=C-x-L,S<0&&(S=C+L))}let M=null;if(p&&x>0){const C=w-S,L=10,T=x-10;M=Math.max(L,Math.min(T,C))}return{x:y,y:S,placement:_,arrowY:M}}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&&!i.globals.markers.batched){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 tt(this.w),u=o.globals.pointsArray,p=l.tooltipUtil.getHoverMarkerSize(e),g=o.config.series[e].type;if(g&&(g==="column"||g==="candlestick"||g==="boxPlot"||g==="violin"))return;c=(i=(s=u[e])==null?void 0:s[t])==null?void 0:i[0],h=((n=(a=u[e])==null?void 0:a[t])==null?void 0:n[1])||0;const x=o.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(x&&h<o.layout.gridHeight&&h>0){const b=(r=x.getAttribute("shape"))!=null?r:"circle",m=d.getMarkerPath(c,h,b,p*1.5);x.setAttribute("d",m)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,p)}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 Qt(this.w),h=new tt(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 u=i.tooltipUtil.getAllMarkers();if(u.length)for(let p=0;p<a.seriesData.series.length;p++){const g=l[p];if(a.globals.comboCharts&&typeof g=="undefined"&&u.splice(p,0,null),u[p]&&g&&g.length){let x=l[p][t][1],b;u[p].setAttribute("cx",n);const m=(s=u[p].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){const A=t+a.seriesData.series[p].length;b=l[p][A][1];const v=Math.abs(x-b)/2;x=x-v}if(x!==null&&!isNaN(x)&&x<a.layout.gridHeight+d&&x+d>0){const A=h.getMarkerPath(n,x,m,d);u[p].setAttribute("d",A)}else u[p].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 Qt(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 u=null;const p=o.globals.barCanvasCoords;if(!d&&p&&(u=typeof e=="number"&&((s=p[e])==null?void 0:s[t])||null,!u)){for(const y in p)if((i=p[y])!=null&&i[t]){u=p[y][t];break}}let g=d?parseFloat((a=d.getAttribute("cx"))!=null?a:"0"):u?u.cx:0,x=d?parseFloat((n=d.getAttribute("cy"))!=null?n:"0"):u?u.cy:0;const b=d?parseFloat((r=d.getAttribute("barWidth"))!=null?r:"0"):u?u.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);y!=null?g=y:g=g-(c%2!==0?b/2:0)}d&&v&&(g=g-b/2)}
31else!o.globals.isBarHorizontal&&!u&&(g=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(g)&&(g=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?x=x-l.tooltipRect.ttHeight:o.config.tooltip.followCursor?x=l.e.clientY-A.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>o.layout.gridHeight&&(x=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,x||o.layout.gridHeight)}}_datapointCenterXFromBars(t){var e,s;const i=this.w,a=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!a.length)return null;let n=1/0,r=-1/0;for(const o of a){const l=o.parentNode;if((s=(e=l==null?void 0:l.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;const c=o.getBoundingClientRect();c.width===0&&c.height===0||(c.left<n&&(n=c.left),c.right>r&&(r=c.right))}return isFinite(n)?rr.screenXToPlotPx(i,(n+r)/2):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,u=-1/0;for(const C of l){const L=C.parentNode;if((s=(e=L==null?void 0:L.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;const T=C.getBoundingClientRect();T.width===0&&T.height===0||(T.left<c&&(c=T.left),T.right>h&&(h=T.right),T.top<d&&(d=T.top),T.bottom>u&&(u=T.bottom))}if(!isFinite(c))return!1;const p=a.tooltipRect.ttWidth||0,g=a.tooltipRect.ttHeight||0,x=(c+h)/2-o.left+i.layout.translateX,b=d-o.top+i.layout.translateY,m=u-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 S="top",_=b-g-Pt;if(_<A){const C=m+Pt;C+g<=v&&(S="bottom",_=C)}let k=x-p/2;k<y&&(k=y),k+p>w&&(k=w-p);const M=Math.max(10,Math.min(p-10,x-k));return this.applyTooltipPosition(n,{x:k,y:_,placement:S,arrowY:null,arrowX:M}),!0}};function yl(f){const t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(f){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"/>')}}let lr=class{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Ri(t)}drawDynamicPoints(){const t=this.w,e=new tt(this.w),s=new Fe(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)}`;Fe.markersAreInert(t)&&(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=Q.createElementNS(ht,"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;let n=a.config.markers.hover.size;a.config.chart.type!=="bubble"&&(n=this.newPointSize(t,e));let r=e.getAttribute("cx"),o=e.getAttribute("cy");if(s!==null&&i!==null&&(r=s,o=i),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(a.config.chart.type==="radar"){const l=this.ttCtx.getElGrid();if(!l)return;const c=l.getBoundingClientRect();r=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(r,o,n)}}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;
31for(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!=null?h:"0",10)){a.newPointSize(r,o[c]);const u=(e=o[c].getAttribute("cx"))!=null?e:"0",p=(s=o[c].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(u)),n.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(u),parseFloat(p),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);return e.setAttribute("d",r),i}}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(O.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")}}},cr=class{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=Lt.hoverTarget(t).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",d=Lt.hoverTarget(t);let u,p,g,x,b,m;if(h){const v=e.elGrid.getBoundingClientRect(),y=t.type==="touchmove"?t.touches[0].clientX:t.clientX,w=t.type==="touchmove"?t.touches[0].clientY:t.clientY,S=c.hitTest(y-v.left,w-v.top);if(!S)return{x:s,y:i,noHit:!0};u=S.seriesIndex,p=S.dataPointIndex,g=S.x,x=S.y,b=S.width,m=S.height}else if(d.classList.contains(`apexcharts-${a}-rect`))u=this.getAttr(t,"i"),p=this.getAttr(t,"j"),g=this.getAttr(t,"cx"),x=this.getAttr(t,"cy"),b=this.getAttr(t,"width"),m=this.getAttr(t,"height");else return{x:s,y:i};o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:u,j:p,shared:!1,e:t}),l.interact.capturedSeriesIndex=u,l.interact.capturedDataPointIndex=p,o.tooltipPosition.moveXCrosshairs(g+b/2);const A=o.getElTooltip();if(a==="heatmap"&&l.config.tooltip.arrow&&!l.config.tooltip.followCursor&&A){const v=e.elGrid.getBoundingClientRect(),y=l.dom.elWrap.getBoundingClientRect(),w=v.left-y.left;let S,_,k,M;if(h)S=g,_=x,k=g+b,M=x+m;else{const W=d.getBoundingClientRect();S=W.left-v.left,_=W.top-v.top,k=W.right-v.left,M=W.bottom-v.top}const C=o.tooltipRect.ttWidth||0,L=o.tooltipRect.ttHeight||0,T=(S+k)/2+w,D=_+l.layout.translateY,E=M+l.layout.translateY,R=l.layout.translateY,P=l.layout.translateY+l.layout.gridHeight,F=w,I=w+l.layout.gridWidth;let B="top",Y=D-L-Pt;if(Y<R){const W=E+Pt;W+L<=P?(B="bottom",Y=W):Y=R}let $=T-C/2;$<F&&($=F),$+C>I&&($=I-C);const X=Math.max(10,Math.min(C-10,T-$));return o.tooltipPosition.applyTooltipPosition(A,{x:$,y:Y,placement:B,arrowY:null,arrowX:X}),{x:$,y:Y,positioned:!0}}if(s=g+o.tooltipRect.ttWidth/2+b,i=x+o.tooltipRect.ttHeight/2-m/2,s>l.layout.gridWidth/2&&(s=g-o.tooltipRect.ttWidth/2+b),o.w.config.tooltip.followCursor){const v=l.dom.elWrap.getBoundingClientRect();s=((n=l.interact.clientX)!=null?n:0)-v.left-(s>l.layout.gridWidth/2?o.tooltipRect.ttWidth:0),i=((r=l.interact.clientY)!=null?r:0)-v.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(Lt.hoverTarget(t).classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(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 u=O.findAnce
31stor(e.paths,"apexcharts-series");u&&(r=parseInt(u.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 u=n.getElGrid();if(!u)return{x:s,y:i};const p=u.getBoundingClientRect();i=n.e.clientY+a.layout.translateY-p.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,u;const p=this.getBarTooltipXY({e:t,opt:e});if(p.j===null&&p.barHeight===0&&p.barWidth===0)return;d=p.i;const g=p.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=p.x,h=p.y,u=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+u/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 x=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,m=!!n.config.tooltip.arrow,{barAnchorXInGrid:A,barAnchorYInGrid:v,barRectInGrid:y}=p,w=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),S=n.dom.elWrap.getBoundingClientRect(),_=w?w.left-S.left:n.layout.translateX;let k,M=null,C=null,L=c+_,T=h;if(m&&n.globals.isBarHorizontal&&y!=null){const D=n.layout.translateY,E=n.layout.translateY+n.layout.gridHeight,R=_,P=_+n.layout.gridWidth,F=(y.left+y.right)/2+_,I=y.top+n.layout.translateY,B=y.bottom+n.layout.translateY;let Y=I-b-Pt;if(k="top",Y<D){const $=B+Pt;$+b<=E&&(k="bottom",Y=$)}T=Y,L=F-x/2,L<R&&(L=R),L+x>P&&(L=P-x),C=Math.max(10,Math.min(x-10,F-L))}else if(m&&A!=null&&v!=null){const D=A+_,E=_+n.layout.gridWidth/2,R=((i=y==null?void 0:y.left)!=null?i:A)+_,P=((a=y==null?void 0:y.right)!=null?a:A)+_;if(D<E?(k="right",L=P+Pt):(k="left",L=R-x-Pt),y){T=(y.top+y.bottom)/2+n.layout.translateY-b/2;const I=n.layout.translateY,B=n.layout.translateY+n.layout.gridHeight;T<I&&(T=I),T+b>B&&(T=B-b)}if(b>0&&y){const F=(y.top+y.bottom)/2+n.layout.translateY;M=Math.max(10,Math.min(b-10,F-T))}}r.tooltipPosition.applyTooltipPosition(o,{x:L,y:T,placement:k,arrowY:M,arrowX:C})}}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,u=null,p=null,g=null;const x=Lt.hoverTarget(t),b=x.classList;if(b.contains("apexcharts-bar-area")||b.contains("apexcharts-candlestick-area")||b.contains("apexcharts-boxPlot-area")||b.contains("apexcharts-rangebar-area")){const m=x,A=m.getBoundingClientRect(),v=e.elGrid.getBoundingClientRect(),y=A.height;c=A.height;const w=A.width,S=parseInt(m.getAttribute("cx"),10),_=parseInt(m.getAttribute("cy"),10);h=S,d=_,l=parseFloat(m.getAttribute("barWidth"));const k=A.left-v.left,M=A.top-v.top,C=k+w/2,L=M+y/2;u=C,p=s.globals.isBarHorizontal?L:M,g={left:k,top:M,right:k+w,bottom:M+y};const T=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(m.getAttribute("j"),10),n=parseInt(m.parentNode.getAttribute("rel"),10)-1;const D=m.getAttribute("data-range-y1"),E=m.getAttribute("data-range-y2");s.globals.comboCharts&&(n=parseInt(m.parentNode.getAttribute("data:realIndex"),10));const R=F=>(s.axisFlags.isXNumeric?F=S-w/2:this.isVerticalGroupedRangeBar?F=S+w/2:F=S-a.dataPointsDividedWidth+w/2,F),P=()=>_-a.dataPointsDividedHeight+y/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:n,j:i,y1:D?parseInt(D,10):null,y2:E?parseInt(E,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=T-v.left+15,o=P()):(r=R(r),o=t.clientY-v.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=S,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=S-a.tooltipRect.ttWidth),o=P()):(r=R(r),o=_)}return{x:r,y:o,barHeight:c,barWidth:l,i:n,j:i,barCx:h,barCy:d,barAnchorXInGrid:u,barAnchorYInGri
31d:p,barRectInGrid:g}}},hr=class{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=Q.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=Q.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=Q.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]=Q.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 u=(e-c.top)*s.yRatio[d],p=n.maxYArr[h]-n.minYArr[h];let g=n.minYArr[h]+(p-u);a.config.yaxis[t].reversed&&(g=n.maxYArr[h]-(p-u)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=o(g),i.tooltipPosition.moveYAxisTooltip(t)}}},dr=class{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new Lt(this),this.tooltipLabels=new or(this),this.tooltipPosition=new Ri(this),this.marker=new lr(this),this.intersect=new cr(this),this.axesTooltip=new hr(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!="undefined"&&!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!=null&&s.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=Q.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.compact&&(i.classList.add("apexcharts-tooltip-compact"),e.config.series.length===1&&i.classList.add("apexcharts-tooltip-value-only")),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=Q.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 Jt(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||e.globals.markers.batched)&&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=Q.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=Q.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=Q.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=yl(l),n.appendChild(r);const c=Q.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=Q.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);const u=Q.createElementNS("http://www.w3.org/1999/xhtml","span");u.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(u);const p=Q.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(p),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=a&&!t.globals.xyCh
31arts,r=t.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());const l=[],c=[],h={hoverArea:r,elGrid:o,tooltipEl:s,tooltipY:l,tooltipX:c,ttItems:this.ttItems};let d;if(t.globals.axisCharts&&(a?d=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?d=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")&&(d=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),d&&d.length))for(let p=0;p<d.length;p++)l.push(d[p].getAttribute("cy")),c.push(d[p].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],h);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect||n)this.addDatapointEventsListeners(h);else if(e==="heatmap"&&t.globals.activeRenderer&&t.globals.activeRenderer.kind==="canvas")this.addPathsEventListeners([r],h);else if(!t.globals.axisCharts||e==="heatmap"||e==="treemap"){const p=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(p,h)}if(this.showOnIntersect){const p=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10;let 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){Lt.hoverTarget(e);const s=20,i=Date.now()-this.lastHoverTime;i>=s?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},s-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==null?void 0: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}){var a;const n=t.w;if(!this.getElTooltip(t))return;const o=e.getCachedDimensions();e.tooltipRect={x:0,y:0,ttWidth:o.ttWidth,ttHeight:o.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!n.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Qt(t.w).toggleSeriesOnHover(i,(a=Lt.hoverTarget(i))==null?void 0:a.parentNode),n.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;if(!e.elGrid)return;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 g=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(g)<0){this.handleMouseOut(e);return}}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs(),d=["heatmap","treemap"].includes(i.config.chart.type);let u=[];i.config.chart.group&&!d&&(u=this.ctx.getSyncedCharts());
31const p=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 g=(s=this.yaxisTooltips)==null?void 0:s.filter(b=>b===!0),x=this.ycrosshairs;if(x!==null&&(g!=null&&g.length)&&x.classList.add("apexcharts-active"),!d&&(p&&!this.showOnIntersect||u.length>1))this.handleStickyTooltip(t,o,l,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){const b=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:n,type:i.config.chart.type});if(b.noHit){this.handleMouseOut(e);return}a=b.x,n=b.y,b.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 b=0;b<i.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,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)}getSliceAnchor(t){var e,s;const i=this.w,a=parseFloat((e=t==null?void 0:t.getAttribute("data:cx"))!=null?e:""),n=parseFloat((s=t==null?void 0:t.getAttribute("data:cy"))!=null?s:"");if(isNaN(a)||isNaN(n))return null;const r=i.dom.elWrap.getBoundingClientRect(),o=typeof t.getScreenCTM=="function"?t.getScreenCTM():null;if(!o){const l=i.dom.Paper.node.getBoundingClientRect();return{x:l.left-r.left+a,y:l.top-r.top+n}}return{x:o.a*a+o.c*n+o.e-r.left,y:o.b*a+o.d*n+o.f-r.top}}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 x=Lt.hoverTarget(t),b=x&&typeof x.closest=="function"?x.closest(".apexcharts-unit-area"):null;if(!b)return;this.renderUnitTooltip(b)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});let d,u;const p=e.paths.querySelector("path[data\\:cx]")||e.paths,g=o.config.tooltip.intersect?this.getSliceAnchor(p):null;if(g?(d=g.x-s.ttWidth/2,u=g.y-s.ttHeight-10):(d=((i=o.interact.clientX)!=null?i:0)-h.left-s.ttWidth/2,u=((a=o.interact.clientY)!=null?a:0)-h.top-s.ttHeight-10),c.style.left=d+"px",c.style.top=u+"px",o.config.legend.tooltipHoverFormatter){const x=o.config.legend.tooltipHoverFormatter,b=l-1,m=(n=this.legendLabels)==null?void 0:n[b];if(!m)return;const A=m.getAttribute("data:default-text"),v=x(A,{seriesIndex:b,dataPointIndex:b,w:o});m.innerHTML=v}}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 u=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(u!=null?u:"")})))}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),u=t.parentNode,p=u&&u.querySelectorAll?u.querySelectorAll(".apexcharts-unit-area").length:d,g=r.config.plotOptions.unit||{},x=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:p,value:d,unitValue:x,datum:m,color:v,w:r});else if(m!=null){const C=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=C!=null&&L!=null?`${C}: ${L}
31`:C!=null?String(C):L!=null?String(L):`#${(c+1).toLocaleString()} of ${p.toLocaleString()}`}else y=`#${(c+1).toLocaleString()} of ${p.toLocaleString()}`,x!==1&&(y+=` · ${x.toLocaleString()} per dot`);const S=r.config.chart.fontFamily||"inherit",_=r.config.tooltip.style&&r.config.tooltip.style.fontSize||"12px",k=o.querySelector(".apexcharts-tooltip-arrow");o.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${S}; font-size: ${_};">${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: ${S}; font-size: ${_};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${y}</span></div></div></div>`,k&&o.appendChild(k);const M=o.getBoundingClientRect();this.tooltipRect.ttWidth=M.width,this.tooltipRect.ttHeight=M.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!=null?o:-1)&&(o=null);const l=a.globals.barPadForNumericAxis||0;if(n.hoverX<-l||n.hoverX>a.layout.gridWidth+l){this.handleMouseOut(i);return}if(o!==null)this.handleStickyCapturedSeries(t,o!=null?o:-1,i,r!=null?r:0);else if(this.tooltipUtil.isXoverlap(r!=null?r:0)||a.globals.isBarHorizontal){const c=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,c,r!=null?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]!="undefined")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 tt(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!=null?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 Ot(t.config.chart.type)?!0:(t.config.series||[]).some(s=>s&&s.type&&Ot(s.type))}create(t,e,s,i,a,n=null){var r,o,l,c,h,d,u,p,g,x,b,m,A,v,y,w,S,_,k,M,C;const L=this.w,T=e;t.type==="mouseup"&&this.markerClick(t,s,i),n===null&&(n=this.tConfig.shared);const D=this.tooltipUtil.hasMarkers(s),E=((o=(r=this.ctx)==null?void 0:r.renderer)==null?void 0:o.kind)==="canvas",R=E&&!this.tooltipUtil.hasBars(),P=!E&&!D&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),F=R||P,I=this.tooltipUtil.getElBars(),B=()=>{L.globals.markers.largestSize>0&&!E&&!L.globals.markers.batched?T.marker.enlargePoints(i):T.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){const X=L.config.legend.tooltipHoverFormatter,W=Array.from((l=this.legendLabels)!=null?l:[]);W.forEach(N=>{const H=N.getAttribute("data:default-text");N.innerHTML=decodeURIComponent(H!=null?H:"")});for(let N=0;N<W.length;N++){const H=W[N],q=parseInt((c=H.getAttribute("i"))!=null?c:"",10),V=decodeURIComponent((h=H.getAttribute("data:default-text"))!=null?h:""),J=X(V,{seriesIndex:n?q:s,dataPointIndex:i,w:L});if(n)H.innerHTML=L.globals.collapsedSeriesIndices.indexOf(q)<0?J:V;else if(H.innerHTML=q===s?J:V,s===q)break}}const Y=L.rangeData,$=K(K({ttItems:a,i:s,j:i},((g=(p=(u=(d=Y.seriesRange)==null?void 0:d[s])==null?void 0:u[i])==null?void 0:p.y[0])==null?void 0:g.y1)!==void 0&&{y1:(A=(m=(b=(x=Y.seriesRange)==null?void 0:x[s])==null?void 0:b[i])==null?void 0:m.y[0])==null?void 0:A.y1}),((S=(w=(y=(v=Y.seriesRange)==null?void 0:v[s])==null?void 0:y[i])==null?void 0:w.y[0])==null?void 0:S.y2)!==void 0&&{y2:(C=(M=(k=(_=Y.seriesRange)==null?void 0:_[s])==null?void 0:k[i])==null?void 0:M.y[0])==null?void 0:C.y2});if(n){if(T.tooltipLabels.drawSeriesTexts(rt(K({},$),{shared:this.showOnIntersect?!1:this.tConfig.shared})),D||F)B();else if(this.tooltipUtil.hasBars()&&(E&&T.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...I]),this.barSeriesHeight>0)){const X=new tt(this.w,this.ctx),W=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),T.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&B(),T.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let H=0;H<W.length;H++)X.pathMouseEnter(W[H],void 0)}}else T.tooltipLabels.drawSeriesTexts(K({shared:!1},$)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(i,s),D?T.tooltipPosition.moveMarkers(s,i):F&&T.tooltipPosition.moveDynamicPointOnHover(i,s)}};class wl{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}
31hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const Ds="__apexcharts_renderers__";function ze(){const f=globalThis;return f[Ds]||(f[Ds]=new Map),f[Ds]}class ur{static get _rendererRegistry(){return ze()}static registerRenderer(t,e){ze().set(t,e)}static unregisterRenderer(t){ze().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new wl(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!j.isBrowser()||e==="svg"||ea(this.w))return"svg";if(e==="canvas")return"canvas";const s=Io(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=ze().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 in the default bundle. Bundler: import 'apexcharts/features/renderer-${e}'. Script tag: add <script src=".../dist/features/renderer-${e}.js"> after apexcharts.js. Falling back to SVG.`)}else t==="canvas"&&ea(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"}}let mt=class oe{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 oe(e))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new oe(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}off(t,e){if(!t&&!e)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}
31each(t,e){return Array.from(this.node.children).forEach(i=>{const a=i.instance||new oe(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 oe(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(t){}return{x:0,y:0,width:0,height:0}}tspan(t){const e=Q.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new oe(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")}},vl=0,fr=class extends mt{constructor(t,e,s){const i=e==="radial"?"radialGradient":"linearGradient",a=Q.createElementNS(ht,i);super(a),this._id="SvgjsGradient"+ ++vl,this.attr("id",this._id),typeof s=="function"&&s(new Al(this));let n=t.node.querySelector("defs");n||(n=Q.createElementNS(ht,"defs"),t.node.appendChild(n)),n.appendChild(this.node)}stop(t,e,s){const i=Q.createElementNS(ht,"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 Al{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Sl=0,pr=class extends mt{constructor(t,e,s,i){const a=Q.createElementNS(ht,"pattern");if(super(a),this._id="SvgjsPattern"+ ++Sl,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){const r=new xs(this.node);i(r)}let n=t.node.querySelector("defs");n||(n=Q.createElementNS(ht,"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()}},xs=class gr extends mt{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=Q.createElementNS(ht,"text");e.textContent=t;const s=new mt(e);return this.node.appendChild(e),s}text(t){const e=Q.createElementNS(ht,"text"),s=new mt(e);return this.node.appendChild(e),typeof t=="function"&&t(new _l(e)),s}image(t,e){const s=Q.createElementNS(ht,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new mt(s);if(this.node.appendChild(s),typeof e=="function"&&j.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 fr(this,t,e)}pattern(t,e,s){return new pr(this,t,e,s)}_make(t){const e=Q.createElementNS(ht,t);return this.node.appendChild(e),new mt(e)}_makeContainer(t){const e=Q.createElementNS(ht,t);return this.node.appendChild(e),new gr(e)}};class _l{constructor(t){this.textNode=t}tspan(t){const e=Q.createElementNS(ht,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Cl(e,this.textNode)}}class Cl{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let kl=0,xr=class extends mt{constructor(){const t=Q.createElementNS(ht,"filter");super(t),this._id="SvgjsFilter"+ ++kl,this.attr("id",this._id)}},mr=class{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=Q.createElementNS(ht,"feMerge");return t.forEach(s=>{const i=Q.createElementNS(ht,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new mt(e)}_primitive(t,e){const s=Q.createElementNS(ht,t);for(const i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new mt(s)}};function br(f){f.prototype.filterWith=function(t){const e=new xr;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=Q.createElementNS(ht,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new mr(e)),this.attr("filter","url(#"+e._id+")"),this},f.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},f.prototype.filterer=function(){return this._filter}}function yr(f){f.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,u=o.ownerSVGElement;let p=null;u&&(p=u.getScreenCTM());const g=b=>{const m=b.type==="touchmove"?b.touches[0]:b;let A=m.clientX-h,v=m.clientY-d;p&&(A=A/p.a,v=v/p.d);let y=l+A,w=c+v;const S=parseFloat(o.getAttribute("width"))||0,_=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>s.maxX&&(y=s.maxX-S),s.maxY!==void 0&&w+_>s.maxY&&(w=s.maxY-_);const k={x:y,y:w,w:S,h:_,x2:y+S,y2:w+_},M=new CustomEvent("dragmove",{detail:{handler:{move:function(C,L){o.setAttribute("x",C),o.setAttribute("y",L)}},box:k}});o.dispatchEvent(M)},x=()=>{j.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x)),e._activeDrag=null};j.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",x),document.addEventListener("touchend",x),e._activeDrag={onMove:g,onUp:x})};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&&j.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 wr(f){f.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(ht,"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 xs(document.createElementNS(ht,"g"));a.appendChild(d.node);const u=s(d,[0,0],h,[],c);r[c]={group:d,handle:u}});const l=()=>{const c=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,u=parseFloat(e.attr("height"))||0,p=e.node.getAttribute("transform");p?a.setAttribute("transform",p):a.removeAttribute("transform");const g={t:[c+d/2,h],b:[c+d/2,h+u],l:[c,h+u/2],r:[c+d,h+u/2],lt:[c,h],rt:[c+d,h],lb:[c,h+u],rb:[c+d,h+u]};o.forEach(x=>{r[x]&&g[x]&&i(r[x].group,g[x])})};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},f.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 u=(c.type==="touchstart"?c.touches[0]:c).clientX,p=e.node.ownerSVGElement;let g=null;p&&(g=p.getScreenCTM());const x=parseFloat(e.attr("x"))||0,b=parseFloat(e.attr("width"))||0,m=v=>{let w=(v.type==="touchmove"?v.touches[0]:v).clientX-u;g&&(w=w/g.a);let S=x,_=b;n==="l"?(S=x+w,_=b-w):n==="r"&&(_=b+w),_<0&&(_=0),e.attr({x:S,width:_}),e._updateSelectPositions&&e._updateSelectPositions();const k=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(k)},A=()=>{j.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)};j.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}}br(mt);kn(mt);yr(mt);wr(mt);function Xe(){const f=Q.createElementNS(ht,"svg"),t=new xs(f);return t.attr({xmlns:ht}),t}Xe.xlink="http://www.w3.org/1999/xlink";j.isBrowser()&&typeof window.SVG=="undefined"&&(window.SVG=Xe);j.isBrowser()?(typeof window.SVG=="undefined"&&(window.SVG=Xe),typeof window.Apex=="undefined"&&(window.Apex={})):typeof global!="undefined"&&(typeof global.Apex=="undefined"&&(global.Apex={}),typeof global.SVG=="undefined"&&(global.SVG=Xe));const Ks="__apexcharts_features_v1__";globalThis[Ks]||(globalThis[Ks]=new Map);function Ml(){return globalThis[Ks]}let le=class Js{static get _featureRegistry(){return Ml()}static registerFeatures(t){for(const[e,s]of Object.entries(t))Js._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","clearDrilldownCache","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new us(this.w,this.ctx),this.ctx.axes=new Fn(this.w,this.ctx),this.ctx.core=new sr(this.ctx.el,this.w,this.ctx),this.ctx.config=new fe({}),this.ctx.data=new Pi(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new as(this.w,this.ctx),this.ctx.graphics=new tt(this.w,this.ctx),this.ctx.coreUtils=new St(this.w),this.ctx.crosshairs=new os(this.w),this.ctx.events=new Pn(this.w,this.ctx),this.ctx.fill=new ki(this.w),this.ctx.localization=new Rn(this.w),this.ctx.options=new Yt,this.ctx.responsive=new Xn(this.w),this.ctx.series=new Qt(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 qn(this.w),this.ctx.formatters=new me(this.w),this.ctx.titleSubtitle=new jn(this.w),this.ctx.dimensions=new Ti(this.w,this.ctx),this.ctx.updateHelpers=new nr(this.w,this.ctx),this.ctx.rendererController=new ur(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new dr(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=Js._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 u=t.get("measure");s.measure=u?new u(e,s):null;const p=t.get("contextMenu");s.contextMenu=p?new p(e,s):null;const g=t.get("weave");s.weave=g?new g(e,s):null;const x=t.get("waterfall");s.waterfall=x?new x(e,s):null;const b=t.get("streamgraph");s.streamgraph=b?new b(e,s):null;const m=t.get("trellis");s.trellis=m?new m(e,s):null;const A=t.get("osThemeWatcher");s.osThemeWatcher=A?new A(e,s):null;const v=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var S;return!this._toolbar&&v&&(this._toolbar=new v(e,this)),(S=this._toolbar)!=null?S:null},configurable:!0});const y=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var S;return!this._zoomPanSelection&&y&&(this._zoomPanSelection=new y(e,this)),(S=this._zoomPanSelection)!=null?S:null},configurable:!0});const w=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var S;return!this._keyboardNavigation&&w&&(this._keyboardNavigation=new w(e,this)),(S=this._keyboardNavigation)!=null?S:null},configurable:!0})}},Qs=class{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,n,r,o,l,c,h,d,u,p;(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),fs.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.trellis)==null||o.teardown(),this.ctx.trellis=null,(l=this.ctx.ink)==null||l.teardown(),this.ctx.ink=null,(c=this.ctx.measure)==null||c.teardown(),this.ctx.measure=null,(h=this.ctx.contextMenu)==null||h.teardown(),this.ctx.contextMenu=null,(d=this.ctx.osThemeWatcher)==null||d.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,(p=(u=this.ctx.rendererController)==null?void 0:u.teardown)==null||p.call(u),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(j.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 ti="__apexcharts_unit_layouts__";globalThis[ti]||(globalThis[ti]={});function vr(){return globalThis[ti]}function Ll(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerUnitLayout requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerUnitLayout("${f}") expects a function (objects, rect) => [{id, x, y}].`);return}vr()[f]=t}function Dl(f){delete vr()[f]}const ei="__apexcharts_unit_marks__";globalThis[ei]||(globalThis[ei]={});function Ar(){return globalThis[ei]}function Tl(f,t){if(typeof f=="string"){const s=f.trim();return s?Object.freeze({name:t||"anonymous",path:s,viewBox:[0,0,100,100]}):null}if(!f||typeof f!="object"||typeof f.path!="string"||!f.path.trim())return null;const e=Array.isArray(f.viewBox)&&f.viewBox.length===4?f.viewBox.map(Number):[0,0,100,100];return!e.every(s=>isFinite(s))||e[2]<=0||e[3]<=0?null:Object.freeze(rt(K({}
31,f),{name:t||f.name||"anonymous",path:f.path.trim(),viewBox:e,fillRule:f.fillRule==="evenodd"?"evenodd":void 0}))}function El(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerUnitMark requires a non-empty name.");return}const e=Tl(t,f);if(!e){console.warn(`ApexCharts: registerUnitMark("${f}") expects path data, or {path, viewBox?, fillRule?}.`);return}Ar()[f]=e}function Pl(f){delete Ar()[f]}const si="__apexcharts_row_sources__";globalThis[si]||(globalThis[si]={});function Fi(){return globalThis[si]}function Rl(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerRowSource requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerRowSource("${f}") expects a function (w, opts) => series.`);return}Fi()[f]=t}function xa(f){return f&&Fi()[f]||null}function Fl(f){delete Fi()[f]}function Ol(f){const t=f&&f.config&&f.config.chart;return t?xa(t.requestedType)||xa(t.type):null}const Ts="__apexcharts_plugins__";function Sr(){const f=globalThis;return f[Ts]||(f[Ts]={}),f[Ts]}function Xl(f){if(!f||typeof f.name!="string"||typeof f.setup!="function"){console.error("[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.");return}Sr()[f.name]=f}function Il(f){delete Sr()[f]}const ii=new WeakMap;function _r(f,t){if(j.isSSR())return;let e=!1;if(f.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const i=f.getBoundingClientRect();(f.style.display==="none"||i.width===0)&&(e=!0)}const s=new ResizeObserver(i=>{e&&t.call(f,i),e=!0});f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(f.children).forEach(i=>s.observe(i)):s.observe(f),ii.set(t,s)}function Cr(f,t){if(j.isSSR())return;const e=ii.get(t);e&&(e.disconnect(),ii.delete(t))}const Nl=`@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/* A series still playing its exit tween stays painted so it can visibly shrink 360 away, hiding it on the first frame leaves a hole in a stacked chart for the 361 length of the animation. Dropped once the tween lands. */ 362.apexcharts-series-collapsed.apexcharts-series-collapsing { 363 opacity: 1 364} 365 366/* Its labels ride the shrinking marks, but a mark runs out of room for its text 367 well before it reaches zero, so fade them across the exit instead of holding 368 them crisp over a sliver. Duration is set inline from dynamicAnimation.speed. */ 369.apexcharts-datalabels.apexcharts-series-collapsing { 370 animation: apexcharts-datalabels-exit var(--apexcharts-dl-exit, 400ms) ease-in 371 forwards; 372} 373 374@keyframes apexcharts-datalabels-exit { 375 from { 376 opacity: 1 377 } 378 to { 379 opacity: 0 380 } 381} 382 383.apexcharts-canvas svg:focus:not(:focus-visible) { 384 outline: none; 385} 386 387/* Keyboard navigation focus indicator on SVG data elements. 388 SVG elements don't support CSS outline, so we use stroke. */ 389.apexcharts-bar-area.apexcharts-keyboard-focused, 390.apexcharts-candlestick-area.apexcharts-keyboard-focused, 391.apexcharts-boxPlot-area.apexcharts-keyboard-focused, 392.apexcharts-rangebar-area.apexcharts-keyboard-focused, 393.apexcharts-pie-area.apexcharts-keyboard-focused, 394.apexcharts-heatmap-rect.apexcharts-keyboard-focused, 395.apexcharts-treemap-rect.apexcharts-keyboard-focused { 396 stroke: var(--apexcharts-focus-color, #008FFB); 397 stroke-width: 2; 398 stroke-opacity: 1; 399} 400 401.apexcharts-tooltip { 402 --apx-tt-bg: #ffffff; 403 /* Shared by the body and the arrow's two outward facets, so the 404 * hairline reads as one continuous outline around the whole shape. 405 * Keep it strong enough to survive on its own: the shadow below is 406 * elevation, not edge definition. */ 407 --apx-tt-border: rgba(15, 23, 42, 0.12); 408 /* Elevation, in three layers: a tight contact shadow that anchors the 409 * bottom edge, a directional key shadow for the lift, and a wide 410 * ambient one that grounds the whole box. Each is weaker and more 411 * diffuse than the last. 412 * 413 * A tooltip is unusual in that it floats over *data*, so reach costs 414 * more than it does on a page: every pixel the shadow travels tints a 415 * bar or a line the reader is trying to compare. These numbers are 416 * tuned to keep the near-edge contrast that reads as elevation while 417 * dropping the long low haze that only muddies the plot. 418 * 419 * Note there is deliberately no \`0 0 0 1px\` ring layer. That used to 420 * stand in for edge definition back when --apx-tt-border was barely 421 * visible; now that the border is a real hairline (and the arrow 422 * shares it) a ring only double-draws the outline, and being spread 423 * rather than offset it leaked ink upward too, flattening the lift. 424 * 425 * \`--apx-tt-shadow-dir\` flips the whole stack's Y in one place â see 426 * the \`[data-placement="bottom"]\` rule further down. */ 427 --apx-tt-shadow-dir: 1; 428 --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14); 429 --apx-tt-arrow-bg: var(--apx-tt-bg); 430 --apx-tt-color: #0f172a; 431 --apx-tt-color-muted: rgba(15, 23, 42, 0.55); 432 border-radius: 8px; 433 background: var(--apx-tt-bg); 434 border: 1px solid var(--apx-tt-border); 435 box-shadow: var(--apx-tt-shadow); 436 color: var(--apx-tt-color); 437 cursor: default; 438 font-size: 13px; 439 left: 0; 440 top: 0; 441 opacity: 0; 442 pointer-events: none; 443 position: absolute; 444 display: flex; 445 flex-direction: column; 446 padding: 2px 0; 447 white-space: nowrap; 448 z-index: 12; 449 transition: opacity .12s ease 450} 451 452/* While the tooltip is visible, smoothly animate position changes 453 * between data points. Kept short (160 ms) and ease-out so it stays 454 * responsive â too long would feel laggy when sweeping across many 455 * points fast. The position transition is only attached after the 456 * first paint (Position.applyTooltipPosition flips \`data-positioned\` 457 * once the tooltip has been placed) so the *first* show doesn't slide 458 * the tooltip in from the previously-stale (0,0) coordinates. */ 459.apexcharts-tooltip.apexcharts-active { 460 opacity: 1; 461 transition: opacity .12s ease 462} 463.apexcharts-tooltip.apexcharts-active[data-positioned="true"] { 464 transition: opacity .12s ease, left .16s ease-out, top .16s ease-out 465} 466 467.apexcharts-tooltip.apexcharts-theme-light { 468 /* defaults already set above; class kept for backward-compat selectors */ 469} 470 471.apexcharts-tooltip.apexcharts-theme-dark { 472 --apx-tt-bg: #1c1c1f; 473 --apx-tt-border: rgba(255, 255, 255, 0.16);
474 /* Dark needs more alpha than light to register at all, but not as much 475 * as it used to: the light rim above now carries the edge, so the 476 * shadow is free to be pure elevation instead of doubling as an 477 * outline. Same geometry as light, heavier ink. */ 478 --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38); 479 --apx-tt-color: #f3f4f6; 480 --apx-tt-color-muted: rgba(243, 244, 246, 0.55); 481} 482 483.apexcharts-tooltip * { 484 font-family: inherit 485} 486 487/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the 488 * glass body/border/shadow from \`.apexcharts-tooltip\` but holds free-form 489 * content, so it needs its own padding, wrapping and a sane max width. */ 490.apexcharts-tooltip.apexcharts-annotation-tooltip { 491 padding: 6px 10px; 492 max-width: 240px; 493 white-space: normal; 494 line-height: 1.4; 495 pointer-events: none; 496 z-index: 13 497} 498 499.apexcharts-tooltip-title { 500 padding: 8px 12px 4px; 501 font-size: 12px; 502 font-weight: 600; 503 letter-spacing: 0.01em; 504 color: var(--apx-tt-color-muted); 505 background: transparent; 506 border-bottom: none; 507 margin-bottom: 0 508} 509 510.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title, 511.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { 512 background: transparent; 513 border-bottom: none 514} 515 516/* \`fillSeriesColor\`: each series-group already paints itself with the 517 * series colour. Drop the glass body entirely (transparent bg, no 518 * border, no backdrop-filter, no padding) and clip the coloured 519 * series-group(s) to the tooltip's rounded corners so they fill the 520 * shell edge-to-edge. Text inside the coloured group is forced to 521 * white for contrast. */ 522.apexcharts-tooltip.apexcharts-tooltip-fill-series { 523 background: transparent; 524 -webkit-backdrop-filter: none; 525 backdrop-filter: none; 526 border: none; 527 padding: 0; 528 overflow: hidden; 529 color: #fff 530} 531 532.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title { 533 background: rgba(0, 0, 0, 0.22); 534 color: #fff; 535 opacity: 1; 536 padding: 6px 12px 537} 538 539.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group { 540 color: #fff 541} 542 543/* Arrow connector â a 45°-rotated square straddling the body's edge, so 544 * the body's 1px border runs continuously out across the arrow and back. 545 * The two facets that face away from the tooltip carry the border; the 546 * two that face into it carry none, and the square's opaque fill covers 547 * the segment of the body's own border it sits on, hiding the seam. 548 * 549 * This is why it's a rotated square and not a triangle: \`clip-path\` 550 * erases \`border\` and \`box-shadow\` along with everything outside the 551 * polygon, which left \`filter: drop-shadow\` as the only way to suggest 552 * an edge â and a drop-shadow can only ever blur one, never draw a 553 * hairline. Nothing here needs a filter. 554 * 555 * Geometry: a square of side S rotated 45° reaches S/â2 from its centre 556 * to each corner, so S = 10px gives the ~7px tip overhang that 557 * ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base. 558 * The offsets park the square's *centre* 1px outside the padding box 559 * (-6px = -1px border - 10px/2), i.e. exactly on the body's border line, 560 * so the two borders meet end to end instead of overlapping or gapping. 561 * \`box-sizing\` must be border-box or the bordered sides would grow the 562 * square asymmetrically and knock its centre off that line. */ 563.apexcharts-tooltip-arrow { 564 position: absolute; 565 box-sizing: border-box; 566 width: 10px; 567 height: 10px; 568 background: var(--apx-tt-arrow-bg); 569 transform: rotate(45deg); 570 pointer-events: none; 571 top: calc(var(--apx-tt-arrow-y, 50%) - 5px) 572} 573 574/* Which two sides face outward depends on the placement. Under 575 * \`rotate(45deg)\` the square's bottom-left corner swings to the left, 576 * top-right to the right, top-left to the top and bottom-right to the 577 * bottom â so the pair of borders below is always the two sharing the 578 * corner that ends up as the tip. */ 579.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow { 580 left: -6px; 581 border-left: 1px solid var(--apx-tt-border); 582 border-bottom: 1px solid var(--apx-tt-border) 583} 584 585.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow { 586 right: -6px; 587 border-top: 1px solid var(--apx-tt-border); 588 border-right: 1px solid var(--apx-tt-border) 589} 590 591/* Vertical arrow variants: tooltip is above/below the data point and the 592 * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for 593 * left/right placement; for top/bottom we centre on \`--apx-tt-arrow-x\` 594 * instead (set by applyTooltipPosition). */ 595.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow, 596.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 597 top: auto; 598 left: calc(var(--apx-tt-arrow-x, 50%) - 5px) 599} 600 601.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow { 602 bottom: -6px; 603 border-right: 1px solid var(--apx-tt-border); 604 border-bottom: 1px solid var(--apx-tt-border) 605} 606 607.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 608 top: -6px; 609 border-top: 1px solid var(--apx-tt-border); 610 border-left: 1px solid var(--apx-tt-border) 611} 612 613/* When the tooltip is flipped below the data point, the default
614 * downward-biased shadow leaves its top edge undefined. Negating the 615 * direction casts the whole elevation upward instead, so the shadow 616 * falls between the tooltip and the mark above it. One multiplier flips 617 * all three layers together; the arrow needs no counterpart, since its 618 * border doesn't depend on light direction. */ 619.apexcharts-tooltip[data-placement="bottom"] { 620 --apx-tt-shadow-dir: -1 621} 622 623.apexcharts-tooltip-text-goals-value, 624.apexcharts-tooltip-text-y-value, 625.apexcharts-tooltip-text-z-value { 626 display: inline-block; 627 margin-left: 5px; 628 font-weight: 600 629} 630 631.apexcharts-tooltip-text-goals-label:empty, 632.apexcharts-tooltip-text-goals-value:empty, 633.apexcharts-tooltip-text-y-label:empty, 634.apexcharts-tooltip-text-y-value:empty, 635.apexcharts-tooltip-text-z-value:empty, 636.apexcharts-tooltip-title:empty { 637 display: none 638} 639 640.apexcharts-tooltip-text-goals-label, 641.apexcharts-tooltip-text-goals-value { 642 padding: 6px 0 5px 643} 644 645.apexcharts-tooltip-goals-group, 646.apexcharts-tooltip-text-goals-label, 647.apexcharts-tooltip-text-goals-value { 648 display: flex 649} 650 651.apexcharts-tooltip-text-goals-label:not(:empty), 652.apexcharts-tooltip-text-goals-value:not(:empty) { 653 margin-top: -6px 654} 655 656.apexcharts-tooltip-marker { 657 display: inline-flex; 658 align-items: center; 659 justify-content: center; 660 position: relative; 661 width: 12px; 662 height: 12px; 663 margin-right: 6px; 664 vertical-align: middle; 665 color: inherit; 666} 667 668.apexcharts-tooltip-marker svg { 669 width: 100%; 670 height: 100%; 671 display: block; 672} 673 674.apexcharts-tooltip-series-group { 675 padding: 4px 12px; 676 display: none; 677 gap: 8px; 678 text-align: left; 679 justify-content: left; 680 align-items: center 681} 682 683.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { 684 opacity: 1 685} 686 687.apexcharts-tooltip-series-group.apexcharts-active:last-child, 688.apexcharts-tooltip-series-group:last-child { 689 padding-bottom: 8px 690} 691 692.apexcharts-tooltip-y-group { 693 padding: 6px 0 5px 694} 695 696/* \`tooltip.compact\`: a tight box instead of a card, for panels a normal card 697 would cover (small multiples, sparklines, tiles). Only the box shrinks, so 698 the arrow and every anchor rule still apply. Rows stay stacked when there 699 are several series (the names are what tells them apart); a one-series 700 chart collapses to a single line, see \`-value-only\` below. */ 701.apexcharts-tooltip.apexcharts-tooltip-compact { 702 padding: 3px 8px; 703 font-size: 11px; 704 line-height: 1.35 705} 706 707.apexcharts-tooltip-compact .apexcharts-tooltip-title { 708 padding: 0; 709 font-size: 11px; 710 white-space: nowrap 711} 712 713.apexcharts-tooltip-compact .apexcharts-tooltip-series-group, 714.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child, 715.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child { 716 padding: 0; 717 gap: 5px 718} 719 720.apexcharts-tooltip-compact .apexcharts-tooltip-y-group { 721 padding: 0 722} 723 724.apexcharts-tooltip-compact .apexcharts-tooltip-marker { 725 width: 8px; 726 height: 8px 727} 728 729/* A one-series panel: the series name repeats what the panel header already 730 says, so the value stands alone and the x label becomes its prefix on one 731 line ("Aug 2024 6.59"). */ 732.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only { 733 /* The tooltip body is a flex COLUMN by default (title row, then series 734 rows); one series needs no column, so the same box turns into one line. */ 735 flex-direction: row; 736 align-items: baseline; 737 gap: 6px 738} 739 740.apexcharts-tooltip-value-only .apexcharts-tooltip-marker { 741 display: none 742} 743 744.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label { 745 display: none 746} 747 748.apexcharts-custom-tooltip, 749.apexcharts-tooltip-box { 750 padding: 4px 8px 751} 752 753.apexcharts-tooltip-boxPlot { 754 display: flex; 755 flex-direction: column-reverse 756} 757 758.apexcharts-tooltip-box>div { 759 margin: 4px 0 760} 761 762.apexcharts-tooltip-box span.value { 763 font-weight: 700 764} 765 766.apexcharts-tooltip-rangebar { 767 padding: 5px 8px 768} 769 770.apexcharts-tooltip-rangebar .category { 771 font-weight: 600; 772 color: #777 773} 774 775.apexcharts-tooltip-rangebar .series-name { 776 font-weight: 700; 777 display: block; 778 margin-bottom: 5px 779} 780 781/* Streamgraph: every band read out at one column, top-down in stacking order. 782 * A row per band rather than the shared tooltip's list, because a streamgraph's 783 * \`[lo, hi]\` are stacking offsets and the values the reader gave live on 784 * w.streamgraphData. */ 785.apexcharts-tooltip-stream { 786 padding: 5px 8px 787} 788 789.apexcharts-tooltip-stream .apexcharts-tooltip-title { 790 background: transparent; 791 border: 0; 792 padding: 0 0 4px; 793 margin: 0; 794 font-weight: 700 795} 796 797.apexcharts-tooltip-stream-band { 798 display: flex; 799 align-items: center; 800 gap: 5px; 801 line-height: 1.6; 802 opacity: .72 803} 804 805.apexcharts-tooltip-stream-band.apexcharts-active { 806 opacity: 1; 807 font-weight: 700 808} 809 810.apexcharts-tooltip-stream-band .series-name { 811 flex: 1 1 auto; 812 margin-right: 8px 813} 814 815.apexcharts-tooltip-stream-band .value { 816 font-weight: 700; 817 margin-left: auto 818} 819 820.apexcharts-tooltip-stream-total { 821 display: flex; 822 align-items: center; 823 margin-top: 4px; 824 padding-top: 4px; 825 border-top: 1px solid var(--apx-tt-border, rgba(15, 23, 42, .12)) 826} 827 828.apexcharts-tooltip-stream-total .series-name { 829 flex: 1 1 auto; 830 font-weight: 600 831} 832 833.apexcharts-tooltip-stream-total .value { 834 font-weight: 700; 835 margin-left: auto 836} 837 838/* The band labels themselves. Pointer events off so a name never blocks a 839 * hover on the band it sits on. */ 840.apexcharts-streamgraph-label { 841 pointer-events: none 842} 843 844/* X/Y axis tooltips â small popovers that label the crosshair on the 845 * axes. Restyled to match the modern data-tooltip palette: solid white 846 * body with a subtle border + soft drop-shadow, smaller font, rounded 847 * corners. The arrows still use the CSS border-triangle technique 848 * (cheap, crisp at small sizes); their colours flow from CSS variables 849 * so light/dark themes only need one override per axis. */ 850.apexcharts-xaxistooltip, 851.apexcharts-yaxistooltip { 852 --apx-axt-bg: #ffffff; 853 --apx-axt-border: rgba(15, 23, 42, 0.08); 854 --apx-axt-color: #0f172a; 855 --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12); 856 opacity: 0; 857 pointer-events: none; 858 color: var(--apx-axt-color); 859 font-size: 12px; 860 font-weight: 500; 861 text-align: center; 862 border-radius: 6px; 863 position: absolute; 864 z-index: 10; 865 background: var(--apx-axt-bg); 866 border: 1px solid var(--apx-axt-border); 867 box-shadow: var(--apx-axt-shadow) 868} 869 870.apexcharts-xaxistooltip.apexcharts-theme-dark, 871.apexcharts-yaxistooltip.apexcharts-theme-dark { 872 --apx-axt-bg: #1c1c1f; 873 --apx-axt-border: rgba(255, 255, 255, 0.1); 874 --apx-axt-color: #f3f4f6; 875 --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45) 876} 877 878.apexcharts-xaxistooltip { 879 padding: 4px 8px; 880 transition: .15s ease all 881} 882 883.apexcharts-xaxistooltip:after, 884.apexcharts-xaxistooltip:before { 885 left: 50%; 886 border: solid transparent; 887 content: " "; 888 height: 0; 889 width: 0; 890 position: absolute; 891 pointer-events: none 892} 893 894/* :before paints the 1px border outline of the triangle (slightly larger 895 * than :after); :after sits inside and paints the fill â leaves a 1px 896 * ring of :before visible at the edges. */ 897.apexcharts-xaxistooltip:after { 898 border-color: transparent; 899 border-width: 5px; 900 margin-left: -5px 901} 902 903.apexcharts-xaxistooltip:before { 904 border-color: transparent; 905 border-width: 6px; 906 margin-left: -6px 907} 908 909.apexcharts-xaxistooltip-bottom:after, 910.apexcharts-xaxistooltip-bottom:before { 911 bottom: 100% 912} 913 914.apexcharts-xaxistooltip-top:after, 915.apexcharts-xaxistooltip-top:before { 916 top: 100% 917} 918 919.apexcharts-xaxistooltip-bottom:after { 920 border-bottom-color: var(--apx-axt-bg) 921} 922 923.apexcharts-xaxistooltip-bottom:before { 924 border-bottom-color: var(--apx-axt-border) 925} 926 927.apexcharts-xaxistooltip-top:after { 928 border-top-color: var(--apx-axt-bg) 929} 930 931.apexcharts-xaxistooltip-top:before { 932 border-top-color: var(--apx-axt-border) 933} 934 935.apexcharts-xaxistooltip.apexcharts-active { 936 opacity: 1; 937 transition: .15s ease all 938} 939 940.apexcharts-yaxistooltip { 941 padding: 3px 8px 942} 943 944.apexcharts-yaxistooltip:after, 945.apexcharts-yaxistooltip:before { 946 top: 50%; 947 border: solid transparent; 948 content: " "; 949 height: 0; 950 width: 0; 951 position: absolute; 952 pointer-events: none 953} 954 955.apexcharts-yaxistooltip:after { 956 border-color: transparent; 957 border-width: 5px; 958 margin-top: -5px 959} 960 961.apexcharts-yaxistooltip:before { 962 border-color: transparent; 963 border-width: 6px; 964 margin-top: -6px 965} 966 967.apexcharts-yaxistooltip-left:after, 968.apexcharts-yaxistooltip-left:before { 969 left: 100% 970} 971 972.apexcharts-yaxistooltip-right:after, 973.apexcharts-yaxistooltip-right:before { 974 right: 100% 975}
975 976 977.apexcharts-yaxistooltip-left:after { 978 border-left-color: var(--apx-axt-bg) 979} 980 981.apexcharts-yaxistooltip-left:before { 982 border-left-color: var(--apx-axt-border) 983} 984 985.apexcharts-yaxistooltip-right:after { 986 border-right-color: var(--apx-axt-bg) 987} 988 989.apexcharts-yaxistooltip-right:before { 990 border-right-color: var(--apx-axt-border) 991} 992 993.apexcharts-yaxistooltip.apexcharts-active { 994 opacity: 1 995} 996 997.apexcharts-yaxistooltip-hidden { 998 display: none 999} 1000 1001.apexcharts-xcrosshairs, 1002.apexcharts-ycrosshairs { 1003 pointer-events: none; 1004 opacity: 0; 1005 transition: .15s ease all 1006} 1007 1008.apexcharts-xcrosshairs.apexcharts-active, 1009.apexcharts-ycrosshairs.apexcharts-active { 1010 opacity: 1; 1011 transition: .15s ease all 1012} 1013 1014.apexcharts-ycrosshairs-hidden { 1015 opacity: 0 1016} 1017 1018.apexcharts-selection-rect { 1019 cursor: move 1020} 1021 1022.svg_select_shape { 1023 stroke-width: 1; 1024 stroke-dasharray: 10 10; 1025 stroke: black; 1026 stroke-opacity: 0.1; 1027 pointer-events: none; 1028 fill: none; 1029} 1030 1031.svg_select_handle { 1032 stroke-width: 3; 1033 stroke: black; 1034 fill: none; 1035} 1036 1037.svg_select_handle_r { 1038 cursor: e-resize; 1039} 1040 1041.svg_select_handle_l { 1042 cursor: w-resize; 1043} 1044 1045.apexcharts-svg.apexcharts-zoomable.hovering-zoom { 1046 cursor: crosshair 1047} 1048 1049.apexcharts-svg.apexcharts-zoomable.hovering-pan { 1050 cursor: move 1051} 1052 1053.apexcharts-menu-icon, 1054.apexcharts-measure-icon, 1055.apexcharts-pan-icon, 1056.apexcharts-reset-icon, 1057.apexcharts-selection-icon, 1058.apexcharts-toolbar-custom-icon, 1059.apexcharts-zoom-icon, 1060.apexcharts-zoomin-icon, 1061.apexcharts-zoomout-icon { 1062 cursor: pointer; 1063 /* WCAG 2.5.8 Target Size (Minimum): 24Ã24 CSS px hit target. */ 1064 width: 26px; 1065 height: 24px; 1066 line-height: 24px; 1067 color: #6e8192; 1068 text-align: center; 1069 /* Reset native <button> chrome â these are styled via SVG icons. */ 1070 padding: 0; 1071 margin: 0; 1072 background: transparent; 1073 border: 0; 1074 border-radius: 5px; 1075 display: inline-flex; 1076 align-items: center; 1077 justify-content: center; 1078 transition: background-color .12s ease, color .12s ease; 1079} 1080 1081.apexcharts-menu-icon svg, 1082.apexcharts-measure-icon svg, 1083.apexcharts-pan-icon svg, 1084.apexcharts-reset-icon svg, 1085.apexcharts-selection-icon svg, 1086.apexcharts-zoom-icon svg, 1087.apexcharts-zoomin-icon svg, 1088.apexcharts-zoomout-icon svg { 1089 width: 18px; 1090 height: 18px; 1091 fill: none; 1092 stroke: currentColor; 1093 stroke-width: 2; 1094 stroke-linecap: round; 1095 stroke-linejoin: round 1096} 1097 1098.apexcharts-theme-dark .apexcharts-menu-icon, 1099.apexcharts-theme-dark .apexcharts-measure-icon, 1100.apexcharts-theme-dark .apexcharts-pan-icon, 1101.apexcharts-theme-dark .apexcharts-reset-icon, 1102.apexcharts-theme-dark .apexcharts-selection-icon, 1103.apexcharts-theme-dark .apexcharts-toolbar-custom-icon, 1104.apexcharts-theme-dark .apexcharts-zoom-icon, 1105.apexcharts-theme-dark .apexcharts-zoomin-icon, 1106.apexcharts-theme-dark .apexcharts-zoomout-icon { 1107 color: #d4d6dc 1108} 1109 1110.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected, 1111.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected, 1112.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected, 1113.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected, 1114.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected { 1115 background: rgba(0, 143, 251, 0.12); 1116 color: #008ffb 1117} 1118 1119.apexcharts-theme-light .apexcharts-menu-icon:hover, 1120.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover, 1121.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover, 1122.apexcharts-theme-light .apexcharts-reset-icon:hover, 1123.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover, 1124.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 1125.apexcharts-theme-light .apexcharts-zoomin-icon:hover, 1126.apexcharts-theme-light .apexcharts-zoomout-icon:hover { 1127 background: rgba(15, 23, 42, 0.06); 1128 color: #1f2937 1129} 1130 1131.apexcharts-theme-dark .apexcharts-menu-icon:hover, 1132.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover, 1133.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover, 1134.apexcharts-theme-dark .apexcharts-reset-icon:hover, 1135.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover, 1136.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 1137.apexcharts-theme-dark .apexcharts-zoomin-icon:hover, 1138.apexcharts-theme-dark .apexcharts-zoomout-icon:hover { 1139 background: rgba(255, 255, 255, 0.08); 1140 color: #fff 1141} 1142 1143.apexcharts-menu-icon, 1144.apexcharts-selection-icon { 1145 position: relative 1146} 1147 1148.apexcharts-toolbar { 1149 position: absolute; 1150 z-index: 11; 1151 display: inline-flex; 1152 align-items: center; 1153 gap: 1px; 1154 padding: 3px; 1155 border-radius: 8px; 1156 background: rgba(255, 255, 255, 0.85); 1157 backdrop-filter: blur(8px); 1158 -webkit-backdrop-filter: blur(8px); 1159} 1160 1161.apexcharts-theme-dark .apexcharts-toolbar { 1162 background: rgba(28, 28, 31, 0.82); 1163} 1164 1165.apexcharts-menu { 1166 background: rgba(255, 255, 255, 0.95); 1167 backdrop-filter: blur(8px); 1168 -webkit-backdrop-filter: blur(8px); 1169 position: absolute; 1170 top: calc(100% + 4px); 1171 border: 1px solid rgba(15, 23, 42, 0.08); 1172 border-radius: 8px; 1173 padding: 4px; 1174 right: 0; 1175 opacity: 0; 1176 min-width: 120px; 1177 transition: opacity .15s ease, transform .15s ease; 1178 transform: translateY(-2px); 1179 pointer-events: none; 1180 box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06) 1181} 1182 1183.apexcharts-menu.apexcharts-menu-open { 1184 opacity: 1; 1185 transform: translateY(0); 1186 pointer-events: all 1187} 1188 1189.apexcharts-menu-item { 1190 padding: 6px 9px; 1191 font-size: 12px; 1192 border-radius: 5px; 1193 cursor: pointer 1194} 1195 1196.apexcharts-theme-light .apexcharts-menu-item:hover { 1197 background: rgba(15, 23, 42, 0.06) 1198} 1199 1200.apexcharts-theme-dark .apexcharts-menu { 1201 background: rgba(28, 28, 31, 0.92); 1202 border-color: rgba(255, 255, 255, 0.08); 1203 color: #f3f4f6; 1204 box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4) 1205} 1206 1207.apexcharts-theme-dark .apexcharts-menu-item:hover { 1208 background: rgba(255, 255, 255, 0.08) 1209} 1210 1211@media screen and (min-width:768px) { 1212 .apexcharts-canvas:hover .apexcharts-toolbar { 1213 opacity: 1 1214 } 1215} 1216 1217/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */ 1218.apexcharts-toolbar:focus-within { 1219 opacity: 1 1220} 1221 1222/* Focus indicator for toolbar icon buttons */ 1223.apexcharts-menu-icon:focus-visible, 1224.apexcharts-measure-icon:focus-visible, 1225.apexcharts-pan-icon:focus-visible, 1226.apexcharts-reset-icon:focus-visible, 1227.apexcharts-selection-icon:focus-visible, 1228.apexcharts-toolbar-custom-icon:focus-visible, 1229.apexcharts-zoom-icon:focus-visible, 1230.apexcharts-zoomin-icon:focus-visible, 1231.apexcharts-zoomout-icon:focus-visible { 1232 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 1233 outline-offset: 1px; 1234 border-radius: 5px 1235} 1236 1237/* Focus indicator for hamburger menu items */ 1238.apexcharts-menu-item:focus-visible { 1239 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 1240 outline-offset: -2px; 1241 background: #eee 1242} 1243 1244.apexcharts-canvas .apexcharts-element-hidden, 1245.apexcharts-datalabel.apexcharts-element-hidden, 1246.apexcharts-hide .apexcharts-series-points { 1247 opacity: 0; 1248} 1249 1250.apexcharts-hidden-element-shown { 1251 opacity: 1; 1252 transition: 0.25s ease all; 1253} 1254 1255.apexcharts-datalabel, 1256.apexcharts-datalabel-label, 1257.apexcharts-datalabel-value, 1258.apexcharts-datalabels, 1259.apexcharts-pie-label, 1260.apexcharts-pie-name-label, 1261.apexcharts-pie-name-label-group, 1262.apexcharts-pie-label-connector, 1263.apexcharts-unit-outer-label, 1264.apexcharts-unit-outer-label-group, 1265.apexcharts-unit-label-connector { 1266 cursor: default; 1267 pointer-events: none 1268} 1269 1270.apexcharts-pie-label-connector, 1271.apexcharts-unit-label-connector { 1272 fill: none 1273} 1274 1275.apexcharts-pie-label-delay, 1276.apexcharts-unit-label-delay { 1277 opacity: 0; 1278 animation-name: opaque; 1279 animation-duration: .3s; 1280 animation-fill-mode: forwards; 1281 animation-timing-function: ease 1282} 1283
1284/* Slower than the pie's, on purpose: these come in while the dots are still 1285 easing into place, so a longer fade reads as arriving WITH the crowd. */ 1286.apexcharts-unit-label-delay { 1287 animation-duration: .5s 1288} 1289 1290.apexcharts-radialbar-label { 1291 cursor: pointer; 1292} 1293 1294.apexcharts-annotation-rect, 1295.apexcharts-area-series .apexcharts-area, 1296.apexcharts-gridline, 1297.apexcharts-line, 1298.apexcharts-point-annotation-label, 1299.apexcharts-radar-series path:not(.apexcharts-marker), 1300.apexcharts-radar-series polygon, 1301.apexcharts-toolbar svg, 1302.apexcharts-tooltip .apexcharts-marker, 1303.apexcharts-xaxis-annotation-label, 1304.apexcharts-yaxis-annotation-label, 1305.apexcharts-zoom-rect, 1306.no-pointer-events { 1307 pointer-events: none 1308} 1309 1310.apexcharts-tooltip-active .apexcharts-marker { 1311 transition: .15s ease all 1312} 1313 1314.apexcharts-radar-series .apexcharts-yaxis { 1315 pointer-events: none; 1316} 1317 1318.resize-triggers { 1319 animation: 1ms resizeanim; 1320 visibility: hidden; 1321 opacity: 0; 1322 height: 100%; 1323 width: 100%; 1324 overflow: hidden 1325} 1326 1327.contract-trigger:before, 1328.resize-triggers, 1329.resize-triggers>div { 1330 content: " "; 1331 display: block; 1332 position: absolute; 1333 top: 0; 1334 left: 0 1335} 1336 1337.resize-triggers>div { 1338 height: 100%; 1339 width: 100%; 1340 background: #eee; 1341 overflow: auto 1342} 1343 1344.contract-trigger:before { 1345 overflow: hidden; 1346 width: 200%; 1347 height: 200% 1348} 1349 1350.apexcharts-bar-goals-markers { 1351 pointer-events: none 1352} 1353 1354.apexcharts-bar-shadows { 1355 pointer-events: none 1356} 1357 1358.apexcharts-rangebar-goals-markers { 1359 pointer-events: none 1360} 1361 1362.apexcharts-drilldown-target { 1363 cursor: pointer 1364} 1365 1366.apexcharts-breadcrumb { 1367 position: absolute; 1368 z-index: 11; 1369 display: inline-flex; 1370 align-items: center; 1371 gap: 2px; 1372 font-size: 12px; 1373 font-family: inherit; 1374 padding: 2px 4px 1375} 1376 1377.apexcharts-breadcrumb-item { 1378 background: transparent; 1379 border: none; 1380 padding: 2px 6px; 1381 border-radius: 3px; 1382 font: inherit; 1383 color: inherit; 1384 cursor: pointer; 1385 line-height: 1.2 1386} 1387 1388.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 1389 background: rgba(0, 0, 0, 0.08) 1390} 1391 1392.apexcharts-breadcrumb-arrow { 1393 margin-right: 4px; 1394 font-weight: 600; 1395 user-select: none 1396} 1397 1398.apexcharts-breadcrumb-current { 1399 cursor: default; 1400 font-weight: 600; 1401 opacity: 0.85 1402} 1403 1404.apexcharts-breadcrumb-separator { 1405 opacity: 0.5; 1406 user-select: none 1407} 1408 1409.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 1410 background: rgba(255, 255, 255, 0.12) 1411} 1412 1413.apexcharts-drilldown-loading { 1414 position: absolute; 1415 inset: 0; 1416 z-index: 12; 1417 display: flex; 1418 align-items: center; 1419 justify-content: center; 1420 gap: 10px; 1421 font-size: 13px; 1422 font-family: inherit; 1423 color: inherit; 1424 background: rgba(255, 255, 255, 0.62); 1425 /* The chart underneath stays interactive-looking but must not take clicks 1426 while a level is resolving, or a second drill can start mid-fetch. */ 1427 cursor: progress 1428} 1429 1430.apexcharts-drilldown-loading-spinner { 1431 width: 26px; 1432 height: 26px; 1433 border-radius: 50%; 1434 border: 2.5px solid rgba(0, 0, 0, 0.16); 1435 border-top-color: rgba(0, 0, 0, 0.55); 1436 animation: apexcharts-drilldown-spin 0.7s linear infinite 1437} 1438 1439.apexcharts-drilldown-loading-text { 1440 opacity: 0.8 1441} 1442 1443.apexcharts-theme-dark .apexcharts-drilldown-loading { 1444 background: rgba(30, 30, 30, 0.62) 1445} 1446 1447.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner { 1448 border-color: rgba(255, 255, 255, 0.22); 1449 border-top-color: rgba(255, 255, 255, 0.7) 1450} 1451 1452@keyframes apexcharts-drilldown-spin { 1453 to { 1454 transform: rotate(360deg) 1455 } 1456} 1457 1458@media (prefers-reduced-motion: reduce) { 1459 .apexcharts-drilldown-loading-spinner { 1460 animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite 1461 } 1462 1463 @keyframes apexcharts-drilldown-pulse { 1464 0%, 100% { 1465 opacity: 0.35 1466 } 1467 1468 50% { 1469 opacity: 1 1470 } 1471 } 1472} 1473 1474.apexcharts-disable-transitions * { 1475 transition: none !important; 1476} 1477/* ââ Trellis (#22): small multiples âââââââââââââââââââââââââââââââââââââââ */ 1478.apexcharts-trellis { 1479 position: relative; 1480} 1481.apexcharts-trellis-grid { 1482 display: grid; 1483} 1484.apexcharts-trellis-cell { 1485 min-width: 0; 1486 position: relative; 1487} 1488.apexcharts-trellis-header { 1489 font-size: 12px; 1490 font-weight: 600; 1491 line-height: 22px; 1492 height: 22px; 1493 text-align: center; 1494 overflow: hidden; 1495 text-overflow: ellipsis; 1496 white-space: nowrap; 1497 color: var(--apx-fore, #373d3f); 1498} 1499.apexcharts-trellis-title { 1500 font-size: 14px; 1501 font-weight: 700; 1502 padding: 2px 0 6px; 1503 color: var(--apx-fore, #373d3f); 1504} 1505/* Edge-label policy: a muted cell hides its axis-label INK, never the label 1506 SPACE â every panel keeps the identical plot rectangle, and flipping the 1507 policy on a resize is a class toggle, not a re-render. */ 1508.apexcharts-trellis-mute-y .apexcharts-yaxis { 1509 opacity: 0; 1510} 1511.apexcharts-trellis-mute-x .apexcharts-xaxis { 1512 opacity: 0; 1513} 1514/* The shared toolbar floats at the top-right, so a grid that has one starts 1515 below it: from four columns on, the last cell's header (or a 2-D column 1516 strip label) would otherwise run under the buttons. One band for the whole 1517 grid, not per panel. */ 1518.apexcharts-trellis-has-toolbar { 1519 padding-top: 24px; 1520} 1521/* 2-D faceting (P4): column labels once across the top, row labels once 1522 down the left. The row strip column is auto-sized; panel columns stay 1523 equal fractions, so panel alignment is independent of the strip width. */ 1524.apexcharts-trellis-strip { 1525 font-size: 12px; 1526 font-weight: 600; 1527 color: var(--apx-fore, #373d3f); 1528 overflow: hidden; 1529 text-overflow: ellipsis; 1530 white-space: nowrap; 1531} 1532.apexcharts-trellis-strip-column { 1533 text-align: center; 1534 line-height: 22px; 1535 height: 22px; 1536 align-self: end; 1537} 1538.apexcharts-trellis-strip-row { 1539 align-self: center; 1540 max-width: 140px; 1541 padding-right: 6px; 1542} 1543/* Empty (row, column) combinations. 'placeholder' keeps a REAL panel with a 1544 quiet label; 'skip' shows the tinted skeleton; 'hide' shows nothing while 1545 keeping the grid slot. */ 1546.apexcharts-trellis-cell-empty { 1547 position: relative; 1548} 1549.apexcharts-trellis-empty-label { 1550 position: absolute; 1551 inset: 0; 1552 display: flex; 1553 align-items: center; 1554 justify-content: center; 1555 font-size: 12px; 1556 color: var(--apx-fore, #373d3f); 1557 opacity: 0.45; 1558 pointer-events: none; 1559} 1560.apexcharts-trellis-cell-hidden > * { 1561 visibility: hidden; 1562} 1563/* P5: one shared gradient strip is a heatmap grid's legend. The slot is 1564 content-sized inline (the strip svg's own box); centering is its own. */ 1565.apexcharts-trellis-gradient-legend { 1566 margin: 10px auto 0; 1567} 1568/* Virtualization (P2): an unmounted panel's mount div reserves the exact 1569 panel height (inline min-height) so page height and scroll position never 1570 shift; the skeleton itself is a quiet tinted block. Deliberately not 1571 animated: a shimmering grid of 200 placeholders is noise. */ 1572.apexcharts-trellis-panel.apexcharts-trellis-skeleton { 1573 background: var(--apx-fore, #373d3f); 1574 opacity: 0.05; 1575 border-radius: 4px; 1576} 1577/* tooltip: 'panel' â the group still syncs every panel's crosshair, but only 1578 the hovered cell shows its tooltip cards. */ 1579.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip, 1580.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip, 1581.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip { 1582 opacity: 0 !important; 1583}
1584/* tooltip: 'grid' (P3) â ALL per-panel tooltip ink is hidden (the group 1585 still computes it; the trellis card reads it) and one trellis-owned card 1586 follows the cursor with one row per panel. */ 1587.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-tooltip, 1588.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-xaxistooltip, 1589.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-yaxistooltip { 1590 opacity: 0 !important; 1591} 1592.apexcharts-trellis-tooltip { 1593 position: absolute; 1594 top: 0; 1595 left: 0; 1596 z-index: 14; 1597 pointer-events: none; 1598 opacity: 0; 1599 transition: opacity 0.1s ease; 1600 background: var(--apx-bg, #fff); 1601 color: var(--apx-fore, #373d3f); 1602 border: 1px solid rgba(120, 120, 120, 0.25); 1603 border-radius: 5px; 1604 box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4); 1605 font-size: 12px; 1606 min-width: 140px; 1607 max-width: 320px; 1608} 1609.apexcharts-trellis-tooltip-active { 1610 opacity: 1; 1611} 1612.apexcharts-trellis-tooltip .apexcharts-tooltip-title { 1613 padding: 5px 10px; 1614 font-weight: 600; 1615 background: rgba(120, 120, 120, 0.08); 1616 border-bottom: 1px solid rgba(120, 120, 120, 0.18); 1617 margin-bottom: 2px; 1618} 1619.apexcharts-trellis-tooltip-row { 1620 display: flex; 1621 align-items: center; 1622 justify-content: space-between; 1623 gap: 14px; 1624 padding: 2px 10px; 1625 line-height: 1.6; 1626} 1627.apexcharts-trellis-tooltip-row-active { 1628 background: rgba(120, 120, 120, 0.1); 1629 font-weight: 600; 1630} 1631.apexcharts-trellis-tooltip-key { 1632 overflow: hidden; 1633 text-overflow: ellipsis; 1634 white-space: nowrap; 1635} 1636.apexcharts-trellis-tooltip-vals { 1637 display: flex; 1638 gap: 10px; 1639 white-space: nowrap; 1640} 1641.apexcharts-trellis-tooltip-val { 1642 display: inline-flex; 1643 align-items: center; 1644 gap: 5px; 1645} 1646.apexcharts-trellis-tooltip-marker { 1647 width: 8px; 1648 height: 8px; 1649 border-radius: 50%; 1650 display: inline-block; 1651 flex: none; 1652} 1653/* Panel promotion (P3): the promoted cell spans the grid; the rest park. 1654 The promoted panel is the only visible one, so both its axes unmute. */ 1655.apexcharts-trellis-cell-promoted { 1656 grid-column: 1 / -1; 1657} 1658.apexcharts-trellis-cell-parked { 1659 display: none; 1660} 1661.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis, 1662.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis { 1663 opacity: 1; 1664} 1665.apexcharts-trellis-header-clickable { 1666 cursor: pointer; 1667} 1668.apexcharts-trellis-header-clickable:hover { 1669 text-decoration: underline; 1670 text-underline-offset: 3px; 1671} 1672.apexcharts-trellis-breadcrumb { 1673 display: flex; 1674 align-items: center; 1675 gap: 6px; 1676 font-size: 12px; 1677 padding: 2px 0 6px; 1678 color: var(--apx-fore, #373d3f); 1679} 1680.apexcharts-trellis-breadcrumb-back { 1681 border: none; 1682 background: none; 1683 padding: 0; 1684 font-size: 12px; 1685 cursor: pointer; 1686 color: var(--apx-accent, #008ffb); 1687} 1688.apexcharts-trellis-breadcrumb-back:hover { 1689 text-decoration: underline; 1690} 1691.apexcharts-trellis-breadcrumb-sep { 1692 opacity: 0.5; 1693} 1694.apexcharts-trellis-breadcrumb-current { 1695 font-weight: 600; 1696} 1697/* The toolbar download menu (P3). */ 1698.apexcharts-trellis-menu { 1699 position: absolute; 1700 top: 26px; 1701 right: 0; 1702 display: none; 1703 flex-direction: column; 1704 min-width: 132px; 1705 background: var(--apx-bg, #fff); 1706 border: 1px solid rgba(120, 120, 120, 0.25); 1707 border-radius: 5px; 1708 box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4); 1709 padding: 4px; 1710 z-index: 15; 1711} 1712.apexcharts-trellis-menu-open { 1713 display: flex; 1714} 1715.apexcharts-trellis-menu-item { 1716 border: none; 1717 background: none; 1718 text-align: left; 1719 font-size: 12px; 1720 padding: 5px 8px; 1721 border-radius: 3px; 1722 cursor: pointer; 1723 color: var(--apx-fore, #373d3f); 1724} 1725.apexcharts-trellis-menu-item:hover { 1726 background: rgba(120, 120, 120, 0.12); 1727} 1728.apexcharts-trellis-toolbar { 1729 position: absolute; 1730 top: 0; 1731 right: 0; 1732 display: flex; 1733 gap: 2px; 1734 z-index: 12; 1735} 1736.apexcharts-trellis-tool { 1737 border: 0; 1738 background: transparent; 1739 padding: 2px; 1740 cursor: pointer; 1741 border-radius: 3px; 1742 color: #6e8192; 1743 line-height: 0; 1744} 1745.apexcharts-trellis-tool:hover { 1746 color: var(--apx-fore, #373d3f); 1747} 1748.apexcharts-trellis-tool.apexcharts-selected { 1749 color: var(--apx-accent, #008ffb); 1750} 1751.apexcharts-trellis-legend { 1752 display: flex; 1753 flex-wrap: wrap; 1754 justify-content: center; 1755 gap: 4px 14px; 1756 padding: 8px 10px 2px; 1757} 1758.apexcharts-trellis-legend-item { 1759 display: flex; 1760 align-items: center; 1761 gap: 6px; 1762 cursor: pointer; 1763 line-height: 1; 1764} 1765.apexcharts-trellis-legend-item .apexcharts-legend-marker { 1766 width: 12px; 1767 height: 12px; 1768 border-radius: 50%; 1769 display: inline-block; 1770} 1771.apexcharts-trellis-legend-item .apexcharts-legend-text { 1772 font-size: 12px; 1773 color: var(--apx-fore, #373d3f); 1774}
1775.apexcharts-trellis-legend-item.apexcharts-inactive-legend { 1776 opacity: 0.45; 1777} 1778 1779/* Printing (#3352). The sheet is narrower than the screen and nothing reports 1780 its width to the page, so a chart laid out for the screen would be cropped at 1781 the edge of the paper. The chart lays itself out again for print (see 1782 chart.print in the options); this caps whatever is left over so it shrinks to 1783 fit rather than being cut. Shrink only: a chart narrower than the page keeps 1784 the size it was drawn at. */ 1785@media print { 1786 /* Scoped to the class the chart adds while it is laid out for the sheet: this 1787 pair of rules is only safe once an identity viewBox is in place, since 1788 without one a capped width crops the drawing instead of scaling it. A chart 1789 with chart.print.enabled:false gets neither, and prints as it always did. */ 1790 .apexcharts-canvas.apexcharts-printing, 1791 .apexcharts-canvas.apexcharts-printing svg { 1792 max-width: 100% !important; 1793 } 1794 1795 .apexcharts-canvas.apexcharts-printing svg { 1796 height: auto !important; 1797 } 1798 1799 /* A scaled-down SVG is shorter than the box drawn for it, and the wrapper 1800 carries the pre-scale height inline, so without this a chart shrunk to fit a
1801 narrow column prints above a white gap the size of what it gave up. The 1802 host element's own inline min-height is cleared by _beforePrint. */ 1803 .apexcharts-canvas.apexcharts-printing { 1804 height: auto !important; 1805 } 1806 1807 .apexcharts-toolbar { 1808 display: none !important; 1809 } 1810} 1811`,kr=globalThis.console;function ma(f){kr.error(f)}function ba(f){kr.warn(f)}const ya="APEX-",Bl=new Date("2027-07-31T00:00:00Z"),wa="__apex_license_v1__";function Ae(){const f=globalThis;let t=f[wa];return t||(t={key:null,listeners:new Set,result:null},f[wa]=t),t}const ce=class{static get licenseKey(){return Ae().key}static set licenseKey(f){Ae().key=f}static get listeners(){return Ae().listeners}static get validationResult(){return Ae().result}static set validationResult(f){Ae().result=f}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(f){return!!f&&this.validateKey(f).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(f){return this.listeners.add(f),()=>{this.listeners.delete(f)}}static setLicense(f){var t,e;if(!f)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const s=this.validateKey(f);s.valid||f===this.licenseKey||!((e=this.validationResult)!=null&&e.valid)?(this.licenseKey=f,this.publish(s),s.valid||ma(`[Apex] ${s.message}`)):ba(`[Apex] Ignoring license key: ${(t=s.message)!=null?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(f){const t=this.parseKey(f),e=this.validateStructure(f,t);if(!e.valid||!(t!=null&&t.signature))return e;const s=this.verdicts.get(f);return s===!1?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(s===void 0&&this.verifySignature(f,t,e),rt(K({},e),{signatureVerified:s===!0}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(f){const t=f.replace(/-/g,"+").replace(/_/g,"/"),e=t.padEnd(4*Math.ceil(t.length/4),"="),s=globalThis.atob;if(typeof s!="function")throw new Error("no base64 decoder available");const i=s(e),a=new Uint8Array(i.length);for(let n=0;n<i.length;n++)a[n]=i.charCodeAt(n);return a}static canonicalPayload(f){const t=f.domains&&f.domains.length>0?f.domains.join(","):"";return`v1|${f.issueDate}|${f.expiryDate}|${f.plan}|${t}`}static notify(f){for(const t of this.listeners)try{t(f)}catch(e){}}static parseKey(f){if(typeof f!="string"||!f.startsWith(ya))return null;const t=f.slice(5);if(!t)return null;try{const e=new TextDecoder().decode(this.base64ToBytes(t)),s=JSON.parse(e);return s.issueDate&&s.expiryDate&&s.plan?{data:{domains:Array.isArray(s.domains)?s.domains:void 0,expiryDate:s.expiryDate,issueDate:s.issueDate,plan:s.plan,valid:!0},signature:typeof s.sig=="string"&&s.sig?s.sig:null}:null}catch(e){return null}}static publish(f){this.validationResult=f,this.notify(f)}static validateStructure(f,t){const e=a=>({expired:!1,message:a,signatureVerified:!1,valid:!1});if(typeof f!="string"||!f.startsWith(ya))return e('Invalid license key format. License key must start with "APEX-".');if(!t)return e("Invalid license key. Unable to decode license data.");const{data:s,signature:i}=t;if(!i&&new Date>=Bl)return e("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(s.expiryDate)<new Date)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 a=typeof location=="undefined"?"":location.hostname;if(!s.domains.some((n=>a===n||a.endsWith(`.${n}`))))return{data:s,expired:!1,message:`License is not valid for this domain (${a}). Allowed domains: ${s.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:s,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(f,t,e){return yo(this,null,function*(){var s;if(this.verifying.has(f)||this.verdicts.has(f))return;this.verifying.add(f);const i=this.epoch,a=(s=globalThis.crypto)==null?void 0:s.subtle;if(!a||this.publicKeysSpki.length===0)return this.verifying.delete(f),void(this.warnedUnver
1811ifiable||(this.warnedUnverifiable=!0,ba(a?"[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.")));const n=new TextEncoder().encode(this.canonicalPayload(t.data));let r=!1;for(const c of this.publicKeysSpki){try{const h=yield a.importKey("spki",this.base64ToBytes(c),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);r=yield a.verify({hash:"SHA-256",name:"ECDSA"},h,this.base64ToBytes(t.signature),n)}catch(h){r=!1}if(r)break}if(this.verifying.delete(f),this.epoch!==i)return;if(this.verdicts.set(f,r),r){const c=rt(K({},e),{signatureVerified:!0});return void(this.licenseKey===f?this.publish(c):this.notify(c))}const o="Invalid license key. The license signature does not verify.",l={data:t.data,expired:!1,message:o,signatureVerified:!0,valid:!1};this.licenseKey===f?this.publish(l):this.notify(l),ma(`[Apex] ${o}`)})}};ce.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],ce.verdicts=new Map,ce.verifying=new Set,ce.warnedUnverifiable=!1,ce.epoch=0;let $t=ce;const qt=class{static applyStyles(f){Object.assign(f.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(f){return f?f.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(f,t){return f&&typeof document!="undefined"?(this.setManaged(f,t),this.paint(f)):null}static exists(f){return!!this.node(f)}static remove(f,t){f&&(this.setManaged(f,t),this.erase(f))}static untrack(f){this.managed.delete(f)}static createWatermarkPattern(){const f=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(` 1812 <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200"> 1813 <text 1814 x="50%" 1815 y="50%" 1816 dominant-baseline="middle" 1817 text-anchor="middle" 1818 font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif" 1819 font-size="18" 1820 font-weight="600" 1821 fill="rgba(134, 134, 134, 0.1)" 1822 transform="rotate(-35, 100, 60)" 1823 >${f}</text> 1824 </svg> 1825 `.trim())}")`}static erase(f){var t;(t=this.node(f))==null||t.remove()}static paint(f){let t=this.node(f);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),f.appendChild(t)),this.applyStyles(t),typeof getComputedStyle=="function"&&getComputedStyle(f).position==="static"&&(f.style.position="relative"),t}static reconcile(){const f=$t.isLicenseValid();for(const t of this.managed)t.isConnected?f?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(f,t){(t==null?void 0:t.manage)!==!1?this.track(f):this.managed.delete(f)}static track(f){this.managed.add(f),this.subscribed||(this.subscribed=!0,$t.onChange((()=>{this.reconcile()})))}};qt.WATERMARK_ATTR="data-apexcharts-watermark",qt.WATERMARK_TEXT="APEXCHARTS",qt.ATTR="data-apexcharts-watermark",qt.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},qt.managed=new Set,qt.subscribed=!1;let Le=qt;const va="https://apexcharts.com/pricing";let Yl=!1;const de=new Set;function zl(f){de.delete(f)}function $l(f,t){const e=f&&f.config&&f.config.chart||{},s=[];e.type==="unit"&&s.push("unit"),e.requestedType==="raincloud"&&s.push("raincloud"),t.trellis&&typeof t.trellis.isActive=="function"&&t.trellis.isActive()&&s.push("trellis"),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||Yl)&&s.push("perspectives"),t.history&&e.history&&e.history.enabled===!0&&s.push("history"),s}function Hl(f){const t=f&&f.config&&f.config.chart&&f.config.chart.license;if(t)return t;const e=$t.getKey();if(e)return e;const s=j.getApex();return s&&s.license?s.license:null}const Wl=new Set(["premium","enterprise"]);function Gl(f){if(!f)return!1;const t=$t.validateKey(f);if(!t.valid)return!1;const e=t.data&&t.data.plan;return typeof e=="string"&&Wl.has(e.toLowerCase())}function Aa(f,t){const e=Le.add(t,{manage:!1});
1825if(!e||typeof MutationObserver=="undefined"||f._wmNodeObserver&&f._wmObservedNode===e)return;f._wmNodeObserver&&f._wmNodeObserver.disconnect();const s=new MutationObserver(()=>{const i=Le.node(t);i&&(s.disconnect(),Le.applyStyles(i),s.takeRecords(),s.observe(i,{attributes:!0,attributeFilter:["style"]}))});s.observe(e,{attributes:!0,attributeFilter:["style"]}),f._wmNodeObserver=s,f._wmObservedNode=e}function Vl(f,t){if(Aa(f,t),typeof MutationObserver=="undefined"||f._wmWrapObserver)return;const e=new MutationObserver(()=>{Le.node(t)||Aa(f,t)});e.observe(t,{childList:!0}),f._wmWrapObserver=e}function ai(f,t){f._wmWrapObserver&&(f._wmWrapObserver.disconnect(),f._wmWrapObserver=null),f._wmNodeObserver&&(f._wmNodeObserver.disconnect(),f._wmNodeObserver=null),f._wmObservedNode=null;const e=t||f.w&&f.w.dom&&f.w.dom.elWrap;e&&Le.remove(e,{manage:!1})}function Ul(f,t,e){if(f._premiumLicenseNotified)return;f._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: ${va}`);return}const i=$t.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: ${va}`);return}t!==$t.getKey()&&console.error(`[Apex] ${i.message}`)}function De(f,t){try{if(!j.isBrowser())return;if(f&&f.globals&&f.globals.isDestroyed){de.delete(t);return}const e=f&&f.dom&&f.dom.elWrap;if(!e)return;const s=$l(f,t);if(s.length===0){de.delete(t),ai(t,e);return}de.add(t);const i=Hl(f);if(Gl(i)){ai(t,e);return}Vl(t,e),Ul(t,i,s)}catch(e){}}function ni(){if(!j.isBrowser())return;const f=new Set,t=j.getApex(),e=t&&t._chartInstances;Array.isArray(e)&&e.forEach(s=>{const i=s&&s.chart;i&&i.w&&!i.w.globals.isDestroyed&&(f.add(i),De(i.w,i))}),Array.from(de).forEach(s=>{const i=s&&s.w,a=i&&i.dom&&i.dom.elWrap;if(!i||i.globals.isDestroyed||!a||a.isConnected===!1){de.delete(s);return}f.has(s)||De(i,s)})}$t.onChange(ni);const Mr=class ct{constructor(t,e){st(this,"core"),st(this,"responsive"),st(this,"axes"),st(this,"grid"),st(this,"graphics"),st(this,"coreUtils"),st(this,"crosshairs"),st(this,"events"),st(this,"fill"),st(this,"localization"),st(this,"options"),st(this,"series"),st(this,"theme"),st(this,"formatters"),st(this,"titleSubtitle"),st(this,"dimensions"),st(this,"updateHelpers"),st(this,"tooltip"),st(this,"data"),st(this,"animations"),st(this,"exports"),st(this,"legend"),st(this,"toolbar"),st(this,"zoomPanSelection"),st(this,"keyboardNavigation"),st(this,"annotations"),st(this,"morphTypeChange"),st(this,"timeScale"),st(this,"_keyboardNavigation"),st(this,"_zoomPanSelection"),st(this,"windowResizeHandler"),st(this,"parentResizeHandler"),st(this,"publicMethods",[]),st(this,"eventList",[]),st(this,"_renderPromise",null),st(this,"_parentResizeWaiter",null),st(this,"_printRestore",null),st(this,"beforePrintHandler"),st(this,"afterPrintHandler"),st(this,"config"),st(this,"perspectives"),st(this,"storyboard"),st(this,"history"),st(this,"linkedViews"),st(this,"trellis"),st(this,"ink"),st(this,"measure"),st(this,"contextMenu"),st(this,"weave"),st(this,"waterfall"),st(this,"streamgraph"),st(this,"renderer"),st(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new mn(e).init(),this.el=t,this.w.globals.cuid=O.randomId(),this.w.globals.chartID=this.w.config.chart.id?O.escapeString(this.w.config.chart.id):this.w.globals.cuid,zs(this.w),new le(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),j.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this),this.beforePrintHandler=this._beforePrint.bind(this),this.afterPrintHandler=this._afterPrint.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,r,o,l,c,h,d,u,p,g,x,b,m;if(O.elementExists(this.el)){typeof Apex._chartInstances=="undefined"&&(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 A=this.w.config.chart.events.beforeMount;typeof A=="function"&&A(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]);const v=this.w.config.trellis,y=!!(v&&(v.by||v.row||v.column)),w=!!(y&&this.trellis&&this.trellis.isActive());if(y&&!this.trellis&&console.warn("ApexCharts: `trellis` requires the trellis feature, which is not in the default bundle. Bundler: import 'apexcharts/features/trellis'. Script tag: add <script src='.../dist/features/trellis.js'> after apexcharts.js. Rendering as a single chart."),(r=(n=this.w.config.chart)==null?void 0:n.measure)!=null&&r.enabled&&!this.measure&&console.warn("ApexCharts: `chart.measure` requires the measure feature, which is not in the default bundle. Bundler: import 'apexcharts/features/measure'. Script tag: add <script src='.../dist/features/measure.js'> after apexcharts.js."),(l=(o=this.w.config.chart)==null?void 0:o.link)!=null&&l.enabled&&!this.linkedViews&&console.warn("ApexCharts: `chart.link` requires the link feature, which is not in the default bundle. Bundler: import 'apexcharts/features/link'. Script tag: add <script src='.../dist/features/link.js'> after apexcharts.js."),!this.ink){const _=(h=(c=this.w.config.chart)==null?void 0:c.ink)==null?void 0:h.enabled,k=((u=(d=this.w.config.annotations)==null?void 0:d.points)!=null?u:[]).some(M=>M&&M.draggable);(_||k)&&console.warn("ApexCharts: `chart.ink` / `annotations.points[].draggable` requires the ink feature, which is not in the default bundle. Bundler: import 'apexcharts/features/ink'. Script tag: add <script src='.../dist/features/ink.js'> after apexcharts.js.")}if((g=(p=this.w.config.chart)==null?void 0:p.contextMenu)!=null&&g.enabled&&!this.contextMenu&&console.warn("ApexCharts: `chart.contextMenu` requires the context-menu feature, which is not in the default bundle. Bundler: import 'apexcharts/features/context-menu'. Script tag: add <script src='.../dist/features/context-menu.js'> after apexcharts.js."),(b=(x=this.w.config.chart)==null?void 0:x.history)!=null&&b.enabled&&!this.history&&console.warn("ApexCharts: `chart.history` requires the history feature, which is not in the default bundle. Bundler: import 'apexcharts/features/history'. Script tag: add <script src='.../dist/features/history.js'> after apexcharts.js."),j.isBrowser()){w||(window.addEventListener("resize",this.windowResizeHandler),_r(this.el.parentNode,this.parentResizeHandler),this._printEnabled()&&(window.addEventListener("beforeprint",this.beforePrintHandler),window.addEventListener("afterprint",this.afterPrintHandler)));const _=this.el.getRootNode&&this.el.getRootNode(),k=O.is("ShadowRoot",_),M=this.el.ownerDocument;let C=k?_.getElementById("apexcharts-css"):M.getElementById("apexcharts-css");if(!C){C=Q.createElementNS("http://www.w3.org/1999/xhtml","style"),C.id="apexcharts-css",C.textContent=Nl;const L=((m=this.opts.chart)==null?void 0:m.nonce)||this.w.config.chart.nonce;
1825L&&C.setAttribute("nonce",L),k?_.prepend(C):this.w.config.chart.injectStyleSheet!==!1&&M.head.appendChild(C)}}if(w){this.trellis.render().then(()=>{De(this.w,this),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(this)}).catch(_=>{var k,M;const C=_ instanceof Error?_:new Error(String(_)),L=C;L.chartId=(M=(k=this.w)==null?void 0:k.globals)==null?void 0:M.chartID,L.el=this.el,a(C)});return}const S=this.create(this.w.config.series,{});if(!S)return i(this);this.mount(S).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(S)}).catch(_=>{var k,M;const C=_ instanceof Error?_:new Error(String(_)),L=C;L.chartId=(M=(k=this.w)==null?void 0:k.globals)==null?void 0:M.chartID,L.el=this.el,a(C)})}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 le(this).initModules();const c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!O.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),zs(l),l.config.xaxis.convertedCatToNumeric&&new zt(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,S)=>{w.hidden&&(h=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:S}))});const d=St.checkComboSeries(h,l.config.chart.type);c.comboCharts=d.comboCharts,c.comboBarCount=d.comboBarCount;const u=h.every(w=>w.data&&w.data.length===0);(h.length===0||u&&c.collapsedSeries.length<1)&&this.series.handleNoData(),j.isBrowser()&&this.events.setupEventHandlers();const p=this.data.parseData(h);this._writeParsedSeriesData(p.seriesData),this._writeParsedRangeData(p.rangeData),this._writeParsedCandleData(p.candleData),this._writeParsedLabelData(p.labelData),this._writeParsedAxisFlags(p.axisFlags),(s=this.rendererController)==null||s.resolve(),(i=this.weave)==null||i.dispatch("afterParse"),this.theme.init(),new Fe(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 St(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 Hs(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,u,p,g,x,b;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 as(e.w,e);const m=e.grid.drawGrid(),A=le._featureRegistry.get("annotations");if(e.annotations=A?new A(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"&&(m&&s.dom.elGraphical.add(m.el),(o=m==null?void 0:m.elGridBorders)!=null&&o.node&&s.dom.elGraphical.add(m.elGridBorders)),Array.isArray(t.elGraph))for(let w=0;w<t.elGraph.length;w++)s.dom.elGraphical.add(t.elGraph[w]);else s.dom.elGraphical.add(t.elGraph);s.config.grid.position==="front"&&(m&&s.dom.elGraphical.add(m.el),(l=m==null?void 0:m.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(m.elGridBorders)),(c=e.waterfall)==null||c.drawConnectors(),(h=e.streamgraph)==null||h.draw(),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,m);const v=new Jt(this.w,this.ctx,m),y=new Oe(this.w,{theme:this.theme,timeScale:this.timeScale},m);if(m!==null&&(v.xAxisLabelCorrections(),y.setYAxisTextAlignments(),s.config.yaxis.map((w,S)=>{s.globals.ignoreYAxisIndexes.indexOf(S)===-1&&y.yAxisTitleRotate(S,w.opposite)})),(d=e.annotations)==null||d.drawAxesAnnotations(),!s.globals.noData){if(j.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&((u=e.w.globals.tooltip)==null||u.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.c
1825onfig.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((p=e.keyboardNavigation)==null||p.init()),j.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)&&((g=e.zoomPanSelection)==null||g.init({xyRatios:t.xyRatios}));else{const w=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(_=>{w[_]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((x=e.toolbar)==null||x.createToolbar())}(b=e.weave)==null||b.dispatch("draw",{pass:"full",xyRatios:t==null?void 0:t.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(w=>{w.method(w.params,!1,w.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),De(s,e),i(e)})}destroy(){var t,e;this.trellis&&this.trellis.teardown(),this._renderPromise=null,j.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),Cr(this.el.parentNode,this.parentResizeHandler),clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0),clearTimeout((e=this._parentResizeWaiter)!=null?e:void 0),this._parentResizeWaiter=null,window.removeEventListener("beforeprint",this.beforePrintHandler),window.removeEventListener("afterprint",this.afterPrintHandler));const s=this.w.config.chart.id;s&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((i,a)=>{i.id===O.escapeString(s)&&Apex._chartInstances.splice(a,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),ai(this),zl(this),new Qs(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const n=this.w;if(t&&"series"in t&&!Array.isArray(t.series)&&(console.warn("ApexCharts: updateOptions() ignored `series` because it is not an array."),t=K({},t),delete t.series),this.trellis&&this.trellis._mounted)return this.opts=O.extend(this.opts||{},t||{}),this.w.config=O.extend(n.config,t||{}),this.trellis.teardown(),this.render();if(n.interact.selection=void 0,this.lastUpdateOptions){if(O.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&!ct._optionsTooBigToCompare(t)&&O.stringifyForCompare(this.lastUpdateOptions.series)===O.stringifyForCompare(t.series)){const r=K({},t),o=K({},this.lastUpdateOptions);if(delete r.series,delete o.series,O.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 Array.isArray(t)?this.trellis&&this.trellis._mounted?this.trellis.updateSeries(t,e):(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)):(console.warn("ApexCharts: updateSeries() ignored the call because the series is not an array."),Promise.resolve(this))}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.globals.histogramRawSeries||s.w.globals.waterfallRawSeries||s.w.globals.dumbbellRawSeries||s.w.globals.streamgraphRawSeries;if(i){for(let n=0;n<i.length;n++){const r=t[n];if(r&&Array.isArray(r.data)&&Array.isArray(i[n].data))for(let o=0;o<r.data.length;o++)i[n].data.push(r.data[o])}return this.update()}const a=s.w.config.series.slice();for(let n=0;n<a.length;n++)if(t[n]!==null&&typeof t[n]!="undefined"){const r=t[n],o=a[n];for(let l=0;l<r.data.length;l++)o.data.push(r.data[l])}return Bo(a,s.w),s.w.config.series=a,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&&!ct._optionsTooBigToCompare(t)&&O.stringifyForCompare(this.lastUpdateOptions)===O.stringifyForCompare(t))return e(this);this.lastUpdateOptions=t&&!ct._optionsTooBigToCompare(t)?O.clone(t):null,new Qs(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,t!=null?t:{});if(!i)return e(this);this.mount(i).then(()=>{var a;(a=this.morphTypeChange)==null||a.applyChromeFade(),la(this.w),ua(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;
1825if(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"),u=h.querySelector(".apexcharts-grid-borders");if(!d)return this._fastAxisBailReason="missingGridNode",!1;const p=d.parentNode,g=u?u.nextSibling:d.nextSibling;d.remove(),u&&u.remove(),h.querySelectorAll(".apexcharts-xaxis-tick").forEach(v=>v.remove()),this.grid=new as(e,this);const x=this.grid.drawGrid();x&&x.el&&(p.insertBefore(x.el.node,g),x.elGridBorders&&x.elGridBorders.node&&p.insertBefore(x.elGridBorders.node,g));const b=new Jt(this.w,this.ctx,x),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 Oe(this.w,{theme:this.theme,timeScale:this.timeScale},x);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 S=y.nextSibling;y.remove();const _=A.drawYaxis(v);w.insertBefore(_.node,S)}return x!==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,o,l;try{const c=this.w,h=c.globals;h.shouldAnimate=t,h.dataChanged=!0,h.animationEnded=!1,fs.invalidateSelectors(c);const d=c.globals;d.maxY=-Number.MAX_VALUE,d.minY=Number.MIN_VALUE,d.minYArr=[],d.maxYArr=[],d.maxX=-Number.MAX_VALUE,d.minX=Number.MAX_VALUE,d.initialMaxX=-Number.MAX_VALUE,d.initialMinX=Number.MAX_VALUE,d.yAxisScale=[],d.xAxisScale=null,d.xAxisTicksPositions=[],d.xRange=0,d.yRange=[],d.zRange=0,d.xTickAmount=0,d.multiAxisTickAmount=0,d.pointsArray=[],d.barCanvasCoords=null,d.dataLabelsRects=[],d.lastDrawnDataLabelsIndexes=[],d.textRectsCache=new Map,d.domCache=new Map,d.cachedSelectors={},d.disableZoomIn=!1,d.disableZoomOut=!1,h.axisCharts&&(this.core.coreCalculations(),c.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();const u=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=u);const p=JSON.stringify({y:(h.yAxisScale||[]).map(M=>M?M.result:null),xMin:h.minX,xMax:h.maxX}),g=h.axisCharts&&e!=null&&p!==e;if(g&&!this._fastAxisChromeRefresh(u))return this._updateStats.full++,this.update().then(()=>s(this)).catch(i);g?this._updateStats.fastWithAxes++:this._updateStats.fast++,(a=this.weave)==null||a.dispatch("afterScales",{pass:"fast",xyRatios:u});const x=this.ctx.renderer,b=!!(x&&x.kind==="canvas"&&x.canRepaintInPlace&&x.canRepaintInPlace());b&&(x._repaintHostInPlace=!0);const m=c.dom.elGraphical.node;m.querySelectorAll((b?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(M=>{var C;return(C=M.parentNode)==null?void 0:C.removeChild(M)});const v=this.core.plotChartType(c.config.series,u),y=m.querySelector(".apexcharts-grid"),w=m.querySelector(".apexcharts-xaxis"),S=Array.isArray(v)?v:[v],_=y&&c.config.grid.position==="front"?y:w;
1825_?S.forEach(M=>{const C=M&&M.node?M.node:M;C&&m.insertBefore(C,_)}):S.forEach(M=>{c.dom.elGraphical.add(M)});const k=new Hs(c,this);k.bringForward(),c.config.dataLabels.background.enabled&&k.dataLabelsBackground(),(n=this.waterfall)==null||n.drawConnectors(),(r=this.streamgraph)==null||r.draw(),h.streamScrolled||la(c),ua(c),j.isBrowser()&&c.config.tooltip.enabled&&!h.noData&&((o=c.globals.tooltip)==null||o.drawTooltip(u)),(l=this.weave)==null||l.dispatch("draw",{pass:"fast",xyRatios:u}),typeof c.config.chart.events.updated=="function"&&c.config.chart.events.updated(this,c),this.events.fireEvent("updated",[this,c]),De(c,this),h.isDirty=!0,s(this)}catch(c){i(c)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}getPanels(){return this.trellis?this.trellis.getPanels():[]}getPanel(t){return this.trellis?this.trellis.getPanel(t):null}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=O.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static trellis(t,e){if(!le._featureRegistry.get("trellis"))return console.warn("ApexCharts.trellis requires the trellis feature, which is not in the default bundle. Bundler: import 'apexcharts/features/trellis'. Script tag: add <script src='.../dist/features/trellis.js'> after apexcharts.js."),null;const s=new ct(t,e);return s.render(),s}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 ct(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 O.extend(t,e)}static getThemePalettes(){return rs()}static use(t){Us(t)}static registerFeatures(t){le.registerFeatures(t)}static setLicense(t){return $t.setLicense(t),ni(),ct}static registerPlugin(t){return Xl(t),ct}static unregisterPlugin(t){return Il(t),ct}static registerRenderer(t,e){ur.registerRenderer(t,e)}static registerSeriesType(t,e){const s=ct._customSeriesFactory;return s?!e||typeof e.renderItem!="function"?(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),ct):rl(t)&&!Ot(t)||Si[t]?(console.warn(`[apexcharts] registerSeriesType("${t}
1825") would override the built-in "${t}" chart type; pick another name.`),ct):(Us({[t]:s(t,e)}),nl(t),ct):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),ct)}static unregisterSeriesType(t){return Ot(t)&&ol(t),ct}static registerTheme(t,e){return Jo(t,e),ct}static unregisterTheme(t){return tl(t),ct}static registerEasing(t,e){return Fo(t,e),ct}static registerUnitLayout(t,e){return Ll(t,e),ct}static unregisterUnitLayout(t){return Dl(t),ct}static registerUnitMark(t,e){return El(t,e),ct}static unregisterUnitMark(t){return Pl(t),ct}static registerRowSource(t,e){return Rl(t,e),ct}static unregisterRowSource(t){return Fl(t),ct}rowSeries(t){const e=Ol(this.w);return e&&e(this.w,t)||null}static crossfilter(t){if(!t||typeof t.id!="string")throw new Error("ApexCharts.crossfilter requires an { id } string.");const e=ct._crossfilterFactory;if(!e)return console.warn("[apexcharts] ApexCharts.crossfilter(...) requires the link feature, which is not in the default bundle. Bundler: import 'apexcharts/features/link'. Script tag: add <script src='.../dist/features/link.js'> after apexcharts.js."),null;const s=e(t);return ni(),s}static getCrossfilter(t){const e=ct._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 ns(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new ns(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)}
1825dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.dataURI(t):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.trellis&&this.trellis._mounted?this.trellis.exports.svgString():this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.download("csv"):this.ctx.exports.exportToCSV(t)}promotePanel(t){return this.trellis&&this.trellis._mounted?this.trellis.promote(t):Promise.resolve()}restorePanels(){return this.trellis&&this.trellis._mounted?this.trellis.restorePromotion():Promise.resolve()}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()}clearDrilldownCache(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.clearCache(t)}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){ct._writeDataProps(this.w.seriesData,t)}_writeParsedRangeData(t){ct._writeDataProps(this.w.rangeData,t)}_writeParsedCandleData(t){ct._writeDataProps(this.w.candleData,t)}_writeParsedLabelData(t){ct._writeDataProps(this.w.labelData,t)}_writeParsedAxisFlags(t){ct._writeDataProps(this.w.axisFlags,t)}_writeLayoutCoords(t){ct._writeDataProps(this.w.layout,t)}_parentResizeCallback(){if(this.w.config.chart.redrawOnParentResize){if(!this.w.globals.animationEnded){this._deferParentResize();return}this._windowResize()}}_deferParentResize(){var t;if(this._parentResizeWaiter)return;const e=Date.now(),s=((t=this.w.config.chart.animations)==null?void 0:t.speed)||800,i=Math.min(Math.max(1e3+s*2,1500),15e3),a=()=>{if(this._parentResizeWaiter=null,!(this.w.globals.isDestroyed||!O.elementExists(this.el))){if(this.w.globals.animationEnded||Date.now()-e>=i){this._windowResize();return}this._parentResizeWaiter=window.setTimeout(a,100)}};this._parentResizeWaiter=window.setTimeout(a,100)}_printEnabled(){const t=this.w.config.chart.print;return t!==!1&&(t==null?void 0:t.enabled)!==!1}_beforePrint(){var t,e,s,i,a,n;if(this._printRestore||!this._printEnabled())return;const r=this.w,o=(e=(t=r.config.chart.print)==null?void 0:t.width)!=null?e:700;this._printRestore={width:r.config.chart.width},typeof o=="number"&&o>0&&r.globals.svgWidth>o&&this.updateHelpers._updateOptions({chart:{width:o}},!1,!1,!1,!1);const l=(i=(s=r.dom)==null?void 0:s.Paper)==null?void 0:i.node;if(l&&!l.getAttribute("viewBox")){l.setAttribute("viewBox",`0 0 ${r.globals.svgWidth} ${r.globals.svgHeight}`),this._printRestore.viewBoxAdded=!0,(n=(a=r.dom)==null?void 0:a.elWrap)==null||n.classList.add("apexcharts-printing");const c=this.el;c&&c.style&&(this._printRestore.minHeight=c.style.minHeight,c.style.minHeight="0")}}_afterPrint(){var t,e,s,i,a,n,r;if(!this._printRestore)return;const o=this.w,l=this._printRestore;if(this._printRestore=null,l.viewBoxAdded){(s=(e=(t=o.dom)==null?void 0:t.Paper)==null?void 0:e.node)==null||s.removeAttribute("viewBox"),(a=(i=o.dom)==null?void 0:i.elWrap)==null||a.classList.remove("apexcharts-printing");const c=this.el;c&&c.style&&(c.style.minHeight=(n=l.minHeight)!=null?n:"")}o.config.chart.width!==l.width&&(this.updateHelpers._updateOptions({chart:{width:l.width}}
1825,!1,!1,!1,!1),clearTimeout((r=o.globals.resizeTimer)!=null?r:void 0))}_windowResize(){var t;clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0),this.w.globals.resizeTimer=window.setTimeout(()=>{const e=this.w.globals;if(this.core&&e.lastResizeSignature){const s=this.core.getResizeSignature();if(s.w===e.lastResizeSignature.w&&s.h===e.lastResizeSignature.h&&s.iw===e.lastResizeSignature.iw)return}e.resized=!0,e.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()}};st(Mr,"perspectives",null);let pt=Mr;var ql=Object.defineProperty,jl=Object.defineProperties,Zl=Object.getOwnPropertyDescriptors,Sa=Object.getOwnPropertySymbols,Kl=Object.prototype.hasOwnProperty,Jl=Object.prototype.propertyIsEnumerable,_a=(f,t,e)=>t in f?ql(f,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):f[t]=e,Z=(f,t)=>{for(var e in t||(t={}))Kl.call(t,e)&&_a(f,e,t[e]);if(Sa)for(var e of Sa(t))Jl.call(t,e)&&_a(f,e,t[e]);return f},it=(f,t)=>jl(f,Zl(t)),Ql=(f,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(f,t)).next())});const Lr=Tn,ge=us,Oi=Dn,tc=zs,Xi=Ln,Zt=is,ec=mn,sc=Us,ic=ut,ac=Ot,nc=sr,Dt=St,rc=os,Dr=Pi,xe=Hs,oc=Pn,kt=ki,Ct=At,lc=me,G=tt,ms=Fe,cc=ns,hc=Xn,Tr=En,gt=Qt,dc=qn,uc=er,fc=jn,pc=Fn,Ii=Kt,gc=as,xc=Jt,mc=Oe,ri=Ti,bc=Qn,yc=Zn,wc=Kn,vc=Jn,Ac=Qs,Sc=le,_c=Rn,Cc=nr,kc=fe,Mc=zt,Lc=Ci,Er=Yt,Dc=hr,Tc=cr,Ec=or,Pc=lr,Rc=Ri,Fc=dr,Oc=Lt,U=Q,Xc=pn,Ic=Ys,Nc=fn,ls=Pe,Bc=vn,Yc=Re,oi=wn,zc=_n,$c=kn,Hc=xs,Wc=yr,Gc=mt,Vc=xr,Uc=mr,qc=br,jc=fr,Zc=pr,Kc=wr,Jc=Xe,Pr=yn,li=ht,Qc=Mt,th=je,eh=yn,sh=ts,ih=_i,ah=es,nh=yt,lt=j,rh=fs,oh=_r,lh=Cr,ch=rs,z=O,hh=Object.freeze(Object.defineProperty({__proto__:null,__apex_Animations:ge,__apex_Animations_applyAnimationPolicy:tc,__apex_Animations_applyProgressiveReveal:Zt,__apex_Animations_computeStagger:Oi,__apex_Animations_prefersReducedMotion:Xi,__apex_Base:ec,__apex_BrowserAPIs_BrowserAPIs:U,__apex_ChartFactory_getChartClass:ic,__apex_ChartFactory_isCustom:ac,__apex_ChartFactory_register:sc,__apex_Config:kc,__apex_Constants_LINE_HEIGHT_RATIO:sh,__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD:ih,__apex_Constants_NICE_SCALE_DEFAULT_TICKS:ah,__apex_Core:nc,__apex_CoreUtils:Dt,__apex_Crosshairs:rc,__apex_DOMShim_SSRClassList:Nc,__apex_DOMShim_SSRDOMShim:Xc,__apex_DOMShim_SSRElement:Ic,__apex_Data:Dr,__apex_DataLabels:xe,__apex_DateTime:nh,__apex_Defaults:Mc,__apex_Environment_Environment:lt,__apex_Events:oc,__apex_Fill:kt,__apex_Filters:Ct,__apex_Formatters:lc,__apex_Globals:Lc,__apex_Graphics:G,__apex_Markers:ms,__apex_Options:Er,__apex_PathMorphing_arrayToPath:oi,__apex_PathMorphing_morphPaths:Bc,__apex_PathMorphing_parsePath:ls,__apex_PathMorphing_pathBbox:Yc,__apex_PerformanceCache:rh,__apex_Range:cc,__apex_Resize_addResizeListener:oh,__apex_Resize_removeResizeListener:lh,__apex_Responsive:hc,__apex_SVGAnimation_SVGAnimationRunner:zc,__apex_SVGAnimation_installAnimationMethods:$c,__apex_SVGContainer:Hc,__apex_SVGDraggable_installDraggable:Wc,__apex_SVGElement:Gc,__apex_SVGFilter_FilterBuilder:Uc,__apex_SVGFilter_SVGFilter:Vc,__apex_SVGFilter_installFilterMethods:qc,__apex_SVGGradient_SVGGradient:jc,__apex_SVGPattern_SVGPattern:Zc,__apex_SVGSelectable_installSelectable:Kc,__apex_Scales:Tr,__apex_Series:gt,__apex_Theme:dc,__apex_ThemePalettes_getThemePalettes:ch,__apex_TimeScale:uc,__apex_TitleSubtitle:fc,__apex_Utils:z,__apex_axes_Axes:pc,__apex_axes_AxesUtils:Ii,__apex_axes_Grid:gc,__apex_axes_XAxis:xc,__apex_axes_YAxis:mc,__apex_charts_Scatter:Lr,__apex_dimensions_Dimensions:ri,__apex_dimensions_Grid:bc,__apex_dimensions_Helpers:yc,__apex_dimensions_XAxis:wc,__apex_dimensions_YAxis:vc,__apex_helpers_Destroy:Ac,__apex_helpers_InitCtxVariables:Sc,__apex_helpers_Localization:_c,__apex_helpers_UpdateHelpers:Cc,__apex_index_Box:Pr,__apex_index_SVG:Jc,__apex_math_Box:eh,__apex_math_Matrix:th,__apex_math_Point:Qc,__apex_math_SVGNS:li,__apex_tooltip_AxesTooltip:Dc,__apex_tooltip_Intersect:Tc,__apex_tooltip_Labels:Ec,__apex_tooltip_Marker:Pc,__apex_tooltip_Position:Rc,__apex_tooltip_Tooltip:Fc,__apex_tooltip_Utils:Oc,default:pt},Symbol.toStringTag,{value:"Module"}));class Rr{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(c){continue}const o=a[n],l=document.createElementNS(li,"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)}}queryStyleable(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))}setStyleDefaults(t,e){Object.keys(e).forEach(s=>{t.style.getPropertyValue(s)===""&&t.style.setProperty(s,e[s])})}applyExportStyles(t){const e=this.w;this.queryStyleable(t,"style").forEach(s=>s.remove()),this.queryStyleable(t,[".apexcharts-tooltip",".apexcharts-toolbar",".apexcharts-xaxistooltip",".apexcharts-yaxistooltip",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs",".apexcharts-zoom-rect",".apexcharts-selection-rect"].join(", ")).forEac
1825h(s=>{s.style.setProperty("display","none","important")}),this.queryStyleable(t,".apexcharts-flip-y").forEach(s=>{this.setStyleDefaults(s,{transform:"scaleY(-1) translateY(-100%)","transform-origin":"top","transform-box":"fill-box"})}),this.queryStyleable(t,".apexcharts-flip-x").forEach(s=>{this.setStyleDefaults(s,{transform:"scaleX(-1)","transform-origin":"center","transform-box":"fill-box"})}),!(!e.config.legend.show||!e.dom.elLegendWrap||!e.dom.elLegendWrap.children.length)&&(this.queryStyleable(t,".apexcharts-legend").forEach(s=>{this.setStyleDefaults(s,{display:"flex",overflow:"auto",padding:"0 10px"});const i=s.classList,a=i.contains("apx-legend-position-left")||i.contains("apx-legend-position-right"),n=i.contains("apx-legend-position-top")||i.contains("apx-legend-position-bottom");i.contains("apexcharts-legend-group-horizontal")&&this.setStyleDefaults(s,{"flex-direction":"column"}),a&&this.setStyleDefaults(s,{"flex-direction":"column",bottom:"0"}),n&&this.setStyleDefaults(s,{"flex-wrap":"wrap"}),a||n&&i.contains("apexcharts-align-left")?this.setStyleDefaults(s,{"justify-content":"flex-start","align-items":"flex-start"}):n&&i.contains("apexcharts-align-center")?this.setStyleDefaults(s,{"justify-content":"center","align-items":"center"}):n&&i.contains("apexcharts-align-right")&&this.setStyleDefaults(s,{"justify-content":"flex-end","align-items":"flex-end"})}),this.queryStyleable(t,".apexcharts-legend-group").forEach(s=>{this.setStyleDefaults(s,{display:"flex"})}),this.queryStyleable(t,".apexcharts-legend-group-vertical").forEach(s=>{this.setStyleDefaults(s,{"flex-direction":"column-reverse"})}),this.queryStyleable(t,".apexcharts-legend-series").forEach(s=>{this.setStyleDefaults(s,{cursor:s.classList.contains("apexcharts-no-click")?"auto":"pointer","line-height":"normal",display:"flex","align-items":"center"})}),this.queryStyleable(t,".apexcharts-legend-text").forEach(s=>{this.setStyleDefaults(s,{position:"relative","font-size":"14px"})}),this.queryStyleable(t,".apexcharts-legend-marker").forEach(s=>{this.setStyleDefaults(s,{position:"relative",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","margin-right":"1px"})}),this.queryStyleable(t,".apexcharts-inactive-legend").forEach(s=>{this.setStyleDefaults(s,{opacity:"0.45"})}),this.queryStyleable(t,".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series").forEach(s=>{s.style.setProperty("display","none","important")}))}resolveExportBackground(){const t=this.w,e=t.config.chart.background;return e&&e!=="transparent"?e:t.config.theme.mode==="dark"?"#343A3F":"#fff"}collectFontFamilies(){const t=new Set,e=this.w;if(!lt.isBrowser()||!e.dom.elWrap)return t;const s=this.queryStyleable(e.dom.elWrap,"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text");return[e.dom.elWrap,...s].forEach(a=>{const n=U.getComputedStyle(a),r=n&&n.fontFamily;r&&r.split(",").forEach(o=>{const l=o.trim().replace(/^['"]|['"]$/g,"");l&&t.add(l.toLowerCase())})}),t}collectFontFaceRules(){if(!lt.isBrowser())return Promise.resolve([]);const t=[],e=[],s=a=>{(a.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach(r=>{const o=r.match(/font-family\s*:\s*([^;}]+)/i);if(!o)return;const l=o[1].trim().replace(/^['"]|['"]$/g,"");t.push({family:l.toLowerCase(),css:r})})};return Array.from(document.styleSheets||[]).forEach(a=>{let n=null;try{n=a.cssRules}catch(r){n=null}if(n){Array.from(n).forEach(r=>{r.type===5&&r.cssText&&s(r.cssText)});return}a.href&&e.push(fetch(a.href).then(r=>r.ok?r.text():"").then(s).catch(()=>{}))}),Promise.all(e).then(()=>t)}embedFonts(t){const e=this.w;if(!lt.isBrowser()||!e.config.chart.toolbar.export.embedFonts||typeof fetch!="function")return Promise.resolve();const s=this.collectFontFamilies();return s.size?this.collectFontFaceRules().then(i=>{const a=i.filter(n=>s.has(n.family));return a.length?Promise.all(a.map(n=>this.inlineFontFaceUrls(n.css).catch(()=>null))):Promise.resolve([])}).then(i=>{const a=(i||[]).filter(Boolean).join(` 1826`);if(!a)return;const n=document.createElementNS(li,"style");n.textContent=a,t.insertBefore(n,t.firstChild)}).catch(()=>{}):Promise.resolve()}inlineFontFaceUrls(t){const e=[],s=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi;let i;for(;(i=s.exec(t))!==null;)i[2].startsWith("data:")||e.push(i[2]);return e.length?Promise.all(e.map(a=>this.fetchAsDataUri(a).then(n=>({url:a,dataUri:n})).catch(()=>({url:a,dataUri:null})))).then(a=>{let n=t,r=0;return a.forEach(({url:o,dataUri:l})=>{l&&(n=n.split(o).join(l),r++)}),r?n:null}):Promise.resolve(t.includes("data:")?t:null)}fetchAsDataUri(t){return typeof fetch!="function"||typeof btoa!="function"?Promise.reject(new Error("fetch unavailable")):fetch(t).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);const s=e.headers.get("content-type")||"application/octet-stream";return e.arrayBuffer().then(i=>{const a=new Uint8Array(i);let n="";const r=32768;for(let o=0;o<a.length;o+=r)n+=String.fromCharCode.apply(null,a.subarray(o,o+r));return`data:${s};base64,${btoa(n)}`})})}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),this.applyExportStyles(r);const o=new XMLSerializer().serializeToString(r);let l=` 1827 <svg xmlns="http://www.w3.org/2000/svg" 1828 version="1.1" 1829 xmlns:xlink="http://www.w3.org/1999/xlink" 1830 class="apexcharts-svg" 1831 xmlns:data="ApexChartsNS" 1832 transform="translate(0, 0)" 1833 width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px"> 1834 <foreignObject width="100%" height="100%"> 1835 <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${n}px;"> 1836 ${o} 1837 </div> 1838 </foreignObject> 1839 </svg> 1840 `;const c=this.svgStringToNode(l);i!==1&&this.scaleSvgNode(c,i),Promise.all([this.convertImagesToBase64(c),this.embedFonts(c)]).then(()=>{l=new XMLSerializer().serializeToString(c),e(l.replace(/ /g," "))})})}convertImagesToBase64(t){const e="http://www.w3.org/1999/xlink",s=t.getElementsByTagName("image"),i=Array.from(s).map(a=>{const n=a.getAttributeNS(e,"href"),r=a.getAttribute("href"),o=n||r;if(!o||o.startsWith("data:"))return Promise.resolve();const l=c=>{n&&a.setAttributeNS(e,"href",c),(r||!n)&&a.setAttribute("href",c)};return this.fetchAsDataUri(o).then(l).catch(()=>this.getBase64FromUrl(o).then(l).catch(c=>{console.error("Error converting image to base64:",c)}))});return Promise.all(i)}getBase64FromUrl(t){return lt.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=>
1840{this.getSvgString().then(e=>{const s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return lt.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=this.resolveExportBackground(),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=` 1841`}){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||z.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():z.isNumber(y)?y:h(y.split(s).join("")),u=y=>typeof a.config.chart.toolbar.export.csv.valueFormatter=="function"?a.config.chart.toolbar.export.csv.valueFormatter(y):h(y),p=Math.max(...t.map(y=>y.data?y.data.length:0)),g=new Dr(this.w),x=new Ii(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 S=a.formatters.yLabelFormatters[0],k=new gt(this.ctx.w).getActiveConfigSeriesIndex();w=S(a.labelData.labels[y],{seriesIndex:k,dataPointIndex:y,w:a})}else w=x.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(" ")),z.isNumber(w)?w:w.split(s).join(""))},m=()=>[...Array(p)].map(()=>""),A=(y,w)=>{var S,_,k,M,C,L;if(n.length&&w===0&&r.push(n.join(s)),y.data){const T=y.data.length?y.data:m();for(let D=0;D<T.length;D++){n=[];let E=b(D);if(E!=="nullvalue"){if(E||(g.isFormatXY()?E=t[w].data[D].x:g.isFormat2DArray()&&(E=t[w].data[D]?t[w].data[D][0]:"")),w===0){n.push(d(E));for(let R=0;R<a.seriesData.series.length;R++){const P=g.isFormatXY()?(S=t[R].data[D])==null?void 0:S.y:c[R][D];n.push(u(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((_=a.violinData.seriesViolinMin[w])==null?void 0:_[D]),n.push((k=a.violinData.seriesViolinMax[w])==null?void 0:k[D]),n.push((L=(C=(M=a.violinData.seriesViolinPoints[w])==null?void 0:M[D])==null?void 0:C.length)!=null?L:0)),n.length&&r.push(n.join(s))}}}},v=()=>{const y=new Set,w={};t.forEach((S,_)=>{S==null||S.data.forEach(k=>{let M,C;
1841if(g.isFormatXY())M=k.x,C=k.y;else if(g.isFormat2DArray())M=k[0],C=k[1];else return;w[M]||(w[M]=Array(t.length).fill("")),w[M][_]=u(C),y.add(M)})}),n.length&&r.push(n.join(s)),Array.from(y).sort().forEach(S=>{const _=w[S];r.push([d(S),..._].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 S=(y.name?y.name:`series-${w}`)+"";a.globals.axisCharts&&n.push(S.split(s).join("")?S.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(u(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(lt.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)}}pt.registerFeatures({exports:Rr});const dh=`.apexcharts-flip-y { 1842 transform: scaleY(-1) translateY(-100%); 1843 transform-origin: top; 1844 transform-box: fill-box; 1845} 1846.apexcharts-flip-x { 1847 transform: scaleX(-1); 1848 transform-origin: center; 1849 transform-box: fill-box; 1850} 1851.apexcharts-legend { 1852 display: flex; 1853 overflow: auto; 1854 padding: 0 10px; 1855} 1856.apexcharts-legend.apexcharts-legend-group-horizontal { 1857 flex-direction: column; 1858} 1859.apexcharts-legend-group { 1860 display: flex; 1861} 1862.apexcharts-legend-group-vertical { 1863 flex-direction: column-reverse; 1864} 1865.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { 1866 flex-wrap: wrap 1867} 1868.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 1869 flex-direction: column; 1870 bottom: 0; 1871} 1872.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 { 1873 justify-content: flex-start; 1874 align-items: flex-start; 1875} 1876.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { 1877 justify-content: center; 1878 align-items: center; 1879} 1880.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { 1881 justify-content: flex-end; 1882 align-items: flex-end; 1883} 1884.apexcharts-legend-series { 1885 cursor: pointer; 1886 line-height: normal; 1887 display: flex; 1888 align-items: center; 1889} 1890.apexcharts-legend-text { 1891 position: relative; 1892 font-size: 14px; 1893} 1894.apexcharts-legend-text *, .apexcharts-legend-marker * { 1895 pointer-events: none; 1896} 1897.apexcharts-legend-marker { 1898 position: relative; 1899 display: flex; 1900 align-items: center; 1901 justify-content: center; 1902 cursor: pointer; 1903 margin-right: 1px; 1904} 1905 1906.apexcharts-legend-series.apexcharts-no-click { 1907 cursor: auto; 1908} 1909.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { 1910 display: none !important; 1911} 1912.apexcharts-inactive-legend { 1913 opacity: 0.45; 1914} `;let uh=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(lt.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(dh);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}
1914].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],u=c?"hidden":"visible";l.setAttribute("aria-label",`${d}, ${u}. 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=z.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);a.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 l=0;l<a.length;l++)a[l].classList.contains("apexcharts-series-markers-wrap")&&(a[l].classList.contains("apexcharts-hide")?a[l].classList.remove("apexcharts-hide"):a[l].classList.add("apexcharts-hide"));const n=s.config.chart.animations.dynamicAnimation.enabled;n&&(s.globals.collapsingSeriesIndices=[e]);const r=()=>{s.globals.collapsingSeriesIndices=[]},o=this.lgCtx.updateSeries(i,n);r(),o&&typeof o.then=="function"&&o.then(r,r)}riseCollapsedSeries(t,e,s){const i=this.w;let a=z.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 fh=["#cf4d3f","#8f9499","#26a75b"],ue=(f,t,e)=>f+(t-f)*e;function Es(f){return Math.max(0,Math.min(255,Math.round(f))).toString(16).padStart(2,"0")}function ph(f,t,e){const s=z.parseHex(Ie(f)),i=z.parseHex(Ie(t));
1914return!s||!i?f:"#"+Es(ue(s[0],i[0],e))+Es(ue(s[1],i[1],e))+Es(ue(s[2],i[2],e))}function Ie(f){return typeof f!="string"?"#000000":z.isColorHex(f)?f:z.rgb2hex(f)||"#000000"}function Fr(f,t,e){const s=f.config.series[t],i=s&&Array.isArray(s.data)?s.data[e]:null;return Or(f,i,t,e)}function Or(f,t,e,s){var i,a,n;if(!t||typeof t!="object")return null;const r=(n=(a=(i=f.config.plotOptions)==null?void 0:i.treemap)==null?void 0:a.colorScale)==null?void 0:n.colorValue;let o;if(typeof r=="function"?o=r(t,{seriesIndex:e,dataPointIndex:s,w:f}):typeof r=="string"?o=t[r]:o=t.colorValue,o==null)return null;const l=Number(o);return Number.isFinite(l)?l:null}function gh(f,t,e,s){if(Array.isArray(f.stops)&&f.stops.length>=2)return f.stops.filter(n=>n&&Number.isFinite(Number(n.value))).map(n=>({value:Number(n.value),color:Ie(n.color)})).sort((n,r)=>n.value-r.value);const i=(Array.isArray(f.colors)&&f.colors.length>=2?f.colors:fh).map(Ie),a=i.length;if(s!=null&&a>=3){const n=Math.floor((a-1)/2),r=[];for(let o=0;o<=n;o++)r.push({value:ue(t,s,o/n),color:i[o]});for(let o=n+1;o<a;o++)r.push({value:ue(s,e,(o-n)/(a-1-n)),color:i[o]});return r}return i.map((n,r)=>({value:ue(t,e,r/(a-1)),color:n}))}function Xr(f){var t,e,s;const i=(s=(e=(t=f.config)==null?void 0:t.plotOptions)==null?void 0:e.treemap)==null?void 0:s.colorScale,a=i&&i.gradient;if(!a||a.enabled===!1)return null;const n=f.config.series||[];let r=1/0,o=-1/0,l=!1;for(let b=0;b<n.length;b++){const m=n[b]&&n[b].data;if(Array.isArray(m))for(let A=0;A<m.length;A++){const v=Or(f,m[A],b,A);v!=null&&(l=!0,v<r&&(r=v),v>o&&(o=v))}}if(!l&&a.enabled!==!0)return null;Number.isFinite(r)||(r=0,o=0);let c=Number.isFinite(Number(a.min))?Number(a.min):r,h=Number.isFinite(Number(a.max))?Number(a.max):o,d=null;if(a.midpoint===null?d=null:Number.isFinite(Number(a.midpoint))?d=Number(a.midpoint):c<0&&h>0&&(d=0),d!=null&&a.symmetric!==!1&&!Number.isFinite(Number(a.min))&&!Number.isFinite(Number(a.max))){const b=Math.max(Math.abs(c-d),Math.abs(h-d));c=d-b,h=d+b}h===c&&(c-=.5,h+=.5);const u=gh(a,c,h,d);if(u.length<2)return null;const p=b=>{if(!Number.isFinite(b))return u[Math.floor(u.length/2)].color;if(b<=u[0].value)return u[0].color;const m=u[u.length-1];if(b>=m.value)return m.color;for(let A=1;A<u.length;A++){const v=u[A];if(b<=v.value){const y=u[A-1],w=v.value-y.value,S=w===0?0:(b-y.value)/w;return ph(y.color,v.color,S)}}return m.color},g=h-c,x=u.map(b=>({percent:g===0?0:(b.value-c)/g,color:b.color}));return{min:c,max:h,midpoint:d,stops:u,at:p,legendStops:x}}function Ca(f){const t=Ie(f);return z.getContrastRatio(t,"#ffffff")>=z.getContrastRatio(t,"#000000")?"#ffffff":"#000000"}const It="http://www.w3.org/2000/svg";class Tt{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._targetEl=null,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._cfg();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 colorScaleOf(t){var e,s,i,a,n;const r=(s=(e=t==null?void 0:t.config)==null?void 0:e.chart)==null?void 0:s.type;return r&&((n=(a=(i=t==null?void 0:t.config)==null?void 0:i.plotOptions)==null?void 0:a[r])==null?void 0:n.colorScale)||null}static configFor(t){const e=Tt.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return Tt.configFor(this.w)||{}}static isEnabled(t){if(!Tt.supports(t))return!1;const e=Tt.configFor(t);return!!(e&&e.enabled)}static supports(t){var e,s;const i=(s=(e=t==null?void 0:t.config)==null?void 0:e.chart)==null?void 0:s.type;return i==="heatmap"||i==="treemap"}draw(t=null){var e,s,i,a,n,r,o,l;const c=this.w;this._targetEl=t;const h=t||c.dom.elLegendWrap;if(!h)return;const d=this._cfg(),u=c.config.legend.position,p=u==="left"||u==="right",g=(s=(e=d.arrow)==null?void 0:e.size)!=null?s:8,x=g+4,b=d.showLabels?28:4,m=d.showLabels?20:4,A=d.showLabels?44:0,v=this._resolveStripLength(p?d.height:d.width,p),y=d.thickness,w=p?Math.max(y+x+4,A):v+b*2,S=p?v+m*2:y+x+4,_=y+x,k=(w-_)/2,M=p?u==="left"?k:k+x:b,C=p?m:u==="top"?x:4,L=U.createElementNS(It,"svg");L.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),L.setAttribute("width",String(w)),L.setAttribute("height",String(S)),L.setAttribute("overflow","visible");const T=U.createElementNS(It,"defs"),D=`apexcharts-heatmap-gradient-${c.globals.cuid}`,E=U.createElementNS(It,"linearGradient");E.setAttribute("id",D),p?(E.setAttribute("x1","0"),E.setAttribute("y1","1"),E.setAttribute("x2","0"),E.setAttribute("y2","0")):(E.setAttribute("x1","0"),E.setAttribute("y1","0"),E.setAttribute("x2","1"),E.setAttribute("y2","0"));const{min:R,max:P,stops:F,bands:I}=this._computeStops();this._min=R,this._max=P,F.forEach(X=>{const W=U.createElementNS(It,"stop");W.setAttribute("offset",`${(X.percent*100).toFixed(2)}%`),W.setAttribute("stop-color",X.color),E.appendChild(W)}),T.appendChild(E),L.appendChild(T);const B=U.createElementNS(It,"rect");if(B.setAttribute("x",String(M)),B.setAttribute("y",String(C)),B.setAttribute("width",String(p?y:v)),B.setAttribute("height",String(p?v:y)),B.setAttribute("rx","2"),B.setAttribute("fill",`url(#${D})`),L.appendChild(B),d.showLabels){const X=((i=d.labelStyle)==null?void 0:i.colors)||(Array.isArray(c.config.legend.labels.colors)?c.config.legend.labels.colors[0]:c.config.legend.labels.colors)||c.config.chart.foreColor,W=((a=d.labelStyle)==null?void 0:a.fontSize)||"11px",N=((n=d.labelStyle)==null?void 0:n.fontFamily)||c.config.chart.fontFamily,H=this._getFormatter(),q=(V,J,et,at)=>{const nt=U.createElementNS(It,"text");return nt.setAttribute("x",String(J)),nt.setAttribute("y",String(et)),nt.setAttribute("text-anchor",at),nt.setAttribute("dominant-baseline","middle"),nt.setAttribute("fill",X),nt.setAttribute("font-size",W),N&&nt.setAttribute("font-family",N),nt.textContent=String(V),nt};if(p){const V=M+y/2;L.appendChild(q(H(R),V,C+v+10,"middle")),L.appendChild(q(H(P),V,C-10,"middle"))}else{const V=C+y/2;L.appendChild(q(H(R),M-6,V,"end")),L.appendChild(q(H(P),M+v+6,V,"start"))}}
1914const Y=((r=d.arrow)==null?void 0:r.color)||c.config.chart.foreColor,$=this._buildArrow(g,Y,u);if(L.appendChild($),this.arrowEl=$,this._bandHitEls=[],c.config.legend.onItemHover.highlightDataSeries&&I.length>0&&I.forEach(X=>{const W=U.createElementNS(It,"rect");if(p){const N=C+v-X.p2*v,H=C+v-X.p1*v;W.setAttribute("x",String(M)),W.setAttribute("y",String(N)),W.setAttribute("width",String(y)),W.setAttribute("height",String(Math.max(0,H-N)))}else W.setAttribute("x",String(M+X.p1*v)),W.setAttribute("y",String(C)),W.setAttribute("width",String(Math.max(0,(X.p2-X.p1)*v))),W.setAttribute("height",String(y));W.setAttribute("fill","transparent"),W.setAttribute("class","apexcharts-heatmap-gradient-band"),W.setAttribute("data:range-index",String(X.index)),W.style.cursor="pointer",L.appendChild(W),this._bandHitEls.push(W)}),this._geom={isVertical:p,position:u,stripX:M,stripY:C,stripLength:v,stripThickness:y,arrowSize:g,svgWidth:w,svgHeight:S},d.showHoverValue){const X=U.createElement("div");X.classList.add("apexcharts-heatmap-gradient-legend-value"),X.style.position="absolute",X.style.fontSize=((o=d.labelStyle)==null?void 0:o.fontSize)||"11px",X.style.fontFamily=((l=d.labelStyle)==null?void 0:l.fontFamily)||c.config.chart.fontFamily||"",X.style.color=c.config.chart.foreColor,X.style.background="rgba(0,0,0,0.65)",X.style.color="#fff",X.style.padding="2px 6px",X.style.borderRadius="3px",X.style.pointerEvents="none",X.style.whiteSpace="nowrap",X.style.opacity="0",X.style.transition="opacity 120ms ease",this.hoverValueEl=X}h.classList.add("apexcharts-heatmap-gradient-legend-wrap"),h.classList.add("apx-legend-position-"+u),h.appendChild(L),this.hoverValueEl&&h.appendChild(this.hoverValueEl),this.svgEl=L,t?(h.style.width=w+"px",h.style.height=S+"px",h.style.position="relative",h.style.overflow="visible"):this._applyWrapAlignment(h,u,p,w,S),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=this._cfg().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,u=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 p=h-a-l*2;let g;o==="start"?g=l:o==="end"?g=l+Math.max(0,p):g=l+Math.max(0,p)/2,t.style.top=g+u+"px",e==="left"?t.style.left=l+d+"px":t.style.left=c-i-l+d+"px"}else{const p=c-i-l*2;let g;o==="start"?g=l:o==="end"?g=l+Math.max(0,p):g=l+Math.max(0,p)/2,t.style.left=g+d+"px",e==="top"?t.style.top=l+u+"px":t.style.top=h-a-l+u+"px"}}repositionToPlot(){var t,e;if(!lt.isBrowser()||this._targetEl)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,u=this._cfg().align||"center",p=s.config.legend.offsetX||0,g=s.config.legend.offsetY||0,x=(e=(t=this.ctx)==null?void 0:t.dimensions)==null?void 0:e.dimHelpers,b=x?x.getTitleSubtitleCoords("title").height+x.getTitleSubtitleCoords("subtitle").height:0,m=s.layout.xAxisHeight||0,A=(v,y)=>{const w=Math.max(0,v-y);return u==="start"?0:u==="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+p+"px"}else{a.style.left=i.translateX+A(i.gridWidth,o)+p+"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"}U.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;
1914if(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(o){}}_attachBandHoverListeners(){if(lt.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 gt(n).highlightRangeInSeries(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,new gt(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;lt.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,i;const a=this.w;if(!this.arrowEl)return;const n=t[t.length-1];if(!n||typeof n!="object")return;const r=n.seriesIndex,o=n.dataPointIndex;if(typeof r!="number"||typeof o!="number"||!Tt.supports(a))return;let l;this._continuous?l=Fr(a,r,o):l=(i=(s=(e=a.seriesData)==null?void 0:e.series)==null?void 0:s[r])==null?void 0:i[o],!(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 u=a+n-d*n;let p,g;s==="left"?(p=i+r,g=p+o):(p=i,g=p-o);const x=[`${p},${u}`,`${g},${u-o/2}`,`${g},${u+o/2}`].join(" ");this.arrowEl.setAttribute("points",x)}else{const u=i+d*n;let p,g;s==="top"?(p=a+r,g=p+o):(p=a,g=p-o);const x=[`${u},${p}`,`${u-o/2},${g}`,`${u+o/2},${g}`].join(" ");this.arrowEl.setAttribute("points",x)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const u=this._getFormatter();if(this.hoverValueEl.textContent=u(t),e){const p=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=`${p-9}px`}else{const p=i+d*n;this.hoverValueEl.style.left=`${p}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=U.createElementNS(It,"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=Tt.colorScaleOf(s)||{},a=this._cfg(),n=Xr(s);if(n)return this._continuous=!0,{min:n.min,max:n.max,stops:n.legendStops,bands:[]};this._continuous=!1;let r=1/0,o=-1/0;const l=((t=s.seriesData)==null?void 0:t.series)||[];for(let p=0;p<l.length;p++){const g=l[p];if(g)for(let x=0;x<g.length;x++){const b=g[x];b==null||Number.isNaN(b)||(b<r&&(r=b),b>o&&(o=b))}}Number.isFinite(r)||(r=0),Number.isFinite(o)||(o=0);let c=r,h=o;typeof i.min!="undefined"&&typeof i.max!="undefined"&&i.max>i.min?(c=i.min,h=i.max):(typeof i.min!="undefined"&&(c=i.min<r?i.min:r),typeof i.max!="undefined"&&(h=i.max>o?i.max:o));const d=[],u=[];
1914if(i.ranges&&i.ranges.length>0){const p=i.ranges.map((m,A)=>it(Z({},m),{_originalIndex:A})).sort((m,A)=>m.from-A.from),g=p[0].from,x=p[p.length-1].to;c=g,h=x;const b=x-g||1;p.forEach(m=>{const A=(m.from-g)/b,v=(m.to-g)/b;d.push({percent:(A+v)/2,color:m.color}),u.push({index:m._originalIndex,p1:A,p2:v})})}else{const p=s.globals.colors[0]||"#008FFB",g=new z,x=s.config.plotOptions[s.config.chart.type]||{},b=(e=x.shadeIntensity)!=null?e:.5,m=s.globals.hasNegs,A=Math.max(2,a.stops||16);for(let v=0;v<A;v++){const y=v/(A-1),w=c+y*(h-c),S=Math.abs(h)+Math.abs(c),_=S===0?0:100*w/S;let k;m?x.reverseNegativeShade?k=_<0?_/100*(b*1.25):(1-_/100)*(b*1.25):k=_<=0?1-(1+_/100)*b:(1-_/100)*b:k=1-_/100,k>1&&(k=1),k<-1&&(k=-1);const M=x.enableShades?g.shadeColor(s.config.theme.mode==="dark"?k*-1:k,p):p;d.push({percent:y,color:M})}}return{min:c,max:h,stops:d,bands:u}}}class xh{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 uh(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"||Tt.isEnabled(t)||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),Tt.isEnabled(t)?(this.heatmapGradientLegend=new Tt(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=U.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;if(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 u=new ms(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${n}`,seriesIndex:t,strokeWidth:c,size:r}),g=(lt.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),x=new G(this.w).drawMarker(0,0,it(Z({},u),{pointFillColor:Array.isArray(e)?e[t]:u.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(x)}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]=U.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 u=!1,p=!1;if(s.globals.collapsedSeries.length>0)for(let v=0;v<s.globals.collapsedSeries.length;v++)s.globals.collapsedSeries[v].index===h&&(u=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let v=0;v<s.globals.ancillaryCollapsedSeriesIndices.length;v++)s.globals.ancillaryCollapsedSeriesIndices[v]===h&&(p=!0);const g=this.createLegendMarker({i:h,fillcolor:r});G.setAttrs(g,{rel:h+1,"data:collapsed":u||p}),(u||p)&&g.classList.add("apexcharts-inactive-legend");const x=U.createElement("div");
1914if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){x.setAttribute("role","button"),x.setAttribute("tabindex","0");const v=Array.isArray(d)?d.join(" "):d,y=u||p,w=y?"hidden":"visible";x.setAttribute("aria-label",`${v}, ${w}. Press Enter or Space to toggle.`),x.setAttribute("aria-pressed",y?"true":"false")}const b=U.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,G.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":u||p}),x.appendChild(g),x.appendChild(b);const A=new Dt(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&&x.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&&x.classList.add("apexcharts-hidden-null-series"),c.length?s.labelData.seriesGroups.forEach((v,y)=>{var w,S;v.includes((S=(w=s.config.series[h])==null?void 0:w.name)!=null?S:"")&&(i.appendChild(c[y]),c[y].appendChild(x))}):i.appendChild(x),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),x.classList.add("apexcharts-legend-series"),x.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":"",G.setAttrs(x,{rel:h+1,seriesName:z.escapeString(n[h]),"data:collapsed":u||p}),(u||p)&&x.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||x.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.config.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const s=this.w,i=s.dom.elLegendWrap,a=i.clientHeight;let 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 ri(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 ri(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 gt(this.ctx.w).toggleSeriesOnHover(t,
1914i);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 gt(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)}}}pt.registerFeatures({legend:xh});const mh=`<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"> 1915 <path d="M5 9 2 12l3 3"/> 1916 <path d="M9 5l3-3 3 3"/> 1917 <path d="M15 19l-3 3-3-3"/> 1918 <path d="M19 9l3 3-3 3"/> 1919 <path d="M2 12h20"/> 1920 <path d="M12 2v20"/> 1921</svg> 1922`,bh=`<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"> 1923 <circle cx="11" cy="11" r="7"/> 1924 <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/> 1925</svg> 1926`,yh=`<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"> 1927 <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/> 1928 <path d="M3 3v5h5"/> 1929</svg> 1930`,wh=`<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"> 1931 <path d="M12 5v14M5 12h14"/> 1932</svg> 1933`,vh=`<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"> 1934 <path d="M5 12h14"/> 1935</svg> 1936`,Ah=`<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"> 1937 <path d="M5 3a2 2 0 0 0-2 2"/> 1938 <path d="M19 3a2 2 0 0 1 2 2"/> 1939 <path d="M21 19a2 2 0 0 1-2 2"/> 1940 <path d="M5 21a2 2 0 0 1-2-2"/> 1941 <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/> 1942</svg> 1943`,Sh=`<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"> 1944 <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"/> 1945 <path d="m14.5 12.5 2-2"/> 1946 <path d="m11.5 9.5 2-2"/> 1947 <path d="m8.5 6.5 2-2"/> 1948 <path d="m17.5 15.5 2-2"/> 1949</svg> 1950`,_h=`<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"> 1951 <path d="M4 6h16M4 12h16M4 18h16"/> 1952</svg> 1953`;class Ir{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=()=>U.createElementNS("http://www.w3.org/1999/xhtml","div"),a=()=>{const c=U.createElementNS("http://www.w3.org/1999/xhtml","button");return c.setAttribute("type","button"),c},n=i();
1953if(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 u=c.toLowerCase();this.t[u]&&s.config.chart.zoom.enabled&&r.push({el:h,icon:typeof this.t[u]=="string"?this.t[u]:d,title:this.localeValues[c],class:`apexcharts-${u}-icon`})};o("zoomIn",this.elZoomIn,wh),o("zoomOut",this.elZoomOut,vh);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"?bh:Ah,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:mh,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:Sh,title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),o("reset",this.elZoomReset,yh),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:_h,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&&z.moveIndexInArray(r,h,c.index)});for(let c=0;c<r.length;c++)G.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),G.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(U.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=e[s].title,G.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
1953h(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 u=h.className;h.click(),requestAnimationFrame(()=>{const p=this.w.dom.baseEl;if(!p)return;const g=u.split(" ").find(b=>b.startsWith("apexcharts-"));if(!g)return;const x=p.querySelector(`.${g}`);x&&x.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 u=h.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[u]&&this.elMenuItems[u].focus()},20))}),this.elMenuItems.forEach((h,d)=>{h.addEventListener("keydown",u=>{var p;u.key==="ArrowDown"?(u.preventDefault(),(this.elMenuItems[d+1]||this.elMenuItems[0]).focus()):u.key==="ArrowUp"?(u.preventDefault(),(this.elMenuItems[d-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):u.key==="Escape"||u.key==="Tab"?(this._closeMenu(),(p=this.elMenuIcon)==null||p.focus(),u.key==="Tab"||u.preventDefault()):(u.key==="Enter"||u.key===" ")&&(u.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=z.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
1953se")}handleDownload(t){const e=this.w,s=new Rr(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(z.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)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,i=s&&s.querySelector(".apexcharts-svg");if(!i)return e-t.layout.translateX;const a=i.getBoundingClientRect(),n=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(n||1)-t.layout.translateX}}const Ch=240,kh=.05,Mh=.92,Lh=.02,Dh=16.6667,$e=15;class Th extends Ir{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new G(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 Pr(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})}),this._wheelZoomEnabled()&&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}_incidentalZoomEnabled(t){var e,s,i;const a=this.w.config.chart;return!a.zoom||!a.zoom.enabled?!1:t!=="auto"?!!t:!!((e=a.toolbar)!=null&&e.show&&((i=(s=a.toolbar)==null?void 0:s.tools)!=null&&i.reset))}_wheelZoomEnabled(){const{zoom:t}=this.w.config.chart;return this._incidentalZoomEnabled(t&&t.allowMouseWheelZoom)}_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/Ch),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 x=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,b=Math.max(x*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,u=d+l;const p=r*1e-9;if(Math.abs(d-a)<p&&Math.abs(u-n)<p||isNaN(d)||isNaN(u))return;const g=this.getBeforeZoomRange({min:d,max:u},void 0);g&&g.xaxis&&(d=g.xaxis.min,u=g.xaxis.max),this._applyXRange(d,u,!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?z.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!="undefined"&&t.interact.selection!==null)this.drawSelectionRect(it(Z({},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}),G.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}),G.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,u=h-r,p={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,u=Math.abs(u)),e==="x"?p={x:o?n-d:n,y:0,width:d,height:s.layout.gridHeight}:e==="y"?p={x:0,y:l?r-u:r,width:s.layout.gridWidth,height:u}:p={x:o?n-d:n,y:l?r-u:r,width:d,height:u},p=it(Z({},p),{translateX:s.layout.translateX,translateY:s.layout.translateY}),i.drawSelectionRect(p),i.selectionDragging("resizing"),p}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=x=>parseFloat(c.node.getAttribute(x)),u={x:d("x"),y:d("y"),width:d("width"),height:d("height")};i.interact.selection=u;const p=i.config.chart.link,g=!!(p&&(p.enabled||typeof p.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),u=this._screenXToPlotPx(n.right);if(e.axisFlags.isRangeBar)o=e.globals.yAxisScale[0].niceMin+d*r.invertedYRatio,l=e.globals.yAxisScale[0].niceMin+u*r.invertedYRatio,c=0,h=1;else{if(!e.globals.xAxisScale)return;o=_t.pxToDataX(e,d),l=_t.pxToDataX(e,u),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 p={xaxis:{min:o,max:l},yaxis:{min:c,max:h}};typeof e.config.chart.events.selection=="function"&&e.config.chart.events.selection(this.ctx,p),e.config.chart.brush.enabled&&e.config.chart.events.brushScrolled!==void 0&&e.config.chart.events.brushScrolled(this.ctx,p),(t=this.ctx.linkedViews)==null||t.onSourceSelection(p.xaxis)}selectionDrawn({context:t,zoomtype:e}){var s;
1953const 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,u=o.bottom-l.top;let p,g;i.axisFlags.isRangeBar?(p=i.globals.yAxisScale[0].niceMin+c*n.invertedYRatio,g=i.globals.yAxisScale[0].niceMin+h*n.invertedYRatio):(p=_t.pxToDataX(i,c),g=_t.pxToDataX(i,h));const x=[],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]*u;x.push(y),b.push(w)}),a.dragged&&(a.dragX>10||a.dragY>10)&&p!==g){if(i.interact.zoomEnabled){if(!i.globals.initialConfig)return;let m=z.clone(i.globals.initialConfig.yaxis),A=z.clone(i.globals.initialConfig.xaxis);if(i.interact.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(p=Math.floor(p),g=Math.floor(g),p<1&&(p=1,g=i.globals.dataPoints),g-p<2&&(g=p+1)),(e==="xy"||e==="x")&&(A={min:p,max:g}),(e==="xy"||e==="y")&&m.forEach((y,w)=>{m[w].min=b[w],m[w].max=x[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:p,max:g},e==="xy"||e==="y"){const v=z.clone(i.config.yaxis);m=v,v.forEach((y,w)=>{v[w].min=b[w],v[w].max=x[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!="undefined"){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=z.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/$e*o,e=c+a.layout.gridWidth/$e*o):this.moveDirection==="right"&&(t=l-a.layout.gridWidth/$e*o,e=c-a.layout.gridWidth/$e*o),!a.axisFlags.isRangeBar){const u=(s=a.globals.dataReducerRawMinX)!=null?s:a.globals.initialMinX,p=(i=a.globals.dataReducerRawMaxX)!=null?i:a.globals.initialMaxX;(t<u||e>p)&&(t=l,e=c)}const d={xaxis:{min:t,max:e}};
1953a.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(){return this._incidentalZoomEnabled(this.w.config.chart.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){return _t.screenXToPlotPx(this.w,t)}_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=z.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,u=d+c;const p=this._clampBounds();if(p){const g=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,x=Math.max(g*2,(p.max-p.min)*1e-6);if(u-d<x){const b=(d+u)/2;d=b-x/2,u=b+x/2}}this._applyXRange(d,u,!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?z.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)>kh?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):Mh;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/Dh),Math.abs(n)<Lh){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}const h=this._currentXWindow(),d=e.layout.gridWidth||1,u=(h.max-h.min)/d,p=n*c*u,g=this._applyXRange(h.min-p,h.max-p,!1),x=this._clampBounds();if(!g||x&&(p>0&&g.minX<=x.min+(x.max-x.min)*1e-6||p<0&&g.maxX>=x.max-(x.max-x.min)*1e-6)){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}s.inertiaRAF=requestAnimationFrame(o)};s.inertiaRAF=requestAnimationFrame(o)}}pt.registerFeatures({toolbar:Ir,zoomPanSelection:Th});let bs=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}
1953=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 u=a.left-n.x*r,p=a.top-n.y*r,g=(o.left-u)/r-l,x=(o.top-p)/r-h,b=this.annoCtx.graphics.drawRect(g,x,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&&b.node.classList.add(e.id),b}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==null||r.insertBefore(o.node,n);const l=n.getAttribute("x");l!==null&&Zt(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"))}usesCategoryX(){const t=this.w;return(t.config.xaxis.type==="category"||t.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!t.axisFlags.dataFormatXNumeric&&!t.config.chart.sparkline.enabled}hasXDomain(){const t=this.w;return this.annoCtx.invertAxis?z.isNumber(t.globals.minY)&&z.isNumber(t.globals.yRange[0]):this.usesCategoryX()?t.labelData.labels.length>0||t.labelData.categoryLabels.length>0:z.isNumber(t.globals.minX)&&z.isNumber(t.globals.xRange)}getY1Y2(t,e){var s,i,a;const n=this.w,r=t==="y1"?e.y:e.y2,o=typeof r=="string"&&r.includes("px");let l,c=!1;if(this.annoCtx.invertAxis){const h=n.config.xaxis.convertedCatToNumeric?n.labelData.categoryLabels:n.labelData.labels,d=h.indexOf(r);if(!o&&d===-1)return{yP:0,clipped:!0};const u=n.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${d+1})`);l=u?parseFloat((s=u.getAttribute("y"))!=null?s:"0"):(n.layout.gridHeight/h.length-1)*(d+1)-n.globals.barHeight,e.seriesIndex!==void 0&&n.globals.barHeight&&(l-=n.globals.barHeight/2*(n.seriesData.series.length-1)-n.globals.barHeight*e.seriesIndex)}else{if(!n.config.yaxis[e.yAxisIndex])return{yP:0,clipped:!0};const h=n.globals.seriesYAxisMap[e.yAxisIndex],d=(i=h==null?void 0:h[0])!=null?i:null;if(d===null&&n.seriesData.series.length)return{yP:0,clipped:!0};const u=d===null?n.globals.minY:n.globals.minYArr[d],p=d===null?n.globals.maxY-n.globals.minY:n.globals.yRange[d],g=n.config.yaxis[e.yAxisIndex].logarithmic&&d!==null?new Dt(this.w).getLogVal(n.config.yaxis[e.yAxisIndex].logBase,r,d)/n.globals.yLogRatio[d]:(r-u)/(p/n.layout.gridHeight);l=n.layout.gridHeight-Math.min(Math.max(g,0),n.layout.gridHeight),c=g>n.layout.gridHeight||g<0,e.marker&&(e.y===void 0||e.y===null)&&(l=0),(a=n.config.yaxis[e.yAxisIndex])!=null&&a.reversed&&(l=g)}return o&&(l=parseFloat(r)),{yP:l,clipped:c}}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;const l=typeof i=="string"&&i.includes("px"),c=i==null&&e.marker;if(!l&&!c&&!this.hasXDomain())return{x:0,clipped:!0};let h=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||(h=this.getStringX(i))),typeof i=="string"&&i.includes("px")&&(h=parseFloat(i)),i==null&&e.marker&&(h=s.layout.gridWidth),e.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(h-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),typeof h!="number"&&(h=0,o=!0),parseFloat(h.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(h=s.layout.gridWidth,o=!0):h<0&&(h=0,o=!0),{x:h,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 Eh{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new bs(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(z.isNumber(n)){if(t.x2===null||typeof t.x2=="undefined"){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),Zt(d,n+t.offsetX,i)}}else{const d=this.helpers.getX1X2("x2",t);if(l=d.x,o=d.clipped,l<n){const p=n;n=l,l=p}const u=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);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(u.node),t.id&&u.node.classList.add(t.id),Zt(u,n+t.offsetX,i)}if(!(r&&o)){const d=this.annoCtx.graphics.getTextRects(c,t.label.style.fontSize),u=t.label.position==="top"?4:t.label.position==="center"?i.layout.gridHeight/2+(t.label.orientation==="vertical"?d.width/2:0):i.layout.gridHeight,p=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:u+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:""}`});p.attr({rel:s}),e.appendChild(p.node),Zt(p,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 Ph{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new bs(this.annoCtx),this.axesUtils=new Ii(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=="undefined"){if(!o){h=!0;const u=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(n=this.helpers.getY1Y2("y2",t),l=n.yP,c=n.clipped,l>r){const u=r;r=l,l=u}if(!(o&&c)){h=!0;const u=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),r-l,0,t.fillColor,t.opacity,1,t.borderColor,a);
1953u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}if(h){const u=t.label.position==="right"?i.layout.gridWidth:t.label.position==="center"?i.layout.gridWidth/2:0,p=this.annoCtx.graphics.drawText({x:u+t.label.offsetX,y:(l!=null?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:""}`});p.attr({rel:s}),e.appendChild(p.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 Rh{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new bs(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(z.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.radius,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 u=[d.node];Zt(d,n,i);const p=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:p,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),Zt(g,n,i),t.customSVG.SVG){const x=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});x.attr({transform:`translate(${n+t.customSVG.offsetX}, ${l+t.customSVG.offsetY})`}),x.node.innerHTML=t.customSVG.SVG,e.appendChild(x.node),u.push(x.node)}if(t.image.path){const x=t.image.width?t.image.width:20,b=t.image.height?t.image.height:20;d=this.annoCtx.addImage({x:n+t.image.offsetX-x/2,y:l+t.image.offsetY-b/2,width:x,height:b,path:t.image.path,appendTo:".apexcharts-point-annotations"}),u.push(d.node)}t.tooltip&&t.tooltip.enabled&&u.forEach(x=>{x.addEventListener("mouseenter",()=>{this.showPointTooltip(t,x)}),x.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=U.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;
1953let d=o.left-r.left+o.width/2-l.width/2,u=o.top-r.top-l.height-10;d=Math.max(0,Math.min(d,r.width-l.width)),u<0&&(u=o.top-r.top+o.height+10),a.style.left=d+c+"px",a.style.top=u+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 Fh{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 G(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new bs(this),this.xAxisAnnotations=new Eh(this),this.yAxisAnnotations=new Ph(this),this.pointsAnnotations=new Rh(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){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});this.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:u,borderRadius:p,borderColor:g,appendTo:x=".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:""}),S=y.dom.baseEl.querySelector(x);S&&S.appendChild(w.node);const _=w.bbox();if(i){const k=this.graphics.drawRect(_.x-b,_.y-v,_.width+b+m,_.height+A+v,p,h||"transparent",1,d,g,u);S.insertBefore(k.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=="undefined"&&(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 Er,h=Object.assign({},i==="xaxis"?c.xAxisAnnotation:i==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),d=z.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 u=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${l}
1953']`),p=this.helpers.addBackgroundToAnno(u,d);return p&&o.insertBefore(p.node,u),e&&r.globals.memory.methodsToExec.push({context:n,id:d.id?d.id:z.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)}))}}pt.registerFeatures({annotations:Fh});class Oh{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
1953onfig.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(it(Z(Z({ttItems:s.ttItems,i:t,j:e},(c==null?void 0:c.y1)!==void 0&&{y1:c.y1}),(c==null?void 0: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 G(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),o.globals.isBarHorizontal){const u=d&&d.node;if(u){const p=o.dom.elWrap.getBoundingClientRect(),g=u.getBoundingClientRect(),x=g.left-p.left,b=g.top-p.top,m=g.height,A=g.width,v=s.tooltipRect.ttWidth||0,y=s.tooltipRect.ttHeight||0,w=b+m/2-y/2;let S=x+A;const _=s.xyRatios&&s.xyRatios.baseLineInvertedY!=null?s.xyRatios.baseLineInvertedY:p.width/2;x<_&&(S=x-v);const k=s.getElTooltip();k&&(k.style.left=S+"px",k.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&&!i.globals.markers.batched;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){const a=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const n=i.getBoundingClientRect(),r=n.width||s.tooltipRect.ttWidth||0,o=n.height||s.tooltipRect.ttHeight||0,l=a.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`),c=s.getSliceAnchor(l);c&&(i.style.left=c.x-r/2+"px",i.style.top=c.y-o-10+"px")}_showTooltipRadialBar(t,e,s,i){var a;const n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});const{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,u=n.layout.gridWidth/2,p=n.layout.gridHeight/2,g=n.globals.radialSize||Math.min(n.layout.gridWidth,n.layout.gridHeight)/2,x=n.seriesData.series.length,b=g/Math.max(x,1),m=g-t*b,A=m-b,v=(m+A)/2,y=z.polarToCartesian(u,p,v,d),w=y.x+(n.layout.translateX||0),S=y.y+(n.layout.translateY||0);i.style.left=w-r/2+"px",i.style.top=S-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",u=o.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(u){const p=o.dom.elWrap.getBoundingClientRect(),g=u.getBoundingClientRect(),x=g.left-p.left,b=g.top-p.top,m=g.width,A=g.height,v=parseFloat((n=u.getAttribute("cx"))!=null?n:""),y=parseFloat((r=u.getAttribute("width"))!=null?r:"");s.tooltipPosition.moveXCrosshairs(v+y/2);let w=x+m+c/2;const S=b+A/2-h/2;x+m>o.layout.gridWidth/2&&(w=x-c/2),i.style.left=w+"px",i.style.top=S+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const s=this._getFocusableElement(t,e)||this._getBatchedFocusEl(t);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}}_getBatchedFocusEl(t){return this.w.globals.markers.batched?this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`):null}_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,u=h.seriesData.seriesNames||[],p=h.seriesData.series||[];if(d==="pie"||d==="donut"||d==="polarArea"){const S=(i=((s=h.labelData)==null?void 0:s.labels)&&h.labelData.labels[e])!=null?i:"",_=Array.isArray(p)?p[e]:"";return S?`${S}: ${_}`:`${_}`}if(d==="radialBar"){const S=u[t]||`Series ${t+1}`,_=Array.isArray(p)?p[t]:"";return`${S}: ${_}`}const g=u[t]||`Series ${t+1}`,b=(Array.isArray(p[t])?p[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(S){}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 S=(c=h.formatters)==null?void 0:c.xLabelFormatter;if(typeof S=="function")try{v=String(S(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 G(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;
1953l--)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))}}pt.registerFeatures({keyboardNavigation:Oh});function ka(f,t){if(!(t>0))return[];if(t===1)return[Z({},f)];const e=f.width>=f.height,s=e?f.width:f.height,i=e?f.height:f.width,a=i>0?s/i:t;let n=Math.max(1,Math.ceil(Math.sqrt(a*t)));n>t&&(n=t);const r=Math.floor(t/n);let o=t-r*n;const l=[],c=s/n;let h=0;for(let d=0;d<n;d++){const u=r+(o>0?1:0);o>0&&o--;const p=u>0?i/u:0;for(let g=0;g<u;g++)l.push(e?{x:f.x+h,y:f.y+g*p,width:c,height:p}:{x:f.x+g*p,y:f.y+h,width:p,height:c});h+=c}return l}function Ma(f,t,e){if(!(t>0))return[];const s=f.width>=f.height,i=s?f.width:f.height,a=s?f.height:f.width,n=s?f.y:f.x,r=n+a,o=a>0?i/a:t;let l=Math.max(Math.ceil(Math.sqrt(o*t)),Math.ceil(i/16));l>=1||(l=1),l>t&&(l=t);const c=Math.floor(t/l);let h=t-c*l;const d=[],u=i/l;let p=s?f.x:f.y;for(let g=0;g<l;g++){const x=c+(h>0?1:0);h>0&&h--;const b=[],m=e(p,p+u,s);if(Array.isArray(m))for(let _=0;_<m.length;_++){const k=m[_];if(!k)continue;const M=Math.max(n,Math.min(k[0],k[1])),C=Math.min(r,Math.max(k[0],k[1]));C>M&&b.push([M,C])}b.length||b.push([n,r]);const A=b.reduce((_,k)=>_+(k[1]-k[0]),0),v=b.map(_=>A>0?(_[1]-_[0])/A*x:x/b.length),y=v.map(_=>Math.floor(_));let w=y.reduce((_,k)=>_+k,0);const S=v.map((_,k)=>({i:k,frac:_-Math.floor(_)})).sort((_,k)=>k.frac-_.frac);for(let _=0;w<x;_++,w++)y[S[_%S.length].i]++;for(let _=0;_<b.length;_++){const k=y[_];if(k<=0)continue;const M=b[_][0],C=(b[_][1]-M)/k;for(let L=0;L<k;L++)d.push(s?{x:p,y:M+L*C,width:u,height:C}:{x:M+L*C,y:p,width:C,height:u})}p+=u}return d}function Xh(f,t,e,s,i,a){let n=i===e?0:Math.round(32767*((f-e)/(i-e))),r=a===s?0:Math.round(32767*((t-s)/(a-s))),o=0;for(let l=32768;l>=1;l/=2){const c=(n&l)>0?1:0,h=(r&l)>0?1:0;if(o+=l*l*(3*c^h),h===0){c===1&&(n=l-1-n,r=l-1-r);const d=n;n=r,r=d}}return o}function He(f,t){let e=1/0,s=1/0,i=-1/0,a=-1/0;const n=f.map(r=>{const[o,l]=t(r);return o<e&&(e=o),o>i&&(i=o),l<s&&(s=l),l>a&&(a=l),[o,l]});return f.map((r,o)=>({item:r,d:Xh(n[o][0],n[o][1],e,s,i,a)})).sort((r,o)=>r.d-o.d).map(r=>r.item)}function La(f){if(!f||typeof f!="string")return null;const t=f.trim();if(t[0]==="#"){const s=t.slice(1);return s.length===3?[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),1]:s.length===6||s.length===8?[parseInt(s.slice(0,2),16),parseInt(s.slice(2,4),16),parseInt(s.slice(4,6),16),s.length===8?parseInt(s.slice(6,8),16)/255:1]:null}const e=t.match(/^rgba?\(([^)]+)\)$/i);if(e){const s=e[1].split(",").map(i=>parseFloat(i));return s.length<3||s.some(i=>!isFinite(i))?null:[s[0],s[1],s[2],s.length>3?s[3]:1]}return null}function Da(f,t){const e=La(f),s=La(t);return!e||!s?null:i=>{const a=Math.round(e[0]+(s[0]-e[0])*i),n=Math.round(e[1]+(s[1]-e[1])*i),r=Math.round(e[2]+(s[2]-e[2])*i),o=e[3]+(s[3]-e[3])*i;return o>=1?`rgb(${a},${n},${r})`:`rgba(${a},${n},${r},${o})`}}function Ih(f){return f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2}function Nh({pieces:f,duration:t,onPieceDone:e,onAllDone:s}){let i=!1;const a=Date.now(),n=Math.max(1,t),r=(l,c)=>{const h=l.from,d=l.to,u=l.el;u.setAttribute("x",String(h.x+(d.x-h.x)*c)),u.setAttribute("y",String(h.y+(d.y-h.y)*c)),u.setAttribute("width",String(Math.max(0,h.width+(d.width-h.width)*c))),u.setAttribute("height",String(Math.max(0,h.height+(d.height-h.height)*c))),u.setAttribute("rx",String(Math.max(0,h.rx+(d.rx-h.rx)*c))),l.fill?u.setAttribute("fill",l.fill(c)):c>=1&&l.fillEnd&&u.setAttribute("fill",l.fillEnd)},o=()=>{if(i)return;const l=Date.now()-a;let c=!1;for(let h=0;h<f.length;h++){const d=f[h];if(d._done)continue;const u=(l-d.delay)/n;if(u<1&&(c=!0),u<=0)continue;const p=Math.min(1,u);r(d,Ih(p)),p>=1&&(d._done=!0,e&&e(d))}c?U.requestAnimationFrame(o):s&&s()};return U.requestAnimationFrame(o),()=>{i=!0}}const Bh=new Set(["bar","funnel","pyramid","histogram"]),Yh=new Set(["pie","donut","polarArea","radialBar","gauge"]),zh=new Set(["unit","waffle"]),$h=new Set(["treemap","sunburst"]),Hh=new Set(["boxPlot","violin"]),Wh=.55,Ps=1500,Gh=300;function vt(f){return Bh.has(f)?"bar":Yh.has(f)?"radial":zh.has(f)?"unit":$h.has(f)?"partition":Hh.has(f)?"summary":null}class Vh{constructor(t,e){this.w=t,this.ctx=e,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(t,e){if(t===e)return!1;const s=vt(t),i=vt(e);return!s||!i?!1:s==="partition"!=(i==="partition")?s!=="unit"&&i!=="unit":!0}isCompatibleSeriesShape(t,e,s){if(!Array.isArray(s)||s.length===0)return!1;const i=vt(t),a=vt(e);return a==="unit"?s.every(n=>typeof n=="number")?!0:s.every(n=>n&&typeof n=="object"&&Array.isArray(n.data)):a==="partition"?!0:a==="radial"?s.every(n=>typeof n=="number")?!0:s.length===1&&s[0]&&typeof s[0]=="object"&&Array.isArray(s[0].data):a==="bar"||a==="summary"?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,this._removeGhost(),this._cancelPieces(),!lt.isBrowser())return!1;const i=this.w.config.chart.animations;if(!i||i.enabled===!1||i.chartTypeMorph&&i.chartTypeMorph.enabled===!1||i.respectReducedMotion&&Xi()||!this.canMorphTypes(t,e)||!this.isCompatibleSeriesShape(t,e,s))return!1;const{marks:a,branches:n,unitDots:r}=this._captureFromDOM(t);if(!a.length)return!1;const o=this._buildMapping(a,t,e,s,n);if(o.size===0)return!1;this._snapshot={fromType:t,toType:e,mapping:o,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};const l=vt(t),c=vt(e),h=this._canProbePaths();if(c==="unit"&&(l==="bar"||l==="summary"||l==="radial"&&h)){const u=this._countUnitSeries(s);this._snapshot.pieceOut=u>0&&u<=Ps}else if(l==="unit"&&(c==="bar"||c==="summary"||c==="radial"&&h)){let u=0;if(r.forEach(p=>{u+=p.length}),u>0&&u<=Ps){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=r;const p=[];
1953c==="radial"?(Array.isArray(s)?s:[]).forEach((g,x)=>{p.push(`${x}:0`)}):(Array.isArray(s)?s:[]).forEach((g,x)=>{const b=g&&Array.isArray(g.data)?g.data:[];for(let m=0;m<b.length;m++)p.push(`${x}:${m}`)}),this._snapshot.keyOrder=p}}return this._needsGhost(t,e)&&!this._snapshot.pieceOut&&!this._snapshot.pieceIn&&this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(t,e){return vt(t)==="unit"||vt(e)==="unit"}_captureGhost(){var t,e;const s=(t=this.w.dom)==null?void 0:t.Paper,i=s&&s.node;if(!i||typeof i.cloneNode!="function")return;const a=i.cloneNode(!0),n=[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text",".apexcharts-annotations",".apexcharts-zoom-rect",".apexcharts-selection-rect",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs"];typeof a.querySelectorAll=="function"&&n.forEach(r=>{a.querySelectorAll(r).forEach(o=>{o.parentNode&&o.parentNode.removeChild(o)})}),typeof a.querySelectorAll=="function"&&a.querySelectorAll("[id]").forEach(r=>{r.removeAttribute("id")}),(e=a.removeAttribute)==null||e.call(a,"id"),this._ghost=a}_mountGhost(){var t,e,s;const i=this._ghost;if(!i||!lt.isBrowser())return;const a=(t=this.w.dom)==null?void 0:t.elWrap;if(!a||typeof a.appendChild!="function"){this._ghost=null;return}const n=i.style;n&&(n.position="absolute",n.left="0",n.top="0",n.background="transparent",n.pointerEvents="none",n.opacity="1"),(e=i.setAttribute)==null||e.call(i,"aria-hidden","true"),(s=i.setAttribute)==null||s.call(i,"class","apexcharts-morph-ghost"),a.appendChild(i);const r=this.getSpeed(),o=Math.max(120,Math.round(r*Wh));U.requestAnimationFrame(()=>{n&&(n.transition=`opacity ${o}ms ease-in`,n.opacity="0")}),setTimeout(()=>this._removeGhost(),o+60)}_removeGhost(){const t=this._ghost;this._ghost=null,t&&t.parentNode&&t.parentNode.removeChild(t)}_countUnitSeries(t){if(!Array.isArray(t))return 0;let e=0;for(const s of t){if(!s||typeof s!="object"||!Array.isArray(s.data))return 0;e+=s.data.length}return e}usesPieceTakeover(){return!!(this._snapshot&&this._snapshot.pieceOut)}claimsTargetMark(t,e){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${t}:${e}`))}_makePieceLayer(){var t,e;const s=(t=this.w.dom)==null?void 0:t.elGraphical,i=s&&s.node;if(!i||typeof i.appendChild!="function")return null;const a=U.createElementNS("http://www.w3.org/2000/svg","g");if(!a)return null;a.setAttribute("class","apexcharts-morph-pieces"),a.setAttribute("pointer-events","none");const n=(e=this.w.globals)==null?void 0:e.cuid;return n&&a.setAttribute("clip-path",`url(#gridRectBarMask${n})`),i.appendChild(a),this._pieceLayer=a,a}_revealPieceHidden(){var t;const e=(t=this.w.globals.dom)==null?void 0:t.baseEl;!e||typeof e.querySelectorAll!="function"||e.querySelectorAll("[data-piece-hidden]").forEach(s=>{s.removeAttribute("opacity"),s.removeAttribute("data-piece-hidden")})}_cancelPieces(){this._pieceCancel&&(this._pieceCancel(),this._pieceCancel=null);const t=this._pieceLayer;this._pieceLayer=null,t&&t.parentNode&&t.parentNode.removeChild(t),this._revealPieceHidden()}_canProbePaths(){if(!lt.isBrowser())return!1;const t=U.createElementNS("http://www.w3.org/2000/svg","path");return!!t&&typeof t.isPointInFill=="function"}_makeExtentProber(t,e,s){const a=s.ownerDocument.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",t),a.setAttribute("fill","#000"),a.setAttribute("stroke","#000"),a.setAttribute("stroke-width","3"),a.setAttribute("visibility","hidden"),s.appendChild(a);const n=a.ownerSVGElement;if(typeof a.isPointInFill!="function"||!n||typeof n.createSVGPoint!="function")return s.removeChild(a),null;const r=n.createSVGPoint(),o=(h,d)=>{r.x=h,r.y=d;const u=a;return u.isPointInFill(r)||typeof u.isPointInStroke=="function"&&u.isPointInStroke(r)},l=48;return{intervalsAt:(h,d,u)=>{const p=u?e.y:e.x,g=p+(u?e.height:e.width);if(!(g>p))return null;const x=(_,k)=>u?o(k,_):o(_,k),b=[h+(d-h)*.1,(h+d)/2,d-(d-h)*.1],m=(_,k,M)=>{let C=k,L=_;for(let T=0;T<6;T++){const D=(C+L)/2;x(D,M)?L=D:C=D}return(C+L)/2},A=(g-p)/l,v=new Array(l+1).fill(null);let y=!1;for(const _ of b)for(let k=0;k<=l;k++)v[k]===null&&x(p+k*A,_)&&(v[k]=_,y=!0);if(!y)return null;const w=[];let S=-1;for(let _=0;_<=l+1;_++){const k=_<=l&&v[_]!==null;if(k&&S<0&&(S=_),!k&&S>=0){const M=_-1,C=v[S],L=S===0?p:m(p+S*A,p+(S-1)*A,C),T=M===l?g:m(p+M*A,p+(M+1)*A,v[M]);T>L&&w.push([L,T]),S=-1}}return w.length?w:null},dispose:()=>{a.parentNode&&a.parentNode.removeChild(a)}}}_separatePieces(){var t;const e=this._snapshot,s=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e||!s)return this._revealPieceHidden();const i=new Map;let a=0;if(s.querySelectorAll(".apexcharts-unit-area").forEach(h=>{var d,u,p,g,x,b,m;
1953const A=parseInt((d=h.getAttribute("i"))!=null?d:"",10);if(isNaN(A))return;const v=h.getAttribute("cx");let y,w,S=3;if(v!=null)y=parseFloat(v),w=parseFloat((u=h.getAttribute("cy"))!=null?u:""),S=parseFloat((p=h.getAttribute("r"))!=null?p:"3")||3;else{const k=parseFloat((g=h.getAttribute("width"))!=null?g:"0")||0,M=parseFloat((x=h.getAttribute("height"))!=null?x:"0")||0;y=parseFloat((b=h.getAttribute("x"))!=null?b:"")+k/2,w=parseFloat((m=h.getAttribute("y"))!=null?m:"")+M/2,S=Math.max(k,M)/2||3}if(!isFinite(y)||!isFinite(w))return;let _=i.get(A);_||(_=[],i.set(A,_)),_.push({el:h,x:y,y:w,r:S,fill:h.getAttribute("fill")}),a++}),a===0||a>Ps)return this._revealPieceHidden();const n=this._makePieceLayer();if(!n)return this._revealPieceHidden();const r=[],o=n.ownerDocument,l=vt(e.fromType),c=l==="summary"||l==="radial";if(Array.from(i.keys()).sort((h,d)=>h-d).forEach(h=>{var d;const u=i.get(h),p=this.getInitialBBoxFor(h),g=e.mapping.get(`${h}:0`);if(!p||!g){u.forEach(y=>{y.el.removeAttribute("opacity"),y.el.removeAttribute("data-piece-hidden")});return}const x=g.fill&&g.fill.indexOf("url(")!==0?g.fill:((d=this.w.globals.colors)==null?void 0:d[h])||u[0].fill;let b=null;if(c){const y=this.getInitialPathFor(h,0);y&&(b=this._makeExtentProber(y,p,n))}const m=b?Ma(p,u.length,b.intervalsAt):ka(p,u.length);b&&b.dispose();const A=He(m,y=>[y.x+y.width/2,y.y+y.height/2]),v=He(u,y=>[y.x,y.y]);for(let y=0;y<v.length;y++){const w=A[y],S=v[y],_=o.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("data-i",String(h)),_.setAttribute("x",String(w.x)),_.setAttribute("y",String(w.y)),_.setAttribute("width",String(w.width)),_.setAttribute("height",String(w.height)),_.setAttribute("rx","0"),_.setAttribute("fill",String(x)),n.appendChild(_),r.push({el:_,from:{x:w.x,y:w.y,width:w.width,height:w.height,rx:0},to:{x:S.x-S.r,y:S.y-S.r,width:S.r*2,height:S.r*2,rx:S.r},fill:Da(x,S.fill),fillEnd:S.fill,delay:0,meta:{dotEl:S.el}})}}),!r.length)return this._cancelPieces();this._runPieces(r,h=>{const d=h.meta.dotEl;d.removeAttribute("opacity"),d.removeAttribute("data-piece-hidden"),h.el.parentNode&&h.el.parentNode.removeChild(h.el)})}_combinePieces(){var t,e;const s=this._snapshot,i=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!s||!s.sourceDots||!s.keyOrder||!i)return this._revealPieceHidden();const a=this._collectTargetMarks(s.toType);if(!a.size)return this._revealPieceHidden();const n=s.oldLayout.translateX-(this.w.layout.translateX||0),r=s.oldLayout.translateY-(this.w.layout.translateY||0),o=Array.from(s.sourceDots.keys()).sort((p,g)=>p-g),l=this._makePieceLayer();if(!l)return this._revealPieceHidden();const c=l.ownerDocument,h=[],d=vt(s.toType),u=d==="summary"||d==="radial";for(let p=0;p<o.length;p++){const g=s.sourceDots.get(o[p]),x=s.keyOrder[p],b=x?a.get(x):null;if(!b||!g||!g.length){b&&b.els.forEach(_=>{_.removeAttribute("opacity"),_.removeAttribute("data-piece-hidden")});continue}const m=b.fill&&b.fill.indexOf("url(")!==0?b.fill:((e=this.w.globals.colors)==null?void 0:e[b.realIndex])||g[0].fill;let A=null;if(u){const _=b.d||b.els.map(k=>k.getAttribute("pathTo")||k.getAttribute("d")).filter(Boolean).join(" ");_&&(A=this._makeExtentProber(_,b.bbox,l))}const v=A?Ma(b.bbox,g.length,A.intervalsAt):ka(b.bbox,g.length);A&&A.dispose();const y=He(v,_=>[_.x+_.width/2,_.y+_.height/2]),w=He(g,_=>[_.x,_.y]),S={remaining:w.length,els:b.els,tiles:[]};for(let _=0;_<w.length;_++){const k=w[_],M=y[_],C=c.createElementNS("http://www.w3.org/2000/svg","rect"),L=k.x+n-k.r,T=k.y+r-k.r;C.setAttribute("data-key",x),C.setAttribute("x",String(L)),C.setAttribute("y",String(T)),C.setAttribute("width",String(k.r*2)),C.setAttribute("height",String(k.r*2)),C.setAttribute("rx",String(k.r)),C.setAttribute("fill",String(k.fill||m)),l.appendChild(C),S.tiles.push(C),h.push({el:C,from:{x:L,y:T,width:k.r*2,height:k.r*2,rx:k.r},to:{x:M.x,y:M.y,width:M.width,height:M.height,rx:0},fill:Da(k.fill,m),fillEnd:String(m),delay:0,meta:{markState:S}})}}if(!h.length)return this._cancelPieces();this._runPieces(h,p=>{const g=p.meta.markState;
1953g.remaining--,g.remaining===0&&(g.els.forEach(x=>{x.removeAttribute("opacity"),x.removeAttribute("data-piece-hidden")}),g.tiles.forEach(x=>{x.parentNode&&x.parentNode.removeChild(x)}))})}_runPieces(t,e){const s=this.getSpeed(),i=Math.min(Gh,s*.35),a=Math.max(180,s-i);for(let n=0;n<t.length;n++)t[n].delay=t.length>1?n/(t.length-1)*i:0;this._pieceCancel=Nh({pieces:t,duration:a,onPieceDone:e,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(t){var e;const s=(e=this.w.globals.dom)==null?void 0:e.baseEl,i=new Map;if(!s)return i;const a=vt(t);if(a==="radial")return s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((r,o)=>{const l=r.getAttribute("data:pathFinal")||r.getAttribute("d");if(!l||!l.trim())return;const c=this._pathBBox(l);c&&i.set(`${o}:0`,{realIndex:o,j:0,d:l,bbox:{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY},fill:r.getAttribute("fill"),els:[r]})}),i;const n=a==="summary"?`.apexcharts-${t}-series`:".apexcharts-bar-series";return s.querySelectorAll(`${n} .apexcharts-series`).forEach(r=>{var o;const l=parseInt((o=r.getAttribute("data:realIndex"))!=null?o:"0",10)||0;let c=0;r.querySelectorAll("path[pathTo]").forEach(h=>{var d;const u=h.getAttribute("pathTo")||h.getAttribute("d");if(!u||!u.trim())return;const p=parseInt((d=h.getAttribute("j"))!=null?d:"",10),g=isNaN(p)?c++:p,x=this._pathBBox(u);if(!x)return;const b=`${l}:${g}`,m=i.get(b);m?(m.els.push(h),m.bbox={x:Math.min(m.bbox.x,x.minX),y:Math.min(m.bbox.y,x.minY),width:Math.max(m.bbox.x+m.bbox.width,x.maxX)-Math.min(m.bbox.x,x.minX),height:Math.max(m.bbox.y+m.bbox.height,x.maxY)-Math.min(m.bbox.y,x.minY)}):i.set(b,{realIndex:l,j:g,bbox:{x:x.minX,y:x.minY,width:x.maxX-x.minX,height:x.maxY-x.minY},fill:h.getAttribute("fill"),els:[h]})})}),i}_captureFromDOM(t){var e;const s=(e=this.w.globals.dom)==null?void 0:e.baseEl;if(!s)return{marks:[],branches:[],unitDots:new Map};const i=[],a=[],n=new Map,r=vt(t);if(r==="bar")s.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach(l=>{var c;const h=parseInt((c=l.getAttribute("data:realIndex"))!=null?c:"0",10);l.querySelectorAll("path[pathTo]").forEach((u,p)=>{const g=u.getAttribute("pathTo")||u.getAttribute("d");g&&i.push({realIndex:h,j:p,d:g,fill:u.getAttribute("fill")})})});else if(r==="summary"){const o=new Map;s.querySelectorAll(`.apexcharts-${t}-area`).forEach(l=>{var c,h;const d=parseInt((c=l.getAttribute("j"))!=null?c:"",10);if(isNaN(d))return;const u=l.getAttribute("pathTo")||l.getAttribute("d");if(!u||!u.trim())return;const p=typeof l.closest=="function"?l.closest(".apexcharts-series"):null,g=parseInt((h=p==null?void 0:p.getAttribute("data:realIndex"))!=null?h:"0",10)||0,x=`${g}:${d}`,b=o.get(x);b?b.d+=` ${u}`:o.set(x,{realIndex:g,j:d,d:u,fill:l.getAttribute("fill")})}),Array.from(o.values()).sort((l,c)=>l.realIndex-c.realIndex||l.j-c.j).forEach(l=>i.push(l))}else if(r==="partition")if(t==="treemap"){const o=h=>{var d,u,p,g;const x=parseFloat((d=h.getAttribute("x"))!=null?d:""),b=parseFloat((u=h.getAttribute("y"))!=null?u:""),m=parseFloat((p=h.getAttribute("width"))!=null?p:""),A=parseFloat((g=h.getAttribute("height"))!=null?g:"");return[x,b,m,A].every(v=>isFinite(v))?`M ${x} ${b} L ${x+m} ${b} L ${x+m} ${b+A} L ${x} ${b+A} Z`:null};s.querySelectorAll(".apexcharts-treemap-rect").forEach(h=>{var d,u;const p=o(h);p&&i.push({realIndex:parseInt((d=h.getAttribute("i"))!=null?d:"0",10)||0,j:parseInt((u=h.getAttribute("j"))!=null?u:"0",10)||0,d:p,fill:h.getAttribute("fill"),key:h.getAttribute("data:key")||null})}),s.querySelectorAll(".apexcharts-treemap-parent-rect").forEach(h=>{const d=o(h),u=h.getAttribute("data:key");!d||!u||a.push({key:u,d,fill:h.getAttribute("fill")})})}else{const o=s.querySelectorAll(".apexcharts-sunburst-arc"),l=[];o.forEach(h=>{h.getAttribute("data:leaf")==="true"&&l.push(h)}),(l.length?l:Array.from(o)).forEach((h,d)=>{const u=h.getAttribute("d");!u||!u.trim()||i.push({realIndex:d,j:0,d:u,fill:h.getAttribute("fill"),key:h.getAttribute("data:key")||null})}),o.forEach(h=>{if(h.getAttribute("data:leaf")==="true")return;const d=h.getAttribute("d"),u=h.getAttribute("data:key");!d||!d.trim()||!u||a.push({key:u,d,fill:h.getAttribute("fill")})})}else if(r==="unit"){const o=s.querySelectorAll(".apexcharts-unit-area"),l=new Map;o.forEach(c=>{var h,d,u,p,g,x,b;const m=parseInt((h=c.getAttribute("i"))!=null?h:"",10);if(isNaN(m))return;const A=c.getAttribute("cx");let v,y,w=3;if(A!=null)v=parseFloat(A),y=parseFloat((d=c.getAttribute("cy"))!=null?d:""),w=parseFloat((u=c.getAttribute("r"))!=null?u:"3")||3;
1953else{const k=parseFloat((p=c.getAttribute("width"))!=null?p:"0")||0,M=parseFloat((g=c.getAttribute("height"))!=null?g:"0")||0;v=parseFloat((x=c.getAttribute("x"))!=null?x:"")+k/2,y=parseFloat((b=c.getAttribute("y"))!=null?b:"")+M/2,w=Math.max(k,M)/2||3}if(!isFinite(v)||!isFinite(y))return;let S=n.get(m);S||(S=[],n.set(m,S)),S.push({x:v,y,r:w,fill:c.getAttribute("fill")});const _=l.get(m);if(!_){l.set(m,{minX:v,minY:y,maxX:v,maxY:y,fill:c.getAttribute("fill")});return}v<_.minX&&(_.minX=v),v>_.maxX&&(_.maxX=v),y<_.minY&&(_.minY=y),y>_.maxY&&(_.maxY=y)}),Array.from(l.keys()).sort((c,h)=>c-h).forEach(c=>{const h=l.get(c),d=2,u=h.minX-d,p=h.minY-d,g=h.maxX+d,x=h.maxY+d;i.push({realIndex:c,j:0,d:`M ${u} ${p} L ${g} ${p} L ${g} ${x} L ${u} ${x} Z`,fill:h.fill})})}else if(r==="radial")if(t==="radialBar"||t==="gauge"){const o=this.w.layout.gridWidth/2,l=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;s.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(h=>{var d;const u=h.parentElement,p=parseInt((d=u==null?void 0:u.getAttribute("data:realIndex"))!=null?d:"0",10),g=h.getAttribute("d");if(!g)return;const x=parseFloat(h.getAttribute("stroke-width")||"0"),b=x>1&&this._radialArcToFilledSegment(g,x,o,l)||g;i.push({realIndex:p,j:0,d:b,fill:h.getAttribute("stroke")})})}else s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((l,c)=>{const h=l.getAttribute("d");h&&i.push({realIndex:c,j:0,d:h,fill:l.getAttribute("fill")})});return{marks:i,branches:a,unitDots:n}}_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 u=e/2,p=o+u,g=Math.max(0,o-u),x=(w,S,_)=>{const k=w-s,M=S-i,C=Math.sqrt(k*k+M*M);if(C===0)return{x:s,y:i};const L=_/C;return{x:s+k*L,y:i+M*L}},b=x(n,r,p),m=x(h,d,p),A=x(n,r,g),v=x(h,d,g),y=c?0:1;return`M ${b.x} ${b.y} A ${p} ${p} 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)},u={x:t+o*Math.cos(h),y:e+o*Math.sin(h)},p={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)},x=n>a?1:0,b=Math.abs(n-a)>180?1:0;return`M ${d.x} ${d.y} A ${o} ${o} 0 ${b} ${x} ${u.x} ${u.y} L ${g.x} ${g.y} A ${l} ${l} 0 ${b} ${1-x} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(t,e,s,i,a){const n=new Map,r=vt(s),o=t.slice().sort((l,c)=>l.realIndex-c.realIndex||l.j-c.j);if(r==="partition"&&a&&a.length){const l=o.filter(c=>c.key);l.length===o.length&&(l.forEach(c=>{n.set(`key:${c.key}`,{d:c.d,fill:c.fill})}),a.forEach(c=>{n.set(`key:${c.key}`,{d:c.d,fill:c.fill})}))}if(r==="radial"||r==="unit"||r==="partition")return o.forEach((l,c)=>{n.set(`${c}:0`,{d:l.d,fill:l.fill})}),n;if(r==="bar"||r==="summary"){const l=[];return(Array.isArray(i)?i:[]).forEach((h,d)=>{const u=h&&Array.isArray(h.data)?h.data:[];for(let p=0;p<u.length;p++)l.push({realIndex:d,j:p})}),o.forEach((h,d)=>{const u=l[d];u&&n.set(`${u.realIndex}:${u.j}`,{d:h.d,fill:h.fill})}),n}return n}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:ls(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}getInitialPathAt(t){return this.getInitialPathFor(t,0)}getInitialPathForKey(t){return!this._snapshot||!t?null:this.getInitialPathFor("key",t)}hasKeyedMarks(){if(!this._snapshot)return!1;for(const t of this._snapshot.mapping.keys())if(typeof t=="string"&&t.startsWith("key:"))return!0;return!1}getInitialSlotFor(t,e,s){const i=this.getInitialBBoxFor(t);if(!i)return null;const a=i.x+i.width/2,n=i.y+i.height/2;if(!(s>1)||!(e>=0))return{x:a,y:n};const r=(Math.min(e,s-1)+.5)/s;return i.height>=i.width?{x:a,y:i.y+i.height*(1-r)}:{x:i.x+i.width*r,y:n}}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=ls(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]]);
1953c.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||!lt.isBrowser())return;const e=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();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`,U.requestAnimationFrame(()=>{n.style.opacity="1"}),setTimeout(()=>{n.style.transition="",n.style.opacity=""},s+80))})}),setTimeout(()=>this.cleanup(),s+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}}pt.registerFeatures({morphTypeChange:Vh});const ie="http://www.w3.org/1999/xhtml",Nr=18;function Br(f,t){const e=f.config.drilldown&&f.config.drilldown.breadcrumb||{};return Z(Z({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},e),t||{})}function Yr(f,t){const e=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(i=>f.dom.baseEl.querySelector(i)).filter(i=>i!==null);if(!e.length)return;const s=f.dom.elWrap.getBoundingClientRect().top;for(let i=0;i<e.length+1;i++){const a=t.getBoundingClientRect(),n=e.find(r=>{const o=r.getBoundingClientRect();return a.left<o.right&&a.right>o.left&&a.top<o.bottom&&a.bottom>o.top});if(!n)break;t.style.top=`${n.getBoundingClientRect().bottom-s+4}px`}}function Uh(f,t){const e=f.layout.translateY||0,s=f.dom.elWrap;if(!s)return e;const i=f.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!i.length)return e;const a=s.getBoundingClientRect().top,n=t.getBoundingClientRect();let r=e;for(let o=0;o<i.length;o++){const l=i[o].getBoundingClientRect();l.height&&(l.left>=n.right||l.right<=n.left||(r=Math.min(r,l.top-a)))}return r}function qh(f,t,e,s){var i;const a=(i=t==null?void 0:t.dimensions)==null?void 0:i.dimHelpers,n=a?a.getTitleSubtitleCoords("title").height+a.getTitleSubtitleCoords("subtitle").height:0,r=e.getBoundingClientRect().height||Nr,o=s&&s.offsetY||0,l=Uh(f,e);if(l-n>=r+1)return e.style.top=`${l-r-1+o}px`,!0;e.style.top=`${n+o}px`;const c=f.config.theme.mode==="dark";return e.style.background=c?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",e.style.borderRadius="4px",!1}function zr(f){const t=f.dom.elWrap;if(!t)return;const e=t.querySelector(".apexcharts-breadcrumb");e&&e.parentNode&&e.parentNode.removeChild(e)}function jh(f,t){if(!lt.isBrowser())return null;const e=f.dom.elWrap;if(!e)return null;zr(f);const s=t.config||Br(f);if(s.show===!1)return null;const i=t.crumbs||[];if(i.length<2)return null;const a=U.createElementNS(ie,"nav");a.setAttribute("class","apexcharts-breadcrumb"),a.setAttribute("aria-label",t.ariaLabel||"Breadcrumb"),Zh(a,s),t.compact&&(a.style.fontSize="11px",a.style.padding="0 2px");const n=s.separator!=null?s.separator:" / ";return i.forEach((r,o)=>{var l;if(o>0){const u=U.createElementNS(ie,"span");u.setAttribute("class","apexcharts-breadcrumb-separator"),u.setAttribute("aria-hidden","true"),u.textContent=n,a.appendChild(u)}let c=o===0?(l=s.rootLabel)!=null?l:"All":r.label;if(typeof s.formatter=="function"&&(c=s.formatter(c,{index:o,depth:i.length-1,data:r.data})),o===i.length-1){const u=U.createElementNS(ie,"span");u.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),u.setAttribute("aria-current","page"),u.textContent=String(c),a.appendChild(u);return}const h=U.createElementNS(ie,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),o===0){const u=U.createElementNS(ie,"span");u.setAttribute("class","apexcharts-breadcrumb-arrow"),u.setAttribute("aria-hidden","true"),u.textContent="â",h.appendChild(u)}const d=U.createElementNS(ie,"span");d.setAttribute("class","apexcharts-breadcrumb-label"),d.textContent=String(c),h.appendChild(d),h.addEventListener("click",()=>t.onNavigate(o,r)),a.appendChild(h)}),e.appendChild(a),a}function Zh(f,t){const e=t.offsetX||0,s=t.offsetY||0;f.style.position="absolute",f.style.top=s+"px",t.position==="top-right"?f.style.right=-e+3+"px":f.style.left=e+"px"}const ae="http://www.w3.org/1999/xhtml";class Kh{constructor(t,e,s){this.w=t,this.ctx=e,this.drilldown=s}render(t){if(!lt.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=U.createElementNS(ae,"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=U.createElementNS(ae,"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=U.createElementNS(ae,"span");d.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),d.setAttribute("aria-current","page"),d.textContent=c,n.appendChild(d)}else{const d=U.createElementNS(ae,"button");if(d.setAttribute("type","button"),d.setAttribute("class","apexcharts-breadcrumb-item"),l===0){const p=U.createElementNS(ae,"span");p.setAttribute("class","apexcharts-breadcrumb-arrow"),p.setAttribute("aria-hidden","true"),p.textContent="â",d.appendChild(p)}const u=U.createElementNS(ae,"span");u.setAttribute("class","apexcharts-breadcrumb-label"),u.textContent=c,d.appendChild(u),d.addEventListener("click",()=>this.drilldown.drillToLevel(l)),n.appendChild(d)}}),s.appendChild(n),this.w.globals.axisCharts&&qh(this.w,this.ctx,n,a),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.
1953style.left=s+"px"}}const Rs="http://www.w3.org/1999/xhtml",We="apexcharts-drilldown-loading";class Jh{constructor(t){this.w=t,this.el=null}_cfg(){const t=this.w.config.drilldown,e=t&&t.loading;return e===!1?{show:!1}:e||{}}show(){if(!lt.isBrowser())return;const t=this._cfg();if(t.show===!1)return;const e=this.w.dom.elWrap;if(!e)return;this.hide();const s=U.createElementNS(Rs,"div");s.setAttribute("class",We),s.setAttribute("role","status"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-label",t.text||"Loading");const i=U.createElementNS(Rs,"div");if(i.setAttribute("class",`${We}-spinner`),i.setAttribute("aria-hidden","true"),s.appendChild(i),t.text){const a=U.createElementNS(Rs,"span");a.setAttribute("class",`${We}-text`),a.textContent=t.text,s.appendChild(a)}e.appendChild(s),this.el=s}hide(){const t=this.w.dom.elWrap;if(t){const e=t.querySelectorAll(`.${We}`);for(let s=0;s<e.length;s++){const i=e[s];i.parentNode&&i.parentNode.removeChild(i)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}}const Ta=32,Ea="__apexDrilldownMarker";class Qh{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new Kh(t,e,this),this.loading=new Jh(t),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,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),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series)))}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>=Ta)return console.warn(`ApexCharts: drilldown max depth (${Ta}) 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 a=this.w.config.drilldown.onDrillDown,n=this._cacheGet(t);if(n)return this._drillInto(n,e,s);if(this._pending)return this._pending;let r;this.loading.show();try{r=a({id:t,point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}catch(c){return this.loading.hide(),this._fire("drillDownError",{id:t,error:c}),Promise.resolve(this.ctx)}const o=()=>{this._pending=null,this.loading.hide()},l=Promise.resolve(r).then(c=>{if(o(),this._isDead())return this.ctx;if(!c||!c.data)return this._fire("drillDownError",{id:t,error:new Error(`drilldown: onDrillDown resolved without a drillable level for id "${t}" (expected an object with a \`data\` array).`)}),this.ctx;const h=c.id!=null?c:it(Z({},c),{id:t});return this._cacheSet(t,h),this._drillInto(h,e,s)},c=>(o(),this._isDead()?this.ctx:(this._fire("drillDownError",{id:t,error:c}),this.ctx)));return this._pending=l,l}_isDead(){const t=this.w;return!t||!t.globals||t.globals.isDestroyed===!0}_cacheEnabled(){const t=this.w.config.drilldown;return!!(t&&t.cache!==!1)}_cacheGet(t){return!this._cacheEnabled()||t==null?null:this._asyncCache.get(t)||null}_cacheSet(t,e){!this._cacheEnabled()||t==null||this._asyncCache.set(t,e)}clearCache(t){return t==null?this._asyncCache.clear():this._asyncCache.delete(t),this.ctx}_snapshot(){const t=this.w.config,e=this._overrideFields(),s={series:this._uncollapseSeries(z.clone(t.series))};return Array.isArray(t.labels)&&t.labels.length&&(s.labels=z.clone(t.labels)),s.chart={type:t.chart.type,stacked:t.chart.stacked},e.has("xaxis")&&(s.xaxis=z.clone(t.xaxis)),e.has("yaxis")&&(s.yaxis=z.clone(t.yaxis)),e.has("colors")&&(s.colors=t.colors?z.clone(t.colors):void 0),e.has("plotOptions")&&(s.plotOptions=z.clone(t.plotOptions)),e.has("fill")&&(s.fill=z.clone(t.fill)),e.has("legend")&&(s.legend=z.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]&&t
1953ypeof 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=[],t.markers=it(Z({},t.markers||{}),{discrete:this._drillMarkers(t.series)});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(!lt.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();return{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 Ql(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=p=>{p.style.transformBox="view-box",p.style.transformOrigin=`${t.x}px ${t.y}px`},c=p=>{p.style.transform="",p.style.opacity="",p.style.transformOrigin="",p.style.transformBox=""},h=this._markGroup();let d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:r,opacity:0}
1953],{duration:n,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch(p){}}yield s();const u=this._markGroup();if(u){l(u),u.style.opacity="0",u.style.transform=o,d&&h===u&&d.cancel();const p=u.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 p.finished}catch(g){}c(u),p.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(){const t=this.w;!t.config.drilldown||!t.config.drilldown.enabled||(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series)))}_markDrillableTargets(){if(!lt.isBrowser())return;const t=this.w,e=t.dom.baseEl,s=t.config.series;if(!e||!Array.isArray(s))return;let i=0;s.forEach((a,n)=>{const r=a&&Array.isArray(a.data)?a.data:null;r&&r.forEach((o,l)=>{if(!o||typeof o!="object"||o.drilldown==null)return;const c=e.querySelectorAll(`[index="${n}"][j="${l}"]`);c.length||i++,c.forEach(h=>{this._isClickThroughMark(h)&&h.classList.remove("no-pointer-events"),h.classList.add("apexcharts-drilldown-target")})})}),i&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${i} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!lt.isBrowser())return;const t=this.w.dom.baseEl;!t||this._plotClickWired===t||(this._plotClickWired&&(this._plotClickWired.removeEventListener("mousedown",this._onPlotDown),this._plotClickWired.removeEventListener("click",this._onPlotClick)),t.addEventListener("mousedown",this._onPlotDown),t.addEventListener("click",this._onPlotClick),this._plotClickWired=t)}_onPlotDown(t){this._downAt={x:t.clientX,y:t.clientY}}_onPlotClick(t){const e=this.w;if(!e.config.drilldown||!e.config.drilldown.enabled)return;const s=this._downAt;if(this._downAt=null,s&&Math.hypot(t.clientX-s.x,t.clientY-s.y)>4)return;const i=t.target;if(!i||typeof i.closest!="function"||i.closest(".apexcharts-drilldown-target")||i.closest(".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip"))return;const a=e.interact.capturedSeriesIndex,n=e.interact.capturedDataPointIndex;if(a==null||n==null||a<0||n<0||!this._isPointBasedSeries(e.config.series[a]))return;const r=this._pointAt(a,n);if(!(!r||typeof r!="object"||r.drilldown==null))return this.drillDown(r.drilldown,r,{seriesIndex:a,dataPointIndex:n})}_isClickThroughMark(t){return!t.classList||!t.classList.contains("no-pointer-events")||!t.classList.contains("apexcharts-marker")?!1:!(typeof t.closest=="function"&&t.closest(".apexcharts-tooltip"))}_drillMarkers(t){const e=this.w,s=e.config.drilldown,i=Array.isArray(e.config.markers&&e.config.markers.discrete)?e.config.markers.discrete.filter(r=>!r||!r[Ea]):[],a=s&&s.marker||{};if(a.show===!1||!Array.isArray(t))return i;const n=[];return t.forEach((r,o)=>{if(!this._seriesNeedsDrillMarker(o,r))return;const l=r&&Array.isArray(r.data)?r.data:null;l&&l.forEach((c,h)=>{if(!c||typeof c!="object"||c.drilldown==null)return;const d={seriesIndex:o,dataPointIndex:h,[Ea]:!0};a.size!==void 0&&(d.size=a.size),a.shape!==void 0&&(d.shape=a.shape),a.fillColor!==void 0&&(d.fillColor=a.fillColor),a.strokeColor!==void 0&&(d.strokeColor=a.strokeColor),n.push(d)})}),i.concat(n)}_seriesNeedsDrillMarker(t,e){if(!this._isPointBasedSeries(e))return!1;const s=this.w.config.markers&&this.w.config.markers.size,i=Array.isArray(s)?s[t]:s;return!(Number(i)>0)}_isPointBasedSeries(t){const e=t&&t.type||this.w.config.chart.type;return e==="line"||e==="area"}}pt.registerFeatures({drilldown:Qh});const Fs="__apexcharts_plugins__";function td(){const f=globalThis;return f[Fs]||(f[Fs]={}),f[Fs]}function ed(f){return td()[f]||null}const ci=1,sd=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","highlightSeries","isSeriesHidden","zoomX","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","dataURI","exportToCSV"];function id(f){const t={};
1953return sd.forEach(e=>{typeof f[e]=="function"&&(t[e]=f[e].bind(f))}),Object.freeze(t)}function ad(f,t){const e=i=>(i&&f.add(i),i),s={get node(){return f.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=f.node;for(;i.firstChild;)i.removeChild(i.firstChild);return s}};return s}function nd(f,t){const e=f.ctx,s=f.w,i={name:t.def.name,version:ci,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 f._layer(t.def.name,a||{})},get scales(){return f._currentScales},get data(){return f._lastData||(f._lastData=f._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 f._token(a)}}),chart:id(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 rd{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=ed(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)!==ci){console.error(`[apexcharts] plugin "${e.name}" targets Weave API v${s}, host is v${ci}; skipped.`);return}const i={def:e,options:Object.freeze(Z({},t.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};i.api=nd(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 ad(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(Z({},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()}}pt.registerFeatures({weave:rd});function ys(f,t){const e=f&&f.renderer;return e&&e.kind&&e.kind!=="svg"?e:t}function od(f,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;
1953const l=this.w,c=new G(l,this.ctx),h=ys(this.ctx,c),d=c.group({class:"apexcharts-marks-series"});return i.forEach((u,p)=>{var g;const x=Array.isArray(n)?n[p]:p,b=c.group({class:"apexcharts-series",rel:x+1,seriesName:z.escapeString(l.seriesData.seriesNames[x]),"data:realIndex":x}),m=this._scales(x,(l.seriesData.series[x]||[]).length),A=l.globals.colors[x],v=((g=l.config.series[x])==null?void 0:g.data)||[],y=l.seriesData.seriesX[x]||[],w=l.seriesData.series[x]||[];l.globals.seriesXvalues[x]=[],l.globals.seriesYvalues[x]=[],typeof l.globals.pointsArray[x]=="undefined"&&(l.globals.pointsArray[x]=[]);for(let S=0;S<w.length;S++){const _=w[S];if(_===null||typeof _=="undefined")continue;const k=y[S],M=m.xAt(S,k),C=m.y(_),L=this._api(h,b,x,S);try{t.renderItem({datum:v[S],x:M,y:C,scales:m,api:L,seriesIndex:x,dataPointIndex:S,color:A})}catch(T){this._warned||(console.warn(`[apexcharts] renderItem for series type "${f}" threw; skipping datum:`,T),this._warned=!0)}l.globals.seriesXvalues[x][S]=M,l.globals.seriesYvalues[x][S]=C,l.globals.pointsArray[x][S]=[M,C]}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,u=this.xyRatios.yRatio,p=(r=(n=c.seriesYAxisReverseMap)==null?void 0:n[i])!=null?r:0,g=Array.isArray(u)?(o=u[p])!=null?o:u[0]:u,x=c.maxYArr,b=Array.isArray(x)&&x.length&&(l=x[p])!=null?l:c.maxY,m=c.gridWidth,A=c.gridHeight,v=!c.isXNumeric,y=a||c.dataPoints||1,w=y>0?m/y:m,S=h.xaxis.tickPlacement==="on",_=T=>d?(T-c.minX)/d:m/2,k=T=>(b-T)/g,M=(T,D)=>v?S&&y>1?T/(y-1)*m:(T+.5)*w:_(D),C=c.minXDiff||1,L=v?w:d?C/d:m;return{x:_,xAt:M,y:k,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(c){}a.add(l)}return l};return{path:(l={})=>{var c,h,d,u,p,g,x,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:(u=l.fill)!=null?u:"none",fillOpacity:(g=l.fillOpacity)!=null?g:l.fill&&l.fill!=="none"?(p=l.opacity)!=null?p:1:0,strokeOpacity:(b=(x=l.strokeOpacity)!=null?x:l.opacity)!=null?b:1,strokeDashArray:(m=l.dash)!=null?m:0,strokeLinecap:l.lineCap}))},line:(l={})=>{var c,h,d,u;return o(i.drawLine(l.x1,l.y1,l.x2,l.y2,(c=l.stroke)!=null?c:"#000",(h=l.dash)!=null?h:0,(u=(d=l.width)!=null?d:l.strokeWidth)!=null?u:1))},rect:(l={})=>{var c,h,d,u,p,g,x,b;return o(i.drawRect((c=l.x)!=null?c:0,(h=l.y)!=null?h:0,(d=l.w)!=null?d:0,(u=l.h)!=null?u:0,(p=l.r)!=null?p:0,(g=l.fill)!=null?g:"#000",(x=l.opacity)!=null?x:1,l.stroke!=null?(b=l.strokeWidth)!=null?b:1:null,l.stroke))},circle:(l={})=>{var c,h,d,u,p;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:(u=l.fill)!=null?u:"#000",stroke:l.stroke||"none","stroke-width":(p=l.strokeWidth)!=null?p:l.stroke?1:0}))},text:(l={})=>{var c,h,d,u;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:(u=l.anchor)!=null?u:"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}pt._customSeriesFactory=od;const ld="(prefers-color-scheme: dark)",cd="(prefers-contrast: more)";class he{constructor(t,e){if(this.w=t,this.ctx=e,t.config.theme.follow!=="os"||!lt.isBrowser())return;const s=this._ensureMedia();s&&(this._applyToConfig(s),this._ensureListeners(s))}_ensureMedia(){if(!this.ctx._osThemeMedia){const t=U.matchMedia(ld),e=U.matchMedia(cd);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;
1953const 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)};he._add(t.dark,s),he._add(t.contrast,s),t.handler=s}teardown(){const t=this.ctx._osThemeMedia;t&&(t.handler&&(he._remove(t.dark,t.handler),he._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))}}pt.registerFeatures({osThemeWatcher:he});const hi="__apexcharts_series_transforms__";globalThis[hi]||(globalThis[hi]={});function hd(){return globalThis[hi]}function be(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerSeriesTransform("${f}") expects a function (series, w) => series.`);return}hd()[f]=t}const di="__apexcharts_row_sources__";globalThis[di]||(globalThis[di]={});function dd(){return globalThis[di]}function Ni(f,t){if(!f||typeof f!="string"){console.warn("ApexCharts: registerRowSource requires a non-empty name.");return}if(typeof t!="function"){console.warn(`ApexCharts: registerRowSource("${f}") expects a function (w, opts) => series.`);return}dd()[f]=t}const Pa=1e3;function Ft(f,t){const e=f.length;if(e===0)return NaN;if(e===1)return f[0];const s=(e-1)*t,i=Math.floor(s),a=Math.ceil(s);return i===a?f[i]:f[i]+(f[a]-f[i])*(s-i)}function $r(f){const t=f.length;if(t<2)return 0;let e=0;for(let a=0;a<t;a++)e+=f[a];const s=e/t;let i=0;for(let a=0;a<t;a++){const n=f[a]-s;i+=n*n}return Math.sqrt(i/t)}function ud(f,t,e){const s=f.length,i=a=>t/Math.max(1,Math.ceil(a));switch(e){case"sqrt":return{width:i(Math.sqrt(s)),rule:"sqrt"};case"rice":return{width:i(2*Math.cbrt(s)),rule:"rice"};case"scott":{const a=$r(f);return a>0?{width:3.49*a*Math.pow(s,-1/3),rule:"scott"}:{width:i(Math.log2(s)+1),rule:"sturges"}}case"fd":{const a=Ft(f,.75)-Ft(f,.25);return a>0?{width:2*a*Math.pow(s,-1/3),rule:"fd"}:{width:i(Math.log2(s)+1),rule:"sturges"}}case"auto":{const a=i(Math.log2(s)+1),n=Ft(f,.75)-Ft(f,.25);if(n<=0)return{width:a,rule:"sturges"};const r=2*n*Math.pow(s,-1/3);return r<a?{width:r,rule:"fd"}:{width:a,rule:"sturges"}}default:return{width:i(Math.log2(s)+1),rule:"sturges"}}}function fd(f,t={}){if(!Array.isArray(f)||f.length===0)return null;const e=f.slice().sort((d,u)=>d-u);let s=e[0],i=e[e.length-1];const a=t.range;if(Array.isArray(a)&&a.length===2){const d=Number(a[0]),u=Number(a[1]);isFinite(d)&&isFinite(u)&&u>d&&(s=d,i=u)}if(!(i>s)){const d=Math.abs(s)>0?Math.abs(s)*.05:.5;return{edges:[s-d,s+d],binWidth:d*2,rule:"single",capped:!1}}const n=i-s;let r,o;if(typeof t.binWidth=="number"&&t.binWidth>0)r=t.binWidth,o="binWidth";else if(typeof t.bins=="number"&&t.bins>=1)r=n/Math.floor(t.bins),o="count";else{const d=ud(e,n,typeof t.bins=="string"?t.bins:"auto");r=d.width,o=d.rule}(!isFinite(r)||r<=0)&&(r=n);let l=Math.ceil(n/r);(!isFinite(l)||l<1)&&(l=1);let c=!1;l>Pa&&(l=Pa,r=n/l,c=!0),r=n/l;const h=new Array(l+1);for(let d=0;d<=l;d++)h[d]=s+d*r;return h[l]=Math.max(h[l],i),{edges:h,binWidth:r,rule:o,capped:c}}function Hr(f,t){const e=t.length-1;if(!(f>=t[0])||f>t[e])return-1;if(f===t[e])return e-1;const s=(t[e]-t[0])/e;if(s>0){let n=Math.floor((f-t[0])/s);return n<0&&(n=0),n>e-1&&(n=e-1),f<t[n]?n--:f>=t[n+1]&&n++,n<0||n>e-1?-1:n}let i=0,a=e-1;for(;i<=a;){const n=i+a>>1;if(f<t[n])a=n-1;else if(f>=t[n+1])i=n+1;else return n}return-1}function pd(f,t){const e=new Array(Math.max(0,t.length-1)).fill(0);for(let s=0;s<f.length;s++){const i=Hr(f[s],t);i>=0&&e[i]++}return e}function gd(f,t){const e=Math.max(0,t.length-1),s=new Array(e);for(let i=0;i<e;i++)s[i]=[];for(let i=0;i<f.length;i++){const a=Hr(f[i],t);a>=0&&s[a].push(f[i])}return s}function xd(f,t={}){if(!Array.isArray(f)||f.length===0)return null;const e=f.slice().sort((c,h)=>c-h),s=Ft(e,.25),i=Ft(e,.5),a=Ft(e,.75),n=a-s;let r=e[0],o=e[e.length-1],l=[];
1953if(t.whiskers==="tukey"&&n>0){const c=s-1.5*n,h=a+1.5*n;let d=0;for(;d<e.length&&e[d]<c;)d++;let u=e.length-1;for(;u>=0&&e[u]>h;)u--;d<=u&&(r=e[d],o=e[u],l=e.slice(0,d).concat(e.slice(u+1)))}return{summary:[r,s,i,a,o],outliers:l,iqr:n}}function md(f,t={}){if(!Array.isArray(f)||f.length===0)return null;const e=f.slice().sort((h,d)=>h-d),s=e.length;let i=t.bandwidth;if(!(typeof i=="number"&&i>0)){const h=$r(e),d=Ft(e,.75)-Ft(e,.25);i=.9*(d>0?Math.min(h,d/1.349):h)*Math.pow(s,-1/5)}if(!isFinite(i)||i<=0){const h=e[0],d=Math.abs(h)>0?Math.abs(h)*.001:.001;return{density:[[h-d,0],[h,1],[h+d,0]],bandwidth:d}}const a=Math.max(8,Math.floor(t.resolution||64)),n=e[0]-2*i,o=(e[s-1]+2*i-n)/(a-1),l=1/(s*i*Math.sqrt(2*Math.PI)),c=[];for(let h=0;h<a;h++){const d=n+h*o;let u=0;for(let p=0;p<s;p++){const g=(d-e[p])/i;u+=Math.exp(-.5*g*g)}c.push([d,u*l])}return{density:c,bandwidth:i}}function bd(f,t={}){let e=f.slice();if(t.cumulative){let i=0;e=e.map(a=>i+=a)}const s=f.reduce((i,a)=>i+a,0);if(s<=0)return e;if(t.normalize==="relative")return e.map(i=>i/s*100);if(t.normalize==="density"){const i=t.binWidth;
1953if(typeof i=="number"&&i>0)return e.map(a=>a/(s*i))}return e}function Wr(f,t){var e;if(!f||typeof f!="object"||Array.isArray(f))return null;let s=null;if(Array.isArray(f.points)?s=f.points:Array.isArray((e=f.y)==null?void 0:e.points)?s=f.y.points:t&&Array.isArray(f.y)&&typeof f.y[0]=="number"&&(s=f.y),!s)return null;const i=[];for(let a=0;a<s.length;a++){const n=z.parseNumber(s[a]);n!==null&&isFinite(n)&&i.push(n)}return i.length?i:null}function Gr(f){const t=[];if(!Array.isArray(f))return t;for(let e=0;e<f.length;e++){const s=f[e];let i=s;Array.isArray(s)?i=s.length===1?s[0]:s[1]:s&&typeof s=="object"&&(i=s.y!==void 0?s.y:s.x);const a=z.parseNumber(i);a!==null&&isFinite(a)&&t.push(a)}return t}function yd(f,t){var e;const s=t.config,i=t.globals;if(!Array.isArray(f))return f;i.histogramRawSeries||(i.histogramRawSeries=f.map(p=>it(Z({},p),{data:Array.isArray(p==null?void 0:p.data)?p.data.slice():p==null?void 0:p.data})));const a=i.histogramRawSeries,n=((e=s.plotOptions)==null?void 0:e.histogram)||{},r=a.map(p=>Gr(p==null?void 0:p.data));let o=[];if(r.length===1)o=r[0];else for(const p of r)o=o.concat(p);const l=fd(o,{bins:n.bins,binWidth:n.binWidth,range:n.range});if(!l)return t.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},a;const{edges:c,binWidth:h}=l,d=r.map(p=>pd(p,c));t.histogramData={edges:c,binWidth:h,counts:d,rule:l.rule,capped:l.capped};const u=i.collapsedSeriesIndices||[];return a.map((p,g)=>{if(u.indexOf(g)!==-1)return it(Z({},p),{data:[]});const x=bd(d[g],{normalize:n.normalize,cumulative:n.cumulative,binWidth:h}),b=[];for(let m=0;m<x.length;m++)b.push({x:(c[m]+c[m+1])/2,y:x[m]});return it(Z({},p),{data:b})})}const cs=new WeakSet;function wd(f,t){var e,s;if(!Array.isArray(f))return f;const i=((s=(e=t.config.plotOptions)==null?void 0:e.boxPlot)==null?void 0:s.whiskers)||"minmax";return f.map(a=>{if(!Array.isArray(a==null?void 0:a.data))return a;let n=!1;const r=a.data.map(o=>{if(Array.isArray(o==null?void 0:o.y)&&o.y.length===5&&!cs.has(o))return o;const l=Wr(o,!1);if(!l)return o;const c=xd(l,{whiskers:i});if(!c)return o;n=!0;const h=it(Z({},o),{y:c.summary,points:l});return cs.add(h),h});return n?it(Z({},a),{data:r}):a})}function vd(f,t){var e,s;if(!Array.isArray(f))return f;const i=((s=(e=t.config.plotOptions)==null?void 0:e.violin)==null?void 0:s.kde)||{};return f.map(a=>{if(!Array.isArray(a==null?void 0:a.data))return a;let n=!1;const r=a.data.map(o=>{var l;if(Array.isArray((l=o==null?void 0:o.y)==null?void 0:l.density)&&o.y.density.length&&!cs.has(o))return o;const c=Wr(o,!0);if(!c)return o;const h=md(c,{bandwidth:i.bandwidth,resolution:i.resolution});if(!h)return o;n=!0;const d=it(Z({},o),{y:{density:h.density,points:c}});return cs.add(d),d});return n?it(Z({},a),{data:r}):a})}const Ad=3e3;function Sd(f,t){let e=0,s=0;for(const o of f)e+=o.length,o.length>s&&(s=o.length);if(e<=t)return{clusters:f,stride:1,total:e,kept:e};const i=o=>{let l=0;for(const c of f)l+=Math.ceil(c.length/o);return l};let a=Math.max(2,Math.ceil(e/t));for(;a<s&&i(a)>t;)a++;let n=0;return{clusters:f.map(o=>{const l=[];for(let c=0;c<o.length;c+=a)l.push(o[c]);return n+=l.length,l}),stride:a,total:e,kept:n}}function Vr(f,t,e){const s=e&&e.maxRows!=null?e.maxRows:Ad,i=Sd(t.map(n=>n.rows),s);i.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${i.total} rows to ${i.kept} (every ${i.stride}${i.stride===2?"nd":i.stride===3?"rd":"th"} row) to stay under maxRows=${s}. Raise maxRows to draw more.`);const a=f.globals&&f.globals.colors||[];return t.map((n,r)=>{const o=a[n.realIndex]||a[0];
1953return{name:n.name,data:i.clusters[r].map((l,c)=>Z({id:`${n.realIndex}:${r}:${c}`,x:n.name,y:l},o?{fillColor:o}:{}))}})}function _d(f,t){const e=f.globals,s=f.histogramData,i=e&&e.histogramRawSeries;if(!s||!Array.isArray(s.edges)||s.edges.length<2||!Array.isArray(i)||!i.length)return null;const a=e&&e.collapsedSeriesIndices||[],n=s.edges,r=[];return i.forEach((o,l)=>{var c;if(a.indexOf(l)!==-1)return;const h=gd(Gr(o&&o.data),n),d=f.seriesData&&((c=f.seriesData.seriesNames)==null?void 0:c[l])||(o==null?void 0:o.name);h.forEach((u,p)=>{const g=`${Ra(n[p])}-${Ra(n[p+1])}`;r.push({name:i.length>1&&d?`${d} ${g}`:g,realIndex:l,rows:u})})}),r.length?Vr(f,r,t):null}function Ra(f){if(!isFinite(f))return String(f);const t=Math.round(f);return Math.abs(f-t)<1e-6?String(t):String(Number(f.toFixed(2)))}function Ur(f){return(t,e)=>{var s;const i=f(t);if(!Array.isArray(i)||!i.length)return null;const a=t.globals&&t.globals.collapsedSeriesIndices||[],n=t.globals&&((s=t.globals.categoryLabels)!=null&&s.length?t.globals.categoryLabels:t.globals.labels)||[],r=[];return i.forEach((o,l)=>{var c;if(a.indexOf(l)!==-1||!Array.isArray(o))return;const h=t.seriesData&&((c=t.seriesData.seriesNames)==null?void 0:c[l]);o.forEach((d,u)=>{const p=n[u]!=null?String(n[u]):`#${u+1}`;r.push({name:i.length>1&&h?`${h} ${p}`:p,realIndex:l,rows:Array.isArray(d)?d.slice():[]})})}),r.length?Vr(t,r,e):null}}const Cd=Ur(f=>{var t;return(t=f.candleData)==null?void 0:t.seriesBoxPoints}),kd=Ur(f=>{var t;return(t=f.violinData)==null?void 0:t.seriesViolinPoints});be("histogram",yd);be("boxPlot",wd);be("violin",vd);Ni("histogram",_d);Ni("boxPlot",Cd);Ni("violin",kd);class Md{constructor(t,e){this.w=t,this.ctx=e}isActive(){return this.w.config.chart.requestedType==="waterfall"}drawConnectors(){var t,e;const s=this.w;if(!this.isActive())return;const i=(e=(t=s.config.plotOptions)==null?void 0:t.waterfall)==null?void 0:e.connectors;if(!i||i.show===!1)return;const a=s.dom.elGraphical,n=s.waterfallData&&s.waterfallData.geometry;if(!a||!n)return;this.removeConnectors();const r=new G(s,this.ctx),o=r.group({class:"apexcharts-waterfall-connectors"}),l=i.color||s.config.grid.borderColor,c=i.strokeWidth==null?1:i.strokeWidth,h=i.strokeDashArray==null?3:i.strokeDashArray;let d=0;for(let p=0;p<n.length;p++){const g=n[p];if(Array.isArray(g))for(let x=0;x<g.length-1;x++){const b=g[x],m=g[x+1];if(!b||!m||!(m.slotStart-b.slotEnd>.5))continue;const v=b.horizontal?r.drawLine(b.levelEnd,b.slotEnd,b.levelEnd,m.slotStart,l,h,c):r.drawLine(b.slotEnd,b.levelEnd,m.slotStart,b.levelEnd,l,h,c);v.node.classList.add("apexcharts-waterfall-connector"),o.add(v),d++}}if(!d)return;o.attr("clip-path",`url(#gridRectBarMask${s.globals.cuid})`);const u=a.node.querySelector(".apexcharts-xaxis");u?a.node.insertBefore(o.node,u):a.add(o),this.holdUntilBarsLand(o)}removeConnectors(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-waterfall-connectors");e&&e.parentNode&&e.parentNode.removeChild(e)}holdUntilBarsLand(t){const e=this.w;lt.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}function Ld(f,t,e){const s=e&&e[t]!==void 0?e[t]:t+1;return f==null?{x:s,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(f)?{x:f[0]!==void 0?f[0]:s,y:f[1],isSubtotal:!1,isTotal:!1,rest:{}}:typeof f=="object"?{x:f.x!==void 0?f.x:s,y:f.y,isSubtotal:f.isSubtotal===!0,isTotal:f.isTotal===!0,rest:f}:{x:s,y:f,isSubtotal:!1,isTotal:!1,rest:{}}}function Dd(f){for(let t=0;t<f.length;t++){const e=f[t],s=Array.isArray(e)?e[1]:e&&typeof e=="object"?e.y:e;if(Array.isArray(s)&&s.length===2)return!0}return!1}function Td(f,t,e){if(f&&f.fillColor)return f.fillColor;const s=e[t];return typeof s=="string"&&s?s:void 0}function Ed(f,t,e){const s=[],i=[],a=[],n=[];let r=0,o=0;for(let l=0;l<f.length;l++){const{x:c,y:h,isSubtotal:d,isTotal:u,rest:p}=Ld(f[l],l,t);let g,x,b;if(u||d)g=u?0:o,x=r,b=u?"total":"subtotal",o=r;else{const A=z.parseNumber(h);if(A===null||!isFinite(A)){s.push(it(Z({},p),{x:c,y:null})),i.push(null),a.push(r),n.push(null);continue}
1953g=r,x=r+A,r=x,b=A<0?"negative":"positive"}const m=Td(p,b,e);s.push(Z(it(Z({},p),{x:c,y:[g,x]}),m?{fillColor:m}:{})),i.push(x-g),a.push(r),n.push(b)}return{data:s,values:i,cumulative:a,kinds:n}}function Pd(f,t){var e,s,i;const a=t.config,n=t.globals;if(!Array.isArray(f))return f;n.waterfallRawSeries||(n.waterfallRawSeries=f.map(g=>it(Z({},g),{data:Array.isArray(g==null?void 0:g.data)?g.data.slice():g==null?void 0:g.data})));const r=n.waterfallRawSeries,o=((s=(e=a.plotOptions)==null?void 0:e.waterfall)==null?void 0:s.colors)||{},l=(i=a.xaxis)==null?void 0:i.categories,c=n.collapsedSeriesIndices||[],h=[],d=[],u=[],p=r.map((g,x)=>{const b=Array.isArray(g==null?void 0:g.data)?g.data:[];if(c.indexOf(x)!==-1)return h[x]=[],d[x]=[],u[x]=[],it(Z({},g),{data:[]});if(Dd(b))return h[x]=b.map(A=>{const v=Array.isArray(A)?A[1]:A&&typeof A=="object"?A.y:A;if(!Array.isArray(v))return null;const y=z.parseNumber(v[0]),w=z.parseNumber(v[1]);return y===null||w===null?null:w-y}),d[x]=b.map(A=>{const v=Array.isArray(A)?A[1]:A&&typeof A=="object"?A.y:A,y=Array.isArray(v)?z.parseNumber(v[1]):null;return y===null?0:y}),u[x]=b.map(()=>null),g;const m=Ed(b,l,o);return h[x]=m.values,d[x]=m.cumulative,u[x]=m.kinds,it(Z({},g),{data:m.data})});return t.waterfallData={values:h,cumulative:d,kinds:u,geometry:[]},p}be("waterfall",Pd);pt.registerFeatures({waterfall:Md});function Rd(f,t,e){const s=e&&e[t]!==void 0?e[t]:t+1;return f==null?{x:s,y:null,rest:{}}:Array.isArray(f)?{x:f[0]!==void 0?f[0]:s,y:f[1],rest:{}}:typeof f=="object"?{x:f.x!==void 0?f.x:s,y:f.y,rest:f}:{x:s,y:f,rest:{}}}function Fd(f){for(let t=0;t<f.length;t++){const e=f[t],s=Array.isArray(e)?e[1]:e&&typeof e=="object"?e.y:e;if(Array.isArray(s)&&s.length===2)return!0}return!1}function Od(f,t){var e;const s=[],i=[],a=new Map,n=[];for(let r=0;r<f.length;r++){const o=Array.isArray((e=f[r])==null?void 0:e.data)?f[r].data:[],l=new Map;for(let c=0;c<o.length;c++){const{x:h,y:d,rest:u}=Rd(o[c],c,t),p=h instanceof Date?h.getTime():h;a.has(p)||(a.set(p,s.length),s.push(h),i.push(Z({},u)));const g=a.get(p);l.set(g,z.parseNumber(d))}n.push(l)}return{xs:s,rows:i,byX:n}}function Xd(f,t){var e;const s=t.config,i=t.globals;if(!Array.isArray(f))return f;i.dumbbellRawSeries||(i.dumbbellRawSeries=f.map(b=>it(Z({},b),{data:Array.isArray(b==null?void 0:b.data)?b.data.slice():b==null?void 0:b.data})));const a=i.dumbbellRawSeries;if(a.some(b=>Fd(Array.isArray(b==null?void 0:b.data)?b.data:[])))return t.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},f;const r=(e=s.xaxis)==null?void 0:e.categories,o=i.collapsedSeriesIndices||[],{xs:l,rows:c,byX:h}=Od(a,r),d=[],u=[],p=[];for(let b=0;b<a.length;b++)o.indexOf(b)===-1&&p.push(b);const g=[];for(let b=0;b<l.length;b++){const m=[];for(let S=0;S<a.length;S++){const _=h[S].has(b)?h[S].get(b):null;m.push(_==null||!isFinite(_)?null:_)}d.push(m);let A=null,v=null,y=-1,w=-1;for(let S=0;S<p.length;S++){const _=p[S],k=m[_];k!==null&&((A===null||k<A)&&(A=k,y=_),(v===null||k>v)&&(v=k,w=_))}if(A===null||v===null){u.push(null),g.push(it(Z({},c[b]),{x:l[b],y:null}));continue}u.push([y,w]),g.push(it(Z({},c[b]),{x:l[b],y:[A,v]}))}t.dumbbellData={form:"series",names:a.map((b,m)=>{var A;return(A=b==null?void 0:b.name)!=null?A:`Series ${m+1}`}),values:d,order:u,carrier:p.length?p[0]:0,hidden:a.map((b,m)=>m).filter(b=>o.indexOf(b)!==-1)};const x=t.dumbbellData.carrier;return a.map((b,m)=>it(Z({},b),{data:m===x&&p.length?g:[]}))}be("dumbbell",Xd);const Ge=3;class Id{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return this.w.config.chart.requestedType==="streamgraph"}_yPx(t){var e;const s=this.w,i=s.globals,a=s.layout.gridHeight,n=i.maxY-i.minY;if(!n||!isFinite(n))return a/2;const r=(t-i.minY)/n;return(e=s.config.yaxis[0])!=null&&e.reversed?r*a:a-r*a}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,s,i,a,n,r;const o=this.w;if(!this.isActive())return;const l=(e=(t=o.config.plotOptions)==null?void 0:t.streamgraph)==null?void 0:e.labels;if(!l||l.show===!1)return;const c=o.dom.elGraphical,h=o.streamgraphData;if(!c||!h)return;this.removeLabels();const d=new G(o,this.ctx),u=d.group({class:"apexcharts-streamgraph-labels"}),p=((s=l.style)==null?void 0:s.fontSize)||"auto",g=((i=l.style)==null?void 0:i.fontFamily)||o.config.chart.fontFamily,x=((a=l.style)==null?void 0:a.fontWeight)||600,b=l.minWidth==null?24:l.minWidth,m=[];for(let y=0;y<h.order.length;y++){const w=h.order[y],S=this._placeLabel(w,{fontSize:p,fontFamily:g,fontWeight:x,minWidth:b,graphics:d});S&&m.push(S)}let A=0;for(const y of this._deconflict(m)){const w=y.k,S=d.drawText({x:y.x,y:y.y,text:y.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:y.fontSize,fontFamily:g,fontWeight:x,foreColor:((r=(n=l.style)==null?void 0:n.colors)==null?void 0:r[w])||y.color,cssClass:"apexcharts-streamgraph-label"});S.node.setAttribute("data:realIndex",String(w)),u.add(S),A++}if(!A)return;const v=c.node.querySelector(".apexcharts-xaxis");v?c.node.insertBefore(u.node,v):c.add(u),this.holdUntilBandsLand(u)}_placeLabel(t,{fontSize:e,fontFamily:s,fontWeight:i,minWidth:a,graphics:n}){const r=this.w,o=r.streamgraphData,l=o.lows[t],c=o.highs[t];if(!l||!c)return null;const h=r.globals.seriesXvalues[t],d=l.length;if(!Array.isArray(h)||h.length<d||d===0)return null;const u=new Array(d);let p=0;for(let w=0;w<d;w++){const S=Math.abs(this._yPx(c[w])-this._yPx(l[w]));u[w]=S,S>p&&(p=S)}if(p<=0)return null;const g=this._resolveFontSize(e,p),x=String(o.names[t]);let b=g,m=n.getTextRects(x,`${b}px`,s,"",!0,i);if(p<m.height+Ge*2)return null;const A=this._widestRun(u,h,m.height+Ge*2,d);if(!A)return null;if(m.width>A.width&&e==="auto"){const w=Math.floor(b*(A.width/m.width));if(w<this._autoBounds().min||(b=w,m=n.getTextRects(x,`${b}px`,s,"",!0,i),p<m.height+Ge*2))return null}const v=m.height+Ge*2,y=[];for(const w of this._runs(u,v,d)){const S=Number(h[w.l]),_=Number(h[w.r]);if(!isFinite(S)||!isFinite(_))continue;let k=_-S;if(k<=0&&d>1){const T=Math.abs(Number(h[Math.min(w.r+1,d-1)])-Number(h[Math.max(w.l-1,0)]));k=isFinite(T)?T:0}if(k<a||k<m.width*.35)continue;const M=m.width<=k?x:n.getTextBasedOnMaxWidth({text:x,maxWidth:k,fontSize:`${b}px`,fontFamily:s});if(!M||M==="...")continue;const C=M===x?m.width:m.width*(M.length/x.length),L=[S+k/2];k>C*2.2&&L.push(S+C/2+2,_-C/2-2);for(const T of L){let D=w.l,E=1/0;for(let R=w.l;R<=w.r;R++){const P=Math.abs(Number(h[R])-T);P<E&&(E=P,D=R)}y.push({x:T,y:(this._yPx(l[D])+this._yPx(c[D]))/2,text:M,color:this._contrastOn(t),fontSize:`${b}px`,width:C,height:m.height})}if(y.length>=6)break}
1953return y.length?{k:t,weight:p,candidates:y}:null}_runs(t,e,s){const i=[];let a=0;for(;a<s;){if(t[a]<e){a++;continue}let n=a,r=t[a];for(;n+1<s&&t[n+1]>=e;)n++,t[n]>r&&(r=t[n]);i.push({l:a,r:n,maxT:r}),a=n+1}return i.sort((n,r)=>r.maxT-n.maxT)}_widestRun(t,e,s,i){let a=-1;for(const n of this._runs(t,s,i)){const r=Number(e[n.r])-Number(e[n.l]);isFinite(r)&&r>a&&(a=r)}return a>=0?{width:a}:null}_deconflict(t){const e=t.slice().sort((a,n)=>n.weight-a.weight),s=[],i=a=>!s.some(n=>a.left<n.box.right&&a.right>n.box.left&&a.top<n.box.bottom&&a.bottom>n.box.top);for(const a of e)for(const n of a.candidates){const r={left:n.x-n.width/2,right:n.x+n.width/2,top:n.y-n.height/2,bottom:n.y+n.height/2};if(i(r)){s.push(it(Z({k:a.k},n),{box:r}));break}}return s}_autoBounds(){var t,e;const s=((e=(t=this.w.config.plotOptions)==null?void 0:t.streamgraph)==null?void 0:e.labels)||{};return{min:s.minFontSize==null?9:s.minFontSize,max:s.maxFontSize==null?30:s.maxFontSize}}_resolveFontSize(t,e){if(t!=="auto"){const a=parseFloat(t);return isFinite(a)&&a>0?a:12}const{min:s,max:i}=this._autoBounds();return Math.max(s,Math.min(i,Math.round(e*.36)))}_contrastOn(t){var e;const s=this.w,i=(e=s.globals.colors)==null?void 0:e[t],a=typeof i=="string"?z.parseHex(i):null;return a?z.relativeLuminance(a)>.45?"#000000":"#ffffff":s.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!lt.isBrowser()||this._hoverCfg().show===!1)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");!e||e.__apexStreamHover||(e.__apexStreamHover=!0,e.addEventListener("mousemove",s=>{!this.isActive()||!this.w.streamgraphData||this._dim(this._bandAt(s))}),e.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var t,e;return((e=(t=this.w.config.plotOptions)==null?void 0:t.streamgraph)==null?void 0:e.hover)||{}}_bandAt(t){const e=this.w,s=e.streamgraphData;if(!s||!s.order.length)return-1;const i=e.dom.baseEl&&e.dom.baseEl.querySelector(".apexcharts-svg");if(!i)return-1;const a=i.getBoundingClientRect(),n=e.globals.svgWidth?a.width/e.globals.svgWidth:1,r=_t.screenXToPlotPx(e,t.clientX),o=(t.clientY-a.top)/(n||1)-e.layout.translateY;if(r<0||r>e.layout.gridWidth||o<0||o>e.layout.gridHeight)return-1;const l=e.globals.seriesXvalues[s.order[0]];if(!Array.isArray(l)||!l.length)return-1;const c=e.interact?e.interact.capturedDataPointIndex:-1;let h=-1;if(c>=0&&c<l.length)h=c;else{let p=1/0;for(let g=0;g<l.length;g++){const x=Math.abs(Number(l[g])-r);x<p&&(p=x,h=g)}}if(h<0)return-1;let d=-1,u=1/0;for(let p=0;p<s.order.length;p++){const g=s.order[p],x=this._yPx(s.highs[g][h]),b=this._yPx(s.lows[g][h]),m=Math.min(x,b),A=Math.max(x,b);if(o>=m&&o<=A)return g;const v=o<m?m-o:o-A;v<u&&(u=v,d=g)}return d}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const s=this._hoverCfg(),i=s.opacity==null?.35:s.opacity,a=e.dom.baseEl.querySelectorAll(".apexcharts-series"),n=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),r=(o,l)=>t<0||l===t;for(let o=0;o<a.length;o++){const l=a[o];l.style.transition="opacity .15s ease",l.style.opacity=r(l,Number(l.getAttribute("data:realIndex")))?"":String(i)}for(let o=0;o<n.length;o++){const l=n[o];l.style.transition="opacity .15s ease, fill .15s ease",r(l,Number(l.getAttribute("data:realIndex")))?this._restoreLabel(l):(l.getAttribute("data:fill")||l.setAttribute("data:fill",l.getAttribute("fill")||""),l.setAttribute("fill",e.config.chart.foreColor),l.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let i=0;i<e.length;i++){const a=e[i];a.style.opacity=""}const s=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let i=0;i<s.length;i++)this._restoreLabel(s[i])}holdUntilBandsLand(t){const e=this.w;lt.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}const Nd=["wiggle","silhouette","zero","expand"],Bd=["inside-out","inverse","none"];function Yd(f,t,e){const s=e&&e[t]!==void 0?e[t]:t+1;return f==null?{x:s,y:null,rest:{}}:Array.isArray(f)?{x:f[0]!==void 0?f[0]:s,y:f[1],rest:{}}:typeof f=="object"?{x:f.x!==void 0?f.x:s,y:f.y,rest:f}:{x:s,y:f,rest:{}}}function zd(f){for(let t=0;t<f.length;t++){const e=f[t],s=Array.isArray(e)?e[1]:e&&typeof e=="object"?e.y:e;if(Array.isArray(s)&&s.length===2)return!0}return!1}function $d(f,t){var e;const s=[],i=[],a=new Map,n=[];for(let r=0;r<f.length;r++){const o=Array.isArray((e=f[r])==null?void 0:e.data)?f[r].data:[],l=new Map;for(let c=0;c<o.length;c++){const{x:h,y:d,rest:u}=Yd(o[c],c,t),p=h instanceof Date?h.getTime():h;a.has(p)||(a.set(p,s.length),s.push(h),i.push(Z({},u))),l.set(a.get(p),z.parseNumber(d))}n.push(l)}return{xs:s,rows:i,grids:n}}function Hd(f){const t=[];for(let i=0;i<f.length;i++){const a=f[i]instanceof Date?f[i].getTime():f[i];if(typeof a!="number"||!isFinite(a))return null;t.push(i)}const e=t.map(i=>({j:i,v:f[i]instanceof Date?f[i].getTime():f[i]}));e.sort((i,a)=>i.v-a.v);const s=e.map(i=>i.j);for(let i=0;i<s.length;i++)if(s[i]!==i)return s;return null}function Wd(f,t,e){if(f==="none")return t.slice();if(f==="inverse")return t.slice().reverse();const s={},i={};for(let c=0;c<t.length;c++){const h=t[c],d=e[h];let u=0,p=-1/0,g=0;for(let x=0;x<d.length;x++)u+=d[x],d[x]>p&&(p=d[x],g=x);s[h]=u,i[h]=g}const a=t.slice().sort((c,h)=>i[c]-i[h]||c-h);let n=0,r=0;const o=[],l=[];for(let c=0;c<a.length;c++){const h=a[c];n<r?(n+=s[h],o.push(h)):(r+=s[h],l.push(h))}return l.reverse().concat(o)}function Gd(f,t,e,s){const i=new Array(s).fill(0);if(s===0||t.length===0||f==="zero"||f==="expand")return i;if(f==="silhouette"){for(let n=0;n<s;n++){let r=0;for(let o=0;o<t.length;o++)r+=e[t[o]][n];i[n]=-r/2}return i}let a=0;for(let n=1;n<s;n++){let r=0,o=0;for(let l=0;l<t.length;l++){const c=e[t[l]],h=c[n];let d=(h-c[n-1])/2;for(let u=0;u<l;u++){const p=e[t[u]];d+=p[n]-p[n-1]}r+=h,o+=d*h}r&&(a-=o/r),i[n]=a}return i}function Vd(f,t){var e,s;const i=t.config,a=t.globals;if(!Array.isArray(f))return f;a.streamgraphRawSeries||(a.streamgraphRawSeries=f.map(C=>it(Z({},C),{data:Array.isArray(C==null?void 0:C.data)?C.data.slice():C==null?void 0:C.data})));const n=a.streamgraphRawSeries;if(n.some(C=>zd(Array.isArray(C==null?void 0:C.data)?C.data:[])))return t.streamgraphData=null,f;const r=((e=i.plotOptions)==null?void 0:e.streamgraph)||{},o=Nd.indexOf(r.offset)!==-1?r.offset:"wiggle",l=Bd.indexOf(r.order)!==-1?r.order:"inside-out",c=(s=i.xaxis)==null?void 0:s.categories,h=a.collapsedSeriesIndices||[],{xs:d,rows:u,grids:p}=$d(n,c),g=Hd(d),x=g?g.map(C=>d[C]):d,b=g?g.map(C=>u[C]):u,m=x.length;let A=!1;const v=[];for(let C=0;C<n.length;C++){const L=new Array(m);for(let T=0;T<m;T++){const D=p[C].get(g?g[T]:T);let E=D==null?0:Number(D);isFinite(E)||(E=0),E<0&&(A=!0,E=0),L[T]=E}v.push(L)}A&&!a.streamgraphWarnedNegative&&(a.streamgraphWarnedNegative=!0,console.warn('ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.'));const y=[];for(let C=0;C<n.length;C++)h.indexOf(C)===-1&&y.push(C);let w=v;if(o==="expand"){w=v.map(C=>C.slice());for(let C=0;C<m;C++){let L=0;for(let T=0;T<y.length;T++)L+=w[y[T]][C];if(L)for(let T=0;T<y.length;T++)w[y[T]][C]/=L}}const S=Wd(l,y,w),_=Gd(o,S,w,m),k=n.map(()=>null),M=n.map(()=>null);for(let C=0;C<S.length;C++)k[S[C]]=new Array(m),M[S[C]]=new Array(m);for(let C=0;C<m;C++){let L=_[C];for(let T=0;T<S.length;T++){const D=S[T],E=k[D],R=M[D];E[C]=L,L+=w[D][C],R[C]=L}}return t.streamgraphData={names:n.map((C,L)=>{var T;return(T=C==null?void 0:C.name)!=null?T:`Series ${L+1}`}),xs:x,values:v,lows:k,highs:M,order:S,offset:o,hidden:n.map((C,L)=>L).filter(C=>h.indexOf(C)!==-1)},n.map((C,L)=>{const T=k[L],D=M[L];if(!T||!D)return it(Z({},C),{data:[]});const E=new Array(m);for(let R=0;R<m;R++)E[R]=it(Z({},b[R]),{x:x[R],y:[T[R],D[R]]});return it(Z({},C),{data:E})})}be("streamgraph",Vd);pt.registerFeatures({streamgraph:Id});const hs=(f,t,e,s)=>{if(typeof f!="function")return f;const i=f({series:t.seriesData.series,seriesIndex:e,dataPointIndex:s,w:t});return Number.isFinite(i)?i:0};function qr(f){return-Math.cos(f*Math.PI)/2+.5}function Ud(f,t,e,s){f=Math.min(Math.max(f,0),1),e=Math.min(Math.max(e,0),1);const i=3*f,a=3*(e-f)-i,n=1-i-a,r=3*t,o=3*(s-t)-r,l=1-r-o,c=u=>((n*u+a)*u+i)*u,h=u=>((l*u+o)*u+r)*u,d=u=>{let p=0,g=1,x=u;if(x<p)return p;if(x>g)return g;for(;p<g;){const b=c(x);if(Math.abs(b-u)<1e-4)return x;u>b?p=x:g=x,x=(p+g)/2}return x};return u=>u<=0?0:u>=1?1:h(d(u))}const wt=new Map,qd=f=>f;wt.set("linear",qd);wt.set("easeInOutSine",qr);wt.set("easeInSine",f=>1-Math.cos(f*Math.PI/2));wt.set("easeOutSine",f=>Math.sin(f*Math.PI/2));wt.set("easeInQuad",f=>f*f);wt.set("easeOutQuad",f=>1-(1-f)*(1-f));wt.set("easeInOutQuad",f=>f<.5?2*f*f:1-Math.pow(-2*f+2,2)/2);wt.set("easeInCubic",f=>f*f*f);
1953wt.set("easeOutCubic",f=>1-Math.pow(1-f,3));wt.set("easeInOutCubic",f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2);wt.set("easeOutBack",f=>1+2.70158*Math.pow(f-1,3)+1.70158*Math.pow(f-1,2));wt.set("easeInOutBack",f=>{const e=2.5949095;return f<.5?Math.pow(2*f,2)*((e+1)*2*f-e)/2:(Math.pow(2*f-2,2)*((e+1)*(f*2-2)+e)+2)/2});function jd(f){return Array.isArray(f)&&f.length===4&&f.every(t=>typeof t=="number")}function Zd(f){return typeof f=="function"?Fa(f):jd(f)?Ud(f[0],f[1],f[2],f[3]):typeof f=="string"&&wt.has(f)?Fa(wt.get(f)):qr}function Fa(f){return t=>{const e=f(t);return typeof e=="number"&&isFinite(e)?e:t}}function Kd(f,t){const e=new Set(f.exits),s=[];let i=0;for(let a=0;a<f.toOld.length;a++){const n=f.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 Oa(f,t,e){if(!f||typeof f!="string")return null;const s=ls(f);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 jt(f,t,e){return[f[0]+(t[0]-f[0])*e,f[1]+(t[1]-f[1])*e]}function Jd(f,t,e){const s=f,i=[t[1],t[2]],a=[t[3],t[4]],n=[t[5],t[6]],r=jt(s,i,e),o=jt(i,a,e),l=jt(a,n,e),c=jt(r,o,e),h=jt(o,l,e),d=jt(c,h,e);return{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 Qd(f,t,e){const s=[t[1],t[2]],i=jt(f,s,e);return{first:["L",i[0],i[1]],second:["L",s[0],s[1]],mid:i}}function Xa(f,t){const{body:e,closing:s,segType:i,anchors:a}=f,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 u=0;for(;h+u<r&&t[h+u]===-1;)u++;const p=e[d+1];if(!u)l.push(p.slice());else{const g=u+1;let x=a[d],b=p;for(let m=0;m<u;m++){const A=1/(g-m),v=i==="C"?Jd(x,b,A):Qd(x,b,A);l.push(v.first),x=v.mid,b=v.second}l.push(b)}h+=u+1}for(;h<r;)l.push(o(a[n-1])),h++;return s&&s.forEach(d=>l.push(d.slice())),l}function Ia(f,t,e,s,i,a){const n=Oa(f,s,a);if(!n)return null;const r=Oa(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:oi(Xa(n,o)),toInterp:oi(Xa(r,l))}}function Te(f){var t;const e=f.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&&f.globals.dataPoints>s?!1:!!(lt.isBrowser()&&f.globals.dataChanged&&f.globals.shouldAnimate)}function Rt(f,t,e){var s,i,a,n;if((s=f.axisFlags)!=null&&s.isXNumeric){const o=(a=(i=f.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=f.globals.labels)==null?void 0:n[e];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+e}function tu(f,t,e){var s,i;if(f.isXNumeric){const n=(s=f.seriesX)==null?void 0:s[t];if(n&&n.length&&n[e]!=null)return"x:"+n[e]}const a=(i=f.labels)==null?void 0:i[e];return a!=null&&String(a)!==""?"c:"+(Array.isArray(a)?a.join(" "):String(a)):"j:"+e}function eu(f,t){const e=new Map;f.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=f.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<f.length;l++)i.has(l)||o.push(l);return{toOld:s,exits:o,ordered:n,changed:!r}}function Na(f){const t=new Map;return f.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),s===0?e:`${e}#${s}`})}function ws(f,t,e=!1,s=!1){var i,a;if(!Te(f))return null;const n=f.globals.prevStreamFrame;if(!n)return null;const r=(i=n.seriesY)==null?void 0:i[t],o=(a=f.seriesData.series)==null?void 0:a[t];if(!Array.isArray(r)||!Array.isArray(o)||!r.length||!o.length)return null;const l=Na(r.map((d,u)=>tu(n,t,u))),c=Na(o.map((d,u)=>Rt(f,t,u))),h=eu(l,c);return!h.ordered&&!s||!h.changed&&!e?null:{join:h,oldKeys:l,newKeys:c}}function su(f){var t,e;const s=f.config.chart.animations;return Zd((e=(t=s.dynamicAnimation)==null?void 0:t.easing)!=null?e:s.easing)}function Ba(f,t,e,s,i){const a=performance.now(),n=r=>{if(f.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(r-a)/t));s(e(o),o),o<1?U.requestAnimationFrame(n):i&&i()};U.requestAnimationFrame(n)}function Ya(f,{elPointsMain:t,realIndex:e,speed:s}){var i,a,n,r;if(!(t!=null&&t.node))return!1;const o=ws(f,e,!0);if(!o)return!1;const l=f.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 u=((n=f.globals.seriesXvalues)==null?void 0:n[e])||[],p=((r=f.globals.seriesYvalues)==null?void 0:r[e])||[],g=su(f),x=Math.max(1,s||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(b=>{var m,A,v,y,w,S,_,k,M;const C=parseInt((A=(m=b.getAttribute("j"))!=null?m:b.getAttribute("rel"))!=null?A:"",10);if(!isFinite(C)||C<0||C>=o.join.toOld.length)return;const L=o.join.toOld[C],T=u[C]!=null&&p[C]!=null?[u[C],p[C]]:null;if(L===-1||!T){const Y=b.style;Y.opacity="0",Ba(f,x,g,$=>{Y.opacity=String($)},()=>{Y.opacity=""});return}const D=((v=c[L])!=null?v:NaN)-T[0],E=((y=h[L])!=null?y:NaN)-T[1];if(!isFinite(D)||!isFinite(E))return;const R=(_=(S=(w=l.rPixels)==null?void 0:w[e])==null?void 0:S[L])!=null?_:NaN,P=parseFloat((M=(k=b.getAttribute("r"))!=null?k:b.getAttribute("default-marker-size"))!=null?M:""),F=isFinite(R)&&isFinite(P)&&P>0&&Math.abs(R-P)>.25;if(!(Math.abs(D)>=.5||Math.abs(E)>=.5)&&!F)return;const B=Y=>{const $=D*(1-Y),X=E*(1-Y);if(F){const W=(R+(P-R)*Y)/P;b.setAttribute("transform",`translate(${$+T[0]*(1-W)}, ${X+T[1]*(1-W)}) scale(${W})`)}else b.setAttribute("transform",`translate(${$}, ${X})`)};B(0),Ba(f,x,g,B,()=>{b.removeAttribute("transform")})}),!0}function iu(f,{type:t,realIndex:e,pathFromLine:s,pathFromArea:i,linePaths:a,areaPaths:n}){var r,o;const l=ws(f,e);if(!l)return null;const{join:c,oldKeys:h,newKeys:d}=l,u=f.globals.prevStreamFrame;if(!u)return null;const p=(r=u.seriesY)==null?void 0:r[e],g=(o=f.seriesData.series)==null?void 0:o[e];if(p.length<2||g.length<2||p.some(m=>m===null)||g.some(m=>m===null))return null;const x=Kd(c,h.length),b={};return Array.isArray(a)&&a.length===1&&s&&(b.line=Ia(s,a[0],x,h.length,d.length,!1)),t==="area"&&Array.isArray(n)&&n.length===1&&i&&(b.area=Ia(i,n[0],x,h.length,d.length,!0)),!b.line&&!b.area?null:b}function au(f){const t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(f||"");if(!t)return null;const e=parseFloat(t[1]),s=parseFloat(t[2]);return isFinite(e)&&isFinite(s)?{x:e,y:s}:null}
1953function nu({w:f,elSeries:t,record:e,newKeys:s,isHorizontal:i,speed:a}){var n;if(!Te(f)||!e||!Array.isArray(e.paths)||!(t!=null&&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 G(f),c=(n=f.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 u=l.drawPath({d:h.d,stroke:"none",strokeWidth:0,fill:d,fillOpacity:1,classes:"apexcharts-bar-ghost"}),p=u.node;p.setAttribute("pointer-events","none"),u.attr("clip-path",`url(#gridRectBarMask${f.globals.cuid})`),t.node.insertBefore(p,t.node.firstChild);const g=au(h.d);let x=i?"left center":"center bottom";try{const y=p.getBBox();g&&y&&(i?x=Math.abs(g.x-y.x)<=Math.abs(g.x-(y.x+y.width))?"left center":"right center":x=Math.abs(g.y-(y.y+y.height))<=Math.abs(g.y-y.y)?"center bottom":"center top")}catch(y){}const b=p.style;b.transformBox="fill-box",b.transformOrigin=x;const m=Math.max(1,a||1),A=performance.now(),v=y=>{if(f.globals.isDestroyed||!p.parentNode)return;const w=Math.max(0,Math.min(1,(y-A)/m)),S=1-Math.pow(1-w,3),_=1-S;b.transform=i?`scaleX(${_})`:`scaleY(${_})`,b.opacity=String(1-S),w<1?U.requestAnimationFrame(v):p.parentNode.removeChild(p)};U.requestAnimationFrame(v)})}class ru{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){var e,s;const{x:i,y:a,y1:n,y2:r,i:o,j:l,realIndex:c,columnGroupIndex:h,series:d,barHeight:u,barWidth:p,barXPosition:g,barYPosition:x,visibleSeries:b}=t,m=this.w,A=new G(this.barCtx.w),v=m.waterfallData&&m.waterfallData.values,y=v&&v[c]&&v[c][l]!=null?v[c][l]:null,w=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let S,_;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(S=i+p*(b+1),_=a+u*(b+1)-w):(S=i+p*b,_=a+u*b);let k=null,M=null,C=i,L=a,T={};const D=m.config.dataLabels,E=this.barCtx.barOptions.dataLabels,R=this.barCtx.barOptions.dataLabels.total;typeof x!="undefined"&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(_=x,L=x),typeof g!="undefined"&&this.barCtx.isVerticalGroupedRangeBar&&(S=g,C=g);const P=hs(D.offsetX,m,c,l),F=hs(D.offsetY,m,c,l);let I={width:0,height:0};if(m.config.dataLabels.enabled){const Y=y!==null?y:m.seriesData.series[c][l];I=A.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(Y,it(Z({},m),{seriesIndex:c,dataPointIndex:l,w:m})):m.formatters.yLabelFormatters[0](Y),parseFloat(D.style.fontSize).toString(),D.style.fontFamily,void 0,!0,D.style.fontWeight)}const B={x:i,y:a,i:o,j:l,realIndex:c,columnGroupIndex:h,bcx:S,bcy:_,barHeight:u,barWidth:p,textRects:I,strokeWidth:w,dataLabelsX:C,dataLabelsY:L,dataLabelsConfig:D,barDataLabelsConfig:E,barTotalDataLabelsConfig:R,offX:P,offY:F};if(this.barCtx.isHorizontal?T=this.calculateBarsDataLabelsPosition(B):T=this.calculateColumnsDataLabelsPosition(B),y!==null&&this.barCtx.isHorizontal&&E.position==="center"){const Y=(s=(e=m.waterfallData.geometry)==null?void 0:e[c])==null?void 0:s[l];Y&&Y.horizontal&&(T.dataLabelsX=(Y.levelStart+Y.levelEnd)/2+P)}return k=this.drawCalculatedDataLabels({x:T.dataLabelsX,y:T.dataLabelsY,val:y!==null?y:this.barCtx.isRangeBar?[n,r]:m.config.chart.stackType==="100%"?d[c][l]:m.seriesData.series[c][l],i:c,j:l,barWidth:p,barHeight:u,textRects:I,dataLabelsConfig:D}),m.config.chart.stacked&&R.enabled&&(M=this.drawTotalDataLabels({x:T.totalDataLabelsX,y:T.totalDataLabelsY,barWidth:p,barHeight:u,realIndex:c,j:l,textAnchor:T.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:l}),rawVal:this.getStackedTotalValue({realIndex:c,j:l}),dataLabelsConfig:D,barTotalDataLabelsConfig:R})),{dataLabelsPos:T,dataLabels:k,totalDataLabels:M}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,i=this.getTotalGroupContext(t),a=s.seriesData.stackedSeriesTotalsByGroups;return i&&a&&a[i.groupIndex]?a[i.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let i=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(i=this.totalFormatter(i,it(Z({},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:u,barDataLabelsConfig:p,barTotalDataLabelsConfig:g,strokeWidth:x,offX:b,offY:m}=t,A,v;const y="middle",w=r;l=Math.abs(l);const S=e.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:_}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i});r=r-x/2;
1953const k=e.layout.gridWidth/e.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?h+=o/2:(e.axisFlags.isXNumeric?h=r-o/2+b:h=r-k+o/2+b,!e.config.chart.stacked&&_>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h-=o*_)),S&&(h=h+c.height/2-x/2-2);const M=e.seriesData.series[s][i]<0;let C=n;switch(this.barCtx.isReversed&&(C=n+(M?l:-l)),p.position){case"center":S?M?d=C-l/2+m:d=C+l/2-m:M?d=C-l/2+c.height/2+m:d=C+l/2+c.height/2-m;break;case"bottom":S?M?d=C-l+m:d=C+l-m:M?d=C-l+c.height+x+m:d=C+l-c.height/2+x-m;break;case"top":S?M?d=C+m:d=C-m:M?d=C-c.height/2-m:d=C+c.height+m;break}let L=C;const T=this.getTotalGroupContext(a);if((T?[T.group]:e.labelData.seriesGroups).forEach(E=>{var R;(R=this.barCtx[E.join(",")])==null||R.prevY.forEach(P=>{M?L=Math.max(P[i],L):L=Math.min(P[i],L)})}),this.drawsStackedTotal(a)&&g.enabled){const P=new G(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),u.fontSize);M?A=L-P.height/2-m-g.offsetY+18:A=L+P.height+m+g.offsetY-18;const F=k;v=w+(e.axisFlags.isXNumeric?-o/2:o/2-F)+g.offsetX}return e.config.chart.stacked||(d<0?d=0+x:d+c.height/3>e.layout.gridHeight&&(d=e.layout.gridHeight-x)),{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:u,dataLabelsConfig:p,barDataLabelsConfig:g,barTotalDataLabelsConfig:x,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 D=(e=h.centerOffset)!=null?e:0;y=o+l/2+m-D}else 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,S,_="start";const k=s.seriesData.series[a][n]<0;let M=i;if(this.barCtx.isReversed&&(M=i+(k?-c:c),_=k?"start":"end"),this.barCtx.isPyramid)d=s.layout.gridWidth/2+b;else switch(g.position){case"center":k?d=M+c/2-b:d=Math.max(h.width/2,M-c/2)+b;break;case"bottom":k?d=M+c-u-b:d=M-c+u+b;break;case"top":k?d=M-u-b:d=M-u+b;break}let C=M;const L=this.getTotalGroupContext(r);if((L?[L.group]:s.labelData.seriesGroups).forEach(D=>{var E;(E=this.barCtx[D.join(",")])==null||E.prevX.forEach(R=>{k?C=Math.min(R[n],C):C=Math.max(R[n],C)})}),this.drawsStackedTotal(r)&&x.enabled){const E=new G(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),p.fontSize);k?(w=C-u-b-x.offsetX,_="end"):w=C+b+x.offsetX+(this.barCtx.isReversed?-(c+u):u),S=y-h.height/2+E.height/2+x.offsetY+u,s.globals.barGroups.length>1&&!L&&(S=S-s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const D=k&&p.textAnchor!=="middle"?p.textAnchor==="start"?"end":"start":p.textAnchor;let E;g.orientation==="vertical"?E=h.height/2:D==="end"?E=h.width:D==="middle"?E=h.width/2:E=0;const P=(g.orientation==="vertical"?h.height:h.width)-E;d+P>s.layout.gridWidth-u&&(d=s.layout.gridWidth-P-u),d-E<u&&(d=E+u)}return{bcx:i,bcy:o,dataLabelsX:d,dataLabelsY:y,totalDataLabelsX:w,totalDataLabelsY:S,totalDataLabelsAnchor:_}}drawCalculatedDataLabels({x:t,y:e,val:s,i,j:a,textRects:n,barHeight:r,barWidth:o,dataLabelsConfig:l}){var c,h,d;const u=this.w;let p="rotate(0)";u.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(p=`rotate(-90, ${t}, ${e})`);const g=new xe(this.barCtx.w,this.barCtx.ctx),x=new G(this.barCtx.w),b=l.formatter;let m=null;const A=u.globals.collapsedSeriesIndices.indexOf(i)>-1,v=(u.globals.collapsingSeriesIndices||[]).indexOf(i)>-1;if(v){const y=(c=u.globals.prevDataLabels)==null?void 0:c.get(`${i}::${Rt(u,i,a)}`);y&&isFinite(y.val)&&(s=y.val)}if(l.enabled&&(!A||v)){m=x.group({class:"apexcharts-data-labels",transform:p});const y=u.config.dataLabels;((h=y.animate)!=null&&h.enabled||(d=y.countUp)!=null&&d.enabled)&&(m.node.setAttribute("data:dlKey",`${i}::${Rt(u,i,a)}`),m.node.setAttribute("data:dlJ",String(a)),typeof s=="number"&&isFinite(s)&&m.node.setAttribute("data:dlVal",String(s)));let w="";typeof s!="undefined"&&(w=b(s,it(Z({},u),{seriesIndex:i,dataPointIndex:a,w:u}))),!s&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");const S=u.seriesData.series[i][a]<0,_=u.config.plotOptions.bar.dataLabels.position;if(u.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(_==="top"&&(S?l.textAnchor="end":l.textAnchor="start"),_==="center"&&(l.textAnchor="middle"),_==="bottom"&&(S?l.textAnchor="end":l.textAnchor="start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){const M=x.getTextRects(w,parseFloat(l.style.fontSize).toString());o<M.width&&(w="")}u.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!v&&(this.barCtx.isHorizontal?n.width/1.6>Math.abs(o)&&(w=""):n.height/1.6>Math.abs(r)&&(w=""));const k=Z({},l);this.barCtx.isHorizontal&&s<0&&(l.textAnchor==="start"?k.textAnchor="end":l.textAnchor==="end"&&(k.textAnchor="start")),g.plotDataLabelsText({x:t,y:e,text:w,i,j:a,parent:m,dataLabelsConfig:k,alwaysDrawDataLabel:!0,offsetCorrection:!0}
1953)}return m}drawTotalDataLabels({x:t,y:e,val:s,rawVal:i,realIndex:a,j:n,textAnchor:r,barTotalDataLabelsConfig:o}){var l,c;const h=new G(this.barCtx.w);let d;if(o.enabled&&typeof t!="undefined"&&typeof e!="undefined"&&this.drawsStackedTotal(a)){d=h.drawText({x:t,y:e,foreColor:o.style.color,text:s,textAnchor:r,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight}),d.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((l=u.animate)!=null&&l.enabled||(c=u.countUp)!=null&&c.enabled){const{groupIndex:p}=this.barCtx.barHelpers.getGroupIndex(a);d.node.setAttribute("data:dlTotalKey",`${p}::${Rt(this.w,a,n)}`),d.node.setAttribute("data:dlTotalSeries",String(a)),typeof i=="number"&&isFinite(i)&&d.node.setAttribute("data:dlTotalVal",String(i))}}return d}}function jr(f){var t,e,s,i,a,n,r;return((e=(t=f==null?void 0:f.config)==null?void 0:t.chart)==null?void 0:e.requestedType)!=="histogram"||((i=(s=f.config.plotOptions)==null?void 0:s.histogram)==null?void 0:i.overlap)===!1?!1:((r=(n=(a=f.seriesData)==null?void 0:a.series)==null?void 0:n.length)!=null?r:0)>1}let ou=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),z.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(s=>s.map(i=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(this._slotXSpan!==void 0)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0)||!isFinite(e)){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&s!==.5?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const e=this.w.seriesData.seriesX||[],s=[];for(let r=0;r<e.length;r++){const o=e[r];Array.isArray(o)&&o.length>0&&s.push(o)}if(!s.length)return 0;const i=new Array(s.length).fill(0);let a=NaN,n=1/0;for(;;){let r=1/0,o=-1;for(let l=0;l<s.length;l++){const c=s[l];for(;i[l]<c.length&&typeof c[i[l]]!="number";)i[l]++;if(i[l]>=c.length)continue;const h=c[i[l]];if(h!==h){i[l]++,l--;continue}h<r&&(r=h,o=l)}if(o===-1)break;if(i[o]++,a===a){const l=r-a;l>0&&l<n&&(n=l)}a=r}return isFinite(n)?n:0}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||jr(e))&&(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,String(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 u=this.barCtx.xRatio,p=this.barSlotXSpan();p>0&&p/u>0&&(n=p/u),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+z.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;const n=this.w,r=new kt(this.barCtx.w);let o=null;const l=this.barCtx.barOptions.distributed?s:e;let c=!1;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(b=>{t[e][s]>=b.from&&t[e][s]<=b.to&&(o=b.color,c=!0)});const d=this.getDumbbellConnectorFill(e,s)||((a=n.config.series[e].data[s])==null?void 0:a.fill),u=this.barCtx.barOptions.isDumbbell?n.config.plotOptions.bar.dumbbell.connector:null;let p;return u&&u.color&&(o=u.color,p=u.opacity),{color:r.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:i,dataPointIndex:s,color:o,opacity:p,value:t[e][s],fillConfig:d,fillType:d!=null&&d.type?d.type:Array.isArray(n.config.fill.type)?n.config.fill.type[i]:n.config.fill.type}),useRangeColor:c}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const i=s.dumbbellData;if(!i||i.form!=="series")return null;const a=s.config.plotOptions.bar.dumbbell.connector;if(a.color)return null;const n=i.order[e];if(!n)return null;const r=s.globals.colors[n[0]],o=s.globals.colors[n[1]];return!r||!o?null:{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:r,gradientTo:o,opacityFrom:a.opacity,opacityTo:a.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}}getStrokeWidth(t,e,s){let i=0;const a=this.w;return typeof this.barCtx.series[t][e]=="undefined"||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}getStackedSeriesIndices(t){const e=this.w.labelData.seriesGroups;if(!e||e.length<2)return[Array.from({length:t},(a,n)=>n)];const s=Array.from({length:e.length},()=>[]),i=[];for(let a=0;a<t;a++){const n=this.getSeriesGroupIndex(a);n>-1?s[n].push(a):i.push(a)}return i.length&&s.push(i),s.filter(a=>a.length>0)}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==="bar"&&n===1,l=o?"top":"both",c=o?"top":"bottom";
1953for(const h of this.getStackedSeriesIndices(a))for(let d=0;d<n;d++){const u=[],p=[];for(const g of h){const x=t[g][d];x>0?u.push(g):x<0&&p.push(g)}if(u.length>0&&p.length===0)if(u.length===1)r[u[0]][d]=l;else{const g=u[0],x=u[u.length-1];for(const b of u)r[b][d]=b===g?c:b===x?"top":"none"}else if(p.length>0&&u.length===0)if(p.length===1)r[p[0]][d]="both";else{const g=Math.max(...p),x=Math.min(...p);for(const b of p)r[b][d]=b===g?"bottom":b===x?"top":"none"}else if(u.length>0&&p.length>0){const g=u[u.length-1];for(const b of u)r[b][d]=b===g?"top":"none";const x=Math.max(...p);for(const b of p)r[b][d]=b===x?"bottom":"none"}}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:n,elSeries:r}){const o=this.w,l=new G(this.barCtx.w),h=new gt(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],u=l.drawRect(typeof s!="undefined"?s:0,typeof a!="undefined"?a:0,typeof i!="undefined"?i:o.layout.gridWidth,typeof n!="undefined"?n:o.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(u),u.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 u,p,g;const x=new G(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,m=e;(u=d.config.series[l].data[h])!=null&&u.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 S=x.line(y,s),_=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z",k=x.move(v,s)+x.line(v,i)+x.line(y,i)+S+_;let M=k;this.arrBorderRadius[l][h]!=="none"&&(M=x.roundPathCorners(M,d.config.plotOptions.bar.borderRadius));let C=null;const L=(g=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(L?C=L:d.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(l,h,M,k)),C==null&&(C=x.move(v,s)+x.line(v,s)+S+S+S+S+S+x.line(v,s)+_),d.config.chart.stacked){let T=this.barCtx;T=this.barCtx[o],T.yArrj.push(i-A*w),T.yArrjF.push(Math.abs(s-i+a*w)),T.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:M,pathFrom:C,drawnBox:{x1:v,x2:y,y1:s,y2:i}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i,j:a,realIndex:n,strokeWidth:r,w:o}){var l,c;const h=new G(this.barCtx.w),d=o.layout.gridWidth/2,u=T=>Math.abs(T/this.barCtx.invertedYRatio)/2,p=u(s[i][a]),g=s[i].length-1,x=a===g,b=o.config.plotOptions.funnel.lastShape==="taper"?"taper":"flat";let m;x?m=b==="taper"?0:p:m=u(s[i][a+1]);const A=r/2,v=t+A,y=t+e-A,w=d-p,S=d+p,_=d-m,k=d+m,M=h.move(w,v)+h.line(S,v)+h.line(k,y)+h.line(_,y)+" Z";let C=null;const L=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(n,a);return L?C=L:o.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(n,a,M)),C==null&&(C=h.move(d,v)+h.line(d,v)+h.line(d,y)+h.line(d,y)+" Z"),{pathTo:M,pathFrom:C,x:S,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,u=h*s,p=d*s;l.push({y:u,height:p-u,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 G(this.barCtx.w),d=o.layout.gridWidth/2,u=r/2,p=t+u,g=t+e-u,x=d-s,b=d+s,m=d-i,A=d+i,v=h.move(x,p)+h.line(b,p)+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,p)+h.line(d,p)+
1953h.line(d,g)+h.line(d,g)+" Z"),{pathTo:v,pathFrom:y,x:b,x1:x,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 u,p,g;const x=new G(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,m=e;(u=d.config.series[l].data[h])!=null&&u.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 S=this.barCtx.isFunnel,_=S?(s+i)/2:s,k=x.line(s,y),M=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z",C=x.move(s,v)+x.line(i,v)+x.line(i,y)+k+M;let L=C;this.arrBorderRadius[l][h]!=="none"&&(L=x.roundPathCorners(L,d.config.plotOptions.bar.borderRadius));let T=null;const D=(g=(p=this.barCtx.ctx)==null?void 0:p.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(D?T=D:d.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(l,h,L,C)),T==null){const E=S?x.line(_,y):k;T=x.move(_,v)+x.line(_,v)+E+E+E+E+E+x.line(_,v)+M}if(d.config.chart.stacked){let E=this.barCtx;E=this.barCtx[o],E.xArrj.push(i+A*w),E.xArrjF.push(Math.abs(s-i-a*w)),E.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:L,pathFrom:T,drawnBox:{x1:s,x2:i,y1:v,y2:y}}}getXForValue(t,e,s=!0){let i=s?e:null;return typeof t!="undefined"&&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!="undefined"&&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].forEach(c=>{l(c.value,c)}),this.barCtx.barOptions.isDumbbell){const c=this.getDumbbellEnds(i,a);if(c.length){const h={strokeHeight:t==="x"?0:r.globals.markers.size[i],strokeWidth:t==="x"?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round"};let d=0,u=0;for(let g=1;g<c.length;g++)c[g].value<c[d].value&&(d=g),c[g].value>c[u].value&&(u=g);const p=r.config.plotOptions.bar.dumbbell.dataLabels;c.forEach((g,x)=>{const b=it(Z({},h),{strokeColor:g.color});p.enabled&&(x===d||x===u)&&(b.label={text:this.getDumbbellLabelText(g.value,i,a,g.index),color:p.colorFromMarker?g.color:Array.isArray(p.style.colors)?p.style.colors[g.index]||p.style.colors[0]:p.style.colors,outward:x===d&&d!==u?-1:1}),l(g.value,b)})}}return o}getDumbbellEnds(t,e){const s=this.w,i=[],a=s.dumbbellData;if(a&&a.form==="series"){const o=a.values[e]||[];for(let l=0;l<o.length;l++){const c=o[l];c===null||a.hidden.indexOf(l)!==-1||i.push({value:c,color:s.globals.colors[l],index:l})}return i}if(!s.rangeData.seriesRange.length)return i;const n=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,r=o=>Array.isArray(n[t])?n[t][o]:n[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:r(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:r(1),index:1}]}getDumbbellLabelText(t,e,s,i){const a=this.w,n=a.config.plotOptions.bar.dumbbell.dataLabels;if(typeof n.formatter=="function")return n.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:i,w:a});const r=this.barCtx.isHorizontal?a.formatters.xLabelFormatter:a.formatters.yLabelFormatters[0];return typeof r=="function"?r(t,s,a):String(t)}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 G(this.barCtx.w),l=o.group({class:"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!="undefined"?h.attrs.strokeHeight:n/2,u=e+d+n/2;c=o.drawLine(h.x,u-d*2,h.x,u,h.attrs.strokeColor?h.attrs.strokeColor:void 0,h.attrs.strokeDashArray,h.attrs.strokeWidth?h.attrs.strokeWidth:2,h.attrs.strokeLineCap),l.add(c),h.attrs.label&&l.add(this.drawDumbbellLabel(h.attrs,{x:h.x,y:u-d,horizontal:!0,markerSize:h.attrs.strokeWidth||0}))}}
1953):Array.isArray(i)&&i.forEach(h=>{if(h.y>=-1&&h.y<=o.w.layout.gridHeight+1){const d=typeof h.attrs.strokeWidth!="undefined"?h.attrs.strokeWidth:a/2,u=t+d+a/2;c=o.drawLine(u-d*2,h.y,u,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),h.attrs.label&&l.add(this.drawDumbbellLabel(h.attrs,{x:u-d,y:h.y,horizontal:!1,markerSize:h.attrs.strokeHeight||0}))}}),l}drawDumbbellLabel(t,e){const s=this.w,i=new G(s),a=s.config.plotOptions.bar.dumbbell.dataLabels,n=e.markerSize/2+a.offset,r=t.label.outward;return i.drawText({x:e.x+(e.horizontal?n*r:0),y:e.y-(e.horizontal?0:n*r),text:t.label.text,textAnchor:e.horizontal?r<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":r<0?"hanging":"auto",foreColor:t.label.color,fontSize:a.style.fontSize,fontFamily:a.style.fontFamily,fontWeight:a.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}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,u=l+e.barHeight,p=new G(this.barCtx.w),g=new z,x=p.move(o,u)+p.line(r,u)+p.line(c,d)+p.line(h,d)+p.line(o,u)+(n.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[i][a]==="both"?" Z":" z");return p.drawPath({d:x,fill:g.shadeColor(.5,z.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}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}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 ft{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._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const i=new gt(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=i.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),n=new Dt(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 ou(this)}draw(t,e){var s,i,a;const n=this.w,r=new G(this.w),o=new Dt(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,u;const p=[],g=[],x=n.globals.comboCharts?e[c]:c,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(x),m=r.group({class:"apexcharts-series",rel:c+1,seriesName:z.escapeString(n.seriesData.seriesNames[x]),"data:realIndex":x});gt.addCollapsedClassToSeries(this.w,m,x),t[c].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const A=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computeP
1953yramidLayout(t[c]));const v=this.barHelpers.initialPositions(x),{y,yDivision:w,zeroW:S,x:_,xDivision:k,zeroH:M}=v;let C=v.barHeight,L=v.barWidth;u=y,d=_,this.isHorizontal||g.push(d+(L!=null?L:0)/2);const T=r.group({class:"apexcharts-datalabels","data:realIndex":x});n.globals.delayedElements.push({el:T.node,holdUntilComplete:!((s=n.config.dataLabels.animate)!=null&&s.enabled)&&this.isLengthTransition(x)}),T.node.classList.add("apexcharts-element-hidden");const D=r.group({class:"apexcharts-bar-goals-markers"}),E=r.group({class:"apexcharts-bar-shadows"});n.globals.delayedElements.push({el:E.node}),E.node.classList.add("apexcharts-element-hidden");for(let R=0;R<t[c].length;R++){const P=this.barHelpers.getStrokeWidth(c,R,x);let F=null;const I={indexes:{i:c,j:R,realIndex:x,translationsIndex:A,bc:h},x:d,y:u,strokeWidth:P,elSeries:m};this.isHorizontal?(F=this.drawBarPaths(it(Z({},I),{barHeight:C,zeroW:S,yDivision:w})),L=this.series[c][R]/this.invertedYRatio):(F=this.drawColumnPaths(it(Z({},I),{xDivision:k,barWidth:L,zeroH:M})),C=this.series[c][R]/this.yRatio[A]);const B=this.barHelpers.getPathFillColor(t,c,R,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&((i=n.config.plotOptions.funnel)==null?void 0:i.shape)!=="trapezoid"&&this.pathArr.length&&R>0){const $=this.barHelpers.drawBarShadow({color:typeof B.color=="string"&&((a=B.color)==null?void 0:a.indexOf("url"))===-1?B.color:z.hexToRgba(n.globals.colors[c]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:F,realIndex:x,j:R});E.add($),n.config.chart.dropShadow.enabled&&new Ct(this.w).dropShadow($,n.config.chart.dropShadow,x)}this.pathArr.push(F);const Y=this.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:C,barWidth:L});Y&&D.add(Y),u=F.y,d=F.x,R>0&&g.push(d+(L!=null?L:0)/2),p.push(u),this.renderSeries(it(Z({realIndex:x,pathFill:B.color},B.useRangeColor?{lineFill:B.color}:{}),{j:R,i:c,columnGroupIndex:b,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:P,elSeries:m,x:d,y:u,series:t,barHeight:Math.abs(F.barHeight?F.barHeight:C),barWidth:Math.abs(F.barWidth?F.barWidth:L),elDataLabelsWrap:T,elGoalsMarkers:D,elBarShadows:E,visibleSeries:this.visibleI,type:"bar"}))}if(n.globals.seriesXvalues[x]=g,n.globals.seriesYvalues[x]=p,n.globals.previousPaths.length>0){const R=[];for(let P=0;P<t[c].length;P++)R.push(Rt(n,x,P));nu({w:n,elSeries:m,record:this._prevRecord(x),newKeys:R,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:u,y2:p,series:g,barHeight:x,barWidth:b,barXPosition:m,barYPosition:A,elDataLabelsWrap:v,elGoalsMarkers:y,elBarShadows:w,visibleSeries:S,type:_,classes:k}){var M,C,L,T,D,E,R;const P=this.w,F=new G(this.w,this.ctx),I=ys(this.ctx,F);let B=!1;const Y=this._pathToInterp;if(this._pathToInterp=null,c._bindingsDelegated||(c._bindingsDelegated=!0,F.setupEventDelegation(c,`.apexcharts-${_}-area`)),!s){let J=function(at){const nt=P.config.stroke.colors;let ot;return Array.isArray(nt)&&nt.length>0&&(ot=nt[at],ot||(ot=""),typeof ot=="function")?ot({value:P.seriesData.series[at][i],dataPointIndex:i,w:P}):ot};const et=typeof P.globals.stroke.colors[t]=="function"?J(t):P.globals.stroke.colors[t];s=this.barOptions.distributed?P.globals.stroke.colors[i]:et}const $=P.config.chart.animations,X=$.animateGradually,W=X&&X.enabled!==!1&&!(P.globals.dataChanged&&this.isLayoutShift(t));let N=0,H=0;if(W){const J=P.globals.dataPoints||1,et=X.delay||0,at=Math.min(et,$.speed*.5/Math.max(1,J));H=Oi({style:"sequential",index:i,baseDelay:at}),P.config.chart.stacked&&!P.globals.dataChanged&&(H+=a*at*.5),N=H/(et||1)}const V=new ru(this).handleBarDataLabels({x:h,y:d,y1:u,y2:p,i:a,j:i,series:g,realIndex:t,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:A,visibleSeries:S});if(H>0){const J=P.config.dataLabels;if((M=J.animate)!=null&&M.enabled||(C=J.countUp)!=null&&C.enabled){const et=String(Math.round(H));(T=(L=V.dataLabels)==null?void 0:L.node)==null||T.setAttribute("data:dlDelay",et),(E=(D=V.totalDataLabels)==null?void 0:D.node)==null||E.setAttribute("data:dlDelay",et)}}if(P.globals.isBarHorizontal||(V.dataLabelsPos.dataLabelsX+Math.max(b,P.globals.barPadForNumericAxis)<0||V.dataLabelsPos.dataLabelsX-Math.max(b,P.globals.barPadForNumericAxis)>P.layout.gridWidth)&&(B=!0),P.config.series[a].data[i]&&P.config.series[a].data[i].strokeColor&&(s=P.config.series[a].data[i].strokeColor),this.isNullValue&&P.globals.collapsingSeriesIndices.indexOf(t)===-1&&(e="none"),!B){const J=((R=this.ctx.morphTypeChange)==null?void 0:R.isActive())===!0,et=J?this.ctx.morphTypeChange.getSpeed():P.config.chart.animations.dynamicAnimation.speed,at=J&&this.ctx.morphTypeChange.claimsTargetMark(t,i);at&&(r=o,N=0);const nt=I.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:o,stroke:s,strokeWidth:l,strokeLineCap:P.config.stroke.lineCap,fill:e,pathToInterp:Y,animationDelay:N,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:et,className:`apexcharts-${_}-area${k?` ${k}`:""}`,chartType:_,bindEventsOnPaths:!1});nt.attr("clip-path",`url(#gridRectBarMask${P.globals.cuid}
1953)`),at&&(nt.node.setAttribute("opacity","0"),nt.node.setAttribute("data-piece-hidden","1"));const ot=P.config.forecastDataPoints;ot.count>0&&i>=P.globals.dataPoints-ot.count&&(nt.node.setAttribute("stroke-dasharray",ot.dashArray),nt.node.setAttribute("stroke-width",ot.strokeWidth),nt.node.setAttribute("fill-opacity",ot.fillOpacity)),typeof u!="undefined"&&typeof p!="undefined"&&(nt.attr("data-range-y1",u),nt.attr("data-range-y2",p)),new Ct(this.w).setSelectionFilter(nt,t,i),c.add(nt),nt.attr({cy:V.dataLabelsPos.bcy,cx:V.dataLabelsPos.bcx,j:i,val:P.seriesData.series[a][i],barHeight:x,barWidth:b,"data:pathKey":Rt(P,t,i)}),I.kind==="canvas"&&(P.globals.barCanvasCoords||(P.globals.barCanvasCoords={}),P.globals.barCanvasCoords[t]||(P.globals.barCanvasCoords[t]={}),P.globals.barCanvasCoords[t][i]={cx:V.dataLabelsPos.bcx,cy:V.dataLabelsPos.bcy,barWidth:b}),V.dataLabels!==null&&v.add(V.dataLabels),V.totalDataLabels&&v.add(V.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 u=this.isFunnel&&l.config.plotOptions.funnel.shape==="trapezoid",p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[h]:null,g=!!p;if(p)d=p.y,e=p.height;else if(this.isFunnel&&!u){const b=i!=null?i:0;i=b-(this.barHelpers.getXForValue(this.series[c][h],b)-b)/2}a=this.barHelpers.getXForValue(this.series[c][h],i!=null?i:0);let x;return p?x=this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:e,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:t.realIndex,j:h,strokeWidth:s,w:l}):u?x=this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:this.series,i:c,j:h,realIndex:t.realIndex,strokeWidth:s,w:l}):x=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}),(u||g)&&(i=x.x1,a=x.x),!l.axisFlags.isXNumeric&&!g&&(n=n+r),g&&(n=d),this.barHelpers.barBackground({j:h,i:c,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:o}),{pathTo:x.pathTo,pathFrom:x.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,u=t.j,p=t.bc;let g;if(l.axisFlags.isXNumeric){const b=this.getBarXForNumericXAxis({x:e,j:u,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:u});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][u],n,h);const x=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:n,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:c,i:d,j:u,w:l});return l.axisFlags.isXNumeric||(e=e+i),this.barHelpers.barBackground({bc:p,j:u,i:d,x1:g-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:o}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,n,c,u,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),z.isNumber(a.seriesData.seriesX[n][i])&&(t=_t.dataXToPx(a,a.seriesData.seriesX[n][i])-e*this.seriesLen/2),{barXPosition:t+(jr(a)?0: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}
1953isLengthTransition(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(Te(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(Rt(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=ws(this.w,t,!0,!0),s=!!(e&&e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,i){const a=this.w;this._pathToInterp=null;const n=this._prevRecord(t);if(!n)return Te(a)?null:s;let r=null,o=!1;const l=this._prevKeyedPaths(t);if(l){const c=l.get(Rt(a,t,e));c?r=c.d:o=!0}else typeof n.paths[e]!="undefined"?r=n.paths[e].d:o=!0;if(r){const c=ft.pathCommandCount(r),h=ft.pathCommandCount(s);if(c===h)return r;const d=new G(a),u=g=>{const x=ft.pathBox(g);return x?Math.min(x.maxX-x.minX,x.maxY-x.minY):0},p=c<h?u(r)>1:u(s)>1;if(c<h){const g=d.roundPathCorners(r,0);if(ft.pathCommandCount(g)===h){if(p&&i){const x=d.roundPathCorners(i,0);ft.pathCommandCount(x)===h&&(this._pathToInterp=x)}return g}}else{const g=d.roundPathCorners(s,0);if(ft.pathCommandCount(g)===c){if(this._pathToInterp=g,p){const x=ft.squareLike(r),b=x?d.roundPathCorners(x,0):null;if(b&&ft.pathCommandCount(b)===c)return b}return r}}}return o&&Te(a)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let i;for(;(i=s.exec(t))!==null;){const r=i[2].trim().split(/[\s,]+/).map(Number);r.length<2||r.some(isNaN)||e.push([r[r.length-2],r[r.length-1]])}if(e.length<3)return null;const a=e.map(r=>r[0]),n=e.map(r=>r[1]);return{minX:Math.min(...a),maxX:Math.max(...a),minY:Math.min(...n),maxY:Math.max(...n),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=ft.pathBox(t);if(!e)return null;const{minX:s,maxX:i,minY:a,maxY:n,start:r,vertical:o}=e,l=(g,x,b)=>Math.abs(g-x)<=Math.abs(g-b)?[x,b]:[b,x];let c,h,d,u;o?(c=Math.abs(r[0]-s)<=Math.abs(r[0]-i)?s:i,h=c===s?i:s,[d,u]=l(r[1],a,n)):(d=Math.abs(r[1]-a)<=Math.abs(r[1]-n)?a:n,u=d===a?n:a,[c,h]=l(r[0],s,i));const p=t.trim().endsWith("Z")?" Z":" z";return o?`M ${c} ${d} L ${c} ${u} L ${h} ${u} L ${h} ${d}${p}`:`M ${c} ${d} L ${h} ${d} L ${h} ${u} L ${c} ${u}${p}`}getPreviousFlip(t,e){const s=this.w,i=this._prevRecord(t);if(!i)return null;const a=this._prevKeyedPaths(t),n=a?a.get(Rt(s,t,e)):i.paths[e];return n?!!n.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}class lu extends ft{draw(t,e){const s=this.w;this.graphics=new G(this.w),this.bar=new ft(this.w,this.ctx,this.xyRatios);const i=new Dt(this.w);t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),s.c
1953onfig.chart.stackType==="100%"&&(t=s.globals.comboCharts?e.map(h=>s.globals.seriesPercent[h]):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;const o=s.config.chart.animations,l=o.enabled&&o.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let c=!1;for(let h=0,d=0;h<t.length;h++,d++){const u=s.globals.comboCharts?e[h]:h,{groupIndex:p,columnGroupIndex:g}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[s.labelData.seriesGroups[p]];const x=[],b=[];let m=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[u][0],m=u),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let A=this.graphics.group({class:"apexcharts-series",seriesName:z.escapeString(s.seriesData.seriesNames[u]),rel:h+1,"data:realIndex":u});gt.addCollapsedClassToSeries(this.w,A,u);const v=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":u});gt.addCollapsedClassToSeries(this.w,v,u),(s.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&v.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const y=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(n,r,void 0,void 0,void 0,void 0,m),{xDivision:S,yDivision:_,zeroH:k,zeroW:M}=w;let C=w.barHeight,L=w.barWidth;r=w.y,n=w.x,s.globals.barHeight=C,s.globals.barWidth=L,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(T=>isNaN(T))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>k),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let T=0;T<s.globals.dataPoints;T++){const D=this.barHelpers.getStrokeWidth(h,T,u),E={indexes:{i:h,j:T,realIndex:u,translationsIndex:m,bc:d},strokeWidth:D,x:n,y:r,elSeries:A,columnGroupIndex:g,seriesGroup:s.labelData.seriesGroups[p]};let R=null;this.isHorizontal?(R=this.drawStackedBarPaths(it(Z({},E),{zeroW:M,barHeight:C,yDivision:_})),L=this.series[h][T]/this.invertedYRatio):(R=this.drawStackedColumnPaths(it(Z({},E),{xDivision:S,barWidth:L,zeroH:k})),C=this.series[h][T]/this.yRatio[m]);const P=this.barHelpers.drawGoalLine({barXPosition:R.barXPosition,barYPosition:R.barYPosition,goalX:R.goalX,goalY:R.goalY,barHeight:C,barWidth:L});P&&y.add(P),r=R.y,n=R.x,x.push(n),b.push(r);const F=this.barHelpers.getPathFillColor(t,h,T,u);let I="";const B=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",Y=this.barHelpers.arrBorderRadius[u][T]==="bottom"&&s.seriesData.series[u][T]>0||this.barHelpers.arrBorderRadius[u][T]==="top"&&s.seriesData.series[u][T]<0,$=l&&!Y&&this.getPreviousFlip(u,T);(Y||$)&&(I=B),$&&(I+=" apexcharts-flip-held",c=!0),A=this.renderSeries(it(Z({realIndex:u,pathFill:F.color},F.useRangeColor?{lineFill:F.color}:{}),{j:T,i:h,columnGroupIndex:g,pathFrom:R.pathFrom,pathTo:R.pathTo,strokeWidth:D,elSeries:A,x:n,y:r,series:t,barHeight:C,barWidth:L,elDataLabelsWrap:v,elGoalsMarkers:y,type:"bar",visibleSeries:g,classes:I}))}s.globals.seriesXvalues[u]=x,s.globals.seriesYvalues[u]=b,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(A)}return c&&this.settleHeldMirrors(),a}settleHeldMirrors(){const t=this.w;if(!lt.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{t.globals.isDestroyed||!z.elementExists(t.dom.baseEl)||t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(i=>{i.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}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,u=o.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;u>0?(s=u/this.xRatio,c=s*parseInt(this.barOptions.columnWidth,10)/100):c*=parseInt(d,10)/100,Str
1953ing(d).indexOf("%")===-1&&(c=parseInt(d,10)),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!=null?l:0)/h,barWidth:(c!=null?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,u,p,g;const x=this.w,b=n+r*e;let m;const A=t.i,v=t.j,y=t.realIndex,w=t.translationsIndex;let S=0;for(let M=0;M<this.groupCtx.prevXF.length;M++)S=S+this.groupCtx.prevXF[M][v];let _=A;if(x.config.series[y].name&&(_=o.indexOf(x.config.series[y].name)),_>0){let M=i;this.groupCtx.prevXVal[_-1][v]<0?M=((h=this.series[A])==null?void 0:h[v])>=0?this.groupCtx.prevX[_-1][v]+S-(this.isReversed?S:0)*2:this.groupCtx.prevX[_-1][v]:this.groupCtx.prevXVal[_-1][v]>=0&&(M=((d=this.series[A])==null?void 0:d[v])>=0?this.groupCtx.prevX[_-1][v]:this.groupCtx.prevX[_-1][v]-S+(this.isReversed?S:0)*2),m=M}else m=i;((u=this.series[A])==null?void 0:u[v])===null?a=m:a=m+((p=this.series[A])==null?void 0:p[v])/this.invertedYRatio-(this.isReversed?((g=this.series[A])==null?void 0:g[v])/this.invertedYRatio:0)*2;const k=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:x});return this.barHelpers.barBackground({j:v,i:A,y1:b,y2:e,elSeries:c}),n=n+l,{pathTo:k.pathTo,pathFrom:k.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,u,p,g,x,b,m;const A=this.w,v=t.i,y=t.j,w=t.bc,S=t.realIndex,_=t.translationsIndex;if(A.axisFlags.isXNumeric){let D=A.seriesData.seriesX[S][y];D||(D=0),e=(D-A.globals.minX)/this.xRatio-a/2*A.globals.barGroups.length}const k=e+r*a;let M,C=0;for(let D=0;D<this.groupCtx.prevYF.length;D++)C=C+(isNaN(this.groupCtx.prevYF[D][y])?0:this.groupCtx.prevYF[D][y]);let L=v;if(o&&(L=o.indexOf(A.seriesData.seriesNames[S])),L>0&&!A.axisFlags.isXNumeric||L>0&&A.axisFlags.isXNumeric&&A.seriesData.seriesX[S-1][y]===A.seriesData.seriesX[S][y]){let D,E;const R=Math.min(this.yRatio.length+1,S+1);if(this.groupCtx.prevY[L-1]!==void 0&&this.groupCtx.prevY[L-1].length){for(let P=1;P<R;P++)if(!isNaN((c=this.groupCtx.prevY[L-P])==null?void 0:c[y])){E=this.groupCtx.prevY[L-P][y];break}}for(let P=1;P<R;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?E-C+(this.isReversed?C:0)*2:E;break}else if(((u=this.groupCtx.prevYVal[L-P])==null?void 0:u[y])>=0){D=((p=this.series[v])==null?void 0:p[y])>=0?E:E+C-(this.isReversed?C:0)*2;break}typeof D=="undefined"&&(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(F=>isNaN(F)))?M=n:M=D}else M=n;(x=this.series[v])!=null&&x[y]?s=M-((b=this.series[v])==null?void 0:b[y])/this.yRatio[_]+(this.isReversed?((m=this.series[v])==null?void 0:m[y])/this.yRatio[_]:0)*2:s=M;const T=this.barHelpers.getColumnPaths({barXPosition:k,barWidth:a,y1:M,y2:s,yRatio:this.yRatio[_],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:k,x2:a,elSeries:l}),{pathTo:T.pathTo,pathFrom:T.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,S,y,0),barXPosition:k,x:A.axisFlags.isXNumeric?e:e+i,y:s}}}function Zr({w:f,points:t,seedA:e,seedB:s,center:i,halfExtent:a,alongFn:n,isHorizontal:r,options:o,clampAt:l,sideSign:c}){const h=o;if(!h||h.show===!1)return[];if(!t||!t.length)return[];const d=h.maxPoints||3e3,u=t.length>d?Math.ceil(t.length/d):1,p=h.size!=null?h.size:2.5,g=h.jitter!=null?h.jitter:.5,x=a*g,b=h.constrainToViolin!==!1&&typeof l=="function",m=h.shape==="square",A=h.colorScale,v=A&&Array.isArray(A.colors)&&A.colors.length>0,y=v?Math.max(2,A.steps||24):1,w=v&&A.min!=null?A.min:f.globals.minY,_=(v&&A.max!=null?A.max:f.globals.maxY)-w||1,k=v?new Array(y).fill(""):[""];for(let C=0;C<t.length;C+=u){const L=t[C],T=n(L);let D=(ui(e*7919+s*100003+C)-.5)*2*x;if(b){const F=l(L);D>F&&(D=F),D<-F&&(D=-F)}c&&(D=Math.abs(D)*c);
1953const E=r?T:i+D,R=r?i+D:T,P=m?du(E,R,p):hu(E,R,p);if(v){let F=(L-w)/_;F<0&&(F=0),F>1&&(F=1),k[Math.round(F*(y-1))]+=P}else k[0]+=P}if(!v)return k[0]?[{fill:null,d:k[0]}]:[];const M=[];for(let C=0;C<y;C++)k[C]&&M.push({fill:cu(A.colors,C/(y-1)),d:k[C]});return M}function Kr({graphics:f,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,u=f.group({class:d?`${r} apexcharts-element-hidden`:r});d&&t.globals.delayedElements.push({el:u.node}),s.forEach(({groups:p,j:g})=>{const x=a?t.globals.colors[g]:t.globals.colors[n],b=i.fillColor,m=b==="series"?x:b==="series-dark"?za(x,.45):b||za(x,.45);p.forEach(A=>{const v=f.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",u.add(v)})}),e.add(u)}function za(f,t){const e=z.parseHex(f);if(!e)return f;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 cu(f,t){if(!f.length)return"#000";if(f.length===1)return f[0];const e=Math.max(0,Math.min(1,t))*(f.length-1),s=Math.floor(e),i=e-s,a=z.parseHex(f[s])||[0,0,0],n=z.parseHex(f[Math.min(s+1,f.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 ui(f){let t=(f^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function hu(f,t,e){return`M ${f-e} ${t} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${-2*e} 0 `}function du(f,t,e){return`M ${f-e} ${t-e} h ${2*e} v ${2*e} h ${-2*e} z `}class $a extends ft{draw(t,e,s){var i;const a=this.w,n=new G(this.w),r=a.globals.comboCharts?e:a.config.chart.type,o=new kt(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 Dt(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 u=[],p=[],g=a.globals.comboCharts?s[c]:c,{columnGroupIndex:x}=this.barHelpers.getGroupIndex(g),b=n.group({class:"apexcharts-series",seriesName:z.escapeString(a.seriesData.seriesNames[g]),rel:c+1,"data:realIndex":g});gt.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:S,x:_,barWidth:k,xDivision:M,zeroH:C}=A;d=v,h=_,p.push(h+(k!=null?k:0)/2);const L=n.group({class:"apexcharts-datalabels","data:realIndex":g}),T=n.group({class:"apexcharts-bar-goals-markers"}),D=this.isBoxPlot?this.boxOptions.points:null,E=[],R=a.layout.gridWidth,P=k!=null?k:0;for(let F=0;F<a.globals.dataPoints;F++){const I=this.barHelpers.getStrokeWidth(c,F,g);let B=null;const Y={indexes:{i:c,j:F,realIndex:g,translationsIndex:m},x:h,y:d,strokeWidth:I,elSeries:b};if(this.isHorizontal?B=this.drawHorizontalBoxPaths(it(Z({},Y),{yDivision:w,barHeight:y,zeroW:S})):B=this.drawVerticalBoxPaths(it(Z({},Y),{xDivision:M,barWidth:k,zeroH:C,cullBounds:{lo:-P,hi:R+P}})),d=B.y,h=B.x,F>0&&p.push(h+(k!=null?k:0)/2),u.push(d),B.culled)continue;const $=this.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:y,barWidth:k});if($&&T.add($),B.pathTo.forEach((X,W)=>{const N=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?B.color[W]:a.globals.stroke.colors[c],H=o.fillPath({seriesNumber:g,dataPointIndex:F,color:B.color[W],value:t[c][F]});this.renderSeries({realIndex:g,pathFill:H,lineFill:N,j:F,i:c,pathFrom:B.pathFrom,pathTo:X,strokeWidth:I,elSeries:b,x:h,y:d,series:t,columnGroupIndex:x,barHeight:y,barWidth:k,elDataLabelsWrap:L,elGoalsMarkers:T,visibleSeries:this.visibleI,type:a.config.chart.type})}),D&&D.show!==!1){const X=(i=a.candleData.seriesBoxPoints[g])==null?void 0:i[F];if(X&&X.length){const W=J=>this.coreUtils.getLogValAtSeriesIndex(J,g);let N,H,q;if(this.isHorizontal){const J=this.invertedYRatio,et=y!=null?y:0,at=S!=null?S:0;N=B.barYPosition+et/2,H=et/2,q=nt=>at+W(nt)/J}else{const J=this.yRatio[m],et=k!=null?k:0,at=C!=null?C:0;N=B.barXPosition+et/2,H=et/2,q=nt=>at-W(nt)/J}const V=Zr({w:a,points:X,seedA:g,seedB:F,center:N,halfExtent:H,alongFn:q,isHorizontal:this.isHorizontal,options:D});V.length&&E.push({groups:V,j:F})}}}D&&Kr({graphics:n,w:a,elSeries:b,pointsByCat:E,options:D,distributed:a.config.plotOptions.bar.distributed,realIndex:g,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[g]=p,a.globals.seriesYvalues[g]=u,l.add(b)}return l}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:n,cullBounds:r=null}){var o,l,c,h;const d=this.w,u=new G(this.w),p=t.i,g=t.j,{colors:x}=d.config.plotOptions.candlestick,{colors:b}=this.boxOptions,m=t.realIndex,A=F=>Array.isArray(F)?F[m]:F,v=A(x.upward),y=A(x.downward),w=this.yRatio[t.translationsIndex],S=this.getOHLCValue(m,g);let _=a,k=a,M=S.o<S.c?[v]:[y];this.isBoxPlot&&(M=[A(b.lower),A(b.upper)]);let C=Math.min(S.o,S.c),L=Math.max(S.o,S.c),T=S.m;d.axisFlags.isXNumeric&&(e=(d.seriesData.seriesX[m][g]-d.globals.minX)/this.xRatio-i/2);const D=e+i*this.visibleI;if(typeof((o=this.series[p])==null?void 0:o[g])=="undefined"||((l=this.series[p])==null?void 0:l[g])===null?(C=a,L=a):(C=a-C/w,L=a-L/w,_=a-S.h/w,k=a-S.l/w,T=a-S.m/w),r&&(D+i<r.lo||D>r.hi))return{pathTo:null,pathFrom:null,x:d.axisFlags.isXNumeric?e:e+s,y:L,barXPosition:D,color:M,culled:!0};let E;if(this.isOHLC){const F=D+i/2,I=a-S.o/w,B=a-S.c/w;E=[u.move(F,_)+u.line(F,k)+u.move(F,I)+u.line(D,I)+u.move(F,B)+u.line(D+i,B)]}else this.isBoxPlot?E=[u.move(D,C)+u.line(D+i/2,C)+u.line(D+i/2,_)+u.line(D+i/4,_)+u.line(D+i-i/4,_)+u.line(D+i/2,_)+u.line(D+i/2,C)+u.line(D+i,C)+u.line(D+i,T)+u.line(D,T)+u.line(D,C+n/2),u.move(D,T)+u.line(D+i,T)+u.line(D+i,L)+u.line(D+i/2,L)+u.line(D+i/2,k)+u.line(D+i-i/4,k)+u.line(D+i/4,k)+u.line(D+i/2,k)+u.line(D+i/2,L)+u.line(D,L)+u.line(D,T)+"z"]:E=[u.move(D,L)+u.line(D+i/2,L)+u.line(D+i/2,_)+u.line(D+i/2,L)+u.line(D+i,L)+u.line(D+i,C)+u.line(D+i/2,C)+u.line(D+i/2,k)+u.line(D+i/2,C)+u.line(D,C)+u.line(D,L-n/2)];let R=null;const P=(h=(c=this.ctx)==null?void 0:c.morphTypeChange)==null?void 0:h.getInitialPathFor(m,g);return P?R=P:d.globals.previousPaths.length>0&&(R=this.getPreviousPath(m,g,E[0])),R==null&&(R=u.move(D+i/2,C)+u.move(D,C)),d.axisFlags.isXNumeric||(e=e+s),{pathTo:E,pathFrom:R,x:e,y:L,goalY:this.barHelpers.getGoalValues("y",null,a,m,g,t.translationsIndex),barXPosition:D,color:M}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:n}){var r,o,l,c;const h=this.w,d=new G(this.w),u=t.i,p=t.j,g=t.realIndex,{colors:x}=h.config.plotOptions.candlestick,{colors:b}=this.boxOptions,m=E=>Array.isArray(E)?E[g]:E,A=this.invertedYRatio,v=this.getOHLCValue(g,p);let y=v.o<v.c?[m(x.upward)]:[m(x.downward)];this.isBoxPlot&&(y=[m(b.lower),m(b.upper)]);let w=a,S=a,_=Math.min(v.o,v.c),k=Math.max(v.o,v.c),M=v.m;h.axisFlags.isXNumeric&&(e=(h.seriesData.seriesX[g][p]-h.globals.minX)/this.invertedXRatio-i/2);const C=e+i*this.visibleI;typeof((r=this.series[u])==null?void 0:r[p])=="undefined"||((o=this.series[u])==null?void 0:o[p])===null?(_=a,k=a):(_=a+_/A,k=a+k/A,w=a+v.h/A,S=a+v.l/A,M=a+v.m/A);const L=[d.move(_,C)+d.line(_,C+i/2)+d.line(w,C+i/2)+d.line(w,C+i/2-i/4)+d.line(w,C+i/2+i/4)+d.line(w,C+i/2)+d.line(_,C+i/2)+d.line(_,C+i)+d.line(M,C+i)+d.line(M,C)+d.line(_+n/2,C),d.move(M,C)+d.line(M,C+i)+d.line(k,C+i)+d.line(k,C+i/2)+d.line(S,C+i/2)+d.line(S,C+i-i/4)+d.line(S,C+i/4)+d.line(S,C+i/2)+d.line(k,C+i/2)+d.line(k,C)+d.line(M,C)+"z"];let T=null;const D=(c=(l=this.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(g,p);return D?T=D:h.globals.previousPaths.length>0&&(T=this.getPreviousPath(g,p,L[0])),T==null&&(T=d.move(_,C+i/2)+d.move(_,C)),h.axisFlags.isXNumeric||(e=e+s),{pathTo:L,pathFrom:T,x:k,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,g,p,0),barYPosition:C,color:y}}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 uu=f=>{const t=fu(f),e=f.length-1,s=1e-6,i=[];let a,n,r,o;for(let l=0;l<e;l++)r=pi(f[l],f[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>
19539&&(o=r*3/Math.sqrt(o),t[l]=o*a,t[l+1]=o*n));for(let l=0;l<=e;l++)o=(f[Math.min(e,l+1)][0]-f[Math.max(0,l-1)][0])/(6*(1+t[l]*t[l])),i.push([o||0,t[l]*o||0]);return i},Jr=f=>{let t="";for(let e=0;e<f.length;e++){const s=f[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},fi={points(f){const t=uu(f),e=f[1],s=f[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=f[r],c=t[r];i.push([l[0]-c[0],l[1]-c[1],l[0],l[1]])}return i},slice(f,t,e){const s=f.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 pi(f,t){return(t[1]-f[1])/(t[0]-f[0])}function fu(f){const t=[];let e=f[0],s=f[1],i=t[0]=pi(e,s),a=1;for(let n=f.length-1;a<n;a++)e=s,s=f[a+1],t[a]=(i+(i=pi(e,s)))*.5;return t[a]=i,t}class pu extends ft{draw(t,e,s){var i;const a=this.w,n=new G(this.w),r=new kt(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Ha(this.violinOptions.side),this.rainSign=this.pointsOptions.show===!1?0:Ha(this.pointsOptions.position),this.boxShown=this.boxOptions.show===!0,this.boxFrac=this.boxShown?Wa(this.boxOptions.width,.15):0,this.rainFrac=Wa(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new Dt(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const o=n.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let l=0;l<t.length;l++){let c,h;const d=[],u=[],p=a.globals.comboCharts?s[l]:l,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(p),x=n.group({class:"apexcharts-series",seriesName:z.escapeString(a.seriesData.seriesNames[p]),rel:l+1,"data:realIndex":p});gt.addCollapsedClassToSeries(this.w,x,p),t[l].length>0&&(this.visibleI=this.visibleI+1);let b=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],b=p);const m=this.barHelpers.initialPositions(p),{y:A,barHeight:v,yDivision:y,zeroW:w,x:S,barWidth:_,xDivision:k,zeroH:M}=m;h=A,c=S,u.push(c+(_!=null?_:0)/2);const C=n.group({class:"apexcharts-datalabels","data:realIndex":p});this.seriesMaxWeight=0,this.normalize==="group"&&(a.violinData.seriesViolinDensity[p]||[]).forEach(D=>{D&&D.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=D.maxWeight)});const L=[];for(let T=0;T<a.globals.dataPoints;T++){const D=this.barHelpers.getStrokeWidth(l,T,p),E=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:l,j:T,realIndex:p,translationsIndex:b},y:h,yDivision:y,barHeight:v,zeroW:w}):this.drawVerticalViolin({indexes:{i:l,j:T,realIndex:p,translationsIndex:b},x:c,xDivision:k,barWidth:_,zeroH:M});c=E.x,h=E.y,T>0&&u.push(E.center),d.push(E.alongRepresentative);const R=this.buildPointsSubPath({realIndex:p,j:T,center:E.center,halfExtent:E.halfExtent,alongFn:E.alongFn,density:E.density,maxWeight:E.maxWeight,cloudBase:E.cloudBase,cloudMaxPx:E.cloudMaxPx,rainCenter:E.rainCenter,rainHalfPx:E.rainHalfPx});R.length&&L.push({groups:R,j:T});const P=r.fillPath({seriesNumber:this.distributed?T:p,dataPointIndex:T,color:this.distributed?a.globals.colors[T]:void 0,value:t[l][T]});this.renderSeries({realIndex:p,pathFill:P,lineFill:a.globals.stroke.colors[p],j:T,i:l,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:D,elSeries:x,x:c,y:h,series:t,columnGroupIndex:g,barHeight:v,barWidth:_,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin"});const F=x.node.querySelector(`path.apexcharts-violin-area[j='${T}']`);if(F&&isFinite(E.alongRepresentative)&&F.setAttribute(this.isHorizontal?"cx":"cy",`${E.alongRepresentative}`),E.boxPaths){const I=(i=this.boxOptions.strokeWidth)!=null?i:1;E.boxPaths.forEach(B=>{this.renderSeries({realIndex:p,pathFill:B.filled?this.boxOptions.fillColor||P:"none",lineFill:a.globals.stroke.colors[p],j:T,i:l,pathFrom:B.pathFrom,pathTo:B.pathTo,strokeWidth:I,elSeries:x,x:c,y:h,series:t,columnGroupIndex:g,barHeight:v,barWidth:_,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box"})})}}
1953Kr({graphics:n,w:a,elSeries:x,pointsByCat:L,options:this.pointsOptions,distributed:this.distributed,realIndex:p,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[p]=u,a.globals.seriesYvalues[p]=d,o.add(x)}return o}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a}){var n,r,o,l,c,h,d;const u=this.w,{realIndex:p,j:g,translationsIndex:x}=t,b=this.yRatio[x];u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[p][g]-u.globals.minX)/this.xRatio-i/2);const A=e+i*this.visibleI+i/2,v=i/2,y=this.getDensity(p,g),w=this.effectiveMaxWeight(y),S=T=>a-this.logVal(T,p)/b,_=Ga({halfExtent:v,cloudSign:(n=this.cloudSign)!=null?n:0,rainSign:(r=this.rainSign)!=null?r:0,boxFrac:(o=this.boxFrac)!=null?o:0,rainFrac:(l=this.rainFrac)!=null?l:0}),k=A+_.cloudBaseOff,M=this.buildBodyPath({nodes:y.nodes,center:k,halfExtent:_.cloudMaxPx,maxWeight:w,vertical:!0,alongFn:S,collapsed:!1,sideSign:this.cloudSign});let C=null;const L=(h=(c=this.ctx)==null?void 0:c.morphTypeChange)==null?void 0:h.getInitialPathFor(p,g);return L?C=L:u.globals.previousPaths.length>0&&(C=this.getPreviousPath(p,g,M)),C==null&&(C=this.buildBodyPath({nodes:y.nodes,center:k,halfExtent:_.cloudMaxPx,maxWeight:w,vertical:!0,alongFn:S,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e=e+s),{pathTo:M,pathFrom:C,x:e,y:a,center:A,halfExtent:v,alongFn:S,density:y,maxWeight:w,cloudBase:k,cloudMaxPx:_.cloudMaxPx,rainCenter:A+_.rainCenterOff,rainHalfPx:_.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:g,boxCenter:A+_.boxCenterOff,boxHalfPx:_.boxHalfPx,alongFn:S,vertical:!0}),alongRepresentative:S((d=this.series[t.i][g])!=null?d:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a}){var n,r,o,l,c,h,d;const u=this.w,{realIndex:p,j:g}=t,x=this.invertedYRatio;u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[p][g]-u.globals.minX)/this.invertedXRatio-i/2);const m=e+i*this.visibleI+i/2,A=i/2,v=this.getDensity(p,g),y=this.effectiveMaxWeight(v),w=L=>a+this.logVal(L,p)/x,S=Ga({halfExtent:A,cloudSign:(n=this.cloudSign)!=null?n:0,rainSign:(r=this.rainSign)!=null?r:0,boxFrac:(o=this.boxFrac)!=null?o:0,rainFrac:(l=this.rainFrac)!=null?l:0}),_=m+S.cloudBaseOff,k=this.buildBodyPath({nodes:v.nodes,center:_,halfExtent:S.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:w,collapsed:!1,sideSign:this.cloudSign});let M=null;const C=(h=(c=this.ctx)==null?void 0:c.morphTypeChange)==null?void 0:h.getInitialPathFor(p,g);return C?M=C:u.globals.previousPaths.length>0&&(M=this.getPreviousPath(p,g,k)),M==null&&(M=this.buildBodyPath({nodes:v.nodes,center:_,halfExtent:S.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:w,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e=e+s),{pathTo:k,pathFrom:M,x:a,y:e,center:m,halfExtent:A,alongFn:w,maxWeight:y,density:v,cloudBase:_,cloudMaxPx:S.cloudMaxPx,rainCenter:m+S.rainCenterOff,rainHalfPx:S.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:g,boxCenter:m+S.boxCenterOff,boxHalfPx:S.boxHalfPx,alongFn:w,vertical:!1}),alongRepresentative:w((d=this.series[t.i][g])!=null?d: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,sideSign:o=0}){const l=new G(this.w);if(t.length===0){const u=n(0);return a?l.move(e,u)+l.line(e,u):l.move(u,e)+l.line(u,e)}const c=u=>{if(r||i<=0)return 0;const p=u/i*s*this.bandwidthScale;return Math.min(s,Math.max(0,p))},h=[],d=[];for(let u=0;u<t.length;u++){const p=n(t[u].v),g=c(t[u].w),x=o===0?e+g:e+o*g,b=o===0?e-g:e;a?(h.push([x,p]),d.push([b,p])):(h.push([p,x]),d.push([p,b]))}return d.reverse(),this.smoothSegment(h,a,!1)+this.smoothSegment(d,a,!0)+"z"}buildBoxSubPaths({realIndex:t,j:e,boxCenter:s,boxHalfPx:i,alongFn:a,vertical:n}){var r,o;const l=this.w;if(!this.boxShown||i<=0)return null;const c=(r=l.violinData.seriesViolinSummary[t])==null?void 0:r[e];if(!c)return null;const h=i*Math.min(1,Math.max(0,(o=this.boxOptions.capWidth)!=null?o:.5)),[d,u,p,g,x]=c.map(y=>a(y)),b=(y,w)=>{const S=new G(this.w),_=(T,D)=>n?[T,D]:[D,T],k=T=>T.map(([D,E],R)=>R===0?S.move(D,E):S.line(D,E)).join(""),M=s,C=k([_(M,d),_(M,u)])+k([_(M,g),_(M,x)])+k([_(M-y,d),_(M+y,d)])+k([_(M-y,x),_(M+y,x)]),L=k([_(M-w,u),_(M+w,u),_(M+w,g),_(M-w,g)])+"z"+k([_(M-w,p),_(M+w,p)]);return{whiskers:C,box:L}},m=b(h,i),A=b(0,0),v=(y,w)=>{let S=null;return l.globals.previousPaths.length>0&&(S=this.getPreviousPath(t,e,y)),S==null?w:S};return[{pathTo:m.whiskers,pathFrom:v(m.whiskers,A.whiskers),filled:!1},{pathTo:m.box,pathFrom:v(m.box,A.box),filled:!0}]}smoothSegment(t,e,s){const i=new G(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=fi.points(o),c=e?l.map(gu):l;return n+=Jr(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,cloudBase:o,cloudMaxPx:l,rainCenter:c,rainHalfPx:h}){var d;const u=this.rainSign!==0,p=u?c:this.cloudSign!==0?o:s,g=u?h:this.cloudSign!==0?l:i;return Zr({w:this.w,points:(d=this.w.violinData.seriesViolinPoints[t])==null?void 0:d[e],seedA:t,seedB:e,center:p,halfExtent:g,alongFn:a,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:x=>this.halfWidthAtValue(x,n,g,r),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,s,i){const{nodes:a}=e,n=i!=null?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 gu(f){const t=[];for(let e=0;e<f.length;e+=2)t.push(f[e+1],f[e]);return t}function Ha(f){return f==="right"||f==="bottom"?1:f==="left"||f==="top"?-1:0}function Wa(f,t){let e=t;if(typeof f=="string"&&f.trim().endsWith("%")){const s=parseFloat(f);isFinite(s)&&(e=s/100)}else typeof f=="number"&&isFinite(f)&&(e=f);return Math.min(.5,Math.max(0,e))}function Ga({halfExtent:f,cloudSign:t,rainSign:e,boxFrac:s,rainFrac:i}){const a=s*f,n=e===0?f:i*f,r=e===0?0:e*(f-n);if(t===0)return{cloudBaseOff:0,cloudMaxPx:f,boxCenterOff:0,boxHalfPx:a,rainCenterOff:r,rainHalfPx:n};const c=2*Math.max(0,1-(e===0?0:i)-s)*f,h=t*(f-c);return{cloudBaseOff:h,cloudMaxPx:c,boxCenterOff:h-t*a,boxHalfPx:a,rainCenterOff:r,rainHalfPx:n}}class Qr{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 z;if(a.config.plotOptions[t].enableShades)if(this.w.config.theme.mode==="dark"){const h=c.shadeColor(n*-1,o.color);l=z.hexToRgba(z.isColorHex(h)?h:z.rgb2hex(h),a.config.fill.opacity)}else{const h=c.shadeColor(n,o.color);l=z.hexToRgba(z.isColorHex(h)?h:z.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.
1953config.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 b=i.seriesData.series[e];c=b.length?b[0]:0,h=c;for(let m=1;m<b.length;m++)b[m]<c&&(c=b[m]),b[m]>h&&(h=b[m])}const d=n.colorScale.min,u=n.colorScale.max;typeof d!="undefined"&&typeof u!="undefined"&&u>d?(c=d,h=u):typeof d!="undefined"&&(c=d<i.globals.minY?d:i.globals.minY,h=u>i.globals.maxY?u:i.globals.maxY);const p=Math.abs(h)+Math.abs(c),g=Math.min(Math.max(a,c),h);let x=p===0?0:100*g/p;return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(m=>{if(a>=m.from&&a<=m.to){o=m.color,l=m.foreColor?m.foreColor:null,c=m.from,h=m.to;const A=Math.abs(h)+Math.abs(c);x=A===0?0:100*a/A}}),{color:o,foreColor:l,percent:x}}calculateDataLabels({text:t,x:e,y:s,i,j:a,colorProps:n,fontSize:r}){const o=this.w,l=o.config.dataLabels,c=new G(this.w),h=new xe(this.w,this.ctx);let d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});const u=hs(l.offsetX,o,i,a),p=hs(l.offsetY,o,i,a),g=e+u,x=s+parseFloat(l.style.fontSize)/3+p;h.plotDataLabelsText({x:g,y:x,text:t,i,j:a,color:n.foreColor,parent:d,fontSize:r,dataLabelsConfig:l})}return d}}class xu{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 Qr(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 G(this.w,this.ctx),n=ys(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 u=Array.isArray(i.config.fill.opacity)?(e=i.config.fill.opacity[0])!=null?e:1:(s=i.config.fill.opacity)!=null?s:1;let p=0,g=!1;this.negRange=this.helpers.checkColorRange();const x=t.slice();i.config.yaxis[0].reversed&&(g=!0,x.reverse());for(let m=g?0:x.length-1;g?m<x.length:m>=0;g?m++:m--){const A=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:z.escapeString(i.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});if(gt.addCollapsedClassToSeries(this.w,A,m),r||a.setupEventDelegation(A,".apexcharts-heatmap-rect"),i.config.chart.dropShadow.enabled){const S=i.config.chart.dropShadow;new Ct(this.w).dropShadow(A,S,m)}let v=0;const y=i.config.plotOptions.heatmap.shadeIntensity;let w=0;for(let S=0;S<i.globals.dataPoints;S++){if(!h&&i.seriesData.seriesX.length&&!i.globals.allSeriesHasEqualX&&i.globals.minX+i.globals.minXDiff*S<i.seriesData.seriesX[m][w]){v=v+l;continue}if(w>=x[m].length)break;const _=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 k=this.helpers.getShadeColor(i.config.chart.type,m,w,this.negRange);let M=k.color;const C=k.colorProps;i.config.fill.type==="image"&&(M=new kt(this.w).fillPath({seriesNumber:m,dataPointIndex:w,opacity:i.globals.hasNegs?C.percent<0?1-(1+C.percent/100):y+C.percent/100:C.percent/100,patternID:z.randomId(),width:i.config.fill.image.width?i.config.fill.image.width:_,height:i.config.fill.image.height?i.config.fill.image.height:c}));const L=this.rectRadius,T=i.config.plotOptions.heatmap.useFillColorAsStroke?M:i.globals.stroke.colors[0];if(r)n.drawRectCell(v,p,_,c,{fill:M,fillOpacity:u,stroke:T,strokeWidth:this.strokeWidth,radius:L,seriesIndex:m,dataPointIndex:w});else{const P=a.drawRect(v,p,_,c,L);if(P.attr({cx:v,cy:p}),P.node.classList.add("apexcharts-heatmap-rect"),A.add(P),P.attr({fill:M,i:m,index:m,j:w,val:t[m][w],"stroke-width":this.strokeWidth,stroke:T,color:M}),i.config.chart.animations.enabled&&!i.globals.dataChanged){let F=1;
1953i.globals.resized||(F=i.config.chart.animations.speed),this.animateHeatMap(P,v,p,_,c,F,m,w)}if(i.globals.dataChanged){let F=1;if(this.dynamicAnim.enabled&&i.globals.shouldAnimate){F=this.dynamicAnim.speed;let I=i.globals.previousPaths[m]&&i.globals.previousPaths[m][w]&&i.globals.previousPaths[m][w].color;I||(I="rgba(255, 255, 255, 0)"),this.animateHeatColor(P,z.isColorHex(I)?I:z.rgb2hex(I),z.isColorHex(M)?M:z.rgb2hex(M),F)}}}const D=i.config.dataLabels.formatter,E=D(i.seriesData.series[m][w],{value:i.seriesData.series[m][w],seriesIndex:m,dataPointIndex:w,w:i}),R=this.helpers.calculateDataLabels({text:E,x:v+_/2,y:p+c/2,i:m,j:w,colorProps:C,series:x});R!==null&&A.add(R),h||(v=v+l),w++}p=p+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 ge(this.w),d=l.config.chart.animations.animateGradually,u=d&&d.enabled!==!1;let p=0;if(u){const g=(l.seriesData.series||[]).length||1,x=l.globals.dataPoints||1,b=g+x-2,m=Math.min(d.delay||0,n*.5/Math.max(1,b));p=Oi({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)},p)}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}}class mu{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 Dt(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(z.isNumber(t[a][0])?r+o.config.markers.offsetY:null)),l.push(s+o.config.markers.offsetX),c.push(z.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])!="undefined"){if(h)if(t>0){const d=this.lineCtx.stackTopAt(e,0);a=d===void 0?this.lineCtx.zeroY:d}else a=this.lineCtx.zeroY;else 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]=="undefined"){for(let d=t-1;d>=0;d--)if(s[d][0]!==null&&typeof s[d][0]!="undefined"){a=this.lineCtx.prevSeriesY[d][0],i=a;break}}return{prevY:i,lineYPosition:a}}}function bu(f,t,e,s){var i;const a=f.globals,n=a.prevStreamFrame;if(!n||!a.dataChanged||!((i=f.axisFlags)!=null&&i.isXNumeric))return null;const r=n.seriesX[t],o=n.seriesY[t],l=f.seriesData.seriesX[t],c=f.seriesData.series[t];if(!r||!o||!l||!c||r.length<3||l.length<3)return null;let h=-1;for(let E=0;E<r.length;E++)if(r[E]===l[0]){h=E;break}if(h===-1)return null;const d=Math.min(r.length-h,l.length);if(d<2)return null;const u=l.length-d;if(h===0&&u===0)return null;for(let E=0;E<d;E++){if(r[h+E]!==l[E])return null;const R=o[h+E],P=c[E];if(R!==P&&!(R==null&&P==null))return null}const p=n.xPixels[t],g=n.yPixels[t];if(!p||!g)return null;let x=-1,b=-1;for(let E=0;E<d;E++)p[h+E]==null||g[h+E]==null||e[E]==null||s[E]==null||(x===-1&&(x=E),b=E);if(x===-1||b<=x)return null;const m=e[x],A=e[b],v=p[h+x],y=p[h+b];if(Math.abs(A-m)<1e-6)return null;const w=(y-v)/(A-m),S=v-w*m;if(!isFinite(w)||!isFinite(S)||Math.abs(w-1)>.02||Math.abs(S)<.5)return null;let _=x,k=x;for(let E=x;E<=b;E++){const R=s[E];R==null||g[h+E]==null||(R<s[_]&&(_=E),R>s[k]&&(k=E))}let M=1,C=0;const L=s[_],T=s[k];if(Math.abs(T-L)>1e-6?(M=(g[h+k]-g[h+_])/(T-L),C=g[h+_]-M*L):C=g[h+_]-L,!isFinite(M)||!isFinite(C)||M<.2||M>5)return null;const D=Math.floor((x+b)/2);if(D!==x&&D!==b&&e[D]!=null&&p[h+D]!=null){const E=w*e[D]+S;if(Math.abs(E-p[h+D])>1.5)return null;if(s[D]!=null&&g[h+D]!=null){const R=M*s[D]+C;if(Math.abs(R-g[h+D])>1.5)return null}}return a.streamScrolled=!0,{ax:w,bx:S,ay:M,by:C}}const yu=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Va(f,t){const{ax:e,bx:s,ay:i,by:a}=t,n=[],r=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;(o=r.exec(f))!==null;){const l=o[1].toUpperCase(),c=(o[2].match(yu)||[]).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(" ")}class Se{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 Lr(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new mu(this),this.markers=new ms(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,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 G(this.w),o=n.globals.comboCharts?e:n.config.chart.type,l=r.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new Dt(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.getL
1953ogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const h=[];for(let d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);const u=n.globals.comboCharts?s[d]:d,p=this.yRatio.length>1?u:0;this._initSerieVariables(t,d,u);const g=[],x=[],b=[];let m=n.globals.padHorizontal+this.categoryAxisCorrection;const A=1,v=[],y=[];gt.addCollapsedClassToSeries(this.w,this.elSeries,u),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(m=(n.seriesData.seriesX[u][0]-n.globals.minX)/this.xRatio),b.push(m);const w=m;let S;const _=w;let k=this.zeroY,M=this.zeroY;const C=0;k=this.lineHelpers.determineFirstPrevY({i:d,realIndex:u,series:t,prevY:k,lineYPosition:C,translationsIndex:p}).prevY,n.config.stroke.curve==="monotoneCubic"&&t[d][0]===null?g.push(null):g.push(k);const T=k;let D;o==="rangeArea"&&(D=this.lineHelpers.determineFirstPrevY({i:d,realIndex:u,series:i,prevY:M,lineYPosition:C,translationsIndex:p}),M=D.prevY,S=M,x.push(g[0]!==null?M:null));const E=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:u,translationsIndex:p,prevX:_,prevY:k,prevY2:M}),R=[g[0]],P=[x[0]],F={type:o,series:t,realIndex:u,translationsIndex:p,i:d,x:m,y:A,pX:w,pY:T,pathsFrom:E,linePaths:v,areaPaths:y,seriesIndex:s,lineYPosition:C,xArrj:b,yArrj:g,y2Arrj:x,seriesRangeEnd:i},I=this._iterateOverDataPoints(it(Z({},F),{iterations:o==="rangeArea"?t[d].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){const B=this._calculatePathsFrom({series:i,i:d,realIndex:u,prevX:_,prevY:M}),Y=this._iterateOverDataPoints(it(Z({},F),{series:i,xArrj:[m],yArrj:R,y2Arrj:P,pY:S,areaPaths:I.areaPaths,pathsFrom:B,iterations:i[d].length-1,isRangeStart:!1})),$=I.linePaths.length/2;for(let X=0;X<$;X++)I.linePaths[X]=Y.linePaths[X+$]+I.linePaths[X];I.linePaths.splice($),I.pathFromLine=Y.pathFromLine+I.pathFromLine}else/z\s*$/i.test(I.pathFromArea)||(I.pathFromArea+="z");this._handlePaths({type:o,realIndex:u,i:d,paths:I}),this.markers.flushBatch(this.elPointsMain,u),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)!="undefined"&&h.sort((d,u)=>Number(d.node.getAttribute("zIndex"))-Number(u.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 G(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!="undefined"?r.zIndex:s,seriesName:z.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]},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 G(this.w);let h,d,u,p;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(u=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),p=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),l.globals.previousPaths.length>0){const g=this.lineHelpers.checkPreviousPaths({pathFromLine:u,pathFromArea:p,realIndex:i});u=g.pathFromLine,p=g.pathFromArea}return{prevX:n,prevY:r,linePath:h,areaPath:d,pathFromLine:u,pathFromArea:p}}_stackKey(t,e){if(!this.w.axisFlags.isXNumeric)return e;const s=this.w.seriesData.seriesX[t];return s?s[e]:void 0}stackTopAt(t,e){const s=this._stackKey(t,e);if(s!=null)return this.prevSeriesYByX.get(s)}_recordStackTops(t,e){const s=this.w;if(Array.isArray(e)&&!(s.globals.collapsedSeriesIndices.indexOf(t)!==-1||s.globals.ancillaryCollapsedSeriesIndices.indexOf(t)!==-1))for(let i=0;i<e.length;i++){const a=this._stackKey(t,i);if(a==null)continue;const n=e[i];z.isNumber(n)&&this.prevSeriesYByX.set(a,n)}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){var a,n,r,o,l,c,h;const d=this.w,u=new G(this.w),p=ys(this.ctx,u),g=new kt(this.w);this.prevSeriesY.push(i.yArrj),this._recordStackTops(e,i.yArrj);let x=null;(t==="line"||t==="area")&&d.globals.dataChanged&&(x=bu(d,e,i.xArrj,i.yArrj));let b=null;!x&&(t==="line"||t==="area")&&(b=iu(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 _=d.globals.seriesXvalues[e][d.globals.seriesXvalues[e].length-m.count-1],k=u.drawRect(_,0,d.layout.gridWidth,d.layout.gridHeight,0);d.dom.elForecastMask.appendChild(k.node);const M=u.drawRect(0,0,_,d.layout.gridHeight,0);d.dom.elNonForecastMask.appendChild(M.node)}this.pointsChart?Ya(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}):(d.globals.delayedElements.push({el:this.elPointsMain.node,index:e}),Ya(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}),ws(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,y=t==="line"||t==="area",w=y&&i.linePaths.length>
19531?[i.linePaths.join(" ")]:i.linePaths,S=y&&i.areaPaths.length>1?[i.areaPaths.join(" ")]:i.areaPaths;if(t==="area"){const _=g.fillPath({seriesNumber:e});for(let k=0;k<S.length;k++){const M=p.renderPaths(it(Z({},A),{pathFrom:x?Va(i.areaPaths[k],x):(r=(n=b==null?void 0:b.area)==null?void 0:n.from)!=null?r:i.pathFromArea,pathTo:S[k],pathToNumeric:v?{xs:v.xs,ys:v.ys,closeY:v.areaCloseY}:void 0,pathToInterp:(o=b==null?void 0:b.area)==null?void 0:o.toInterp,scrollMorph:!!x,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:_}));this.elSeries.add(M)}}if(d.config.stroke.show&&!this.pointsChart){let _=null;if(t==="line")_=g.fillPath({seriesNumber:e,i:s});else if(d.config.stroke.fill.type==="solid")_=d.globals.stroke.colors[e];else{const k=d.config.fill;d.config.fill=d.config.stroke.fill,_=g.fillPath({seriesNumber:e,i:s}),d.config.fill=k}for(let k=0;k<w.length;k++){let M=_;t==="rangeArea"&&(M=g.fillPath({seriesNumber:e}));const C=it(Z({},A),{pathFrom:x?Va(i.linePaths[k],x):(c=(l=b==null?void 0:b.line)==null?void 0:l.from)!=null?c:i.pathFromLine,pathTo:w[k],pathToNumeric:v?{xs:v.xs,ys:v.ys}:void 0,pathToInterp:(h=b==null?void 0:b.line)==null?void 0:h.toInterp,scrollMorph:!!x,stroke:_,strokeWidth:this.strokeWidth,strokeLineCap:d.config.stroke.lineCap,fill:t==="rangeArea"?M:"none"}),L=p.renderPaths(C);if(this.elSeries.add(L),L.attr("fill-rule","evenodd"),m.count>0&&t!=="rangeArea"){const T=p.renderPaths(C);T.node.setAttribute("stroke-dasharray",m.dashArray),m.strokeWidth&&T.node.setAttribute("stroke-width",m.strokeWidth),this.elSeries.add(T),T.attr("clip-path",`url(#forecastMask${d.globals.cuid})`),L.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:u,seriesIndex:p,lineYPosition:g,xArrj:x,yArrj:b,y2Arrj:m,isRangeStart:A,seriesRangeEnd:v}){var y,w;const S=this.w,_=new G(this.w),k=this.yRatio;let{prevY:M,linePath:C,areaPath:L,pathFromLine:T,pathFromArea:D}=h;const E=z.isNumber(S.globals.minYArr[i])?S.globals.minYArr[i]:S.globals.minY;s||(s=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);const R=(X,W)=>W-X/k[a]+(this.isReversed?X/k[a]:0)*2;let P=o;const F=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.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 I=S.config.stroke.curve;Array.isArray(I)&&(Array.isArray(p)?I=I[p[n]]:I=I[n]);let B=0,Y;const $=this.pointsChart?this._scatterJitterPx(i):null;if(I==="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:u,xArrj:x,yArrj:b,y2Arrj:m,stackSeries:F});if(X)return X}for(let X=0;X<s&&e[n].length!==0;X++){const W=typeof e[n][X+1]=="undefined"||e[n][X+1]===null;if(S.axisFlags.isXNumeric){let J=S.seriesData.seriesX[i][X+1];typeof S.seriesData.seriesX[i][X+1]=="undefined"&&(J=S.seriesData.seriesX[i][s-1]),r=(J-S.globals.minX)/this.xRatio}else r=r+this.xDivision;if(F)if(n>0&&S.globals.collapsedSeries.length<S.config.series.length-1)if((at=>{var nt;for(let ot=at;ot>=0;ot--){const Et=(nt=p==null?void 0:p[ot])!=null?nt:ot;if(S.globals.collapsedSeriesIndices.indexOf(Et)===-1&&S.globals.ancillaryCollapsedSeriesIndices.indexOf(Et)===-1)return ot}return-1})(n-1)<0)g=this.zeroY;else{const at=this.stackTopAt(i,X+1);g=at===void 0?this.zeroY:at}else g=this.zeroY;else g=this.zeroY;W?o=R(E,g):(o=R(e[n][X+1],g),t==="rangeArea"&&(P=R(v[n][X+1],g)));let N=r,H=o;if($){const J=i*100003+(X+1);$.x&&(N=r+(ui(J*7919+13)-.5)*2*$.x),$.y&&(H=o+(ui(J*6271+97)-.5)*2*$.y)}x.push(e[n][X+1]===null?null:N),W&&(S.config.stroke.curve==="smooth"||S.config.stroke.curve==="monotoneCubic")?(b.push(null),m.push(null)):(b.push(H),m.push(P));const q=this.lineHelpers.calculatePoints({series:e,x:N,y:H,realIndex:i,i:n,j:X,prevY:M}),V=this._createPaths({type:t,series:e,i:n,j:X,x:r,y:o,y2:P,xArrj:x,yArrj:b,y2Arrj:m,pX:l,pY:c,pathState:B,segmentStartX:Y,linePath:C,areaPath:L,linePaths:d,areaPaths:u,curve:
1953I,isRangeStart:A});u=V.areaPaths,d=V.linePaths,l=V.pX,c=V.pY,B=V.pathState,Y=V.segmentStartX,L=V.areaPath,C=V.linePath,this.appendPathFrom&&!S.globals.hasNullValues&&!(I==="monotoneCubic"&&t==="rangeArea")&&(T+=_.line(r,this.areaBottomY),D+=_.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:x,pathFromArea:D,areaPaths:u,pathFromLine:T,linePaths:d,linePath:C,areaPath:L}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i,j:a,realIndex:n}){const r=this.w,o=new xe(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.globals.markers.batched)&&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:u,xArrj:p,yArrj:g,y2Arrj:x,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 ot=0;ot<=n;ot++){const Et=A[ot];if(Et===null||typeof Et=="undefined")return null}const y=m.axisFlags.isXNumeric,w=y?m.seriesData.seriesX[i]:null;if(y&&(!w||w.length<v))return null;const S=this.yRatio[a],_=this.isReversed,k=this.zeroY,M=this.areaBottomY,C=this.xRatio,L=m.globals.minX,T=this.xDivision,D=m.config.markers.offsetX,E=m.config.markers.offsetY,R=this.appendPathFrom&&!m.globals.hasNullValues;let{pathFromLine:P,pathFromArea:F}=h;const I=this.ctx&&this.ctx.renderer,B=!!(I&&I.kind&&I.kind!=="svg"),Y=!B||m.globals.dataChanged&&!!m.globals.prevStreamFrame,$=B?new Float64Array(v):null,X=B?new Float64Array(v):null;$&&X&&($[0]=l,X[0]=c),typeof m.globals.pointsArray[i]=="undefined"&&(m.globals.pointsArray[i]=[]);const W=m.globals.pointsArray[i],N=w?(w[0]-L)/C+D:this.categoryAxisCorrection+D;W.push([N,h.prevY+E]);const H=Y?new Array(n+1):[];Y&&(H[0]="M "+l+" "+c);const q=Y&&R?new Array(n):null;let V=r,J=l,et=c;for(let ot=0;ot<n;ot++){w?J=(w[ot+1]-L)/C:(V=V+T,J=V);const Et=A[ot+1];et=k-Et/S+(_?Et/S:0)*2,p.push(J),g.push(et),x.push(o),W.push([J+D,et+E]),Y&&(H[ot+1]=" L "+J+" "+et,q&&(q[ot]=" L "+J+" "+M)),$&&X&&($[ot+1]=J,X[ot+1]=et)}let at="",nt="";if(Y&&(at=H.join(""),nt=at+" L "+J+" "+M+" L "+l+" "+M+"z"),q){const ot=q.join("");P+=ot,F+=ot}else!Y&&R&&(P+=" L "+J+" "+M,F+=" L "+J+" "+M);return d.push(at),u.push(nt),{yArrj:g,xArrj:p,pathFromArea:F,areaPaths:u,pathFromLine:P,linePaths:d,linePath:at,areaPath:nt,numericXY:$?{xs:$,ys:X,areaCloseY:M}: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:u,segmentStartX:p,linePath:g,areaPath:x,linePaths:b,areaPaths:m,curve:A,isRangeStart:v}){const y=new G(this.w),w=this.areaBottomY,S=t==="rangeArea",_=t==="rangeArea"&&v;switch(A){case"monotoneCubic":{const k=v?o:c,M=(T,D)=>T.map((E,R)=>[E,D[R]]).filter(E=>E[1]!==null),C=T=>{const D=[];let E=0;return T.forEach(R=>{R!==null?E++:E>0&&(D.push(E),E=0)}),E>0&&D.push(E),D},L=(T,D)=>{const E=C(T),R=[];for(let P=0,F=0;P<E.length;F+=E[P++])R[P]=fi.slice(D,F,F+E[P]);return R};switch(u){case 0:if(k[i+1]===null)break;u=1;case 1:if(!(S?r.length===e[s].length:i===e[s].length-2))break;case 2:{const T=v?r:r.slice().reverse(),D=v?k:k.slice().reverse(),E=M(T,D),R=E.length>1?fi.points(E):E;let P=[];S&&(_?m=E:P=m.reverse());let F=0,I=0;
1953if(L(D,R).forEach(B=>{F++;const Y=Jr(B),$=I;I+=B.length;const X=I-1;_?g=y.move(E[$][0],E[$][1])+Y:S?g=y.move(P[$][0],P[$][1])+y.line(E[$][0],E[$][1])+Y+y.line(P[X][0],P[X][1]):(g=y.move(E[$][0],E[$][1])+Y,x=g+y.line(E[X][0],w)+y.line(E[$][0],w)+"z",m.push(x)),b.push(g)}),S&&F>1&&!_){const B=b.slice(F).reverse();b.splice(F),B.forEach(Y=>b.push(Y))}u=0;break}}break}case"smooth":{const k=(a-h)*.35;if(e[s][i]===null)u=0;else switch(u){case 0:if(p=h,_?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),x=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]=="undefined"){b.push(g),m.push(x);break}if(u=1,i<e[s].length-2){const M=y.curve(h+k,d,a-k,n,a,n);g+=M,x+=M;break}case 1:if(e[s][i+1]===null)_?g+=y.line(h,l):g+=y.move(h,d),x+=y.line(h,w)+y.line(p,w)+"z",b.push(g),m.push(x),u=-1;else{const M=y.curve(h+k,d,a-k,n,a,n);g+=M,x+=M,i>=e[s].length-2&&(_&&(g+=y.curve(a,n,a,n,a,l)+y.move(a,l)),x+=y.curve(a,n,a,n,a,w)+y.line(p,w)+"z",b.push(g),m.push(x),u=-1)}break}h=a,d=n;break}default:{const k=(M,C,L)=>{let T="";switch(M){case"stepline":T=y.line(C,null,"H")+y.line(null,L,"V");break;case"linestep":T=y.line(null,L,"V")+y.line(C,null,"H");break;case"straight":T=y.line(C,L);break}return T};if(e[s][i]===null)u=0;else switch(u){case 0:if(p=h,_?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),x=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]=="undefined"){b.push(g),m.push(x);break}if(u=1,i<e[s].length-2){const M=k(A,a,n);g+=M,x+=M;break}case 1:if(e[s][i+1]===null)_?g+=y.line(h,l):g+=y.move(h,d),x+=y.line(h,w)+y.line(p,w)+"z",b.push(g),m.push(x),u=-1;else{const M=k(A,a,n);g+=M,x+=M,i>=e[s].length-2&&(_&&(g+=y.line(a,l)),x+=y.line(a,w)+y.line(p,w)+"z",b.push(g),m.push(x),u=-1)}break}h=a,d=n;break}}return{linePaths:b,areaPaths:m,pX:h,pY:d,pathState:u,segmentStartX:p,linePath:g,areaPath:x}}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)}}}function to(f,t){const{lines:e,lineHeight:s,anchor:i,elbow:a,labelX:n,labelY:r,side:o,connector:l,style:c,foreColor:h}=t,d=new G(f),u=d.group({class:t.groupClass||"apexcharts-outer-label-group"});if(l.show){const m=`M ${i.x} ${i.y} L ${a.x} ${a.y} L ${n} ${r}`,A=d.drawPath({d:m,stroke:l.color,strokeWidth:l.width,fill:"none",strokeLinecap:"round"});A.node.classList.add(t.connectorClass||"apexcharts-outer-label-connector"),u.add(A)}const p=o==="right"?n+4:n-4,g=e.length,x=r-(g-1)*s/2,b=d.drawText({x:p,y:x,text:g===1?e[0]:e,textAnchor:o==="right"?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:h,dominantBaseline:"central",cssClass:t.textClass||"apexcharts-outer-label"});if(g>1){const m=b.node.getElementsByTagName("tspan");for(let A=0;A<m.length;A++)m[A].setAttribute("x",`${p}`),m[A].setAttribute("dy",A===0?"0":`${s}`)}return u.add(b),u}function wu(f,t,e={}){const s=new G(f),i=e.fontSize||"12px",a=parseFloat(i)||12;let n=0;return t.forEach(r=>{if(r==null||r==="")return;const o=`${r}`,l=s.getTextRects(o,i,e.fontFamily,"").width;n=Math.max(n,l>0?l:o.length*a*.58)}),n}function eo(f,t,e,s){const i=f.slice().sort((r,o)=>r.idealY-o.idealY);i.forEach(r=>{r.labelY=r.idealY});for(let r=1;r<i.length;r++)i[r].labelY-i[r-1].labelY<t&&(i[r].labelY=i[r-1].labelY+t);const a=i[i.length-1],n=a?a.labelY-e:0;if(n>0)for(let r=i.length-1;r>=0;r--)i[r].labelY-=n,r<i.length-1&&i[r+1].labelY-i[r].labelY<t&&(i[r].labelY=i[r+1].labelY-t);if(s!=null&&i.length&&i[0].labelY<s){const r=s-i[0].labelY;for(let o=0;o<i.length;o++)i[o].labelY+=r}}class Je{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 G(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 G(this.w);let a=0;return t.forEach(n=>{if(n===null||typeof n=="undefined"||n==="")return;const r=i.getTextRects(`${n}`,e||"12px",s,"");a=Math.max(a,r.width)}),a}drawExternalLabel(t){return to(this.w,it(Z({},t),{groupClass:"apexcharts-pie-name-label-group",textClass:"apexcharts-pie-name-label",connectorClass:"apexcharts-pie-label-connector"}))}}const Ua=Math.PI/180,gi=180/Math.PI;function Bi(f,t,e,s){return{x:f+e*Math.cos((s-90)*Ua),y:t+e*Math.sin((s-90)*Ua)}}const dt=f=>`${f.x} ${f.y}`;function xi({cx:f,cy:t,rIn:e,rOut:s,a0:i,a1:a,r:n,spanDeg:r}){const o=(k,M)=>Bi(f,t,k,M),l=n/s*gi,c=n/e*gi,h=o(s,i+l),d=o(s,a-l),u=r-2*l>180?1:0,p=o(s,a),g=o(s-n,a),x=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),S=o(e,i),_=o(e+n,i);return["M",dt(h),"A",s,s,0,u,1,dt(d),"Q",dt(p),dt(g),"L",dt(w),"Q",dt(y),dt(m),"A",e,e,0,v,0,dt(A),"Q",dt(S),dt(_),"L",dt(b),"Q",dt(x),dt(h),"Z"].join(" ")}function vu({cx:f,cy:t,rOut:e,a0:s,a1:i,r:a,spanDeg:n}){const r=(x,b)=>Bi(f,t,x,b),o=a/e*gi,l=r(e,s+o),c=r(e,i-o),h=n-2*o>180?1:0,d=r(e,i),u=r(e-a,i),p=r(e,s),g=r(e-a,s);return["M",dt(l),"A",e,e,0,h,1,dt(c),"Q",dt(d),dt(u),"L",`${f} ${t}`,"L",dt(g),"Q",dt(p),dt(l),"Z"].join(" ")}function so({cx:f,cy:t,rIn:e,rOut:s,a0:i,a1:a,spanDeg:n}){const r=(u,p)=>Bi(f,t,u,p),o=n>180?1:0,l=r(s,i),c=r(s,a),h=r(e,a),d=r(e,i);return["M",dt(l),"A",s,s,0,o,1,dt(c),"L",dt(h),"A",e,e,0,o,0,dt(d),"Z"].join(" ")}const Au="transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)",Su="opacity 180ms ease-out";class Qe{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=t.layout.gridHeight/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
1953nalLabelSpace(),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 G(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,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==null?"":e}`.split(` 1954`)).map(i=>i==null?"":`${i}`)}reserveExternalLabelSpace(){const t=this.w,e=new Je(t),s=(t.seriesData.seriesNames||[]).map((d,u)=>this.getExternalLabelLines(u)),i=e.getMaxLabelWidth(s.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=s.reduce((d,u)=>Math.max(d,u.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 G(this.w),n=a.group({class:"apexcharts-pie"});if(i.globals.noData)return n;let r=0;for(let p=0;p<t.length;p++)r+=z.negToZero(t[p]);const o=[],l=a.group();r===0&&(r=1e-5),t.forEach(p=>{this.maxY=Math.max(this.maxY,p)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(n);const c=i.globals.collapsedSeriesIndices||[];let h=1;if(this.chartType==="polarArea"){let p=0;for(let g=0;g<t.length;g++)c.indexOf(g)===-1&&p++;h=Math.max(1,p)}for(let p=0;p<t.length;p++){const g=this.fullAngle*z.negToZero(t[p])/r;o.push(g),this.chartType==="polarArea"?(o[p]=c.indexOf(p)>-1?0:this.fullAngle/h,this.sliceSizes.push(i.globals.radialSize*t[p]/(this.maxY||1))):this.sliceSizes.push(i.globals.radialSize)}const d=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;if(i.globals.dataChanged&&!d)if(this.chartType==="polarArea"){const p=i.globals.previousPaths,g=i.globals.prevPolarAngles;if(Array.isArray(g)&&g.length===p.length)this.prevSectorAngleArr=g.slice();else for(let b=0;b<p.length;b++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,p.length));let x=0;for(let b=0;b<p.length;b++)x=Math.max(x,z.negToZero(p[b]));i.config.yaxis[0].max&&(x=i.config.yaxis[0].max),this.prevSliceSizes=p.map(b=>i.globals.radialSize*z.negToZero(b)/(x||1))}else{let p=0;for(let x=0;x<i.globals.previousPaths.length;x++)p+=z.negToZero(i.globals.previousPaths[x]);let g;for(let x=0;x<i.globals.previousPaths.length;x++)g=this.fullAngle*z.negToZero(i.globals.previousPaths[x])/p,this.prevSectorAngleArr.push(g)}if(this.chartType==="polarArea"&&(i.globals.prevPolarAngles=o.slice()),this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){const p=a.drawCircle(this.donutSize);p.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),l.add(p)}const u=s.drawArcs(o,t);
1954if(this.sliceLabels.forEach(p=>{u.add(p)}),l.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${i.config.plotOptions.pie.customScale})`}),l.add(u),n.add(l),this.donutDataLabels.show){const p=this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0,g=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:p?0:this.donutDataLabels.show});if(p){const x=this.dataLabelsGroup.node;x.style.transition="opacity 280ms ease-out",setTimeout(()=>{x.style.opacity="1"},this.animDur)}n.add(g)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(n),n}drawArcs(t,e){var s,i,a,n,r;const o=this.w,l=new Ct(this.w),c=new G(this.w),h=new kt(this.w),d=c.group({class:"apexcharts-slices"});this.elHoverOutline=c.group({class:"apexcharts-pie-hover-outline"}),this.elHoverOutline.node.style.pointerEvents="none",this.elHoverOutline.node.style.opacity="0",o.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition=Su),d.add(this.elHoverOutline);let u=this.initialAngle,p=this.initialAngle,g=this.initialAngle,x=this.initialAngle;this.strokeWidth=o.config.stroke.show?o.config.stroke.width:0;const b=((s=this.ctx.morphTypeChange)==null?void 0:s.isActive())===!0;for(let m=0;m<t.length;m++){const A=c.group({class:"apexcharts-series apexcharts-pie-series",seriesName:z.escapeString(o.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});d.add(A),u=g,p=x,g=u+t[m],x=p+this.prevSectorAngleArr[m];const v=g<u?this.fullAngle+g-u:g-u,y=h.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:e[m]}),w=b?this.ctx.morphTypeChange.getInitialPathFor(m,0):null,S=this.chartType==="polarArea"&&o.globals.dataChanged&&!b?this.prevSliceSizes[m]||0:void 0,_=w||this.getChangedPath(p,x,S),k=c.drawPath({d:_,stroke:Array.isArray(this.lineColorArr)?(i=this.lineColorArr[m])!=null?i:this.lineColorArr[m%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:y,fillOpacity:o.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${m}`});if(k.attr({index:0,j:m}),l.setSelectionFilter(k,0,m),o.config.chart.dropShadow.enabled){const E=o.config.chart.dropShadow;l.dropShadow(k,E,m)}this.addListeners(k,this.donutDataLabels,m);let M={x:0,y:0};const C=(u+v/2)%this.fullAngle;let L={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(M=z.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/1.25+o.config.plotOptions.pie.dataLabels.offset,C),L=z.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/2,C)):this.chartType==="donut"&&(M=z.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2+o.config.plotOptions.pie.dataLabels.offset,C),L=z.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2,C)),G.setAttrs(k.node,{"data:angle":v,"data:startAngle":u,"data:strokeWidth":this.strokeWidth,"data:value":e[m],"data:cx":L.x,"data:cy":L.y}),A.add(k);let T=!1;if(b){const E=this.getPiePath({me:this,startAngle:u,angle:v,size:this.sliceSizes[m]});k.node.setAttribute("data:pathFinal",E),T=((n=(a=this.ctx.morphTypeChange).claimsTargetMark)==null?void 0:n.call(a,m,0))===!0,T&&(k.attr({d:E}),k.node.setAttribute("data:pathOrig",E),k.node.setAttribute("opacity","0"),k.node.setAttribute("data-piece-hidden","1"))}let D=0;if(this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged?(D=v/this.fullAngle*o.config.chart.animations.speed,D===0&&(D=1),this.animDur=D+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),!T)if(b&&w){const E=this.getPiePath({me:this,startAngle:u,angle:v,size:this.sliceSizes[m]}),R=this.ctx.morphTypeChange.getSpeed(),P=this.ctx.animations;k.node.setAttribute("data:pathOrig",E);const F=k.animate(R).plot(E,"polygons").attr({"stroke-width":this.strokeWidth});F&&typeof F.after=="function"?F.after(()=>P.animationCompleted(k)):P.animationCompleted(k)}else this.dynamicAnim&&o.globals.dataChanged?this.animatePaths(k,{size:this.sliceSizes[m],prevSize:S,endAngle:g,startAngle:u,prevStartAngle:p,prevEndAngle:x,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:o.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(k,{size:this.sliceSizes[m],endAngle:g,startAngle:u,i:m,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:D});if(this.getExpandOffset()>0?k.node.addEventListener("mouseup",this.pieClicked.bind(this,m)):m===0&&Ct.drilldownBlocksSliceOffset(o)&&((r=this.ctx.drilldown)==null||r.warnSliceOffsetDisabled()),typeof o.interact.selectedDataPoints[0]!="undefined"&&o.interact.selectedDataPoints[0].indexOf(m)>-1)if(this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged&&this.animDur>0){const E=this,R=m;setTimeout(()=>E.pieClicked(R,{animate:!1}),this.animDur)}else this.pieClicked(m,{animate:!1});if(o.config.dataLabels.enabled){const E=M.x,R=M.y;let P=100*v/this.fullAngle+"%";if(v!==0&&o.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[m]){const F=o.config.dataLabels.formatter;F!==void 0&&(P=F(o.globals.seriesPercent[m][0],{seriesIndex:m,w:o}));const I=o.globals.dataLabels.style.colors[m],B=c.group({class:"apexcharts-datalabels"}),Y=c.drawText({x:E,y:R,text:P,textAnchor:"middle",fontSize:o.config.dataLabels.style.fontSize,fontFamily:o.c
1954onfig.dataLabels.style.fontFamily,fontWeight:o.config.dataLabels.style.fontWeight,foreColor:I});if(B.add(Y),o.config.dataLabels.dropShadow.enabled){const $=o.config.dataLabels.dropShadow;l.dropShadow(Y,$)}Y.node.classList.add("apexcharts-pie-label"),o.config.chart.animations.animate&&o.globals.resized===!1&&(Y.node.classList.add("apexcharts-pie-label-delay"),Y.node.style.animationDelay=o.config.chart.animations.speed/940+"s"),this.sliceLabels.push(B),this.sliceLabelGroups[m]=B.node}}if(this.showExternalLabels&&v!==0){const E=this.getExternalLabelLines(m);if(E.some(R=>R!=="")){const R=z.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize,C),P=z.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize+(this.externalCfg.connector.gap||0),C),F=P.x>=this.centerX,I=F?P.x+(this.externalCfg.connector.length||0):P.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:m,lines:E,anchor:R,elbow:P,side:F?"right":"left",labelX:I+parseFloat(this.externalCfg.offsetX||0),idealY:P.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||o.globals.colors[m],foreColor:this.externalCfg.color||o.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const m=lt.isBrowser()&&(b||this.dynamicAnim&&o.globals.dataChanged||this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged);
1954this.externalLabels.forEach(A=>{const v=new Je(o).drawExternalLabel({lines:A.lines,lineHeight:this.externalLabelLineH,anchor:A.anchor,elbow:A.elbow,labelX:A.labelX,labelY:A.labelY,side:A.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:A.connectorColor},style:this.externalLabelStyle,foreColor:A.foreColor});m&&(v.node.classList.add("apexcharts-element-hidden"),o.globals.delayedElements.push({el:v.node})),this.externalLabelGroups[A.i]=v.node,d.add(v)})}return d}placeExternalLabels(){const t=this.w,e=this.externalLabelMaxLines*this.externalLabelLineH+2,s=this.centerY+t.globals.radialSize+t.globals.pieExternalLabelMarginY;["left","right"].forEach(i=>{eo(this.externalLabels.filter(a=>a.side===i),e,s)})}addListeners(t,e,s){const i=new G(this.w,this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(i,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(i,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),typeof s=="number"&&(t.node.addEventListener("mouseenter",this.showHoverOutline.bind(this,s)),t.node.addEventListener("mouseleave",this.hideHoverOutline.bind(this))),t.node.addEventListener("mousedown",i.pathMouseDown.bind(i,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 ge(this.w),c=n.size;let h;(isNaN(e)||isNaN(a))&&(e=s,a=i,n.dur=0);let d=i,u=s;const p=e<s?this.fullAngle+e-s:e-s,g=typeof n.prevSize=="number";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:g?n.prevSize: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(x=>{d=p+(i-p)*x,n.animateStartingPos&&(d=a+(i-a)*x,u=e-a+(s-(e-a))*x),h=r.getPiePath({me:r,startAngle:u,angle:d,size:g?n.prevSize+(c-n.prevSize)*x:c}),t.node.setAttribute("data:pathOrig",h),t.attr({d:h})}):(h=r.getPiePath({me:r,startAngle:u,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,e){const s=this.w,i=this,a=!(e&&e.animate===!1),n=s.dom.Paper.findOne(`.apexcharts-${i.chartType.toLowerCase()}-slice-${t}`);if(!n)return;if(n.attr("data:pieClicked")==="true"){n.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(),this.offsetSlice(t,0,a);return}const r=s.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(r,o=>{const l=o.getAttribute("data:pieClicked")==="true";o.setAttribute("data:pieClicked","false"),l&&this.offsetSlice(parseInt(o.getAttribute("j"),10),0,a)}),s.interact.capturedDataPointIndex=t,n.attr("data:pieClicked","true"),this.offsetSlice(t,this.getExpandOffset(),a)}getExpandOffset(){const t=this.w.config.plotOptions.pie;if(!t.expandOnClick||this.chartType==="polarArea"||Ct.drilldownBlocksSliceOffset(this.w))return 0;const e=Number(t.expandOffset);return Number.isFinite(e)&&e>0?e:0}getSliceMovers(t){const e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return[e?e.node:null,this.sliceLabelGroups[t],this.externalLabelGroups[t],this.hoverOutlineIndex===t&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(
1954Boolean)}offsetSlice(t,e,s=!0){const i=this.w;if(!i.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`))return;const{dx:n,dy:r}=this.getSliceOffsetVector(t,e),o=`translate(${n} ${r})`,l=s&&i.config.chart.animations.enabled?Au:"";this.getSliceMovers(t).forEach(c=>{c.style.transition=l,c.setAttribute("transform",o)})}getSliceOffsetVector(t,e){const s=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`),i=s?parseFloat(s.attr("data:angle")):NaN;if(!e||!Number.isFinite(i)||i>=this.fullAngle)return{dx:0,dy:0};const a=parseFloat(s.attr("data:startAngle")),n=Math.PI*(a+i/2-90)/180;return{dx:e*Math.cos(n),dy:e*Math.sin(n)}}showHoverOutline(t){const e=this.w;if(!Ct.hoverOutlineOwnsHoverState(e)||!this.elHoverOutline)return;const s=this.getHoverOutlinePath(t);if(!s)return;const i=e.config.plotOptions.pie.hoverOutline,a=i.color||e.globals.colors[t];if(!this.elHoverOutlinePath){const o=new G(e);this.elHoverOutlinePath=o.drawPath({d:s,fill:a,strokeWidth:0,classes:"apexcharts-pie-hover-outline-band"}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:s,fill:a,"fill-opacity":i.opacity});const{dx:n,dy:r}=this.getSliceOffsetVector(t,this.isSliceOut(t)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition="",this.elHoverOutlinePath.node.setAttribute("transform",`translate(${n} ${r})`),this.hoverOutlineIndex=t,this.elHoverOutline.node.style.opacity="1"}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity="0")}isSliceOut(t){const e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return!!e&&e.attr("data:pieClicked")==="true"}getHoverOutlinePath(t){const e=this.w,s=e.config.plotOptions.pie.hoverOutline,i=e.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);if(!i)return null;const a=parseFloat(i.attr("data:angle"));if(!Number.isFinite(a)||a<=0)return null;const n=this.sliceSizes[t],r=Number(s.size);if(!Number.isFinite(n)||!Number.isFinite(r)||r<=0)return null;const{startDeg:o,spanDeg:l}=this.getSliceExtent({me:this,startAngle:parseFloat(i.attr("data:startAngle")),angle:a,size:n});if(!(l>0))return null;const c=n+(this.strokeWidth||0)/2+(Number(s.gap)||0),h=c+r,d={cx:this.centerX,cy:this.centerY,rIn:c,rOut:h,a0:o,a1:o+l,spanDeg:l},u=Math.min(r/2,l*Math.PI/180/2*c);return u>.5?xi(it(Z({},d),{r:u})):so(d)}getChangedPath(t,e,s){let i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:typeof s=="number"?s:this.size})),i}getSliceExtent({me:t,startAngle:e,angle:s,size:i}){const a=this.w;let n=e,r=s+e;Math.ceil(r)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(r=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let o=r-n;const l=t.chartType==="pie"||t.chartType==="donut"||t.chartType==="polarArea",c=a.config.plotOptions.pie.spacing;if(l&&c>0&&o>0){const h=t.chartType==="donut"?(i+t.donutSize)/2:i,d=h>0?c/h*(180/Math.PI):0,u=Math.min(d/2,Math.max(0,o/2-.5));n+=u,o-=2*u}return r=n+o,Math.ceil(r)>this.fullAngle&&(r-=this.fullAngle),{startDeg:n,spanDeg:o,endDeg:r}}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a;const n=this.w,r=new G(this.w),{startDeg:o,spanDeg:l,endDeg:c}=this.getSliceExtent({me:t,startAngle:e,angle:s,size:i}),h=t.chartType==="pie"||t.chartType==="donut"||t.chartType==="polarArea",d=Math.PI*(o-90)/180,u=n.config.plotOptions.pie.borderRadius;if(u>0&&h){const S=this.getRoundedSlicePath({me:t,startDeg:o,spanDeg:l,size:i,borderRadius:u});if(S)return S}const p=Math.PI*(c-90)/180,g=t.centerX+i*Math.cos(d),x=t.centerY+i*Math.sin(d),b=t.centerX+i*Math.cos(p),m=t.centerY+i*Math.sin(p),A=z.polarToCartesian(t.centerX,t.centerY,t.donutSize,c),v=z.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),y=l>180?1:0,w=["M",g,x,"A",i,i,0,y,1,b,m];return t.chartType==="donut"?a=[...w,"L",A.x,A.y,"A",t.donutSize,t.donutSize,0,y,0,v.x,v.y,"L",g,x,"z"].join(" "):t.chartType==="pie"||t.chartType==="polarArea"?a=[...w,"L",t.centerX,t.centerY,"L",g,x].join(" "):a=[...w].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 u=a;if(u=Math.min(u,d*c/2),l?(u=Math.min(u,d*h/2),u=Math.min(u,(c-h)/2)):u
1954=Math.min(u,c/2),!(u>.5))return null;const p=e,g=e+s;return l?xi({cx:r,cy:o,rIn:h,rOut:c,a0:p,a1:g,r:u,spanDeg:s}):vu({cx:r,cy:o,rOut:c,a0:p,a1:g,r:u,spanDeg:s})}drawPolarElements(t){const e=this.w,s=new Tr(this.w),i=new G(this.w),a=new Je(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 u=0;u<c-1;u++){const p=i.drawCircle(h);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const g=a.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);r.add(g)}n.add(p),h=h-d}this.drawSpokes(t),t.add(n),t.add(r)}renderInnerDataLabels(t,e,s){const i=this.w,a=new G(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,u=e.name.fontWeight;e.value.color===void 0?c=i.config.chart.foreColor:c=e.value.color;const p=e.value.formatter;let g="",x="";if(n?(l=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,u=e.total.fontWeight,x=this.donutDataLabels.total.label?e.total.label:"",g=e.total.formatter(i)):i.seriesData.series.length===1&&(g=p(i.seriesData.series[0],i),x=i.seriesData.seriesNames[0]),x&&(x=e.name.formatter(x,e.total.show,i)),e.name.show){const b=a.drawText({x:r,y:o+parseFloat(e.name.offsetY),text:x,textAnchor:"middle",foreColor:l,fontSize:h,fontWeight:u,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 G(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(z.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)}}}const _u=5;class Cu{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 G(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 Dt(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 kt(this.w),i=[],a=new xe(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,u=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((p,g)=>{const x=p.length===e.globals.dataPoints,b=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":x,seriesName:z.escapeString(e.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});this.dataRadiusOfPercent[g]=[],this.dataRadius[g]=[],this.angleArr[g]=[],p.forEach((y,w)=>{const S=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/S,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"}),u=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(it(Z({},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=s.fillPath({seriesNumber:g}),_=this.graphics.renderPaths(it(Z({},A),{pathFrom:v===null?m.areaPathsFrom[y]:v,pathTo:m.areaPathsTo[y],strokeWidth:0,fill:S,drawShadow:!1,drawMask:{type:"radial",cx:0,cy:0,r:this.size}}));if(e.config.chart.dropShadow.enabled){const k=new Ct(this.w),M=e.config.chart.dropShadow;k.dropShadow(_,Object.assign({},M,{noUserSpaceOnUse:!0}),g)}b.add(_)}
vendor: 5,105 bytes, line 1954
1954p.forEach((y,w)=>{const _=new ms(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:g,dataPointIndex:w});_.pSize||(_.pSize=_u,_.pointFillColor="transparent",_.pointStrokeColor="transparent",_.pointStrokeWidth=0);const k=this.graphics.drawMarker(h[w].x,h[w].y,_);k.attr("rel",w),k.attr("j",w),k.attr("index",g),k.node.setAttribute("default-marker-size",_.pSize);const M=this.graphics.group({class:"apexcharts-series-markers"});M&&M.add(k),d.add(M),b.add(d);const C=e.config.dataLabels;if(C.enabled){const L=C.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,seriesIndex:g,dataPointIndex:w,parent:u,offsetCorrection:!1,dataLabelsConfig:Z({},C)})}b.add(u)}),i.push(b)}),this.drawPolygons({parent:c}),e.config.xaxis.labels.show){const p=this.drawXAxisTexts();c.add(p)}return i.forEach(p=>{c.add(p)}),c.add(this.yaxisLabels),c}drawPolygons(t){const e=this.w,{parent:s}=t,i=new Je(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 u=z.getPolygonPos(h,this.dataPointsLen);let p="";u.forEach((g,x)=>{if(d===0){const b=this.graphics.drawLine(g.x,g.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[x]:this.polygons.connectorColors);c.push(b)}x===0&&this.yaxisLabelsTextsPos.push({x:g.x,y:g.y}),p+=g.x+","+g.y+" "}),l.push(p)}),l.forEach((h,d)=>{const u=this.polygons.strokeColors,p=this.polygons.strokeWidth,g=this.graphics.drawPolygon(h,Array.isArray(u)?u[d]:u,Array.isArray(p)?p[d]:p,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 u=i.drawYAxisTexts(h.x,h.y,d,a[d]);this.yaxisLabels.add(u)})}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=z.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,n)=>{const r=t.config.xaxis.labels.formatter,o=new xe(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:Z({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",d=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){const u=Object.assign({},t,{labelIndex:n});t.config.chart.events.xAxisLabelClick(d,this.ctx,u)}})}}),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]!="undefined"&&(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 ku extends Qe{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 G(this.w),a=i.group({class:"apexcharts-radialbar"});if(s.globals.noData)return a;const n=i.group(),r=s.layout.gridHeight/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>
19540,u=d&&h.bandsStyle&&h.bandsStyle.hideTrackWhenPresent,p=h.shape==="needle";if(h.track.show&&!u){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:p&&!((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&<.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(p){const m=this.drawNeedle({size:l,centerX:o,centerY:r,series:t});n.add(m)}let x=360;s.config.plotOptions.radialBar.startAngle<0&&(x=this.totalAngle);const b=(360-x)/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 G(this.w),i=s.group({class:"apexcharts-tracks"}),a=new Ct(this.w),n=new kt(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 u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);const p=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(p,g)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:u,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 G(this.w),a=new kt(this.w),n=new Ct(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 u=1;!this.radialDataLabels.total.show&&s.seriesData.series.length>1&&(u=0);let p=null;if(this.radialDataLabels.show){const b=s.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:t.centerX,centerY:t.centerY,opacity:u})}s.config.plotOptions.radialBar.hollow.position==="back"&&(r.add(d),p&&r.add(p));let g=!1;s.config.plotOptions.radialBar.inverseOrder&&(g=!0);const x=((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:z.escapeString(s.seriesData.seriesNames[b])});r.add(m),m.attr({rel:b+1,"data:realIndex":b}),gt.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,S=typeof w.min=="number"?w.min:0,_=typeof w.max=="number"?w.max:100,k=_===S?1:_-S,M=N=>{const H=Math.min(Math.max(N,S),_);return Math.max(0,(H-S)/k)},C=M(z.negToZero(t.series[b]));let L=Math.round(this.totalAngle*C)+this.startAngle,T;s.globals.dataChanged&&(y=this.startAngle,T=Math.round(this.totalAngle*M(z.negToZero(s.globals.previousPaths[b])))+y),Math.abs(L)+Math.abs(v)>360&&(L=L-.01),Math.abs(T)+Math.abs(y)>360&&(T=T-.01);const R=L-v,P=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[b]:s.config.stroke.dashArray,F=x?this.ctx.morphTypeChange.getInitialPathFor(b,0):null,I=x?this.ctx.morphTypeChange.getFromType():null,B=!!F&&(I==="bar"||I==="funnel"||I==="pyramid"||I==="pie"||I==="donut"||I==="polarArea"),Y=i.drawPath({d:F||"",stroke:B||t.skipValueArc?"transparent":A,strokeWidth:B||t.skipValueArc?0:o,fill:B?A:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+b,strokeDashArray:P}),$=v+R/2,X=z.polarToCartesian(t.centerX,t.centerY,t.size,$);if(G.setAttrs(Y.node,{"data:angle":R,"data:value":t.series[b],"data:cx":X.x,"data:cy":X.y}),s.config.chart.dropShadow.enabled){const N=s.config.chart.dropShadow;n.dropShadow(Y,N,b)}if(n.setSelectionFilter(Y,0,b),this.addListeners(Y,this.radialDataLabels),m.add(Y),Y.attr({index:0,j:b}),this.barLabels.enabled){const N=z.polarToCartesian(t.centerX,t.centerY,t.size,v),H=this.barLabels.formatter(s.seriesData.seriesNames[b],{seriesIndex:b,w:s}),q=["apexcharts-radialbar-label"];this.barLabels.onClick||q.push("apexcharts-no-click");let V=this.barLabels.useSeriesColors?s.globals.colors[b]:s.config.chart.foreColor;V||(V=s.config.chart.foreColor);const J=N.x+this.barLabels.offsetX,et=N.y+this.barLabels.offsetY,at=i.drawText({x:J,y:et,text:H,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:V,cssClass:q.join(" ")});at.on("click",this.onBarLabelClick),at.attr({rel:b+1}),v!==0&&at.attr({"transform-origin":`${J} ${et}`,transform:`rotate(${v} 0 0)`}),m.add(at)}let W=0;if(this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged&&(W=s.config.chart.animations.speed),s.globals.dataChanged&&(W=s.config.chart.animations.dynamicAnimation.speed),this.animDur=W/(t.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),x&&F){const N=this.ctx.morphTypeChange.getSpeed(),H=this.getPiePath({me:this,startAngle:v,angle:R,size:t.size});
1954if(B){const q=this.ctx.morphTypeChange.buildRingSegmentPath(t.centerX,t.centerY,t.size,o,v,v+R);Y.animate(N).plot(q,"polygons").after(function(){this.attr({d:H,fill:"none",stroke:t.skipValueArc?"transparent":A,"stroke-width":t.skipValueArc?0:o})})}else Y.animate(N).plot(H,"polygons").attr({"stroke-width":o})}else this.animatePaths(Y,{centerX:t.centerX,centerY:t.centerY,endAngle:L,startAngle:v,prevEndAngle:T,prevStartAngle:y,size:t.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:W,shouldSetPrevPaths:!0})}return{g:r,elHollow:d,dataLabels:p}}_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=z.polarToCartesian(t,e,s,a),r=z.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 G(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 u=0;u<a.length;u++){const p=a[u];if(p.from===void 0||p.to===void 0)continue;const g=this._angleAtValue(p.from),x=this._angleAtValue(p.to),b=Math.min(g,x)+d/2,m=Math.max(g,x)-d/2;if(m-b<=0)continue;const A=s.drawPath({d:this._describeArc(t.centerX,t.centerY,o,b,m),stroke:p.color||"#ccc",strokeWidth:l,fill:"none",strokeLinecap:i.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});A.node.setAttribute("data-band-index",String(u)),n.add(A)}return n}drawTicks(t){var e,s,i,a;const n=this.w,r=new G(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,u=typeof o.min=="number"?o.min:0,p=typeof o.max=="number"?o.max:100,g=Math.max(2,(s=(e=l.major)==null?void 0:e.count)!=null?s:11),x=Math.max(0,(a=(i=l.minor)==null?void 0:i.count)!=null?a:0),b=(m,A,v)=>{var y,w,S;const _=this._angleAtValue(m),k=(y=A.length)!=null?y:8,M=A.placement==="inside"?d-k:d,C=A.placement==="inside"?d:d+k,L=z.polarToCartesian(t.centerX,t.centerY,M,_),T=z.polarToCartesian(t.centerX,t.centerY,C,_),D=r.drawLine(L.x,L.y,T.x,T.y,A.color||(v?"#666":"#999"),0,A.width||(v?2:1));if(c.add(D),v&&((w=l.labels)!=null&&w.show)){const E=(A.placement==="inside"?M:C)+(A.placement==="inside"?-1:1)*((S=l.labels.offset)!=null?S:6),R=z.polarToCartesian(t.centerX,t.centerY,E,_),P=typeof l.labels.formatter=="function"?l.labels.formatter(m):String(m),F=r.drawText({x:R.x,y:R.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(F)}};for(let m=0;m<g;m++){const A=m/(g-1),v=u+A*(p-u);if(b(v,l.major||{},!0),m<g-1&&x>0)for(let y=1;y<=x;y++){const w=(m+y/(x+1))/(g-1),S=u+w*(p-u);b(S,l.minor||{},!1)}}return c}drawNeedle(t){var e,s,i,a,n;const r=this.w,o=new G(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),u=t.size-d/2-d-this.margin,p=typeof c.length=="string"&&c.length.endsWith("%")?u*parseInt(c.length,10)/100:Number(c.length||u*.85),g=(e=c.baseWidth)!=null?e:4,x=(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-x/2} ${v-p} L ${m+x/2} ${v-p} Z`,w=o.drawPath({d:y,stroke:b,strokeWidth:0,fill:b,classes:"apexcharts-gauge-needle-shape"});h.add(w);const S=Number(t.series[0]),_=this._angleAtValue(S),k=this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized,M=this.ctx,C=typeof M._lastNeedleAngle=="number"?M._lastNeedleAngle:this.startAngle;if(M._lastNeedleAngle=_,lt.isBrowser()&&r.globals.shouldAnimate&&(k||r.globals.dataChanged)&&C!==_){const T=h.node;T.setAttribute("transform-origin",`${m} ${v}`),T.setAttribute("transform",`rotate(${C})`);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,E=1.70158,R=E+1,I=k?$=>1+R*Math.pow($-1,3)+E*Math.pow($-1,2):$=>1-Math.pow(1-$,3);r.globals.radialNeedleRAF!=null&&(U.cancelAnimationFrame(r.globals.radialNeedleRAF),r.globals.radialNeedleRAF=null);const B=performance.now(),Y=$=>{if(this.w.globals.isDestroyed){r.globals.radialNeedleRAF=null;return}const X=Math.max(0,Math.min(1,($-B)/D)),W=C+(_-C)*I(X);T.setAttribute("transform",`rotate(${W})`),X<1?r.globals.radialNeedleRAF=U.requestAnimationFrame(Y):r.globals.radialNeedleRAF=null};r.globals.radialNeedleRAF=U.requestAnimationFrame(Y)}else h.attr({"transform-origin":`${m} ${v}`,transform:`rotate(${_})`});return h}drawHollow(t){var e;const s=new G(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 kt(this.w),r=z.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;
1954const 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 Mu extends ft{draw(t,e){var s,i,a,n,r,o,l,c,h;const d=this.w,u=new G(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 p=u.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let g=0;g<t.length;g++){let x,b;const m=d.globals.comboCharts?e[g]:g,{columnGroupIndex:A}=this.barHelpers.getGroupIndex(m),v=u.group({class:"apexcharts-series",seriesName:z.escapeString(d.seriesData.seriesNames[m]),rel:g+1,"data:realIndex":m});gt.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:S,zeroW:_,x:k,zeroH:M}=w;let C=(s=w.barWidth)!=null?s:0,L=(i=w.barHeight)!=null?i:0;const T=(a=w.yDivision)!=null?a:0,D=(n=w.xDivision)!=null?n:0;b=S,x=k;const E=u.group({class:"apexcharts-datalabels","data:realIndex":m}),R=u.group({class:"apexcharts-rangebar-goals-markers"});for(let P=0;P<d.globals.dataPoints;P++){const F=this.barHelpers.getStrokeWidth(g,P,m),I=this.seriesRangeStart[g][P],B=this.seriesRangeEnd[g][P];let Y=null,$=null,X=null;const W={x,y:b,strokeWidth:F,elSeries:v};let N=this.seriesLen;if(d.config.plotOptions.bar.rangeBarGroupRows&&(N=1),typeof((r=d.config.series[g].data)==null?void 0:r[P])=="undefined")break;if(this.isHorizontal){X=b+L*this.visibleI;const V=(T-L*N)/2;if((l=(o=d.config.series[g].data)==null?void 0:o[P])!=null&&l.x){const J=this.detectOverlappingBars({i:g,j:P,barYPosition:X,srty:V,barHeight:L,yDivision:T,initPositions:w});L=J.barHeight,X=J.barYPosition}Y=this.drawRangeBarPaths(Z({indexes:{i:g,j:P,realIndex:m},barHeight:L,barYPosition:X,zeroW:_,yDivision:T,y1:I,y2:B},W)),C=Y.barWidth}else{d.axisFlags.isXNumeric&&(x=(d.seriesData.seriesX[g][P]-d.globals.minX)/this.xRatio-C/2),$=x+C*this.visibleI;const V=(D-C*N)/2;if((h=(c=d.config.series[g].data)==null?void 0:c[P])!=null&&h.x){const J=this.detectOverlappingBars({i:g,j:P,barXPosition:$,srtx:V,barWidth:C,xDivision:D,initPositions:w});C=J.barWidth,$=J.barXPosition}Y=this.drawRangeColumnPaths(Z({indexes:{i:g,j:P,realIndex:m,translationsIndex:y},barWidth:C,barXPosition:$,zeroH:M,xDivision:D},W)),L=Y.barHeight}const H=this.barHelpers.drawGoalLine({barXPosition:Y.barXPosition,barYPosition:X,goalX:Y.goalX,goalY:Y.goalY,barHeight:L,barWidth:C});H&&R.add(H),b=Y.y,x=Y.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,y:b,y1:I,y2:B,pathFrom:Y.pathFrom,pathTo:Y.pathTo,strokeWidth:F,elSeries:v,series:t,barHeight:L,barWidth:C,barXPosition:$,barYPosition:X,columnGroupIndex:A,elDataLabelsWrap:E,elGoalsMarkers:R,visibleSeries:this.visibleI,type:"rangebar"})}p.add(v)}return p}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,u,p,g;const x=this.w;let b=[];const m=(u=(d=x.globals.seriesRangeName)==null?void 0:d[t])==null?void 0:u[e],A=(g=(p=x.config.series[t].data)==null?void 0:p[e])==null?void 0:g.x,v=Array.isArray(A)?A.join(" "):A,y=x.labelData.labels.map(S=>Array.isArray(S)?S.join(" "):S).indexOf(v),w=x.rangeData.seriesRange[t].findIndex(S=>{var _;return S.x===v&&((_=S.overlaps)==null?void 0:_.size)>0});return this.isHorizontal?(x.config.plotOptions.bar.rangeBarGroupRows?s=a+l*y:s=a+r*this.visibleI+l*y,w>-1&&!x.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(x.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&&!x.labelData.timescaleLabels.length&&(x.config.plotOptions.bar.rangeBarGroupRows?i=n+c*y:i=n+o*this.visibleI+c*y),w>-1&&!x.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(x.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:u}=t,p=this.yRatio[u],g=this.getRangeValue(d,h);let x=Math.min(g.start,g.end),b=Math.max(g.start,g.end);const m=!(typeof((r=this.series[c])==null?void 0:r[h])=="undefined"||((o=this.series[c])==null?void 0:o[h])===null);m?(x=n-x/p,b=n-b/p):x=n;const A=Math.abs(b-x),v=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:x,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:h,w:l});if(m){const y=v.drawnBox,w=g.end>=g.start;this.recordColumnGeometry(d,h,{slotStart:y.x1,slotEnd:y.x2,levelStart:w?y.y1:y.y2,levelEnd:w?y.y2:y.y1,horizontal:!1})}if(!l.axisFlags.isXNumeric)e=e+s;else{const y=this.getBarXForNumericXAxis({x:e,j:h,realIndex:d,barWidth:i});e=y.x,a=y.barXPosition}return{pathTo:v.pathTo,pathFrom:v.pathFrom,barHeight:A,x:e,y:g.start<0&&g.end<0?x:b,goalY:this.barHelpers.getGoalValues("y",null,n,d,h,u),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),u=this.preventBarOverflow(o+i/this.invertedYRatio),p=this.getRangeValue(c,h),g=Math.abs(u-d),x=this.barHelpers.getBarpaths({barYPosition:r,barHeight:n,x1:d,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:h,w:l});if(p.start!=null&&p.end!=null){const b=x.drawnBox;this.recordColumnGeometry(c,h,{slotStart:b.y1,slotEnd:b.y2,levelStart:b.x1,levelEnd:b.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e=e+a),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:g,x:p.start<0&&p.end<0?d:u,goalX:this.barHelpers.getGoalValues("x",o,null,c,h,0),y:e}}recordColumnGeometry(t,e,s){const i=this.w.waterfallData&&this.w.waterfallData.geometry;i&&(!isFinite(s.slotStart)||!isFinite(s.levelEnd)||(i[t]||(i[t]=[]),i[t][e]=s))}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}function mi(f,t){let e=0;for(let a=0;a<f.length;a++)e+=f[a];const s=t/e,i=new Array(f.length);for(let a=0;a<f.length;a++)i[a]=f[a]*s;return i}function qa(f,t,e,s){const i=s*s,a=e*e;return Math.max(i*t/a,a/(i*f))}function Lu(f,t,e,s,i,a){if(f===0)return!0;const n=qa(t,e,s,a),r=qa(Math.min(t,i),Math.max(e,i),s+i,a);return n>=r}function ja(f,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;f.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;f.push([l,a,l+h,a+o]),l+=h}}}function bi(f,t,e,s,i){const a=[],n=f.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 u=Math.min(s,i),p=f[d];if(Lu(o,c,h,l,p,u))r[o]=p,o++,l+=p,p<c&&(c=p),p>h&&(h=p),d++;else{if(ja(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&&ja(a,r,o,l,t,e,s,i),a}function Du(f,t,e){const s=f.length,i=new Array(s);for(let r=0;r<s;r++){let o=0;const l=f[r];for(let c=0;c<l.length;c++)o+=l[c];i[r]=o}const a=bi(mi(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;
1954n[r]=bi(mi(f[r],h*d),l,c,h,d)}return n}function io(f){const t=f.children;if(t&&t.length){let i=0;for(let a=0;a<t.length;a++)i+=io(t[a]);return f._area=i,i}const e=Number(f.value),s=isNaN(e)?0:Math.abs(e);return f._area=s,s}function ao(f,t,e,s,i,a,n,r){const o=f.length;if(o===0||s<=0||i<=0)return;const l=new Array(o);let c=0;for(let d=0;d<o;d++)l[d]=f[d]._area,c+=l[d];if(c<=0)return;const h=bi(mi(l,s*i),t,e,s,i);for(let d=0;d<o;d++){const u=f[d],p=h[d];if(!p)continue;u.rect=p,u.depth=a;const g=u.children;if(!g||!g.length)continue;const x=p[2]-p[0],b=p[3]-p[1];let m=Math.max(0,n(u,a,x,b)||0);(m*2>=x||m*2>=b)&&(m=0);let A=Math.max(0,r(u,a,x,b)||0);A>0&&b-m*2-A<A&&(A=0),u.headerHeight=A,ao(g,p[0]+m,p[1]+A+m,x-m*2,b-A-m*2,a+1,n,r)}}function Tu(f,t,e,s={}){if(!Array.isArray(f)||f.length===0)return f||[];const i=s.padding||(()=>0),a=s.header||(()=>0);for(let n=0;n<f.length;n++)io(f[n]);return ao(f,0,0,t,e,0,i,a),f}const Eu={generate:Du,generateNested:Tu};function Pu(f,t){const e=f.config.drilldown;return(e&&Array.isArray(e.series)?e.series:[]).find(i=>i&&i.id===t)}function ds(f,t,e,s,i,a=null,n={}){var r,o,l;const c=t&&typeof t=="object",h=c&&(o=(r=t.x)!=null?r:t.name)!=null?o:"",d=Number(c?(l=t.y)!=null?l:t.value:t),u={name:String(h),value:isNaN(d)?null:d,color:c&&t.color?t.color:void 0,_key:`${i}/${e}:${h}`};if(s&&!u.color&&(u.color=s[e%s.length]),n.keepDatum&&(u._datum=t),c&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((p,g)=>ds(f,p,g,null,u._key,a,n));else if(c&&t.drilldown!=null&&n.expandDrilldown!==!1){const p=a||new Set;if(!p.has(t.drilldown)){const g=Pu(f,t.drilldown);if(g&&Array.isArray(g.data)&&g.data.length){const x=new Set(p);x.add(t.drilldown);const b=Array.isArray(g.colors)?g.colors:null;u.children=g.data.map((m,A)=>ds(f,m,A,b,u._key,x,n))}}}return u}function Ru(f,t={}){const e=f.config.series,s=e&&e[0],i=s&&Array.isArray(s.data)?s.data:e;return Array.isArray(i)?i.map((a,n)=>ds(f,a,n,null,"",null,t)):[]}function Fu(f,t,e={}){const s=t||f.config.series;return Array.isArray(s)?s.map((i,a)=>{var n,r;const o=i&&Array.isArray(i.data)?i.data:[],l=`${a}:${(n=i==null?void 0:i.name)!=null?n:""}`;return{name:String((r=i==null?void 0:i.name)!=null?r:""),value:null,color:(i==null?void 0:i.color)||void 0,_key:l,_seriesIndex:a,children:o.map((h,d)=>ds(f,h,d,null,l,null,e))}}):[]}function Yi(f){f.children&&f.children.length&&(f.children.forEach(t=>Yi(t)),(f.value==null||isNaN(f.value))&&(f.value=f.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(f.value==null||isNaN(f.value))&&(f.value=0)}function Ee(f){if(typeof f!="string")return"";const t=f.indexOf("/");return t===-1?"":f.slice(t)}function Ou(f){const t=[];let e=0;return f.forEach((s,i)=>{const a=[],n=(r,o,l)=>{r._parent=l,r._depth=o,r._si=i,r._leaf=!(r.children&&r.children.length),o>e&&(e=o),r._leaf?(r._di=a.length,a.push(r)):(r._di=-1,r.children.forEach(c=>n(c,o+1,r)))};n(s,0,null),t.push(a)}),{leaves:t,maxDepth:e}}function Xu(f){const t=f.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:f.globals.treemapMaxDepth||1,nested:!0};const e=Fu(f,f.config.series,{keepDatum:!0,expandDrilldown:!1});e.forEach(Yi);const{maxDepth:s}=Ou(e);return{roots:e,maxDepth:s,nested:!1}}const Iu=f=>(f[2]-f[0])*(f[3]-f[1]);class Nu{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Qr(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(t){var e;const s=this.w,i=new G(this.w,this.ctx),a=new kt(this.w),n=i.group({class:"apexcharts-treemap"});if(s.globals.noData)return n;t.forEach(x=>{x.map(b=>Math.abs(b))}),this.negRange=this.helpers.checkColorRange(),s.config.series.forEach((x,b)=>{x.data.forEach(m=>{Array.isArray(this.labels[b])||(this.labels[b]=[]),this.labels[b].push(m.x)})});const r=Xu(s);this.nested=r.nested,this.roots=r.roots,this.scale=Xr(s);const o=r.roots.length===1?r.roots[0].children||[]:r.roots;this.drawn=o;const l=s.config.plotOptions.treemap.parents;this.showParents=l.show===!0||l.show!==!1&&this.nested;const c=this._resolveFocus(o),h=c?[c]:o;Eu.generateNested(h,s.layout.gridWidth,s.layout.gridHeight,{padding:(x,b,m,A)=>this.showParents?this._levelPadding(b,m,A):0,header:(x,b,m,A)=>this.showParents?this._levelHeader(x,b,m,A):0});const d=(e=this.ctx)==null?void 0:e.morphTypeChange,u=!!d&&typeof d.isActive=="function"&&d.isActive()&&typeof d.getInitialPathAt=="function";this._morphLeafIndex=0;const p=this._leavesBySeries(h,s.config.series.length),g=this.showParents?this._parentsBySeries(h,s.config.series.length):[];return p.forEach((x,b)=>{var m;const A=i.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:z.escapeString(s.seriesData.seriesNames[b]),rel:b+1,"data:realIndex":b});if(i.setupEventDelegation(A,".apexcharts-treemap-rect"),s.config.chart.dropShadow.enabled){const C=s.config.chart.dropShadow;new Ct(this.w).dropShadow(n,C,b)}const v=i.group({class:"apexcharts-data-labels"}),y={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};
1954this.showParents&&(g[b]||[]).forEach(C=>{this._drawParent(A,C,b)});const w=s.config.chart.animations,S=w.animateGradually,_=S&&S.enabled!==!1,k=new Array(x.length).fill(0);if(_){const C=x.length||1,L=Math.min(S.delay||0,w.speed*.5/C);x.map((D,E)=>({j:E,area:D.rect?Iu(D.rect):0})).sort((D,E)=>E.area-D.area).forEach((D,E)=>{k[D.j]=E*L})}x.forEach((C,L)=>{const T=C.rect;if(!T)return;const D=C._di,E=T[0],R=T[1],P=T[2],F=T[3];y.xMin=Math.min(y.xMin,E),y.yMin=Math.min(y.yMin,R),y.xMax=Math.max(y.xMax,P),y.yMax=Math.max(y.yMax,F);const I=this._leafColor(b,D),B=I.color,Y=a.fillPath({color:B,seriesNumber:b,dataPointIndex:D}),$=u?this._morphSourceForLeaf(C):null,X=$?i.drawPath({d:this._tilePath(E,R,P,F),fill:"#fff",stroke:s.config.plotOptions.treemap.useFillColorAsStroke?B:s.globals.stroke.colors[b],strokeWidth:this.strokeWidth,fillOpacity:1}):i.drawRect(E,R,P-E,F-R,s.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,s.config.plotOptions.treemap.useFillColorAsStroke?B:s.globals.stroke.colors[b]);X.attr({cx:E,cy:R,index:b,i:b,j:D,width:P-E,height:F-R,fill:Y}),X.node.classList.add("apexcharts-treemap-rect"),X.node.setAttribute("data:key",Ee(C._key));let W={x:E+(P-E)/2,y:R+(F-R)/2,width:0,height:0};const N={x:E,y:R,width:P-E,height:F-R};if($)this._morphTile(X,$,this._tilePath(E,R,P,F),this.ctx.morphTypeChange.getSpeed(),b,D);else if(s.config.chart.animations.enabled&&!s.globals.dataChanged){let V=1;s.globals.resized||(V=s.config.chart.animations.speed),this.animateTreemap(X,W,N,V,k[L]||0)}if(s.globals.dataChanged){let V=1;this.dynamicAnim.enabled&&s.globals.shouldAnimate&&(V=this.dynamicAnim.speed,s.globals.previousPaths[b]&&s.globals.previousPaths[b][D]&&s.globals.previousPaths[b][D].rect&&(W=s.globals.previousPaths[b][D].rect),this.animateTreemap(X,W,N,V))}let H=this.getFontSize(T);s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(H=parseInt(String(s.config.dataLabels.style.fontSize),10));let q=null;if(s.config.dataLabels.enabled&&this._labelCanShow(H,P-E,F-R)){let V=s.config.dataLabels.formatter(this.labels[b][D],{value:s.seriesData.series[b][D],seriesIndex:b,dataPointIndex:D,w:s});s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(V=this.truncateLabels(String(V),H,E,R,P,F)),s.seriesData.series[b][D]&&(q=this.helpers.calculateDataLabels({text:V,x:(E+P)/2,y:(R+F)/2+this.strokeWidth/2+H/3,i:b,j:D,colorProps:I,fontSize:H,series:t})),s.config.dataLabels.enabled&&q&&this.rotateToFitLabel(q,H,V,E,R,P,F)}A.add(X),q!==null&&A.add(q)});const M=s.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&s.config.series.length>1&&M&&M.show){const C=s.config.series[b].name||"";if(C&&y.xMin<1/0&&y.yMin<1/0){const{offsetX:L,offsetY:T,borderColor:D,borderWidth:E,borderRadius:R,style:P}=M,F=P.color||s.config.chart.foreColor,I={left:P.padding.left,right:P.padding.right,top:P.padding.top,bottom:P.padding.bottom},B=i.getTextRects(C,P.fontSize,P.fontFamily),Y=B.width+I.left+I.right,$=B.height+I.top+I.bottom,X=y.xMin+(L||0),W=y.yMin+(T||0),N=i.drawRect(X,W,Y,$,R,P.background,1,E,D),H=i.drawText({x:X+I.left,y:W+I.top+((m=B==null?void 0:B.height)!=null?m:0)*.75,text:C,fontSize:P.fontSize,fontFamily:P.fontFamily,fontWeight:P.fontWeight,foreColor:F,cssClass:P.cssClass||""});A.add(N),A.add(H)}}A.add(v),n.add(A)}),this._renderBreadcrumb(),n}_levelCfg(t){if(this._levelCache||(this._levelCache=[]),this._levelCache[t])return this._levelCache[t];const e=this.w.config.plotOptions.treemap,s=e.parents||{},i=(e.levels||[])[t]||{},a=it(Z(Z({},s),i),{header:it(Z(Z({},s.header||{}),i.header||{}),{style:Z(Z({},(s.header||{}).style||{}),(i.header||{}).style||{})}),hover:Z(Z({},s.hover||{}),i.hover||{})});return this._levelCache[t]=a,a}_levelPadding(t,e,s){const i=this._levelCfg(t);return Number(i.padding)||0}_levelHeader(t,e,s,i){const n=this._levelCfg(e).header||{};if(n.show===!1)return 0;const r=Number(n.height);if(!Number.isFinite(r)||r<=0)return 0;const o=Number(n.minWidth)||40;return s<o||i<r*2?0:r}_leavesBySeries(t,e){const s=new Array(Math.max(1,e));for(let a=0;a<s.length;a++)s[a]=[];const i=a=>
1954{if(a.children&&a.children.length)a.children.forEach(i);else{const n=a._si||0;s[n]&&s[n].push(a)}};return t.forEach(i),s}_parentsBySeries(t,e){const s=new Array(Math.max(1,e));for(let a=0;a<s.length;a++)s[a]=[];const i=a=>{if(!a.children||!a.children.length)return;const n=a._si||0;s[n]&&s[n].push(a),a.children.forEach(i)};return t.forEach(i),s.forEach(a=>a.sort((n,r)=>(n.depth||0)-(r.depth||0))),s}_leafColor(t,e){const s=this.w;if(this.scale){const i=Fr(s,t,e);if(i!=null){const a=this.scale.at(i);return{color:a,foreColor:Ca(a),colorProps:{color:a,foreColor:Ca(a),percent:0}}}}return this.helpers.getShadeColor(s.config.chart.type,t,e,this.negRange)}_parentChrome(t){const e=this.w,s=this._levelCfg(t),i=e.config.theme.mode==="dark",n=(s.header||{}).style||{},r=Math.min(t,3),o=i?255:0,l=`${o},${o},${o}`;return{fill:s.fill||`rgba(${l},${(i?.04:.03)+r*.02})`,fillOpacity:s.fillOpacity==null?1:s.fillOpacity,borderColor:s.borderColor||`rgba(${l},${i?.18:.14})`,borderWidth:s.borderWidth==null?1:s.borderWidth,borderRadius:s.borderRadius==null?e.config.plotOptions.treemap.borderRadius:s.borderRadius,headerBg:n.background||`rgba(${l},${i?.1:.07})`,headerColor:n.color||(i?"#e8e8e8":e.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||e.config.chart.fontFamily,headerFontWeight:n.fontWeight==null?600:n.fontWeight,hoverColor:s.hover&&s.hover.color||(i?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:s.hover&&s.hover.width||2,hoverShow:!(s.hover&&s.hover.show===!1)}}_drawParent(t,e,s){var i;const a=e.rect;if(!a)return;const n=this.w,r=new G(this.w,this.ctx),o=e.depth||0,l=this._levelCfg(o),c=this._parentChrome(o),h=a[0],d=a[1],u=a[2]-a[0],p=a[3]-a[1];if(u<=0||p<=0)return;const g=r.group({class:"apexcharts-treemap-parent","data:depth":o,"data:name":z.escapeString(e.name)}),x=Ee(e._key),b=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(x):null,m=b?r.drawPath({d:this._tilePath(h,d,h+u,d+p),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):r.drawRect(h,d,u,p,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);m.node.classList.add("apexcharts-treemap-parent-rect"),m.node.setAttribute("data:key",x),m.node.setAttribute("data:depth",String(o)),b&&this._morphTile(m,b,this._tilePath(h,d,h+u,d+p),this.ctx.morphTypeChange.getSpeed(),s,o),g.add(m);const A=e.headerHeight||0;let v="";if(A>0){const y=l.header||{},w=r.drawRect(h,d,u,A,0,c.headerBg,1,0,"transparent");w.node.classList.add("apexcharts-treemap-parent-header"),g.add(w);let S=String((i=e.name)!=null?i:"");typeof y.formatter=="function"?S=String(y.formatter(e.name,{value:e.value,depth:o,seriesIndex:s,node:e,w:n})):y.showValue&&(S=`${S} ${this._formatValue(e.value)}`),v=S;const _=Number(y.offsetX)||0,k=y.align||"left",M=6,C=Math.max(0,u-M*2-Math.abs(_)),L=parseFloat(String(c.headerFontSize))||12,T=r.getTextBasedOnMaxWidth({text:S,maxWidth:C,fontSize:L});if(T){let D=h+M+_,E="start";k==="center"?(D=h+u/2+_,E="middle"):k==="right"&&(D=h+u-M+_,E="end");const R=r.drawText({x:D,y:d+A/2+L/3+(Number(y.offsetY)||0),text:T,textAnchor:E,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${y.style&&y.style.cssClass||""}`});R.node.setAttribute("pointer-events","none"),g.add(R)}this._attachParentEvents(w.node,e,c,m),this._makeParentAccessible(w.node,e,c,m,v)}this._attachParentEvents(m.node,e,c,m),g.node.setAttribute("role","group"),g.node.setAttribute("aria-label",this._parentLabel(e,v)),t.add(g)}_parentLabel(t,e){const s=this._drawnTotal(),i=s>0?(t._area/s*100).toFixed(1):"0",a=this._countLeaves(t);return`${e&&String(e).trim()?String(e).replace(/\s+/g," ").trim():`${t.name}, ${this._formatValue(t._area)}`}, ${a} ${a===1?"item":"items"}, ${i}% of total`}_makeParentAccessible(t,e,s,i,a){!t||!t.setAttribute||this._zoomEnabled()&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`${this._parentLabel(e,a)}. Zoom in`),t.setAttribute("aria-expanded","false"),!(!lt.isBrowser()||!t.addEventListener)&&(t.addEventListener("focus",()=>{i.node.setAttribute("stroke",s.hoverColor),i.node.setAttribute("stroke-width",String(s.hoverWidth+1))}),t.addEventListener("blur",()=>{i.node.setAttribute("stroke",s.borderColor),i.node.setAttribute("stroke-width",String(s.borderWidth))}),t.addEventListener("keydown",n=>{n.key!=="Enter"&&n.key!==" "&&n.key!=="Spacebar"||(n.preventDefault(),this._zoomTo(e,!0))})))}_attachParentEvents(t,e,s,i){if(!lt.isBrowser()||!t||!t.addEventListener)return;const a=this.w;s.hoverShow&&(t.addEventListener("mouseenter",()=>{i.node.setAttribute("stroke",s.hoverColor),i.node.setAttribute("stroke-width",String(s.hoverWidth))}),t.addEventListener("mouseleave",()=>{i.node.setAttribute("stroke",s.borderColor),i.node.setAttribute("stroke-width",String(s.borderWidth))})),a.config.tooltip.enabled&&(t.addEventListener("mouseenter",n=>this._showParentTooltip(n,e)),t.addEventListener("mousemove",n=>this._positionTooltip(n)),t.addEventListener("mouseleave",()=>this._hideParentTooltip())),this._zoomEnabled()&&(t.style.cursor="pointer",t.addEventListener("click",()=>this._zoomTo(e)))}_zoomEnabled(){const t=this.w,e=t.config.plotOptions.treemap.zoom;if(!e||!e.enabled||!this.showParents)return!1;const s=t.config.drilldown;return s&&s.enabled&&Array.isArray(s.series)&&s.series.length?(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1):!0}_resolveFocus(t){const e=this.w.globals.treemapFocusKey;if(!e||!this._zoomEnabled())return null;let s=null;const i=a=>
1954{if(!s){if(a._key===e){s=a;return}a.children&&a.children.forEach(i)}};return t.forEach(i),s&&s.children&&s.children.length?s:null}_zoomTo(t,e=!1){const s=this.w;if(!t||!t.children||!t.children.length)return;const i=s.globals.treemapFocusKey===t._key?null:t._key;s.globals.treemapFocusKey=i,this._hideParentTooltip();const a=this.ctx.update();!e||!a||typeof a.then!="function"||a.then(()=>{if(!lt.isBrowser())return;const n=s.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(n&&n.focus){n.focus();return}const r=s.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");r&&r.focus&&r.focus()})}_focusChain(){const t=[],e=new Set(this.drawn||[]);let s=this._resolveFocus(this.drawn||[]);for(;s&&(t.unshift(s),!e.has(s));)s=s._parent;return t}_breadcrumbCfg(){const t=this.w.config.plotOptions.treemap.zoom;return Br(this.w,t&&t.breadcrumb)}_renderBreadcrumb(){if(!lt.isBrowser())return;const t=this.w;if(!t.dom.elWrap||(zr(t),!this._zoomEnabled()))return;const e=this._focusChain();if(!e.length)return;const s=jh(t,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(e.map(i=>({label:i.name,data:i}))),onNavigate:(i,a)=>{t.globals.treemapFocusKey=a.data?a.data._key:null,this._hideParentTooltip(),this.ctx.update()}});s&&(this._placeBreadcrumb(s),Yr(t,s))}_placeBreadcrumb(t){var e,s;const i=this.w,a=i.layout.translateY||0,n=(s=(e=this.ctx)==null?void 0:e.dimensions)==null?void 0:s.dimHelpers,r=n?n.getTitleSubtitleCoords("title").height+n.getTitleSubtitleCoords("subtitle").height:0,o=t.getBoundingClientRect().height||Nr;if(a-r>=o+1){t.style.top=`${a-o-1}px`;return}t.style.top=`${r}px`;const l=i.config.theme.mode==="dark";t.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",t.style.borderRadius="4px"}_showParentTooltip(t,e){const s=this.w,i=this._tip();if(!i)return;const a=this._drawnTotal(),n=e._parent?e._parent._area:a,r=a>0?(e._area/a*100).toFixed(1):"0.0",o=n>0?(e._area/n*100).toFixed(1):r,l=this.w.config.plotOptions.treemap.parents,c=l&&l.tooltip&&l.tooltip.formatter,h=this._countLeaves(e);let d;if(typeof c=="function")d=c({name:e.name,value:e._area,depth:e.depth||0,leafCount:h,percentOfParent:Number(o),percentOfTotal:Number(r),node:e,w:s});else{const u=this._parentChrome(e.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${s.config.tooltip.fillSeriesColor?`background-color:${u};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${z.escapeString(e.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(e._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${h} items, </span><span class="apexcharts-tooltip-text-y-value">${o}% of parent, ${r}% of total</span></div></div></div>`}i.innerHTML=d,i.classList.add("apexcharts-active"),i.style.opacity="1",this._tipOwned=!0,this._positionTooltip(t)}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_positionTooltip(t){const e=this._tip();if(!e||!this._tipOwned)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"}_hideParentTooltip(){const t=this._tip();!t||!this._tipOwned||(this._tipOwned=!1,t.classList.remove("apexcharts-active"),t.style.opacity="0")}_drawnTotal(){return this._total==null&&(this._total=(this.drawn||[]).reduce((t,e)=>t+this._subtreeArea(e),0)),this._total||0}_subtreeArea(t){if(t._area!=null)return t._area;const e=t.children;if(e&&e.length){let i=0;for(let a=0;a<e.length;a++)i+=this._subtreeArea(e[a]);return i}const s=Number(t.value);return isNaN(s)?0:Math.abs(s)}_countLeaves(t){return!t.children||!t.children.length?1:t.children.reduce((e,s)=>e+this._countLeaves(s),0)}_formatValue(t){var e,s,i,a,n;const r=this.w,o=((s=(e=r.config.tooltip)==null?void 0:e.y)==null?void 0:s.formatter)||((n=(a=(i=r.config.yaxis)==null?void 0:i[0])==null?void 0:a.labels)==null?void 0:n.formatter);if(typeof o=="function")try{return String(o(t,{seriesIndex:0,dataPointIndex:0,w:r}))}catch(l){}return String(t)}_labelCanShow(t,e,s){if(!Number.isFinite(t)||t<=0)return!1;const i=this.w.config.plotOptions.treemap.dataLabels,a=i&&i.minFontSize!=null?Number(i.minFontSize):0;return t<a?!1:Math.max(e,s)>=t}_averageLabelSize(){if(this._avgLabelSize!=null)return this._avgLabelSize;function t(s){let i,a=0;if(Array.isArray(s[0]))for(i=0;i<s.length;i++)a+=t(s[i]);else for(i=0;i<s.length;i++)a+=s[i].length;return a}function e(s){let i,a=0;if(Array.isArray(s[0]))for(i=0;i<s.length;i++)a+=e(s[i]);else for(i=0;i<s.length;i++)a+=1;return a}return this._avgLabelSize=t(this.labels)/e(this.labels),this._avgLabelSize}getFontSize(t){const e=this.w,s=this._averageLabelSize();function i(a,n){const r=a*n,o=Math.pow(r,.5);return Math.min(o/s,parseInt(e.config.dataLabels.style.fontSize,10))}return i(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,n,r){const o=new G(this.w),l=o.getTextRects(s,String(e));if(l.width+this.w.config.stroke.width+5>
1954n-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 G(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}_morphKeyed(){var t;const e=(t=this.ctx)==null?void 0:t.morphTypeChange;return!!(e&&typeof e.hasKeyedMarks=="function"&&e.hasKeyedMarks()&&typeof e.getInitialPathForKey=="function")}_morphSourceForLeaf(t){var e;const s=(e=this.ctx)==null?void 0:e.morphTypeChange;if(!s||typeof s.getInitialPathAt!="function")return null;if(this._morphKeyed()){const i=s.getInitialPathForKey(Ee(t._key));if(i)return i}return s.getInitialPathAt(this._morphLeafIndex++)}_tilePath(t,e,s,i){return`M ${t} ${e} L ${s} ${e} L ${s} ${i} L ${t} ${i} Z`}_morphTile(t,e,s,i,a,n){new ge(this.w,this.ctx).morphSVG(t,a,n,"none",e,s,i,0)}animateTreemap(t,e,s,i,a=0){const n=new ge(this.w);n.animateRect(t,e,s,i,()=>{n.animationCompleted(t)},a)}}const Bu=.05,Yu=.05,zu=1/45;function Za(f,t,e,s){return{value:f,velocity:0,target:f,stiffness:t,damping:e}}function Ka(f,t){if(t<=0)return Qa(f);let e=t;for(;e>0;){const s=Math.min(e,zu),i=-f.stiffness*(f.value-f.target)-f.damping*f.velocity;f.velocity+=i*s,f.value+=f.velocity*s,e-=s}return!!Qa(f)&&(f.value=f.target,f.velocity=0,!0)}function Ja(f,t){f.target=t}function Qa(f){var t,e;const s=(t=f.restVelocity)!=null?t:Bu,i=(e=f.restDisplacement)!=null?e:Yu;return Math.abs(f.velocity)<s&&Math.abs(f.value-f.target)<i}const tn={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function $u(f){var t;return(t=tn[f!=null?f:"crisp"])!=null?t:tn.crisp}const yi="__apexcharts_unit_layouts__";globalThis[yi]||(globalThis[yi]={});function Hu(){return globalThis[yi]}function Wu(f){return f&&Hu()[f]||null}const wi="__apexcharts_unit_marks__";globalThis[wi]||(globalThis[wi]={});function Gu(){return globalThis[wi]}function en(f,t){if(typeof f=="string"){const s=f.trim();return s?Object.freeze({name:"anonymous",path:s,viewBox:[0,0,100,100]}):null}if(!f||typeof f!="object"||typeof f.path!="string"||!f.path.trim())return null;const e=Array.isArray(f.viewBox)&&f.viewBox.length===4?f.viewBox.map(Number):[0,0,100,100];return!e.every(s=>isFinite(s))||e[2]<=0||e[3]<=0?null:Object.freeze(it(Z({},f),{name:f.name||"anonymous",path:f.path.trim(),viewBox:e,fillRule:f.fillRule==="evenodd"?"evenodd":void 0}))}function Vu(f){return f&&Gu()[f]||null}const sn=Math.PI*(3-Math.sqrt(5));function Os(f){return 1-Math.pow(1-f,3)}function Uu(f){return t=>1+(f+1)*Math.pow(t-1,3)+f*Math.pow(t-1,2)}function qu(f){return f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2}const ju=800,Zu=.25,Ve=0,an=1,Xs=2;function Ku(f,t){const[e,s]=$u(f),i=ju/Math.max(1,t);return[e*i*i,s*i]}class Ju{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,s=new G(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":a.layout==="custom"?"custom":"grouped",r=a.transition,o=r==="flow",l=r==="identity",c=a.unitValue>0?a.unitValue:1;let h=t.map(C=>{const L=Math.abs(z.parseNumber(C))/c;return L>0?Math.max(1,Math.round(L)):0});h=this._applyMaxUnits(h,a.maxUnits);const d=h.reduce((C,L)=>C+L,0),u=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):n==="custom"?this._layoutCustom(h,a):this._layoutGrouped(h,a),p=n==="grid"&&!!(a.grid&&a.grid.split);p&&this._drawGridTrack(i,s,a),n==="scatter"&&this._drawScatterAxes(i,s);const g=this._lastDotR,x=this._shouldAnimate(),b=this.ctx&&this.ctx.morphTypeChange,m=x&&!!b&&typeof b.isActive=="function"&&b.isActive()&&typeof b.getInitialCenterFor=="function",A=m&&typeof b.getInitialSlotFor=="function",v=m&&typeof b.usesPieceTakeover=="function"&&b.usesPieceTakeover(),y=x&&!m&&this.ctx?this.ctx._unitPrevDots:null,w=new Map,S=[],_=e.seriesData.unitData||[],k=this._bubbleStats(_,a,g);let M=0;if(u.forEach(C=>{const L=e.globals.colors[C.i]||e.globals.colors[0]||"#008FFB",T=s.group({class:"apexcharts-series",seriesName:z.escapeString(e.seriesData.seriesNames[C.i]||`series-${C.i+1}`),rel:C.i+1,"data:realIndex":C.i}),D=m&&!A?b.getInitialCenterFor(C.i):null,E=C.dots.length,R=_[C.i];
1954if(C.dots.forEach((P,F)=>{const I=P.j!=null?P.j:F,B=R?R[I]:void 0,Y=B&&typeof B=="object"&&B.fillColor?B.fillColor:L,$=P.r!=null?P.r:k?this._radiusForValue(this._unitValueOf(B),k):g,X=this._markSpecFor(a,B,C.i,$),W=this._drawDot(s,a,$,Y,C.i,I,X);T.add(W);let N;if(l){const H=B&&typeof B=="object"?B.id!=null?B.id:B.name:void 0;N=H!=null?`id:${H}`:`g:${M}`}else o?N=String(M):P.slot!=null?N=`slot:${P.slot}`:N=`${C.i}:${I}`;if(M++,w.set(N,{x:P.x,y:P.y,fill:Y,r:$,spec:X}),v)this._place(W.node,X,P.x,P.y),W.node.setAttribute("opacity","0"),W.node.setAttribute("data-piece-hidden","1");else if(x){const H=y&&y.get(N),q=H||(A?b.getInitialSlotFor(C.i,I,E):D),V=a.gather&&a.gather.enter||"burst",J=p||V==="fade"||V==="rise",et=q?q.x:J?P.x:C.cx,at=q?q.y:V==="rise"&&!p?P.y+14:J?P.y:C.cy;W.node.style.opacity=q?"1":"0",this._place(W.node,X,et,at),S.push({node:W.node,spec:X,x:P.x,y:P.y,cx0:et,cy0:at,key:N,r0:H&&H.r!=null?H.r:$,r1:$,fill0:H?H.fill:Y,fill1:Y,delay:0,isEnter:!q})}else this._place(W.node,X,P.x,P.y)}),(n==="grouped"||n==="columns"||p)&&a.clusterLabels&&a.clusterLabels.show&&h[C.i]>0){const P=p?this._gridDenom:d;this._drawClusterLabel(T,C,h[C.i],P,a,L)}i.add(T)}),this._outerLabelsOn(a)&&this._drawOuterLabels(i,u,h,d,a,x&&!y),y){const C=this._collectExits(y,w,a);if(C.length){const L=s.group({class:"apexcharts-unit-exits"});i.add(L),this._runExits(L,C,a)}}return this.ctx&&(this.ctx._unitPrevDots=w),this.ctx&&(!x||m)&&(this.ctx._unitSprings=null),x&&S.length?this._runGather(S):e.globals.animationEnded=!0,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)}_layoutCustom(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=t.reduce((b,m)=>b+m,0),r=this._resolveLayoutProvider(e);if(!r)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,i-o*2),height:a},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,n);this._lastDotR=this._dotRadiusFromStep(h,e);const d=this._lastDotR,u=this._layoutObjects(t,d);let p;try{p=r(u,l)}catch(b){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",b),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const g=new Map;p.forEach(b=>{!b||!isFinite(b.x)||!isFinite(b.y)||g.set(String(b.id),{x:b.x,y:b.y,r:typeof b.r=="number"&&b.r>0?b.r:void 0})});const x=t.map((b,m)=>({i:m,cx:i/2,cy:a/2,outerR:d,dots:[]}));return u.forEach(b=>{const m=g.get(b.id);m&&x[b.seriesIndex].dots.push({x:m.x,y:m.y,r:m.r,j:b.dataPointIndex})}),x.forEach(b=>{if(!b.dots.length)return;let m=0,A=0;b.dots.forEach(y=>{m+=y.x,A+=y.y}),b.cx=m/b.dots.length,b.cy=A/b.dots.length;let v=0;b.dots.forEach(y=>{v=Math.max(v,Math.hypot(y.x-b.cx,y.y-b.cy))}),b.outerR=v+d}),x}_layoutObjects(t,e){const s=this.w,i=s.seriesData.unitData||[],a=s.seriesData.seriesNames||[],n=[];let r=0;return t.forEach((o,l)=>{var c;const h=i[l];for(let d=0;d<o;d++){const u=h?h[d]:void 0,p=u&&typeof u=="object"&&(u.id!=null||u.name!=null)?String(u.id!=null?u.id:u.name):`${l}:${d}`;n.push({id:p,index:r,seriesIndex:l,dataPointIndex:d,label:a[l],value:(c=this._unitValueOf(u))!=null?c:void 0,datum:u,r:e}),r++}}),n}_resolveLayoutProvider(t){const e=t.positions;if(typeof e=="function")return e;if(typeof e=="string"&&e){const s=Wu(e);if(s)return s;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_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((S,_)=>_).filter(S=>t[S]>0),o=Math.max(1,r.length),l=new Array(t.length).fill(-1);r.forEach((S,_)=>l[S]=_);const c=i/o,h=a-n,d=Math.max(1,...t),u=Math.min(c,h)*.08,p=Math.max(4,Math.min(c,h)/2-u),g=this._resolveStep(e,p,d);this._lastDotR=this._dotRadiusFromStep(g,e);const x=this._lastDotR,b=n+h/2,m=t.map(S=>g*Math.sqrt(Math.max(1,S))+x),A=S=>l[S]>=0?c*(l[S]+.5):i/2;let v=t.map((S,_)=>A(_));const y=r.map(S=>m[S]);let w=!1;for(let S=1;S<o;S++)if(v[r[S]]-v[r[S-1]]<y[S]+y[S-1]){w=!0;break}if(w){const S=Math.max(2*x,8),_=y.reduce((M,C)=>M+2*C,0)+S*(o-1);let k;if(_<=i){let M=(i-_)/2;k=y.map(C=>{const L=M+C;return M+=2*C+S,L})}else if(o===1)k=[i/2];else{const M=y[0],C=i-y[o-1];k=y.map((L,T)=>M+(C-M)*T/(o-1))}v=t.map((M,C)=>l[C]>=0?k[l[C]]:i/2)}return t.map((S,_)=>({i:_,cx:v[_],cy:b,outerR:m[_],dots:this._spiral(v[_],b,S,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,x)=>g+x,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,x)=>x);e.sortByGroup!==!1&&d.sort((g,x)=>t[g]-t[x]);const u=t.map((g,x)=>({i:x,cx:c,cy:h,outerR:l*Math.sqrt(r)+this._lastDotR,dots:[]}));let p=0;return d.forEach(g=>{for(let x=0;x<t[g];x++){const b=l*Math.sqrt(p+.5),m=p*sn;u[g].dots.push({x:c+b*Math.cos(m),y:h+b*Math.sin(m),slot:p}),p++}}),u}_layoutArc(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=Math.max(1,t.reduce((T,D)=>T+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,u=Math.max(0,Math.min(.95,typeof r.innerRadiusRatio=="number"?r.innerRadiusRatio:.4)),p=T=>Math.sin(T),g=T=>-Math.cos(T),x=this._arcBounds(c,h),b=Math.min(i,a)*.04,m=Math.max(1e-6,x.maxX-x.minX),A=Math.max(1e-6,x.maxY-x.minY),v=
1954Math.max(4,Math.min((i-2*b)/m,(a-2*b)/A)),y=v*u,w=i/2-(x.minX+x.maxX)/2*v,S=a/2-(x.minY+x.maxY)/2*v,_=this._arcAllocate(n,y,v,d,e);this._lastDotR=_.dotR;const k=[];for(let T=0;T<_.R;T++){const D=_.radii[T],E=_.seatsPerRow[T];for(let R=0;R<E;R++){const P=E===1?(c+h)/2:c+d*(R+.5)/E;k.push({a:P,x:w+D*p(P),y:S+D*g(P)})}}k.sort((T,D)=>T.a-D.a);const M=t.map((T,D)=>({i:D,cx:w,cy:S,outerR:v,dots:[]}));let C=0,L=0;return k.forEach((T,D)=>{for(;C<t.length&&L>=t[C];)C++,L=0;C>=t.length||(M[C].dots.push({x:T.x,y:T.y,slot:D}),L++)}),M}_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 u=[];for(let y=0;y<d;y++)u.push(d===1?(e+s)/2:e+(s-e)*(y/(d-1)));const p=u.reduce((y,w)=>y+w,0)||1,g=u.map(y=>t*y/p),x=g.map(y=>Math.floor(y));let b=t-x.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&&(x[y.idx]++,b--)});b>0;)x[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=x[y];if(w<=0)continue;const S=u[y]*r/w;S<A&&(A=S)}const v=Math.min(m,A);return{R:d,radii:u,seatsPerRow:x,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 u=2;u<=d;u++){const p=l(u);p.dotR>h.dotR&&(h=p)}}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((M,C)=>C).filter(M=>t[M]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((M,C)=>h[M]=C);const d=i/c,u=d*.62,p=Math.max(8,a*.04)+(r?30:0),g=Math.max(4,a-o-p),x=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 M=Math.max(1,Math.floor(g/y)),C=Math.max(1,Math.floor(u/y));v=Math.max(1,Math.min(C,Math.ceil(x/M)))}else{let M=0;const C=Math.max(1,Math.min(40,Math.round(u/4)));for(let L=1;L<=C;L++){const T=Math.ceil(x/L),D=Math.min(u/L,g/T);D>M&&(M=D,v=L)}y=M,this._lastDotR=Math.max(1,y/(2*b))}const w=this._lastDotR,S=Math.ceil(x/v),_=Math.min(g,S*y),k=o+(g+_)/2;return t.map((M,C)=>{const L=h[C]>=0?d*(h[C]+.5):i/2,D=Math.ceil(Math.max(1,M)/v)*y,E=L-v*y/2+y/2,R=[];for(let P=0;P<M;P++){const F=Math.floor(P/v),I=P%v;R.push({x:E+I*y,y:k-w-F*y})}return{i:C,cx:L,cy:k-D/2,outerR:D/2,flat:!0,dots:R}})}_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>0?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((k,M)=>k+M,0),h=Math.max(1,Math.ceil(Math.max(1,c)/r)),d=6,u=e.spacing>0?e.spacing:1,p=Math.max(4,i),g=Math.max(4,a-d),x=this._fixedRadius(e);let b=0;x?(b=2*x*u,this._lastDotR=x):(b=Math.min(p/r,g/h),this._lastDotR=Math.max(1,b/(2*u)));const m=r*b,A=h*b,v=(i-m)/2+b/2,y=d+(g-A)/2,w=k=>o==="bottom"?y+A-b/2-k*b:y+b/2+k*b,S=t.map((k,M)=>({i:M,cx:i/2,cy:d+g/2,outerR:Math.max(m,A)/2,dots:[]}));let _=0;for(let k=0;k<l.length;k++)for(let M=0;M<l[k];M++){const C=_%r,L=Math.floor(_/r);S[k].dots.push({x:v+C*b,y:w(L),slot:_}),_++}return S}_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((R,P)=>P).filter(R=>t[R]>0),d=Math.max(1,h.length),u=n.max>0?n.max:Math.max(1,...t),p=Math.max(1,Math.round(n.tileColumns>0?n.tileColumns:Math.ceil(Math.sqrt(d)))),g=Math.max(1,Math.ceil(d/p)),x=!(e.clusterLabels&&e.clusterLabels.show===!1),b=x&&e.clusterLabels&&e.clusterLabels.position==="bottom",m=x&&!b?22:4,A=x&&b?22:4,v=i/p,y=a/g,w=Math.max(4,v*.86),S=Math.max(4,y-m-A),_=e.spacing>
19540?e.spacing:1,k=this._fixedRadius(e);let M=0;k?(M=2*k*_,this._lastDotR=k):(M=Math.min(w/r,S/c),this._lastDotR=Math.max(1,M/(2*_)));const C=r*M,L=c*M,T=(R,P)=>o==="bottom"?R+L-M/2-P*M:R+M/2+P*M,D=[],E=[];return h.forEach((R,P)=>{const F=P%p,I=Math.floor(P/p),B=F*v,Y=I*y,$=B+(v-C)/2+M/2,X=Y+m+(S-L)/2,W=q=>({x:$+q%r*M,y:T(X,Math.floor(q/r))});for(let q=0;q<l;q++)D.push(W(q));const N=Math.max(0,Math.min(l,Math.round(t[R]/u*l))),H=[];for(let q=0;q<N;q++){const V=W(q);H.push({x:V.x,y:V.y,slot:P*l+q})}E.push({i:R,cx:B+v/2,cy:X+L/2,outerR:L/2,flat:!0,split:!0,dots:H})}),this._gridDenom=u,this._gridTrack={cells:D},E}_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);if(s.orientation==="vertical")return this._layoutScatterVertical(t);const i=e.layout.gridWidth,a=e.layout.gridHeight,n=e.seriesData.unitData||[],r=e.seriesData.seriesNames||[],o=N=>this._unitValueOf(N),l=this._scatterSizeStats(s,n),c=n.map(N=>Array.isArray(N)?N.map(o):[]),h=N=>N!=null&&isFinite(N),d=c.map((N,H)=>H).filter(N=>c[N].some(h)),u=Math.max(1,d.length);let p=1/0,g=-1/0;c.forEach(N=>N.forEach(H=>{H!=null&&isFinite(H)&&(H<p&&(p=H),H>g&&(g=H))})),p===1/0&&(p=0,g=1);const x=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),b=this._scatterValueDomain(s,p,g,x),m=b.min,A=b.max,v=A-m||1,y=s.laneLabelWidth!=null?Math.max(0,s.laneLabelWidth):u>1?92:8,w=30+(s.xTitle?20:0),S=y,_=i-8,k=10,M=a-w,C=Math.max(4,_-S),L=Math.max(4,M-k),T=N=>S+(N-m)/v*C,D=L/u,E=N=>k+D*(N+.5);let R=0;const P=this._fixedRadius(t);if(P)R=P;else{const N=Math.max(1,...d.map(H=>c[H].filter(h).length));R=Math.max(2,Math.min(6,D*.12,C/(2.5*Math.sqrt(N))))}this._lastDotR=R;const F=t.spacing>0?t.spacing:1,I=Math.max(.5,R*F),B=s.spread==="jitter",Y=[],$=[],X=l?l.rMax:R;d.forEach((N,H)=>{const q=E(H);$.push({i:N,cy:q,name:r[N]||`series-${N+1}`});const J=(n[N]||[]).map((et,at)=>{const nt=o(et),ot={j:at,px:T(h(nt)?nt:m),y:q};return l&&(ot.r=this._scatterRadius(et,l,R)),ot});if(B){const et=Math.max(X,D/2-X);J.forEach((at,nt)=>{const ot=(nt*9301+49297)%233280/233280;at.y=q+(ot*2-1)*et})}else this._beeswarm(J,q,R,I,X);Y.push({i:N,cx:(S+_)/2,cy:q,outerR:D/2,dots:J.map(et=>({x:et.px,y:et.y,r:et.r}))})});const W=b.ticks;return this._scatterAxis={mode:"1d",plotL:S,plotR:_,plotT:k,plotB:M,xMin:m,xMax:A,plotX:T,ticks:W,lanes:$,xTitle:s.xTitle,formatter:typeof s.xFormatter=="function"?s.xFormatter:null,gridlines:s.gridlines!==!1},Y}_layoutScatterVertical(t){const e=this.w,s=t.scatter||{},i=e.layout.gridWidth,a=e.layout.gridHeight,n=e.seriesData.unitData||[],r=e.seriesData.seriesNames||[],o=N=>this._unitValueOf(N),l=this._scatterSizeStats(s,n),c=n.map(N=>Array.isArray(N)?N.map(o):[]),h=N=>N!=null&&isFinite(N),d=c.map((N,H)=>H).filter(N=>c[N].some(h)),u=Math.max(1,d.length);let p=1/0,g=-1/0;c.forEach(N=>N.forEach(H=>{H!=null&&isFinite(H)&&(H<p&&(p=H),H>g&&(g=H))})),p===1/0&&(p=0,g=1);const x=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),b=this._scatterValueDomain(s,p,g,x),m=b.min,A=b.max,v=A-m||1,y=46+(s.xTitle?18:0),w=u>1?26:10,S=y,_=i-10,k=10,M=a-w,C=Math.max(4,_-S),L=Math.max(4,M-k),T=N=>M-(N-m)/v*L,D=C/u,E=N=>S+D*(N+.5);let R=0;const P=this._fixedRadius(t);if(P)R=P;else{const N=Math.max(1,...d.map(H=>c[H].filter(h).length));R=Math.max(2,Math.min(6,D*.12,L/(2.5*Math.sqrt(N))))}this._lastDotR=R;const F=t.spacing>0?t.spacing:1,I=Math.max(.5,R*F),B=s.spread==="jitter",Y=[],$=[],X=l?l.rMax:R;d.forEach((N,H)=>{const q=E(H);$.push({i:N,cx:q,name:r[N]||`series-${N+1}`});const J=(n[N]||[]).map((et,at)=>{const nt=o(et),ot={j:at,py:T(h(nt)?nt:m),x:q};return l&&(ot.r=this._scatterRadius(et,l,R)),ot});
1954if(B){const et=Math.max(X,D/2-X);J.forEach((at,nt)=>{const ot=(nt*9301+49297)%233280/233280;at.x=q+(ot*2-1)*et})}else this._beeswarm(J,q,R,I,X,!0);Y.push({i:N,cx:q,cy:(k+M)/2,outerR:D/2,dots:J.map(et=>({x:et.x,y:et.py,r:et.r}))})});const W=b.ticks;return this._scatterAxis={mode:"1d",orientation:"vertical",plotL:S,plotR:_,plotT:k,plotB:M,vMin:m,vMax:A,plotY:T,ticks:W,lanes:$,valueTitle:s.xTitle,formatter:typeof s.xFormatter=="function"?s.xFormatter:null,gridlines:s.gridlines!==!1},Y}_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,W)=>W).filter(X=>(n[X]||[]).some(W=>r(o(W))&&r(l(W))));let h=1/0,d=-1/0,u=1/0,p=-1/0;n.forEach(X=>(X||[]).forEach(W=>{const N=o(W),H=l(W);r(N)&&r(H)&&(N<h&&(h=N),N>d&&(d=N),H<u&&(u=H),H>p&&(p=H))})),h===1/0&&(h=0,d=1,u=0,p=1);const g=Math.max(2,Math.round(a.tickAmount>0?a.tickAmount:5)),x=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:u,a.yMax!=null?a.yMax:p,x),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,S=v-A||1,_=w-y||1,k=46+(a.yTitle?18:0),M=30+(a.xTitle?20:0),C=k,L=s-12,T=10,D=i-M,E=Math.max(4,L-C),R=Math.max(4,D-T),P=X=>C+(X-A)/S*E,F=X=>D-(X-y)/_*R,I=this._scatterSizeStats(a,n),B=this._fixedRadius(t)||5;this._lastDotR=B;const Y=[];c.forEach(X=>{const N=(n[X]||[]).map(H=>{const q=o(H),V=l(H);return{x:P(r(q)?q:A),y:F(r(V)?V:y),r:I?this._scatterRadius(H,I,B):void 0}});Y.push({i:X,cx:(C+L)/2,cy:(T+D)/2,outerR:R/2,dots:N})});const $=(X,W,N,H,q,V)=>{const J=[];if(q)for(let et=0;et<V;et++)J.push(X+N*et/(V-1));else{const et=H||N/Math.max(1,V-1);for(let at=X;at<=W+et*.5;at+=et)J.push(Math.abs(at)<et*1e-9?0:at)}return J};return this._scatterAxis={mode:"2d",plotL:C,plotR:L,plotT:T,plotB:D,plotX:P,plotY:F,xTicks:$(A,v,S,b.spacing,a.xMin!=null||a.xMax!=null,g),yTicks:$(y,w,_,m.spacing,a.yMin!=null||a.yMax!=null,x),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},Y}_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,n=!1){const r=n?"py":"px",o=n?"x":"y",l=t.slice().sort((d,u)=>d[r]-u[r]),c=[],h=a!=null?a:s;l.forEach(d=>{const u=d.r!=null?d.r:s;let p=0;for(let g=0;g<2e3;g++){const x=g===0?0:Math.ceil(g/2)*i*(g%2?1:-1),b=e+x;let m=!0;for(let A=c.length-1;A>=0;A--){const v=c[A],y=d[r]-v.f;if(y>u+h)break;const w=u+v.r,S=b-v.s;if(y*y+S*S<w*w){m=!1;break}}if(m){p=x;break}}d[o]=e+p,c.push({f:d[r],s:d[o],r:u})})}_scatterValueDomain(t,e,s,i){const a=(o,l,c)=>{const h=[];for(let d=o;d<=l+c*.5;d+=c)h.push(Math.abs(d)<c*1e-9?0:d);return h};if(t.xMin!=null||t.xMax!=null){let o=t.xMin!=null?t.xMin:e,l=t.xMax!=null?t.xMax:s;l>o||(l=o+1);const c=(l-o)/Math.max(1,i-1);return e<o&&(o-=Math.ceil((o-e)/c)*c),s>l&&(l+=Math.ceil((s-l)/c)*c),{min:o,max:l,ticks:a(o,l,c)}}const n=this._niceScale(e,s,i),r=n.spacing||(n.max-n.min)/Math.max(1,i-1);return{min:n.min,max:n.max,ticks:a(n.min,n.max,r)}}_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(!lt.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,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",d=(p,g,x,b,m)=>{const A=U.createElementNS(a,"line");A.setAttribute("x1",String(p)),A.setAttribute("y1",String(g)),A.setAttribute("x2",String(x)),A.setAttribute("y2",String(b)),A.setAttribute("stroke",m),A.setAttribute("shape-rendering","crispEdges"),n.node.appendChild(A)},u=(p,g,x,b,m,A,v,y)=>{const w=U.createElementNS(a,"text");w.setAttribute("class",y),w.setAttribute("x",String(g)),w.setAttribute("y",String(x)),w.setAttribute("text-anchor",b),w.setAttribute("dominant-baseline","middle"),w.setAttribute("font-size",`${A}px`),w.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),w.setAttribute("font-weight",String(v)),w.setAttribute("fill",m),w.textContent=p,n.node.appendChild(w)};if(i.mode==="2d"){if(i.yTicks.forEach(p=>{const g=i.plotY(p);i.gridlines&&d(i.plotL,g,i.plotR,g,r);const x=i.yFormatter?String(i.yFormatter(p)):this._formatTick(p);u(x,i.plotL-8,g,"end",h,11,400,"apexcharts-unit-tick")}),i.xTicks.forEach(p=>{const g=i.plotX(p);i.gridlines&&d(g,i.plotT,g,i.plotB,r);const x=i.xFormatter?String(i.xFormatter(p)):this._formatTick(p);u(x,g,i.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotB,i.plotR,i.plotB,o),d(i.plotL,i.plotT,i.plotL,i.plotB,o),i.xTitle&&u(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.yTitle){const p=U.createElementNS(a,"text");p.setAttribute("class","apexcharts-unit-axis-title");const g=14,x=(i.plotT+i.plotB)/2;p.setAttribute("x",String(g)),p.setAttribute("y",String(x)),p.setAttribute("text-anchor","middle"),p.setAttribute("font-size","12px"),p.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),p.setAttribute("font-weight","600"),p.setAttribute("fill",h),p.setAttribute("transform",`rotate(-90 ${g} ${x})`),p.textContent=String(i.yTitle),n.node.appendChild(p)}t.add(n);return}if(i.orientation==="vertical"){if(i.ticks.forEach(p=>{const g=i.plotY(p);i.gridlines&&d(i.plotL,g,i.plotR,g,r);const x=i.formatter?String(i.formatter(p)):this._formatTick(p);u(x,i.plotL-8,g,"end",h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotT,i.plotL,i.plotB,o),i.valueTitle){const p=U.createElementNS(a,"text");p.setAttribute("class","apexcharts-unit-axis-title");const g=14,x=(i.plotT+i.plotB)/2;p.setAttribute("x",String(g)),p.setAttribute("y",String(x)),p.setAttribute("text-anchor","middle"),p.setAttribute("font-size","12px"),p.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),p.setAttribute("font-weight","600"),p.setAttribute("fill",h),p.setAttribute("transform",`rotate(-90 ${g} ${x})`),p.textContent=String(i.valueTitle),n.node.appendChild(p)}
1954i.lanes.forEach(p=>{const g=c||s.globals.colors[p.i]||s.globals.colors[0]||"#008FFB";u(p.name,p.cx,i.plotB+16,"middle",g,12,600,"apexcharts-unit-lane-label")}),t.add(n);return}i.ticks.forEach((p,g)=>{const x=i.plotX(p);i.gridlines&&d(x,i.plotT,x,i.plotB,r);const b=i.formatter?String(i.formatter(p)):this._formatTick(p),m=g===0?"start":g===i.ticks.length-1?"end":"middle";u(b,x,i.plotB+14,m,h,11,400,"apexcharts-unit-tick")}),d(i.plotL,i.plotB,i.plotR,i.plotB,o),i.xTitle&&u(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),i.plotL>12&&i.lanes.forEach(p=>{const g=c||s.globals.colors[p.i]||s.globals.colors[0]||"#008FFB";u(p.name,i.plotL-8,p.cy,"end",g,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*sn;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,e){if(t.shape==="image"&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const s=e!=null?e:this._lastDotR;return{hx:s,hy:s}}_place(t,e,s,i){const a=e;a.pk===Xs?t.setAttribute("transform","translate("+(s-a.ox)+","+(i-a.oy)+a.tail):a.pk===an?(t.setAttribute("x",String(s-a.hx)),t.setAttribute("y",String(i-a.hy))):(t.setAttribute("cx",String(s)),t.setAttribute("cy",String(i)))}_baseSpec(t,e){const s=e!=null?e:this._lastDotR;if(!this._isCorner(t))return{pk:Ve,r:s};const{hx:i,hy:a}=this._halfExtent(t,s);return{pk:an,hx:i,hy:a,r:s}}_resolveMark(t){if(t==null)return null;if(typeof t=="object")return en(t);if(typeof t!="string"||!t)return null;const e=t.trim();if(e[0]==="M"||e[0]==="m")return en(e);const s=Vu(e);return s||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,s){const i=Math.round(e*10)/10,a=t.name+"|"+t.path.length+"|"+i,n=this._specCache.get(a);if(n)return n;const r=t.viewBox||[0,0,100,100],o=Math.max(0,Math.min(.9,s.padding||0)),l=typeof s.scale=="number"&&s.scale>0?s.scale:1,c=2*i*(1-o)*l,h=s.fit==="width"?c/r[2]:s.fit==="height"?c/r[3]:c/Math.max(r[2],r[3]),d=Object.freeze({pk:Xs,mark:t,d:t.path,fillRule:t.fillRule,s:h,ox:(r[0]+r[2]/2)*h,oy:(r[1]+r[3]/2)*h,tail:") scale("+h+")",r:i});return this._specCache.set(a,d),d}_markSpecFor(t,e,s,i){if(t.shape!=="pictogram")return this._baseSpec(t,i);const a=t.pictogram||{},n=e&&typeof e=="object"?e.mark:void 0,r=Array.isArray(a.mark)?a.mark[s%a.mark.length]:a.mark,o=this._resolveMark(n!=null?n:r);return o?this._glyphSpec(o,i,a):this._baseSpec(it(Z({},t),{shape:a.fallback==="square"?"square":"circle"}),i)}_drawDot(t,e,s,i,a,n,r){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,c=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[a]||"none",h=typeof o.config.fill.opacity=="number"?o.config.fill.opacity:1;let d;if(r&&r.pk===Xs)d=o.dom.Paper.path(r.d),d.node.setAttribute("fill",i),r.fillRule==="evenodd"&&d.node.setAttribute("fill-rule","evenodd"),h<1&&d.node.setAttribute("fill-opacity",String(h)),d.node.setAttribute("data:r",String(r.r));else if(e.shape==="image"&&e.image&&e.image.src){const u=e.image.width||20,p=e.image.height||20;d=o.dom.Paper.image(e.image.src),d.node.setAttribute("width",String(u)),d.node.setAttribute("height",String(p)),d.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.t
1954int&&d.node.setAttribute("filter",`url(#${this._tintFilter(i)})`)}else if(e.shape==="square"){const u=s*2;d=t.drawRect(0,0,u,u,e.borderRadius||0,i,1,l,c),d.node.setAttribute("fill",i),h<1&&d.node.setAttribute("fill-opacity",String(h))}else d=t.drawCircle(s,{fill:i,"stroke-width":l,stroke:c}),d.node.setAttribute("fill",i),h<1&&d.node.setAttribute("fill-opacity",String(h));return d.node.classList.add("apexcharts-unit-area"),d.node.setAttribute("i",String(a)),d.node.setAttribute("j",String(n)),d}_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=U.createElementNS(s,"defs"),n.insertBefore(r,n.firstChild));const o=U.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=U.createElementNS(s,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=U.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}_placeDot(t,e,s,i,a){this._place(t,a||this._baseSpec(e),s,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!(!lt.isBrowser()||!e||e.enabled===!1||t.globals.shouldAnimate===!1||t.globals.resized&&!t.globals.dataChanged||e.respectReducedMotion&&Xi())}_seedSprings(t,e,s){const[i,a]=Ku(e.spring,s),n=this.ctx?this.ctx._unitSprings:null,r=new Map;for(let o=0;o<t.length;o++){const l=t[o],c=n&&!l.isEnter&&l.key!=null?n.get(l.key):null,h=c?c.x:Za(l.cx0,i,a),d=c?c.y:Za(l.cy0,i,a);c&&(h.stiffness=i,d.stiffness=i,h.damping=a,d.damping=a,l.cx0=h.value,l.cy0=d.value,this._place(l.node,l.spec,l.cx0,l.cy0),(h.velocity!==0||d.velocity!==0)&&(l.delay=0)),l.sx=h,l.sy=d,l.key!=null&&r.set(l.key,{x:h,y:d})}this.ctx&&(this.ctx._unitSprings=r)}_runGather(t){const e=this.w,s=e.config.plotOptions.unit,i=Math.max(1,e.config.chart.animations.speed||800),a=Math.min(i*.6,450),n=t.length;for(let p=0;p<n;p++)t[p].delay=n>1?p/(n-1)*a:0;const r=s.gather||{},o=r.motion||"auto";o==="spring"||o==="auto"&&(!r.easing||r.easing==="outCubic")?this._seedSprings(t,r,i):this.ctx&&(this.ctx._unitSprings=null);for(let p=0;p<n;p++){const g=t[p];g.spec.pk===Ve&&g.r0!=null&&g.r1!=null&&g.r0!==g.r1&&g.node.setAttribute("r",String(g.r0))}for(let p=0;p<n;p++){const g=t[p];g.fill0&&g.fill1&&g.fill0!==g.fill1&&(g._c0=this._rgb(g.fill0),g._c1=this._rgb(g.fill1))}const c=r.easing==="outBack"?Uu(typeof r.overshoot=="number"?r.overshoot:1.70158):r.easing==="inOutCubic"?qu:Os;this.w.globals.unitGatherRAF!=null&&(U.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);const h=performance.now();let d=h;const u=p=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0;return}const g=Math.min(Zu,Math.max(0,(p-d)/1e3));d=p;let x=!0;for(let b=0;b<n;b++){const m=t[b],A=p-h-m.delay,v=Math.max(0,Math.min(1,A/i)),y=Os(v);let w,S;if(m.sx&&m.sy){A>=0&&!m.released&&(Ja(m.sx,m.x),Ja(m.sy,m.y),m.released=!0);const _=Ka(m.sx,g),k=Ka(m.sy,g);(!m.released||!_||!k)&&(x=!1),w=m.sx.value,S=m.sy.value}else{const _=c(v);w=m.cx0+(m.x-m.cx0)*_,S=m.cy0+(m.y-m.cy0)*_}if(this._place(m.node,m.spec,w,S),m.isEnter&&(m.node.style.opacity=String(Math.min(1,v*2.5))),m._c0&&m._c1){const _=Math.round(m._c0[0]+(m._c1[0]-m._c0[0])*y),k=Math.round(m._c0[1]+(m._c1[1]-m._c0[1])*y),M=Math.round(m._c0[2]+(m._c1[2]-m._c0[2])*y);m.node.setAttribute("fill",`rgb(${_},${k},${M})`)}m.spec.pk===Ve&&m.r0!=null&&m.r1!=null&&m.r0!==m.r1&&m.node.setAttribute("r",String(m.r0+(m.r1-m.r0)*y)),v<1&&(x=!1)}if(x){for(let b=0;b<n;b++){const m=t[b];m.node.style.opacity="",m._c1&&m.fill1&&m.node.setAttribute("fill",m.fill1),m.spec.pk===Ve&&m.r0!=null&&m.r1!=null&&m.r0!==m.r1&&m.node.setAttribute("r",String(m.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=U.requestAnimationFrame(u)};this.w.globals.unitGatherRAF=U.requestAnimationFrame(u)}_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 G(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"||s.layout==="custom"?0:.35,c=[];if(e.forEach(p=>{const g=p.r!=null?p.r:n,x=p.spec||this._baseSpec(s,g),b=this._drawDot(a,s,g,p.fill,0,0,x);b.node.classList.add("apexcharts-unit-exit"),this._place(b.node,x,p.x,p.y),t.add(b),c.push({node:b.node,x0:p.x,y0:p.y,spec:x})}
1954),!this._shouldAnimate()){c.forEach(p=>p.node.remove());return}const h=Math.max(1,i.config.chart.animations.speed||800);this.w.globals.unitExitRAF!=null&&(U.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);const d=performance.now(),u=p=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}const g=Math.max(0,Math.min(1,(p-d)/h)),x=Os(g);for(let b=0;b<c.length;b++){const m=c[b];if(l){const A=m.x0+(r-m.x0)*x*l,v=m.y0+(o-m.y0)*x*l;this._place(m.node,m.spec,A,v)}m.node.style.opacity=String(1-x)}g<1?this.w.globals.unitExitRAF=U.requestAnimationFrame(u):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=U.requestAnimationFrame(u)}_outerLabelsOn(t){const e=t.clusterLabels;return!!(t.layout==="custom"&&e&&e.show!==!1&&e.external&&e.external.show)}_outerLabelLines(t,e,s,i){const a=this.w,n=a.seriesData.seriesNames[t]||`series-${t+1}`,r=s>0?e/s*100:0,o=i.clusterLabels,l=typeof o.formatter=="function"?o.formatter(n,{seriesIndex:t,value:e,percent:r,w:a}):`${n} 1955${r.toFixed(1)}%`;return String(l).split(` 1956`)}_outerLabelGutter(t,e){const s=this.w,i=e.clusterLabels,a=i.external.connector||{},n=t.reduce((d,u)=>d+u,0),r=[];if(t.forEach((d,u)=>{d>0&&r.push(...this._outerLabelLines(u,d,n,e))}),!r.length)return 0;const o=wu(s,r,{fontSize:i.fontSize,fontFamily:i.fontFamily||s.config.chart.fontFamily}),l=a.gap!=null?a.gap:8,c=a.length!=null?a.length:22,h=o+l+c+8+Math.abs(parseFloat(i.external.offsetX)||0);return Math.min(h,s.layout.gridWidth*.25)}_drawOuterLabels(t,e,s,i,a,n){const r=this.w;if(!lt.isBrowser())return;const o=a.clusterLabels,l=o.external,c=l.connector||{},h=c.gap!=null?c.gap:8,d=c.length!=null?c.length:22,u=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,g=r.layout.gridWidth,x=r.layout.gridHeight,b=this._lastDotR,m=e.filter(T=>T.dots.length>0);if(!m.length)return;let A=0,v=0;if(m.length>1){const T=m.map(E=>E.cx),D=m.map(E=>
1956E.cy);A=Math.max(...T)-Math.min(...T),v=Math.max(...D)-Math.min(...D)}const y=A>v,w=parseFloat(o.fontSize)||13,S=Math.round(w*1.35),_=[];if(m.slice().sort((T,D)=>T.cy-D.cy).forEach((T,D)=>{const E=this._outerLabelLines(T.i,s[T.i],i,a);if(!E.some($=>$!==""))return;const R=y?T.cx>=g/2?"right":"left":D%2===0?"right":"left",P=R==="right"?1:-1;let F=T.dots[0],I=-1/0;T.dots.forEach($=>{const X=P*$.x-.75*Math.abs($.y-T.cy);X>I&&(I=X,F=$)});const B={x:F.x+P*(F.r||b),y:F.y},Y={x:B.x+P*h,y:B.y};_.push({i:T.i,lines:E,anchor:B,elbow:Y,labelX:Y.x+P*d+u,idealY:B.y+p,labelY:B.y+p,side:R})}),!_.length)return;const M=_.reduce((T,D)=>Math.max(T,D.lines.length),1)*S,C=M/2;["left","right"].forEach(T=>{eo(_.filter(D=>D.side===T),M+2,x-C,C)});const L=new G(r,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(n){const T=Math.max(1,r.config.chart.animations.speed||800);L.node.classList.add("apexcharts-unit-label-delay"),L.node.style.animationDelay=`${Math.min(T*.45,600)/1e3}s`}_.forEach(T=>{const D=r.globals.colors[T.i]||r.globals.colors[0]||"#008FFB";L.add(to(r,{lines:T.lines,lineHeight:S,anchor:T.anchor,elbow:T.elbow,labelX:T.labelX,labelY:T.labelY,side:T.side,connector:{show:c.show!==!1,width:c.width!=null?c.width:1.5,color:c.color||D},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||r.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||r.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(L)}_drawClusterLabel(t,e,s,i,a,n){const r=this.w;if(!lt.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 u;typeof h.formatter=="function"?u=h.formatter(l,{seriesIndex:e.i,value:s,percent:c,w:r}):u=`${l} (${c.toFixed(1)}%)`;const p=typeof u=="string"?u:String(u),g=U.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 x=h.position==="bottom",b=e.outerR+d*.6+3+(h.offsetY||0),m=p.length*d*.55;if(!x&&!e.flat&&h.curved!==!1&&m<=Math.PI*b*.95){const v=e.cy,y=e.cx-b,w=e.cx+b,S=`M ${y} ${v} A ${b} ${b} 0 0 1 ${w} ${v}`,_=`apexcharts-unit-label-${r.globals.chartID}-${e.i}`,k=U.createElementNS(o,"path");k.setAttribute("id",_),k.setAttribute("d",S),k.setAttribute("fill","none"),k.setAttribute("stroke","none");const M=U.createElementNS(o,"textPath");M.setAttribute("href",`#${_}`),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${_}`),M.setAttribute("startOffset","50%"),M.textContent=p,g.appendChild(M),t.node.appendChild(k)}else{g.setAttribute("x",String(e.cx));const v=x?e.cy+e.outerR+d+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);g.setAttribute("y",String(v)),g.textContent=p}t.node.appendChild(g)}}const Ue=Math.PI/180,nn=180/Math.PI,Is="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml",_e=(f,t,e)=>f+(t-f)*e;class Qu{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._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,s=new G(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;
1956this._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(){return Ru(this.w)}_fillValues(t){Yi(t)}_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){var e;const i=this.w.config.chart.animations,a=i.enabled?t==="none"?0:t==="update"?i.dynamicAnimation.speed||350:i.speed||500:0,n=++this._zoomGen,r=(e=this.ctx)==null?void 0:e.morphTypeChange,o=!!r&&typeof r.isActive=="function"&&r.isActive()&&typeof r.getInitialPathAt=="function",l=o?r.getSpeed():0;this._morphLeafIndex=0;const c=t==="update"?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(d=>{if(d._show){const u={a0:d._a0,a1:d._a1,iR:d._iR,oR:d._oR};d._el||(d._el=this._createArcEl(d));const p=o?this._morphSourceFor(d):null;if(p&&l>0)this._morphArcFrom(d,p,u,l,n);else if((t==="intro"||o)&&a>0)this._sweepArc(d,u,o?l:a,n);else{let g,x=!1;if(d._cur)g=d._cur;else if(c&&c.get(d._key))g=c.get(d._key);else{const b=(u.a0+u.a1)/2;g={a0:b,a1:b,iR:u.iR,oR:u.iR},x=!0}this._animateArc(d,g,u,a,!1,x,n)}}else if(d._el&&d._cur){const u=(d._cur.a0+d._cur.a1)/2,p={a0:u,a1:u,iR:d._cur.iR,oR:d._cur.iR};this._animateArc(d,d._cur,p,a,!0,!1,n)}});const h=new Map;this._nodesAll.forEach(d=>{d._show&&h.set(d._key,{a0:d._a0,a1:d._a1,iR:d._iR,oR:d._oR})}),this.ctx._sunburstPrevGeoms=h,this._renderLabels(a)}_morphSourceFor(t){const e=this.ctx,s=e&&e.morphTypeChange;return s?typeof s.hasKeyedMarks=="function"&&s.hasKeyedMarks()&&typeof s.getInitialPathForKey=="function"?s.getInitialPathForKey(Ee(t._key)):t.children&&t.children.length?null:s.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,s,i,a){const n=t._el,r=this._arcPath(s.iR,s.oR,s.a0,s.a1,this.cfg.borderRadius);n.node.style.display="",n.attr({d:e,opacity:1}),t._cur=s,this._zoomGen===a&&new ge(this.w,this.ctx).morphSVG(n,0,null,t._color,e,r,i,0)}_sweepArc(t,e,s,i){const a=t._el,n=this.cfg.borderRadius,r=this.startAngle,o=this.endAngle;a.node.style.display="",a.attr({d:"",opacity:1}),a.animate(s).during(l=>{if(this._zoomGen!==i)return;const c=r+(o-r)*l;if(c<=e.a0+.01){a.attr({d:""});return}const h=Math.min(e.a1,c);a.attr({d:this._arcPath(e.iR,e.oR,e.a0,h,n)}),t._cur={a0:e.a0,a1:h,iR:e.iR,oR:e.oR}}).after(()=>{this._zoomGen===i&&(t._cur=e)}
1956)}_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)),s.setAttribute("data:key",Ee(t._key)),s.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._attachTooltip(s,t),lt.isBrowser()&&(s.addEventListener("click",()=>this._zoomTo(t)),s.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,s,i,a,n,r){const o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),i===0){o.attr({d:this._arcPath(s.iR,s.oR,s.a0,s.a1,l),opacity:a?0:1}),o.node.style.display=a?"none":"",t._cur=a?null:s;return}o.node.style.display="";const c=a?Number(o.attr("opacity"))||1:n?0:1,h=a?0:1;o.attr({opacity:c}),o.animate(i).during(d=>{if(this._zoomGen!==r)return;const u=_e(e.a0,s.a0,d),p=_e(e.a1,s.a1,d),g=_e(e.iR,s.iR,d),x=_e(e.oR,s.oR,d);o.attr({d:this._arcPath(g,x,u,p,l),opacity:_e(c,h,d)}),t._cur={a0:u,a1:p,iR:g,oR:x}}).after(()=>{this._zoomGen===r&&(a?(o.node.style.display="none",t._cur=null):t._cur=s)})}_renderLabels(t){const e=this._labelsG;for(;e.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(!lt.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*nn: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,u=n?0:1,p=`apx-sb-lbl-${s.globals.cuid}-${this._lblSeq++}`,g=U.createElementNS(Is,"path");g.setAttribute("id",p),g.setAttribute("d",`M ${c.x} ${c.y} A ${i} ${i} 0 ${d} ${u} ${h.x} ${h.y}`),g.setAttribute("fill","none"),g.setAttribute("stroke","none");const x=e.colors,b=(Array.isArray(x)?x[0]:x)||"#fff",m=U.createElementNS(Is,"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=U.createElementNS(Is,"textPath");A.setAttribute("href","#"+p),A.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+p),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*Ue-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(!lt.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=U.createElementNS(ne,"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=U.createElementNS(ne,"span");l.setAttribute("class","apexcharts-breadcrumb-separator"),l.textContent=" / ",i.appendChild(l)}if(r===a.length-1){const l=U.createElementNS(ne,"span");l.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),l.textContent=n.name,i.appendChild(l)}else{const l=U.createElementNS(ne,"button");if(l.setAttribute("type","button"),l.setAttribute("class","apexcharts-breadcrumb-item"),r===0){const h=U.createElementNS(ne,"span");h.setAttribute("class","apexcharts-breadcrumb-arrow"),h.textContent="â",l.appendChild(h)}const c=U.createElementNS(ne,"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){Yr(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*Ue),y:this.centerY+t*Math.sin((e-90)*Ue)}}_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*nn,u=Math.min(d/2,Math.max(0,n/2-.25));s+=u,i-=u,n=i-s}if(n<=0)return"";const o=n*Ue,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?xi({cx:l,cy:c,rIn:t,rOut:e,a0:s,a1:i,r:h,spanDeg:n}):so({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||!lt.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)}}pt.use({line:Se,area:Se,scatter:Se,bubble:Se,rangeArea:Se,bar:ft,column:ft,barStacked:lu,rangeBar:Mu,candlestick:$a,boxPlot:$a,violin:pu,pie:Qe,donut:Qe,polarArea:Qe,radialBar:ku,radar:Cu,heatmap:xu,treemap:Nu,unit:Ju,sunburst:Qu});Object.defineProperty(pt,"__internals",{value:hh,enumerable:!1,writable:!1,
1956configurable:!1});const rn=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],vi=Ai({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:rn,setup(f,{emit:t}){const e=Ns(null),s=Ns(null),i=D=>D&&typeof D=="object"&&!Array.isArray(D)&&D!=null,a=(D,E)=>{typeof Object.assign!="function"&&(function(){Object.assign=function(P){if(P==null)throw new TypeError("Cannot convert undefined or null to object");let F=Object(P);for(let I=1;I<arguments.length;I++){let B=arguments[I];if(B!=null)for(let Y in B)B.hasOwnProperty(Y)&&(F[Y]=B[Y])}return F}})();let R=Object.assign({},D);return i(D)&&i(E)&&Object.keys(E).forEach(P=>{i(E[P])?P in D?R[P]=a(D[P],E[P]):Object.assign(R,{[P]:E[P]}):Object.assign(R,{[P]:E[P]})}),R},n=D=>JSON.parse(JSON.stringify(D)),r=()=>ee(null,null,function*(){if(yield zi(),s.value)return;const D={chart:{type:f.type||f.options.chart&&f.options.chart.type||"line",height:f.height,width:f.width,events:{}},series:n(f.series)},E=f.options.chart?f.options.chart.events:null;rn.forEach(P=>{let F=(...I)=>t(P,...I);D.chart.events[P]=(...I)=>{F(...I),E&&E.hasOwnProperty(P)&&E[P](...I)}});const R=a(f.options,D);return s.value=new pt(e.value,R),s.value.render()}),o=()=>(l(),r()),l=()=>{s.value.destroy(),s.value=null},c=(D,E)=>s.value.updateSeries(D,E),h=(D,E,R,P)=>s.value.updateOptions(D,E,R,P),d=D=>s.value.toggleSeries(D),u=D=>{s.value.showSeries(D)},p=D=>{s.value.hideSeries(D)},g=(D,E)=>s.value.appendSeries(D,E),x=()=>{s.value.resetSeries()},b=(D,E)=>{s.value.toggleDataPointSelection(D,E)},m=D=>s.value.appendData(D),A=(D,E)=>s.value.zoomX(D,E),v=D=>s.value.dataURI(D),y=D=>s.value.setLocale(D),w=(D,E)=>{s.value.addXaxisAnnotation(D,E)},S=(D,E)=>{s.value.addYaxisAnnotation(D,E)},_=(D,E)=>{s.value.addPointAnnotation(D,E)},k=(D,E)=>{s.value.removeAnnotation(D,E)},M=()=>{s.value.clearAnnotations()};ro(()=>{window.ApexCharts=pt}),hn(()=>{e.value=oo().proxy.$el,r()}),dn(()=>{s.value&&l()});const C=lo(f);let L=null;const T=D=>{L||(L={options:!1,series:!1},zi(()=>{const E=L;if(L=null,!s.value){r();return}if(E.options&&E.series){const R=n(f.options);R.series=n(f.series),s.value.updateOptions(R)}else E.options?s.value.updateOptions(n(f.options)):E.series&&s.value.updateSeries(n(f.series))})),L[D]=!0};return ye(C.options,()=>{T("options")}),ye(C.series,()=>{T("series")},{deep:!0}),ye(C.type,()=>{o()}),ye(C.width,()=>{o()}),ye(C.height,()=>{o()}),{chart:s,init:r,refresh:o,destroy:l,updateOptions:h,updateSeries:c,toggleSeries:d,showSeries:u,hideSeries:p,resetSeries:x,zoomX:A,toggleDataPointSelection:b,appendData:m,appendSeries:g,addXaxisAnnotation:w,addYaxisAnnotation:S,addPointAnnotation:_,removeAnnotation:k,clearAnnotations:M,setLocale:y,dataURI:v}},render(){return no("div",{class:"vue-apexcharts"})}}),tf=(f,t)=>{const e=f.__vccOpts||f;for(const[s,i]of t)e[s]=i;return e},ef=Ai({name:"apexchart-server",props:{type:{type:String,default:"line"},width:{type:[Number,String],default:400},height:{type:[Number,String],default:300},series:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})},className:{type:String,default:""}},setup(f){const t=Ns("");return fo(()=>ee(null,null,function*(){try{const{default:e}=yield cn(()=>ee(null,null,function*(){const{default:i}=yield import("./chunk.BaFRH6iwRCwM.js");return{default:i}}),[]),s=Object.assign({},f.options,{chart:Object.assign({},f.options.chart,{type:f.type,width:f.width,height:f.height}),series:f.series});t.value=yield e.renderToHTML(s,{width:f.width,height:f.height})}catch(e){console.error("Failed to render ApexChart on server:",e)}})),{chartHTML:t}}}),sf=["innerHTML"];function af(f,t,e,s,i,a){return co(),ho("div",{innerHTML:f.chartHTML,class:uo(f.className)},null,10,sf)}const on=tf(ef,[["render",af]]),ln=Ai({name:"apexchart-hydrate",props:{clientOptions:{type:Object,default:()=>({})},selector:{type:String,default:"[data-apexcharts-hydrate]"}},setup(f){let t=[];hn(()=>ee(null,null,function*(){try{const{default:e}=yield cn(()=>ee(null,null,function*(){const{default:s}=yield import("./chunk.BaFRH6iwRCwM.js");return{default:s}}),[]);t=e.hydrateAll(f.selector,f.clientOptions)}catch(e){console.error("Failed to hydrate ApexCharts:",e)}})),dn(()=>
1956{t.forEach(e=>{e&&e.destroy&&e.destroy()}),t=[]})},render(){return null}}),nf=f=>{f.component(vi.name,vi),f.component(on.name,on),f.component(ln.name,ln)};vi.install=nf;export{ln as ApexChartsHydrate,on as ApexChartsServer,vi as default}; 1957//# sourceMappingURL=chunk.C8m2kUo8qhDv.js.map
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.