PhyrePanel-mirror/web/public/js/app/components/apexcharts.js
2024-10-31 11:55:18 +02:00

800 lines
534 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Ci=Object.create;var vt=Object.defineProperty;var Li=Object.getOwnPropertyDescriptor;var Pi=Object.getOwnPropertyNames;var Mi=Object.getPrototypeOf,Ii=Object.prototype.hasOwnProperty;var yt=(p,e)=>()=>(e||p((e={exports:{}}).exports,e),e.exports);var Ti=(p,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Pi(e))!Ii.call(p,a)&&a!==t&&vt(p,a,{get:()=>e[a],enumerable:!(i=Li(e,a))||i.enumerable});return p};var zi=(p,e,t)=>(t=p!=null?Ci(Mi(p)):{},Ti(e||!p||!p.__esModule?vt(t,"default",{value:p,enumerable:!0}):t,p));var jt=yt((ot,We)=>{"use strict";function at(p,e){(e==null||e>p.length)&&(e=p.length);for(var t=0,i=Array(e);t<e;t++)i[t]=p[t];return i}function Pt(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function F(p,e){if(!(p instanceof e))throw new TypeError("Cannot call a class as a function")}function wt(p,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(p,Tt(i.key),i)}}function R(p,e,t){return e&&wt(p.prototype,e),t&&wt(p,t),Object.defineProperty(p,"prototype",{writable:!1}),p}function Ie(p){var e=Mt();return function(){var t,i=De(p);if(e){var a=De(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return function(s,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pt(s)}(this,t)}}function Oe(p,e,t){return(e=Tt(e))in p?Object.defineProperty(p,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):p[e]=t,p}function De(p){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(p)}function Te(p,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(e&&e.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),e&&st(p,e)}function Mt(){try{var p=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mt=function(){return!!p})()}function kt(p,e){var t=Object.keys(p);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(p);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(p,a).enumerable})),t.push.apply(t,i)}return t}function Y(p){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?kt(Object(t),!0).forEach(function(i){Oe(p,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(t)):kt(Object(t)).forEach(function(i){Object.defineProperty(p,i,Object.getOwnPropertyDescriptor(t,i))})}return p}function st(p,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},st(p,e)}function It(p,e){return function(t){if(Array.isArray(t))return t}(p)||function(t,i){var a=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(a!=null){var s,r,n,o,h=[],c=!0,d=!1;try{if(n=(a=a.call(t)).next,i===0){if(Object(a)!==a)return;c=!1}else for(;!(c=(s=n.call(a)).done)&&(h.push(s.value),h.length!==i);c=!0);}catch(g){d=!0,r=g}finally{try{if(!c&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(d)throw r}}return h}}(p,e)||zt(p,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function te(p){return function(e){if(Array.isArray(e))return at(e)}(p)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(p)||zt(p)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Tt(p){var e=function(t,i){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var s=a.call(t,i||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}(p,"string");return typeof e=="symbol"?e:e+""}function J(p){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(p)}function zt(p,e){if(p){if(typeof p=="string")return at(p,e);var t={}.toString.call(p).slice(8,-1);return t==="Object"&&p.constructor&&(t=p.constructor.name),t==="Map"||t==="Set"?Array.from(p):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?at(p,e):void 0}}var P=function(){function p(){F(this,p)}return R(p,[{key:"shadeRGBColor",value:function(e,t){var i=t.split(","),a=e<0?0:255,s=e<0?-1*e:e,r=parseInt(i[0].slice(4),10),n=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((a-r)*s)+r)+","+(Math.round((a-n)*s)+n)+","+(Math.round((a-o)*s)+o)+")"}},{key:"shadeHexColor",value:function(e,t){var i=parseInt(t.slice(1),16),a=e<0?0:255,s=e<0?-1*e:e,r=i>>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return p.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&J(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t<e.length;t++)i[t]=e[t];return i}},{key:"extend",value:function(e,t){var i=this;typeof Object.assign!="function"&&(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(s),n=1;n<arguments.length;n++){var o=arguments[n];if(o!=null)for(var h in o)o.hasOwnProperty(h)&&(r[h]=o[h])}return r});var a=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(function(s){i.isObject(t[s])&&s in e?a[s]=i.extend(e[s],t[s]):Object.assign(a,Oe({},s,t[s]))}),a}},{key:"extendArray",value:function(e,t){var i=[];return e.map(function(a){i.push(p.extend(t,a))}),e=i}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){if(p.is("Array",e)){for(var t=[],i=0;i<e.length;i++)t[i]=this.clone(e[i]);return t}if(p.is("Null",e))return null;if(p.is("Date",e))return e;if(J(e)==="object"){var a={};for(var s in e)e.hasOwnProperty(s)&&(a[s]=this.clone(e[s]));return a}return e}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(t.length===1)return t[0];var i="",a=e<0?"-":"",s=t[0].replace(".",""),r=Number(t[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,a=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(t,i){return Array.isArray(i)&&(i=i.reduce(function(a,s){return a.length>s.length?a:s})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a<i.length;a++)i[a]=parseInt(i[a].length===1?i[a]+i[a]:i[a],16);return t!==void 0&&i.push(t),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var i=[],a=2*Math.PI/t,s=0;s<t;s++){var r={};r.x=e*Math.sin(s*a),r.y=-e*Math.cos(s*a),i.push(r)}return i}},{key:"polarToCartesian",value:function(e,t,i,a){var s=(a-90)*Math.PI/180;return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",i=e.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"preciseAddition",value:function(e,t){var i=(String(e).split(".")[1]||"").length,a=(String(t).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(e*s)+Math.round(t*s))/s}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,t=e.indexOf("Edge/");return t>0&&parseInt(e.substring(t+5,e.indexOf(".",t)),10)}},{key:"getGCD",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,t))));for(e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a);t;){var s=t;t=e%t,e=s}return e/a}},{key:"getPrimeFactors",value:function(e){for(var t=[],i=2;e>=2;)e%i==0?(t.push(i),e/=i):i++;return t}},{key:"mod",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*a))%(t=Math.round(Math.abs(t)*a))/a}}]),p}(),ve=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return R(p,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(t){var i=1.70158;return(t-=1)*t*((i+1)*t+i)+1};break;case"bounce":e=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":e=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a){e.attr({opacity:0}).animate(t,i).attr({opacity:1}).afterAll(function(){a()})}},{key:"animateRect",value:function(e,t,i,a,s){e.attr(t).animate(a).attr(i).afterAll(function(){return s()})}},{key:"animatePathsGradually",value:function(e){var t=e.el,i=e.realIndex,a=e.j,s=e.fill,r=e.pathFrom,n=e.pathTo,o=e.speed,h=e.delay,c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&c.config.chart.type!=="bar"&&(d=0),this.morphSVG(t,i,a,c.config.chart.type!=="line"||c.globals.comboCharts?s:"stroke",r,n,o,h*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd=="function"&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,s,r,n,o){var h=this,c=this.w;s||(s=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var d=function(g){return c.config.chart.type==="radar"&&(n=1),"M 0 ".concat(c.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),c.globals.shouldAnimate||(n=1),e.plot(s).animate(1,c.globals.easing,o).plot(s).animate(n,c.globals.easing,o).plot(r).afterAll(function(){P.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&h.animationCompleted(e):a!=="none"&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),p}(),ie=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),new window.SVG.Filter().size("120%","180%","-5%","-40%"),i.config.states.normal.filter!=="none"?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var a=this,s=this.w,r=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,s=this.w,r=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:r}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:a});break;case"darken":this.addDarkenFilter(e,t,{intensity:a})}}},{key:"addShadow",value:function(e,t,i){var a,s=this.w,r=i.blur,n=i.top,o=i.left,h=i.color,c=i.opacity;if(((a=s.config.chart.dropShadow.enabledOnSeries)===null||a===void 0?void 0:a.length)>0&&s.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;var d=e.flood(Array.isArray(h)?h[t]:h,c).composite(e.sourceAlpha,"in").offset(o,n).gaussianBlur(r).merge(e.source);return e.blend(e.source,d)}},{key:"dropShadow",value:function(e,t){var i,a,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=t.top,n=t.left,o=t.blur,h=t.color,c=t.opacity,d=t.noUserSpaceOnUse,g=this.w;return e.unfilter(!0),P.isMsEdge()&&g.config.chart.type==="radialBar"||((i=g.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.length)>0&&((a=g.config.chart.dropShadow.enabledOnSeries)===null||a===void 0?void 0:a.indexOf(s))===-1||(h=Array.isArray(h)?h[s]:h,e.filter(function(f){var x=null;x=P.isSafari()||P.isFirefox()||P.isMsEdge()?f.flood(h,c).composite(f.sourceAlpha,"in").offset(n,r).gaussianBlur(o):f.flood(h,c).composite(f.sourceAlpha,"in").offset(n,r).gaussianBlur(o).merge(f.source),f.blend(f.source,x)}),d||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(a.globals.selectedDataPoints[t]!==void 0&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var s=a.config.states.active.filter;s!=="none"&&this.applyFilter(e,t,s.type,s.value)}}},{key:"_scaleFilterSize",value:function(e){(function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),p}(),X=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"roundPathCorners",value:function(e,t){function i(S,L,C){var I=L.x-S.x,z=L.y-S.y,M=Math.sqrt(I*I+z*z);return a(S,L,Math.min(1,C/M))}function a(S,L,C){return{x:S.x+(L.x-S.x)*C,y:S.y+(L.y-S.y)*C}}function s(S,L){S.length>2&&(S[S.length-2]=L.x,S[S.length-1]=L.y)}function r(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}e.indexOf("NaN")>-1&&(e="");var n=e.split(/[,\s]/).reduce(function(S,L){var C=L.match("([a-zA-Z])(.+)");return C?(S.push(C[1]),S.push(C[2])):S.push(L),S},[]).reduce(function(S,L){return parseFloat(L)==L&&S.length?S[S.length-1].push(L):S.push([L]),S},[]),o=[];if(n.length>1){var h=r(n[0]),c=null;n[n.length-1][0]=="Z"&&n[0].length>2&&(c=["L",h.x,h.y],n[n.length-1]=c),o.push(n[0]);for(var d=1;d<n.length;d++){var g=o[o.length-1],f=n[d],x=f==c?n[1]:n[d+1];if(x&&g&&g.length>2&&f[0]=="L"&&x.length>2&&x[0]=="L"){var b,v,y=r(g),w=r(f),l=r(x);b=i(w,y,t),v=i(w,l,t),s(f,b),f.origPoint=w,o.push(f);var u=a(b,w,.5),m=a(w,v,.5),A=["C",u.x,u.y,m.x,m.y,v.x,v.y];A.origPoint=w,o.push(A)}else o.push(f)}if(c){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce(function(S,L){return S+L.join(" ")+" "},"")}},{key:"drawLine",value:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,c=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":o!==null?o:0,stroke:h!==null?h:"none","stroke-dasharray":c}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i})}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return t!==null&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=t===void 0?"":t,a=e.stroke,s=a===void 0?"#a8a8a8":a,r=e.strokeWidth,n=r===void 0?1:r,o=e.fill,h=e.fillOpacity,c=h===void 0?1:h,d=e.strokeOpacity,g=d===void 0?1:d,f=e.classes,x=e.strokeLinecap,b=x===void 0?null:x,v=e.strokeDashArray,y=v===void 0?0:v,w=this.w;return b===null&&(b=w.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(w.globals.gridHeight)),w.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:s,"stroke-opacity":g,"stroke-linecap":b,"stroke-width":n,"stroke-dasharray":y,class:f})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=this.w.globals.dom.Paper.group();return e!==null&&t.attr(e),t}},{key:"move",value:function(e,t){var i=["M",e,t].join(" ");return i}},{key:"line",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=null;return i===null?a=[" L",e,t].join(" "):i==="H"?a=[" H",e].join(" "):i==="V"&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,s,r){var n=["C",e,t,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,s,r,n){var o="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(o="a");var h=[o,e,t,i,a,s,r,n].join(" ");return h}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,s=e.pathFrom,r=e.pathTo,n=e.stroke,o=e.strokeWidth,h=e.strokeLinecap,c=e.fill,d=e.animationDelay,g=e.initialSpeed,f=e.dataChangeSpeed,x=e.className,b=e.shouldClipToGrid,v=b===void 0||b,y=e.bindEventsOnPaths,w=y===void 0||y,l=e.drawShadow,u=l===void 0||l,m=this.w,A=new ie(this.ctx),k=new ve(this.ctx),S=this.w.config.chart.animations.enabled,L=S&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(S&&!m.globals.resized||L&&m.globals.dataChanged&&m.globals.shouldAnimate);C?t=s:(t=r,m.globals.animationEnded=!0);var I=m.config.stroke.dashArray,z=0;z=Array.isArray(I)?I[a]:m.config.stroke.dashArray;var M=this.drawPath({d:t,stroke:n,strokeWidth:o,fill:c,fillOpacity:1,classes:x,strokeLinecap:h,strokeDashArray:z});if(M.attr("index",a),v&&M.attr({"clip-path":"url(#gridRectMask".concat(m.globals.cuid,")")}),m.config.states.normal.filter.type!=="none")A.getDefaultFilter(M,a);else if(m.config.chart.dropShadow.enabled&&u){var T=m.config.chart.dropShadow;A.dropShadow(M,T,a)}w&&(M.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,M)),M.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,M)),M.node.addEventListener("mousedown",this.pathMouseDown.bind(this,M))),M.attr({pathTo:r,pathFrom:s});var E={el:M,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:c,strokeWidth:o,delay:d};return!S||m.globals.resized||m.globals.dataChanged?!m.globals.resized&&m.globals.dataChanged||k.showDelayedElements():k.animatePathsGradually(Y(Y({},E),{},{speed:g})),m.globals.dataChanged&&L&&C&&k.animatePathsGradually(Y(Y({},E),{},{speed:f})),M}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(r){e==="horizontalLines"?r.line(0,0,i,0).stroke({color:a,width:s+1}):e==="verticalLines"?r.line(0,0,0,t).stroke({color:a,width:s+1}):e==="slantedLines"?r.line(0,0,t,i).stroke({color:a,width:s}):e==="squares"?r.rect(t,i).fill("none").stroke({color:a,width:s}):e==="circles"&&r.circle(t).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(e,t,i,a,s){var r,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,c=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,d=this.w;t.length<9&&t.indexOf("#")===0&&(t=P.hexToRgba(t,a)),i.length<9&&i.indexOf("#")===0&&(i=P.hexToRgba(i,s));var g=0,f=1,x=1,b=null;o!==null&&(g=o[0]!==void 0?o[0]/100:0,f=o[1]!==void 0?o[1]/100:1,x=o[2]!==void 0?o[2]/100:1,b=o[3]!==void 0?o[3]/100:null);var v=!(d.config.chart.type!=="donut"&&d.config.chart.type!=="pie"&&d.config.chart.type!=="polarArea"&&d.config.chart.type!=="bubble");if(r=h===null||h.length===0?d.globals.dom.Paper.gradient(v?"radial":"linear",function(l){l.at(g,t,a),l.at(f,i,s),l.at(x,i,s),b!==null&&l.at(b,t,a)}):d.globals.dom.Paper.gradient(v?"radial":"linear",function(l){(Array.isArray(h[c])?h[c]:h).forEach(function(u){l.at(u.offset/100,u.color,u.opacity)})}),v){var y=d.globals.gridWidth/2,w=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:w,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?r.from(0,0).to(0,1):e==="diagonal"?r.from(0,0).to(1,1):e==="horizontal"?r.from(0,1).to(1,1):e==="diagonal2"&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,a=e.fontSize,s=e.fontFamily,r=this.getTextRects(t,a,s),n=r.width/t.length,o=Math.floor(i/n);return i<r.width?t.slice(0,o-3)+"...":t}},{key:"drawText",value:function(e){var t=this,i=e.x,a=e.y,s=e.text,r=e.textAnchor,n=e.fontSize,o=e.fontFamily,h=e.fontWeight,c=e.foreColor,d=e.opacity,g=e.maxWidth,f=e.cssClass,x=f===void 0?"":f,b=e.isPlainText,v=b===void 0||b,y=e.dominantBaseline,w=y===void 0?"auto":y,l=this.w;s===void 0&&(s="");var u=s;r||(r="start"),c&&c.length||(c=l.config.chart.foreColor),o=o||l.config.chart.fontFamily,h=h||"regular";var m,A={maxWidth:g,fontSize:n=n||"11px",fontFamily:o};return Array.isArray(s)?m=l.globals.dom.Paper.text(function(k){for(var S=0;S<s.length;S++)u=s[S],g&&(u=t.getTextBasedOnMaxWidth(Y({text:s[S]},A))),S===0?k.tspan(u):k.tspan(u).newLine()}):(g&&(u=this.getTextBasedOnMaxWidth(Y({text:s},A))),m=v?l.globals.dom.Paper.plain(s):l.globals.dom.Paper.text(function(k){return k.tspan(u)})),m.attr({x:i,y:a,"text-anchor":r,"dominant-baseline":w,"font-size":n,"font-family":o,"font-weight":h,fill:c,class:"apexcharts-text "+x}),m.node.style.fontFamily=o,m.node.style.opacity=d,m}},{key:"getMarkerPath",value:function(e,t,i,a){var s="";switch(i){case"cross":s="M ".concat(e-(a/=1.4)," ").concat(t-a," L ").concat(e+a," ").concat(t+a," M ").concat(e-a," ").concat(t+a," L ").concat(e+a," ").concat(t-a);break;case"plus":s="M ".concat(e-(a/=1.12)," ").concat(t," L ").concat(e+a," ").concat(t," M ").concat(e," ").concat(t-a," L ").concat(e," ").concat(t+a);break;case"star":case"sparkle":var r=5;a*=1.15,i==="sparkle"&&(a/=1.1,r=4);for(var n=Math.PI/r,o=0;o<=2*r;o++){var h=o*n,c=o%2==0?a:a/2;s+=(o===0?"M":"L")+(e+c*Math.sin(h))+","+(t-c*Math.cos(h))}s+="Z";break;case"triangle":s="M ".concat(e," ").concat(t-a,`
L `).concat(e+a," ").concat(t+a,`
L `).concat(e-a," ").concat(t+a,`
Z`);break;case"square":case"rect":s="M ".concat(e-(a/=1.125)," ").concat(t-a,`
L `).concat(e+a," ").concat(t-a,`
L `).concat(e+a," ").concat(t+a,`
L `).concat(e-a," ").concat(t+a,`
Z`);break;case"diamond":a*=1.05,s="M ".concat(e," ").concat(t-a,`
L `).concat(e+a," ").concat(t,`
L `).concat(e," ").concat(t+a,`
L `).concat(e-a," ").concat(t,`
Z`);break;case"line":s="M ".concat(e-(a/=1.1)," ").concat(t,`
L `).concat(e+a," ").concat(t);break;default:a*=2,s="M ".concat(e,", ").concat(t,`
m -`).concat(a/2,`, 0
a `).concat(a/2,",").concat(a/2," 0 1,0 ").concat(a,`,0
a `).concat(a/2,",").concat(a/2," 0 1,0 -").concat(a,",0")}return s}},{key:"drawMarkerShape",value:function(e,t,i,a,s){var r=this.drawPath({d:this.getMarkerPath(e,t,i,a,s),stroke:s.pointStrokeColor,strokeDashArray:s.pointStrokeDashArray,strokeWidth:s.pointStrokeWidth,fill:s.pointFillColor,fillOpacity:s.pointFillOpacity,strokeOpacity:s.pointStrokeOpacity});return r.attr({cx:e,cy:t,shape:s.shape,class:s.class?s.class:""}),r}},{key:"drawMarker",value:function(e,t,i){e=e||0;var a=i.pSize||0;return P.isNumber(t)||(a=0,t=0),this.drawMarkerShape(e,t,i?.shape,a,Y(Y({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,t){var i=this.w,a=new ie(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof i.config.chart.events.dataPointMouseEnter=="function"&&i.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),(i.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&i.config.states.hover.filter.type!=="none"&&!i.globals.isTouchDevice){var n=i.config.states.hover.filter;a.applyFilter(e,s,n.type,n.value)}}},{key:"pathMouseLeave",value:function(e,t){var i=this.w,a=new ie(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof i.config.chart.events.dataPointMouseLeave=="function"&&i.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:s,dataPointIndex:r,w:i}]),i.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||i.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,s)}},{key:"pathMouseDown",value:function(e,t){var i=this.w,a=new ie(this.ctx),s=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10),n="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].indexOf(r)>-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var h=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(x){Array.prototype.forEach.call(x,function(b){b.node.setAttribute("selected","false"),a.getDefaultFilter(b,s)})};d(h),d(c)}e.node.setAttribute("selected","true"),n="true",i.globals.selectedDataPoints[s]===void 0&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if(n==="true"){var g=i.config.states.active.filter;if(g!=="none")a.applyFilter(e,s,g.type,g.value);else if(i.config.states.hover.filter!=="none"&&!i.globals.isTouchDevice){var f=i.config.states.hover.filter;a.applyFilter(e,s,f.type,f.value)}}else i.config.states.active.filter.type!=="none"&&(i.config.states.hover.filter.type==="none"||i.globals.isTouchDevice?a.getDefaultFilter(e,s):(f=i.config.states.hover.filter,a.applyFilter(e,s,f.type,f.value)));typeof i.config.chart.events.dataPointSelection=="function"&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&typeof e.getBBox=="function"&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var s=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if(typeof e.getComputedTextLength=="function"&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),p}(),$=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=this.w,i=[];if(t.globals.series.length===0)return i;for(var a=0;a<t.globals.series[t.globals.maxValsInArrayIndex].length;a++){for(var s=0,r=0;r<t.globals.series.length;r++)t.globals.series[r][a]!==void 0&&e.indexOf(r)===-1&&(s+=t.globals.series[r][a]);i.push(s)}return i}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,t=this.w,i=[];return t.globals.seriesGroups.forEach(function(a){var s=[];t.config.series.forEach(function(n,o){a.indexOf(t.globals.seriesNames[o])>-1&&s.push(o)});var r=t.globals.series.map(function(n,o){return s.indexOf(o)===-1?o:-1}).filter(function(n){return n!==-1});i.push(e.getStackedSeriesTotals(r))}),i}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],s=[],r=e.series.length>t.yaxis.length||t.yaxis.some(function(d){return Array.isArray(d.seriesName)});t.series.forEach(function(d,g){s.push(g),a.push(null)}),t.yaxis.forEach(function(d,g){i[g]=[]});var n=[];t.yaxis.forEach(function(d,g){var f=!1;if(d.seriesName){var x=[];Array.isArray(d.seriesName)?x=d.seriesName:x.push(d.seriesName),x.forEach(function(b){t.series.forEach(function(v,y){if(v.name===b){var w=y;g===y||r?!r||s.indexOf(y)>-1?i[g].push([g,y]):console.warn("Series '"+v.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."):(i[y].push([y,g]),w=g),f=!0,(w=s.indexOf(w))!==-1&&s.splice(w,1)}})})}f||n.push(g)}),i=i.map(function(d,g){var f=[];return d.forEach(function(x){a[x[1]]=x[0],f.push(x[1])}),f});for(var o=t.yaxis.length-1,h=0;h<n.length&&(o=n[h],i[o]=[],s);h++){var c=s[0];s.shift(),i[o].push(c),a[c]=o}s.forEach(function(d){i[o].push(d),a[d]=o}),e.seriesYAxisMap=i.map(function(d){return d}),e.seriesYAxisReverseMap=a.map(function(d){return d}),e.seriesYAxisMap.forEach(function(d,g){d.forEach(function(f){t.series[f]&&t.series[f].group===void 0&&(t.series[f].group="apexcharts-axis-".concat(g.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(t){return t!==null}):this.w.config.series[e].data.filter(function(t){return t!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,s){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){t=Math.max(t,i.size)}),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var s=0;s<t.length;s++)a+=t[s];else a+=t;return a})}},{key:"getSeriesTotalsXRange",value:function(e,t){var i=this.w;return i.globals.series.map(function(a,s){for(var r=0,n=0;n<a.length;n++)i.globals.seriesX[s][n]>e&&i.globals.seriesX[s][n]<t&&(r+=a[n]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(t,i){var a=[];if(Array.isArray(t))for(var s=0;s<t.length;s++){var r=e.globals.stackedSeriesTotals[s],n=0;r&&(n=100*t[s]/r),a.push(n)}else{var o=100*t/e.globals.seriesTotals.reduce(function(h,c){return h+c},0);a.push(o)}return a})}},{key:"getCalculatedRatios",value:function(){var e,t,i,a=this,s=this.w,r=s.globals,n=[],o=0,h=[],c=.1,d=0;if(r.yRange=[],r.isMultipleYAxis)for(var g=0;g<r.minYArr.length;g++)r.yRange.push(Math.abs(r.minYArr[g]-r.maxYArr[g])),h.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var f=0;f<r.yRange.length;f++)n.push(r.yRange[f]/r.gridHeight);if(t=r.xRange/r.gridWidth,e=r.yRange/r.gridWidth,i=r.xRange/r.gridHeight,(o=r.zRange/r.gridHeight*16)||(o=1),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(r.hasNegs=!0),s.globals.seriesYAxisReverseMap.length>0){var x=function(v,y){var w=s.config.yaxis[s.globals.seriesYAxisReverseMap[y]],l=v<0?-1:1;return v=Math.abs(v),w.logarithmic&&(v=a.getBaseLog(w.logBase,v)),-l*v/n[y]};if(r.isMultipleYAxis){h=[];for(var b=0;b<n.length;b++)h.push(x(r.minYArr[b],b))}else(h=[]).push(x(r.minY,0)),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(c=-r.minY/e,d=r.minX/t)}else(h=[]).push(0),c=0,d=0;return{yRatio:n,invertedYRatio:e,zRatio:o,xRatio:t,invertedXRatio:i,baseLineInvertedY:c,baseLineY:h,baseLineX:d}}},{key:"getLogSeries",value:function(e){var t=this,i=this.w;return i.globals.seriesLog=e.map(function(a,s){var r=i.globals.seriesYAxisReverseMap[s];return i.config.yaxis[r]&&i.config.yaxis[r].logarithmic?a.map(function(n){return n===null?null:t.getLogVal(i.config.yaxis[r].logBase,n,s)}):a}),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getBaseLog",value:function(e,t){return Math.log(t)/Math.log(e)}},{key:"getLogVal",value:function(e,t,i){if(t<=0)return 0;var a=this.w,s=a.globals.minYArr[i]===0?-1:this.getBaseLog(e,a.globals.minYArr[i]),r=(a.globals.maxYArr[i]===0?0:this.getBaseLog(e,a.globals.maxYArr[i]))-s;return t<1?t/r:(this.getBaseLog(e,t)-s)/r}},{key:"getLogYRatios",value:function(e){var t=this,i=this.w,a=this.w.globals;return a.yLogRatio=e.slice(),a.logYRange=a.yRange.map(function(s,r){var n=i.globals.seriesYAxisReverseMap[r];if(i.config.yaxis[n]&&t.w.config.yaxis[n].logarithmic){var o,h=-Number.MAX_VALUE,c=Number.MIN_VALUE;return a.seriesLog.forEach(function(d,g){d.forEach(function(f){i.config.yaxis[g]&&i.config.yaxis[g].logarithmic&&(h=Math.max(f,h),c=Math.min(f,c))})}),o=Math.pow(a.yRange[r],Math.abs(c-h)/a.yRange[r]),a.yLogRatio[r]=o/a.gridHeight,o}}),a.invalidLogScale?e.slice():a.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,t,i,a){var s=this.w,r=[];return e.series.length>0&&t.forEach(function(n){var o=[],h=[];e.i.forEach(function(c,d){s.config.series[c].group===n&&(o.push(e.series[d]),h.push(c))}),o.length>0&&r.push(a.draw(o,i,h))}),r}}],[{key:"checkComboSeries",value:function(e,t){var i=!1,a=0,s=0;return t===void 0&&(t="line"),e.length&&e[0].type!==void 0&&e.forEach(function(r){r.type!=="bar"&&r.type!=="column"&&r.type!=="candlestick"&&r.type!=="boxPlot"||a++,r.type!==void 0&&r.type!==t&&s++}),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(e,t,i){var a,s,r,n,o,h;return(a=t)!==null&&a!==void 0&&a.yaxis&&(t=e.extendYAxis(t,i)),(s=t)!==null&&s!==void 0&&s.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),(r=t)!==null&&r!==void 0&&(n=r.annotations)!==null&&n!==void 0&&n.xaxis&&(t=e.extendXAxisAnnotations(t)),(o=t)!==null&&o!==void 0&&(h=o.annotations)!==null&&h!==void 0&&h.points&&(t=e.extendPointAnnotations(t))),t}}]),p}(),Be=function(){function p(e){F(this,p),this.w=e.w,this.annoCtx=e}return R(p,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.w;if(e.label.orientation==="vertical"){var a=t!==null?t:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(s!==null){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4),e.label.position==="top"?s.setAttribute("y",parseFloat(s.getAttribute("y"))+r.width):s.setAttribute("y",parseFloat(s.getAttribute("y"))-r.width);var n=this.annoCtx.graphics.rotateAroundCenter(s),o=n.x,h=n.y;s.setAttribute("transform","rotate(-90 ".concat(o," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||t.label.text===void 0||t.label.text!==void 0&&!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=e.getBoundingClientRect(),r=t.label.style.padding.left,n=t.label.style.padding.right,o=t.label.style.padding.top,h=t.label.style.padding.bottom;t.label.orientation==="vertical"&&(o=t.label.style.padding.left,h=t.label.style.padding.right,r=t.label.style.padding.top,n=t.label.style.padding.bottom);var c=s.left-a.left-r,d=s.top-a.top-o,g=this.annoCtx.graphics.drawRect(c-i.globals.barPadForNumericAxis,d,s.width+r+n,s.height+o+h,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,s,r){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(s,"']"));if(n){var o=n.parentNode,h=e.addBackgroundToAnno(n,a);h&&(o.insertBefore(h.node,n),a.label.mouseEnter&&h.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&h.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&h.node.addEventListener("click",a.label.click.bind(e,a)))}};t.config.annotations.xaxis.map(function(a,s){i(a,s,"xaxis")}),t.config.annotations.yaxis.map(function(a,s){i(a,s,"yaxis")}),t.config.annotations.points.map(function(a,s){i(a,s,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a=e==="y1"?t.y:t.y2,s=!1,r=this.w;if(this.annoCtx.invertAxis){var n=r.globals.labels;r.config.xaxis.convertedCatToNumeric&&(n=r.globals.categoryLabels);var o=n.indexOf(a),h=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(o+1)+")");i=h?parseFloat(h.getAttribute("y")):(r.globals.gridHeight/n.length-1)*(o+1)-r.globals.barHeight,t.seriesIndex!==void 0&&r.globals.barHeight&&(i=i-r.globals.barHeight/2*(r.globals.series.length-1)+r.globals.barHeight*t.seriesIndex)}else{var c,d=r.globals.seriesYAxisMap[t.yAxisIndex][0];r.config.yaxis[t.yAxisIndex].logarithmic?c=(a=new $(this.annoCtx.ctx).getLogVal(r.config.yaxis[t.yAxisIndex].logBase,a,d))/r.globals.yLogRatio[d]:c=(a-r.globals.minYArr[d])/(r.globals.yRange[d]/r.globals.gridHeight),c>r.globals.gridHeight?(c=r.globals.gridHeight,s=!0):c<0&&(c=0,s=!0),i=r.globals.gridHeight-c,!t.marker||t.y!==void 0&&t.y!==null||(i=0),r.config.yaxis[t.yAxisIndex]&&r.config.yaxis[t.yAxisIndex].reversed&&(i=c)}return typeof a=="string"&&a.indexOf("px")>-1&&(i=parseFloat(a)),{yP:i,clipped:s}}},{key:"getX1X2",value:function(e,t){var i,a=e==="x1"?t.x:t.x2,s=this.w,r=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,n=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,o=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange,h=!1;return i=this.annoCtx.inversedReversedAxis?(n-a)/(o/s.globals.gridWidth):(a-r)/(o/s.globals.gridWidth),s.config.xaxis.type!=="category"&&!s.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||s.globals.dataFormatXNumeric||s.config.chart.sparkline.enabled||(i=this.getStringX(a)),typeof a=="string"&&a.indexOf("px")>-1&&(i=parseFloat(a)),a==null&&t.marker&&(i=s.globals.gridWidth),t.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(i=i-s.globals.barWidth/2*(s.globals.series.length-1)+s.globals.barWidth*t.seriesIndex),i>s.globals.gridWidth?(i=s.globals.gridWidth,h=!0):i<0&&(i=0,h=!0),{x:i,clipped:h}}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.indexOf(e),s=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),p}(),Xi=function(){function p(e){F(this,p),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Be(this.annoCtx)}return R(p,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,s=this.w,r=this.helpers.getX1X2("x1",e),n=r.x,o=r.clipped,h=!0,c=e.label.text,d=e.strokeDashArray;if(P.isNumber(n)){if(e.x2===null||e.x2===void 0){if(!o){var g=this.annoCtx.graphics.drawLine(n+e.offsetX,0+e.offsetY,n+e.offsetX,s.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id)}}else{var f=this.helpers.getX1X2("x2",e);if(a=f.x,h=f.clipped,!o||!h){if(a<n){var x=n;n=a,a=x}var b=this.annoCtx.graphics.drawRect(n+e.offsetX,0+e.offsetY,a-n,s.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,d);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),t.appendChild(b.node),e.id&&b.node.classList.add(e.id)}}if(!o||!h){var v=this.annoCtx.graphics.getTextRects(c,parseFloat(e.label.style.fontSize)),y=e.label.position==="top"?4:e.label.position==="center"?s.globals.gridHeight/2+(e.label.orientation==="vertical"?v.width/2:0):s.globals.gridHeight,w=this.annoCtx.graphics.drawText({x:n+e.label.offsetX,y:y+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?v.width/2-12:-v.width/2:0),text:c,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});w.attr({rel:i}),t.appendChild(w.node),this.annoCtx.helpers.setOrientations(e,i)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map(function(a,s){e.addXaxisAnnotation(a,i.node,s)}),i}}]),p}(),K=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,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]}return R(p,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(te(i.months)),r=[""].concat(te(i.shortMonths)),n=[""].concat(te(i.days)),o=[""].concat(te(i.shortDays));function h(S,L){var C=S+"";for(L=L||2;C.length<L;)C="0"+C;return C}var c=a?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var d=(a?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+s[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+h(d))).replace(/(^|[^\\])M/g,"$1"+d);var g=a?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+n[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+h(g))).replace(/(^|[^\\])d/g,"$1"+g);var f=a?e.getUTCHours():e.getHours(),x=f>12?f-12:f===0?12:f;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+h(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+h(x))).replace(/(^|[^\\])h/g,"$1"+x);var b=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+h(b))).replace(/(^|[^\\])m/g,"$1"+b);var v=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+h(v))).replace(/(^|[^\\])s/g,"$1"+v);var y=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+h(y,3)),y=Math.round(y/10),t=t.replace(/(^|[^\\])ff/g,"$1"+h(y)),y=Math.round(y/10);var w=f<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+y)).replace(/(^|[^\\])TT+/g,"$1"+w)).replace(/(^|[^\\])T/g,"$1"+w.charAt(0));var l=w.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+l)).replace(/(^|[^\\])t/g,"$1"+l.charAt(0));var u=-e.getTimezoneOffset(),m=a||!u?"Z":u>0?"+":"-";if(!a){var A=(u=Math.abs(u))%60;m+=h(Math.floor(u/60))+":"+h(A)}t=t.replace(/(^|[^\\])K/g,"$1"+m);var k=(a?e.getUTCDay():e.getDay())+1;return t=(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[k])).replace(new RegExp(o[0],"g"),o[k])).replace(new RegExp(s[0],"g"),s[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;a.config.xaxis.min!==void 0&&(e=a.config.xaxis.min),a.config.xaxis.max!==void 0&&(t=a.config.xaxis.max);var s=this.getDate(e),r=this.getDate(t),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=P.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),p}(),ze=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return R(p,[{key:"xLabelFormat",value:function(e,t,i,a){var s=this.w;if(s.config.xaxis.type==="datetime"&&s.config.xaxis.labels.formatter===void 0&&s.config.tooltip.x.formatter===void 0){var r=new K(this.ctx);return r.formatDate(r.getDate(t),s.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;if(P.isNumber(e))if(a.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat!==void 0?t.decimalsInFloat:a.globals.yValueDecimal);else{var s=e.toFixed(0);e=e==s?s:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.config.xaxis.labels.formatter!==void 0?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(i){if(P.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(P.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return a>0&&a<100?i.toFixed(1):i.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?i.toFixed(1):i.toFixed(0)}return i},typeof t.config.tooltip.x.formatter=="function"?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(t.globals.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){i.labels.formatter!==void 0?t.globals.yLabelFormatters[a]=i.labels.formatter:t.globals.yLabelFormatters[a]=function(s){return t.globals.xyCharts?Array.isArray(s)?s.map(function(r){return e.defaultYFormatter(r,i,a)}):e.defaultYFormatter(s,i,a):s}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),p}(),ge=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"getLabel",value:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",n=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],o=this.w,h=e[a]===void 0?"":e[a],c=h,d=o.globals.xLabelFormatter,g=o.config.xaxis.labels.formatter,f=!1,x=new ze(this.ctx),b=h;n&&(c=x.xLabelFormat(d,h,b,{i:a,dateFormatter:new K(this.ctx).formatDate,w:o}),g!==void 0&&(c=g(h,e[a],{i:a,dateFormatter:new K(this.ctx).formatDate,w:o})));var v,y;t.length>0?(v=t[a].unit,y=null,t.forEach(function(m){m.unit==="month"?y="year":m.unit==="day"?y="month":m.unit==="hour"?y="day":m.unit==="minute"&&(y="hour")}),f=y===v,i=t[a].position,c=t[a].value):o.config.xaxis.type==="datetime"&&g===void 0&&(c=""),c===void 0&&(c=""),c=Array.isArray(c)?c:c.toString();var w=new X(this.ctx),l={};l=o.globals.rotateXLabels&&n?w.getTextRects(c,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):w.getTextRects(c,parseInt(r,10));var u=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(String(c)==="NaN"||s.indexOf(c)>=0&&u)&&(c=""),{x:i,text:c,textRect:l,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,s=a.config.xaxis.tickAmount;return s==="dataPoints"&&(s=Math.round(a.globals.gridWidth/120)),s>i||e%Math.round(i/(s+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,s){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(t.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];t.x<n.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+n.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&t.reverse(),t}},{key:"yAxisAllSeriesCollapsed",value:function(e){var t=this.w.globals;return!t.seriesYAxisMap[e].some(function(i){return t.collapsedSeriesIndices.indexOf(i)===-1})}},{key:"translateYAxisIndex",value:function(e){var t=this.w,i=t.globals,a=t.config.yaxis;return i.series.length>a.length||a.some(function(s){return Array.isArray(s.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=t.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var a=t.globals.seriesYAxisMap[e],s=new $(this.ctx);return a.every(function(r){return s.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,a,s,r,n){var o=this.w,h=new X(this.ctx),c=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?c=0:o.config.chart.type==="heatmap"&&(c+=r/2),a.show&&t>0){o.config.yaxis[s].opposite===!0&&(e+=a.width);for(var d=t;d>=0;d--){var g=h.drawLine(e+i.offsetX-a.width+a.offsetX,c+a.offsetY,e+i.offsetX+a.offsetX,c+a.offsetY,a.color);n.add(g),c+=r}}}}]),p}(),Ei=function(){function p(e){F(this,p),this.w=e.w,this.annoCtx=e,this.helpers=new Be(this.annoCtx),this.axesUtils=new ge(this.annoCtx)}return R(p,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,s=this.w,r=e.strokeDashArray,n=this.helpers.getY1Y2("y1",e),o=n.yP,h=n.clipped,c=!0,d=!1,g=e.label.text;if(e.y2===null||e.y2===void 0){if(!h){d=!0;var f=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,r,e.borderWidth);t.appendChild(f.node),e.id&&f.node.classList.add(e.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",e)).yP,c=n.clipped,a>o){var x=o;o=a,a=x}if(!h||!c){d=!0;var b=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),o-a,0,e.fillColor,e.opacity,1,e.borderColor,r);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),t.appendChild(b.node),e.id&&b.node.classList.add(e.id)}}if(d){var v=e.label.position==="right"?s.globals.gridWidth:e.label.position==="center"?s.globals.gridWidth/2:0,y=this.annoCtx.graphics.drawText({x:v+e.label.offsetX,y:(a??o)+e.label.offsetY-3,text:g,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});y.attr({rel:i}),t.appendChild(y.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach(function(a,s){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,i.node,s)}),i}}]),p}(),Yi=function(){function p(e){F(this,p),this.w=e.w,this.annoCtx=e,this.helpers=new Be(this.annoCtx)}return R(p,[{key:"addPointAnnotation",value:function(e,t,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",e)).yP,o=a.clipped;if(P.isNumber(s)&&!o&&!r){var h={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},c=this.annoCtx.graphics.drawMarker(s+e.marker.offsetX,n+e.marker.offsetY,h);t.appendChild(c.node);var d=e.label.text?e.label.text:"",g=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(g.attr({rel:i}),t.appendChild(g.node),e.customSVG.SVG){var f=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});f.attr({transform:"translate(".concat(s+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),f.node.innerHTML=e.customSVG.SVG,t.appendChild(f.node)}if(e.image.path){var x=e.image.width?e.image.width:20,b=e.image.height?e.image.height:20;c=this.annoCtx.addImage({x:s+e.image.offsetX-x/2,y:n+e.image.offsetY-b/2,width:x,height:b,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&c.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&c.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&c.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,s){e.addPointAnnotation(a,i.node,s)}),i}}]),p}(),Xt={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},ue=function(){function p(){F(this,p),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return R(p,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Xt],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},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},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),p}(),Fi=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.graphics=new X(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Be(this),this.xAxisAnnotations=new Xi(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return R(p,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=e.config.chart.animations.enabled,r=[t,i,a],n=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(r[o]),!s||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var i=e.x,a=e.y,s=e.text,r=e.textAnchor,n=e.foreColor,o=e.fontSize,h=e.fontFamily,c=e.fontWeight,d=e.cssClass,g=e.backgroundColor,f=e.borderWidth,x=e.strokeDashArray,b=e.borderRadius,v=e.borderColor,y=e.appendTo,w=y===void 0?".apexcharts-svg":y,l=e.paddingLeft,u=l===void 0?4:l,m=e.paddingRight,A=m===void 0?4:m,k=e.paddingBottom,S=k===void 0?2:k,L=e.paddingTop,C=L===void 0?2:L,I=this.w,z=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:h||I.config.chart.fontFamily,foreColor:n||I.config.chart.foreColor,cssClass:d}),M=I.globals.dom.baseEl.querySelector(w);M&&M.appendChild(z.node);var T=z.bbox();if(s){var E=this.graphics.drawRect(T.x-u,T.y-C,T.width+u+A,T.height+S+C,b,g||"transparent",1,f,v,x);M.insertBefore(E.node,z.node)}}},{key:"addImage",value:function(e,t){var i=this.w,a=e.path,s=e.x,r=s===void 0?0:s,n=e.y,o=n===void 0?0:n,h=e.width,c=h===void 0?20:h,d=e.height,g=d===void 0?20:d,f=e.appendTo,x=f===void 0?".apexcharts-svg":f,b=i.globals.dom.Paper.image(a);b.size(c,g).move(r,o);var v=i.globals.dom.baseEl.querySelector(x);return v&&v.appendChild(b.node),b}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return this.invertAxis===void 0&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,s=e.type,r=e.contextMethod,n=a,o=n.w,h=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),c=h.childNodes.length+1,d=new ue,g=Object.assign({},s==="xaxis"?d.xAxisAnnotation:s==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=P.extend(g,t);switch(s){case"xaxis":this.addXaxisAnnotation(f,h,c);break;case"yaxis":this.addYaxisAnnotation(f,h,c);break;case"point":this.addPointAnnotation(f,h,c)}var x=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(c,"']")),b=this.helpers.addBackgroundToAnno(x,f);return b&&h.insertBefore(b.node,x),i&&o.globals.memory.methodsToExec.push({context:n,id:f.id?f.id:P.randomId(),method:r,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){for(var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=t.globals.memory.methodsToExec.length-1;a>=0;a--)t.globals.memory.methodsToExec[a].label!=="addText"&&t.globals.memory.methodsToExec[a].label!=="addAnnotation"||t.globals.memory.methodsToExec.splice(a,1);i=P.listToArray(i),Array.prototype.forEach.call(i,function(s){for(;s.firstChild;)s.removeChild(s.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(s,r){s.id===t&&i.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(a,function(s){s.parentElement.removeChild(s)}))}}]),p}(),Je=function(p){var e,t=p.isTimeline,i=p.ctx,a=p.seriesIndex,s=p.dataPointIndex,r=p.y1,n=p.y2,o=p.w,h=o.globals.seriesRangeStart[a][s],c=o.globals.seriesRangeEnd[a][s],d=o.globals.labels[s],g=o.config.series[a].name?o.config.series[a].name:"",f=o.globals.ttKeyFormatter,x=o.config.tooltip.y.title.formatter,b={w:o,seriesIndex:a,dataPointIndex:s,start:h,end:c};typeof x=="function"&&(g=x(g,b)),(e=o.config.series[a].data[s])!==null&&e!==void 0&&e.x&&(d=o.config.series[a].data[s].x),t||o.config.xaxis.type==="datetime"&&(d=new ze(i).xLabelFormat(o.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new K(i).formatDate,w:o})),typeof f=="function"&&(d=f(d,b)),Number.isFinite(r)&&Number.isFinite(n)&&(h=r,c=n);var v="",y="",w=o.globals.colors[a];if(o.config.tooltip.x.formatter===void 0)if(o.config.xaxis.type==="datetime"){var l=new K(i);v=l.formatDate(l.getDate(h),o.config.tooltip.x.format),y=l.formatDate(l.getDate(c),o.config.tooltip.x.format)}else v=h,y=c;else v=o.config.tooltip.x.formatter(h),y=o.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:v,endVal:y,ylabel:d,color:w,seriesName:g}},Ke=function(p){var e=p.color,t=p.seriesName,i=p.ylabel,a=p.start,s=p.end,r=p.seriesIndex,n=p.dataPointIndex,o=p.ctx.tooltip.tooltipLabels.getFormatters(r);a=o.yLbFormatter(a),s=o.yLbFormatter(s);var h=o.yLbFormatter(p.w.globals.series[r][n]),c=`<span class="value start-value">
`.concat(a,`
</span> <span class="separator">-</span> <span class="value end-value">
`).concat(s,`
</span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(t||"")+'</span></div><div> <span class="category">'+i+": </span> "+(p.w.globals.comboCharts?p.w.config.series[r].type==="rangeArea"||p.w.config.series[r].type==="rangeBar"?c:"<span>".concat(h,"</span>"):c)+" </div></div>"},Le=function(){function p(e){F(this,p),this.opts=e}return R(p,[{key:"hideYAxis",value:function(){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}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),P.extend(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}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,t){var i=t.w.config.series[t.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},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}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),Y(Y({},this.bar()),{},{chart:{animations:{easing:"linear",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}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w;return e._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w;return e._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var i=t.seriesIndex,a=t.dataPointIndex,s=t.w,r=function(){var n=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-n};return s.globals.comboCharts?s.config.series[i].type==="rangeBar"||s.config.series[i].type==="rangeArea"?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(t){var i=Je(Y(Y({},t),{},{isTimeline:!0})),a=i.color,s=i.seriesName,r=i.ylabel,n=i.startVal,o=i.endVal;return Ke(Y(Y({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}))}(e):function(t){var i=Je(t),a=i.color,s=i.seriesName,r=i.ylabel,n=i.start,o=i.end;return Ke(Y(Y({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return(t=e.plotOptions.bar)!==null&&t!==void 0&&t.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!==null&&i!==void 0&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){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}}}},{key:"rangeArea",value:function(){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:function(e){return function(t){var i=Je(t),a=i.color,s=i.seriesName,r=i.ylabel,n=i.start,o=i.end;return Ke(Y(Y({},t),{},{color:a,seriesName:s,ylabel:r,start:n,end:o}))}(e)}}}}},{key:"brush",value:function(e){return P.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=t||function(i){return typeof i=="number"&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return Y(Y({},e),{},{plotOptions:Y(Y({},e.plotOptions),{},{bar:Y(Y({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return P.isNumber(r)?Math.floor(r):r};var a=e.xaxis.labels.formatter,s=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(s=i.map(function(r){return Array.isArray(r)?r:String(r)})),s&&s.length&&(e.xaxis.labels.formatter=function(r){return P.isNumber(r)?a(s[Math.floor(r)-1]):a(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){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}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){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}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){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},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,s){var r=e.globals.seriesCandleO[t][i],n=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],h=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==s?`<div class="apexcharts-custom-tooltip">
`.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][i],`</strong>
</div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+n+"</span></div>"+(o?"<div>".concat(a[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+h+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+c+"</span></div></div>"}}]),p}(),Pe=function(){function p(e){F(this,p),this.opts=e}return R(p,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new ue,s=new Le(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&J(i)==="object"){var o,h,c,d,g,f,x,b,v,y,w={};w=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)!==-1?s[i.chart.type]():s.line(),(o=i.plotOptions)!==null&&o!==void 0&&(h=o.bar)!==null&&h!==void 0&&h.isFunnel&&(w=s.funnel()),i.chart.stacked&&i.chart.type==="bar"&&(w=s.stackedBars()),(c=i.chart.brush)!==null&&c!==void 0&&c.enabled&&(w=s.brush(w)),(d=i.plotOptions)!==null&&d!==void 0&&(g=d.line)!==null&&g!==void 0&&g.isSlopeChart&&(w=s.slope()),i.chart.stacked&&i.chart.stackType==="100%"&&(i=s.stacked100(i)),(f=i.plotOptions)!==null&&f!==void 0&&(x=f.bar)!==null&&x!==void 0&&x.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),((b=(i=this.checkForCatToNumericXAxis(this.chartType,w,i)).chart.sparkline)!==null&&b!==void 0&&b.enabled||(v=window.Apex.chart)!==null&&v!==void 0&&(y=v.sparkline)!==null&&y!==void 0&&y.enabled)&&(w=s.sparkline(w)),n=P.extend(r,w)}var l=P.extend(n,window.Apex);return r=P.extend(l,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,s,r=new Le(i),n=(e==="bar"||e==="boxPlot")&&((a=i.plotOptions)===null||a===void 0||(s=a.bar)===null||s===void 0?void 0:s.horizontal),o=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",h=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",c=i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return n||o||!h||c==="between"||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new ue;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=P.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[P.extend(i.yAxis,e.yaxis)]:e.yaxis=P.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(r){r.logarithmic&&(a=!0)});var s=e.series;return t&&!s&&(s=t.config.series),a&&s.length!==e.yaxis.length&&s.length&&(e.yaxis=s.map(function(r,n){if(r.name||(s[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=s[n].name,e.yaxis[n];var o=P.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&s.length>1&&s.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new ue;return e.annotations.yaxis=P.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new ue;return e.annotations.xaxis=P.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new ue;return e.annotations.points=P.extendArray(e.annotations.points!==void 0?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.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(t.chart.type==="bar"&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return t.chart.type!=="bar"&&t.chart.type!=="rangeBar"||t.tooltip.shared&&t.xaxis.crosshairs.width==="barWidth"&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),t.chart.type!=="candlestick"&&t.chart.type!=="boxPlot"||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),p}(),Et=function(){function p(){F(this,p)}return R(p,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[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],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=P.extend({},e),t.initialSeries=P.clone(e.series),t.lastXAxis=P.clone(t.initialConfig.xaxis),t.lastYAxis=P.clone(t.initialConfig.yaxis),t}}]),p}(),Ri=function(){function p(e){F(this,p),this.opts=e}return R(p,[{key:"init",value:function(){var e=new Pe(this.opts).init({responsiveOverride:!1});return{config:e,globals:new Et().init(e)}}}]),p}(),ne=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return R(p,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),s=parseInt(t.globals.gridHeight,10),r=a>s?a:s,n=e.image,o=0,h=0;e.width===void 0&&e.height===void 0?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(o=i.fill.image.width+1,h=i.fill.image.height):(o=r+1,h=r):(o=e.width,h=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");X.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:h+"px"});var d=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",n),X.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:h+"px"}),d.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w,i=t.config.chart.type;return(i==="bar"||i==="rangeBar")&&t.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,s,r=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var n=this.getFillColors()[this.seriesIndex];t.globals.seriesColors[this.seriesIndex]!==void 0&&(n=t.globals.seriesColors[this.seriesIndex]),typeof n=="function"&&(n=n({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=e.fillType?e.fillType:this.getFillType(this.seriesIndex),h=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;e.color&&(n=e.color),n||(n="#fff",console.warn("undefined color - ApexCharts"));var c=n;if(n.indexOf("rgb")===-1?n.length<9&&(c=P.hexToRgba(n,h)):n.indexOf("rgba")>-1&&(h=P.getOpacityFromRGBA(n)),e.opacity&&(h=e.opacity),o==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:n,fillOpacity:h,defaultColor:c})),o==="gradient"&&(s=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:n,fillOpacity:h,i:this.seriesIndex})),o==="image"){var d=r.fill.image.src,g=e.patternID?e.patternID:"",f="pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(g);this.patternIDs.indexOf(f)===-1&&(this.clippedImgArea({opacity:h,image:Array.isArray(d)?e.seriesNumber<d.length?d[e.seriesNumber]:d[0]:d,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:f}),this.patternIDs.push(f)),i="url(#".concat(f,")")}else i=o==="gradient"?s:o==="pattern"?a:c;return e.solid&&(i=c),i}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,i=this.opts,a=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors):t.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors),i.fillColors!==void 0&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(e){var t=e.fillConfig,i=e.patternFill,a=e.fillColor,s=e.fillOpacity,r=e.defaultColor,n=this.w.config.fill;t&&(n=t);var o=this.opts,h=new X(this.ctx),c=Array.isArray(n.pattern.strokeWidth)?n.pattern.strokeWidth[this.seriesIndex]:n.pattern.strokeWidth,d=a;return Array.isArray(n.pattern.style)?i=n.pattern.style[o.seriesNumber]!==void 0?h.drawPattern(n.pattern.style[o.seriesNumber],n.pattern.width,n.pattern.height,d,c,s):r:i=h.drawPattern(n.pattern.style,n.pattern.width,n.pattern.height,d,c,s),i}},{key:"handleGradientFill",value:function(e){var t=e.fillColor,i=e.fillOpacity,a=e.fillConfig,s=e.i,r=this.w.config.fill;a&&(r=Y(Y({},r),a));var n,o=this.opts,h=new X(this.ctx),c=new P,d=r.gradient.type,g=t,f=r.gradient.opacityFrom===void 0?i:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[s]:r.gradient.opacityFrom;g.indexOf("rgba")>-1&&(f=P.getOpacityFromRGBA(g));var x=r.gradient.opacityTo===void 0?i:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[s]:r.gradient.opacityTo;if(r.gradient.gradientToColors===void 0||r.gradient.gradientToColors.length===0)n=r.gradient.shade==="dark"?c.shadeColor(-1*parseFloat(r.gradient.shadeIntensity),t.indexOf("rgb")>-1?P.rgb2hex(t):t):c.shadeColor(parseFloat(r.gradient.shadeIntensity),t.indexOf("rgb")>-1?P.rgb2hex(t):t);else if(r.gradient.gradientToColors[o.seriesNumber]){var b=r.gradient.gradientToColors[o.seriesNumber];n=b,b.indexOf("rgba")>-1&&(x=P.getOpacityFromRGBA(b))}else n=t;if(r.gradient.gradientFrom&&(g=r.gradient.gradientFrom),r.gradient.gradientTo&&(n=r.gradient.gradientTo),r.gradient.inverseColors){var v=g;g=n,n=v}return g.indexOf("rgb")>-1&&(g=P.rgb2hex(g)),n.indexOf("rgb")>-1&&(n=P.rgb2hex(n)),h.drawGradient(d,g,n,f,x,o.size,r.gradient.stops,r.gradient.colorStops,s)}}]),p}(),ye=function(){function p(e,t){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)e.globals.markers.size[t]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(i){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,t,i,a){var s,r=arguments.length>4&&arguments[4]!==void 0&&arguments[4],n=this.w,o=t,h=e,c=null,d=new X(this.ctx),g=n.config.markers.discrete&&n.config.markers.discrete.length;if((n.globals.markers.size[t]>0||r||g)&&(c=d.group({class:r||g?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(h.x))for(var f=0;f<h.x.length;f++){var x=i;i===1&&f===0&&(x=0),i===1&&f===1&&(x=1);var b="apexcharts-marker";if(n.config.chart.type!=="line"&&n.config.chart.type!=="area"||n.globals.comboCharts||n.config.tooltip.intersect||(b+=" no-pointer-events"),(Array.isArray(n.config.markers.size)?n.globals.markers.size[t]>0:n.config.markers.size>0)||r||g){P.isNumber(h.y[f])?b+=" w".concat(P.randomId()):b="apexcharts-nullpoint";var v=this.getMarkerConfig({cssClass:b,seriesIndex:t,dataPointIndex:x});n.config.series[o].data[x]&&(n.config.series[o].data[x].fillColor&&(v.pointFillColor=n.config.series[o].data[x].fillColor),n.config.series[o].data[x].strokeColor&&(v.pointStrokeColor=n.config.series[o].data[x].strokeColor)),a!==void 0&&(v.pSize=a),(h.x[f]<-n.globals.markers.largestSize||h.x[f]>n.globals.gridWidth+n.globals.markers.largestSize||h.y[f]<-n.globals.markers.largestSize||h.y[f]>n.globals.gridHeight+n.globals.markers.largestSize)&&(v.pSize=0),(s=d.drawMarker(h.x[f],h.y[f],v)).attr("rel",x),s.attr("j",x),s.attr("index",t),s.node.setAttribute("default-marker-size",v.pSize),new ie(this.ctx).setSelectionFilter(s,t,x),this.addEvents(s),c&&c.add(s)}else n.globals.pointsArray[t]===void 0&&(n.globals.pointsArray[t]=[]),n.globals.pointsArray[t].push([h.x[f],h.y[f]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,s=a===void 0?null:a,r=e.radius,n=r===void 0?null:r,o=e.size,h=o===void 0?null:o,c=e.strokeWidth,d=c===void 0?null:c,g=this.w,f=this.getMarkerStyle(i),x=h===null?g.globals.markers.size[i]:h,b=g.config.markers;return s!==null&&b.discrete.length&&b.discrete.map(function(v){v.seriesIndex===i&&v.dataPointIndex===s&&(f.pointStrokeColor=v.strokeColor,f.pointFillColor=v.fillColor,x=v.size,f.pointShape=v.shape)}),{pSize:n===null?x:n,pRadius:n!==null?n:b.radius,pointStrokeWidth:d!==null?d:Array.isArray(b.strokeWidth)?b.strokeWidth[i]:b.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(b.shape)?b.shape[i]:b.shape),class:t,pointStrokeOpacity:Array.isArray(b.strokeOpacity)?b.strokeOpacity[i]:b.strokeOpacity,pointStrokeDashArray:Array.isArray(b.strokeDashArray)?b.strokeDashArray[i]:b.strokeDashArray,pointFillOpacity:Array.isArray(b.fillOpacity)?b.fillOpacity[i]:b.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new X(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),p}(),Yt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return R(p,[{key:"draw",value:function(e,t,i){var a=this.w,s=new X(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,h=i.elParent,c=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var d=0;d<n.x.length;d++){var g=t+1,f=!0;t===0&&d===0&&(g=0),t===0&&d===1&&(g=1);var x=a.globals.markers.size[r];if(o!==1/0){var b=a.config.plotOptions.bubble;x=a.globals.seriesZ[r][g],b.zScaling&&(x/=o),b.minBubbleRadius&&x<b.minBubbleRadius&&(x=b.minBubbleRadius),b.maxBubbleRadius&&x>b.maxBubbleRadius&&(x=b.maxBubbleRadius)}var v=n.x[d],y=n.y[d];if(x=x||0,y!==null&&a.globals.series[r][g]!==void 0||(f=!1),f){var w=this.drawPoint(v,y,x,r,g,t);c.add(w)}h.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,s,r){var n=this.w,o=a,h=new ve(this.ctx),c=new ie(this.ctx),d=new ne(this.ctx),g=new ye(this.ctx),f=new X(this.ctx),x=g.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:n.config.chart.type==="bubble"||n.globals.comboCharts&&n.config.series[a]&&n.config.series[a].type==="bubble"?i:null}),b=d.fillPath({seriesNumber:a,dataPointIndex:s,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),v=f.drawMarker(e,t,x);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(b=n.config.series[o].data[s].fillColor),v.attr({fill:b}),n.config.chart.dropShadow.enabled){var y=n.config.chart.dropShadow;c.dropShadow(v,y,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var w=n.config.chart.animations.speed;h.animateMarker(v,w,n.globals.easing,function(){window.setTimeout(function(){h.animationCompleted(v)},100)})}return v.attr({rel:s,j:s,index:a,"default-marker-size":x.pSize}),c.setSelectionFilter(v,a,s),g.addEvents(v),v.node.classList.add("apexcharts-marker"),v}},{key:"centerTextInBubble",value:function(e){var t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}]),p}(),be=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"dataLabelsCorrection",value:function(e,t,i,a,s,r,n){var o=this.w,h=!1,c=new X(this.ctx).getTextRects(i,n),d=c.width,g=c.height;t<0&&(t=0),t>o.globals.gridHeight+g&&(t=o.globals.gridHeight+g/2),o.globals.dataLabelsRects[a]===void 0&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:g});var f=o.globals.dataLabelsRects[a].length-2,x=o.globals.lastDrawnDataLabelsIndexes[a]!==void 0?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(o.globals.dataLabelsRects[a][f]!==void 0){var b=o.globals.dataLabelsRects[a][x];(e>b.x+b.width||t>b.y+b.height||t+g<b.y||e+d<b.x)&&(h=!0)}return(s===0||r)&&(h=!0),{x:e,y:t,textRects:c,drawnextLabel:h}}},{key:"drawDataLabel",value:function(e){var t=this,i=e.type,a=e.pos,s=e.i,r=e.j,n=e.isRangeStart,o=e.strokeWidth,h=o===void 0?2:o,c=this.w,d=new X(this.ctx),g=c.config.dataLabels,f=0,x=0,b=r,v=null;if(c.globals.collapsedSeriesIndices.indexOf(s)!==-1||!g.enabled||!Array.isArray(a.x))return v;v=d.group({class:"apexcharts-data-labels"});for(var y=0;y<a.x.length;y++)if(f=a.x[y]+g.offsetX,x=a.y[y]+g.offsetY+h,!isNaN(f)){r===1&&y===0&&(b=0),r===1&&y===1&&(b=1);var w=c.globals.series[s][b];i==="rangeArea"&&(w=n?c.globals.seriesRangeStart[s][b]:c.globals.seriesRangeEnd[s][b]);var l="",u=function(A){return c.config.dataLabels.formatter(A,{ctx:t.ctx,seriesIndex:s,dataPointIndex:b,w:c})};c.config.chart.type==="bubble"?(l=u(w=c.globals.seriesZ[s][b]),x=a.y[y],x=new Yt(this.ctx).centerTextInBubble(x,s,b).y):w!==void 0&&(l=u(w));var m=c.config.dataLabels.textAnchor;c.globals.isSlopeChart&&(m=b===0?"end":b===c.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:x,text:l,i:s,j:b,parent:v,offsetCorrection:!0,dataLabelsConfig:c.config.dataLabels,textAnchor:m})}return v}},{key:"plotDataLabelsText",value:function(e){var t=this.w,i=new X(this.ctx),a=e.x,s=e.y,r=e.i,n=e.j,o=e.text,h=e.textAnchor,c=e.fontSize,d=e.parent,g=e.dataLabelsConfig,f=e.color,x=e.alwaysDrawDataLabel,b=e.offsetCorrection,v=e.className,y=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(r)<0)return y;var w={x:a,y:s,drawnextLabel:!0,textRects:null};b&&(w=this.dataLabelsCorrection(a,s,o,r,n,x,parseInt(g.style.fontSize,10))),t.globals.zoomed||(a=w.x,s=w.y),w.textRects&&(a<-20-w.textRects.width||a>t.globals.gridWidth+w.textRects.width+30)&&(o="");var l=t.globals.dataLabels.style.colors[r];((t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(l=t.globals.dataLabels.style.colors[n]),typeof l=="function"&&(l=l({series:t.globals.series,seriesIndex:r,dataPointIndex:n,w:t})),f&&(l=f);var u=g.offsetX,m=g.offsetY;if(t.config.chart.type!=="bar"&&t.config.chart.type!=="rangeBar"||(u=0,m=0),t.globals.isSlopeChart&&(n!==0&&(u=-2*g.offsetX+5),n!==0&&n!==t.config.series[r].data.length-1&&(u=0)),w.drawnextLabel){if((y=i.drawText({width:100,height:parseInt(g.style.fontSize,10),x:a+u,y:s+m,foreColor:l,textAnchor:h||g.textAnchor,text:o,fontSize:c||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"})).attr({class:v||"apexcharts-datalabel",cx:a,cy:s}),g.dropShadow.enabled){var A=g.dropShadow;new ie(this.ctx).dropShadow(y,A)}d.add(y),t.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(t.globals.lastDrawnDataLabelsIndexes[r]=[]),t.globals.lastDrawnDataLabelsIndexes[r].push(n)}return y}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=t.width,o=t.height,h=new X(this.ctx).drawRect(t.x-s,t.y-r/2,n+2*s,o+r,a.borderRadius,i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new ie(this.ctx).dropShadow(h,a.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<t.length;i++){var a=t[i],s=a.getBBox(),r=null;if(s.width&&s.height&&(r=this.addBackgroundToDataLabel(a,s)),r){a.parentNode.insertBefore(r.node,a);var n=a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:n}):r.attr({fill:n}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<t.length;a++)i&&i.insertBefore(t[a],i.nextSibling)}}]),p}(),re=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return R(p,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(P.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),i=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,t){var i=this.w;function a(s){for(var r=0;r<s.length;r++)s[r].index===t&&e.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w,s=P.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i<e.length;i++)t.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"highlightSeries",value:function(e){var t=this.w,i=this.getSeriesByName(e),a=parseInt(i.getAttribute("data:realIndex"),10),s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(t.globals.axisCharts||t.config.chart.type==="radialBar")if(t.globals.axisCharts){r=t.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=t.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var h=t.globals.seriesYAxisReverseMap[a];o=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(h,"']"))}else r=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var c=0;c<s.length;c++)s[c].classList.add(this.legendInactiveClass);r!==null&&(t.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),n!==null&&n.classList.remove(this.legendInactiveClass),o!==null&&o.classList.remove(this.legendInactiveClass))}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var s=parseInt(t.getAttribute("rel"),10)-1;this.highlightSeries(i.config.series[s].name)}else if(e.type==="mouseout")for(var r=0;r<a.length;r++)a[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var i=this,a=this.w,s=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(h){for(var c=0;c<s.length;c++)s[c].classList[h](i.legendInactiveClass)};if(e.type==="mousemove"){var n=parseInt(t.getAttribute("rel"),10)-1;r("add");var o=a.config.plotOptions.heatmap.colorScale.ranges;(function(h,c){for(var d=0;d<s.length;d++){var g=Number(s[d].getAttribute("val"));g>=h.from&&(g<h.to||h.to===c&&g===c)&&s[d].classList.remove(i.legendInactiveClass)}})(o[n],o.reduce(function(h,c){return Math.max(h,c.to)},0))}else e.type==="mouseout"&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1){for(var s=i.config.series.map(function(n,o){return n.data&&n.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(o)===-1&&(!i.globals.comboCharts||t.length===0||t.length&&t.indexOf(i.config.series[o].type)>-1)?o:-1}),r=e==="asc"?0:s.length-1;e==="asc"?r<s.length:r>=0;e==="asc"?r++:r--)if(s[r]!==-1){a=s[r];break}}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return e.type==="bar"||e.type==="column"?t:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(r,n,o){for(var h=r[n].childNodes,c={type:o,paths:[],realIndex:r[n].getAttribute("data:realIndex")},d=0;d<h.length;d++)if(h[d].hasAttribute("pathTo")){var g=h[d].getAttribute("pathTo");c.paths.push({d:g})}e.globals.previousPaths.push(c)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(r){for(var n,o=(n=r,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(n,"-series .apexcharts-series"))),h=0;h<o.length;h++)t(o,h,r)}),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var a=function(r){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),o=[],h=function(d){var g=function(x){return n[d].getAttribute(x)},f={x:parseFloat(g("x")),y:parseFloat(g("y")),width:parseFloat(g("width")),height:parseFloat(g("height"))};o.push({rect:f,color:n[d].getAttribute("color")})},c=0;c<n.length;c++)h(c);e.globals.previousPaths.push(o)},s=0;s<i.length;s++)a(s);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(e){var t=this.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series"));if(i.length>0)for(var a=0;a<i.length;a++){for(var s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series[data\\:realIndex='").concat(a,"'] circle")),r=[],n=0;n<s.length;n++)r.push({x:s[n].getAttribute("cx"),y:s[n].getAttribute("cy"),r:s[n].getAttribute("r")});t.globals.previousPaths.push(r)}}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,i=new X(this.ctx),a=e.globals.svgWidth/2,s=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,t.align==="left"?(a=10,r="start"):t.align==="right"&&(a=e.globals.svgWidth-10,r="end"),t.verticalAlign==="top"?s=50:t.verticalAlign==="bottom"&&(s=e.globals.svgHeight-50),a+=t.offsetX,s=s+parseInt(t.style.fontSize,10)+2+t.offsetY,t.text!==void 0&&t.text!==""){var n=i.drawText({x:a,y:s,text:t.text,textAnchor:r,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(n)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,i=0;i<e.length;i++)if(e[i].length===0)for(var a=0;a<e[t.globals.maxValsInArrayIndex].length;a++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(t){return t.length>0?t:[]});return e}}]),p}(),Ft=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new $(this.ctx)}return R(p,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new re(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new re(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,s=i.chart.type==="boxPlot"||i.series[t].type==="boxPlot",r=0;r<e[t].data.length;r++)if(e[t].data[r][1]!==void 0&&(Array.isArray(e[t].data[r][1])&&e[t].data[r][1].length===4&&!s?this.twoDSeries.push(P.parseNumber(e[t].data[r][1][3])):e[t].data[r].length>=5?this.twoDSeries.push(P.parseNumber(e[t].data[r][4])):this.twoDSeries.push(P.parseNumber(e[t].data[r][1])),a.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){var n=new Date(e[t].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[r][0]);for(var o=0;o<e[t].data.length;o++)e[t].data[o][2]!==void 0&&(this.threeDSeries.push(e[t].data[o][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var i=this.w.config,a=this.w.globals,s=new K(this.ctx),r=t;a.collapsedSeriesIndices.indexOf(t)>-1&&(r=this.activeSeriesIndex);for(var n=0;n<e[t].data.length;n++)e[t].data[n].y!==void 0&&(Array.isArray(e[t].data[n].y)?this.twoDSeries.push(P.parseNumber(e[t].data[n].y[e[t].data[n].y.length-1])):this.twoDSeries.push(P.parseNumber(e[t].data[n].y))),e[t].data[n].goals!==void 0&&Array.isArray(e[t].data[n].goals)?(this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[n].goals)):(this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var o=0;o<e[r].data.length;o++){var h=typeof e[r].data[o].x=="string",c=Array.isArray(e[r].data[o].x),d=!c&&!!s.isValidDate(e[r].data[o].x);if(h||d)if(h||i.xaxis.convertedCatToNumeric){var g=a.isBarHorizontal&&a.isRangeData;i.xaxis.type!=="datetime"||g?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[o].x),isNaN(e[r].data[o].x)||this.w.config.xaxis.type==="category"||typeof e[r].data[o].x=="string"||(a.isXNumeric=!0)):this.twoDSeriesX.push(s.parseDate(e[r].data[o].x))}else i.xaxis.type==="datetime"?this.twoDSeriesX.push(s.parseDate(e[r].data[o].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[o].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[o].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[r].data[o].x))}if(e[t].data[0]&&e[t].data[0].z!==void 0){for(var f=0;f<e[t].data.length;f++)this.threeDSeries.push(e[t].data[f].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",e,t)),i.seriesRangeStart.push(a.start===void 0?[]:a.start),i.seriesRangeEnd.push(a.end===void 0?[]:a.end),i.seriesRange.push(a.rangeUniques),i.seriesRange.forEach(function(s,r){s&&s.forEach(function(n,o){n.y.forEach(function(h,c){for(var d=0;d<n.y.length;d++)if(c!==d){var g=h.y1,f=h.y2,x=n.y[d].y1;g<=n.y[d].y2&&x<=f&&(n.overlaps.indexOf(h.rangeName)<0&&n.overlaps.push(h.rangeName),n.overlaps.indexOf(n.y[d].rangeName)<0&&n.overlaps.push(n.y[d].rangeName))}})})}),a}},{key:"handleCandleStickBoxData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",e,t)),i.seriesCandleO[t]=a.o,i.seriesCandleH[t]=a.h,i.seriesCandleM[t]=a.m,i.seriesCandleL[t]=a.l,i.seriesCandleC[t]=a.c,a}},{key:"handleRangeDataFormat",value:function(e,t,i){var a=[],s=[],r=t[i].data.filter(function(c,d,g){return d===g.findIndex(function(f){return f.x===c.x})}).map(function(c,d){return{x:c.x,overlaps:[],y:[]}});if(e==="array")for(var n=0;n<t[i].data.length;n++)Array.isArray(t[i].data[n])?(a.push(t[i].data[n][1][0]),s.push(t[i].data[n][1][1])):(a.push(t[i].data[n]),s.push(t[i].data[n]));else if(e==="xy")for(var o=function(c){var d=Array.isArray(t[i].data[c].y),g=P.randomId(),f=t[i].data[c].x,x={y1:d?t[i].data[c].y[0]:t[i].data[c].y,y2:d?t[i].data[c].y[1]:t[i].data[c].y,rangeName:g};t[i].data[c].rangeName=g;var b=r.findIndex(function(v){return v.x===f});r[b].y.push(x),a.push(x.y1),s.push(x.y2)},h=0;h<t[i].data.length;h++)o(h);return{start:a,end:s,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,i){var a=this.w,s=a.config.chart.type==="boxPlot"||a.config.series[i].type==="boxPlot",r=[],n=[],o=[],h=[],c=[];if(e==="array")if(s&&t[i].data[0].length===6||!s&&t[i].data[0].length===5)for(var d=0;d<t[i].data.length;d++)r.push(t[i].data[d][1]),n.push(t[i].data[d][2]),s?(o.push(t[i].data[d][3]),h.push(t[i].data[d][4]),c.push(t[i].data[d][5])):(h.push(t[i].data[d][3]),c.push(t[i].data[d][4]));else for(var g=0;g<t[i].data.length;g++)Array.isArray(t[i].data[g][1])&&(r.push(t[i].data[g][1][0]),n.push(t[i].data[g][1][1]),s?(o.push(t[i].data[g][1][2]),h.push(t[i].data[g][1][3]),c.push(t[i].data[g][1][4])):(h.push(t[i].data[g][1][2]),c.push(t[i].data[g][1][3])));else if(e==="xy")for(var f=0;f<t[i].data.length;f++)Array.isArray(t[i].data[f].y)&&(r.push(t[i].data[f].y[0]),n.push(t[i].data[f].y[1]),s?(o.push(t[i].data[f].y[2]),h.push(t[i].data[f].y[3]),c.push(t[i].data[f].y[4])):(h.push(t[i].data[f].y[2]),c.push(t[i].data[f].y[3])));return{o:r,h:n,m:o,l:h,c}}},{key:"parseDataAxisCharts",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new K(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar=a.chart.type==="rangeBar"&&s.isBarHorizontal,s.hasXaxisGroups=a.xaxis.type==="category"&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),e.forEach(function(f,x){f.name!==void 0?s.seriesNames.push(f.name):s.seriesNames.push("series-"+parseInt(x+1,10))}),this.coreUtils.setSeriesYAxisMappings();var o=[],h=te(new Set(a.series.map(function(f){return f.group})));a.series.forEach(function(f,x){var b=h.indexOf(f.group);o[b]||(o[b]=[]),o[b].push(s.seriesNames[x])}),s.seriesGroups=o;for(var c=function(){for(var f=0;f<n.length;f++)if(typeof n[f]=="string"){if(!r.isValidDate(n[f]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(r.parseDate(n[f]))}else t.twoDSeriesX.push(n[f])},d=0;d<e.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[d].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(a.chart.type!=="rangeBar"&&a.chart.type!=="rangeArea"&&e[d].type!=="rangeBar"&&e[d].type!=="rangeArea"||(s.isRangeData=!0,a.chart.type!=="rangeBar"&&a.chart.type!=="rangeArea"||this.handleRangeData(e,d)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,d):this.isFormatXY()&&this.handleFormatXY(e,d),a.chart.type!=="candlestick"&&e[d].type!=="candlestick"&&a.chart.type!=="boxPlot"&&e[d].type!=="boxPlot"||this.handleCandleStickBoxData(e,d),s.series.push(this.twoDSeries),s.labels.push(this.twoDSeriesX),s.seriesX.push(this.twoDSeriesX),s.seriesGoals=this.seriesGoals,d!==this.activeSeriesIndex||this.fallbackToCategory||(s.isXNumeric=!0);else{a.xaxis.type==="datetime"?(s.isXNumeric=!0,c(),s.seriesX.push(this.twoDSeriesX)):a.xaxis.type==="numeric"&&(s.isXNumeric=!0,n.length>0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var g=e[d].data.map(function(f){return P.parseNumber(f)});s.series.push(g)}s.seriesZ.push(this.threeDSeries),e[d].color!==void 0?s.seriesColors.push(e[d].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a<t.series.length;a++)t.seriesNames[a]===void 0&&t.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,i=this.w.globals;t.xaxis.categories.length>0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(a){a.forEach(function(s){i.labels.indexOf(s.x)<0&&s.x&&i.labels.push(s.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new Le(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var s=i.series.map(function(d,g){return d.data.filter(function(f,x,b){return b.findIndex(function(v){return v.x===f.x})===x})}),r=s.reduce(function(d,g,f,x){return x[d].length>g.length?d:f},0),n=0;n<s[r].length;n++)a.push(n+1);else for(var o=0;o<t.series[t.maxValsInArrayIndex].length;o++)a.push(o+1);t.seriesX=[];for(var h=0;h<e.length;h++)t.seriesX.push(a);this.w.globals.isBarHorizontal||(t.isXNumeric=!0)}if(a.length===0){a=t.axisCharts?[]:t.series.map(function(d,g){return g+1});for(var c=0;c<e.length;c++)t.seriesX.push(a)}t.labels=a,i.xaxis.convertedCatToNumeric&&(t.categoryLabels=a.map(function(d){return i.xaxis.labels.formatter(d)})),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,i=t.config,a=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),i.chart.stacked){var s=new re(this.ctx);a.series=s.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&(a.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),a.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&(i.xaxis.type!=="numeric"||i.labels.length!==0||i.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(a.labels),n=0;n<r.length;n++)if(Array.isArray(r[n])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,t=[];e.globals.seriesYAxisMap.forEach(function(i,a){var s=0;i.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&s++}),s>0&&s==i.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(function(i){return i})}}]),p}(),He=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var e=this;return new Promise(function(t){var i=e.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=e.w.globals.dom.Paper.svg(),n=e.w.globals.dom.Paper.node.cloneNode(!0);s!==1&&e.scaleSvgNode(n,s),e.convertImagesToBase64(n).then(function(){r=new XMLSerializer().serializeToString(n),t(r.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var t=this,i=e.getElementsByTagName("image"),a=Array.from(i).map(function(s){var r=s.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?t.getBase64FromUrl(r).then(function(n){s.setAttributeNS("http://www.w3.org/1999/xlink","href",n)}).catch(function(n){console.error("Error converting image to base64:",n)}):Promise.resolve()});return Promise.all(a)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(t,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var s=document.createElement("canvas");s.width=a.width,s.height=a.height,s.getContext("2d").drawImage(a,0,0),t(s.toDataURL())},a.onerror=i,a.src=e})}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(s){s.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(t){e.cleanup(),e.getSvgString().then(function(i){var a=new Blob([i],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(a))})})}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,s=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n=a.config.chart.background!=="transparent"&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),t.getSvgString().then(function(h){var c="data:image/svg+xml,"+encodeURIComponent(h),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(o.drawImage(d,0,0),r.msToBlob){var g=r.msToBlob();i({blob:g})}else{var f=r.toDataURL("image/png");i({imgURI:f})}},d.src=c})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(t){e.triggerDownload(t,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,t=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=t?{scale:t}:i?{width:i}:void 0;this.dataURI(a).then(function(s){var r=s.imgURI,n=s.blob;n?navigator.msSaveOrOpenBlob(n,e.w.globals.chartID+".png"):e.triggerDownload(r,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,s=e.columnDelimiter,r=s===void 0?",":s,n=e.lineDelimiter,o=n===void 0?`
`:n,h=this.w;i||(i=h.config.series);var c,d,g=[],f=[],x="",b=h.globals.series.map(function(k,S){return h.globals.collapsedSeriesIndices.indexOf(S)===-1?k:[]}),v=function(k){return typeof h.config.chart.toolbar.export.csv.categoryFormatter=="function"?h.config.chart.toolbar.export.csv.categoryFormatter(k):h.config.xaxis.type==="datetime"&&String(k).length>=10?new Date(k).toDateString():P.isNumber(k)?k:k.split(r).join("")},y=function(k){return typeof h.config.chart.toolbar.export.csv.valueFormatter=="function"?h.config.chart.toolbar.export.csv.valueFormatter(k):k},w=Math.max.apply(Math,te(i.map(function(k){return k.data?k.data.length:0}))),l=new Ft(this.ctx),u=new ge(this.ctx),m=function(k){var S="";if(h.globals.axisCharts){if(h.config.xaxis.type==="category"||h.config.xaxis.convertedCatToNumeric)if(h.globals.isBarHorizontal){var L=h.globals.yLabelFormatters[0],C=new re(t.ctx).getActiveConfigSeriesIndex();S=L(h.globals.labels[k],{seriesIndex:C,dataPointIndex:k,w:h})}else S=u.getLabel(h.globals.labels,h.globals.timescaleLabels,0,k).text;h.config.xaxis.type==="datetime"&&(h.config.xaxis.categories.length?S=h.config.xaxis.categories[k]:h.config.labels.length&&(S=h.config.labels[k]))}else S=h.config.labels[k];return S===null?"nullvalue":(Array.isArray(S)&&(S=S.join(" ")),P.isNumber(S)?S:S.split(r).join(""))},A=function(k,S){if(g.length&&S===0&&f.push(g.join(r)),k.data){k.data=k.data.length&&k.data||te(Array(w)).map(function(){return""});for(var L=0;L<k.data.length;L++){g=[];var C=m(L);if(C!=="nullvalue"){if(C||(l.isFormatXY()?C=i[S].data[L].x:l.isFormat2DArray()&&(C=i[S].data[L]?i[S].data[L][0]:"")),S===0){g.push(v(C));for(var I=0;I<h.globals.series.length;I++){var z,M=l.isFormatXY()?(z=i[I].data[L])===null||z===void 0?void 0:z.y:b[I][L];g.push(y(M))}}(h.config.chart.type==="candlestick"||k.type&&k.type==="candlestick")&&(g.pop(),g.push(h.globals.seriesCandleO[S][L]),g.push(h.globals.seriesCandleH[S][L]),g.push(h.globals.seriesCandleL[S][L]),g.push(h.globals.seriesCandleC[S][L])),(h.config.chart.type==="boxPlot"||k.type&&k.type==="boxPlot")&&(g.pop(),g.push(h.globals.seriesCandleO[S][L]),g.push(h.globals.seriesCandleH[S][L]),g.push(h.globals.seriesCandleM[S][L]),g.push(h.globals.seriesCandleL[S][L]),g.push(h.globals.seriesCandleC[S][L])),h.config.chart.type==="rangeBar"&&(g.pop(),g.push(h.globals.seriesRangeStart[S][L]),g.push(h.globals.seriesRangeEnd[S][L])),g.length&&f.push(g.join(r))}}}};g.push(h.config.chart.toolbar.export.csv.headerCategory),h.config.chart.type==="boxPlot"?(g.push("minimum"),g.push("q1"),g.push("median"),g.push("q3"),g.push("maximum")):h.config.chart.type==="candlestick"?(g.push("open"),g.push("high"),g.push("low"),g.push("close")):h.config.chart.type==="rangeBar"?(g.push("minimum"),g.push("maximum")):i.map(function(k,S){var L=(k.name?k.name:"series-".concat(S))+"";h.globals.axisCharts&&g.push(L.split(r).join("")?L.split(r).join(""):"series-".concat(S))}),h.globals.axisCharts||(g.push(h.config.chart.toolbar.export.csv.headerValue),f.push(g.join(r))),h.globals.allSeriesHasEqualX||!h.globals.axisCharts||h.config.xaxis.categories.length||h.config.labels.length?i.map(function(k,S){h.globals.axisCharts?A(k,S):((g=[]).push(v(h.globals.labels[S])),g.push(y(b[S])),f.push(g.join(r)))}):(c=new Set,d={},i.forEach(function(k,S){k?.data.forEach(function(L){var C,I;if(l.isFormatXY())C=L.x,I=L.y;else{if(!l.isFormat2DArray())return;C=L[0],I=L[1]}d[C]||(d[C]=Array(i.length).fill("")),d[C][S]=y(I),c.add(C)})}),g.length&&f.push(g.join(r)),Array.from(c).sort().forEach(function(k){f.push([v(k),d[k].join(r)])})),x+=f.join(o),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+x),a||h.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,i){var a=document.createElement("a");a.href=e,a.download=(t||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),p}(),Me=function(){function p(e,t){F(this,p),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.axesUtils=new ge(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],i.config.xaxis.position==="top"?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return R(p,[{key:"drawXaxis",value:function(){var e=this.w,t=new X(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r<this.xaxisLabels.length;r++)s.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,t,a,s,e.globals.isXNumeric,function(x,b){return b}),e.globals.hasXaxisGroups){var n=e.globals.groups;s=[];for(var o=0;o<n.length;o++)s.push(n[o].title);var h={};e.config.xaxis.group.style&&(h.xaxisFontSize=e.config.xaxis.group.style.fontSize,h.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,h.xaxisForeColors=e.config.xaxis.group.style.colors,h.fontWeight=e.config.xaxis.group.style.fontWeight,h.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,a,s,!1,function(x,b){return n[x].cols*b},h)}if(e.config.xaxis.title.text!==void 0){var c=t.group({class:"apexcharts-xaxis-title"}),d=t.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,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});c.add(d),i.add(c)}if(e.config.xaxis.axisBorder.show){var g=e.globals.barPadForNumericAxis,f=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-g,this.offY,this.xaxisBorderWidth+g,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(f):i.add(f)}return i}},{key:"drawXAxisLabelAndGroup",value:function(e,t,i,a,s,r){var n,o=this,h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},c=[],d=[],g=this.w,f=h.xaxisFontSize||this.xaxisFontSize,x=h.xaxisFontFamily||this.xaxisFontFamily,b=h.xaxisForeColors||this.xaxisForeColors,v=h.fontWeight||g.config.xaxis.labels.style.fontWeight,y=h.cssClass||g.config.xaxis.labels.style.cssClass,w=g.globals.padHorizontal,l=a.length,u=g.config.xaxis.type==="category"?g.globals.dataPoints:l;if(u===0&&l>u&&(u=l),s){var m=u>1?u-1:u;n=g.globals.gridWidth/Math.min(m,l-1),w=w+r(0,n)/2+g.config.xaxis.labels.offsetX}else n=g.globals.gridWidth/u,w=w+r(0,n)+g.config.xaxis.labels.offsetX;for(var A=function(S){var L=w-r(S,n)/2+g.config.xaxis.labels.offsetX;S===0&&l===1&&n/2===w&&u===1&&(L=g.globals.gridWidth/2);var C=o.axesUtils.getLabel(a,g.globals.timescaleLabels,L,S,c,f,e),I=28;if(g.globals.rotateXLabels&&e&&(I=22),g.config.xaxis.title.text&&g.config.xaxis.position==="top"&&(I+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(I=I+parseFloat(f)+(g.globals.xAxisLabelsHeight-g.globals.xAxisGroupLabelsHeight)+(g.globals.rotateXLabels?10:0)),C=g.config.xaxis.tickAmount!==void 0&&g.config.xaxis.tickAmount!=="dataPoints"&&g.config.xaxis.type!=="datetime"?o.axesUtils.checkLabelBasedOnTickamount(S,C,l):o.axesUtils.checkForOverflowingLabels(S,C,l,c,d),g.config.xaxis.labels.show){var z=t.drawText({x:C.x,y:o.offY+g.config.xaxis.labels.offsetY+I-(g.config.xaxis.position==="top"?g.globals.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:C.isBold?600:v,fontSize:f,fontFamily:x,foreColor:Array.isArray(b)?e&&g.config.xaxis.convertedCatToNumeric?b[g.globals.minX+S-1]:b[S]:b,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+y});if(i.add(z),z.on("click",function(T){if(typeof g.config.chart.events.xAxisLabelClick=="function"){var E=Object.assign({},g,{labelIndex:S});g.config.chart.events.xAxisLabelClick(T,o.ctx,E)}}),e){var M=document.createElementNS(g.globals.SVGNS,"title");M.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,z.node.appendChild(M),C.text!==""&&(c.push(C.text),d.push(C))}}S<l-1&&(w+=r(S+1,n))},k=0;k<=l-1;k++)A(k)}},{key:"drawXaxisInversed",value:function(e){var t,i,a=this,s=this.w,r=new X(this.ctx),n=s.config.yaxis[0].opposite?s.globals.translateYAxisX[e]:0,o=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),h=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+n+", 0)"});o.add(h);var c=[];if(s.config.yaxis[e].show)for(var d=0;d<this.xaxisLabels.length;d++)c.push(this.xaxisLabels[d]);t=s.globals.gridHeight/c.length,i=-t/2.2;var g=s.globals.yLabelFormatters[0],f=s.config.yaxis[0].labels;if(f.show)for(var x=function(m){var A=c[m]===void 0?"":c[m];A=g(A,{seriesIndex:e,dataPointIndex:m,w:s});var k=a.axesUtils.getYAxisForeColor(f.style.colors,e),S=0;Array.isArray(A)&&(S=A.length/2*parseInt(f.style.fontSize,10));var L=f.offsetX-15,C="end";a.yaxis.opposite&&(C="start"),s.config.yaxis[0].labels.align==="left"?(L=f.offsetX,C="start"):s.config.yaxis[0].labels.align==="center"?(L=f.offsetX,C="middle"):s.config.yaxis[0].labels.align==="right"&&(C="end");var I=r.drawText({x:L,y:i+t+f.offsetY-S,text:A,textAnchor:C,foreColor:Array.isArray(k)?k[m]:k,fontSize:f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+f.style.cssClass,maxWidth:f.maxWidth});h.add(I),I.on("click",function(T){if(typeof s.config.chart.events.xAxisLabelClick=="function"){var E=Object.assign({},s,{labelIndex:m});s.config.chart.events.xAxisLabelClick(T,a.ctx,E)}});var z=document.createElementNS(s.globals.SVGNS,"title");if(z.textContent=Array.isArray(A)?A.join(" "):A,I.node.appendChild(z),s.config.yaxis[e].labels.rotate!==0){var M=r.rotateAroundCenter(I.node);I.node.setAttribute("transform","rotate(".concat(s.config.yaxis[e].labels.rotate," 0 ").concat(M.y,")"))}i+=t},b=0;b<=c.length-1;b++)x(b);if(s.config.yaxis[0].title.text!==void 0){var v=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+n+", 0)"}),y=r.drawText({x:s.config.yaxis[0].title.offsetX,y:s.globals.gridHeight/2+s.config.yaxis[0].title.offsetY,text:s.config.yaxis[0].title.text,textAnchor:"middle",foreColor:s.config.yaxis[0].title.style.color,fontSize:s.config.yaxis[0].title.style.fontSize,fontWeight:s.config.yaxis[0].title.style.fontWeight,fontFamily:s.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+s.config.yaxis[0].title.style.cssClass});v.add(y),o.add(v)}var w=0;this.isCategoryBarHorizontal&&s.config.yaxis[0].opposite&&(w=s.globals.gridWidth);var l=s.config.xaxis.axisBorder;if(l.show){var u=r.drawLine(s.globals.padHorizontal+l.offsetX+w,1+l.offsetY,s.globals.padHorizontal+l.offsetX+w,s.globals.gridHeight+l.offsetY,l.color,0);this.elgrid&&this.elgrid.elGridBorders&&s.config.grid.show?this.elgrid.elGridBorders.add(u):o.add(u)}return s.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(w,c.length,s.config.yaxis[0].axisBorder,s.config.yaxis[0].axisTicks,0,t,o),o}},{key:"drawXaxisTicks",value:function(e,t,i){var a=this.w,s=e;if(!(e<0||e-2>a.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+r+a.config.xaxis.axisTicks.height,a.config.xaxis.position==="top"&&(t=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new X(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var s=0;s<i;s++)a=this.xaxisLabels[s].position,t.push(a);else for(var r=i,n=0;n<r;n++){var o=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(o-=1),a+=e.globals.gridWidth/o,t.push(a)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new X(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var n=0;n<a.length;n++){var o=t.rotateAroundCenter(a[n]);o.y=o.y-1,o.x=o.x+1,a[n].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),a[n].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var h=a[n].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(h,function(f){t.placeTextWithEllipsis(f,f.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var f=e.globals.gridWidth/(e.globals.labels.length+1),x=0;x<a.length;x++){var b=a[x].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(b,function(v){t.placeTextWithEllipsis(v,v.textContent,f)})}})();if(s.length>0){var c=s[s.length-1].getBBox(),d=s[0].getBBox();c.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var g=0;g<r.length;g++)t.placeTextWithEllipsis(r[g],r[g].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),p}(),Rt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w;var t=this.w;this.xaxisLabels=t.globals.labels.slice(),this.axesUtils=new ge(e),this.isRangeBar=t.globals.seriesRange.length&&t.globals.isBarHorizontal,t.globals.timescaleLabels.length>0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return R(p,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=this.w,i=new X(this.ctx);e===null&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),s=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(s),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new X(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var s=0;e.config.stroke.width.forEach(function(d){s=Math.max(s,d)}),a=s}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var r=e.config.chart.type,n=0,o=0;(r==="bar"||r==="rangeBar"||r==="candlestick"||r==="boxPlot"||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(n=e.config.grid.padding.left,o=e.config.grid.padding.right,t.barPadForNumericAxis>n&&(n=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a/2-n-2,-a/2-2,t.gridWidth+a+o+n+4,t.gridHeight+a+4,0,"#fff");var h=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-h,2*-h,t.gridWidth+4*h,t.gridHeight+4*h,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,a=e.y1,s=e.x2,r=e.y2,n=e.xCount,o=e.parent,h=this.w;if(!(t===0&&h.globals.skipFirstTimelinelabel||t===n-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||h.config.chart.type==="radar")){h.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var c=0;if(h.globals.hasXaxisGroups&&h.config.xaxis.tickPlacement==="between"){var d=h.globals.groups;if(d){for(var g=0,f=0;g<t&&f<d.length;f++)g+=d[f].cols;g===t&&(c=.6*h.globals.xAxisLabelsHeight)}}new Me(this.ctx).drawXaxisTicks(i,c,h.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var t=e.i,i=e.x1,a=e.y1,s=e.x2,r=e.y2,n=e.xCount,o=e.parent,h=this.w,c=!1,d=o.node.classList.contains("apexcharts-gridlines-horizontal"),g=h.config.grid.strokeDashArray,f=h.globals.barPadForNumericAxis;(a===0&&r===0||i===0&&s===0)&&(c=!0),a===h.globals.gridHeight&&r===h.globals.gridHeight&&(c=!0),!h.globals.isBarHorizontal||t!==0&&t!==n-1||(c=!0);var x=new X(this).drawLine(i-(d?f:0),a,s+(d?f:0),r,h.config.grid.borderColor,g);x.node.classList.add("apexcharts-gridline"),c&&h.config.grid.show?this.elGridBorders.add(x):o.add(x)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,i=e.x1,a=e.y1,s=e.x2,r=e.y2,n=e.type,o=this.w,h=new X(this.ctx),c=o.globals.barPadForNumericAxis,d=o.config.grid[n].colors[t],g=h.drawRect(i-(n==="row"?c:0),a,s+(n==="row"?2*c:0),r,0,d,o.config.grid[n].opacity);this.elg.add(g),g.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),g.node.classList.add("apexcharts-grid-".concat(n))}},{key:"_drawXYLines",value:function(e){var t=this,i=e.xCount,a=e.tickAmount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){var r,n=s.globals.padHorizontal,o=s.globals.gridHeight;s.globals.timescaleLabels.length?function(x){for(var b=x.xC,v=x.x1,y=x.y1,w=x.x2,l=x.y2,u=0;u<b;u++)v=t.xaxisLabels[u].position,w=t.xaxisLabels[u].position,t._drawGridLines({i:u,x1:v,y1:y,x2:w,y2:l,xCount:i,parent:t.elgridLinesV})}({xC:i,x1:n,y1:0,x2:r,y2:o}):(s.globals.isXNumeric&&(i=s.globals.xAxisScale.result.length),function(x){for(var b=x.xC,v=x.x1,y=x.y1,w=x.x2,l=x.y2,u=0;u<b+(s.globals.isXNumeric?0:1);u++)u===0&&b===1&&s.globals.dataPoints===1&&(w=v=s.globals.gridWidth/2),t._drawGridLines({i:u,x1:v,y1:y,x2:w,y2:l,xCount:i,parent:t.elgridLinesV}),w=v+=s.globals.gridWidth/(s.globals.isXNumeric?b-1:b)}({xC:i,x1:n,y1:0,x2:r,y2:o}))}if(s.config.grid.yaxis.lines.show){var h=0,c=0,d=s.globals.gridWidth,g=a+1;this.isRangeBar&&(g=s.globals.labels.length);for(var f=0;f<g+(this.isRangeBar?1:0);f++)this._drawGridLine({i:f,xCount:g+(this.isRangeBar?1:0),x1:0,y1:h,x2:d,y2:c,parent:this.elgridLinesH}),c=h+=s.globals.gridHeight/(this.isRangeBar?g:a)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,s=i.globals.padHorizontal,r=i.globals.gridHeight,n=0;n<t+1;n++)i.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,xCount:t+1,x1:s,y1:0,x2:a,y2:r,parent:this.elgridLinesV}),new Me(this.ctx).drawXaxisTicks(s,0,i.globals.dom.elGraphical),a=s+=i.globals.gridWidth/t;if(i.config.grid.yaxis.lines.show)for(var o=0,h=0,c=i.globals.gridWidth,d=0;d<i.globals.dataPoints+1;d++)this._drawGridLine({i:d,xCount:i.globals.dataPoints+1,x1:0,y1:o,x2:c,y2:h,parent:this.elgridLinesH}),h=o+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=e.globals,i=new X(this.ctx);this.elg=i.group({class:"apexcharts-grid"}),this.elgridLinesH=i.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=i.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=i.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var a=0;a<t.seriesYAxisMap.length&&t.ignoreYAxisIndexes.indexOf(a)!==-1;)a++;a===t.seriesYAxisMap.length&&(a=0);var s,r=t.yAxisScale[a].result.length-1;if(!t.isBarHorizontal||this.isRangeBar){var n,o,h;s=this.xaxisLabels.length,this.isRangeBar&&(r=t.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(s=e.config.xaxis.tickAmount),((n=t.yAxisScale)===null||n===void 0||(o=n[a])===null||o===void 0||(h=o.result)===null||h===void 0?void 0:h.length)>0&&e.config.xaxis.type!=="datetime"&&(s=t.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=t.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.gridWidth/s}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(i.config.grid.row.colors!==void 0&&i.config.grid.row.colors.length>0)for(var a=0,s=i.globals.gridHeight/t,r=i.globals.gridWidth,n=0,o=0;n<t;n++,o++)o>=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:r,y2:s,type:"row"}),a+=i.globals.gridHeight/t;if(i.config.grid.column.colors!==void 0&&i.config.grid.column.colors.length>0){var h=i.globals.isBarHorizontal||i.config.xaxis.tickPlacement!=="on"||i.config.xaxis.type!=="category"&&!i.config.xaxis.convertedCatToNumeric?e:e-1;i.globals.isXNumeric&&(h=i.globals.xAxisScale.result.length-1);for(var c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/h,g=i.globals.gridHeight,f=0,x=0;f<e;f++,x++){var b;x>=i.config.grid.column.colors.length&&(x=0),i.config.xaxis.type==="datetime"&&(c=this.xaxisLabels[f].position,d=(((b=this.xaxisLabels[f+1])===null||b===void 0?void 0:b.position)||i.globals.gridWidth)-this.xaxisLabels[f].position),this._drawGridBandRect({c:x,x1:c,y1:0,x2:d,y2:g,type:"column"}),c+=i.globals.gridWidth/h}}}}]),p}(),Ot=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"niceScale",value:function(e,t){var i,a,s,r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=1e-11,h=this.w,c=h.globals;c.isBarHorizontal?(i=h.config.xaxis,a=Math.max((c.svgWidth-100)/25,2)):(i=h.config.yaxis[n],a=Math.max((c.svgHeight-100)/15,2)),P.isNumber(a)||(a=10),s=i.min!==void 0&&i.min!==null,r=i.max!==void 0&&i.min!==null;var d=i.stepSize!==void 0&&i.stepSize!==null,g=i.tickAmount!==void 0&&i.tickAmount!==null,f=g?i.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!g&&c.multiAxisTickAmount>0&&(f=c.multiAxisTickAmount,g=!0),f=f==="dataPoints"?c.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&t===0||!P.isNumber(e)&&!P.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=P.isNumber(i.min)?i.min:0,t=P.isNumber(i.max)?i.max:e+f,c.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var x=t;t=e,e=x}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);var b=[];f<1&&(f=1);var v=f,y=Math.abs(t-e);!s&&e>0&&e/y<.15&&(e=0,s=!0),!r&&t<0&&-t/y<.15&&(t=0,r=!0);var w=(y=Math.abs(t-e))/v,l=w,u=Math.floor(Math.log10(l)),m=Math.pow(10,u),A=Math.ceil(l/m);if(w=l=(A=c.niceScaleAllowedMagMsd[c.yValueDecimal===0?0:1][A])*m,c.isBarHorizontal&&i.stepSize&&i.type!=="datetime"?(w=i.stepSize,d=!0):d&&(w=i.stepSize),d&&i.forceNiceScale){var k=Math.floor(Math.log10(w));w*=Math.pow(10,u-k)}if(s&&r){var S=y/v;if(g)if(d)if(P.mod(y,w)!=0){var L=P.getGCD(w,S);w=S/L<10?L:S}else P.mod(w,S)==0?w=S:(S=w,g=!1);else w=S;else if(d)P.mod(y,w)==0?S=w:w=S;else if(P.mod(y,w)==0)S=w;else{S=y/(v=Math.ceil(y/w));var C=P.getGCD(y,w);y/C<a&&(S=C),w=S}v=Math.round(y/w)}else{if(s||r){if(r)if(g)e=t-w*v;else{var I=e;e=w*Math.floor(e/w),Math.abs(t-e)/P.getGCD(y,w)>a&&(e=t-w*f,e+=w*Math.floor((I-e)/w))}else if(s)if(g)t=e+w*v;else{var z=t;t=w*Math.ceil(t/w),Math.abs(t-e)/P.getGCD(y,w)>a&&(t=e+w*f,t+=w*Math.ceil((z-t)/w))}}else if(c.isMultipleYAxis&&g){var M=w*Math.floor(e/w),T=M+w*v;T<t&&(w*=2),T=t,t=(e=M)+w*v,y=Math.abs(t-e),e>0&&e<Math.abs(T-t)&&(e=0,t=w*v),t<0&&-t<Math.abs(M-e)&&(t=0,e=-w*v)}else e=w*Math.floor(e/w),t=w*Math.ceil(t/w);y=Math.abs(t-e),w=P.getGCD(y,w),v=Math.round(y/w)}if(g||s||r||(v=Math.ceil((y-o)/(w+o)))>16&&P.getPrimeFactors(v).length<2&&v++,!g&&i.forceNiceScale&&c.yValueDecimal===0&&v>y&&(v=y,w=Math.round(y/v)),v>a&&(!g&&!d||i.forceNiceScale)){var E=P.getPrimeFactors(v),O=E.length-1,D=v;e:for(var H=0;H<O;H++)for(var W=0;W<=O-H;W++){for(var N=Math.min(W+H,O),B=D,q=1,Z=W;Z<=N;Z++)q*=E[Z];if((B/=q)<a){D=B;break e}}w=D===v?y:y/D,v=Math.round(y/w)}c.isMultipleYAxis&&c.multiAxisTickAmount==0&&c.ignoreYAxisIndexes.indexOf(n)<0&&(c.multiAxisTickAmount=v);var j=e-w,se=w*o;do j+=w,b.push(P.stripNumber(j,7));while(t-j>se);return{result:b,niceMin:b[0],niceMax:b[b.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,r=Math.abs(t-e),n=[];if(e===t)return{result:n=[e],niceMin:n[0],niceMax:n[n.length-1]};(i=this._adjustTicksForSmallRange(i,a,r))==="dataPoints"&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=e;i>=0;)n.push(o),o=P.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],s=Math.ceil(Math.log(t)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r<s;r++)a.push(Math.pow(i,r));return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],s=Math.log(t)/Math.log(i),r=Math.log(e)/Math.log(i),n=s-r,o=Math.round(n),h=n/o,c=0,d=r;c<o;c++,d+=h)a.push(Math.pow(i,d));return a.push(Math.pow(i,s)),{result:a,niceMin:e,niceMax:t}}},{key:"_adjustTicksForSmallRange",value:function(e,t,i){var a=e;if(t!==void 0&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){var s=Number(this.w.config.yaxis[t].labels.formatter(1));P.isNumber(s)&&this.w.globals.yValueDecimal===0&&(a=Math.ceil(i))}return a<e?a:e}},{key:"setYScaleForIndex",value:function(e,t,i){var a=this.w.globals,s=this.w.config,r=a.isBarHorizontal?s.xaxis:s.yaxis[e];a.yAxisScale[e]===void 0&&(a.yAxisScale[e]=[]);var n=Math.abs(i-t);r.logarithmic&&n<=5&&(a.invalidLogScale=!0),r.logarithmic&&n>5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(t,i,r.logBase):this.logarithmicScale(t,i,r.logBase)):i!==-Number.MAX_VALUE&&P.isNumber(i)&&t!==Number.MAX_VALUE&&P.isNumber(t)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,i,e)):a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,s=Math.abs(t-e);if(t!==-Number.MAX_VALUE&&P.isNumber(t)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(e,t,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],s=[],r=e.series.length>t.yaxis.length||t.yaxis.some(function(d){return Array.isArray(d.seriesName)});t.series.forEach(function(d,g){s.push(g),a.push(null)}),t.yaxis.forEach(function(d,g){i[g]=[]});var n=[];t.yaxis.forEach(function(d,g){var f=!1;if(d.seriesName){var x=[];Array.isArray(d.seriesName)?x=d.seriesName:x.push(d.seriesName),x.forEach(function(b){t.series.forEach(function(v,y){if(v.name===b){var w=y;g===y||r?!r||s.indexOf(y)>-1?i[g].push([g,y]):console.warn("Series '"+v.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."):(i[y].push([y,g]),w=g),f=!0,(w=s.indexOf(w))!==-1&&s.splice(w,1)}})})}f||n.push(g)}),i=i.map(function(d,g){var f=[];return d.forEach(function(x){a[x[1]]=x[0],f.push(x[1])}),f});for(var o=t.yaxis.length-1,h=0;h<n.length&&(o=n[h],i[o]=[],s);h++){var c=s[0];s.shift(),i[o].push(c),a[c]=o}s.forEach(function(d){i[o].push(d),a[d]=o}),e.seriesYAxisMap=i.map(function(d){return d}),e.seriesYAxisReverseMap=a.map(function(d){return d})}},{key:"scaleMultipleYAxes",value:function(){var e=this,t=this.w.config,i=this.w.globals;this.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach(function(n,o){var h=[];n.forEach(function(c){var d=t.series[c].group;h.indexOf(d)<0&&h.push(d)}),n.length>0?function(){var c,d,g=Number.MAX_VALUE,f=-Number.MAX_VALUE,x=g,b=f;if(t.chart.stacked)(function(){var w=i.seriesX[n[0]],l=[],u=[],m=[];h.forEach(function(){l.push(w.map(function(){return Number.MIN_VALUE})),u.push(w.map(function(){return Number.MIN_VALUE})),m.push(w.map(function(){return Number.MIN_VALUE}))});for(var A=function(S){!c&&t.series[n[S]].type&&(c=t.series[n[S]].type);var L=n[S];d=t.series[L].group?t.series[L].group:"axis-".concat(o),!(i.collapsedSeriesIndices.indexOf(L)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(L)<0)||(i.allSeriesCollapsed=!1,h.forEach(function(C,I){if(t.series[L].group===C)for(var z=0;z<i.series[L].length;z++){var M=i.series[L][z];M>=0?u[I][z]+=M:m[I][z]+=M,l[I][z]+=M,x=Math.min(x,M),b=Math.max(b,M)}})),c!=="bar"&&c!=="column"||i.barGroups.push(d)},k=0;k<n.length;k++)A(k);c||(c=t.chart.type),c==="bar"||c==="column"?h.forEach(function(S,L){g=Math.min(g,Math.min.apply(null,m[L])),f=Math.max(f,Math.max.apply(null,u[L]))}):(h.forEach(function(S,L){x=Math.min(x,Math.min.apply(null,l[L])),b=Math.max(b,Math.max.apply(null,l[L]))}),g=x,f=b),g===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)})();else for(var v=0;v<n.length;v++){var y=n[v];g=Math.min(g,s[y]),f=Math.max(f,r[y]),!(i.collapsedSeriesIndices.indexOf(y)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(y)<0)||(i.allSeriesCollapsed=!1)}t.yaxis[o].min!==void 0&&(g=typeof t.yaxis[o].min=="function"?t.yaxis[o].min(g):t.yaxis[o].min),t.yaxis[o].max!==void 0&&(f=typeof t.yaxis[o].max=="function"?t.yaxis[o].max(f):t.yaxis[o].max),i.barGroups=i.barGroups.filter(function(w,l,u){return u.indexOf(w)===l}),e.setYScaleForIndex(o,g,f),n.forEach(function(w){s[w]=i.yAxisScale[o].niceMin,r[w]=i.yAxisScale[o].niceMax})}():e.setYScaleForIndex(o,0,-Number.MAX_VALUE)})}}]),p}(),rt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.scales=new Ot(e)}return R(p,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;a===null&&(a=e+1);var h=r.series,c=h,d=h;s.chart.type==="candlestick"?(c=r.seriesCandleL,d=r.seriesCandleH):s.chart.type==="boxPlot"?(c=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(c=r.seriesRangeStart,d=r.seriesRangeEnd);var g=!1;if(r.seriesX.length>=a){var f,x=(f=r.brushSource)===null||f===void 0?void 0:f.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||x!=null&&x.enabled&&x!=null&&x.autoScaleYaxis)&&(g=!0)}for(var b=e;b<a;b++){r.dataPoints=Math.max(r.dataPoints,h[b].length);var v=s.series[b].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(m){return m!==void 0}).length),r.labels.length&&s.xaxis.type!=="datetime"&&r.series.reduce(function(m,A){return m+A.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var y=0,w=h[b].length-1;if(g){if(s.xaxis.min)for(;y<w&&r.seriesX[b][y]<s.xaxis.min;y++);if(s.xaxis.max)for(;w>y&&r.seriesX[b][w]>s.xaxis.max;w--);}for(var l=y;l<=w&&l<r.series[b].length;l++){var u=h[b][l];if(u!==null&&P.isNumber(u)){switch(d[b][l]!==void 0&&(n=Math.max(n,d[b][l]),t=Math.min(t,d[b][l])),c[b][l]!==void 0&&(t=Math.min(t,c[b][l]),i=Math.max(i,c[b][l])),v){case"candlestick":r.seriesCandleC[b][l]!==void 0&&(n=Math.max(n,r.seriesCandleH[b][l]),t=Math.min(t,r.seriesCandleL[b][l]));break;case"boxPlot":r.seriesCandleC[b][l]!==void 0&&(n=Math.max(n,r.seriesCandleC[b][l]),t=Math.min(t,r.seriesCandleO[b][l]))}v&&v!=="candlestick"&&v!=="boxPlot"&&v!=="rangeArea"&&v!=="rangeBar"&&(n=Math.max(n,r.series[b][l]),t=Math.min(t,r.series[b][l])),i=n,r.seriesGoals[b]&&r.seriesGoals[b][l]&&Array.isArray(r.seriesGoals[b][l])&&r.seriesGoals[b][l].forEach(function(m){o!==Number.MIN_VALUE&&(o=Math.min(o,m.value),t=o),n=Math.max(n,m.value),i=n}),P.isFloat(u)&&(u=P.noExponents(u),r.yValueDecimal=Math.max(r.yValueDecimal,u.toString().split(".")[1].length)),o>c[b][l]&&c[b][l]<0&&(o=c[b][l])}else r.hasNullValues=!0}v!=="bar"&&v!=="column"||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,t=Math.min(t,0)))}return s.chart.type==="rangeBar"&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=t),s.chart.type==="bar"&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(e.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;s<e.series.length;s++)i=this.getMinYMaxY(s),e.minYArr[s]=i.lowestY,e.maxYArr[s]=i.highestY,a=Math.min(a,i.lowestY)}return i=this.getMinYMaxY(0,a,null,e.series.length),t.chart.type==="bar"?(e.minY=i.minY,e.maxY=i.maxY):(e.minY=i.lowestY,e.maxY=i.highestY),a=i.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type==="line"||t.chart.type==="area"||t.chart.type==="scatter"||t.chart.type==="candlestick"||t.chart.type==="boxPlot"||t.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&a!==-Number.MAX_VALUE&&a!==e.maxY&&(e.minY=a):e.minY=i.minY,t.yaxis.forEach(function(r,n){r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[n]=r.max:typeof r.max=="function"&&(e.maxYArr[n]=r.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[n]=r.min:typeof r.min=="function"&&(e.minYArr[n]=r.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])}),e.isBarHorizontal&&["min","max"].forEach(function(r){t.xaxis[r]!==void 0&&typeof t.xaxis[r]=="number"&&(r==="min"?e.minY=t.xaxis[r]:e.maxY=t.xaxis[r])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=a):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(function(r){switch(r.type||t.chart.type){case"bar":case"column":e.barGroups.push(r.group);break;case"line":e.lineGroups.push(r.group);break;case"area":e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter(function(r,n,o){return o.indexOf(r)===n}),e.lineGroups=e.lineGroups.filter(function(r,n,o){return o.indexOf(r)===n}),e.areaGroups=e.areaGroups.filter(function(r,n,o){return o.indexOf(r)===n}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i=t.xaxis.type==="numeric"||t.xaxis.type==="datetime"||t.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var o=0;o<e.series.length;o++)if(e.labels[o])for(var h=0;h<e.labels[o].length;h++)e.labels[o][h]!==null&&P.isNumber(e.labels[o][h])&&(e.maxX=Math.max(e.maxX,e.labels[o][h]),e.initialMaxX=Math.max(e.maxX,e.labels[o][h]),e.minX=Math.min(e.minX,e.labels[o][h]),e.initialMinX=Math.min(e.minX,e.labels[o][h]))}(),e.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var a=10;if(t.xaxis.tickAmount===void 0)a=Math.round(e.svgWidth/150),t.xaxis.type==="numeric"&&e.dataPoints<30&&(a=e.dataPoints-1),a>e.dataPoints&&e.dataPoints!==0&&(a=e.dataPoints-1);else if(t.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var s=e.maxX-e.minX;s<30&&(a=s-1)}}else a=t.xaxis.tickAmount;if(e.xTickAmount=a,t.xaxis.max!==void 0&&typeof t.xaxis.max=="number"&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min=="number"&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],n=e.minX-1;n<e.maxX;n++)r.push(n+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,a,a,0,t.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1,0,t.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var t=0;t<e.series.length;t++)if(e.seriesZ[t]!==void 0)for(var i=0;i<e.seriesZ[t].length;i++)e.seriesZ[t][i]!==null&&P.isNumber(e.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][i]),e.minZ=Math.min(e.minZ,e.seriesZ[t][i]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var i=new K(this.ctx);if(t.xaxis.type==="datetime"){var a=i.getDate(e.minX);t.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),e.minX=new Date(a).getTime();var s=i.getDate(e.maxX);t.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()+2):s.setDate(s.getDate()+2),e.maxX=new Date(s).getTime()}else(t.xaxis.type==="numeric"||t.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(t,i){t.length===1&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var a=t.slice();a.sort(function(s,r){return s-r}),a.forEach(function(s,r){if(r>0){var n=s-a[r-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var e=this,t=this.w.globals;if(t.series.length){var i=t.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(r){return r})]);var a={},s={};i.forEach(function(r){a[r]=[],s[r]=[],e.w.config.series.map(function(n,o){return r.indexOf(t.seriesNames[o])>-1?o:null}).filter(function(n){return n!==null}).forEach(function(n){for(var o=0;o<t.series[t.maxValsInArrayIndex].length;o++){var h,c,d,g;a[r][o]===void 0&&(a[r][o]=0,s[r][o]=0),(e.w.config.chart.stacked&&!t.comboCharts||e.w.config.chart.stacked&&t.comboCharts&&(!e.w.config.chart.stackOnlyBar||((h=e.w.config.series)===null||h===void 0||(c=h[n])===null||c===void 0?void 0:c.type)==="bar"||((d=e.w.config.series)===null||d===void 0||(g=d[n])===null||g===void 0?void 0:g.type)==="column"))&&t.series[n][o]!==null&&P.isNumber(t.series[n][o])&&(t.series[n][o]>0?a[r][o]+=parseFloat(t.series[n][o])+1e-4:s[r][o]+=parseFloat(t.series[n][o]))}})}),Object.entries(a).forEach(function(r){var n=It(r,1)[0];a[n].forEach(function(o,h){t.maxY=Math.max(t.maxY,a[n][h]),t.minY=Math.min(t.minY,s[n][h])})})}}}]),p}(),lt=function(){function p(e,t){F(this,p),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,i.config.xaxis.position==="bottom"&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new ge(e)}return R(p,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=i.config.yaxis[e].labels.style,r=s.fontSize,n=s.fontFamily,o=s.fontWeight,h=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return h;var c=a.group({class:"apexcharts-yaxis-texts-g"});h.add(c);var d=i.globals.yAxisScale[e].result.length-1,g=i.globals.gridHeight/d,f=i.globals.yLabelFormatters[e],x=i.globals.yAxisScale[e].result.slice();x=this.axesUtils.checkForReversedLabels(e,x);var b="";if(i.config.yaxis[e].labels.show){var v=i.globals.translateY+i.config.yaxis[e].labels.offsetY;i.globals.isBarHorizontal?v=0:i.config.chart.type==="heatmap"&&(v-=g/2),v+=parseInt(i.config.yaxis[e].labels.style.fontSize,10)/3;for(var y=function(L){var C=x[L];C=f(C,L,i);var I=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&i.config.yaxis.length!==0&&(I*=-1);var z="end";i.config.yaxis[e].opposite&&(z="start"),i.config.yaxis[e].labels.align==="left"?z="start":i.config.yaxis[e].labels.align==="center"?z="middle":i.config.yaxis[e].labels.align==="right"&&(z="end");var M=t.axesUtils.getYAxisForeColor(s.colors,e),T=P.listToArray(i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(W){return W.textContent}),E=a.drawText({x:I,y:v,text:T.indexOf(C)>=0?"":C,textAnchor:z,fontSize:r,fontFamily:n,fontWeight:o,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:Array.isArray(M)?M[L]:M,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+s.cssClass});L===d&&(b=E),c.add(E);var O=document.createElementNS(i.globals.SVGNS,"title");if(O.textContent=Array.isArray(C)?C.join(" "):C,E.node.appendChild(O),i.config.yaxis[e].labels.rotate!==0){var D=a.rotateAroundCenter(b.node),H=a.rotateAroundCenter(E.node);E.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(D.x," ").concat(H.y,")"))}v+=g},w=d;w>=0;w--)y(w)}if(i.config.yaxis[e].title.text!==void 0){var l=a.group({class:"apexcharts-yaxis-title"}),u=0;i.config.yaxis[e].opposite&&(u=i.globals.translateYAxisX[e]);var m=a.drawText({x:u,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});l.add(m),h.add(l)}var A=i.config.yaxis[e].axisBorder,k=31+A.offsetX;if(i.config.yaxis[e].opposite&&(k=-31-A.offsetX),A.show){var S=a.drawLine(k,i.globals.translateY+A.offsetY-2,k,i.globals.gridHeight+i.globals.translateY+A.offsetY+2,A.color,0,A.width);h.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,d,A,i.config.yaxis[e].axisTicks,e,g,h),h}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(s);var r=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/r+.1,o=n+t.config.xaxis.labels.offsetX,h=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),d=t.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),r=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var g=d.length;if(t.config.xaxis.labels.show)for(var f=g?0:r;g?f<g:f>=0;g?f++:f--){var x=c[f];x=h(x,f,t);var b=t.globals.gridWidth+t.globals.padHorizontal-(o-n+t.config.xaxis.labels.offsetX);if(d.length){var v=this.axesUtils.getLabel(c,d,b,f,this.drawnLabels,this.xaxisFontSize);b=v.x,x=v.text,this.drawnLabels.push(v.text),f===0&&t.globals.skipFirstTimelinelabel&&(x=""),f===c.length-1&&t.globals.skipLastTimelinelabel&&(x="")}var y=i.drawText({x:b,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position==="top"?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:x,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});s.add(y),y.tspan(x);var w=document.createElementNS(t.globals.SVGNS,"title");w.textContent=x,y.node.appendChild(w),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new X(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var s=0;t.config.chart.type==="bar"&&t.globals.isXNumeric&&(s-=15);var r=i.drawLine(t.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new X(this.ctx);if(t.config.xaxis.title.text!==void 0){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,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});a.add(s),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new X(this.ctx),s={width:0,height:0},r={width:0,height:0},n=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));n!==null&&(s=n.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(o!==null&&(r=o.getBoundingClientRect()),o!==null){var h=this.xPaddingForYAxisTitle(e,s,r,t);o.setAttribute("x",h.xPos-(t?10:0))}if(o!==null){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var s=this.w,r=0,n=0,o=10;return s.config.yaxis[e].title.text===void 0||e<0?{xPos:n,padd:0}:(a?(n=t.width+s.config.yaxis[e].title.offsetX+i.width/2+o/2,(r+=1)===0&&(n-=o/2)):(n=-1*t.width+s.config.yaxis[e].title.offsetX+o/2+i.width/2,s.globals.isBarHorizontal&&(o=25,n=-1*t.width-s.config.yaxis[e].title.offsetX-o)),{xPos:n,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map(function(o,h){var c=i.globals.ignoreYAxisIndexes.indexOf(h)>-1||!o.show||o.floating||e[h].width===0,d=e[h].width+t[h].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[h]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,c||(n=n+d+20),i.globals.translateYAxisX[h]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,c||(r=r+d+20),i.globals.translateYAxisX[h]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=P.listToArray(t)).forEach(function(i,a){var s=e.config.yaxis[a];if(s&&!s.floating&&s.labels.align!==void 0){var r=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"));n=P.listToArray(n);var o=r.getBoundingClientRect();s.labels.align==="left"?(n.forEach(function(h,c){h.setAttribute("text-anchor","start")}),s.opposite||r.setAttribute("transform","translate(-".concat(o.width,", 0)"))):s.labels.align==="center"?(n.forEach(function(h,c){h.setAttribute("text-anchor","middle")}),r.setAttribute("transform","translate(".concat(o.width/2*(s.opposite?1:-1),", 0)"))):s.labels.align==="right"&&(n.forEach(function(h,c){h.setAttribute("text-anchor","end")}),s.opposite&&r.setAttribute("transform","translate(".concat(o.width,", 0)")))}})}}]),p}(),Oi=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.documentEvent=P.bind(this.documentEvent,this)}return R(p,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);a!==-1&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],s=a.length,r=0;r<s;r++)a[r].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,i=this.ctx,a=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(function(s){a.addEventListener(s,function(r){var n=Object.assign({},t,{seriesIndex:t.globals.axisCharts?t.globals.capturedSeriesIndex:0,dataPointIndex:t.globals.capturedDataPointIndex});r.type==="mousemove"||r.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(r,i,n):r.type==="mouseleave"||r.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(r,i,n):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(r,i,n),i.ctx.events.fireEvent("click",[r,i,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(s){t.globals.dom.baseEl.addEventListener(s,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,i=e.target.className;if(e.type==="click"){var a=t.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&a.classList.remove("apexcharts-menu-open")}t.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,t.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),p}(),Di=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(s){return s.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=P.extend(Xt,i);this.w.globals.locale=a.options}}]),p}(),Hi=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"drawAxis",value:function(e,t){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Me(this.ctx,t),h=new lt(this.ctx,t);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(a=h.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map(function(c,d){if(r.ignoreYAxisIndexes.indexOf(d)===-1&&(a=h.drawYaxis(d),r.dom.Paper.add(a),s.w.config.grid.position==="back")){var g=r.dom.Paper.children()[1];g.remove(),r.dom.Paper.add(g)}})))}}]),p}(),nt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new X(this.ctx),i=new ie(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,s=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,h=a.opacityFrom,c=a.opacityTo,d=a.stops,g=s.enabled,f=s.left,x=s.top,b=s.blur,v=s.color,y=s.opacity,w=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(w=t.drawGradient("vertical",n,o,h,c,null,d,null));var l=t.drawRect();e.config.xaxis.crosshairs.width===1&&(l=t.drawLine());var u=e.globals.gridHeight;(!P.isNumber(u)||u<0)&&(u=0);var m=e.config.xaxis.crosshairs.width;(!P.isNumber(m)||m<0)&&(m=0),l.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:u,width:m,height:u,fill:w,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),g&&(l=i.dropShadow(l,{left:f,top:x,blur:b,color:v,opacity:y})),e.globals.dom.elGraphical.add(l)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new X(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(s)}var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),p}(),Ni=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(a.responsive.length!==0){var s=a.responsive.slice();s.sort(function(h,c){return h.breakpoint>c.breakpoint?1:c.breakpoint>h.breakpoint?-1:0}).reverse();var r=new Pe({}),n=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=s[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>c){var g=P.clone(i.globals.initialConfig);g.series=P.clone(i.config.series);var f=$.extendArrayProps(r,g,i);h=P.extend(f,h),h=P.extend(i.config,h),t.overrideResponsiveOptions(h)}else for(var x=0;x<s.length;x++)d<s[x].breakpoint&&(h=$.extendArrayProps(r,s[x].options,i),h=P.extend(i.config,h),t.overrideResponsiveOptions(h))};if(e){var o=$.extendArrayProps(r,e,i);o=P.extend(i.config,o),n(o=P.extend(o,e))}else n({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new Pe(e).init({responsiveOverride:!0});this.w.config=t}}]),p}(),Wi=function(){function p(e){F(this,p),this.ctx=e,this.colors=[],this.w=e.w;var t=this.w;this.isColorFn=!1,this.isHeatmapDistributed=t.config.chart.type==="treemap"&&t.config.plotOptions.treemap.distributed||t.config.chart.type==="heatmap"&&t.config.plotOptions.heatmap.distributed,this.isBarDistributed=t.config.plotOptions.bar.distributed&&(t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")}return R(p,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e,t=this,i=this.w,a=new P;if(i.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(i.config.theme.mode)),i.config.colors===void 0||((e=i.config.colors)===null||e===void 0?void 0:e.length)===0?i.globals.colors=this.predefined():(i.globals.colors=i.config.colors,Array.isArray(i.config.colors)&&i.config.colors.length>0&&typeof i.config.colors[0]=="function"&&(i.globals.colors=i.config.series.map(function(x,b){var v=i.config.colors[b];return v||(v=i.config.colors[0]),typeof v=="function"?(t.isColorFn=!0,v({value:i.globals.axisCharts?i.globals.series[b][0]?i.globals.series[b][0]:0:i.globals.series[b],seriesIndex:b,dataPointIndex:b,w:i})):v}))),i.globals.seriesColors.map(function(x,b){x&&(i.globals.colors[b]=x)}),i.config.theme.monochrome.enabled){var s=[],r=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=i.globals.series[0].length*i.globals.series.length);for(var n=i.config.theme.monochrome.color,o=1/(r/i.config.theme.monochrome.shadeIntensity),h=i.config.theme.monochrome.shadeTo,c=0,d=0;d<r;d++){var g=void 0;h==="dark"?(g=a.shadeColor(-1*c,n),c+=o):(g=a.shadeColor(c,n),c+=o),s.push(g)}i.globals.colors=s.slice()}var f=i.globals.colors.slice();this.pushExtraColors(i.globals.colors),["fill","stroke"].forEach(function(x){i.config[x].colors===void 0?i.globals[x].colors=t.isColorFn?i.config.colors:f:i.globals[x].colors=i.config[x].colors.slice(),t.pushExtraColors(i.globals[x].colors)}),i.config.dataLabels.style.colors===void 0?i.globals.dataLabels.style.colors=f:i.globals.dataLabels.style.colors=i.config.dataLabels.style.colors.slice(),this.pushExtraColors(i.globals.dataLabels.style.colors,50),i.config.plotOptions.radar.polygons.fill.colors===void 0?i.globals.radarPolygons.fill.colors=[i.config.theme.mode==="dark"?"#424242":"none"]:i.globals.radarPolygons.fill.colors=i.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(i.globals.radarPolygons.fill.colors,20),i.config.markers.colors===void 0?i.globals.markers.colors=f:i.globals.markers.colors=i.config.markers.colors.slice(),this.pushExtraColors(i.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=t||a.globals.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||a.config.chart.type==="heatmap"&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.length<s)for(var r=s-e.length,n=0;n<r;n++)e.push(e[n])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode,i=t==="dark"?"palette4":t==="light"?"palette1":e.theme.palette||"palette1",a=t==="dark"?"#f6f7f8":t==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=t||"light",e.chart.foreColor=a,e.theme.palette=i,e}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),p}(),Bi=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,i=e==="title"?t.config.title:t.config.subtitle,a=t.globals.svgWidth/2,s=i.offsetY,r="middle";if(i.align==="left"?(a=10,r="start"):i.align==="right"&&(a=t.globals.svgWidth-10,r="end"),a+=i.offsetX,s=s+parseInt(i.style.fontSize,10)+i.margin/2,i.text!==void 0){var n=new X(this.ctx).drawText({x:a,y:s,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});n.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(n)}}}]),p}(),Gi=function(){function p(e){F(this,p),this.w=e.w,this.dCtx=e}return R(p,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,i=0,a=0,s=e==="title"?t.config.title.floating:t.config.subtitle.floating,r=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(r!==null&&!s){var n=r.getBoundingClientRect();i=n.width,a=t.globals.axisCharts?n.height+5:n.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(t.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},P.getBoundingClientRect(t));return t!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:i.height===0?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,t=this.w,i=[];t.config.series.forEach(function(o,h){o.data.forEach(function(c,d){var g;g=t.globals.series[h][d],a=t.config.dataLabels.formatter(g,{ctx:e.dCtx.ctx,seriesIndex:h,dataPointIndex:d,w:t}),i.push(a)})});var a=P.getLargestStringFromArr(i),s=new X(this.dCtx.ctx),r=t.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(r,n){return Array.isArray(r)?r.length:1}),s=Math.max.apply(Math,te(a));i=t[a.indexOf(s)]}return i}}]),p}(),Vi=function(){function p(e){F(this,p),this.w=e.w,this.dCtx=e}return R(p,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&i.length===0&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=t.config.legend.position!=="left"&&t.config.legend.position!=="right"||t.config.legend.floating?0:this.dCtx.lgRect.width;var s=t.globals.xLabelFormatter,r=P.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);t.globals.isBarHorizontal&&(n=r=t.globals.yAxisScale[0].result.reduce(function(x,b){return x.length>b.length?x:b},0));var o=new ze(this.dCtx.ctx),h=r;r=o.xLabelFormat(s,r,h,{i:void 0,dateFormatter:new K(this.dCtx.ctx).formatDate,w:t}),n=o.xLabelFormat(s,n,h,{i:void 0,dateFormatter:new K(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(n=r="1");var c=new X(this.dCtx.ctx),d=c.getTextRects(r,t.config.xaxis.labels.style.fontSize),g=d;if(r!==n&&(g=c.getTextRects(n,t.config.xaxis.labels.style.fontSize)),(e={width:d.width>=g.width?d.width:g.width,height:d.height>=g.height?d.height:g.height}).width*i.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.globals.rotateXLabels=!0;var f=function(x){return c.getTextRects(x,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};d=f(r),r!==n&&(g=f(n)),e.height=(d.height>g.height?d.height:g.height)/1.5,e.width=d.width>g.width?d.width:g.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasXaxisGroups)return{width:0,height:0};var i,a=((e=t.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,s=t.globals.groups.map(function(d){return d.title}),r=P.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new X(this.dCtx.ctx),h=o.getTextRects(r,a),c=h;return r!==n&&(c=o.getTextRects(n,a)),i={width:h.width>=c.width?h.width:c.width,height:h.height>=c.height?h.height:c.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(e.config.xaxis.title.text!==void 0){var a=new X(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(s){return s.value}),a=i.reduce(function(s,r){return s===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>r.length?s:r},0);return 1.05*(e=new X(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,h=function(c,d){s.yaxis.length>1&&function(g){return a.collapsedSeriesIndices.indexOf(g)!==-1}(d)||function(g){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var f=t.dCtx.timescaleLabels[0],x=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight,b=f.position-n/1.75+t.dCtx.yAxisWidthLeft,v=i.config.legend.position==="right"&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;x>a.svgWidth-a.translateX-v&&(a.skipLastTimelinelabel=!0),b<-(g.show&&!g.floating||s.chart.type!=="bar"&&s.chart.type!=="candlestick"&&s.chart.type!=="rangeBar"&&s.chart.type!=="boxPlot"?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else r==="datetime"?t.dCtx.gridPad.right<n&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):r!=="datetime"&&t.dCtx.gridPad.right<n/2-t.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&(t.dCtx.xPadRight=n/2+1)}(c)};s.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left<n&&(t.dCtx.xPadLeft=n/2+1),t.dCtx.xPadRight=n/2+1):h(c,d)})}}]),p}(),_i=function(){function p(e){F(this,p),this.w=e.w,this.dCtx=e}return R(p,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,i=[],a=10,s=new ge(this.dCtx.ctx);return t.config.yaxis.map(function(r,n){var o={seriesIndex:n,dataPointIndex:-1,w:t},h=t.globals.yAxisScale[n],c=0;if(!s.isYAxisHidden(n)&&r.labels.show&&r.labels.minWidth!==void 0&&(c=r.labels.minWidth),!s.isYAxisHidden(n)&&r.labels.show&&h.result.length){var d=t.globals.yLabelFormatters[n],g=h.niceMin===Number.MIN_VALUE?0:h.niceMin,f=h.result.reduce(function(u,m){var A,k;return((A=String(d(u,o)))===null||A===void 0?void 0:A.length)>((k=String(d(m,o)))===null||k===void 0?void 0:k.length)?u:m},g),x=f=d(f,o);if(f!==void 0&&f.length!==0||(f=h.niceMax),t.globals.isBarHorizontal){a=0;var b=t.globals.labels.slice();f=P.getLargestStringFromArr(b),f=d(f,{seriesIndex:n,dataPointIndex:-1,w:t}),x=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,b)}var v=new X(e.dCtx.ctx),y="rotate(".concat(r.labels.rotate," 0 0)"),w=v.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,y,!1),l=w;f!==x&&(l=v.getTextRects(x,r.labels.style.fontSize,r.labels.style.fontFamily,y,!1)),i.push({width:(c>l.width||c>w.width?c:l.width>w.width?l.width:w.width)+a,height:l.height>w.height?l.height:w.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,i=[];return t.config.yaxis.map(function(a,s){if(a.show&&a.title.text!==void 0){var r=new X(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),o=r.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,n,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,s=e.globals.yAxisScale.length>1?10:0,r=new ge(this.dCtx.ctx),n=function(o,h){var c=e.config.yaxis[h].floating,d=0;o.width>0&&!c?(d=o.width+s,function(g){return e.globals.ignoreYAxisIndexes.indexOf(g)>-1}(h)&&(d=d-o.width-s)):d=c||r.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?a+=d:i+=d,t+=d};return e.globals.yLabelsCoords.map(function(o,h){n(o,h)}),e.globals.yTitleCoords.map(function(o,h){n(o,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),p}(),ji=function(){function p(e){F(this,p),this.w=e.w,this.dCtx=e}return R(p,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w,i=t.config,a=t.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(f){return f==="bar"||f==="rangeBar"||f==="candlestick"||f==="boxPlot"},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach(function(f){s(f.type)&&(o-=1)}),i.chart.stacked&&(o=1);var h=s(r)||a.comboBarCount>0,c=Math.abs(a.initialMaxX-a.initialMinX);if(h&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&c!==0){var d,g;c<=3&&(c=a.dataPoints),d=c/e,a.minXDiff&&a.minXDiff/d>0&&(g=a.minXDiff/d),g>e/2&&(g/=2),(n=g*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach(function(n){t.config[n].text!==void 0?a+=t.config[n].margin:a+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5}),!t.config.legend.show||t.config.legend.position!=="bottom"||t.config.legend.floating||t.globals.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-s.height-r.height-a,i.translateY=i.translateY+s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new ge(this.dCtx.ctx);i.config.yaxis.map(function(s,r){i.globals.ignoreYAxisIndexes.indexOf(r)!==-1||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX=i.globals.translateX-(t[r].width+e[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),p}(),Ne=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,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 Gi(this),this.dimYAxis=new _i(this),this.dimXAxis=new Vi(this),this.dimGrid=new ji(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return R(p,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,te(t.config.stroke.width)):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var n=It(r,2),o=n[0],h=n[1];e.gridPad[o]=Math.max(h,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(f,x){t.globals.yLabelsCoords.push({width:a[x].width,index:x}),t.globals.yTitleCoords.push({width:s[x].width,index:x})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var h=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;(t.config.chart.type==="radar"||this.isSparkline)&&(h=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(h=0,c=0,d=0),this.isSparkline||t.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(r);var g=function(){i.translateX=h+e.datalabelsCoords.width,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||t.config.chart.type==="treemap"?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-h-2*e.datalabelsCoords.width};switch(t.config.xaxis.position==="top"&&(d=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=d,g();break;case"top":i.translateY=this.lgRect.height+d,g();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+h+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width;break;case"right":i.translateY=d,i.translateX=h+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new lt(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s=i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){t.gridHeight=t.svgHeight-i.grid.padding.top-i.grid.padding.bottom;var o=t.dom.elWrap.getBoundingClientRect().width;return t.gridWidth=Math.min(o,t.gridHeight)-i.grid.padding.left-i.grid.padding.right,t.translateY=r,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2)}switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=r-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+r+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight=i.chart.height!=="auto"?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight=i.chart.height!=="auto"?t.svgHeight:t.gridWidth,t.translateY=r,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+e.height+t.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,h=a.globals.rotateXLabels&&a.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*n+s*o+h,this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);var c=0,d=0;a.config.yaxis.forEach(function(g){c+=g.labels.minWidth,d+=g.labels.maxWidth}),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>d&&(this.yAxisWidth=d)}}]),p}(),Ui=function(){function p(e){F(this,p),this.w=e.w,this.lgCtx=e}return R(p,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=((e=this.lgCtx.ctx)===null||e===void 0||(t=e.opts)===null||t===void 0||(i=t.chart)===null||i===void 0?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode(`
.apexcharts-legend {
display: flex;
overflow: auto;
padding: 0 10px;
}
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
flex-wrap: wrap
}
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
flex-direction: column;
bottom: 0;
}
.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 {
justify-content: flex-start;
}
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
justify-content: center;
}
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
justify-content: flex-end;
}
.apexcharts-legend-series {
cursor: pointer;
line-height: normal;
display: flex;
align-items: center;
}
.apexcharts-legend-text {
position: relative;
font-size: 14px;
}
.apexcharts-legend-text *, .apexcharts-legend-marker * {
pointer-events: none;
}
.apexcharts-legend-marker {
position: relative;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-right: 1px;
}
.apexcharts-legend-series.apexcharts-no-click {
cursor: auto;
}
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
display: none !important;
}
.apexcharts-inactive-legend {
opacity: 0.45;
}`);return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend"),t=e.offsetWidth;return{clwh:e.offsetHeight,clww:t}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||a.config.chart.type==="radialBar"){a.globals.resized=!0;var s=null,r=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(c){i.riseCollapsedSeries(c.cs,c.csi,r)}):this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if(o==="pie"||o==="polarArea"||o==="donut"){var h=a.config.plotOptions.pie.donut.labels;new X(this.lgCtx.ctx).pathMouseDown(n.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(n.members[0].node,h)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var t=e.realIndex,i=this.w,a=i.globals,s=P.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[t]],n={index:t,data:s[t].data.slice(),type:s[t].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(t));else if(a.collapsedSeriesIndices.indexOf(t)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(t);var o=a.risingSeries.indexOf(t);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:t,data:s[t]}),a.collapsedSeriesIndices.push(t);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(e){for(var t=e.seriesEl,i=e.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=t.childNodes,n=0;n<r.length;n++)r[n].classList.contains("apexcharts-series-markers-wrap")&&(r[n].classList.contains("apexcharts-hide")?r[n].classList.remove("apexcharts-hide"):r[n].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,i){var a=this.w,s=P.clone(a.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===i&&(a.globals.axisCharts?s[i].data=e[r].data.slice():s[i]=e[r].data,s[i].hidden=!1,e.splice(r,1),t.splice(r,1),a.globals.risingSeries.push(i));s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w,i=0;return t.globals.axisCharts?e.forEach(function(a,s){t.globals.collapsedSeriesIndices.indexOf(s)<0&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)<0||(e[s].data=[],i++)}):e.forEach(function(a,s){!t.globals.collapsedSeriesIndices.indexOf(s)<0&&(e[s]=0,i++)}),t.globals.allSeriesCollapsed=i===e.length,e}}]),p}(),Dt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,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 Ui(this)}return R(p,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&t.series.length===1||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),this.legendHelpers.appendToForeignObject(),i.legend.position==="bottom"||i.legend.position==="top"?this.legendAlignHorizontal():i.legend.position!=="right"&&i.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var t=e.i,i=e.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[t]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[t]):parseFloat(a.config.legend.markers.size),h=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[t]):parseFloat(a.config.legend.markers.offsetX),c=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[t]):parseFloat(a.config.legend.markers.offsetY),d=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[t]):parseFloat(a.config.legend.markers.strokeWidth),g=s.style;if(g.height=2*(o+d)+"px",g.width=2*(o+d)+"px",g.left=h+"px",g.top=c+"px",a.config.legend.markers.customHTML)g.background="transparent",g.color=i[t],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[t]&&(s.innerHTML=a.config.legend.markers.customHTML[t]()):s.innerHTML=a.config.legend.markers.customHTML();else{var f=new ye(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:t,strokeWidth:d,size:o}),x=SVG(s).size("100%","100%"),b=new X(this.ctx).drawMarker(0,0,Y(Y({},f),{},{pointFillColor:Array.isArray(i)?i[t]:f.pointFillColor,shape:n}));SVG.select(".apexcharts-legend-marker.apexcharts-marker").members.forEach(function(v){v.node.classList.contains("apexcharts-marker-triangle")?v.node.style.transform="translate(50%, 45%)":v.node.style.transform="translate(50%, 50%)"}),x.add(b)}return s}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,s=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type==="heatmap"){var r=t.config.plotOptions.heatmap.colorScale.ranges;a=r.map(function(m){return m.name?m.name:m.from+" - "+m.to}),s=r.map(function(m){return m.color})}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var n=t.globals.legendFormatter,o=t.config.legend.inverseOrder,h=o?a.length-1:0;o?h>=0:h<=a.length-1;o?h--:h++){var c,d=n(a[h],{seriesIndex:h,w:t}),g=!1,f=!1;if(t.globals.collapsedSeries.length>0)for(var x=0;x<t.globals.collapsedSeries.length;x++)t.globals.collapsedSeries[x].index===h&&(g=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var b=0;b<t.globals.ancillaryCollapsedSeriesIndices.length;b++)t.globals.ancillaryCollapsedSeriesIndices[b]===h&&(f=!0);var v=this.createLegendMarker({i:h,fillcolor:s});X.setAttrs(v,{rel:h+1,"data:collapsed":g||f}),(g||f)&&v.classList.add("apexcharts-inactive-legend");var y=document.createElement("div"),w=document.createElement("span");w.classList.add("apexcharts-legend-text"),w.innerHTML=Array.isArray(d)?d.join(" "):d;var l=t.config.legend.labels.useSeriesColors?t.globals.colors[h]:Array.isArray(t.config.legend.labels.colors)?(c=t.config.legend.labels.colors)===null||c===void 0?void 0:c[h]:t.config.legend.labels.colors;l||(l=t.config.chart.foreColor),w.style.color=l,w.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",w.style.fontWeight=t.config.legend.fontWeight,w.style.fontFamily=i||t.config.chart.fontFamily,X.setAttrs(w,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":g||f}),y.appendChild(v),y.appendChild(w);var u=new $(this.ctx);t.config.legend.showForZeroSeries||u.getSeriesTotalByIndex(h)===0&&u.seriesHaveSameValues(h)&&!u.isSeriesNull(h)&&t.globals.collapsedSeriesIndices.indexOf(h)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&y.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||u.isSeriesNull(h)&&t.globals.collapsedSeriesIndices.indexOf(h)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&y.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(y),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+t.config.legend.position),y.classList.add("apexcharts-legend-series"),y.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",X.setAttrs(y,{rel:h+1,seriesName:P.escapeString(a[h]),"data:collapsed":g||f}),(g||f)&&y.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||y.classList.add("apexcharts-no-click")}t.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var i=this.w,a=i.globals.dom.elLegendWrap,s=a.getBoundingClientRect(),r=0,n=0;if(i.config.legend.position==="bottom")n+=i.globals.svgHeight-s.height/2;else if(i.config.legend.position==="top"){var o=new Ne(this.ctx),h=o.dimHelpers.getTitleSubtitleCoords("title").height,c=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;n=n+(h>0?h-10:0)+(c>0?c-10:0)}a.style.position="absolute",r=r+e+i.config.legend.offsetX,n=n+t+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px",i.config.legend.position==="bottom"?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):i.config.legend.position==="right"&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){a.style[d]&&(a.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=this.legendHelpers.getLegendDimensions(),i=new Ne(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),s=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;e.config.legend.position==="bottom"?r=-t.clwh/1.8:e.config.legend.position==="top"&&(r=a.height+s.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendDimensions(),i=0;e.config.legend.position==="left"&&(i=20),e.config.legend.position==="right"&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(t.config.chart.type==="heatmap"||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new re(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new re(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a=e.target.getAttribute("data:collapsed")==="true",s=this.w.config.chart.events.legendClick;typeof s=="function"&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),t.config.chart.type!=="treemap"&&t.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),p}(),Ht=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w;var t=this.w;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}return R(p,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s<this.t.customIcons.length;s++)this.elCustomIcons.push(i());var r=[],n=function(d,g,f){var x=d.toLowerCase();e.t[x]&&t.config.chart.zoom.enabled&&r.push({el:g,icon:typeof e.t[x]=="string"?e.t[x]:f,title:e.localeValues[d],class:"apexcharts-".concat(x,"-icon")})};n("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`),n("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`);var o=function(d){e.t[d]&&t.config.chart[d].enabled&&r.push({el:d==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[d]=="string"?e.t[d]:d==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
</svg>`,title:e.localeValues[d==="zoom"?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<defs>
<path d="M0 0h24v24H0z" id="a"/>
</defs>
<clipPath id="b">
<use overflow="visible" xlink:href="#a"/>
</clipPath>
<path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
</svg>`,title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;h<this.elCustomIcons.length;h++)r.push({el:this.elCustomIcons[h],icon:this.t.customIcons[h].icon,title:this.t.customIcons[h].title,index:this.t.customIcons[h].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[h].class});r.forEach(function(d,g){d.index&&P.moveIndexInArray(r,g,d.index)});for(var c=0;c<r.length;c++)X.setAttrs(r[c].el,{class:r[c].class,title:r[c].title}),r[c].el.innerHTML=r[c].icon,a.appendChild(r[c].el);this._createHamburgerMenu(a),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),X.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],i=0;i<t.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=t[i].title,X.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(t[i].name),title:t[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(i){i.classList.contains("exportSVG")?i.addEventListener("click",e.handleDownload.bind(e,"svg")):i.classList.contains("exportPNG")?i.addEventListener("click",e.handleDownload.bind(e,"png")):i.classList.contains("exportCSV")&&i.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){t.ctx.toolbar.toggleOtherControls();var i=e==="selection"?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,a=e==="selection"?"selectionEnabled":"zoomEnabled";t.w.globals[a]=!t.w.globals[a],i.classList.contains(t.ctx.toolbar.selectedClass)?i.classList.remove(t.ctx.toolbar.selectedClass):i.classList.add(t.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t=e==="pan"?this.elPan:this.elZoom,i=e==="pan"?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(i){i&&i.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,i=(this.minX+t)/2,a=(this.maxX+t)/2,s=this._getNewMinXMaxX(i,a);e.globals.disableZoomIn||this.zoomUpdateOptions(s.minX,s.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,i=this.minX-(t-this.minX),a=this.maxX-(t-this.maxX),s=this._getNewMinXMaxX(i,a);e.globals.disableZoomOut||this.zoomUpdateOptions(s.minX,s.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var i=this.w;if(e!==void 0||t!==void 0){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=i.globals.dataPoints),t-e<2))){var a={min:e,max:t},s=this.getBeforeZoomRange(a);s&&(a=s.xaxis);var r={xaxis:a},n=P.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(r.yaxis=n),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,n)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var i=null;return typeof this.ev.beforeZoom=="function"&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var t=this.w,i=new He(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){var i=t.w;if(i.globals.lastXAxis.min=i.globals.initialConfig.xaxis.min,i.globals.lastXAxis.max=i.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),typeof i.config.chart.events.beforeResetZoom=="function"){var a=i.config.chart.events.beforeResetZoom(t,i);a&&t.updateHelpers.revertDefaultAxisMinMax(a)}typeof i.config.chart.events.zoomed=="function"&&t.ctx.toolbar.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1;var s=t.ctx.series.emptyCollapsedSeries(P.clone(i.globals.initialSeries));t.updateHelpers._updateSeries(s,i.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),p}(),qi=function(p){Te(t,Ht);var e=Ie(t);function t(i){var a;return F(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.dragged=!1,a.graphics=new X(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a.debounceTimer=null,a.debounceDelay=100,a.wheelDelay=400,a}return R(t,[{key:"init",value:function(i){var a=this,s=i.xyRatios,r=this.w,n=this;this.xyRatios=s,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.elGraphical.add(this.zoomRect),r.globals.dom.elGraphical.add(this.selectionRect),r.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):r.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(o){a.hoverArea.addEventListener(o,n.svgMouseEvents.bind(n,s),{capture:!1,passive:!0})}),r.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",n.mouseWheelEvent.bind(n),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(i,a){var s=this.w,r=this,n=this.ctx.toolbar,o=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,h=s.config.chart.toolbar.autoSelected;if(a.shiftKey?(this.shiftWasPressed=!0,n.enableZoomPanFromToolbar(h==="pan"?"zoom":"pan")):this.shiftWasPressed&&(n.enableZoomPanFromToolbar(h),this.shiftWasPressed=!1),a.target){var c,d=a.target.classList;if(a.target.parentNode&&a.target.parentNode!==null&&(c=a.target.parentNode.classList),!(d.contains("apexcharts-selection-rect")||d.contains("apexcharts-legend-marker")||d.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(r.clientX=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientX:a.type==="touchend"?a.changedTouches[0].clientX:a.clientX,r.clientY=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientY:a.type==="touchend"?a.changedTouches[0].clientY:a.clientY,a.type==="mousedown"&&a.which===1){var g=r.gridRect.getBoundingClientRect();r.startX=r.clientX-g.left,r.startY=r.clientY-g.top,r.dragged=!1,r.w.globals.mousedown=!0}if((a.type==="mousemove"&&a.which===1||a.type==="touchmove")&&(r.dragged=!0,s.globals.panEnabled?(s.globals.selection=null,r.w.globals.mousedown&&r.panDragging({context:r,zoomtype:o,xyRatios:i})):(r.w.globals.mousedown&&s.globals.zoomEnabled||r.w.globals.mousedown&&s.globals.selectionEnabled)&&(r.selection=r.selectionDrawing({context:r,zoomtype:o}))),a.type==="mouseup"||a.type==="touchend"||a.type==="mouseleave"){var f,x=(f=r.gridRect)===null||f===void 0?void 0:f.getBoundingClientRect();x&&r.w.globals.mousedown&&(r.endX=r.clientX-x.left,r.endY=r.clientY-x.top,r.dragX=Math.abs(r.endX-r.startX),r.dragY=Math.abs(r.endY-r.startY),(s.globals.zoomEnabled||s.globals.selectionEnabled)&&r.selectionDrawn({context:r,zoomtype:o}),s.globals.panEnabled&&s.config.xaxis.convertedCatToNumeric&&r.delayedPanScrolled()),s.globals.zoomEnabled&&r.hideSelectionRect(this.selectionRect),r.dragged=!1,r.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"mouseWheelEvent",value:function(i){var a=this,s=this.w;i.preventDefault();var r=Date.now();r-s.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var r=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(r){var n,o,h,c=(i.clientX-r.left)/r.width,d=this.minX,g=this.maxX,f=g-d;if(i.deltaY<0){var x=d+c*f;o=x-(n=.5*f)/2,h=x+n/2}else o=d-(n=1.5*f)/2,h=g+n/2;o=Math.max(o,s.globals.initialMinX),h=Math.min(h,s.globals.initialMaxX);var b=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(h-o<b){var v=(o+h)/2;o=v-b/2,h=v+b/2}var y=this._getNewMinXMaxX(o,h);isNaN(y.minX)||isNaN(y.maxX)||this.zoomUpdateOptions(y.minX,y.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var i=this.w;if(this.selectionRect){var a=this.selectionRect.node.getBoundingClientRect();a.width>0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(i.globals.selection);else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s;i.globals.isRangeBar&&(s=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var n={x:s,y:0,width:r,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,n=i.height,o=i.translateX,h=o===void 0?0:o,c=i.translateY,d=c===void 0?0:c,g=this.w,f=this.zoomRect,x=this.selectionRect;if(this.dragged||g.globals.selection!==null){var b={transform:"translate("+h+", "+d+")"};g.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),f.attr({x:a,y:s,width:r,height:n,fill:g.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":g.config.chart.zoom.zoomedArea.fill.opacity,stroke:g.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":g.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":g.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(f.node,b)),g.globals.selectionEnabled&&(x.attr({x:a,y:s,width:r>0?r:0,height:n>0?n:0,fill:g.config.chart.selection.fill.color,"fill-opacity":g.config.chart.selection.fill.opacity,stroke:g.config.chart.selection.stroke.color,"stroke-width":g.config.chart.selection.stroke.width,"stroke-dasharray":g.config.chart.selection.stroke.dashArray,"stroke-opacity":g.config.chart.selection.stroke.opacity}),X.setAttrs(x.node,b))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,o=this.gridRect.getBoundingClientRect(),h=n.startX-1,c=n.startY,d=!1,g=!1,f=n.clientX-o.left-h,x=n.clientY-o.top-c,b={};return Math.abs(f+h)>r.globals.gridWidth?f=r.globals.gridWidth-h:n.clientX-o.left<0&&(f=h),h>n.clientX-o.left&&(d=!0,f=Math.abs(f)),c>n.clientY-o.top&&(g=!0,x=Math.abs(x)),b=s==="x"?{x:d?h-f:h,y:0,width:f,height:r.globals.gridHeight}:s==="y"?{x:0,y:g?c-x:c,width:r.globals.gridWidth,height:x}:{x:d?h-f:h,y:g?c-x:c,width:f,height:x},n.drawSelectionRect(b),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w,n=this.xyRatios,o=this.selectionRect,h=0;i==="resizing"&&(h=30);var c=function(g){return parseFloat(o.node.getAttribute(g))},d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};r.globals.selection=d,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g,f,x,b,v=s.gridRect.getBoundingClientRect(),y=o.node.getBoundingClientRect();r.globals.isRangeBar?(g=r.globals.yAxisScale[0].niceMin+(y.left-v.left)*n.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+(y.right-v.left)*n.invertedYRatio,x=0,b=1):(g=r.globals.xAxisScale.niceMin+(y.left-v.left)*n.xRatio,f=r.globals.xAxisScale.niceMin+(y.right-v.left)*n.xRatio,x=r.globals.yAxisScale[0].niceMin+(v.bottom-y.bottom)*n.yRatio[0],b=r.globals.yAxisScale[0].niceMax-(y.top-v.top)*n.yRatio[0]);var w={xaxis:{min:g,max:f},yaxis:{min:x,max:b}};r.config.chart.events.selection(s.ctx,w),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(s.ctx,w)},h))}},{key:"selectionDrawn",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,n=a,o=this.xyRatios,h=this.ctx.toolbar;if(n.startX>n.endX){var c=n.startX;n.startX=n.endX,n.endX=c}if(n.startY>n.endY){var d=n.startY;n.startY=n.endY,n.endY=d}var g=void 0,f=void 0;r.globals.isRangeBar?(g=r.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=r.globals.xAxisScale.niceMin+n.startX*o.xRatio,f=r.globals.xAxisScale.niceMin+n.endX*o.xRatio);var x=[],b=[];if(r.config.yaxis.forEach(function(A,k){var S=r.globals.seriesYAxisMap[k][0];x.push(r.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.startY),b.push(r.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==f){if(r.globals.zoomEnabled){var v=P.clone(r.globals.initialConfig.yaxis),y=P.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),f=Math.floor(f),g<1&&(g=1,f=r.globals.dataPoints),f-g<2&&(f=g+1)),s!=="xy"&&s!=="x"||(y={min:g,max:f}),s!=="xy"&&s!=="y"||v.forEach(function(A,k){v[k].min=b[k],v[k].max=x[k]}),h){var w=h.getBeforeZoomRange(y,v);w&&(y=w.xaxis?w.xaxis:y,v=w.yaxis?w.yaxis:v)}var l={xaxis:y};r.config.chart.group||(l.yaxis=v),n.ctx.updateHelpers._updateOptions(l,!1,n.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&h.zoomCallback(y,v)}else if(r.globals.selectionEnabled){var u,m=null;u={min:g,max:f},s!=="xy"&&s!=="y"||(m=P.clone(r.config.yaxis)).forEach(function(A,k){m[k].min=b[k],m[k].max=x[k]}),r.globals.selection=n.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(n.ctx,{xaxis:u,yaxis:m})}}}},{key:"panDragging",value:function(i){var a=i.context,s=this.w,r=a;if(s.globals.lastClientPosition.x!==void 0){var n=s.globals.lastClientPosition.x-r.clientX,o=s.globals.lastClientPosition.y-r.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY};var h=s.globals.isRangeBar?s.globals.minY:s.globals.minX,c=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;s.config.xaxis.convertedCatToNumeric||r.panScrolled(h,c)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(a=i.globals.minX+r,s=i.globals.maxX+r):this.moveDirection==="right"&&(a=i.globals.minX-r,s=i.globals.maxX-r),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,n=P.clone(s.globals.initialConfig.yaxis),o=r.xRatio,h=s.globals.minX,c=s.globals.maxX;s.globals.isRangeBar&&(o=r.invertedYRatio,h=s.globals.minY,c=s.globals.maxY),this.moveDirection==="left"?(i=h+s.globals.gridWidth/15*o,a=c+s.globals.gridWidth/15*o):this.moveDirection==="right"&&(i=h-s.globals.gridWidth/15*o,a=c-s.globals.gridWidth/15*o),s.globals.isRangeBar||(i<s.globals.initialMinX||a>s.globals.initialMaxX)&&(i=h,a=c);var d={xaxis:{min:i,max:a}};s.config.chart.group||(d.yaxis=n),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(),Nt=function(){function p(e){F(this,p),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return R(p,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,s=e.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,h=n.height,c=o/(r.globals.dataPoints-1),d=h/r.globals.dataPoints,g=this.hasBars();!r.globals.comboCharts&&!g||r.config.xaxis.convertedCatToNumeric||(c=o/r.globals.dataPoints);var f=a-n.left-r.globals.barPadForNumericAxis,x=s-n.top;f<0||x<0||f>o||x>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var b=Math.round(f/c),v=Math.floor(x/d);g&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(f/c),b-=1);var y=null,w=null,l=r.globals.seriesXvalues.map(function(S){return S.filter(function(L){return P.isNumber(L)})}),u=r.globals.seriesYvalues.map(function(S){return S.filter(function(L){return P.isNumber(L)})});if(r.globals.isXNumeric){var m=this.ttCtx.getElGrid().getBoundingClientRect(),A=f*(m.width/o),k=x*(m.height/h);y=(w=this.closestInMultiArray(A,k,l,u)).index,b=w.j,y!==null&&(l=r.globals.seriesXvalues[y],b=(w=this.closestInArray(A,l)).index)}return r.globals.capturedSeriesIndex=y===null?-1:y,(!b||b<1)&&(b=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=v:r.globals.capturedDataPointIndex=b,{capturedSeries:y,j:r.globals.isBarHorizontal?v:b,hoverX:f,hoverY:x}}},{key:"closestInMultiArray",value:function(e,t,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var h=i[r][0],c=Math.abs(e-h);if(i.forEach(function(f){f.forEach(function(x,b){var v=Math.abs(e-x);v<=c&&(c=v,o=b)})}),o!==-1){var d=a[r][o],g=Math.abs(t-d);n=r,a.forEach(function(f,x){var b=Math.abs(t-f[o]);b<=g&&(g=b,n=x)})}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(r,n){return r.length>0?n:-1}),s=0;s<a.length;s++)if(a[s]!==-1&&t.globals.collapsedSeriesIndices.indexOf(s)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)===-1){i=a[s];break}return i}},{key:"closestInArray",value:function(e,t){for(var i=t[0],a=null,s=Math.abs(e-i),r=0;r<t.length;r++){var n=Math.abs(e-t[r]);n<s&&(s=n,a=r)}return{index:a}}},{key:"isXoverlap",value:function(e){var t=[],i=this.w.globals.seriesX.filter(function(s){return s[0]!==void 0});if(i.length>0)for(var a=0;a<i.length-1;a++)i[a][e]!==void 0&&i[a+1][e]!==void 0&&i[a][e]!==i[a+1][e]&&t.push("unEqual");return t.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,i=0;i<t.length-1;i++)if(t[i].data.length!==t[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return te(e).reduce(function(t,i){return t+i.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=te(e)).sort(function(i,a){var s=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return r<s?1:r>s?-1:0});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,t){var i=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new X(this.ctx).getMarkerPath(i,a,s,t)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return i===void 0&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s<a.length;s++)e==="enable"?(a[s].classList.add("apexcharts-active"),a[s].style.display=t.config.tooltip.items.display):(a[s].classList.remove("apexcharts-active"),a[s].style.display="none")}}]),p}(),Zi=function(){function p(e){F(this,p),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new Nt(e)}return R(p,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,i=t===void 0||t,a=e.ttItems,s=e.i,r=s===void 0?0:s,n=e.j,o=n===void 0?null:n,h=e.y1,c=e.y2,d=e.e,g=this.w;g.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:r,j:o,y1:h,y2:c,w:g}):this.toggleActiveInactiveSeries(i,r);var f=this.getValuesToPrint({i:r,j:o});this.printLabels({i:r,j:o,values:f,ttItems:a,shared:i,e:d});var x=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=x.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=x.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,i=this,a=e.i,s=e.j,r=e.values,n=e.ttItems,o=e.shared,h=e.e,c=this.w,d=[],g=function(m){return c.globals.seriesGoals[m]&&c.globals.seriesGoals[m][s]&&Array.isArray(c.globals.seriesGoals[m][s])},f=r.xVal,x=r.zVal,b=r.xAxisTTVal,v="",y=c.globals.colors[a];s!==null&&c.config.plotOptions.bar.distributed&&(y=c.globals.colors[s]);for(var w=function(m,A){var k=i.getFormatters(a);v=i.getSeriesName({fn:k.yLbTitleFormatter,index:a,seriesIndex:a,j:s}),c.config.chart.type==="treemap"&&(v=k.yLbTitleFormatter(String(c.config.series[a].data[s].x),{series:c.globals.series,seriesIndex:a,dataPointIndex:s,w:c}));var S=c.config.tooltip.inverseOrder?A:m;if(c.globals.axisCharts){var L=function(z){var M,T,E,O;return c.globals.isRangeData?k.yLbFormatter((M=c.globals.seriesRangeStart)===null||M===void 0||(T=M[z])===null||T===void 0?void 0:T[s],{series:c.globals.seriesRangeStart,seriesIndex:z,dataPointIndex:s,w:c})+" - "+k.yLbFormatter((E=c.globals.seriesRangeEnd)===null||E===void 0||(O=E[z])===null||O===void 0?void 0:O[s],{series:c.globals.seriesRangeEnd,seriesIndex:z,dataPointIndex:s,w:c}):k.yLbFormatter(c.globals.series[z][s],{series:c.globals.series,seriesIndex:z,dataPointIndex:s,w:c})};if(o)k=i.getFormatters(S),v=i.getSeriesName({fn:k.yLbTitleFormatter,index:S,seriesIndex:a,j:s}),y=c.globals.colors[S],t=L(S),g(S)&&(d=c.globals.seriesGoals[S][s].map(function(z){return{attrs:z,val:k.yLbFormatter(z.value,{seriesIndex:S,dataPointIndex:s,w:c})}}));else{var C,I=h==null||(C=h.target)===null||C===void 0?void 0:C.getAttribute("fill");I&&(y=I.indexOf("url")!==-1?document.querySelector(I.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke"):I),t=L(a),g(a)&&Array.isArray(c.globals.seriesGoals[a][s])&&(d=c.globals.seriesGoals[a][s].map(function(z){return{attrs:z,val:k.yLbFormatter(z.value,{seriesIndex:a,dataPointIndex:s,w:c})}}))}}s===null&&(t=k.yLbFormatter(c.globals.series[a],Y(Y({},c),{},{seriesIndex:a,dataPointIndex:a}))),i.DOMHandling({i:a,t:S,j:s,ttItems:n,values:{val:t,goalVals:d,xVal:f,xAxisTTVal:b,zVal:x},seriesName:v,shared:o,pColor:y})},l=0,u=c.globals.series.length-1;l<c.globals.series.length;l++,u--)w(l,u)}},{key:"getFormatters",value:function(e){var t,i=this.w,a=i.globals.yLabelFormatters[e];return i.globals.ttVal!==void 0?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,t=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(a=i.globals.ttVal.formatter,typeof i.globals.ttVal.title.formatter=="function"&&(t=i.globals.ttVal.title.formatter)):t=i.config.tooltip.y.title.formatter,typeof a!="function"&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(s){return s}),typeof t!="function"&&(t=function(s){return s}),{yLbFormatter:a,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var t=e.fn,i=e.index,a=e.seriesIndex,s=e.j,r=this.w;return t(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:a,dataPointIndex:s,w:r})}},{key:"DOMHandling",value:function(e){e.i;var t=e.t,i=e.j,a=e.ttItems,s=e.values,r=e.seriesName,n=e.shared,o=e.pColor,h=this.w,c=this.ttCtx,d=s.val,g=s.goalVals,f=s.xVal,x=s.xAxisTTVal,b=s.zVal,v=null;v=a[t].children,h.config.tooltip.fillSeriesColor&&(a[t].style.backgroundColor=o,v[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=h.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=f),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=x!==""?x:f);var y=a[t].querySelector(".apexcharts-tooltip-text-y-label");y&&(y.innerHTML=r||"");var w=a[t].querySelector(".apexcharts-tooltip-text-y-value");w&&(w.innerHTML=d!==void 0?d:""),v[0]&&v[0].classList.contains("apexcharts-tooltip-marker")&&(h.config.tooltip.marker.fillColors&&Array.isArray(h.config.tooltip.marker.fillColors)&&(o=h.config.tooltip.marker.fillColors[t]),v[0].style.backgroundColor=o),h.config.tooltip.marker.show||(v[0].style.display="none");var l=a[t].querySelector(".apexcharts-tooltip-text-goals-label"),u=a[t].querySelector(".apexcharts-tooltip-text-goals-value");if(g.length&&h.globals.seriesGoals[t]){var m=function(){var S="<div >",L="<div>";g.forEach(function(C,I){S+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(C.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(C.attrs.name,"</div>"),L+="<div>".concat(C.val,"</div>")}),l.innerHTML=S+"</div>",u.innerHTML=L+"</div>"};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?m():(l.innerHTML="",u.innerHTML=""):m()}else l.innerHTML="",u.innerHTML="";if(b!==null&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=b!==void 0?b:""),n&&v[0]){if(h.config.tooltip.hideEmptySeries){var A=a[t].querySelector(".apexcharts-tooltip-marker"),k=a[t].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(A.style.display="none",k.style.display="none"):(A.style.display="block",k.style.display="block")}d==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1?v[0].parentNode.style.display="none":v[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1&&(v[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,t){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(t));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,h=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;i===null?h=a.globals.series[t]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(r=s[t][i],s[t].length===0&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=a.globals.labels[i]!==void 0?a.globals.labels[i]:"";var g=r;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?r=new ze(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new K(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,c):a.globals.xLabelFormatter(g,c),a.config.tooltip.x.formatter!==void 0&&(r=a.globals.ttKeyFormatter(g,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=d(a.globals.seriesZ[t][i],a)),n=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(g,c):r,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,r=e.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:r})}}]),p}(),Wt=function(){function p(e){F(this,p),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return R(p,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(t!==null&&(r=a.globals.gridWidth/n*t),s===null||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;t.ycrosshairs!==null&&X.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&X.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=t.globals.translateX;var s;s=new X(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),s-=r/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=s+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=i!==null?parseFloat(i):1,h=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(h>a.globals.gridWidth/2&&(h=h-n.ttWidth-o-10),h>a.globals.gridWidth-n.ttWidth-10&&(h=a.globals.gridWidth-n.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var d=s.getElGrid().getBoundingClientRect();(h=s.e.clientX-d.left)>a.globals.gridWidth/2&&(h-=s.tooltipRect.ttWidth),(c=s.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(h+=a.globals.translateX,r.style.left=h+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r<s.length;r++)parseInt(s[r].getAttribute("rel"),10)===t&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(t,s[r]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var i,a,s,r,n=this.w,o=this.ttCtx,h=new X(this.ctx),c=n.globals.pointsArray,d=o.tooltipUtil.getHoverMarkerSize(t),g=n.config.series[t].type;if(!g||g!=="column"&&g!=="candlestick"&&g!=="boxPlot"){s=(i=c[t][e])===null||i===void 0?void 0:i[0],r=((a=c[t][e])===null||a===void 0?void 0:a[1])||0;var f=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers path"));if(f&&r<n.globals.gridHeight&&r>0){var x=f.getAttribute("shape"),b=h.getMarkerPath(s,r,x,1.5*d);f.setAttribute("d",b)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new re(this.ctx),h=new X(this.ctx);t=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(s=n[t][e][0],r=n[t][e][1]);var d=i.tooltipUtil.getAllMarkers();if(d!==null)for(var g=0;g<a.globals.series.length;g++){var f=n[g];if(a.globals.comboCharts&&f===void 0&&d.splice(g,0,null),f&&f.length){var x=n[g][e][1],b=void 0;d[g].setAttribute("cx",s);var v=d[g].getAttribute("shape");if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){var y=e+a.globals.series[g].length;b=n[g][y][1],x-=Math.abs(x-b)/2}if(x!==null&&!isNaN(x)&&x<a.globals.gridHeight+c&&x+c>0){var w=h.getMarkerPath(s,x,v,c);d[g].setAttribute("d",w)}else d[g].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new re(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));n||typeof t!="number"||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,`'],
.apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
.apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
.apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,h=n?parseFloat(n.getAttribute("cy")):0,c=n?parseFloat(n.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),g=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!g&&(o-=s%2!=0?c/2:0),n&&g&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,h||i.globals.gridHeight)}}]),p}(),$i=function(){function p(e){F(this,p),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Wt(e)}return R(p,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new X(this.ctx),i=new ye(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=te(a),e.config.chart.stacked&&a.sort(function(d,g){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(g.getAttribute("data:realIndex"))});for(var s=0;s<a.length;s++){var r=a[s].querySelector(".apexcharts-series-markers-wrap");if(r!==null){var n=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(o+=" no-pointer-events");var h=i.getMarkerConfig({cssClass:o,seriesIndex:Number(r.getAttribute("data:realIndex"))});(n=t.drawMarker(0,0,h)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(e.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(n.node),r.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w;s.config.chart.type!=="bubble"&&this.newPointSize(e,t);var r=t.getAttribute("cx"),n=t.getAttribute("cy");if(i!==null&&a!==null&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(s.config.chart.type==="radar"){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o<r.length;o++){var h=r[o].getAttribute("rel"),c=r[o].getAttribute("index");if(n===void 0&&(n=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),s===parseInt(h,10)){i.newPointSize(s,r[o]);var d=r[o].getAttribute("cx"),g=r[o].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(d),a.fixedTooltip||i.tooltipPosition.moveTooltip(d,g,n)}else i.oldPointSize(r[o])}}},{key:"newPointSize",value:function(e,t){var i=this.w,a=i.config.markers.hover.size,s=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(s.getAttribute("default-marker-size")!=="0"){var r=parseInt(s.getAttribute("index"),10);a===void 0&&(a=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),a<0&&(a=0);var n=this.ttCtx.tooltipUtil.getPathFromPoint(t,a);t.setAttribute("d",n)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute("d",i)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var i=parseFloat(e[t].getAttribute("default-marker-size"));if(P.isNumber(i)&&i>=0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),p}(),Ji=function(){function p(e){F(this,p),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}return R(p,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,r=e.type,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(r,"-rect"))){var h=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),f=this.getAttr(t,"width"),x=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=h,o.globals.capturedDataPointIndex=c,a=d+n.tooltipRect.ttWidth/2+f,s=g+n.tooltipRect.ttHeight/2-x/2,n.tooltipPosition.moveXCrosshairs(d+f/2),a>o.globals.gridWidth/2&&(a=d-n.tooltipRect.ttWidth/2+f),n.w.config.tooltip.followCursor){var b=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-b.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-b.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=e.x,n=e.y,o=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(s.paths.getAttribute("cx"),10),d=parseInt(s.paths.getAttribute("cy"),10),g=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var f=P.findAncestor(s.paths,"apexcharts-series");f&&(t=parseInt(f.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:a}),a.type==="mouseup"&&h.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,r=c,n=d+o.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var x=h.getElGrid().getBoundingClientRect();n=h.e.clientY+o.globals.translateY-x.top}g<0&&(n=d),h.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),h=0,c=0,d=0,g=this.getBarTooltipXY({e:a,opt:s});t=g.i;var f=g.j;r.globals.capturedSeriesIndex=t,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=g.x,d=g.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,h=c):r.globals.comboCharts||r.config.tooltip.shared||(h/=2),isNaN(d)&&(d=r.globals.svgHeight-n.tooltipRect.ttHeight);var x=parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10);if(r.globals.isMultipleYAxis?r.config.yaxis[x]&&r.config.yaxis[x].reversed:r.config.yaxis[0].reversed,c+n.tooltipRect.ttWidth>r.globals.gridWidth?c-=n.tooltipRect.ttWidth:c<0&&(c=0),n.w.config.tooltip.followCursor){var b=n.getElGrid().getBoundingClientRect();d=n.e.clientY-b.top}n.tooltip===null&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(h+i/2):n.tooltipPosition.moveXCrosshairs(h)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(d=d+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=c+r.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,s=this.w,r=null,n=this.ttCtx,o=0,h=0,c=0,d=0,g=0,f=i.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var x=i.target,b=x.getBoundingClientRect(),v=a.elGrid.getBoundingClientRect(),y=b.height;g=b.height;var w=b.width,l=parseInt(x.getAttribute("cx"),10),u=parseInt(x.getAttribute("cy"),10);d=parseFloat(x.getAttribute("barWidth"));var m=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(x.getAttribute("j"),10),o=parseInt(x.parentNode.getAttribute("rel"),10)-1;var A=x.getAttribute("data-range-y1"),k=x.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(x.parentNode.getAttribute("data:realIndex"),10));var S=function(C){return s.globals.isXNumeric?l-w/2:t.isVerticalGroupedRangeBar?l+w/2:l-n.dataPointsDividedWidth+w/2},L=function(){return u-n.dataPointsDividedHeight+y/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:A?parseInt(A,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(h=m-v.left+15,c=L()):(h=S(),c=i.clientY-v.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((h=l)<n.xyRatios.baseLineInvertedY&&(h=l-n.tooltipRect.ttWidth),c=L()):(h=S(),c=u)}return{x:h,y:c,barHeight:g,barWidth:d,i:o,j:r}}}]),p}(),Ki=function(){function p(e){F(this,p),this.w=e.w,this.ttCtx=e}return R(p,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,i=e.config.xaxis.position==="bottom";t.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",s=e.globals.dom.elWrap;t.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),s.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,i=0;i<e.config.yaxis.length;i++){var a=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;t.yaxisOffX=a?e.globals.gridWidth+1:1;var s="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))===null&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(t.yaxisTooltip),i===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[i]=document.createElement("div"),t.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[i]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,i=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var a=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(a!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var s=parseFloat(a.getAttribute("barWidth"));t.xcrosshairsWidth=s}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var r=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/r}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var n=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/n}else if(e.config.xaxis.crosshairs.width==="barWidth"){var o=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null){var h=parseFloat(o.getAttribute("barWidth"));t.xcrosshairsWidth=h}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),i!==null&&t.xcrosshairsWidth>0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&n.length>0){var o=r.yLabelFormatters[e],h=a.getElGrid().getBoundingClientRect(),c=n[0],d=0;i.yRatio.length>1&&(d=c);var g=(t-h.top)*i.yRatio[d],f=r.maxYArr[c]-r.minYArr[c],x=r.minYArr[c]+(f-g);s.config.yaxis[e].reversed&&(x=r.maxYArr[c]-(f-g)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=o(x),a.tooltipPosition.moveYAxisTooltip(e)}}}]),p}(),At=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new Nt(this),this.tooltipLabels=new Zi(this),this.tooltipPosition=new Wt(this),this.marker=new $i(this),this.intersect=new Ji(this),this.axesTooltip=new Ki(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return R(p,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(r,n){return!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Me(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&t.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),t.config.markers.size!==0&&t.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),r=function(o){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(o)),h.style.order=i.config.tooltip.inverseOrder?e-o:o+1;var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),c.style.backgroundColor=i.globals.colors[o],h.appendChild(c);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(g){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(g,"-group"));var x=document.createElement("span");x.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),f.appendChild(x);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),f.appendChild(b),d.appendChild(f)}),h.appendChild(d),s.appendChild(h),a.push(h)},n=0;n<e;n++)r(n);return a}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,i=this.getElTooltip(),a=!(t!=="bar"&&t!=="candlestick"&&t!=="boxPlot"&&t!=="rangeBar"),s=t==="area"||t==="line"||t==="scatter"||t==="bubble"||t==="radar",r=e.globals.dom.Paper.node,n=this.getElGrid();n&&(this.seriesBound=n.getBoundingClientRect());var o,h=[],c=[],d={hoverArea:r,elGrid:n,tooltipEl:i,tooltipY:h,tooltipX:c,ttItems:this.ttItems};if(e.globals.axisCharts&&(s?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):t!=="heatmap"&&t!=="treemap"||(o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),o&&o.length))for(var g=0;g<o.length;g++)h.push(o[g].getAttribute("cy")),c.push(o[g].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],d);else if(a&&!e.globals.comboCharts||s&&this.showOnIntersect)this.addDatapointEventsListeners(d);else if(!e.globals.axisCharts||t==="heatmap"||t==="treemap"){var f=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,d)}if(this.showOnIntersect){var x=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");x.length>0&&this.addPathsEventListeners(x,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-s-10),t.style.left=r+"px",t.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(r){var n={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[r].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},s=0;s<e.length;s++)a(s)}},{key:"onSeriesHover",value:function(e,t){var i=this,a=Date.now()-this.lastHoverTime;a>=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||s.globals.dataPoints===0)||(a.length?a.forEach(function(r){var n=i.getElTooltip(r),o={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:o,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,r=t.w,n=this.getElTooltip(t);n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new re(t).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o=a.type==="touchmove"?a.touches[0].clientX:a.clientX,h=a.type==="touchmove"?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,h<n.top||h>n.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(s)}var d=this.getElTooltip(),g=this.getElXCrosshairs(),f=[];r.config.chart.group&&(f=this.ctx.getSyncedCharts());var x=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;g!==null&&g.classList.add("apexcharts-active");var b=this.yaxisTooltips.filter(function(w){return w===!0});if(this.ycrosshairs!==null&&b.length&&this.ycrosshairs.classList.add("apexcharts-active"),x&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(a,o,h,s);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var v=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:r.config.chart.type});t=v.x,i=v.y,d.style.left=t+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:t,y:i});if(this.yaxisTooltips.length)for(var y=0;y<r.config.yaxis.length;y++)this.axesTooltip.drawYaxisTooltipText(y,h,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),s.tooltipEl.classList.add("apexcharts-active")}else a.type!=="mouseout"&&a.type!=="touchend"||this.handleMouseOut(s)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,i=e.opt,a=e.tooltipRect,s=this.w,r=i.paths.getAttribute("rel"),n=this.getElTooltip(),o=s.globals.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){s.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var h=s.globals.clientX-o.left-a.ttWidth/2,c=s.globals.clientY-o.top-a.ttHeight-10;if(n.style.left=h+"px",n.style.top=c+"px",s.config.legend.tooltipHoverFormatter){var d=r-1,g=(0,s.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"),{seriesIndex:d,dataPointIndex:d,w:s});this.legendLabels[d].innerHTML=g}}else t.type!=="mouseout"&&t.type!=="touchend"||(n.classList.remove("apexcharts-active"),s.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),s.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(f){var x=f.getAttribute("data:default-text");f.innerHTML=decodeURIComponent(x)}))}},{key:"handleStickyTooltip",value:function(e,t,i,a){var s=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:t,clientY:i}),n=r.j,o=r.capturedSeries;s.globals.collapsedSeriesIndices.includes(o)&&(o=null);var h=a.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>h.width)this.handleMouseOut(a);else if(o!==null)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var c=s.globals.series.findIndex(function(d,g){return!s.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,c,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;if(!this.tConfig.shared&&s.globals.series[t][a]===null)return void this.handleMouseOut(i);if(s.globals.series[t][a]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex(function(n,o){return!s.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new X(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a<i.length;a++)t.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(e){var t=this.w,i=this.getElXCrosshairs();if(t.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),t.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),i!==null&&i.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(s){var r=s.getAttribute("data:default-text");s.innerHTML=decodeURIComponent(r)})}},{key:"markerClick",value:function(e,t,i){var a=this.w;typeof a.config.chart.events.markerClick=="function"&&a.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}])}},{key:"create",value:function(e,t,i,a,s){var r,n,o,h,c,d,g,f,x,b,v,y,w,l,u,m,A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,k=this.w,S=t;e.type==="mouseup"&&this.markerClick(e,i,a),A===null&&(A=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(i),C=this.tooltipUtil.getElBars();if(k.config.legend.tooltipHoverFormatter){var I=k.config.legend.tooltipHoverFormatter,z=Array.from(this.legendLabels);z.forEach(function(q){var Z=q.getAttribute("data:default-text");q.innerHTML=decodeURIComponent(Z)});for(var M=0;M<z.length;M++){var T=z[M],E=parseInt(T.getAttribute("i"),10),O=decodeURIComponent(T.getAttribute("data:default-text")),D=I(O,{seriesIndex:A?E:i,dataPointIndex:a,w:k});if(A)T.innerHTML=k.globals.collapsedSeriesIndices.indexOf(E)<0?D:O;else if(T.innerHTML=E===i?D:O,i===E)break}}var H=Y(Y({ttItems:s,i,j:a},((r=k.globals.seriesRange)===null||r===void 0||(n=r[i])===null||n===void 0||(o=n[a])===null||o===void 0||(h=o.y[0])===null||h===void 0?void 0:h.y1)!==void 0&&{y1:(c=k.globals.seriesRange)===null||c===void 0||(d=c[i])===null||d===void 0||(g=d[a])===null||g===void 0||(f=g.y[0])===null||f===void 0?void 0:f.y1}),((x=k.globals.seriesRange)===null||x===void 0||(b=x[i])===null||b===void 0||(v=b[a])===null||v===void 0||(y=v.y[0])===null||y===void 0?void 0:y.y2)!==void 0&&{y2:(w=k.globals.seriesRange)===null||w===void 0||(l=w[i])===null||l===void 0||(u=l[a])===null||u===void 0||(m=u.y[0])===null||m===void 0?void 0:m.y2});if(A){if(S.tooltipLabels.drawSeriesTexts(Y(Y({},H),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),L)k.globals.markers.largestSize>0?S.marker.enlargePoints(a):S.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(C),this.barSeriesHeight>0)){var W=new X(this.ctx),N=k.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var B=0;B<N.length;B++)W.pathMouseEnter(N[B])}}else S.tooltipLabels.drawSeriesTexts(Y({shared:!1},H)),this.tooltipUtil.hasBars()&&S.tooltipPosition.moveStickyTooltipOverBars(a,i),L&&S.tooltipPosition.moveMarkers(i,a)}}]),p}(),Qi=function(){function p(e){F(this,p),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return R(p,[{key:"handleBarDataLabels",value:function(e){var t,i,a=e.x,s=e.y,r=e.y1,n=e.y2,o=e.i,h=e.j,c=e.realIndex,d=e.columnGroupIndex,g=e.series,f=e.barHeight,x=e.barWidth,b=e.barXPosition,v=e.barYPosition,y=e.visibleSeries,w=e.renderedPath,l=this.w,u=new X(this.barCtx.ctx),m=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;l.globals.isXNumeric&&!l.globals.isBarHorizontal?(t=a+parseFloat(x*(y+1)),i=s+parseFloat(f*(y+1))-m):(t=a+parseFloat(x*y),i=s+parseFloat(f*y));var A,k=null,S=a,L=s,C={},I=l.config.dataLabels,z=this.barCtx.barOptions.dataLabels,M=this.barCtx.barOptions.dataLabels.total;v!==void 0&&this.barCtx.isRangeBar&&(i=v,L=v),b!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(t=b,S=b);var T=I.offsetX,E=I.offsetY,O={width:0,height:0};if(l.config.dataLabels.enabled){var D=l.globals.series[o][h];O=u.getTextRects(l.config.dataLabels.formatter?l.config.dataLabels.formatter(D,Y(Y({},l),{},{seriesIndex:o,dataPointIndex:h,w:l})):l.globals.yLabelFormatters[0](D),parseFloat(I.style.fontSize))}var H={x:a,y:s,i:o,j:h,realIndex:c,columnGroupIndex:d,renderedPath:w,bcx:t,bcy:i,barHeight:f,barWidth:x,textRects:O,strokeWidth:m,dataLabelsX:S,dataLabelsY:L,dataLabelsConfig:I,barDataLabelsConfig:z,barTotalDataLabelsConfig:M,offX:T,offY:E};return C=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(H):this.calculateColumnsDataLabelsPosition(H),w.attr({cy:C.bcy,cx:C.bcx,j:h,val:l.globals.series[o][h],barHeight:f,barWidth:x}),A=this.drawCalculatedDataLabels({x:C.dataLabelsX,y:C.dataLabelsY,val:this.barCtx.isRangeBar?[r,n]:l.config.chart.stackType==="100%"?g[c][h]:l.globals.series[c][h],i:c,j:h,barWidth:x,barHeight:f,textRects:O,dataLabelsConfig:I}),l.config.chart.stacked&&M.enabled&&(k=this.drawTotalDataLabels({x:C.totalDataLabelsX,y:C.totalDataLabelsY,barWidth:x,barHeight:f,realIndex:c,textAnchor:C.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:h}),dataLabelsConfig:I,barTotalDataLabelsConfig:M})),{dataLabels:A,totalDataLabels:k}}},{key:"getStackedTotalDataLabel",value:function(e){var t=e.realIndex,i=e.j,a=this.w,s=this.barCtx.stackedSeriesTotals[i];return this.totalFormatter&&(s=this.totalFormatter(s,Y(Y({},a),{},{seriesIndex:t,dataPointIndex:i,w:a}))),s}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t=this.w,i=e.i,a=e.j,s=e.realIndex;e.columnGroupIndex;var r,n,o=e.y,h=e.bcx,c=e.barWidth,d=e.barHeight,g=e.textRects,f=e.dataLabelsX,x=e.dataLabelsY,b=e.dataLabelsConfig,v=e.barDataLabelsConfig,y=e.barTotalDataLabelsConfig,w=e.strokeWidth,l=e.offX,u=e.offY,m=h;d=Math.abs(d);var A=t.config.plotOptions.bar.dataLabels.orientation==="vertical",k=this.barCtx.barHelpers.getZeroValueEncounters({i,j:a}).zeroEncounters;h-=w/2;var S=t.globals.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=c/2:(f=t.globals.isXNumeric?h-c/2+l:h-S+c/2+l,k>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*k)),A&&(f=f+g.height/2-w/2-2);var L=t.globals.series[i][a]<0,C=o;switch(this.barCtx.isReversed&&(C=o+(L?d:-d)),v.position){case"center":x=A?L?C-d/2+u:C+d/2-u:L?C-d/2+g.height/2+u:C+d/2+g.height/2-u;break;case"bottom":x=A?L?C-d+u:C+d-u:L?C-d+g.height+w+u:C+d-g.height/2+w-u;break;case"top":x=A?L?C+u:C-u:L?C-g.height/2-u:C+g.height+u}if(this.barCtx.lastActiveBarSerieIndex===s&&y.enabled){var I=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),b.fontSize);r=L?C-I.height/2-u-y.offsetY+18:C+I.height+u+y.offsetY-18;var z=S;n=m+(t.globals.isXNumeric?-c*t.globals.barGroups.length/2:t.globals.barGroups.length*c/2-(t.globals.barGroups.length-1)*c-z)+y.offsetX}return t.config.chart.stacked||(x<0?x=0+w:x+g.height/3>t.globals.gridHeight&&(x=t.globals.gridHeight-w)),{bcx:h,bcy:o,dataLabelsX:f,dataLabelsY:x,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,s=e.j,r=e.realIndex,n=e.bcy,o=e.barHeight,h=e.barWidth,c=e.textRects,d=e.dataLabelsX,g=e.strokeWidth,f=e.dataLabelsConfig,x=e.barDataLabelsConfig,b=e.barTotalDataLabelsConfig,v=e.offX,y=e.offY,w=t.globals.gridHeight/t.globals.dataPoints;h=Math.abs(h);var l,u,m=n-(this.barCtx.isRangeBar?0:w)+o/2+c.height/2+y-3,A="start",k=t.globals.series[a][s]<0,S=i;switch(this.barCtx.isReversed&&(S=i+(k?-h:h),A=k?"start":"end"),x.position){case"center":d=k?S+h/2-v:Math.max(c.width/2,S-h/2)+v;break;case"bottom":d=k?S+h-g-v:S-h+g+v;break;case"top":d=k?S-g-v:S-g+v}if(this.barCtx.lastActiveBarSerieIndex===r&&b.enabled){var L=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),f.fontSize);k?(l=S-g-v-b.offsetX,A="end"):l=S+v+b.offsetX+(this.barCtx.isReversed?-(h+g):g),u=m-c.height/2+L.height/2+b.offsetY+g}return t.config.chart.stacked||(f.textAnchor==="start"?d-c.width<0?d=k?c.width+g:g:d+c.width>t.globals.gridWidth&&(d=k?t.globals.gridWidth-g:t.globals.gridWidth-c.width-g):f.textAnchor==="middle"?d-c.width/2<0?d=c.width/2+g:d+c.width/2>t.globals.gridWidth&&(d=t.globals.gridWidth-c.width/2-g):f.textAnchor==="end"&&(d<1?d=c.width+g:d+1>t.globals.gridWidth&&(d=t.globals.gridWidth-c.width-g))),{bcx:i,bcy:n,dataLabelsX:d,dataLabelsY:m,totalDataLabelsX:l,totalDataLabelsY:u,totalDataLabelsAnchor:A}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,r=e.j,n=e.textRects,o=e.barHeight,h=e.barWidth,c=e.dataLabelsConfig,d=this.w,g="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var f=new be(this.barCtx.ctx),x=new X(this.barCtx.ctx),b=c.formatter,v=null,y=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(c.enabled&&!y){v=x.group({class:"apexcharts-data-labels",transform:g});var w="";a!==void 0&&(w=b(a,Y(Y({},d),{},{seriesIndex:s,dataPointIndex:r,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");var l=d.globals.series[s][r]<0,u=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(u==="top"&&(c.textAnchor=l?"end":"start"),u==="center"&&(c.textAnchor="middle"),u==="bottom"&&(c.textAnchor=l?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&h<x.getTextRects(w,parseFloat(c.style.fontSize)).width&&(w=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?n.width/1.6>Math.abs(h)&&(w=""):n.height/1.6>Math.abs(o)&&(w=""));var m=Y({},c);this.barCtx.isHorizontal&&a<0&&(c.textAnchor==="start"?m.textAnchor="end":c.textAnchor==="end"&&(m.textAnchor="start")),f.plotDataLabelsText({x:t,y:i,text:w,i:s,j:r,parent:v,dataLabelsConfig:m,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}},{key:"drawTotalDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.realIndex,r=e.textAnchor,n=e.barTotalDataLabelsConfig;this.w;var o,h=new X(this.barCtx.ctx);return n.enabled&&t!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===s&&(o=h.drawText({x:t,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),p}(),ea=function(){function p(e){F(this,p),this.w=e.w,this.barCtx=e}return R(p,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;a<e[i].length;a++)t.globals.seriesX[i][a]>t.globals.minX&&t.globals.seriesX[i][a]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,i,a,s,r,n,o,h=this.w,c=h.globals.dataPoints;this.barCtx.isRangeBar&&(c=h.globals.labels.length);var d=this.barCtx.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)s=(i=h.globals.gridHeight/c)/d,h.globals.isXNumeric&&(s=(i=h.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),s=s*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(s=parseInt(this.barCtx.barOptions.barHeight,10)),o=this.barCtx.baseLineInvertedY+h.globals.padHorizontal+(this.barCtx.isReversed?h.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(o=h.globals.gridWidth/2),t=(i-s*this.barCtx.seriesLen)/2;else{if(a=h.globals.gridWidth/this.barCtx.visibleItems,h.config.xaxis.convertedCatToNumeric&&(a=h.globals.gridWidth/h.globals.dataPoints),r=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,h.globals.isXNumeric){var g=this.barCtx.xRatio;h.globals.minXDiff&&h.globals.minXDiff!==.5&&h.globals.minXDiff/g>0&&(a=h.globals.minXDiff/g),(r=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=h.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return h.globals.barHeight=s,h.globals.barWidth=r,{x:e,y:t,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,t,i,a){var s,r,n,o,h,c=this.w,d=this.barCtx.ctx.fill,g=null,f=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(x){e[t][i]>=x.from&&e[t][i]<=x.to&&(g=x.color)}),(s=c.config.series[t].data[i])!==null&&s!==void 0&&s.fillColor&&(g=c.config.series[t].data[i].fillColor),d.fillPath({seriesNumber:this.barCtx.barOptions.distributed?f:a,dataPointIndex:i,color:g,value:e[t][i],fillConfig:(r=c.config.series[t].data[i])===null||r===void 0?void 0:r.fill,fillType:(n=c.config.series[t].data[i])!==null&&n!==void 0&&(o=n.fill)!==null&&o!==void 0&&o.type?(h=c.config.series[t].data[i])===null||h===void 0?void 0:h.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[a]:c.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"shouldApplyRadius",value:function(e){var t=this.w,i=!1;return t.config.plotOptions.bar.borderRadius>0&&(t.config.chart.stacked&&t.config.plotOptions.bar.borderRadiusWhenStacked==="last"?this.barCtx.lastActiveBarSerieIndex===e&&(i=!0):i=!0),i}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,r=e.y1,n=e.y2,o=e.elSeries,h=this.w,c=new X(this.barCtx.ctx),d=new re(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var g=this.barCtx.barOptions.colors.backgroundBarColors[t],f=c.drawRect(a!==void 0?a:0,r!==void 0?r:0,s!==void 0?s:h.globals.gridWidth,n!==void 0?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,g,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,s=e.y1,r=e.y2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,f=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var x=i,b=a;(t=g.config.series[h].data[d])!==null&&t!==void 0&&t.columnWidthOffset&&(b=a-g.config.series[h].data[d].columnWidthOffset/2,x=i+g.config.series[h].data[d].columnWidthOffset);var v=n/2,y=b+v,w=b+x-v;s+=.001-v,r+=.001+v;var l=f.move(y,s),u=f.move(y,s),m=f.line(w,s);if(g.globals.previousPaths.length>0&&(u=this.barCtx.getPreviousPath(h,d,!1)),l=l+f.line(y,r)+f.line(w,r)+f.line(w,s)+(g.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),u=u+f.line(y,s)+m+m+m+m+m+f.line(y,s)+(g.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(h)&&(l=f.roundPathCorners(l,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).yArrj.push(r-v),A.yArrjF.push(Math.abs(s-r+n)),A.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:l,pathFrom:u}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,s=e.x1,r=e.x2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,f=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var x=i,b=a;(t=g.config.series[h].data[d])!==null&&t!==void 0&&t.barHeightOffset&&(x=i-g.config.series[h].data[d].barHeightOffset/2,b=a+g.config.series[h].data[d].barHeightOffset);var v=n/2,y=x+v,w=x+b-v;s+=.001-v,r+=.001+v;var l=f.move(s,y),u=f.move(s,y);g.globals.previousPaths.length>0&&(u=this.barCtx.getPreviousPath(h,d,!1));var m=f.line(s,w);if(l=l+f.line(r,y)+f.line(r,w)+m+(g.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),u=u+f.line(s,y)+m+m+m+m+m+f.line(s,y)+(g.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(h)&&(l=f.roundPathCorners(l,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).xArrj.push(r+v),A.xArrjF.push(Math.abs(s-r)),A.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:l,pathFrom:u}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a<t.length;a++){for(var s=0,r=0;r<t[i.globals.maxValsInArrayIndex].length;r++)s+=t[a][r];s===0&&this.barCtx.zeroSerieses.push(a)}}},{key:"getXForValue",value:function(e,t){var i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?t:null;return e!=null&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?t:null;return e!=null&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,s,r){var n=this,o=this.w,h=[],c=function(f,x){var b;h.push((Oe(b={},e,e==="x"?n.getXForValue(f,t,!1):n.getYForValue(f,i,r,!1)),Oe(b,"attrs",x),b))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][s]&&Array.isArray(o.globals.seriesGoals[a][s])&&o.globals.seriesGoals[a][s].forEach(function(f){c(f.value,f)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,g={strokeHeight:e==="x"?0:o.globals.markers.size[a],strokeWidth:e==="x"?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(o.globals.seriesRangeStart[a][s],g),c(o.globals.seriesRangeEnd[a][s],Y(Y({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,r=e.barWidth,n=e.barHeight,o=new X(this.barCtx.ctx),h=o.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){if(d.x>=-1&&d.x<=o.w.globals.gridWidth+1){var g=d.attrs.strokeHeight!==void 0?d.attrs.strokeHeight:n/2,f=i+g+n/2;c=o.drawLine(d.x,f-2*g,d.x,f,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),h.add(c)}}):Array.isArray(s)&&s.forEach(function(d){if(d.y>=-1&&d.y<=o.w.globals.gridHeight+1){var g=d.attrs.strokeWidth!==void 0?d.attrs.strokeWidth:r/2,f=t+g+r/2;c=o.drawLine(f-2*g,d.y,f,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),h.add(c)}}),h}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,s=this.w,r=t.x,n=t.x1,o=t.barYPosition,h=i.x,c=i.x1,d=i.barYPosition,g=o+i.barHeight,f=new X(this.barCtx.ctx),x=new P,b=f.move(n,g)+f.line(r,g)+f.line(h,d)+f.line(c,d)+f.line(n,g)+(s.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z");return f.drawPath({d:b,fill:x.shadeColor(.5,P.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(e){var t,i=e.i,a=e.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map(function(o,h){return h}):((t=s.globals.columnSeries)===null||t===void 0?void 0:t.i.map(function(o){return o}))||[]).forEach(function(o){var h=s.globals.seriesPercent[o][a];h&&r++,o<i&&h===0&&n++}),{nonZeroColumns:r,zeroEncounters:n}}},{key:"getGroupIndex",value:function(e){var t=this.w,i=t.globals.seriesGroups.findIndex(function(r){return r.indexOf(t.globals.seriesNames[e])>-1}),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),p}(),me=function(){function p(e,t){F(this,p),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=t,this.xyRatios!==null&&(this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var a=new re(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var s=a.getBarSeriesIndices(),r=new $(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(n,o){return s.indexOf(o)===-1?o:-1}).filter(function(n){return n!==-1})),this.barHelpers=new ea(this)}return R(p,[{key:"draw",value:function(e,t){var i=this.w,a=new X(this.ctx),s=new $(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.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(var n=0,o=0;n<e.length;n++,o++){var h,c,d,g,f=void 0,x=void 0,b=[],v=[],y=i.globals.comboCharts?t[n]:n,w=this.barHelpers.getGroupIndex(y).columnGroupIndex,l=a.group({class:"apexcharts-series",rel:n+1,seriesName:P.escapeString(i.globals.seriesNames[y]),"data:realIndex":y});this.ctx.series.addCollapsedClassToSeries(l,y),e[n].length>0&&(this.visibleI=this.visibleI+1);var u=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();x=k.y,u=k.barHeight,c=k.yDivision,g=k.zeroW,f=k.x,m=k.barWidth,h=k.xDivision,d=k.zeroH,this.horizontal||v.push(f+m/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":y});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),C=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:C.node}),C.node.classList.add("apexcharts-element-hidden");for(var I=0;I<e[n].length;I++){var z=this.barHelpers.getStrokeWidth(n,I,y),M=null,T={indexes:{i:n,j:I,realIndex:y,translationsIndex:A,bc:o},x:f,y:x,strokeWidth:z,elSeries:l};this.isHorizontal?(M=this.drawBarPaths(Y(Y({},T),{},{barHeight:u,zeroW:g,yDivision:c})),m=this.series[n][I]/this.invertedYRatio):(M=this.drawColumnPaths(Y(Y({},T),{},{xDivision:h,barWidth:m,zeroH:d})),u=this.series[n][I]/this.yRatio[A]);var E=this.barHelpers.getPathFillColor(e,n,I,y);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&I>0){var O=this.barHelpers.drawBarShadow({color:typeof E=="string"&&E?.indexOf("url")===-1?E:P.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:M});O&&C.add(O)}this.pathArr.push(M);var D=this.barHelpers.drawGoalLine({barXPosition:M.barXPosition,barYPosition:M.barYPosition,goalX:M.goalX,goalY:M.goalY,barHeight:u,barWidth:m});D&&L.add(D),x=M.y,f=M.x,I>0&&v.push(f+m/2),b.push(x),this.renderSeries({realIndex:y,pathFill:E,j:I,i:n,columnGroupIndex:w,pathFrom:M.pathFrom,pathTo:M.pathTo,strokeWidth:z,elSeries:l,x:f,y:x,series:e,barHeight:Math.abs(M.barHeight?M.barHeight:u),barWidth:Math.abs(M.barWidth?M.barWidth:m),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:C,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[y]=v,i.globals.seriesYvalues[y]=b,r.add(l)}return r}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,r=e.i,n=e.columnGroupIndex,o=e.pathFrom,h=e.pathTo,c=e.strokeWidth,d=e.elSeries,g=e.x,f=e.y,x=e.y1,b=e.y2,v=e.series,y=e.barHeight,w=e.barWidth,l=e.barXPosition,u=e.barYPosition,m=e.elDataLabelsWrap,A=e.elGoalsMarkers,k=e.elBarShadows,S=e.visibleSeries,L=e.type,C=this.w,I=new X(this.ctx);if(!a){var z=typeof C.globals.stroke.colors[t]=="function"?function(D){var H,W=C.config.stroke.colors;return Array.isArray(W)&&W.length>0&&((H=W[D])||(H=""),typeof H=="function")?H({value:C.globals.series[D][s],dataPointIndex:s,w:C}):H}(t):C.globals.stroke.colors[t];a=this.barOptions.distributed?C.globals.stroke.colors[s]:z}C.config.series[r].data[s]&&C.config.series[r].data[s].strokeColor&&(a=C.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var M=s/C.config.chart.animations.animateGradually.delay*(C.config.chart.animations.speed/C.globals.dataPoints)/2.4,T=I.renderPaths({i:r,j:s,realIndex:t,pathFrom:o,pathTo:h,stroke:a,strokeWidth:c,strokeLineCap:C.config.stroke.lineCap,fill:i,animationDelay:M,initialSpeed:C.config.chart.animations.speed,dataChangeSpeed:C.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area")});T.attr("clip-path","url(#gridRectMask".concat(C.globals.cuid,")"));var E=C.config.forecastDataPoints;E.count>0&&s>=C.globals.dataPoints-E.count&&(T.node.setAttribute("stroke-dasharray",E.dashArray),T.node.setAttribute("stroke-width",E.strokeWidth),T.node.setAttribute("fill-opacity",E.fillOpacity)),x!==void 0&&b!==void 0&&(T.attr("data-range-y1",x),T.attr("data-range-y2",b)),new ie(this.ctx).setSelectionFilter(T,t,s),d.add(T);var O=new Qi(this).handleBarDataLabels({x:g,y:f,y1:x,y2:b,i:r,j:s,series:v,realIndex:t,columnGroupIndex:n,barHeight:y,barWidth:w,barXPosition:l,barYPosition:u,renderedPath:T,visibleSeries:S});return O.dataLabels!==null&&m.add(O.dataLabels),O.totalDataLabels&&m.add(O.totalDataLabels),d.add(m),A&&d.add(A),k&&d.add(k),d}},{key:"drawBarPaths",value:function(e){var t,i=e.indexes,a=e.barHeight,s=e.strokeWidth,r=e.zeroW,n=e.x,o=e.y,h=e.yDivision,c=e.elSeries,d=this.w,g=i.i,f=i.j;if(d.globals.isXNumeric)t=(o=(d.globals.seriesX[g][f]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var x=0,b=0;d.globals.seriesPercent.forEach(function(y,w){y[f]&&x++,w<g&&y[f]===0&&b++}),x>0&&(a=this.seriesLen*a/x),t=o+a*this.visibleI,t-=a*b}else t=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[g][f],r)-r)/2),n=this.barHelpers.getXForValue(this.series[g][f],r);var v=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:r,x2:n,strokeWidth:s,series:this.series,realIndex:i.realIndex,i:g,j:f,w:d});return d.globals.isXNumeric||(o+=h),this.barHelpers.barBackground({j:f,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:v.pathTo,pathFrom:v.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,g,f),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,i=e.indexes,a=e.x,s=e.y,r=e.xDivision,n=e.barWidth,o=e.zeroH,h=e.strokeWidth,c=e.elSeries,d=this.w,g=i.realIndex,f=i.translationsIndex,x=i.i,b=i.j,v=i.bc;if(d.globals.isXNumeric){var y=this.getBarXForNumericXAxis({x:a,j:b,realIndex:g,barWidth:n});a=y.x,t=y.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var w=this.barHelpers.getZeroValueEncounters({i:x,j:b}),l=w.nonZeroColumns,u=w.zeroEncounters;l>0&&(n=this.seriesLen*n/l),t=a+n*this.visibleI,t-=n*u}else t=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[x][b],o,f);var m=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:s,strokeWidth:h,series:this.series,realIndex:g,i:x,j:b,w:d});return d.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:v,j:b,i:x,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:c}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,x,b,f),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,s=e.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),r.globals.seriesX[n][s]&&(t=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,s=0;s<a.globals.previousPaths.length;s++){var r=a.globals.previousPaths[s];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&a.globals.previousPaths[s].paths[t]!==void 0&&(i=a.globals.previousPaths[s].paths[t].d)}return i}}]),p}(),St=function(p){Te(t,me);var e=Ie(t);function t(){return F(this,t),e.apply(this,arguments)}return R(t,[{key:"draw",value:function(i,a){var s=this,r=this.w;this.graphics=new X(this.ctx),this.bar=new me(this.ctx,this.xyRatios);var n=new $(this.ctx,r);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?a.map(function(x){return r.globals.seriesPercent[x]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,c=0,d=function(x,b){var v=void 0,y=void 0,w=void 0,l=void 0,u=r.globals.comboCharts?a[x]:x,m=s.barHelpers.getGroupIndex(u),A=m.groupIndex,k=m.columnGroupIndex;s.groupCtx=s[r.globals.seriesGroups[A]];var S=[],L=[],C=0;s.yRatio.length>1&&(s.yaxisIndex=r.globals.seriesYAxisReverseMap[u][0],C=u),s.isReversed=r.config.yaxis[s.yaxisIndex]&&r.config.yaxis[s.yaxisIndex].reversed;var I=s.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(r.globals.seriesNames[u]),rel:x+1,"data:realIndex":u});s.ctx.series.addCollapsedClassToSeries(I,u);var z=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":u}),M=s.graphics.group({class:"apexcharts-bar-goals-markers"}),T=0,E=0,O=s.initialPositions(h,c,v,y,w,l,C);c=O.y,T=O.barHeight,y=O.yDivision,l=O.zeroW,h=O.x,E=O.barWidth,v=O.xDivision,w=O.zeroH,r.globals.barHeight=T,r.globals.barWidth=E,s.barHelpers.initializeStackedXYVars(s),s.groupCtx.prevY.length===1&&s.groupCtx.prevY[0].every(function(Z){return isNaN(Z)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(){return w}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(){return 0}));for(var D=0;D<r.globals.dataPoints;D++){var H=s.barHelpers.getStrokeWidth(x,D,u),W={indexes:{i:x,j:D,realIndex:u,translationsIndex:C,bc:b},strokeWidth:H,x:h,y:c,elSeries:I,columnGroupIndex:k,seriesGroup:r.globals.seriesGroups[A]},N=null;s.isHorizontal?(N=s.drawStackedBarPaths(Y(Y({},W),{},{zeroW:l,barHeight:T,yDivision:y})),E=s.series[x][D]/s.invertedYRatio):(N=s.drawStackedColumnPaths(Y(Y({},W),{},{xDivision:v,barWidth:E,zeroH:w})),T=s.series[x][D]/s.yRatio[C]);var B=s.barHelpers.drawGoalLine({barXPosition:N.barXPosition,barYPosition:N.barYPosition,goalX:N.goalX,goalY:N.goalY,barHeight:T,barWidth:E});B&&M.add(B),c=N.y,h=N.x,S.push(h),L.push(c);var q=s.barHelpers.getPathFillColor(i,x,D,u);I=s.renderSeries({realIndex:u,pathFill:q,j:D,i:x,columnGroupIndex:k,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:H,elSeries:I,x:h,y:c,series:i,barHeight:T,barWidth:E,elDataLabelsWrap:z,elGoalsMarkers:M,type:"bar",visibleSeries:k})}r.globals.seriesXvalues[u]=S,r.globals.seriesYvalues[u]=L,s.groupCtx.prevY.push(s.groupCtx.yArrj),s.groupCtx.prevYF.push(s.groupCtx.yArrjF),s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal),s.groupCtx.prevX.push(s.groupCtx.xArrj),s.groupCtx.prevXF.push(s.groupCtx.xArrjF),s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal),o.add(I)},g=0,f=0;g<i.length;g++,f++)d(g,f);return o}},{key:"initialPositions",value:function(i,a,s,r,n,o,h){var c,d,g=this.w;if(this.isHorizontal){r=g.globals.gridHeight/g.globals.dataPoints;var f=g.config.plotOptions.bar.barHeight;c=String(f).indexOf("%")===-1?parseInt(f,10):r*parseInt(f,10)/100,o=g.globals.padHorizontal+(this.isReversed?g.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),a=(r-c)/2}else{d=s=g.globals.gridWidth/g.globals.dataPoints;var x=g.config.plotOptions.bar.columnWidth;g.globals.isXNumeric&&g.globals.dataPoints>1?d=(s=g.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(x).indexOf("%")===-1?d=parseInt(x,10):d*=parseInt(x,10)/100,n=this.isReversed?this.baseLineY[h]:g.globals.gridHeight-this.baseLineY[h],i=g.globals.padHorizontal+(s-d)/2}var b=g.globals.barGroups.length||1;return{x:i,y:a,yDivision:r,xDivision:s,barHeight:c/b,barWidth:d/b,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,s=i.indexes,r=i.barHeight,n=i.strokeWidth,o=i.zeroW,h=i.x,c=i.y,d=i.columnGroupIndex,g=i.seriesGroup,f=i.yDivision,x=i.elSeries,b=this.w,v=c+d*r,y=s.i,w=s.j,l=s.realIndex,u=s.translationsIndex,m=0,A=0;A<this.groupCtx.prevXF.length;A++)m+=this.groupCtx.prevXF[A][w];var k;if((k=g.indexOf(b.config.series[l].name))>0){var S=o;this.groupCtx.prevXVal[k-1][w]<0?S=this.series[y][w]>=0?this.groupCtx.prevX[k-1][w]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[k-1][w]:this.groupCtx.prevXVal[k-1][w]>=0&&(S=this.series[y][w]>=0?this.groupCtx.prevX[k-1][w]:this.groupCtx.prevX[k-1][w]-m+2*(this.isReversed?m:0)),a=S}else a=o;h=this.series[y][w]===null?a:a+this.series[y][w]/this.invertedYRatio-2*(this.isReversed?this.series[y][w]/this.invertedYRatio:0);var L=this.barHelpers.getBarpaths({barYPosition:v,barHeight:r,x1:a,x2:h,strokeWidth:n,series:this.series,realIndex:s.realIndex,seriesGroup:g,i:y,j:w,w:b});return this.barHelpers.barBackground({j:w,i:y,y1:v,y2:r,elSeries:x}),c+=f,{pathTo:L.pathTo,pathFrom:L.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,y,w,u),barXPosition:a,barYPosition:v,x:h,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.y,n=i.xDivision,o=i.barWidth,h=i.zeroH,c=i.columnGroupIndex,d=i.seriesGroup,g=i.elSeries,f=this.w,x=a.i,b=a.j,v=a.bc,y=a.realIndex,w=a.translationsIndex;if(f.globals.isXNumeric){var l=f.globals.seriesX[y][b];l||(l=0),s=(l-f.globals.minX)/this.xRatio-o/2*f.globals.barGroups.length}for(var u,m=s+c*o,A=0,k=0;k<this.groupCtx.prevYF.length;k++)A+=isNaN(this.groupCtx.prevYF[k][b])?0:this.groupCtx.prevYF[k][b];var S=x;if(d&&(S=d.indexOf(f.globals.seriesNames[y])),S>0&&!f.globals.isXNumeric||S>0&&f.globals.isXNumeric&&f.globals.seriesX[y-1][b]===f.globals.seriesX[y][b]){var L,C,I,z=Math.min(this.yRatio.length+1,y+1);if(this.groupCtx.prevY[S-1]!==void 0&&this.groupCtx.prevY[S-1].length)for(var M=1;M<z;M++){var T;if(!isNaN((T=this.groupCtx.prevY[S-M])===null||T===void 0?void 0:T[b])){I=this.groupCtx.prevY[S-M][b];break}}for(var E=1;E<z;E++){var O,D;if(((O=this.groupCtx.prevYVal[S-E])===null||O===void 0?void 0:O[b])<0){C=this.series[x][b]>=0?I-A+2*(this.isReversed?A:0):I;break}if(((D=this.groupCtx.prevYVal[S-E])===null||D===void 0?void 0:D[b])>=0){C=this.series[x][b]>=0?I:I+A-2*(this.isReversed?A:0);break}}C===void 0&&(C=f.globals.gridHeight),u=(L=this.groupCtx.prevYF[0])!==null&&L!==void 0&&L.every(function(W){return W===0})&&this.groupCtx.prevYF.slice(1,S).every(function(W){return W.every(function(N){return isNaN(N)})})?h:C}else u=h;r=this.series[x][b]?u-this.series[x][b]/this.yRatio[w]+2*(this.isReversed?this.series[x][b]/this.yRatio[w]:0):u;var H=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:o,y1:u,y2:r,yRatio:this.yRatio[w],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:x,j:b,w:f});return this.barHelpers.barBackground({bc:v,j:b,i:x,x1:m,x2:o,elSeries:g}),{pathTo:H.pathTo,pathFrom:H.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,x,b),barXPosition:m,x:f.globals.isXNumeric?s:s+n,y:r}}}]),t}(),Qe=function(p){Te(t,me);var e=Ie(t);function t(){return F(this,t),e.apply(this,arguments)}return R(t,[{key:"draw",value:function(i,a,s){var r=this,n=this.w,o=new X(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,c=new ne(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var d=new $(this.ctx,n);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var g=o.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),f=function(b){r.isBoxPlot=n.config.chart.type==="boxPlot"||n.config.series[b].type==="boxPlot";var v,y,w,l,u=void 0,m=void 0,A=[],k=[],S=n.globals.comboCharts?s[b]:b,L=r.barHelpers.getGroupIndex(S).columnGroupIndex,C=o.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[S]),rel:b+1,"data:realIndex":S});r.ctx.series.addCollapsedClassToSeries(C,S),i[b].length>0&&(r.visibleI=r.visibleI+1);var I,z,M=0;r.yRatio.length>1&&(r.yaxisIndex=n.globals.seriesYAxisReverseMap[S][0],M=S);var T=r.barHelpers.initialPositions();m=T.y,I=T.barHeight,y=T.yDivision,l=T.zeroW,u=T.x,z=T.barWidth,v=T.xDivision,w=T.zeroH,k.push(u+z/2);for(var E=o.group({class:"apexcharts-datalabels","data:realIndex":S}),O=function(H){var W=r.barHelpers.getStrokeWidth(b,H,S),N=null,B={indexes:{i:b,j:H,realIndex:S,translationsIndex:M},x:u,y:m,strokeWidth:W,elSeries:C};N=r.isHorizontal?r.drawHorizontalBoxPaths(Y(Y({},B),{},{yDivision:y,barHeight:I,zeroW:l})):r.drawVerticalBoxPaths(Y(Y({},B),{},{xDivision:v,barWidth:z,zeroH:w})),m=N.y,u=N.x,H>0&&k.push(u+z/2),A.push(m),N.pathTo.forEach(function(q,Z){var j=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?N.color[Z]:n.globals.stroke.colors[b],se=c.fillPath({seriesNumber:S,dataPointIndex:H,color:N.color[Z],value:i[b][H]});r.renderSeries({realIndex:S,pathFill:se,lineFill:j,j:H,i:b,pathFrom:N.pathFrom,pathTo:q,strokeWidth:W,elSeries:C,x:u,y:m,series:i,columnGroupIndex:L,barHeight:I,barWidth:z,elDataLabelsWrap:E,visibleSeries:r.visibleI,type:n.config.chart.type})})},D=0;D<n.globals.dataPoints;D++)O(D);n.globals.seriesXvalues[S]=k,n.globals.seriesYvalues[S]=A,g.add(C)},x=0;x<i.length;x++)f(x);return g}},{key:"drawVerticalBoxPaths",value:function(i){var a=i.indexes,s=i.x;i.y;var r=i.xDivision,n=i.barWidth,o=i.zeroH,h=i.strokeWidth,c=this.w,d=new X(this.ctx),g=a.i,f=a.j,x=!0,b=c.config.plotOptions.candlestick.colors.upward,v=c.config.plotOptions.candlestick.colors.downward,y="";this.isBoxPlot&&(y=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var w=this.yRatio[a.translationsIndex],l=a.realIndex,u=this.getOHLCValue(l,f),m=o,A=o;u.o>u.c&&(x=!1);var k=Math.min(u.o,u.c),S=Math.max(u.o,u.c),L=u.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[l][f]-c.globals.minX)/this.xRatio-n/2);var C=s+n*this.visibleI;this.series[g][f]===void 0||this.series[g][f]===null?(k=o,S=o):(k=o-k/w,S=o-S/w,m=o-u.h/w,A=o-u.l/w,L=o-u.m/w);var I=d.move(C,o),z=d.move(C+n/2,k);return c.globals.previousPaths.length>0&&(z=this.getPreviousPath(l,f,!0)),I=this.isBoxPlot?[d.move(C,k)+d.line(C+n/2,k)+d.line(C+n/2,m)+d.line(C+n/4,m)+d.line(C+n-n/4,m)+d.line(C+n/2,m)+d.line(C+n/2,k)+d.line(C+n,k)+d.line(C+n,L)+d.line(C,L)+d.line(C,k+h/2),d.move(C,L)+d.line(C+n,L)+d.line(C+n,S)+d.line(C+n/2,S)+d.line(C+n/2,A)+d.line(C+n-n/4,A)+d.line(C+n/4,A)+d.line(C+n/2,A)+d.line(C+n/2,S)+d.line(C,S)+d.line(C,L)+"z"]:[d.move(C,S)+d.line(C+n/2,S)+d.line(C+n/2,m)+d.line(C+n/2,S)+d.line(C+n,S)+d.line(C+n,k)+d.line(C+n/2,k)+d.line(C+n/2,A)+d.line(C+n/2,k)+d.line(C,k)+d.line(C,S-h/2)],z+=d.move(C,k),c.globals.isXNumeric||(s+=r),{pathTo:I,pathFrom:z,x:s,y:S,barXPosition:C,color:this.isBoxPlot?y:x?[b]:[v]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes;i.x;var s=i.y,r=i.yDivision,n=i.barHeight,o=i.zeroW,h=i.strokeWidth,c=this.w,d=new X(this.ctx),g=a.i,f=a.j,x=this.boxOptions.colors.lower;this.isBoxPlot&&(x=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var b=this.invertedYRatio,v=a.realIndex,y=this.getOHLCValue(v,f),w=o,l=o,u=Math.min(y.o,y.c),m=Math.max(y.o,y.c),A=y.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[v][f]-c.globals.minX)/this.invertedXRatio-n/2);var k=s+n*this.visibleI;this.series[g][f]===void 0||this.series[g][f]===null?(u=o,m=o):(u=o+u/b,m=o+m/b,w=o+y.h/b,l=o+y.l/b,A=o+y.m/b);var S=d.move(o,k),L=d.move(u,k+n/2);return c.globals.previousPaths.length>0&&(L=this.getPreviousPath(v,f,!0)),S=[d.move(u,k)+d.line(u,k+n/2)+d.line(w,k+n/2)+d.line(w,k+n/2-n/4)+d.line(w,k+n/2+n/4)+d.line(w,k+n/2)+d.line(u,k+n/2)+d.line(u,k+n)+d.line(A,k+n)+d.line(A,k)+d.line(u+h/2,k),d.move(A,k)+d.line(A,k+n)+d.line(m,k+n)+d.line(m,k+n/2)+d.line(l,k+n/2)+d.line(l,k+n-n/4)+d.line(l,k+n/4)+d.line(l,k+n/2)+d.line(m,k+n/2)+d.line(m,k)+d.line(A,k)+"z"],L+=d.move(u,k),c.globals.isXNumeric||(s+=r),{pathTo:S,pathFrom:L,x:m,y:s,barYPosition:k,color:x}}},{key:"getOHLCValue",value:function(i,a){var s=this.w;return{o:this.isBoxPlot?s.globals.seriesCandleH[i][a]:s.globals.seriesCandleO[i][a],h:this.isBoxPlot?s.globals.seriesCandleO[i][a]:s.globals.seriesCandleH[i][a],m:s.globals.seriesCandleM[i][a],l:this.isBoxPlot?s.globals.seriesCandleC[i][a]:s.globals.seriesCandleL[i][a],c:this.isBoxPlot?s.globals.seriesCandleL[i][a]:s.globals.seriesCandleC[i][a]}}}]),t}(),Bt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,r=1,n=s.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);s.globals.hasNegs||a?r=s.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,e==="treemap"&&(r=(1-o.percent/100)*(1.25*n)));var h=o.color,c=new P;if(s.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=c.shadeColor(-1*r,o.color);h=P.hexToRgba(P.isColorHex(d)?d:P.rgb2hex(d),s.config.fill.opacity)}else{var g=c.shadeColor(r,o.color);h=P.hexToRgba(P.isColorHex(g)?g:P.rgb2hex(g),s.config.fill.opacity)}return{color:h,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],r=a.config.plotOptions[e],n=r.colorScale.inverse?i:t;r.distributed&&a.config.chart.type==="treemap"&&(n=i);var o=a.globals.colors[n],h=null,c=Math.min.apply(Math,te(a.globals.series[t])),d=Math.max.apply(Math,te(a.globals.series[t]));r.distributed||e!=="heatmap"||(c=a.globals.minY,d=a.globals.maxY),r.colorScale.min!==void 0&&(c=r.colorScale.min<a.globals.minY?r.colorScale.min:a.globals.minY,d=r.colorScale.max>a.globals.maxY?r.colorScale.max:a.globals.maxY);var g=Math.abs(d)+Math.abs(c),f=100*s/(g===0?g-1e-6:g);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(x,b){if(s>=x.from&&s<=x.to){o=x.color,h=x.foreColor?x.foreColor:null,c=x.from,d=x.to;var v=Math.abs(d)+Math.abs(c);f=100*s/(v===0?v-1e-6:v)}}),{color:o,foreColor:h,percent:f}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,r=e.j,n=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,c=new X(this.ctx),d=new be(this.ctx),g=null;if(h.enabled){g=c.group({class:"apexcharts-data-labels"});var f=h.offsetX,x=h.offsetY,b=i+f,v=a+parseFloat(h.style.fontSize)/3+x;d.plotDataLabelsText({x:b,y:v,text:t,i:s,j:r,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:h})}return g}},{key:"addListeners",value:function(e){var t=new X(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),p}(),ta=function(){function p(e,t){F(this,p),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Bt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return R(p,[{key:"draw",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,r=t.globals.gridHeight/t.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(o=!0,h.reverse());for(var c=o?0:h.length-1;o?c<h.length:c>=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:P.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var g=t.config.chart.dropShadow;new ie(this.ctx).dropShadow(d,g,c)}for(var f=0,x=t.config.plotOptions.heatmap.shadeIntensity,b=0;b<h[c].length;b++){var v=this.helpers.getShadeColor(t.config.chart.type,c,b,this.negRange),y=v.color,w=v.colorProps;t.config.fill.type==="image"&&(y=new ne(this.ctx).fillPath({seriesNumber:c,dataPointIndex:b,opacity:t.globals.hasNegs?w.percent<0?1-(1+w.percent/100):x+w.percent/100:w.percent/100,patternID:P.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:s,height:t.config.fill.image.height?t.config.fill.image.height:r}));var l=this.rectRadius,u=i.drawRect(f,n,s,r,l);if(u.attr({cx:f,cy:n}),u.node.classList.add("apexcharts-heatmap-rect"),d.add(u),u.attr({fill:y,i:c,index:c,j:b,val:e[c][b],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?y:t.globals.stroke.colors[0],color:y}),this.helpers.addListeners(u),t.config.chart.animations.enabled&&!t.globals.dataChanged){var m=1;t.globals.resized||(m=t.config.chart.animations.speed),this.animateHeatMap(u,f,n,s,r,m)}if(t.globals.dataChanged){var A=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){A=this.dynamicAnim.speed;var k=t.globals.previousPaths[c]&&t.globals.previousPaths[c][b]&&t.globals.previousPaths[c][b].color;k||(k="rgba(255, 255, 255, 0)"),this.animateHeatColor(u,P.isColorHex(k)?k:P.rgb2hex(k),P.isColorHex(y)?y:P.rgb2hex(y),A)}}var S=(0,t.config.dataLabels.formatter)(t.globals.series[c][b],{value:t.globals.series[c][b],seriesIndex:c,dataPointIndex:b,w:t}),L=this.helpers.calculateDataLabels({text:S,x:f+s/2,y:n+r/2,i:c,j:b,colorProps:w,series:h});L!==null&&d.add(L),f+=s}n+=r,a.add(d)}var C=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?C.unshift(""):C.push(""),t.globals.yAxisScale[0].result=C,a}},{key:"animateHeatMap",value:function(e,t,i,a,s,r){var n=new ve(this.ctx);n.animateRect(e,{x:t+a/2,y:i+s/2,width:0,height:0},{x:t,y:i,width:a,height:s},r,function(){n.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,t,i,a){e.attr({fill:t}).animate(a).attr({fill:i})}}]),p}(),Gt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"drawYAxisTexts",value:function(e,t,i,a){var s=this.w,r=s.config.yaxis[0],n=s.globals.yLabelFormatters[0];return new X(this.ctx).drawText({x:e+r.labels.offsetX,y:t+r.labels.offsetY,text:n(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),p}(),Vt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w;var t=this.w;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.globals.gridWidth,t.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.globals.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.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;var i=t.config.plotOptions.pie.customScale,a=t.globals.gridWidth/2,s=t.globals.gridHeight/2;this.translateX=a-a*i,this.translateY=s-s*i,this.dataLabelsGroup=new X(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return R(p,[{key:"draw",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=a.group({class:"apexcharts-pie"});if(i.globals.noData)return s;for(var r=0,n=0;n<e.length;n++)r+=P.negToZero(e[n]);var o=[],h=a.group();r===0&&(r=1e-5),e.forEach(function(l){t.maxY=Math.max(t.maxY,l)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(s);for(var c=0;c<e.length;c++){var d=this.fullAngle*P.negToZero(e[c])/r;o.push(d),this.chartType==="polarArea"?(o[c]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[c]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var g,f=0,x=0;x<i.globals.previousPaths.length;x++)f+=P.negToZero(i.globals.previousPaths[x]);for(var b=0;b<i.globals.previousPaths.length;b++)g=this.fullAngle*P.negToZero(i.globals.previousPaths[b])/f,this.prevSectorAngleArr.push(g)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var v=a.drawCircle(this.donutSize);v.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),h.add(v)}var y=this.drawArcs(o,e);if(this.sliceLabels.forEach(function(l){y.add(l)}),h.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),h.add(y),s.add(h),this.donutDataLabels.show){var w=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});s.add(w)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(s),s}},{key:"drawArcs",value:function(e,t){var i=this.w,a=new ie(this.ctx),s=new X(this.ctx),r=new ne(this.ctx),n=s.group({class:"apexcharts-slices"}),o=this.initialAngle,h=this.initialAngle,c=this.initialAngle,d=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var g=0;g<e.length;g++){var f=s.group({class:"apexcharts-series apexcharts-pie-series",seriesName:P.escapeString(i.globals.seriesNames[g]),rel:g+1,"data:realIndex":g});n.add(f),h=d,c=(o=c)+e[g],d=h+this.prevSectorAngleArr[g];var x=c<o?this.fullAngle+c-o:c-o,b=r.fillPath({seriesNumber:g,size:this.sliceSizes[g],value:t[g]}),v=this.getChangedPath(h,d),y=s.drawPath({d:v,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[g]:this.lineColorArr,strokeWidth:0,fill:b,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(g)});if(y.attr({index:0,j:g}),a.setSelectionFilter(y,0,g),i.config.chart.dropShadow.enabled){var w=i.config.chart.dropShadow;a.dropShadow(y,w,g)}this.addListeners(y,this.donutDataLabels),X.setAttrs(y.node,{"data:angle":x,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":t[g]});var l={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?l=P.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(o+x/2)%this.fullAngle):this.chartType==="donut"&&(l=P.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(o+x/2)%this.fullAngle)),f.add(y);var u=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):((u=x/this.fullAngle*i.config.chart.animations.speed)===0&&(u=1),this.animDur=u+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(y,{size:this.sliceSizes[g],endAngle:c,startAngle:o,prevStartAngle:h,prevEndAngle:d,animateStartingPos:!0,i:g,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(y,{size:this.sliceSizes[g],endAngle:c,startAngle:o,i:g,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:u}),i.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&y.node.addEventListener("mouseup",this.pieClicked.bind(this,g)),i.globals.selectedDataPoints[0]!==void 0&&i.globals.selectedDataPoints[0].indexOf(g)>-1&&this.pieClicked(g),i.config.dataLabels.enabled){var m=l.x,A=l.y,k=100*x/this.fullAngle+"%";if(x!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[g]){var S=i.config.dataLabels.formatter;S!==void 0&&(k=S(i.globals.seriesPercent[g][0],{seriesIndex:g,w:i}));var L=i.globals.dataLabels.style.colors[g],C=s.group({class:"apexcharts-datalabels"}),I=s.drawText({x:m,y:A,text:k,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:L});if(C.add(I),i.config.dataLabels.dropShadow.enabled){var z=i.config.dataLabels.dropShadow;a.dropShadow(I,z)}I.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&i.globals.resized===!1&&(I.node.classList.add("apexcharts-pie-label-delay"),I.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(C)}}}return n}},{key:"addListeners",value:function(e,t){var i=new X(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var i=this.w,a=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,s=a,r=t.startAngle,n=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(r=t.prevEndAngle,s=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===i.config.series.length-1&&(a+n>this.fullAngle?t.endAngle=t.endAngle-(a+n):a+n<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(a+n)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(e,r,n,a,s,t)}},{key:"animateArc",value:function(e,t,i,a,s,r){var n,o=this,h=this.w,c=new ve(this.ctx),d=r.size;(isNaN(t)||isNaN(s))&&(t=i,s=a,r.dur=0);var g=a,f=i,x=t<i?this.fullAngle+t-i:t-i;h.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(n=o.getPiePath({me:o,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:d}),e.attr({d:n})),r.dur!==0?e.animate(r.dur,h.globals.easing,r.animBeginArr[r.i]).afterAll(function(){o.chartType!=="pie"&&o.chartType!=="donut"&&o.chartType!=="polarArea"||this.animate(h.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),r.i===h.config.series.length-1&&c.animationCompleted(e)}).during(function(b){g=x+(a-x)*b,r.animateStartingPos&&(g=s+(a-s)*b,f=t-s+(i-(t-s))*b),n=o.getPiePath({me:o,startAngle:f,angle:g,size:d}),e.node.setAttribute("data:pathOrig",n),e.attr({d:n})}):(n=o.getPiePath({me:o,startAngle:f,angle:a,size:d}),r.isTrack||(h.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",n),e.attr({d:n,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,i=this.w,a=this,s=a.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(e)).members[0];if(r.attr("data:pieClicked")!=="true"){var n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(n,function(d){d.setAttribute("data:pieClicked","false");var g=d.getAttribute("data:pathOrig");g&&d.setAttribute("d",g)}),i.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var o=parseInt(r.attr("data:startAngle"),10),h=parseInt(r.attr("data:angle"),10);t=a.getPiePath({me:a,startAngle:o,angle:h,size:s}),h!==360&&r.plot(t)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var c=r.attr("data:pathOrig");r.attr({d:c})}}},{key:"getChangedPath",value:function(e,t){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var t,i=e.me,a=e.startAngle,s=e.angle,r=e.size,n=new X(this.ctx),o=a,h=Math.PI*(o-90)/180,c=s+a;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,g=i.centerX+r*Math.cos(h),f=i.centerY+r*Math.sin(h),x=i.centerX+r*Math.cos(d),b=i.centerY+r*Math.sin(d),v=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),y=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),w=s>180?1:0,l=["M",g,f,"A",r,r,0,w,1,x,b];return t=i.chartType==="donut"?[].concat(l,["L",v.x,v.y,"A",i.donutSize,i.donutSize,0,w,0,y.x,y.y,"L",g,f,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(l,["L",i.centerX,i.centerY,"L",g,f]).join(" "):[].concat(l).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new Ot(this.ctx),a=new X(this.ctx),s=new Gt(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),h=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=t.globals.radialSize,g=d/(c-1),f=0;f<c-1;f++){var x=a.drawCircle(d);if(x.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var b=s.drawYAxisTexts(this.centerX,this.centerY-d+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,f,h[f]);n.add(b)}r.add(x),d-=g}this.drawSpokes(e),e.add(r),e.add(n)}},{key:"renderInnerDataLabels",value:function(e,t,i){var a=this.w,s=new X(this.ctx),r=t.total.show;e.node.innerHTML="",e.node.style.opacity=i.opacity;var n,o,h=i.centerX,c=i.centerY;n=t.name.color===void 0?a.globals.colors[0]:t.name.color;var d=t.name.fontSize,g=t.name.fontFamily,f=t.name.fontWeight;o=t.value.color===void 0?a.config.chart.foreColor:t.value.color;var x=t.value.formatter,b="",v="";if(r?(n=t.total.color,d=t.total.fontSize,g=t.total.fontFamily,f=t.total.fontWeight,v=t.total.label,b=t.total.formatter(a)):a.globals.series.length===1&&(b=x(a.globals.series[0],a),v=a.globals.seriesNames[0]),v&&(v=t.name.formatter(v,t.total.show,a)),t.name.show){var y=s.drawText({x:h,y:c+parseFloat(t.name.offsetY),text:v,textAnchor:"middle",foreColor:n,fontSize:d,fontWeight:f,fontFamily:g});y.node.classList.add("apexcharts-datalabel-label"),e.add(y)}if(t.value.show){var w=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,l=s.drawText({x:h,y:c+w,text:b,textAnchor:"middle",foreColor:o,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});l.node.classList.add("apexcharts-datalabel-value"),e.add(l)}return e}},{key:"printInnerLabels",value:function(e,t,i,a){var s,r=this.w;a?s=e.name.color===void 0?r.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:e.name.color:r.globals.series.length>1&&e.total.show&&(s=e.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),a||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var h=t===e.total.label;t=e.name.formatter(t,h,r),n!==null&&(n.textContent=t),o!==null&&(o.textContent=i),n!==null&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(s.strokeWidth!==0){for(var r=[],n=360/i.globals.series.length,o=0;o<i.globals.series.length;o++)r.push(P.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+n*o));r.forEach(function(h,c){var d=a.drawLine(h.x,h.y,t.centerX,t.centerY,Array.isArray(s.connectorColors)?s.connectorColors[c]:s.connectorColors);e.add(d)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var t=e.globals.dom.Paper.select(".apexcharts-datalabels-group").members[0],i=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.select(".apexcharts-radialbar, .apexcharts-pie").members[0].add(i)}}}]),p}(),ia=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,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;var t=this.w;this.graphics=new X(this.ctx),this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.globals.gridHeight+1.5*t.globals.goldenPadding:t.globals.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new $(this.ctx),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.globals.xAxisLabelsWidth/1.75),t.config.plotOptions.radar.size!==void 0&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return R(p,[{key:"draw",value:function(e){var t=this,i=this.w,a=new ne(this.ctx),s=[],r=new be(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var n=i.globals.gridWidth/2,o=i.globals.gridHeight/2,h=n+i.config.plotOptions.radar.offsetX,c=o+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(h||0,", ").concat(c||0,")")}),g=[],f=null,x=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(v,y){var w=v.length===i.globals.dataPoints,l=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":w,seriesName:P.escapeString(i.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});t.dataRadiusOfPercent[y]=[],t.dataRadius[y]=[],t.angleArr[y]=[],v.forEach(function(M,T){var E=Math.abs(t.maxValue-t.minValue);M-=t.minValue,t.isLog&&(M=t.coreUtils.getLogVal(t.logBase,M,0)),t.dataRadiusOfPercent[y][T]=M/E,t.dataRadius[y][T]=t.dataRadiusOfPercent[y][T]*t.size,t.angleArr[y][T]=T*t.disAngle}),g=t.getDataPointsPos(t.dataRadius[y],t.angleArr[y]);var u=t.createPaths(g,{x:0,y:0});f=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),x=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":y}),i.globals.delayedElements.push({el:f.node,index:y});var m={i:y,realIndex:y,animationDelay:y,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[y],strokeLineCap:i.config.stroke.lineCap},A=null;i.globals.previousPaths.length>0&&(A=t.getPreviousPath(y));for(var k=0;k<u.linePathsTo.length;k++){var S=t.graphics.renderPaths(Y(Y({},m),{},{pathFrom:A===null?u.linePathsFrom[k]:A,pathTo:u.linePathsTo[k],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[y]:t.strokeWidth,fill:"none",drawShadow:!1}));l.add(S);var L=a.fillPath({seriesNumber:y}),C=t.graphics.renderPaths(Y(Y({},m),{},{pathFrom:A===null?u.areaPathsFrom[k]:A,pathTo:u.areaPathsTo[k],strokeWidth:0,fill:L,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var I=new ie(t.ctx),z=i.config.chart.dropShadow;I.dropShadow(C,Object.assign({},z,{noUserSpaceOnUse:!0}),y)}l.add(C)}v.forEach(function(M,T){var E=new ye(t.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:y,dataPointIndex:T}),O=t.graphics.drawMarker(g[T].x,g[T].y,E);O.attr("rel",T),O.attr("j",T),O.attr("index",y),O.node.setAttribute("default-marker-size",E.pSize);var D=t.graphics.group({class:"apexcharts-series-markers"});D&&D.add(O),f.add(D),l.add(f);var H=i.config.dataLabels;if(H.enabled){var W=H.formatter(i.globals.series[y][T],{seriesIndex:y,dataPointIndex:T,w:i});r.plotDataLabelsText({x:g[T].x,y:g[T].y,text:W,textAnchor:"middle",i:y,j:y,parent:x,offsetCorrection:!1,dataLabelsConfig:Y({},H)})}l.add(x)}),s.push(l)}),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var b=this.drawXAxisTexts();d.add(b)}return s.forEach(function(v){d.add(v)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var t=this,i=this.w,a=e.parent,s=new Gt(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),n=r.length,o=[],h=this.size/(n-1),c=0;c<n;c++)o[c]=h*c;o.reverse();var d=[],g=[];o.forEach(function(f,x){var b=P.getPolygonPos(f,t.dataPointsLen),v="";b.forEach(function(y,w){if(x===0){var l=t.graphics.drawLine(y.x,y.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[w]:t.polygons.connectorColors);g.push(l)}w===0&&t.yaxisLabelsTextsPos.push({x:y.x,y:y.y}),v+=y.x+","+y.y+" "}),d.push(v)}),d.forEach(function(f,x){var b=t.polygons.strokeColors,v=t.polygons.strokeWidth,y=t.graphics.drawPolygon(f,Array.isArray(b)?b[x]:b,Array.isArray(v)?v[x]:v,i.globals.radarPolygons.fill.colors[x]);a.add(y)}),g.forEach(function(f){a.add(f)}),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(f,x){var b=s.drawYAxisTexts(f.x,f.y,x,r[x]);t.yaxisLabels.add(b)})}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,i=t.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),s=P.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach(function(r,n){var o=t.config.xaxis.labels.formatter,h=new be(e.ctx);if(s[n]){var c=e.getTextPos(s[n],e.size),d=o(r,{seriesIndex:-1,dataPointIndex:n,w:t});h.plotDataLabelsText({x:c.newX,y:c.newY,text:d,textAnchor:c.textAnchor,i:n,j:n,parent:a,className:"apexcharts-xaxis-label",color:Array.isArray(i.style.colors)&&i.style.colors[n]?i.style.colors[n]:"#a8a8a8",dataLabelsConfig:Y({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1}).on("click",function(g){if(typeof t.config.chart.events.xAxisLabelClick=="function"){var f=Object.assign({},t,{labelIndex:n});t.config.chart.events.xAxisLabelClick(g,e.ctx,f)}})}}),a}},{key:"createPaths",value:function(e,t){var i=this,a=[],s=[],r=[],n=[];if(e.length){s=[this.graphics.move(t.x,t.y)],n=[this.graphics.move(t.x,t.y)];var o=this.graphics.move(e[0].x,e[0].y),h=this.graphics.move(e[0].x,e[0].y);e.forEach(function(c,d){o+=i.graphics.line(c.x,c.y),h+=i.graphics.line(c.x,c.y),d===e.length-1&&(o+="Z",h+="Z")}),a.push(o),r.push(h)}return{linePathsFrom:s,linePathsTo:a,areaPathsFrom:n,areaPathsTo:r}}},{key:"getTextPos",value:function(e,t){var i="middle",a=e.x,s=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a<t.globals.previousPaths.length;a++){var s=t.globals.previousPaths[a];s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(e,10)&&t.globals.previousPaths[a].paths[0]!==void 0&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s<i;s++){var r={};r.x=e[s]*Math.sin(t[s]),r.y=-e[s]*Math.cos(t[s]),a.push(r)}return a}}]),p}(),aa=function(p){Te(t,Vt);var e=Ie(t);function t(i){var a;F(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.animBeginArr=[0],a.animDur=0;var s=a.w;return a.startAngle=s.config.plotOptions.radialBar.startAngle,a.endAngle=s.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(s.config.plotOptions.radialBar.endAngle-s.config.plotOptions.radialBar.startAngle),a.trackStartAngle=s.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=s.config.plotOptions.radialBar.track.endAngle,a.barLabels=a.w.config.plotOptions.radialBar.barLabels,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),a.endAngle===360&&(a.endAngle=359.99),a.margin=parseInt(s.config.plotOptions.radialBar.track.margin,10),a.onBarLabelClick=a.onBarLabelClick.bind(Pt(a)),a}return R(t,[{key:"draw",value:function(i){var a=this.w,s=new X(this.ctx),r=s.group({class:"apexcharts-radialbar"});if(a.globals.noData)return r;var n=s.group(),o=this.defaultSize/2,h=a.globals.gridWidth/2,c=this.defaultSize/2.05;a.config.chart.sparkline.enabled||(c=c-a.config.stroke.width-a.config.chart.dropShadow.blur);var d=a.globals.fill.colors;if(a.config.plotOptions.radialBar.track.show){var g=this.drawTracks({size:c,centerX:h,centerY:o,colorArr:d,series:i});n.add(g)}var f=this.drawArcs({size:c,centerX:h,centerY:o,colorArr:d,series:i}),x=360;a.config.plotOptions.radialBar.startAngle<0&&(x=this.totalAngle);var b=(360-x)/360;if(a.globals.radialSize=c-c*b,this.radialDataLabels.value.show){var v=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);a.globals.radialSize+=v*b}return n.add(f.g),a.config.plotOptions.radialBar.hollow.position==="front"&&(f.g.add(f.elHollow),f.dataLabels&&f.g.add(f.dataLabels)),r.add(n),r}},{key:"drawTracks",value:function(i){var a=this.w,s=new X(this.ctx),r=s.group({class:"apexcharts-tracks"}),n=new ie(this.ctx),o=new ne(this.ctx),h=this.getStrokeWidth(i);i.size=i.size-h/2;for(var c=0;c<i.series.length;c++){var d=s.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(d),d.attr({rel:c+1}),i.size=i.size-h-this.margin;var g=a.config.plotOptions.radialBar.track,f=o.fillPath({seriesNumber:0,size:i.size,fillColors:Array.isArray(g.background)?g.background[c]:g.background,solid:!0}),x=this.trackStartAngle,b=this.trackEndAngle;Math.abs(b)+Math.abs(x)>=360&&(b=360-Math.abs(this.startAngle)-.1);var v=s.drawPath({d:"",stroke:f,strokeWidth:h*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});if(g.dropShadow.enabled){var y=g.dropShadow;n.dropShadow(v,y)}d.add(v),v.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(v,{centerX:i.centerX,centerY:i.centerY,endAngle:b,startAngle:x,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return r}},{key:"drawArcs",value:function(i){var a=this.w,s=new X(this.ctx),r=new ne(this.ctx),n=new ie(this.ctx),o=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,g=d-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(c=this.drawHollowImage(i,o,d,c));var f=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var x=a.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(f,x)}var b=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(b=0);var v=null;if(this.radialDataLabels.show){var y=a.globals.dom.Paper.select(".apexcharts-datalabels-group").members[0];v=this.renderInnerDataLabels(y,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:b})}a.config.plotOptions.radialBar.hollow.position==="back"&&(o.add(f),v&&o.add(v));var w=!1;a.config.plotOptions.radialBar.inverseOrder&&(w=!0);for(var l=w?i.series.length-1:0;w?l>=0:l<i.series.length;w?l--:l++){var u=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:P.escapeString(a.globals.seriesNames[l])});o.add(u),u.attr({rel:l+1,"data:realIndex":l}),this.ctx.series.addCollapsedClassToSeries(u,l),i.size=i.size-h-this.margin;var m=r.fillPath({seriesNumber:l,size:i.size,value:i.series[l]}),A=this.startAngle,k=void 0,S=P.negToZero(i.series[l]>100?100:i.series[l])/100,L=Math.round(this.totalAngle*S)+this.startAngle,C=void 0;a.globals.dataChanged&&(k=this.startAngle,C=Math.round(this.totalAngle*P.negToZero(a.globals.previousPaths[l])/100)+k),Math.abs(L)+Math.abs(A)>=360&&(L-=.01),Math.abs(C)+Math.abs(k)>=360&&(C-=.01);var I=L-A,z=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[l]:a.config.stroke.dashArray,M=s.drawPath({d:"",stroke:m,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+l,strokeDashArray:z});if(X.setAttrs(M.node,{"data:angle":I,"data:value":i.series[l]}),a.config.chart.dropShadow.enabled){var T=a.config.chart.dropShadow;n.dropShadow(M,T,l)}if(n.setSelectionFilter(M,0,l),this.addListeners(M,this.radialDataLabels),u.add(M),M.attr({index:0,j:l}),this.barLabels.enabled){var E=P.polarToCartesian(i.centerX,i.centerY,i.size,A),O=this.barLabels.formatter(a.globals.seriesNames[l],{seriesIndex:l,w:a}),D=["apexcharts-radialbar-label"];this.barLabels.onClick||D.push("apexcharts-no-click");var H=this.barLabels.useSeriesColors?a.globals.colors[l]:a.config.chart.foreColor;H||(H=a.config.chart.foreColor);var W=E.x+this.barLabels.offsetX,N=E.y+this.barLabels.offsetY,B=s.drawText({x:W,y:N,text:O,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:H,cssClass:D.join(" ")});B.on("click",this.onBarLabelClick),B.attr({rel:l+1}),A!==0&&B.attr({"transform-origin":"".concat(W," ").concat(N),transform:"rotate(".concat(A," 0 0)")}),u.add(B)}var q=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(q=a.config.chart.animations.speed),a.globals.dataChanged&&(q=a.config.chart.animations.dynamicAnimation.speed),this.animDur=q/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:i.centerX,centerY:i.centerY,endAngle:L,startAngle:A,prevEndAngle:C,prevStartAngle:k,size:i.size,i:l,totalItems:2,animBeginArr:this.animBeginArr,dur:q,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:f,dataLabels:v}}},{key:"drawHollow",value:function(i){var a=new X(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,s,r){var n=this.w,o=new ne(this.ctx),h=P.randomId(),c=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:c,patternID:"pattern".concat(n.globals.cuid).concat(h)}),r="url(#pattern".concat(n.globals.cuid).concat(h,")");else{var d=n.config.plotOptions.radialBar.hollow.imageWidth,g=n.config.plotOptions.radialBar.hollow.imageHeight;if(d===void 0&&g===void 0){var f=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-b.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-b.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(f)}else{var x=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-d/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-g/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,g)});a.add(x)}}return r}},{key:"getStrokeWidth",value:function(i){var a=this.w;return i.size*(100-parseInt(a.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var a=parseInt(i.target.getAttribute("rel"),10)-1,s=this.barLabels.onClick,r=this.w;s&&s(r.globals.seriesNames[a],{w:r,seriesIndex:a})}}]),t}(),sa=function(p){Te(t,me);var e=Ie(t);function t(){return F(this,t),e.apply(this,arguments)}return R(t,[{key:"draw",value:function(i,a){var s=this.w,r=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o<i.length;o++){var h,c,d,g,f=void 0,x=void 0,b=s.globals.comboCharts?a[o]:o,v=this.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:P.escapeString(s.globals.seriesNames[b]),rel:o+1,"data:realIndex":b});this.ctx.series.addCollapsedClassToSeries(y,b),i[o].length>0&&(this.visibleI=this.visibleI+1);var w=0,l=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],u=b);var m=this.barHelpers.initialPositions();x=m.y,g=m.zeroW,f=m.x,l=m.barWidth,w=m.barHeight,h=m.xDivision,c=m.yDivision,d=m.zeroH;for(var A=r.group({class:"apexcharts-datalabels","data:realIndex":b}),k=r.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S<s.globals.dataPoints;S++){var L=this.barHelpers.getStrokeWidth(o,S,b),C=this.seriesRangeStart[o][S],I=this.seriesRangeEnd[o][S],z=null,M=null,T=null,E={x:f,y:x,strokeWidth:L,elSeries:y},O=this.seriesLen;if(s.config.plotOptions.bar.rangeBarGroupRows&&(O=1),s.config.series[o].data[S]===void 0)break;if(this.isHorizontal){T=x+w*this.visibleI;var D=(c-w*O)/2;if(s.config.series[o].data[S].x){var H=this.detectOverlappingBars({i:o,j:S,barYPosition:T,srty:D,barHeight:w,yDivision:c,initPositions:m});w=H.barHeight,T=H.barYPosition}l=(z=this.drawRangeBarPaths(Y({indexes:{i:o,j:S,realIndex:b},barHeight:w,barYPosition:T,zeroW:g,yDivision:c,y1:C,y2:I},E))).barWidth}else{s.globals.isXNumeric&&(f=(s.globals.seriesX[o][S]-s.globals.minX)/this.xRatio-l/2),M=f+l*this.visibleI;var W=(h-l*O)/2;if(s.config.series[o].data[S].x){var N=this.detectOverlappingBars({i:o,j:S,barXPosition:M,srtx:W,barWidth:l,xDivision:h,initPositions:m});l=N.barWidth,M=N.barXPosition}w=(z=this.drawRangeColumnPaths(Y({indexes:{i:o,j:S,realIndex:b,translationsIndex:u},barWidth:l,barXPosition:M,zeroH:d,xDivision:h},E))).barHeight}var B=this.barHelpers.drawGoalLine({barXPosition:z.barXPosition,barYPosition:T,goalX:z.goalX,goalY:z.goalY,barHeight:w,barWidth:l});B&&k.add(B),x=z.y,f=z.x;var q=this.barHelpers.getPathFillColor(i,o,S,b),Z=s.globals.stroke.colors[b];this.renderSeries({realIndex:b,pathFill:q,lineFill:Z,j:S,i:o,x:f,y:x,y1:C,y2:I,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:L,elSeries:y,series:i,barHeight:w,barWidth:l,barXPosition:M,barYPosition:T,columnGroupIndex:v,elDataLabelsWrap:A,elGoalsMarkers:k,visibleSeries:this.visibleI,type:"rangebar"})}n.add(y)}return n}},{key:"detectOverlappingBars",value:function(i){var a=i.i,s=i.j,r=i.barYPosition,n=i.barXPosition,o=i.srty,h=i.srtx,c=i.barHeight,d=i.barWidth,g=i.yDivision,f=i.xDivision,x=i.initPositions,b=this.w,v=[],y=b.config.series[a].data[s].rangeName,w=b.config.series[a].data[s].x,l=Array.isArray(w)?w.join(" "):w,u=b.globals.labels.map(function(A){return Array.isArray(A)?A.join(" "):A}).indexOf(l),m=b.globals.seriesRange[a].findIndex(function(A){return A.x===l&&A.overlaps.length>0});return this.isHorizontal?(r=b.config.plotOptions.bar.rangeBarGroupRows?o+g*u:o+c*this.visibleI+g*u,m>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(v=b.globals.seriesRange[a][m].overlaps).indexOf(y)>-1&&(r=(c=x.barHeight/v.length)*this.visibleI+g*(100-parseInt(this.barOptions.barHeight,10))/100/2+c*(this.visibleI+v.indexOf(y))+g*u)):(u>-1&&!b.globals.timescaleLabels.length&&(n=b.config.plotOptions.bar.rangeBarGroupRows?h+f*u:h+d*this.visibleI+f*u),m>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(v=b.globals.seriesRange[a][m].overlaps).indexOf(y)>-1&&(n=(d=x.barWidth/v.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+v.indexOf(y))+f*u)),{barYPosition:r,barXPosition:n,barHeight:c,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.xDivision,n=i.barWidth,o=i.barXPosition,h=i.zeroH,c=this.w,d=a.i,g=a.j,f=a.realIndex,x=a.translationsIndex,b=this.yRatio[x],v=this.getRangeValue(f,g),y=Math.min(v.start,v.end),w=Math.max(v.start,v.end);this.series[d][g]===void 0||this.series[d][g]===null?y=h:(y=h-y/b,w=h-w/b);var l=Math.abs(w-y),u=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:y,y2:w,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:g,w:c});if(c.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:s,j:g,realIndex:f,barWidth:n});s=m.x,o=m.barXPosition}else s+=r;return{pathTo:u.pathTo,pathFrom:u.pathFrom,barHeight:l,x:s,y:v.start<0&&v.end<0?y:w,goalY:this.barHelpers.getGoalValues("y",null,h,d,g,x),barXPosition:o}}},{key:"preventBarOverflow",value:function(i){var a=this.w;return i<0&&(i=0),i>a.globals.gridWidth&&(i=a.globals.gridWidth),i}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,s=i.y,r=i.y1,n=i.y2,o=i.yDivision,h=i.barHeight,c=i.barYPosition,d=i.zeroW,g=this.w,f=a.realIndex,x=a.j,b=this.preventBarOverflow(d+r/this.invertedYRatio),v=this.preventBarOverflow(d+n/this.invertedYRatio),y=this.getRangeValue(f,x),w=Math.abs(v-b),l=this.barHelpers.getBarpaths({barYPosition:c,barHeight:h,x1:b,x2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:x,w:g});return g.globals.isXNumeric||(s+=o),{pathTo:l.pathTo,pathFrom:l.pathFrom,barWidth:w,x:y.start<0&&y.end<0?b:v,goalX:this.barHelpers.getGoalValues("x",d,null,f,x),y:s}}},{key:"getRangeValue",value:function(i,a){var s=this.w;return{start:s.globals.seriesRangeStart[i][a],end:s.globals.seriesRangeEnd[i][a]}}}]),t}(),ra=function(){function p(e){F(this,p),this.w=e.w,this.lineCtx=e}return R(p,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new $(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,i=e.realIndex,a=e.x,s=e.y,r=e.i,n=e.j,o=e.prevY,h=this.w,c=[],d=[];if(n===0){var g=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(g=(h.globals.seriesX[i][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),c.push(g),d.push(P.isNumber(t[r][0])?o+h.config.markers.offsetY:null),c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null)}else c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[r][n+1])?s+h.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,s=this.w,r=0;r<s.globals.previousPaths.length;r++){var n=s.globals.previousPaths[r];(n.type==="line"||n.type==="area")&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(a,10)&&(n.type==="line"?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[r].paths[0].d):n.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(t=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,s=e.i,r=e.realIndex,n=e.series,o=e.prevY,h=e.lineYPosition,c=e.translationsIndex,d=this.w,g=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[r])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[r])===null||i===void 0?void 0:i.type)==="column");if(((a=n[s])===null||a===void 0?void 0:a[0])!==void 0)o=(h=g&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[c]:0);else if(g&&s>0&&n[s][0]===void 0){for(var f=s-1;f>=0;f--)if(n[f][0]!==null&&n[f][0]!==void 0){o=h=this.lineCtx.prevSeriesY[f][0];break}}return{prevY:o,lineYPosition:h}}}]),p}(),na=function(p){for(var e,t,i,a,s=function(c){for(var d=[],g=c[0],f=c[1],x=d[0]=et(g,f),b=1,v=c.length-1;b<v;b++)g=f,f=c[b+1],d[b]=.5*(x+(x=et(g,f)));return d[b]=x,d}(p),r=p.length-1,n=[],o=0;o<r;o++)i=et(p[o],p[o+1]),Math.abs(i)<1e-6?s[o]=s[o+1]=0:(a=(e=s[o]/i)*e+(t=s[o+1]/i)*t)>9&&(a=3*i/Math.sqrt(a),s[o]=a*e,s[o+1]=a*t);for(var h=0;h<=r;h++)a=(p[Math.min(r,h+1)][0]-p[Math.max(0,h-1)][0])/(6*(1+s[h]*s[h])),n.push([a||0,s[h]*a||0]);return n},oa=function(p){var e=na(p),t=p[1],i=p[0],a=[],s=e[1],r=e[0];a.push(i,[i[0]+r[0],i[1]+r[1],t[0]-s[0],t[1]-s[1],t[0],t[1]]);for(var n=2,o=e.length;n<o;n++){var h=p[n],c=e[n];a.push([h[0]-c[0],h[1]-c[1],h[0],h[1]])}return a},la=function(p,e,t){var i=p.slice(e,t);if(e){if(t-e>1&&i[1].length<6){var a=i[0].length;i[1]=[2*i[0][a-2]-i[0][a-4],2*i[0][a-1]-i[0][a-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function et(p,e){return(e[1]-p[1])/(e[0]-p[0])}var tt=function(){function p(e,t,i){F(this,p),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new Yt(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new ra(this),this.markers=new ye(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return R(p,[{key:"draw",value:function(e,t,i,a){var s,r=this.w,n=new X(this.ctx),o=r.globals.comboCharts?t:r.config.chart.type,h=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),c=new $(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var d=[],g=0;g<e.length;g++){e=this.lineHelpers.sameValueSeriesFix(g,e);var f=r.globals.comboCharts?i[g]:g,x=this.yRatio.length>1?f:0;this._initSerieVariables(e,g,f);var b=[],v=[],y=[],w=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(w=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),y.push(w);var l,u=w,m=void 0,A=u,k=this.zeroY,S=this.zeroY;k=this.lineHelpers.determineFirstPrevY({i:g,realIndex:f,series:e,prevY:k,lineYPosition:0,translationsIndex:x}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[g][0]===null?b.push(null):b.push(k),l=k,o==="rangeArea"&&(m=S=this.lineHelpers.determineFirstPrevY({i:g,realIndex:f,series:a,prevY:S,lineYPosition:0,translationsIndex:x}).prevY,v.push(b[0]!==null?S:null));var L=this._calculatePathsFrom({type:o,series:e,i:g,realIndex:f,translationsIndex:x,prevX:A,prevY:k,prevY2:S}),C=[b[0]],I=[v[0]],z={type:o,series:e,realIndex:f,translationsIndex:x,i:g,x:w,y:1,pX:u,pY:l,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:y,yArrj:b,y2Arrj:v,seriesRangeEnd:a},M=this._iterateOverDataPoints(Y(Y({},z),{},{iterations:o==="rangeArea"?e[g].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){for(var T=this._calculatePathsFrom({series:a,i:g,realIndex:f,prevX:A,prevY:S}),E=this._iterateOverDataPoints(Y(Y({},z),{},{series:a,xArrj:[w],yArrj:C,y2Arrj:I,pY:m,areaPaths:M.areaPaths,pathsFrom:T,iterations:a[g].length-1,isRangeStart:!1})),O=M.linePaths.length/2,D=0;D<O;D++)M.linePaths[D]=E.linePaths[D+O]+M.linePaths[D];M.linePaths.splice(O),M.pathFromLine=E.pathFromLine+M.pathFromLine}else M.pathFromArea+="z";this._handlePaths({type:o,realIndex:f,i:g,paths:M}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),d.push(this.elSeries)}if(((s=r.config.series[0])===null||s===void 0?void 0:s.zIndex)!==void 0&&d.sort(function(N,B){return Number(N.node.getAttribute("zIndex"))-Number(B.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var H=d.length-1;H>=0;H--)h.add(d[H]);else for(var W=0;W<d.length;W++)h.add(d[W]);return h}},{key:"_initSerieVariables",value:function(e,t,i){var a=this.w,s=new X(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-(a.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width;var r=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||a.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:a.config.series[i].zIndex!==void 0?a.config.series[i].zIndex:i,seriesName:P.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=e[t].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,s,r=e.type,n=e.series,o=e.i,h=e.realIndex,c=e.translationsIndex,d=e.prevX,g=e.prevY,f=e.prevY2,x=this.w,b=new X(this.ctx);if(n[o][0]===null){for(var v=0;v<n[o].length;v++)if(n[o][v]!==null){d=this.xDivision*v,g=this.zeroY-n[o][v]/this.yRatio[c],t=b.move(d,g),i=b.move(d,this.areaBottomY);break}}else t=b.move(d,g),r==="rangeArea"&&(t=b.move(d,f)+b.line(d,g)),i=b.move(d,this.areaBottomY)+b.line(d,g);if(a=b.move(0,this.zeroY)+b.line(0,this.zeroY),s=b.move(0,this.zeroY)+b.line(0,this.zeroY),x.globals.previousPaths.length>0){var y=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:h});a=y.pathFromLine,s=y.pathFromArea}return{prevX:d,prevY:g,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,s=e.paths,r=this.w,n=new X(this.ctx),o=new ne(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var h=r.config.forecastDataPoints;if(h.count>0&&t!=="rangeArea"){var c=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-h.count-1],d=n.drawRect(c,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if(t==="area")for(var x=o.fillPath({seriesNumber:i}),b=0;b<s.areaPaths.length;b++){var v=n.renderPaths(Y(Y({},f),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[b],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:x}));this.elSeries.add(v)}if(r.config.stroke.show&&!this.pointsChart){var y=null;if(t==="line")y=o.fillPath({seriesNumber:i,i:a});else if(r.config.stroke.fill.type==="solid")y=r.globals.stroke.colors[i];else{var w=r.config.fill;r.config.fill=r.config.stroke.fill,y=o.fillPath({seriesNumber:i,i:a}),r.config.fill=w}for(var l=0;l<s.linePaths.length;l++){var u=y;t==="rangeArea"&&(u=o.fillPath({seriesNumber:i}));var m=Y(Y({},f),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[l],stroke:y,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:t==="rangeArea"?u:"none"}),A=n.renderPaths(m);if(this.elSeries.add(A),A.attr("fill-rule","evenodd"),h.count>0&&t!=="rangeArea"){var k=n.renderPaths(m);k.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&k.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),A.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,s=e.type,r=e.series,n=e.iterations,o=e.realIndex,h=e.translationsIndex,c=e.i,d=e.x,g=e.y,f=e.pX,x=e.pY,b=e.pathsFrom,v=e.linePaths,y=e.areaPaths,w=e.seriesIndex,l=e.lineYPosition,u=e.xArrj,m=e.yArrj,A=e.y2Arrj,k=e.isRangeStart,S=e.seriesRangeEnd,L=this.w,C=new X(this.ctx),I=this.yRatio,z=b.prevY,M=b.linePath,T=b.areaPath,E=b.pathFromLine,O=b.pathFromArea,D=P.isNumber(L.globals.minYArr[o])?L.globals.minYArr[o]:L.globals.minY;n||(n=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var H=function(Q,ee){return ee-Q/I[h]+2*(a.isReversed?Q/I[h]:0)},W=g,N=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[o])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[o])===null||i===void 0?void 0:i.type)==="column"),B=L.config.stroke.curve;Array.isArray(B)&&(B=Array.isArray(w)?B[w[c]]:B[c]);for(var q,Z=0,j=0;j<n;j++){var se=r[c][j+1]===void 0||r[c][j+1]===null;if(L.globals.isXNumeric){var V=L.globals.seriesX[o][j+1];L.globals.seriesX[o][j+1]===void 0&&(V=L.globals.seriesX[o][n-1]),d=(V-L.globals.minX)/this.xRatio}else d+=this.xDivision;N?c>0&&L.globals.collapsedSeries.length<L.config.series.length-1?l=this.prevSeriesY[function(Q){for(var ee=Q;ee>0;ee--){if(!(L.globals.collapsedSeriesIndices.indexOf(w?.[ee]||ee)>-1))return ee;ee--}return 0}(c-1)][j+1]:l=this.zeroY:l=this.zeroY,se?g=H(D,l):(g=H(r[c][j+1],l),s==="rangeArea"&&(W=H(S[c][j+1],l))),u.push(d),!se||L.config.stroke.curve!=="smooth"&&L.config.stroke.curve!=="monotoneCubic"?(m.push(g),A.push(W)):(m.push(null),A.push(null));var G=this.lineHelpers.calculatePoints({series:r,x:d,y:g,realIndex:o,i:c,j,prevY:z}),_=this._createPaths({type:s,series:r,i:c,realIndex:o,j,x:d,y:g,y2:W,xArrj:u,yArrj:m,y2Arrj:A,pX:f,pY:x,pathState:Z,segmentStartX:q,linePath:M,areaPath:T,linePaths:v,areaPaths:y,curve:B,isRangeStart:k});y=_.areaPaths,v=_.linePaths,f=_.pX,x=_.pY,Z=_.pathState,q=_.segmentStartX,T=_.areaPath,M=_.linePath,!this.appendPathFrom||B==="monotoneCubic"&&s==="rangeArea"||(E+=C.line(d,this.zeroY),O+=C.line(d,this.zeroY)),this.handleNullDataPoints(r,G,c,j,o),this._handleMarkersAndLabels({type:s,pointsPos:G,i:c,j,realIndex:o,isRangeStart:k})}return{yArrj:m,xArrj:u,pathFromArea:O,areaPaths:y,pathFromLine:E,linePaths:v,linePath:M,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,s=e.i,r=e.j,n=e.realIndex,o=this.w,h=new be(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,n,r+1);c!==null&&this.elPointsMain.add(c)}var d=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var t=e.type,i=e.series,a=e.i;e.realIndex;var s=e.j,r=e.x,n=e.y,o=e.xArrj,h=e.yArrj,c=e.y2,d=e.y2Arrj,g=e.pX,f=e.pY,x=e.pathState,b=e.segmentStartX,v=e.linePath,y=e.areaPath,w=e.linePaths,l=e.areaPaths,u=e.curve,m=e.isRangeStart;this.w;var A,k=new X(this.ctx),S=this.areaBottomY,L=t==="rangeArea",C=t==="rangeArea"&&m;switch(u){case"monotoneCubic":var I=m?h:d;switch(x){case 0:if(I[s+1]===null)break;x=1;case 1:if(!(L?o.length===i[a].length:s===i[a].length-2))break;case 2:var z=m?o:o.slice().reverse(),M=m?I:I.slice().reverse(),T=(A=M,z.map(function(V,G){return[V,A[G]]}).filter(function(V){return V[1]!==null})),E=T.length>1?oa(T):T,O=[];L&&(C?l=T:O=l.reverse());var D=0,H=0;if(function(V,G){for(var _=function(Se){var ae=[],le=0;return Se.forEach(function(Si){Si!==null?le++:le>0&&(ae.push(le),le=0)}),le>0&&ae.push(le),ae}(V),Q=[],ee=0,oe=0;ee<_.length;oe+=_[ee++])Q[ee]=la(G,oe,oe+_[ee]);return Q}(M,E).forEach(function(V){D++;var G=function(ee){for(var oe="",Se=0;Se<ee.length;Se++){var ae=ee[Se],le=ae.length;le>4?(oe+="C".concat(ae[0],", ").concat(ae[1]),oe+=", ".concat(ae[2],", ").concat(ae[3]),oe+=", ".concat(ae[4],", ").concat(ae[5])):le>2&&(oe+="S".concat(ae[0],", ").concat(ae[1]),oe+=", ".concat(ae[2],", ").concat(ae[3]))}return oe}(V),_=H,Q=(H+=V.length)-1;C?v=k.move(T[_][0],T[_][1])+G:L?v=k.move(O[_][0],O[_][1])+k.line(T[_][0],T[_][1])+G+k.line(O[Q][0],O[Q][1]):(v=k.move(T[_][0],T[_][1])+G,y=v+k.line(T[Q][0],S)+k.line(T[_][0],S)+"z",l.push(y)),w.push(v)}),L&&D>1&&!C){var W=w.slice(D).reverse();w.splice(D),W.forEach(function(V){return w.push(V)})}x=0}break;case"smooth":var N=.35*(r-g);if(i[a][s]===null)x=0;else switch(x){case 0:if(b=g,v=C?k.move(g,d[s])+k.line(g,f):k.move(g,f),y=k.move(g,f),x=1,s<i[a].length-2){var B=k.curve(g+N,f,r-N,n,r,n);v+=B,y+=B;break}case 1:if(i[a][s+1]===null)v+=C?k.line(g,c):k.move(g,f),y+=k.line(g,S)+k.line(b,S)+"z",w.push(v),l.push(y),x=-1;else{var q=k.curve(g+N,f,r-N,n,r,n);v+=q,y+=q,s>=i[a].length-2&&(C&&(v+=k.curve(r,n,r,n,r,c)+k.move(r,c)),y+=k.curve(r,n,r,n,r,S)+k.line(b,S)+"z",w.push(v),l.push(y),x=-1)}}g=r,f=n;break;default:var Z=function(V,G,_){var Q=[];switch(V){case"stepline":Q=k.line(G,null,"H")+k.line(null,_,"V");break;case"linestep":Q=k.line(null,_,"V")+k.line(G,null,"H");break;case"straight":Q=k.line(G,_)}return Q};if(i[a][s]===null)x=0;else switch(x){case 0:if(b=g,v=C?k.move(g,d[s])+k.line(g,f):k.move(g,f),y=k.move(g,f),x=1,s<i[a].length-2){var j=Z(u,r,n);v+=j,y+=j;break}case 1:if(i[a][s+1]===null)v+=C?k.line(g,c):k.move(g,f),y+=k.line(g,S)+k.line(b,S)+"z",w.push(v),l.push(y),x=-1;else{var se=Z(u,r,n);v+=se,y+=se,s>=i[a].length-2&&(C&&(v+=k.line(r,c)),y+=k.line(r,S)+k.line(b,S)+"z",w.push(v),l.push(y),x=-1)}}g=r,f=n}return{linePaths:w,areaPaths:l,pX:g,pY:f,pathState:x,segmentStartX:b,linePath:v,areaPath:y}}},{key:"handleNullDataPoints",value:function(e,t,i,a,s){var r=this.w;if(e[i][a]===null&&r.config.markers.showNullDataPoints||e[i].length===1){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(t,s,a+1,n,!0);o!==null&&this.elPointsMain.add(o)}}}]),p}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function p(n,o,h,c){this.xoffset=n,this.yoffset=o,this.height=c,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var g,f=[],x=this.xoffset,b=this.yoffset,v=s(d)/this.height,y=s(d)/this.width;if(this.width>=this.height)for(g=0;g<d.length;g++)f.push([x,b,x+v,b+d[g]/v]),b+=d[g]/v;else for(g=0;g<d.length;g++)f.push([x,b,x+d[g]/y,b+y]),x+=d[g]/y;return f},this.cutArea=function(d){var g;if(this.width>=this.height){var f=d/this.height,x=this.width-f;g=new p(this.xoffset+f,this.yoffset,x,this.height)}else{var b=d/this.width,v=this.height-b;g=new p(this.xoffset,this.yoffset+b,this.width,v)}return g}}function e(n,o,h,c,d){c=c===void 0?0:c,d=d===void 0?0:d;var g=t(function(f,x){var b,v=[],y=x/s(f);for(b=0;b<f.length;b++)v[b]=f[b]*y;return v}(n,o*h),[],new p(c,d,o,h),[]);return function(f){var x,b,v=[];for(x=0;x<f.length;x++)for(b=0;b<f[x].length;b++)v.push(f[x][b]);return v}(g)}function t(n,o,h,c){var d,g,f;if(n.length!==0)return d=h.shortestEdge(),function(x,b,v){var y;if(x.length===0)return!0;(y=x.slice()).push(b);var w=i(x,v),l=i(y,v);return w>=l}(o,g=n[0],d)?(o.push(g),t(n.slice(1),o,h,c)):(f=h.cutArea(s(o),c),c.push(h.getCoordinates(o)),t(n,[],f,c)),c;c.push(h.getCoordinates(o))}function i(n,o){var h=Math.min.apply(Math,n),c=Math.max.apply(Math,n),d=s(n);return Math.max(Math.pow(o,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(o,2)*h))}function a(n){return n&&n.constructor===Array}function s(n){var o,h=0;for(o=0;o<n.length;o++)h+=n[o];return h}function r(n){var o,h=0;if(a(n[0]))for(o=0;o<n.length;o++)h+=r(n[o]);else h=s(n);return h}return function n(o,h,c,d,g){d=d===void 0?0:d,g=g===void 0?0:g;var f,x,b=[],v=[];if(a(o[0])){for(x=0;x<o.length;x++)b[x]=r(o[x]);for(f=e(b,h,c,d,g),x=0;x<o.length;x++)v.push(n(o[x],f[x][2]-f[x][0],f[x][3]-f[x][1],f[x][0],f[x][1]))}else v=e(o,h,c,d,g);return v}}();var he,Ce,ha=function(){function p(e,t){F(this,p),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Bt(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return R(p,[{key:"draw",value:function(e){var t=this,i=this.w,a=new X(this.ctx),s=new ne(this.ctx),r=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var n=[];return e.forEach(function(o){var h=o.map(function(c){return Math.abs(c)});n.push(h)}),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(function(o,h){o.data.forEach(function(c){Array.isArray(t.labels[h])||(t.labels[h]=[]),t.labels[h].push(c.x)})}),window.TreemapSquared.generate(n,i.globals.gridWidth,i.globals.gridHeight).forEach(function(o,h){var c=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:P.escapeString(i.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(i.config.chart.dropShadow.enabled){var d=i.config.chart.dropShadow;new ie(t.ctx).dropShadow(r,d,h)}var g=a.group({class:"apexcharts-data-labels"});o.forEach(function(f,x){var b=f[0],v=f[1],y=f[2],w=f[3],l=a.drawRect(b,v,y-b,w-v,i.config.plotOptions.treemap.borderRadius,"#fff",1,t.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?m:i.globals.stroke.colors[h]);l.attr({cx:b,cy:v,index:h,i:h,j:x,width:y-b,height:w-v});var u=t.helpers.getShadeColor(i.config.chart.type,h,x,t.negRange),m=u.color;i.config.series[h].data[x]!==void 0&&i.config.series[h].data[x].fillColor&&(m=i.config.series[h].data[x].fillColor);var A=s.fillPath({color:m,seriesNumber:h,dataPointIndex:x});l.node.classList.add("apexcharts-treemap-rect"),l.attr({fill:A}),t.helpers.addListeners(l);var k={x:b+(y-b)/2,y:v+(w-v)/2,width:0,height:0},S={x:b,y:v,width:y-b,height:w-v};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var L=1;i.globals.resized||(L=i.config.chart.animations.speed),t.animateTreemap(l,k,S,L)}if(i.globals.dataChanged){var C=1;t.dynamicAnim.enabled&&i.globals.shouldAnimate&&(C=t.dynamicAnim.speed,i.globals.previousPaths[h]&&i.globals.previousPaths[h][x]&&i.globals.previousPaths[h][x].rect&&(k=i.globals.previousPaths[h][x].rect),t.animateTreemap(l,k,S,C))}var I=t.getFontSize(f),z=i.config.dataLabels.formatter(t.labels[h][x],{value:i.globals.series[h][x],seriesIndex:h,dataPointIndex:x,w:i});i.config.plotOptions.treemap.dataLabels.format==="truncate"&&(I=parseInt(i.config.dataLabels.style.fontSize,10),z=t.truncateLabels(z,I,b,v,y,w));var M=null;i.globals.series[h][x]&&(M=t.helpers.calculateDataLabels({text:z,x:(b+y)/2,y:(v+w)/2+t.strokeWidth/2+I/3,i:h,j:x,colorProps:u,fontSize:I,series:e})),i.config.dataLabels.enabled&&M&&t.rotateToFitLabel(M,I,z,b,v,y,w),c.add(l),M!==null&&c.add(M)}),c.add(g),r.add(c)}),r}},{key:"getFontSize",value:function(e){var t=this.w,i,a,s,r,n=function o(h){var c,d=0;if(Array.isArray(h[0]))for(c=0;c<h.length;c++)d+=o(h[c]);else for(c=0;c<h.length;c++)d+=h[c].length;return d}(this.labels)/function o(h){var c,d=0;if(Array.isArray(h[0]))for(c=0;c<h.length;c++)d+=o(h[c]);else for(c=0;c<h.length;c++)d+=1;return d}(this.labels);return i=e[2]-e[0],a=e[3]-e[1],s=i*a,r=Math.pow(s,.5),Math.min(r/n,parseInt(t.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(e,t,i,a,s,r,n){var o=new X(this.ctx),h=o.getTextRects(i,t);if(h.width+this.w.config.stroke.width+5>r-a&&h.width<=n-s){var c=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(h.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,s,r){var n=new X(this.ctx),o=n.getTextRects(e,t).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,h=n.getTextBasedOnMaxWidth({text:e,maxWidth:o,fontSize:t});return e.length!==h.length&&o/t<5?"":h}},{key:"animateTreemap",value:function(e,t,i,a){var s=new ve(this.ctx);s.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){s.animationCompleted(e)})}}]),p}(),_t=86400,ca=10/_t,da=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return R(p,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new K(this.ctx),r=(t-e)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r<ca?a.globals.disableZoomIn=!0:r>5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/r,h=o/24,c=h/60,d=c/60,g=Math.floor(24*r),f=Math.floor(1440*r),x=Math.floor(r*_t),b=Math.floor(r),v=Math.floor(r/30),y=Math.floor(r/365),w={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},l={firstVal:w,currentMillisecond:w.minMillisecond,currentSecond:w.minSecond,currentMinute:w.minMinute,currentHour:w.minHour,currentMonthDate:w.minDate,currentDate:w.minDate,currentMonth:w.minMonth,currentYear:w.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:x,numberOfMinutes:f,numberOfHours:g,numberOfDays:b,numberOfMonths:v,numberOfYears:y};switch(this.tickInterval){case"years":this.generateYearScale(l);break;case"months":case"half_year":this.generateMonthScale(l);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(l);break;case"hours":this.generateHourScale(l);break;case"minutes_fives":case"minutes":this.generateMinuteScale(l);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(l)}var u=this.timeScaleArray.map(function(m){var A={position:m.position,unit:m.unit,year:m.year,day:m.day?m.day:1,hour:m.hour?m.hour:0,month:m.month+1};return m.unit==="month"?Y(Y({},A),{},{day:1,value:m.value+1}):m.unit==="day"||m.unit==="hour"?Y(Y({},A),{},{value:m.value}):m.unit==="minute"?Y(Y({},A),{},{value:m.value,minute:m.value}):m.unit==="second"?Y(Y({},A),{},{value:m.value,minute:m.minute,second:m.second}):m});return u.filter(function(m){var A=1,k=Math.ceil(a.globals.gridWidth/120),S=m.value;a.config.xaxis.tickAmount!==void 0&&(k=a.config.xaxis.tickAmount),u.length>k&&(A=Math.floor(u.length/k));var L=!1,C=!1;switch(i.tickInterval){case"years":m.unit==="year"&&(L=!0);break;case"half_year":A=7,m.unit==="year"&&(L=!0);break;case"months":A=1,m.unit==="year"&&(L=!0);break;case"months_fortnight":A=15,m.unit!=="year"&&m.unit!=="month"||(L=!0),S===30&&(C=!0);break;case"months_days":A=10,m.unit==="month"&&(L=!0),S===30&&(C=!0);break;case"week_days":A=8,m.unit==="month"&&(L=!0);break;case"days":A=1,m.unit==="month"&&(L=!0);break;case"hours":m.unit==="day"&&(L=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(C=!0);break;case"seconds_tens":S%10!=0&&(C=!0)}if(i.tickInterval==="hours"||i.tickInterval==="minutes_fives"||i.tickInterval==="seconds_tens"||i.tickInterval==="seconds_fives"){if(!C)return!0}else if((S%A==0||L)&&!C)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new Ne(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,r=e.numberOfYears,n=t.minYear,o=0,h=new K(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=h.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(h.determineDaysOfYear(t.minYear)-d+1)*s,n=t.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:c,year:n,month:P.monthMod(i+1)})}else t.minDate===1&&t.minMonth===0&&this.timeScaleArray.push({position:o,value:n,unit:c,year:a,month:P.monthMod(i+1)});for(var g=n,f=o,x=0;x<r;x++)g++,f=h.determineDaysOfYear(g-1)*s+f,this.timeScaleArray.push({position:f,value:g,unit:c,year:g,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,i=e.currentMonthDate,a=e.currentMonth,s=e.currentYear,r=e.daysWidthOnXAxis,n=e.numberOfMonths,o=a,h=0,c=new K(this.ctx),d="month",g=0;if(t.minDate>1){h=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*r,o=P.monthMod(a+1);var f=s+g,x=P.monthMod(o),b=o;o===0&&(d="year",b=f,x=1,f+=g+=1),this.timeScaleArray.push({position:h,value:b,unit:d,year:f,month:x})}else this.timeScaleArray.push({position:h,value:o,unit:d,year:s,month:P.monthMod(a)});for(var v=o+1,y=h,w=0,l=1;w<n;w++,l++){(v=P.monthMod(v))===0?(d="year",g+=1):d="month";var u=this._getYear(s,v,g);y=c.determineDaysOfMonths(v,u)*r+y;var m=v===0?u:v;this.timeScaleArray.push({position:y,value:m,unit:d,year:u,month:v===0?1:v}),v++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.hoursWidthOnXAxis,r=e.numberOfDays,n=new K(this.ctx),o="day",h=t.minDate+1,c=h,d=function(l,u,m){return l>n.determineDaysOfMonths(u+1,m)&&(c=1,o="month",f=u+=1),u},g=(24-t.minHour)*s,f=h,x=d(c,i,a);t.minHour===0&&t.minDate===1?(g=0,f=P.monthMod(t.minMonth),o="month",c=t.minDate):t.minDate!==1&&t.minHour===0&&t.minMinute===0&&(g=0,h=t.minDate,f=h,x=d(c=h,i,a)),this.timeScaleArray.push({position:g,value:f,unit:o,year:this._getYear(a,x,0),month:P.monthMod(x),day:c});for(var b=g,v=0;v<r;v++){o="day",x=d(c+=1,x,this._getYear(a,x,0));var y=this._getYear(a,x,0);b=24*s+b;var w=c===1?P.monthMod(x):c;this.timeScaleArray.push({position:b,value:w,unit:o,year:y,month:P.monthMod(x),day:w})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,i=e.currentDate,a=e.currentMonth,s=e.currentYear,r=e.minutesWidthOnXAxis,n=e.numberOfHours,o=new K(this.ctx),h="hour",c=function(A,k){return A>o.determineDaysOfMonths(k+1,s)&&(v=1,k+=1),{month:k,date:v}},d=function(A,k){return A>o.determineDaysOfMonths(k+1,s)?k+=1:k},g=60-(t.minMinute+t.minSecond/60),f=g*r,x=t.minHour+1,b=x;g===60&&(f=0,b=x=t.minHour);var v=i;b>=24&&(b=0,v+=1,h="day");var y=c(v,a).month;y=d(v,y),this.timeScaleArray.push({position:f,value:x,unit:h,day:v,hour:b,year:s,month:P.monthMod(y)}),b++;for(var w=f,l=0;l<n;l++){h="hour",b>=24&&(b=0,h="day",y=c(v+=1,y).month,y=d(v,y));var u=this._getYear(s,y,0);w=60*r+w;var m=b===0?v:b;this.timeScaleArray.push({position:w,value:m,unit:h,hour:b,day:v,year:u,month:P.monthMod(y)}),b++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,n=e.currentMonth,o=e.currentYear,h=e.minutesWidthOnXAxis,c=e.secondsWidthOnXAxis,d=e.numberOfMinutes,g=a+1,f=r,x=n,b=o,v=s,y=(60-i-t/1e3)*c,w=0;w<d;w++)g>=60&&(g=0,(v+=1)===24&&(v=0)),this.timeScaleArray.push({position:y,value:g,unit:"minute",hour:v,minute:g,day:f,year:this._getYear(b,x,0),month:P.monthMod(x)}),y+=h,g++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,n=e.currentMonth,o=e.currentYear,h=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=i+1,g=a,f=r,x=n,b=o,v=s,y=(1e3-t)/1e3*h,w=0;w<c;w++)d>=60&&(d=0,++g>=60&&(g=0,++v===24&&(v=0))),this.timeScaleArray.push({position:y,value:d,unit:"second",hour:v,minute:g,second:d,day:f,year:this._getYear(b,x,0),month:P.monthMod(x)}),y+=h,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return e.month===0&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?i+=e.unit==="day"?"-"+("0"+t).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?i+=e.unit==="hour"?"T"+("0"+t).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?i+=":"+("0"+t).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?i+=":"+("0"+t).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var s=a.value.toString(),r=new K(t.ctx),n=t.createRawDateString(a,s),o=r.getDate(r.parseDate(n));if(t.utc||(o=r.getDate(r.parseDateWithTimezone(n))),i.config.xaxis.labels.format===void 0){var h="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;a.unit==="year"&&(h=c.year),a.unit==="month"&&(h=c.month),a.unit==="day"&&(h=c.day),a.unit==="hour"&&(h=c.hour),a.unit==="minute"&&(h=c.minute),a.unit==="second"&&(h=c.second),s=r.formatDate(o,h)}else s=r.formatDate(o,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new X(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(s=!0,t=a.getTextRects(e[0].value).width);var r=0,n=e.map(function(o,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=s?t:a.getTextRects(e[r].value).width,d=e[r].position;return o.position>d+c+10?(r=h,o):null}return o});return n=n.filter(function(o){return o!==null})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),p}(),ga=function(){function p(e,t){F(this,p),this.ctx=t,this.w=t.w,this.el=e}return R(p,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=(t.chart.type==="bar"||t.chart.type==="rangeBar"||t.chart.type==="boxPlot")&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),X.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.theme.mode!=="dark"||t.chart.background?t.theme.mode!=="light"||t.chart.background?t.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),X.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=i.config,s=i.globals,r={series:[],i:[]},n={series:[],i:[]},o={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},g={series:[],i:[]},f={series:[],i:[]},x={series:[],seriesRangeEnd:[],i:[]},b=a.chart.type!==void 0?a.chart.type:"line",v=null,y=0;s.series.forEach(function(M,T){var E=e[T].type||b;switch(E){case"column":case"bar":c.series.push(M),c.i.push(T),i.globals.columnSeries=c;break;case"area":n.series.push(M),n.i.push(T);break;case"line":r.series.push(M),r.i.push(T);break;case"scatter":o.series.push(M),o.i.push(T);break;case"bubble":h.series.push(M),h.i.push(T);break;case"candlestick":d.series.push(M),d.i.push(T);break;case"boxPlot":g.series.push(M),g.i.push(T);break;case"rangeBar":f.series.push(M),f.i.push(T);break;case"rangeArea":x.series.push(s.seriesRangeStart[T]),x.seriesRangeEnd.push(s.seriesRangeEnd[T]),x.i.push(T);break;case"heatmap":case"treemap":case"pie":case"donut":case"polarArea":case"radialBar":case"radar":v=E;break;default:console.warn("You have specified an unrecognized series type (",E,").")}b!==E&&E!=="scatter"&&y++}),y>0&&(v!==null&&console.warn("Chart or series type ",v," can not appear with other chart or series types."),c.series.length>0&&a.plotOptions.bar.horizontal&&(y-=c.length,c={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),s.comboCharts||(s.comboCharts=y>0);var w=new tt(this.ctx,t),l=new Qe(this.ctx,t);this.ctx.pie=new Vt(this.ctx);var u=new aa(this.ctx);this.ctx.rangeBar=new sa(this.ctx,t);var m=new ia(this.ctx),A=[];if(s.comboCharts){var k,S,L=new $(this.ctx);if(n.series.length>0&&(k=A).push.apply(k,te(L.drawSeriesByGroup(n,s.areaGroups,"area",w))),c.series.length>0)if(i.config.chart.stacked){var C=new St(this.ctx,t);A.push(C.draw(c.series,c.i))}else this.ctx.bar=new me(this.ctx,t),A.push(this.ctx.bar.draw(c.series,c.i));if(x.series.length>0&&A.push(w.draw(x.series,"rangeArea",x.i,x.seriesRangeEnd)),r.series.length>0&&(S=A).push.apply(S,te(L.drawSeriesByGroup(r,s.lineGroups,"line",w))),d.series.length>0&&A.push(l.draw(d.series,"candlestick",d.i)),g.series.length>0&&A.push(l.draw(g.series,"boxPlot",g.i)),f.series.length>0&&A.push(this.ctx.rangeBar.draw(f.series,f.i)),o.series.length>0){var I=new tt(this.ctx,t,!0);A.push(I.draw(o.series,"scatter",o.i))}if(h.series.length>0){var z=new tt(this.ctx,t,!0);A.push(z.draw(h.series,"bubble",h.i))}}else switch(a.chart.type){case"line":A=w.draw(s.series,"line");break;case"area":A=w.draw(s.series,"area");break;case"bar":a.chart.stacked?A=new St(this.ctx,t).draw(s.series):(this.ctx.bar=new me(this.ctx,t),A=this.ctx.bar.draw(s.series));break;case"candlestick":A=new Qe(this.ctx,t).draw(s.series,"candlestick");break;case"boxPlot":A=new Qe(this.ctx,t).draw(s.series,a.chart.type);break;case"rangeBar":A=this.ctx.rangeBar.draw(s.series);break;case"rangeArea":A=w.draw(s.seriesRangeStart,"rangeArea",void 0,s.seriesRangeEnd);break;case"heatmap":A=new ta(this.ctx,t).draw(s.series);break;case"treemap":A=new ha(this.ctx,t).draw(s.series);break;case"pie":case"donut":case"polarArea":A=this.ctx.pie.draw(s.series);break;case"radialBar":A=u.draw(s.series);break;case"radar":A=m.draw(s.series);break;default:A=w.draw(s.series)}return A}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;t.chart.width||(t.chart.width="100%"),t.chart.height||(t.chart.height="auto"),e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=P.getDimensions(this.el),a=t.chart.width.toString().split(/[0-9]+/g).pop();a==="%"?P.isNumber(i[0])&&(i[0].width===0&&(i=P.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):a!=="px"&&a!==""||(e.svgWidth=parseInt(t.chart.width,10));var s=String(t.chart.height).toString().split(/[0-9]+/g).pop();if(e.svgHeight!=="auto"&&e.svgHeight!=="")if(s==="%"){var r=P.getDimensions(this.el.parentNode);e.svgHeight=r[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.axisCharts?e.svgHeight=e.svgWidth/1.61:e.svgHeight=e.svgWidth/1.2;if(e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),X.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),s!=="%"){var n=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+n+"px"}e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,i={transform:"translate("+e.translateX+", "+t+")"};X.setAttrs(e.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||!e.config.legend.show||e.config.legend.floating||(i=new Dt(this.ctx).legendHelpers.getLegendDimensions().clwh+10);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var n=P.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*e.globals.radialSize,o)}var h=r+t.translateY+i+a;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).indexOf("%")>0||(t.dom.elWrap.style.height=h+"px",X.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=h+"px")}},{key:"coreCalculations",value:function(){new rt(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(s){return[]})},i=new Et,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new nt(this.ctx).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new nt(this.ctx).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new da(this.ctx);var 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 $(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!="function"){var i=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];i.forEach(function(a){var s=ApexCharts.getChartByID(a);s.w.globals.brushSource=e.ctx,typeof s.w.config.chart.events.zoomed!="function"&&(s.w.config.chart.events.zoomed=function(){e.updateSourceChart(s)}),typeof s.w.config.chart.events.scrolled!="function"&&(s.w.config.chart.events.scrolled=function(){e.updateSourceChart(s)})}),t.config.chart.events.selection=function(a,s){i.forEach(function(r){ApexCharts.getChartByID(r).ctx.updateHelpers._updateOptions({xaxis:{min:s.xaxis.min,max:s.xaxis.max}},!1,!1,!1,!1)})}}}}]),p}(),ua=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(n){var o=[t.ctx];s&&(o=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(o=[t.ctx],t.ctx.w.globals.isExecCalled=!1),o.forEach(function(h,c){var d=h.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&h.series.getPreviousPaths()),e&&J(e)==="object"&&(h.config=new Pe(e),e=$.extendArrayProps(h.config,e,d),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=P.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?P.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?P.clone(e.yaxis):[],d.globals.initialConfig=P.extend({},d.config),d.globals.initialSeries=P.clone(d.config.series),e.series))){for(var g=0;g<d.globals.collapsedSeriesIndices.length;g++){var f=d.config.series[d.globals.collapsedSeriesIndices[g]];d.globals.collapsedSeries[g].data=d.globals.axisCharts?f.data.slice():f}for(var x=0;x<d.globals.ancillaryCollapsedSeriesIndices.length;x++){var b=d.config.series[d.globals.ancillaryCollapsedSeriesIndices[x]];d.globals.ancillaryCollapsedSeries[x].data=d.globals.axisCharts?b.data.slice():b}h.series.emptyCollapsedSeries(d.config.series)}return h.update(e).then(function(){c===o.length-1&&n(h)})})})}},{key:"_updateSeries",value:function(e,t){var i=this,a=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(s){var r,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?((r=e.map(function(o,h){return i._extendSeries(o,h)})).length===0&&(r=[{data:[]}]),n.config.series=r):n.config.series=e.slice(),a&&(n.globals.initialConfig.series=P.clone(n.config.series),n.globals.initialSeries=P.clone(n.config.series)),i.ctx.update().then(function(){s(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return Y(Y({},i.config.series[t]),{},{name:e.name?e.name:a?.name,color:e.color?e.color:a?.color,type:e.type?e.type:a?.type,group:e.group?e.group:a?.group,hidden:e.hidden!==void 0?e.hidden:a?.hidden,data:e.data?e.data:a?.data,zIndex:e.zIndex!==void 0?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(t,"'], ").concat(s," circle[j='").concat(t,"'], ").concat(s," rect[j='").concat(t,"']")).members[0]:t===void 0&&(a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(e,"']")).members[0],i.config.chart.type!=="pie"&&i.config.chart.type!=="polarArea"&&i.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),a?(new X(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){e.xaxis[a]!==void 0&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new Le(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(n){s[n]!==void 0&&(i.config.yaxis[n].min=s[n].min,i.config.yaxis[n].max=s[n].max)};i.config.yaxis.map(function(n,o){i.globals.zoomed||s[o]!==void 0?r(o):t.ctx.opts.yaxis[o]!==void 0&&(n.min=t.ctx.opts.yaxis[o].min,n.max=t.ctx.opts.yaxis[o].max)})}}]),p}();he=typeof window<"u"?window:void 0,Ce=function(p,e){var t=(this!==void 0?this:p).SVG=function(l){if(t.supported)return l=new t.Doc(l),t.parser.draw||t.prepare(),l};if(t.ns="http://www.w3.org/2000/svg",t.xmlns="http://www.w3.org/2000/xmlns/",t.xlink="http://www.w3.org/1999/xlink",t.svgjs="http://svgjs.dev",t.supported=!0,!t.supported)return!1;t.did=1e3,t.eid=function(l){return"Svgjs"+c(l)+t.did++},t.create=function(l){var u=e.createElementNS(this.ns,l);return u.setAttribute("id",this.eid(l)),u},t.extend=function(){var l,u;u=(l=[].slice.call(arguments)).pop();for(var m=l.length-1;m>=0;m--)if(l[m])for(var A in u)l[m].prototype[A]=u[A];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(l){var u=typeof l.create=="function"?l.create:function(){this.constructor.call(this,t.create(l.create))};return l.inherit&&(u.prototype=new l.inherit),l.extend&&t.extend(u,l.extend),l.construct&&t.extend(l.parent||t.Container,l.construct),u},t.adopt=function(l){return l?l.instance?l.instance:((u=l.nodeName=="svg"?l.parentNode instanceof p.SVGElement?new t.Nested:new t.Doc:l.nodeName=="linearGradient"?new t.Gradient("linear"):l.nodeName=="radialGradient"?new t.Gradient("radial"):t[c(l.nodeName)]?new t[c(l.nodeName)]:new t.Element(l)).type=l.nodeName,u.node=l,l.instance=u,u instanceof t.Doc&&u.namespace().defs(),u.setData(JSON.parse(l.getAttribute("svgjs:data"))||{}),u):null;var u},t.prepare=function(){var l=e.getElementsByTagName("body")[0],u=(l?new t.Doc(l):t.adopt(e.documentElement).nested()).size(2,0);t.parser={body:l||e.documentElement,draw:u.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:u.polyline().node,path:u.path().node,native:t.create("svg")}},t.parser={native:t.create("svg")},e.addEventListener("DOMContentLoaded",function(){t.parser.draw||t.prepare()},!1),t.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},t.utils={map:function(l,u){for(var m=l.length,A=[],k=0;k<m;k++)A.push(u(l[k]));return A},filter:function(l,u){for(var m=l.length,A=[],k=0;k<m;k++)u(l[k])&&A.push(l[k]);return A},filterSVGElements:function(l){return this.filter(l,function(u){return u instanceof p.SVGElement})}},t.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},t.Color=function(l){var u,m;this.r=0,this.g=0,this.b=0,l&&(typeof l=="string"?t.regex.isRgb.test(l)?(u=t.regex.rgb.exec(l.replace(t.regex.whitespace,"")),this.r=parseInt(u[1]),this.g=parseInt(u[2]),this.b=parseInt(u[3])):t.regex.isHex.test(l)&&(u=t.regex.hex.exec((m=l).length==4?["#",m.substring(1,2),m.substring(1,2),m.substring(2,3),m.substring(2,3),m.substring(3,4),m.substring(3,4)].join(""):m),this.r=parseInt(u[1],16),this.g=parseInt(u[2],16),this.b=parseInt(u[3],16)):J(l)==="object"&&(this.r=l.r,this.g=l.g,this.b=l.b))},t.extend(t.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+d(this.r)+d(this.g)+d(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(l){return this.destination=new t.Color(l),this},at:function(l){return this.destination?(l=l<0?0:l>1?1:l,new t.Color({r:~~(this.r+(this.destination.r-this.r)*l),g:~~(this.g+(this.destination.g-this.g)*l),b:~~(this.b+(this.destination.b-this.b)*l)})):this}}),t.Color.test=function(l){return l+="",t.regex.isHex.test(l)||t.regex.isRgb.test(l)},t.Color.isRgb=function(l){return l&&typeof l.r=="number"&&typeof l.g=="number"&&typeof l.b=="number"},t.Color.isColor=function(l){return t.Color.isRgb(l)||t.Color.test(l)},t.Array=function(l,u){(l=(l||[]).valueOf()).length==0&&u&&(l=u.valueOf()),this.value=this.parse(l)},t.extend(t.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(l){return l=l.valueOf(),Array.isArray(l)?l:this.split(l)}}),t.PointArray=function(l,u){t.Array.call(this,l,u||[[0,0]])},t.PointArray.prototype=new t.Array,t.PointArray.prototype.constructor=t.PointArray;for(var i={M:function(l,u,m){return u.x=m.x=l[0],u.y=m.y=l[1],["M",u.x,u.y]},L:function(l,u){return u.x=l[0],u.y=l[1],["L",l[0],l[1]]},H:function(l,u){return u.x=l[0],["H",l[0]]},V:function(l,u){return u.y=l[0],["V",l[0]]},C:function(l,u){return u.x=l[4],u.y=l[5],["C",l[0],l[1],l[2],l[3],l[4],l[5]]},Q:function(l,u){return u.x=l[2],u.y=l[3],["Q",l[0],l[1],l[2],l[3]]},S:function(l,u){return u.x=l[2],u.y=l[3],["S",l[0],l[1],l[2],l[3]]},Z:function(l,u,m){return u.x=m.x,u.y=m.y,["Z"]}},a="mlhvqtcsaz".split(""),s=0,r=a.length;s<r;++s)i[a[s]]=function(l){return function(u,m,A){if(l=="H")u[0]=u[0]+m.x;else if(l=="V")u[0]=u[0]+m.y;else if(l=="A")u[5]=u[5]+m.x,u[6]=u[6]+m.y;else for(var k=0,S=u.length;k<S;++k)u[k]=u[k]+(k%2?m.y:m.x);if(i&&typeof i[l]=="function")return i[l](u,m,A)}}(a[s].toUpperCase());t.PathArray=function(l,u){t.Array.call(this,l,u||[["M",0,0]])},t.PathArray.prototype=new t.Array,t.PathArray.prototype.constructor=t.PathArray,t.extend(t.PathArray,{toString:function(){return function(l){for(var u=0,m=l.length,A="";u<m;u++)A+=l[u][0],l[u][1]!=null&&(A+=l[u][1],l[u][2]!=null&&(A+=" ",A+=l[u][2],l[u][3]!=null&&(A+=" ",A+=l[u][3],A+=" ",A+=l[u][4],l[u][5]!=null&&(A+=" ",A+=l[u][5],A+=" ",A+=l[u][6],l[u][7]!=null&&(A+=" ",A+=l[u][7])))));return A+" "}(this.value)},move:function(l,u){var m=this.bbox();return m.x,m.y,this},at:function(l){if(!this.destination)return this;for(var u=this.value,m=this.destination.value,A=[],k=new t.PathArray,S=0,L=u.length;S<L;S++){A[S]=[u[S][0]];for(var C=1,I=u[S].length;C<I;C++)A[S][C]=u[S][C]+(m[S][C]-u[S][C])*l;A[S][0]==="A"&&(A[S][4]=+(A[S][4]!=0),A[S][5]=+(A[S][5]!=0))}return k.value=A,k},parse:function(l){if(l instanceof t.PathArray)return l.valueOf();var u,m={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};l=typeof l=="string"?l.replace(t.regex.numbersWithDots,o).replace(t.regex.pathLetters," $& ").replace(t.regex.hyphen,"$1 -").trim().split(t.regex.delimiter):l.reduce(function(I,z){return[].concat.call(I,z)},[]);var A=[],k=new t.Point,S=new t.Point,L=0,C=l.length;do t.regex.isPathLetter.test(l[L])?(u=l[L],++L):u=="M"?u="L":u=="m"&&(u="l"),A.push(i[u].call(null,l.slice(L,L+=m[u.toUpperCase()]).map(parseFloat),k,S));while(C>L);return A},bbox:function(){return t.parser.draw||t.prepare(),t.parser.path.setAttribute("d",this.toString()),t.parser.path.getBBox()}}),t.Number=t.invent({create:function(l,u){this.value=0,this.unit=u||"",typeof l=="number"?this.value=isNaN(l)?0:isFinite(l)?l:l<0?-34e37:34e37:typeof l=="string"?(u=l.match(t.regex.numberAndUnit))&&(this.value=parseFloat(u[1]),u[5]=="%"?this.value/=100:u[5]=="s"&&(this.value*=1e3),this.unit=u[5]):l instanceof t.Number&&(this.value=l.valueOf(),this.unit=l.unit)},extend:{toString:function(){return(this.unit=="%"?~~(1e8*this.value)/1e6:this.unit=="s"?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(l){return l=new t.Number(l),new t.Number(this+l,this.unit||l.unit)},minus:function(l){return l=new t.Number(l),new t.Number(this-l,this.unit||l.unit)},times:function(l){return l=new t.Number(l),new t.Number(this*l,this.unit||l.unit)},divide:function(l){return l=new t.Number(l),new t.Number(this/l,this.unit||l.unit)},to:function(l){var u=new t.Number(this);return typeof l=="string"&&(u.unit=l),u},morph:function(l){return this.destination=new t.Number(l),l.relative&&(this.destination.value+=this.value),this},at:function(l){return this.destination?new t.Number(this.destination).minus(this).times(l).plus(this):this}}}),t.Element=t.invent({create:function(l){this._stroke=t.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=l)&&(this.type=l.nodeName,this.node.instance=this,this._stroke=l.getAttribute("stroke")||this._stroke)},extend:{x:function(l){return this.attr("x",l)},y:function(l){return this.attr("y",l)},cx:function(l){return l==null?this.x()+this.width()/2:this.x(l-this.width()/2)},cy:function(l){return l==null?this.y()+this.height()/2:this.y(l-this.height()/2)},move:function(l,u){return this.x(l).y(u)},center:function(l,u){return this.cx(l).cy(u)},width:function(l){return this.attr("width",l)},height:function(l){return this.attr("height",l)},size:function(l,u){var m=g(this,l,u);return this.width(new t.Number(m.width)).height(new t.Number(m.height))},clone:function(l){this.writeDataToDom();var u=b(this.node.cloneNode(!0));return l?l.add(u):this.after(u),u},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(l){return this.after(l).remove(),l},addTo:function(l){return l.put(this)},putIn:function(l){return l.add(this)},id:function(l){return this.attr("id",l)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return this.style("display")!="none"},toString:function(){return this.attr("id")},classes:function(){var l=this.attr("class");return l==null?[]:l.trim().split(t.regex.delimiter)},hasClass:function(l){return this.classes().indexOf(l)!=-1},addClass:function(l){if(!this.hasClass(l)){var u=this.classes();u.push(l),this.attr("class",u.join(" "))}return this},removeClass:function(l){return this.hasClass(l)&&this.attr("class",this.classes().filter(function(u){return u!=l}).join(" ")),this},toggleClass:function(l){return this.hasClass(l)?this.removeClass(l):this.addClass(l)},reference:function(l){return t.get(this.attr(l))},parent:function(l){var u=this;if(!u.node.parentNode)return null;if(u=t.adopt(u.node.parentNode),!l)return u;for(;u&&u.node instanceof p.SVGElement;){if(typeof l=="string"?u.matches(l):u instanceof l)return u;if(!u.node.parentNode||u.node.parentNode.nodeName=="#document")return null;u=t.adopt(u.node.parentNode)}},doc:function(){return this instanceof t.Doc?this:this.parent(t.Doc)},parents:function(l){var u=[],m=this;do{if(!(m=m.parent(l))||!m.node)break;u.push(m)}while(m.parent);return u},matches:function(l){return function(u,m){return(u.matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector).call(u,m)}(this.node,l)},native:function(){return this.node},svg:function(l){var u=e.createElementNS("http://www.w3.org/2000/svg","svg");if(!(l&&this instanceof t.Parent))return u.appendChild(l=e.createElementNS("http://www.w3.org/2000/svg","svg")),this.writeDataToDom(),l.appendChild(this.node.cloneNode(!0)),u.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");u.innerHTML="<svg>"+l.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var m=0,A=u.firstChild.childNodes.length;m<A;m++)this.node.appendChild(u.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each(function(){this.writeDataToDom()}),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(l){return this.dom=l,this},is:function(l){return function(u,m){return u instanceof m}(this,l)}}}),t.easing={"-":function(l){return l},"<>":function(l){return-Math.cos(l*Math.PI)/2+.5},">":function(l){return Math.sin(l*Math.PI/2)},"<":function(l){return 1-Math.cos(l*Math.PI/2)}},t.morph=function(l){return function(u,m){return new t.MorphObj(u,m).at(l)}},t.Situation=t.invent({create:function(l){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new t.Number(l.duration).valueOf(),this.delay=new t.Number(l.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=l.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),t.FX=t.invent({create:function(l){this._target=l,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(l,u,m){J(l)==="object"&&(u=l.ease,m=l.delay,l=l.duration);var A=new t.Situation({duration:l||1e3,delay:m||0,ease:t.easing[u||"-"]||u});return this.queue(A),this},target:function(l){return l&&l instanceof t.Element?(this._target=l,this):this._target},timeToAbsPos:function(l){return(l-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(l){return this.situation.duration/this._speed*l+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=p.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){p.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(l){return(typeof l=="function"||l instanceof t.Situation)&&this.situations.push(l),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof t.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var l,u=this.situation;if(u.init)return this;for(var m in u.animations){l=this.target()[m](),Array.isArray(l)||(l=[l]),Array.isArray(u.animations[m])||(u.animations[m]=[u.animations[m]]);for(var A=l.length;A--;)u.animations[m][A]instanceof t.Number&&(l[A]=new t.Number(l[A])),u.animations[m][A]=l[A].morph(u.animations[m][A])}for(var m in u.attrs)u.attrs[m]=new t.MorphObj(this.target().attr(m),u.attrs[m]);for(var m in u.styles)u.styles[m]=new t.MorphObj(this.target().style(m),u.styles[m]);return u.initialTransformation=this.target().matrixify(),u.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(l,u){var m=this.active;return this.active=!1,u&&this.clearQueue(),l&&this.situation&&(!m&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(l){var u=this.last();return this.target().on("finished.fx",function m(A){A.detail.situation==u&&(l.call(this,u),this.off("finished.fx",m))}),this._callStart()},during:function(l){var u=this.last(),m=function(A){A.detail.situation==u&&l.call(this,A.detail.pos,t.morph(A.detail.pos),A.detail.eased,u)};return this.target().off("during.fx",m).on("during.fx",m),this.after(function(){this.off("during.fx",m)}),this._callStart()},afterAll:function(l){var u=function m(A){l.call(this),this.off("allfinished.fx",m)};return this.target().off("allfinished.fx",u).on("allfinished.fx",u),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(l,u,m){return this.last()[m||"animations"][l]=u,this._callStart()},step:function(l){var u,m,A;l||(this.absPos=this.timeToAbsPos(+new Date)),this.situation.loops!==!1?(u=Math.max(this.absPos,0),m=Math.floor(u),this.situation.loops===!0||m<this.situation.loops?(this.pos=u-m,A=this.situation.loop,this.situation.loop=m):(this.absPos=this.situation.loops,this.pos=1,A=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=!!((this.situation.loop-A)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var k=this.situation.ease(this.pos);for(var S in this.situation.once)S>this.lastPos&&S<=k&&(this.situation.once[S].call(this.target(),this.pos,k),delete this.situation.once[S]);return this.active&&this.target().fire("during",{pos:this.pos,eased:k,fx:this,situation:this.situation}),this.situation?(this.eachAt(),this.pos==1&&!this.situation.reversed||this.situation.reversed&&this.pos==0?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=k,this):this},eachAt:function(){var l,u=this,m=this.target(),A=this.situation;for(var k in A.animations)l=[].concat(A.animations[k]).map(function(C){return typeof C!="string"&&C.at?C.at(A.ease(u.pos),u.pos):C}),m[k].apply(m,l);for(var k in A.attrs)l=[k].concat(A.attrs[k]).map(function(I){return typeof I!="string"&&I.at?I.at(A.ease(u.pos),u.pos):I}),m.attr.apply(m,l);for(var k in A.styles)l=[k].concat(A.styles[k]).map(function(I){return typeof I!="string"&&I.at?I.at(A.ease(u.pos),u.pos):I}),m.style.apply(m,l);if(A.transforms.length){l=A.initialTransformation,k=0;for(var S=A.transforms.length;k<S;k++){var L=A.transforms[k];L instanceof t.Matrix?l=L.relative?l.multiply(new t.Matrix().morph(L).at(A.ease(this.pos))):l.morph(L).at(A.ease(this.pos)):(L.relative||L.undo(l.extract()),l=l.multiply(L.at(A.ease(this.pos))))}m.matrix(l)}return this},once:function(l,u,m){var A=this.last();return m||(l=A.ease(l)),A.once[l]=u,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:t.Element,construct:{animate:function(l,u,m){return(this.fx||(this.fx=new t.FX(this))).animate(l,u,m)},delay:function(l){return(this.fx||(this.fx=new t.FX(this))).delay(l)},stop:function(l,u){return this.fx&&this.fx.stop(l,u),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),t.MorphObj=t.invent({create:function(l,u){return t.Color.isColor(u)?new t.Color(l).morph(u):t.regex.delimiter.test(l)?t.regex.pathLetters.test(l)?new t.PathArray(l).morph(u):new t.Array(l).morph(u):t.regex.numberAndUnit.test(u)?new t.Number(l).morph(u):(this.value=l,void(this.destination=u))},extend:{at:function(l,u){return u<1?this.value:this.destination},valueOf:function(){return this.value}}}),t.extend(t.FX,{attr:function(l,u,m){if(J(l)==="object")for(var A in l)this.attr(A,l[A]);else this.add(l,u,"attrs");return this},plot:function(l,u,m,A){return arguments.length==4?this.plot([l,u,m,A]):this.add("plot",new(this.target()).morphArray(l))}}),t.Box=t.invent({create:function(l,u,m,A){if(!(J(l)!=="object"||l instanceof t.Element))return t.Box.call(this,l.left!=null?l.left:l.x,l.top!=null?l.top:l.y,l.width,l.height);var k;arguments.length==4&&(this.x=l,this.y=u,this.width=m,this.height=A),(k=this).x==null&&(k.x=0,k.y=0,k.width=0,k.height=0),k.w=k.width,k.h=k.height,k.x2=k.x+k.width,k.y2=k.y+k.height,k.cx=k.x+k.width/2,k.cy=k.y+k.height/2}}),t.BBox=t.invent({create:function(l){if(t.Box.apply(this,[].slice.call(arguments)),l instanceof t.Element){var u;try{if(!e.documentElement.contains){for(var m=l.node;m.parentNode;)m=m.parentNode;if(m!=e)throw new Error("Element not in the dom")}u=l.node.getBBox()}catch{if(l instanceof t.Shape){t.parser.draw||t.prepare();var A=l.clone(t.parser.draw.instance).show();A&&A.node&&typeof A.node.getBBox=="function"&&(u=A.node.getBBox()),A&&typeof A.remove=="function"&&A.remove()}else u={x:l.node.clientLeft,y:l.node.clientTop,width:l.node.clientWidth,height:l.node.clientHeight}}t.Box.call(this,u)}},inherit:t.Box,parent:t.Element,construct:{bbox:function(){return new t.BBox(this)}}}),t.BBox.prototype.constructor=t.BBox,t.Matrix=t.invent({create:function(l){var u=x([1,0,0,1,0,0]);l=l===null?u:l instanceof t.Element?l.matrixify():typeof l=="string"?x(l.split(t.regex.delimiter).map(parseFloat)):arguments.length==6?x([].slice.call(arguments)):Array.isArray(l)?x(l):l&&J(l)==="object"?l:u;for(var m=y.length-1;m>=0;--m)this[y[m]]=l[y[m]]!=null?l[y[m]]:u[y[m]]},extend:{extract:function(){var l=f(this,0,1);f(this,1,0);var u=180/Math.PI*Math.atan2(l.y,l.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(u*Math.PI/180)+this.f*Math.sin(u*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(u*Math.PI/180)+this.e*Math.sin(-u*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:u,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new t.Matrix(this)}},clone:function(){return new t.Matrix(this)},morph:function(l){return this.destination=new t.Matrix(l),this},multiply:function(l){return new t.Matrix(this.native().multiply(function(u){return u instanceof t.Matrix||(u=new t.Matrix(u)),u}(l).native()))},inverse:function(){return new t.Matrix(this.native().inverse())},translate:function(l,u){return new t.Matrix(this.native().translate(l||0,u||0))},native:function(){for(var l=t.parser.native.createSVGMatrix(),u=y.length-1;u>=0;u--)l[y[u]]=this[y[u]];return l},toString:function(){return"matrix("+v(this.a)+","+v(this.b)+","+v(this.c)+","+v(this.d)+","+v(this.e)+","+v(this.f)+")"}},parent:t.Element,construct:{ctm:function(){return new t.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof t.Nested){var l=this.rect(1,1),u=l.node.getScreenCTM();return l.remove(),new t.Matrix(u)}return new t.Matrix(this.node.getScreenCTM())}}}),t.Point=t.invent({create:function(l,u){var m;m=Array.isArray(l)?{x:l[0],y:l[1]}:J(l)==="object"?{x:l.x,y:l.y}:l!=null?{x:l,y:u??l}:{x:0,y:0},this.x=m.x,this.y=m.y},extend:{clone:function(){return new t.Point(this)},morph:function(l,u){return this.destination=new t.Point(l,u),this}}}),t.extend(t.Element,{point:function(l,u){return new t.Point(l,u).transform(this.screenCTM().inverse())}}),t.extend(t.Element,{attr:function(l,u,m){if(l==null){for(l={},m=(u=this.node.attributes).length-1;m>=0;m--)l[u[m].nodeName]=t.regex.isNumber.test(u[m].nodeValue)?parseFloat(u[m].nodeValue):u[m].nodeValue;return l}if(J(l)==="object")for(var A in l)this.attr(A,l[A]);else if(u===null)this.node.removeAttribute(l);else{if(u==null)return(u=this.node.getAttribute(l))==null?t.defaults.attrs[l]:t.regex.isNumber.test(u)?parseFloat(u):u;l=="stroke-width"?this.attr("stroke",parseFloat(u)>0?this._stroke:null):l=="stroke"&&(this._stroke=u),l!="fill"&&l!="stroke"||(t.regex.isImage.test(u)&&(u=this.doc().defs().image(u,0,0)),u instanceof t.Image&&(u=this.doc().defs().pattern(0,0,function(){this.add(u)}))),typeof u=="number"?u=new t.Number(u):t.Color.isColor(u)?u=new t.Color(u):Array.isArray(u)&&(u=new t.Array(u)),l=="leading"?this.leading&&this.leading(u):typeof m=="string"?this.node.setAttributeNS(m,l,u.toString()):this.node.setAttribute(l,u.toString()),!this.rebuild||l!="font-size"&&l!="x"||this.rebuild(l,u)}return this}}),t.extend(t.Element,{transform:function(l,u){var m;return J(l)!=="object"?(m=new t.Matrix(this).extract(),typeof l=="string"?m[l]:m):(m=new t.Matrix(this),u=!!u||!!l.relative,l.a!=null&&(m=u?m.multiply(new t.Matrix(l)):new t.Matrix(l)),this.attr("transform",m))}}),t.extend(t.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t.regex.transforms).slice(0,-1).map(function(l){var u=l.trim().split("(");return[u[0],u[1].split(t.regex.delimiter).map(function(m){return parseFloat(m)})]}).reduce(function(l,u){return u[0]=="matrix"?l.multiply(x(u[1])):l[u[0]].apply(l,u[1])},new t.Matrix)},toParent:function(l){if(this==l)return this;var u=this.screenCTM(),m=l.screenCTM().inverse();return this.addTo(l).untransform().transform(m.multiply(u)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(l,u){if(arguments.length>1&&typeof u!="boolean")return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(l))for(var m=0,A=this.arguments.length;m<A;++m)this[this.arguments[m]]=l[m];else if(l&&J(l)==="object")for(m=0,A=this.arguments.length;m<A;++m)this[this.arguments[m]]=l[this.arguments[m]];this.inversed=!1,u===!0&&(this.inversed=!0)}}),t.Translate=t.invent({parent:t.Matrix,inherit:t.Transformation,create:function(l,u){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),t.extend(t.Element,{style:function(l,u){if(arguments.length==0)return this.node.style.cssText||"";if(arguments.length<2)if(J(l)==="object")for(var m in l)this.style(m,l[m]);else{if(!t.regex.isCss.test(l))return this.node.style[h(l)];for(l=l.split(/\s*;\s*/).filter(function(A){return!!A}).map(function(A){return A.split(/\s*:\s*/)});u=l.pop();)this.style(u[0],u[1])}else this.node.style[h(l)]=u===null||t.regex.isBlank.test(u)?"":u;return this}}),t.Parent=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Element,extend:{children:function(){return t.utils.map(t.utils.filterSVGElements(this.node.childNodes),function(l){return t.adopt(l)})},add:function(l,u){return u==null?this.node.appendChild(l.node):l.node!=this.node.childNodes[u]&&this.node.insertBefore(l.node,this.node.childNodes[u]),this},put:function(l,u){return this.add(l,u),l},has:function(l){return this.index(l)>=0},index:function(l){return[].slice.call(this.node.childNodes).indexOf(l.node)},get:function(l){return t.adopt(this.node.childNodes[l])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(l,u){for(var m=this.children(),A=0,k=m.length;A<k;A++)m[A]instanceof t.Element&&l.apply(m[A],[A,m]),u&&m[A]instanceof t.Container&&m[A].each(l,u);return this},removeElement:function(l){return this.node.removeChild(l.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),t.extend(t.Parent,{ungroup:function(l,u){return u===0||this instanceof t.Defs||this.node==t.parser.draw||(l=l||(this instanceof t.Doc?this:this.parent(t.Parent)),u=u||1/0,this.each(function(){return this instanceof t.Defs?this:this instanceof t.Parent?this.ungroup(l,u-1):this.toParent(l)}),this.node.firstChild||this.remove()),this},flatten:function(l,u){return this.ungroup(l,u)}}),t.Container=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Parent}),t.ViewBox=t.invent({parent:t.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(l){t.Element.prototype[l]=function(u){return t.on(this.node,l,u),this}}),t.listeners=[],t.handlerMap=[],t.listenerId=0,t.on=function(l,u,m,A,k){var S=m.bind(A||l.instance||l),L=(t.handlerMap.indexOf(l)+1||t.handlerMap.push(l))-1,C=u.split(".")[0],I=u.split(".")[1]||"*";t.listeners[L]=t.listeners[L]||{},t.listeners[L][C]=t.listeners[L][C]||{},t.listeners[L][C][I]=t.listeners[L][C][I]||{},m._svgjsListenerId||(m._svgjsListenerId=++t.listenerId),t.listeners[L][C][I][m._svgjsListenerId]=S,l.addEventListener(C,S,k||{passive:!1})},t.off=function(l,u,m){var A=t.handlerMap.indexOf(l),k=u&&u.split(".")[0],S=u&&u.split(".")[1],L="";if(A!=-1)if(m){if(typeof m=="function"&&(m=m._svgjsListenerId),!m)return;t.listeners[A][k]&&t.listeners[A][k][S||"*"]&&(l.removeEventListener(k,t.listeners[A][k][S||"*"][m],!1),delete t.listeners[A][k][S||"*"][m])}else if(S&&k){if(t.listeners[A][k]&&t.listeners[A][k][S]){for(var C in t.listeners[A][k][S])t.off(l,[k,S].join("."),C);delete t.listeners[A][k][S]}}else if(S)for(var I in t.listeners[A])for(var L in t.listeners[A][I])S===L&&t.off(l,[I,S].join("."));else if(k){if(t.listeners[A][k]){for(var L in t.listeners[A][k])t.off(l,[k,L].join("."));delete t.listeners[A][k]}}else{for(var I in t.listeners[A])t.off(l,I);delete t.listeners[A],delete t.handlerMap[A]}},t.extend(t.Element,{on:function(l,u,m,A){return t.on(this.node,l,u,m,A),this},off:function(l,u){return t.off(this.node,l,u),this},fire:function(l,u){return l instanceof p.Event?this.node.dispatchEvent(l):this.node.dispatchEvent(l=new t.CustomEvent(l,{detail:u,cancelable:!0})),this._event=l,this},event:function(){return this._event}}),t.Defs=t.invent({create:"defs",inherit:t.Container}),t.G=t.invent({create:"g",inherit:t.Container,extend:{x:function(l){return l==null?this.transform("x"):this.transform({x:l-this.x()},!0)}},construct:{group:function(){return this.put(new t.G)}}}),t.Doc=t.invent({create:function(l){l&&((l=typeof l=="string"?e.getElementById(l):l).nodeName=="svg"?this.constructor.call(this,l):(this.constructor.call(this,t.create("svg")),l.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:t.Container,extend:{namespace:function(){return this.attr({xmlns:t.ns,version:"1.1"}).attr("xmlns:xlink",t.xlink,t.xmlns).attr("xmlns:svgjs",t.svgjs,t.xmlns)},defs:function(){var l;return this._defs||((l=this.node.getElementsByTagName("defs")[0])?this._defs=t.adopt(l):this._defs=new t.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&this.node.parentNode.nodeName!="#document"?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,t.parser.draw&&!t.parser.draw.parentNode&&this.node.appendChild(t.parser.draw),this},clone:function(l){this.writeDataToDom();var u=this.node,m=b(u.cloneNode(!0));return l?(l.node||l).appendChild(m.node):u.parentNode.insertBefore(m.node,u.nextSibling),m}}}),t.extend(t.Element,{}),t.Gradient=t.invent({create:function(l){this.constructor.call(this,t.create(l+"Gradient")),this.type=l},inherit:t.Container,extend:{at:function(l,u,m){return this.put(new t.Stop).update(l,u,m)},update:function(l){return this.clear(),typeof l=="function"&&l.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(l,u,m){return l=="transform"&&(l="gradientTransform"),t.Container.prototype.attr.call(this,l,u,m)}},construct:{gradient:function(l,u){return this.defs().gradient(l,u)}}}),t.extend(t.Gradient,t.FX,{from:function(l,u){return(this._target||this).type=="radial"?this.attr({fx:new t.Number(l),fy:new t.Number(u)}):this.attr({x1:new t.Number(l),y1:new t.Number(u)})},to:function(l,u){return(this._target||this).type=="radial"?this.attr({cx:new t.Number(l),cy:new t.Number(u)}):this.attr({x2:new t.Number(l),y2:new t.Number(u)})}}),t.extend(t.Defs,{gradient:function(l,u){return this.put(new t.Gradient(l)).update(u)}}),t.Stop=t.invent({create:"stop",inherit:t.Element,extend:{update:function(l){return(typeof l=="number"||l instanceof t.Number)&&(l={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),l.opacity!=null&&this.attr("stop-opacity",l.opacity),l.color!=null&&this.attr("stop-color",l.color),l.offset!=null&&this.attr("offset",new t.Number(l.offset)),this}}}),t.Pattern=t.invent({create:"pattern",inherit:t.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(l){return this.clear(),typeof l=="function"&&l.call(this,this),this},toString:function(){return this.fill()},attr:function(l,u,m){return l=="transform"&&(l="patternTransform"),t.Container.prototype.attr.call(this,l,u,m)}},construct:{pattern:function(l,u,m){return this.defs().pattern(l,u,m)}}}),t.extend(t.Defs,{pattern:function(l,u,m){return this.put(new t.Pattern).update(m).attr({x:0,y:0,width:l,height:u,patternUnits:"userSpaceOnUse"})}}),t.Shape=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Element}),t.Symbol=t.invent({create:"symbol",inherit:t.Container,construct:{symbol:function(){return this.put(new t.Symbol)}}}),t.Use=t.invent({create:"use",inherit:t.Shape,extend:{element:function(l,u){return this.attr("href",(u||"")+"#"+l,t.xlink)}},construct:{use:function(l,u){return this.put(new t.Use).element(l,u)}}}),t.Rect=t.invent({create:"rect",inherit:t.Shape,construct:{rect:function(l,u){return this.put(new t.Rect).size(l,u)}}}),t.Circle=t.invent({create:"circle",inherit:t.Shape,construct:{circle:function(l){return this.put(new t.Circle).rx(new t.Number(l).divide(2)).move(0,0)}}}),t.extend(t.Circle,t.FX,{rx:function(l){return this.attr("r",l)},ry:function(l){return this.rx(l)}}),t.Ellipse=t.invent({create:"ellipse",inherit:t.Shape,construct:{ellipse:function(l,u){return this.put(new t.Ellipse).size(l,u).move(0,0)}}}),t.extend(t.Ellipse,t.Rect,t.FX,{rx:function(l){return this.attr("rx",l)},ry:function(l){return this.attr("ry",l)}}),t.extend(t.Circle,t.Ellipse,{x:function(l){return l==null?this.cx()-this.rx():this.cx(l+this.rx())},y:function(l){return l==null?this.cy()-this.ry():this.cy(l+this.ry())},cx:function(l){return l==null?this.attr("cx"):this.attr("cx",l)},cy:function(l){return l==null?this.attr("cy"):this.attr("cy",l)},width:function(l){return l==null?2*this.rx():this.rx(new t.Number(l).divide(2))},height:function(l){return l==null?2*this.ry():this.ry(new t.Number(l).divide(2))},size:function(l,u){var m=g(this,l,u);return this.rx(new t.Number(m.width).divide(2)).ry(new t.Number(m.height).divide(2))}}),t.Line=t.invent({create:"line",inherit:t.Shape,extend:{array:function(){return new t.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(l,u,m,A){return l==null?this.array():(l=u!==void 0?{x1:l,y1:u,x2:m,y2:A}:new t.PointArray(l).toLine(),this.attr(l))},move:function(l,u){return this.attr(this.array().move(l,u).toLine())},size:function(l,u){var m=g(this,l,u);return this.attr(this.array().size(m.width,m.height).toLine())}},construct:{line:function(l,u,m,A){return t.Line.prototype.plot.apply(this.put(new t.Line),l!=null?[l,u,m,A]:[0,0,0,0])}}}),t.Polyline=t.invent({create:"polyline",inherit:t.Shape,construct:{polyline:function(l){return this.put(new t.Polyline).plot(l||new t.PointArray)}}}),t.Polygon=t.invent({create:"polygon",inherit:t.Shape,construct:{polygon:function(l){return this.put(new t.Polygon).plot(l||new t.PointArray)}}}),t.extend(t.Polyline,t.Polygon,{array:function(){return this._array||(this._array=new t.PointArray(this.attr("points")))},plot:function(l){return l==null?this.array():this.clear().attr("points",typeof l=="string"?l:this._array=new t.PointArray(l))},clear:function(){return delete this._array,this},move:function(l,u){return this.attr("points",this.array().move(l,u))},size:function(l,u){var m=g(this,l,u);return this.attr("points",this.array().size(m.width,m.height))}}),t.extend(t.Line,t.Polyline,t.Polygon,{morphArray:t.PointArray,x:function(l){return l==null?this.bbox().x:this.move(l,this.bbox().y)},y:function(l){return l==null?this.bbox().y:this.move(this.bbox().x,l)},width:function(l){var u=this.bbox();return l==null?u.width:this.size(l,u.height)},height:function(l){var u=this.bbox();return l==null?u.height:this.size(u.width,l)}}),t.Path=t.invent({create:"path",inherit:t.Shape,extend:{morphArray:t.PathArray,array:function(){return this._array||(this._array=new t.PathArray(this.attr("d")))},plot:function(l){return l==null?this.array():this.clear().attr("d",typeof l=="string"?l:this._array=new t.PathArray(l))},clear:function(){return delete this._array,this}},construct:{path:function(l){return this.put(new t.Path).plot(l||new t.PathArray)}}}),t.Image=t.invent({create:"image",inherit:t.Shape,extend:{load:function(l){if(!l)return this;var u=this,m=new p.Image;return t.on(m,"load",function(){t.off(m);var A=u.parent(t.Pattern);A!==null&&(u.width()==0&&u.height()==0&&u.size(m.width,m.height),A&&A.width()==0&&A.height()==0&&A.size(u.width(),u.height()),typeof u._loaded=="function"&&u._loaded.call(u,{width:m.width,height:m.height,ratio:m.width/m.height,url:l}))}),t.on(m,"error",function(A){t.off(m),typeof u._error=="function"&&u._error.call(u,A)}),this.attr("href",m.src=this.src=l,t.xlink)},loaded:function(l){return this._loaded=l,this},error:function(l){return this._error=l,this}},construct:{image:function(l,u,m){return this.put(new t.Image).load(l).size(u||0,m||u||0)}}}),t.Text=t.invent({create:function(){this.constructor.call(this,t.create("text")),this.dom.leading=new t.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",t.defaults.attrs["font-family"])},inherit:t.Shape,extend:{x:function(l){return l==null?this.attr("x"):this.attr("x",l)},text:function(l){if(l===void 0){l="";for(var u=this.node.childNodes,m=0,A=u.length;m<A;++m)m!=0&&u[m].nodeType!=3&&t.adopt(u[m]).dom.newLined==1&&(l+=`
`),l+=u[m].textContent;return l}if(this.clear().build(!0),typeof l=="function")l.call(this,this);else{m=0;for(var k=(l=l.split(`
`)).length;m<k;m++)this.tspan(l[m]).newLine()}return this.build(!1).rebuild()},size:function(l){return this.attr("font-size",l).rebuild()},leading:function(l){return l==null?this.dom.leading:(this.dom.leading=new t.Number(l),this.rebuild())},lines:function(){var l=(this.textPath&&this.textPath()||this).node,u=t.utils.map(t.utils.filterSVGElements(l.childNodes),function(m){return t.adopt(m)});return new t.Set(u)},rebuild:function(l){if(typeof l=="boolean"&&(this._rebuild=l),this._rebuild){var u=this,m=0,A=this.dom.leading*new t.Number(this.attr("font-size"));this.lines().each(function(){this.dom.newLined&&(u.textPath()||this.attr("x",u.attr("x")),this.text()==`
`?m+=A:(this.attr("dy",A+m),m=0))}),this.fire("rebuild")}return this},build:function(l){return this._build=!!l,this},setData:function(l){return this.dom=l,this.dom.leading=new t.Number(l.leading||1.3),this}},construct:{text:function(l){return this.put(new t.Text).text(l)},plain:function(l){return this.put(new t.Text).plain(l)}}}),t.Tspan=t.invent({create:"tspan",inherit:t.Shape,extend:{text:function(l){return l==null?this.node.textContent+(this.dom.newLined?`
`:""):(typeof l=="function"?l.call(this,this):this.plain(l),this)},dx:function(l){return this.attr("dx",l)},dy:function(l){return this.attr("dy",l)},newLine:function(){var l=this.parent(t.Text);return this.dom.newLined=!0,this.dy(l.dom.leading*l.attr("font-size")).attr("x",l.x())}}}),t.extend(t.Text,t.Tspan,{plain:function(l){return this._build===!1&&this.clear(),this.node.appendChild(e.createTextNode(l)),this},tspan:function(l){var u=(this.textPath&&this.textPath()||this).node,m=new t.Tspan;return this._build===!1&&this.clear(),u.appendChild(m.node),m.text(l)},clear:function(){for(var l=(this.textPath&&this.textPath()||this).node;l.hasChildNodes();)l.removeChild(l.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),t.TextPath=t.invent({create:"textPath",inherit:t.Parent,parent:t.Text,construct:{morphArray:t.PathArray,array:function(){var l=this.track();return l?l.array():null},plot:function(l){var u=this.track(),m=null;return u&&(m=u.plot(l)),l==null?m:this},track:function(){var l=this.textPath();if(l)return l.reference("href")},textPath:function(){if(this.node.firstChild&&this.node.firstChild.nodeName=="textPath")return t.adopt(this.node.firstChild)}}}),t.Nested=t.invent({create:function(){this.constructor.call(this,t.create("svg")),this.style("overflow","visible")},inherit:t.Container,construct:{nested:function(){return this.put(new t.Nested)}}});var n={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(l,u){return u=="color"?l:l+"-"+u}};function o(l,u,m,A){return m+A.replace(t.regex.dots," .")}function h(l){return l.toLowerCase().replace(/-(.)/g,function(u,m){return m.toUpperCase()})}function c(l){return l.charAt(0).toUpperCase()+l.slice(1)}function d(l){var u=l.toString(16);return u.length==1?"0"+u:u}function g(l,u,m){if(u==null||m==null){var A=l.bbox();u==null?u=A.width/A.height*m:m==null&&(m=A.height/A.width*u)}return{width:u,height:m}}function f(l,u,m){return{x:u*l.a+m*l.c+0,y:u*l.b+m*l.d+0}}function x(l){return{a:l[0],b:l[1],c:l[2],d:l[3],e:l[4],f:l[5]}}function b(l){for(var u=l.childNodes.length-1;u>=0;u--)l.childNodes[u]instanceof p.SVGElement&&b(l.childNodes[u]);return t.adopt(l).id(t.eid(l.nodeName))}function v(l){return Math.abs(l)>1e-37?l:0}["fill","stroke"].forEach(function(l){var u={};u[l]=function(m){if(m===void 0)return this;if(typeof m=="string"||t.Color.isRgb(m)||m&&typeof m.fill=="function")this.attr(l,m);else for(var A=n[l].length-1;A>=0;A--)m[n[l][A]]!=null&&this.attr(n.prefix(l,n[l][A]),m[n[l][A]]);return this},t.extend(t.Element,t.FX,u)}),t.extend(t.Element,t.FX,{translate:function(l,u){return this.transform({x:l,y:u})},matrix:function(l){return this.attr("transform",new t.Matrix(arguments.length==6?[].slice.call(arguments):l))},opacity:function(l){return this.attr("opacity",l)},dx:function(l){return this.x(new t.Number(l).plus(this instanceof t.FX?0:this.x()),!0)},dy:function(l){return this.y(new t.Number(l).plus(this instanceof t.FX?0:this.y()),!0)}}),t.extend(t.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(l){return this.node.getPointAtLength(l)}}),t.Set=t.invent({create:function(l){Array.isArray(l)?this.members=l:this.clear()},extend:{add:function(){for(var l=[].slice.call(arguments),u=0,m=l.length;u<m;u++)this.members.push(l[u]);return this},remove:function(l){var u=this.index(l);return u>-1&&this.members.splice(u,1),this},each:function(l){for(var u=0,m=this.members.length;u<m;u++)l.apply(this.members[u],[u,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(l){return this.index(l)>=0},index:function(l){return this.members.indexOf(l)},get:function(l){return this.members[l]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(l){return new t.Set(l)}}}),t.FX.Set=t.invent({create:function(l){this.set=l}}),t.Set.inherit=function(){var l=[];for(var u in t.Shape.prototype)typeof t.Shape.prototype[u]=="function"&&typeof t.Set.prototype[u]!="function"&&l.push(u);for(var u in l.forEach(function(A){t.Set.prototype[A]=function(){for(var k=0,S=this.members.length;k<S;k++)this.members[k]&&typeof this.members[k][A]=="function"&&this.members[k][A].apply(this.members[k],arguments);return A=="animate"?this.fx||(this.fx=new t.FX.Set(this)):this}}),l=[],t.FX.prototype)typeof t.FX.prototype[u]=="function"&&typeof t.FX.Set.prototype[u]!="function"&&l.push(u);l.forEach(function(m){t.FX.Set.prototype[m]=function(){for(var A=0,k=this.set.members.length;A<k;A++)this.set.members[A].fx[m].apply(this.set.members[A].fx,arguments);return this}})},t.extend(t.Element,{}),t.extend(t.Element,{remember:function(l,u){if(J(arguments[0])==="object")for(var m in l)this.remember(m,l[m]);else{if(arguments.length==1)return this.memory()[l];this.memory()[l]=u}return this},forget:function(){if(arguments.length==0)this._memory={};else for(var l=arguments.length-1;l>=0;l--)delete this.memory()[arguments[l]];return this},memory:function(){return this._memory||(this._memory={})}}),t.get=function(l){var u=e.getElementById(function(m){var A=(m||"").toString().match(t.regex.reference);if(A)return A[1]}(l)||l);return t.adopt(u)},t.select=function(l,u){return new t.Set(t.utils.map((u||e).querySelectorAll(l),function(m){return t.adopt(m)}))},t.extend(t.Parent,{select:function(l){return t.select(l,this.node)}});var y="abcdef".split("");if(typeof p.CustomEvent!="function"){var w=function(l,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var m=e.createEvent("CustomEvent");return m.initCustomEvent(l,u.bubbles,u.cancelable,u.detail),m};w.prototype=p.Event.prototype,t.CustomEvent=w}else t.CustomEvent=p.CustomEvent;return t},typeof define=="function"&&define.amd?define(function(){return Ce(he,he.document)}):(typeof ot>"u"?"undefined":J(ot))==="object"&&typeof We<"u"?We.exports=he.document?Ce(he,he.document):function(p){return Ce(p,p.document)}:he.SVG=Ce(he,he.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(r,n){return this.add(r,n),!r.attr("in")&&this.autoSetIn&&r.attr("in",this.source),r.attr("result")||r.attr("result",r),r},blend:function(r,n,o){return this.put(new SVG.BlendEffect(r,n,o))},colorMatrix:function(r,n){return this.put(new SVG.ColorMatrixEffect(r,n))},convolveMatrix:function(r){return this.put(new SVG.ConvolveMatrixEffect(r))},componentTransfer:function(r){return this.put(new SVG.ComponentTransferEffect(r))},composite:function(r,n,o){return this.put(new SVG.CompositeEffect(r,n,o))},flood:function(r,n){return this.put(new SVG.FloodEffect(r,n))},offset:function(r,n){return this.put(new SVG.OffsetEffect(r,n))},image:function(r){return this.put(new SVG.ImageEffect(r))},merge:function(){var r=[void 0];for(var n in arguments)r.push(arguments[n]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,r)))},gaussianBlur:function(r,n){return this.put(new SVG.GaussianBlurEffect(r,n))},morphology:function(r,n){return this.put(new SVG.MorphologyEffect(r,n))},diffuseLighting:function(r,n,o){return this.put(new SVG.DiffuseLightingEffect(r,n,o))},displacementMap:function(r,n,o,h,c){return this.put(new SVG.DisplacementMapEffect(r,n,o,h,c))},specularLighting:function(r,n,o,h){return this.put(new SVG.SpecularLightingEffect(r,n,o,h))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(r,n,o,h,c){return this.put(new SVG.TurbulenceEffect(r,n,o,h,c))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(r){var n=this.put(new SVG.Filter);return typeof r=="function"&&r.call(n,n),n}}),SVG.extend(SVG.Container,{filter:function(r){return this.defs().filter(r)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(r){return this.filterer=r instanceof SVG.Element?r:this.doc().filter(r),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(r){return this.filterer&&r===!0&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){return r==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return r==null?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(r){return r==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return r==null?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}});var p={blend:function(r,n){return this.parent()&&this.parent().blend(this,r,n)},colorMatrix:function(r,n){return this.parent()&&this.parent().colorMatrix(r,n).in(this)},convolveMatrix:function(r){return this.parent()&&this.parent().convolveMatrix(r).in(this)},componentTransfer:function(r){return this.parent()&&this.parent().componentTransfer(r).in(this)},composite:function(r,n){return this.parent()&&this.parent().composite(this,r,n)},flood:function(r,n){return this.parent()&&this.parent().flood(r,n)},offset:function(r,n){return this.parent()&&this.parent().offset(r,n).in(this)},image:function(r){return this.parent()&&this.parent().image(r)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(r,n){return this.parent()&&this.parent().gaussianBlur(r,n).in(this)},morphology:function(r,n){return this.parent()&&this.parent().morphology(r,n).in(this)},diffuseLighting:function(r,n,o){return this.parent()&&this.parent().diffuseLighting(r,n,o).in(this)},displacementMap:function(r,n,o,h){return this.parent()&&this.parent().displacementMap(this,r,n,o,h)},specularLighting:function(r,n,o,h){return this.parent()&&this.parent().specularLighting(r,n,o,h).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(r,n,o,h,c){return this.parent()&&this.parent().turbulence(r,n,o,h,c).in(this)}};SVG.extend(SVG.Effect,p),SVG.extend(SVG.ParentEffect,p),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){this.attr("in",r)}}});var e={blend:function(r,n,o){this.attr({in:r,in2:n,mode:o||"normal"})},colorMatrix:function(r,n){r=="matrix"&&(n=a(n)),this.attr({type:r,values:n===void 0?null:n})},convolveMatrix:function(r){r=a(r),this.attr({order:Math.sqrt(r.split(" ").length),kernelMatrix:r})},composite:function(r,n,o){this.attr({in:r,in2:n,operator:o})},flood:function(r,n){this.attr("flood-color",r),n!=null&&this.attr("flood-opacity",n)},offset:function(r,n){this.attr({dx:r,dy:n})},image:function(r){this.attr("href",r,SVG.xlink)},displacementMap:function(r,n,o,h,c){this.attr({in:r,in2:n,scale:o,xChannelSelector:h,yChannelSelector:c})},gaussianBlur:function(r,n){r!=null||n!=null?this.attr("stdDeviation",function(o){if(!Array.isArray(o))return o;for(var h=0,c=o.length,d=[];h<c;h++)d.push(o[h]);return d.join(" ")}(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(r,n){this.attr({operator:r,radius:n})},tile:function(){},turbulence:function(r,n,o,h,c){this.attr({numOctaves:n,seed:o,stitchTiles:h,baseFrequency:r,type:c})}},t={merge:function(){var r;if(arguments[0]instanceof SVG.Set){var n=this;arguments[0].each(function(h){this instanceof SVG.MergeNode?n.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&n.put(new SVG.MergeNode(this))})}else{r=Array.isArray(arguments[0])?arguments[0]:arguments;for(var o=0;o<r.length;o++)r[o]instanceof SVG.MergeNode?this.put(r[o]):this.put(new SVG.MergeNode(r[o]))}},componentTransfer:function(r){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(o){this[o]=new SVG["Func"+o.toUpperCase()]("identity"),this.rgb.add(this[o]),this.node.appendChild(this[o].node)}.bind(this)),r)for(var n in r.rgb&&(["r","g","b"].forEach(function(o){this[o].attr(r.rgb)}.bind(this)),delete r.rgb),r)this[n].attr(r[n])},diffuseLighting:function(r,n,o){this.attr({surfaceScale:r,diffuseConstant:n,kernelUnitLength:o})},specularLighting:function(r,n,o,h){this.attr({surfaceScale:r,diffuseConstant:n,specularExponent:o,kernelUnitLength:h})}},i={distantLight:function(r,n){this.attr({azimuth:r,elevation:n})},pointLight:function(r,n,o){this.attr({x:r,y:n,z:o})},spotLight:function(r,n,o,h,c,d){this.attr({x:r,y:n,z:o,pointsAtX:h,pointsAtY:c,pointsAtZ:d})},mergeNode:function(r){this.attr("in",r)}};function a(r){return Array.isArray(r)&&(r=new SVG.Array(r)),r.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function s(){var r=function(){};for(var n in typeof arguments[arguments.length-1]=="function"&&(r=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var o in arguments[n])r(arguments[n][o],o,arguments[n])}["r","g","b","a"].forEach(function(r){i["Func"+r.toUpperCase()]=function(n){switch(this.attr("type",n),n){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}}),s(e,function(r,n){var o=n.charAt(0).toUpperCase()+n.slice(1);SVG[o+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+o)),r.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})}),s(t,function(r,n){var o=n.charAt(0).toUpperCase()+n.slice(1);SVG[o+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+o)),r.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})}),s(i,function(r,n){var o=n.charAt(0).toUpperCase()+n.slice(1);SVG[o]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+o)),r.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})}),SVG.extend(SVG.MergeEffect,{in:function(r){return r instanceof SVG.MergeNode?this.add(r,0):this.add(new SVG.MergeNode(r),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(r){return r==null?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",r)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function p(s,r,n,o,h,c,d){for(var g=s.slice(r,n||d),f=o.slice(h,c||d),x=0,b={pos:[0,0],start:[0,0]},v={pos:[0,0],start:[0,0]};g[x]=e.call(b,g[x]),f[x]=e.call(v,f[x]),g[x][0]!=f[x][0]||g[x][0]=="M"||g[x][0]=="A"&&(g[x][4]!=f[x][4]||g[x][5]!=f[x][5])?(Array.prototype.splice.apply(g,[x,1].concat(i.call(b,g[x]))),Array.prototype.splice.apply(f,[x,1].concat(i.call(v,f[x])))):(g[x]=t.call(b,g[x]),f[x]=t.call(v,f[x])),!(++x==g.length&&x==f.length);)x==g.length&&g.push(["C",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.pos[1]]),x==f.length&&f.push(["C",v.pos[0],v.pos[1],v.pos[0],v.pos[1],v.pos[0],v.pos[1]]);return{start:g,dest:f}}function e(s){switch(s[0]){case"z":case"Z":s[0]="L",s[1]=this.start[0],s[2]=this.start[1];break;case"H":s[0]="L",s[2]=this.pos[1];break;case"V":s[0]="L",s[2]=s[1],s[1]=this.pos[0];break;case"T":s[0]="Q",s[3]=s[1],s[4]=s[2],s[1]=this.reflection[1],s[2]=this.reflection[0];break;case"S":s[0]="C",s[6]=s[4],s[5]=s[3],s[4]=s[2],s[3]=s[1],s[2]=this.reflection[1],s[1]=this.reflection[0]}return s}function t(s){var r=s.length;return this.pos=[s[r-2],s[r-1]],"SCQT".indexOf(s[0])!=-1&&(this.reflection=[2*this.pos[0]-s[r-4],2*this.pos[1]-s[r-3]]),s}function i(s){var r=[s];switch(s[0]){case"M":return this.pos=this.start=[s[1],s[2]],r;case"L":s[5]=s[3]=s[1],s[6]=s[4]=s[2],s[1]=this.pos[0],s[2]=this.pos[1];break;case"Q":s[6]=s[4],s[5]=s[3],s[4]=1*s[4]/3+2*s[2]/3,s[3]=1*s[3]/3+2*s[1]/3,s[2]=1*this.pos[1]/3+2*s[2]/3,s[1]=1*this.pos[0]/3+2*s[1]/3;break;case"A":r=function(n,o){var h,c,d,g,f,x,b,v,y,w,l,u,m,A,k,S,L,C,I,z,M,T,E,O,D,H,W=Math.abs(o[1]),N=Math.abs(o[2]),B=o[3]%360,q=o[4],Z=o[5],j=o[6],se=o[7],V=new SVG.Point(n),G=new SVG.Point(j,se),_=[];if(W===0||N===0||V.x===G.x&&V.y===G.y)return[["C",V.x,V.y,G.x,G.y,G.x,G.y]];for(h=new SVG.Point((V.x-G.x)/2,(V.y-G.y)/2).transform(new SVG.Matrix().rotate(B)),(c=h.x*h.x/(W*W)+h.y*h.y/(N*N))>1&&(W*=c=Math.sqrt(c),N*=c),d=new SVG.Matrix().rotate(B).scale(1/W,1/N).rotate(-B),V=V.transform(d),G=G.transform(d),g=[G.x-V.x,G.y-V.y],x=g[0]*g[0]+g[1]*g[1],f=Math.sqrt(x),g[0]/=f,g[1]/=f,b=x<4?Math.sqrt(1-x/4):0,q===Z&&(b*=-1),v=new SVG.Point((G.x+V.x)/2+b*-g[1],(G.y+V.y)/2+b*g[0]),y=new SVG.Point(V.x-v.x,V.y-v.y),w=new SVG.Point(G.x-v.x,G.y-v.y),l=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(l*=-1),u=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(u*=-1),Z&&l>u&&(u+=2*Math.PI),!Z&&l<u&&(u-=2*Math.PI),A=Math.ceil(2*Math.abs(l-u)/Math.PI),S=[],L=l,m=(u-l)/A,k=4*Math.tan(m/4)/3,M=0;M<=A;M++)I=Math.cos(L),C=Math.sin(L),z=new SVG.Point(v.x+I,v.y+C),S[M]=[new SVG.Point(z.x+k*C,z.y-k*I),z,new SVG.Point(z.x-k*C,z.y+k*I)],L+=m;for(S[0][0]=S[0][1].clone(),S[S.length-1][2]=S[S.length-1][1].clone(),d=new SVG.Matrix().rotate(B).scale(W,N).rotate(-B),M=0,T=S.length;M<T;M++)S[M][0]=S[M][0].transform(d),S[M][1]=S[M][1].transform(d),S[M][2]=S[M][2].transform(d);for(M=1,T=S.length;M<T;M++)E=(z=S[M-1][2]).x,O=z.y,D=(z=S[M][0]).x,H=z.y,j=(z=S[M][1]).x,se=z.y,_.push(["C",E,O,D,H,j,se]);return _}(this.pos,s),s=r[0]}return s[0]="C",this.pos=[s[5],s[6]],this.reflection=[2*s[5]-s[3],2*s[6]-s[4]],r}function a(s,r){if(r===!1)return!1;for(var n=r,o=s.length;n<o;++n)if(s[n][0]=="M")return n;return!1}SVG.extend(SVG.PathArray,{morph:function(s){for(var r=this.value,n=this.parse(s),o=0,h=0,c=!1,d=!1;o!==!1||h!==!1;){var g;c=a(r,o!==!1&&o+1),d=a(n,h!==!1&&h+1),o===!1&&(o=(g=new SVG.PathArray(f.start).bbox()).height==0||g.width==0?r.push(r[0])-1:r.push(["M",g.x+g.width/2,g.y+g.height/2])-1),h===!1&&(h=(g=new SVG.PathArray(f.dest).bbox()).height==0||g.width==0?n.push(n[0])-1:n.push(["M",g.x+g.width/2,g.y+g.height/2])-1);var f=p(r,o,c,n,h,d);r=r.slice(0,o).concat(f.start,c===!1?[]:r.slice(c)),n=n.slice(0,h).concat(f.dest,d===!1?[]:n.slice(d)),o=c!==!1&&o+f.start.length,h=d!==!1&&h+f.dest.length}return this.value=r,this.destination=new SVG.PathArray,this.destination.value=n,this}})}(),function(){function p(e){e.remember("_draggable",this),this.el=e}p.prototype.init=function(e,t){var i=this;this.constraint=e,this.value=t,this.el.on("mousedown.drag",function(a){i.start(a)}),this.el.on("touchstart.drag",function(a){i.start(a)})},p.prototype.transformPoint=function(e,t){var i=(e=e||window.event).changedTouches&&e.changedTouches[0]||e;return this.p.x=i.clientX-(t||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},p.prototype.getBBox=function(){var e=this.el.bbox();return this.el instanceof SVG.Nested&&(e=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(e.x=this.el.x(),e.y=this.el.y()),e},p.prototype.start=function(e){if(e.type!="click"&&e.type!="mousedown"&&e.type!="mousemove"||(e.which||e.buttons)==1){var t=this;if(this.el.fire("beforedrag",{event:e,handler:this}),!this.el.event().defaultPrevented){e.preventDefault(),e.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,a=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(e,i),box:a,transform:this.el.transform()},SVG.on(window,"mousemove.drag",function(s){t.drag(s)}),SVG.on(window,"touchmove.drag",function(s){t.drag(s)}),SVG.on(window,"mouseup.drag",function(s){t.end(s)}),SVG.on(window,"touchend.drag",function(s){t.end(s)}),this.el.fire("dragstart",{event:e,p:this.startPoints.point,m:this.m,handler:this})}}},p.prototype.drag=function(e){var t=this.getBBox(),i=this.transformPoint(e),a=this.startPoints.box.x+i.x-this.startPoints.point.x,s=this.startPoints.box.y+i.y-this.startPoints.point.y,r=this.constraint,n=i.x-this.startPoints.point.x,o=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:e,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if(typeof r=="function"){var h=r.call(this.el,a,s,this.m);typeof h=="boolean"&&(h={x:h,y:h}),h.x===!0?this.el.x(a):h.x!==!1&&this.el.x(h.x),h.y===!0?this.el.y(s):h.y!==!1&&this.el.y(h.y)}else typeof r=="object"&&(r.minX!=null&&a<r.minX?n=(a=r.minX)-this.startPoints.box.x:r.maxX!=null&&a>r.maxX-t.width&&(n=(a=r.maxX-t.width)-this.startPoints.box.x),r.minY!=null&&s<r.minY?o=(s=r.minY)-this.startPoints.box.y:r.maxY!=null&&s>r.maxY-t.height&&(o=(s=r.maxY-t.height)-this.startPoints.box.y),r.snapToGrid!=null&&(a-=a%r.snapToGrid,s-=s%r.snapToGrid,n-=n%r.snapToGrid,o-=o%r.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:n,y:o},!0):this.el.move(a,s));return i},p.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,t){typeof e!="function"&&typeof e!="object"||(t=e,e=!0);var i=this.remember("_draggable")||new p(this);return(e=e===void 0||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function p(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,i,a){var s=typeof t!="string"?t:i[t];return a?s/2:s},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,t==="t"||t==="b"),y:this.pointCoord(a[1],i,t==="r"||t==="l")}}}p.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var s in this.el.selectize.defaults)this.options[s]=this.el.selectize.defaults[s],t[s]!==void 0&&(this.options[s]=t[s]);var r=["points","pointsExclude"];for(var s in r){var n=this.options[r[s]];typeof n=="string"?n=n.length>0?n.split(/\s*,\s*/i):[]:typeof n=="boolean"&&r[s]==="points"&&(n=n?a:[]),this.options[r[s]]=n}this.options.points=[a,this.options.points].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&["line","polyline","polygon"].indexOf(this.el.type)!==-1?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},p.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},p.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map(function(t){return[t[0]-e.x,t[1]-e.y]})},p.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i<a;++i){var s=function(n){return function(o){(o=o||window.event).preventDefault?o.preventDefault():o.returnValue=!1,o.stopPropagation();var h=o.pageX||o.touches[0].pageX,c=o.pageY||o.touches[0].pageY;e.el.fire("point",{x:h,y:c,i:n,event:o})}}(i),r=this.drawPoint(t[i][0],t[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",s).on("mousedown",s);this.pointSelection.set.add(r)}},p.prototype.drawPoint=function(e,t){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(e,t);case"rect":return this.drawRect(e,t);default:if(typeof i=="function")return i.call(this,e,t);throw new Error("Unknown "+i+" point type!")}},p.prototype.drawCircle=function(e,t){return this.nested.circle(this.options.pointSize).center(e,t)},p.prototype.drawRect=function(e,t){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(e,t)},p.prototype.updatePointSelection=function(){var e=this.getPointArray();this.pointSelection.set.each(function(t){this.cx()===e[t][0]&&this.cy()===e[t][1]||this.center(e[t][0],e[t][1])})},p.prototype.updateRectSelection=function(){var e=this,t=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points.length&&this.options.points.map(function(a,s){var r=e.pointCoords(a,t);e.rectSelection.set.get(s+1).center(r.x,r.y)}),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(t.width/2,20)}},p.prototype.selectRect=function(e){var t=this,i=this.el.bbox();function a(n){return function(o){(o=o||window.event).preventDefault?o.preventDefault():o.returnValue=!1,o.stopPropagation();var h=o.pageX||o.touches[0].pageX,c=o.pageY||o.touches[0].pageY;t.el.fire(n,{x:h,y:c,event:o})}}if(this.rectSelection.isSelected=e,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map(function(n,o){var h=t.pointCoords(n,i),c=t.drawPoint(h.x,h.y).attr("class",t.options.classPoints+"_"+n).on("mousedown",a(n)).on("touchstart",a(n));t.rectSelection.set.add(c)}),this.rectSelection.set.each(function(){this.addClass(t.options.classPoints)})),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var s=function(n){(n=n||window.event).preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation();var o=n.pageX||n.touches[0].pageX,h=n.pageY||n.touches[0].pageY;t.el.fire("rot",{x:o,y:h,event:n})},r=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",s).on("mousedown",s);this.rectSelection.set.add(r)}},p.prototype.handler=function(){var e=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(e.x,e.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},p.prototype.observe=function(){var e=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver(function(){e.handler()}),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch{}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",function(){e.handler()})},p.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each(function(){this.remove()}),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each(function(){this.remove()}),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,t){return typeof e=="object"&&(t=e,e=!0),(this.remember("_selectHandler")||new p(this)).init(e===void 0||e,t||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function p(e){e.remember("_resizeHandler",this),this.el=e,this.parameters={},this.lastUpdateCall=null,this.p=e.doc().node.createSVGPoint()}p.prototype.transformPoint=function(e,t,i){return this.p.x=e-(this.offset.x-window.pageXOffset),this.p.y=t-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},p.prototype._extractPosition=function(e){return{x:e.clientX!=null?e.clientX:e.touches[0].clientX,y:e.clientY!=null?e.clientY:e.touches[0].clientY}},p.prototype.init=function(e){var t=this;if(this.stop(),e!=="stop"){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],e[i]!==void 0&&(this.options[i]=e[i]);this.el.on("lt.resize",function(a){t.resize(a||window.event)}),this.el.on("rt.resize",function(a){t.resize(a||window.event)}),this.el.on("rb.resize",function(a){t.resize(a||window.event)}),this.el.on("lb.resize",function(a){t.resize(a||window.event)}),this.el.on("t.resize",function(a){t.resize(a||window.event)}),this.el.on("r.resize",function(a){t.resize(a||window.event)}),this.el.on("b.resize",function(a){t.resize(a||window.event)}),this.el.on("l.resize",function(a){t.resize(a||window.event)}),this.el.on("rot.resize",function(a){t.resize(a||window.event)}),this.el.on("point.resize",function(a){t.resize(a||window.event)}),this.update()}},p.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},p.prototype.resize=function(e){var t=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(e.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:e.detail.x,y:e.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},this.el.type==="text"&&(this.parameters.fontSize=this.el.attr()["font-size"]),e.detail.i!==void 0){var a=this.el.array().valueOf();this.parameters.i=e.detail.i,this.parameters.pointCoords=[a[e.detail.i][0],a[e.detail.i][1]]}switch(e.type){case"lt":this.calc=function(s,r){var n=this.snapToGrid(s,r);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height-n[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(s,r){var n=this.snapToGrid(s,r,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(s,r){var n=this.snapToGrid(s,r,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(s,r){var n=this.snapToGrid(s,r,2);if(this.parameters.box.height-n[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.width+n[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(s,r){var n=this.snapToGrid(s,r,0);if(this.parameters.box.height+n[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(s,r){var n=this.snapToGrid(s,r,1);if(this.parameters.box.width-n[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(s,r){var n=s+this.parameters.p.x,o=r+this.parameters.p.y,h=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),c=Math.atan2(o-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),d=this.parameters.rotation+180*(c-h)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(d-d%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(s,r){var n=this.snapToGrid(s,r,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),o=this.el.array().valueOf();o[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],o[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(o)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},p.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),a=i.x-this.parameters.p.x,s=i.y-this.parameters.p.y;this.lastUpdateCall=[a,s],this.calc(a,s),this.el.fire("resizing",{dx:a,dy:s,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},p.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},p.prototype.snapToGrid=function(e,t,i,a){var s;return a!==void 0?s=[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:(i=i??3,s=[(this.parameters.box.x+e+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),e<0&&(s[0]-=this.options.snapToGrid),t<0&&(s[1]-=this.options.snapToGrid),e-=Math.abs(s[0])<this.options.snapToGrid/2?s[0]:s[0]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),t-=Math.abs(s[1])<this.options.snapToGrid/2?s[1]:s[1]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(e,t,i,a)},p.prototype.constraintToBox=function(e,t,i,a){var s,r,n=this.options.constraint||{};return a!==void 0?(s=i,r=a):(s=this.parameters.box.x+(1&i?0:this.parameters.box.width),r=this.parameters.box.y+(2&i?0:this.parameters.box.height)),n.minX!==void 0&&s+e<n.minX&&(e=n.minX-s),n.maxX!==void 0&&s+e>n.maxX&&(e=n.maxX-s),n.minY!==void 0&&r+t<n.minY&&(t=n.minY-r),n.maxY!==void 0&&r+t>n.maxY&&(t=n.maxY-r),[e,t]},p.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,s=this.parameters.box.width+e[0],r=this.parameters.box.height-e[1],n=s/r;return n<a?(i[1]=s/a-this.parameters.box.height,t&&(i[1]=-i[1])):n>a&&(i[0]=this.parameters.box.width-r*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new p(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),window.Apex===void 0&&(window.Apex={});var Ct=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new ve(this.ctx),this.ctx.axes=new Hi(this.ctx),this.ctx.core=new ga(this.ctx.el,this.ctx),this.ctx.config=new Pe({}),this.ctx.data=new Ft(this.ctx),this.ctx.grid=new Rt(this.ctx),this.ctx.graphics=new X(this.ctx),this.ctx.coreUtils=new $(this.ctx),this.ctx.crosshairs=new nt(this.ctx),this.ctx.events=new Oi(this.ctx),this.ctx.exports=new He(this.ctx),this.ctx.fill=new ne(this.ctx),this.ctx.localization=new Di(this.ctx),this.ctx.options=new ue,this.ctx.responsive=new Ni(this.ctx),this.ctx.series=new re(this.ctx),this.ctx.theme=new Wi(this.ctx),this.ctx.formatters=new ze(this.ctx),this.ctx.titleSubtitle=new Bi(this.ctx),this.ctx.legend=new Dt(this.ctx),this.ctx.toolbar=new Ht(this.ctx),this.ctx.tooltip=new At(this.ctx),this.ctx.dimensions=new Ne(this.ctx),this.ctx.updateHelpers=new ua(this.ctx),this.ctx.zoomPanSelection=new qi(this.ctx),this.ctx.w.globals.tooltip=new At(this.ctx)}}]),p}(),Lt=function(){function p(e){F(this,p),this.ctx=e,this.w=e.w}return R(p,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),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.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(t,i){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,i=e.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!i&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach(function(n){s.removeEventListener(n,t.ctx.events.documentEvent)});var r=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),p}(),it=new WeakMap,fa=function(){function p(e,t){F(this,p),this.opts=t,this.ctx=this,this.w=new Ri(t).init(),this.el=e,this.w.globals.cuid=P.randomId(),this.w.globals.chartID=this.w.config.chart.id?P.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Ct(this).initModules(),this.create=P.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return R(p,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(e.el!==null){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;typeof a=="function"&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(g,f){var x=!1;if(g.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var b=g.getBoundingClientRect();g.style.display!=="none"&&b.width!==0||(x=!0)}var v=new ResizeObserver(function(y){x&&f.call(g,y),x=!0});g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(g.children).forEach(function(y){return v.observe(y)}):v.observe(g),it.set(f,v)}(e.el.parentNode,e.parentResizeHandler);var s=e.el.getRootNode&&e.el.getRootNode(),r=P.is("ShadowRoot",s),n=e.el.ownerDocument,o=r?s.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!o){var h;(o=document.createElement("style")).id="apexcharts-css",o.textContent=`@keyframes opaque {
0% {
opacity: 0
}
to {
opacity: 1
}
}
@keyframes resizeanim {
0%,
to {
opacity: 0
}
}
.apexcharts-canvas {
position: relative;
user-select: none
}
.apexcharts-canvas ::-webkit-scrollbar {
-webkit-appearance: none;
width: 6px
}
.apexcharts-canvas ::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}
.apexcharts-inner {
position: relative
}
.apexcharts-text tspan {
font-family: inherit
}
rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
transition: .15s ease all;
opacity: .2
}
.apexcharts-legend-text {
padding-left: 15px;
margin-left: -15px;
}
.apexcharts-series-collapsed {
opacity: 0
}
.apexcharts-tooltip {
border-radius: 5px;
box-shadow: 2px 2px 6px -4px #999;
cursor: default;
font-size: 14px;
left: 62px;
opacity: 0;
pointer-events: none;
position: absolute;
top: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
white-space: nowrap;
z-index: 12;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-theme-light {
border: 1px solid #e3e3e3;
background: rgba(255, 255, 255, .96)
}
.apexcharts-tooltip.apexcharts-theme-dark {
color: #fff;
background: rgba(30, 30, 30, .8)
}
.apexcharts-tooltip * {
font-family: inherit
}
.apexcharts-tooltip-title {
padding: 6px;
font-size: 15px;
margin-bottom: 4px
}
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
background: #eceff1;
border-bottom: 1px solid #ddd
}
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
background: rgba(0, 0, 0, .7);
border-bottom: 1px solid #333
}
.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
display: inline-block;
margin-left: 5px;
font-weight: 600
}
.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
display: none
}
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
padding: 6px 0 5px
}
.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
display: flex
}
.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
margin-top: -6px
}
.apexcharts-tooltip-marker {
width: 12px;
height: 12px;
position: relative;
top: 0;
margin-right: 10px;
border-radius: 50%
}
.apexcharts-tooltip-series-group {
padding: 0 10px;
display: none;
text-align: left;
justify-content: left;
align-items: center
}
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
opacity: 1
}
.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
padding-bottom: 4px
}
.apexcharts-tooltip-y-group {
padding: 6px 0 5px
}
.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
padding: 4px 8px
}
.apexcharts-tooltip-boxPlot {
display: flex;
flex-direction: column-reverse
}
.apexcharts-tooltip-box>div {
margin: 4px 0
}
.apexcharts-tooltip-box span.value {
font-weight: 700
}
.apexcharts-tooltip-rangebar {
padding: 5px 8px
}
.apexcharts-tooltip-rangebar .category {
font-weight: 600;
color: #777
}
.apexcharts-tooltip-rangebar .series-name {
font-weight: 700;
display: block;
margin-bottom: 5px
}
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
opacity: 0;
pointer-events: none;
color: #373d3f;
font-size: 13px;
text-align: center;
border-radius: 2px;
position: absolute;
z-index: 10;
background: #eceff1;
border: 1px solid #90a4ae
}
.apexcharts-xaxistooltip {
padding: 9px 10px;
transition: .15s ease all
}
.apexcharts-xaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-xaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-left: -6px
}
.apexcharts-xaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-left: -7px
}
.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
bottom: 100%
}
.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
top: 100%
}
.apexcharts-xaxistooltip-bottom:after {
border-bottom-color: #eceff1
}
.apexcharts-xaxistooltip-bottom:before {
border-bottom-color: #90a4ae
}
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
border-bottom-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip-top:after {
border-top-color: #eceff1
}
.apexcharts-xaxistooltip-top:before {
border-top-color: #90a4ae
}
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
border-top-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-yaxistooltip {
padding: 4px 10px
}
.apexcharts-yaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-yaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-top: -6px
}
.apexcharts-yaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-top: -7px
}
.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
left: 100%
}
.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
right: 100%
}
.apexcharts-yaxistooltip-left:after {
border-left-color: #eceff1
}
.apexcharts-yaxistooltip-left:before {
border-left-color: #90a4ae
}
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
border-left-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip-right:after {
border-right-color: #eceff1
}
.apexcharts-yaxistooltip-right:before {
border-right-color: #90a4ae
}
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
border-right-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip.apexcharts-active {
opacity: 1
}
.apexcharts-yaxistooltip-hidden {
display: none
}
.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
pointer-events: none;
opacity: 0;
transition: .15s ease all
}
.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-ycrosshairs-hidden {
opacity: 0
}
.apexcharts-selection-rect {
cursor: move
}
.svg_select_boundingRect,
.svg_select_points_rot {
pointer-events: none;
opacity: 0;
visibility: hidden
}
.apexcharts-selection-rect+g .svg_select_boundingRect,
.apexcharts-selection-rect+g .svg_select_points_rot {
opacity: 0;
visibility: hidden
}
.apexcharts-selection-rect+g .svg_select_points_l,
.apexcharts-selection-rect+g .svg_select_points_r {
cursor: ew-resize;
opacity: 1;
visibility: visible
}
.svg_select_points {
fill: #efefef;
stroke: #333;
rx: 2
}
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
cursor: crosshair
}
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
cursor: move
}
.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
cursor: pointer;
width: 20px;
height: 20px;
line-height: 24px;
color: #6e8192;
text-align: center
}
.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
fill: #6e8192
}
.apexcharts-selection-icon svg {
fill: #444;
transform: scale(.76)
}
.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
fill: #f3f4f5
}
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
fill: #008ffb
}
.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
fill: #333
}
.apexcharts-menu-icon,
.apexcharts-selection-icon {
position: relative
}
.apexcharts-reset-icon {
margin-left: 5px
}
.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
transform: scale(.85)
}
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
transform: scale(.7)
}
.apexcharts-zoomout-icon {
margin-right: 3px
}
.apexcharts-pan-icon {
transform: scale(.62);
position: relative;
left: 1px;
top: 0
}
.apexcharts-pan-icon svg {
fill: #fff;
stroke: #6e8192;
stroke-width: 2
}
.apexcharts-pan-icon.apexcharts-selected svg {
stroke: #008ffb
}
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
stroke: #333
}
.apexcharts-toolbar {
position: absolute;
z-index: 11;
max-width: 176px;
text-align: right;
border-radius: 3px;
padding: 0 6px 2px;
display: flex;
justify-content: space-between;
align-items: center
}
.apexcharts-menu {
background: #fff;
position: absolute;
top: 100%;
border: 1px solid #ddd;
border-radius: 3px;
padding: 3px;
right: 10px;
opacity: 0;
min-width: 110px;
transition: .15s ease all;
pointer-events: none
}
.apexcharts-menu.apexcharts-menu-open {
opacity: 1;
pointer-events: all;
transition: .15s ease all
}
.apexcharts-menu-item {
padding: 6px 7px;
font-size: 12px;
cursor: pointer
}
.apexcharts-theme-light .apexcharts-menu-item:hover {
background: #eee
}
.apexcharts-theme-dark .apexcharts-menu {
background: rgba(0, 0, 0, .7);
color: #fff
}
@media screen and (min-width:768px) {
.apexcharts-canvas:hover .apexcharts-toolbar {
opacity: 1
}
}
.apexcharts-canvas .apexcharts-element-hidden,
.apexcharts-datalabel.apexcharts-element-hidden,
.apexcharts-hide .apexcharts-series-points {
opacity: 0;
}
.apexcharts-hidden-element-shown {
opacity: 1;
transition: 0.25s ease all;
}
.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-datalabels,
.apexcharts-pie-label {
cursor: default;
pointer-events: none
}
.apexcharts-pie-label-delay {
opacity: 0;
animation-name: opaque;
animation-duration: .3s;
animation-fill-mode: forwards;
animation-timing-function: ease
}
.apexcharts-radialbar-label {
cursor: pointer;
}
.apexcharts-annotation-rect,
.apexcharts-area-series .apexcharts-area,
.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,
.apexcharts-gridline,
.apexcharts-line,
.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,
.apexcharts-point-annotation-label,
.apexcharts-radar-series path:not(.apexcharts-marker),
.apexcharts-radar-series polygon,
.apexcharts-toolbar svg,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-xaxis-annotation-label,
.apexcharts-yaxis-annotation-label,
.apexcharts-zoom-rect {
pointer-events: none
}
.apexcharts-tooltip-active .apexcharts-marker {
transition: .15s ease all
}
.resize-triggers {
animation: 1ms resizeanim;
visibility: hidden;
opacity: 0;
height: 100%;
width: 100%;
overflow: hidden
}
.contract-trigger:before,
.resize-triggers,
.resize-triggers>div {
content: " ";
display: block;
position: absolute;
top: 0;
left: 0
}
.resize-triggers>div {
height: 100%;
width: 100%;
background: #eee;
overflow: auto
}
.contract-trigger:before {
overflow: hidden;
width: 200%;
height: 200%
}
.apexcharts-bar-goals-markers {
pointer-events: none
}
.apexcharts-bar-shadows {
pointer-events: none
}
.apexcharts-rangebar-goals-markers {
pointer-events: none
}`;var c=((h=e.opts.chart)===null||h===void 0?void 0:h.nonce)||e.w.config.chart.nonce;c&&o.setAttribute("nonce",c),r?s.prepend(o):n.head.appendChild(o)}var d=e.create(e.w.config.series,{});if(!d)return t(e);e.mount(d).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(d)}).catch(function(g){i(g)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,t){var i=this,a=this.w;new Ct(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,this.responsive.checkResponsiveConfig(t),a.config.xaxis.convertedCatToNumeric&&new Le(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.el===null||(this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),s.svgWidth===0))return s.animationEnded=!0,null;var r=e;e.forEach(function(g,f){g.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});var n=$.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every(function(g){return g.data&&g.data.length===0});(r.length===0||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new ye(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new $(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var c=this.core.plotChartType(r,h),d=new be(this);return d.bringForward(),a.config.dataLabels.background.enabled&&d.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:c,xyRatios:h,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,a=i.w;return new Promise(function(s,r){if(i.el===null)return r(new Error("Not enough data to display or target element not found"));(t===null||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Rt(i);var n,o,h=i.grid.drawGrid();if(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),a.config.grid.position==="back"&&(h&&a.globals.dom.elGraphical.add(h.el),h!=null&&(n=h.elGridBorders)!==null&&n!==void 0&&n.node&&a.globals.dom.elGraphical.add(h.elGridBorders)),Array.isArray(t.elGraph))for(var c=0;c<t.elGraph.length;c++)a.globals.dom.elGraphical.add(t.elGraph[c]);else a.globals.dom.elGraphical.add(t.elGraph);a.config.grid.position==="front"&&(h&&a.globals.dom.elGraphical.add(h.el),h!=null&&(o=h.elGridBorders)!==null&&o!==void 0&&o.node&&a.globals.dom.elGraphical.add(h.elGridBorders)),a.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),a.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),a.config.chart.type!=="treemap"&&i.axes.drawAxis(a.config.chart.type,h);var d=new Me(e.ctx,h),g=new lt(e.ctx,h);if(h!==null&&(d.xAxisLabelCorrections(h.xAxisTickWidth),g.setYAxisTextAlignments(),a.config.yaxis.map(function(x,b){a.globals.ignoreYAxisIndexes.indexOf(b)===-1&&g.yAxisTitleRotate(b,x.opposite)})),i.annotations.drawAxesAnnotations(),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(t.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:t.xyRatios});else{var f=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(x){f[x]=!1})}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach(function(x){x.method(x.params,!1,x.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,e=this.parentResizeHandler,(t=it.get(e))&&(t.disconnect(),it.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,s){a.id===P.escapeString(i)&&Apex._chartInstances.splice(s,1)}),new Lt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],n=this.w;return n.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,h){return t.updateHelpers._extendSeries(o,h)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,s,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s<a.length;s++)if(e[s]!==null&&e[s]!==void 0)for(var r=0;r<e[s].data.length;r++)a[s].data.push(e[s].data[r]);return i.w.config.series=a,t&&(i.w.globals.initialSeries=P.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise(function(i,a){new Lt(t.ctx).clear({isUpdating:!0});var s=t.create(t.w.config.series,e);if(!s)return i(t);t.mount(s).then(function(){typeof t.w.config.chart.events.updated=="function"&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,i(t)}).catch(function(r){a(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach(function(i){t.push(i)})),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(t){if(t.group)return!0}).map(function(t){return e.w.config.chart.group===t.group?t.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,t,a)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,t,a)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,t,a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new rt(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new rt(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new He(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new He(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=P.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t<e.length;t++)new p(e[t],JSON.parse(e[t].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var a=null;if(i.publicMethods.indexOf(t)!==-1){for(var s=arguments.length,r=new Array(s>2?s-2:0),n=2;n<s;n++)r[n-2]=arguments[n];a=i[t].apply(i,r)}return a}}},{key:"merge",value:function(e,t){return P.extend(e,t)}}]),p}();We.exports=fa});var wi=yt((Xe,we)=>{var pa=200,ii="__lodash_hash_undefined__",xa=800,ba=16,ai=9007199254740991,si="[object Arguments]",ma="[object Array]",va="[object AsyncFunction]",ya="[object Boolean]",wa="[object Date]",ka="[object Error]",ri="[object Function]",Aa="[object GeneratorFunction]",Sa="[object Map]",Ca="[object Number]",La="[object Null]",ni="[object Object]",Pa="[object Proxy]",Ma="[object RegExp]",Ia="[object Set]",Ta="[object String]",za="[object Undefined]",Xa="[object WeakMap]",Ea="[object ArrayBuffer]",Ya="[object DataView]",Fa="[object Float32Array]",Ra="[object Float64Array]",Oa="[object Int8Array]",Da="[object Int16Array]",Ha="[object Int32Array]",Na="[object Uint8Array]",Wa="[object Uint8ClampedArray]",Ba="[object Uint16Array]",Ga="[object Uint32Array]",Va=/[\\^$.*+?()[\]{}|]/g,_a=/^\[object .+?Constructor\]$/,ja=/^(?:0|[1-9]\d*)$/,U={};U[Fa]=U[Ra]=U[Oa]=U[Da]=U[Ha]=U[Na]=U[Wa]=U[Ba]=U[Ga]=!0;U[si]=U[ma]=U[Ea]=U[ya]=U[Ya]=U[wa]=U[ka]=U[ri]=U[Sa]=U[Ca]=U[ni]=U[Ma]=U[Ia]=U[Ta]=U[Xa]=!1;var oi=typeof global=="object"&&global&&global.Object===Object&&global,Ua=typeof self=="object"&&self&&self.Object===Object&&self,Fe=oi||Ua||Function("return this")(),li=typeof Xe=="object"&&Xe&&!Xe.nodeType&&Xe,Ee=li&&typeof we=="object"&&we&&!we.nodeType&&we,hi=Ee&&Ee.exports===li,ht=hi&&oi.process,Ut=function(){try{var p=Ee&&Ee.require&&Ee.require("util").types;return p||ht&&ht.binding&&ht.binding("util")}catch{}}(),qt=Ut&&Ut.isTypedArray;function qa(p,e,t){switch(t.length){case 0:return p.call(e);case 1:return p.call(e,t[0]);case 2:return p.call(e,t[0],t[1]);case 3:return p.call(e,t[0],t[1],t[2])}return p.apply(e,t)}function Za(p,e){for(var t=-1,i=Array(p);++t<p;)i[t]=e(t);return i}function $a(p){return function(e){return p(e)}}function Ja(p,e){return p?.[e]}function Ka(p,e){return function(t){return p(e(t))}}var Qa=Array.prototype,es=Function.prototype,_e=Object.prototype,ct=Fe["__core-js_shared__"],je=es.toString,ce=_e.hasOwnProperty,Zt=function(){var p=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),ci=_e.toString,ts=je.call(Object),is=RegExp("^"+je.call(ce).replace(Va,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=hi?Fe.Buffer:void 0,$t=Fe.Symbol,Jt=Fe.Uint8Array,Kt=Ge?Ge.allocUnsafe:void 0,di=Ka(Object.getPrototypeOf,Object),Qt=Object.create,as=_e.propertyIsEnumerable,ss=Qa.splice,fe=$t?$t.toStringTag:void 0,Ve=function(){try{var p=xt(Object,"defineProperty");return p({},"",{}),p}catch{}}(),rs=Ge?Ge.isBuffer:void 0,ei=Math.max,ns=Date.now,gi=xt(Fe,"Map"),Ye=xt(Object,"create"),os=function(){function p(){}return function(e){if(!xe(e))return{};if(Qt)return Qt(e);p.prototype=e;var t=new p;return p.prototype=void 0,t}}();function pe(p){var e=-1,t=p==null?0:p.length;for(this.clear();++e<t;){var i=p[e];this.set(i[0],i[1])}}function ls(){this.__data__=Ye?Ye(null):{},this.size=0}function hs(p){var e=this.has(p)&&delete this.__data__[p];return this.size-=e?1:0,e}function cs(p){var e=this.__data__;if(Ye){var t=e[p];return t===ii?void 0:t}return ce.call(e,p)?e[p]:void 0}function ds(p){var e=this.__data__;return Ye?e[p]!==void 0:ce.call(e,p)}function gs(p,e){var t=this.__data__;return this.size+=this.has(p)?0:1,t[p]=Ye&&e===void 0?ii:e,this}pe.prototype.clear=ls;pe.prototype.delete=hs;pe.prototype.get=cs;pe.prototype.has=ds;pe.prototype.set=gs;function de(p){var e=-1,t=p==null?0:p.length;for(this.clear();++e<t;){var i=p[e];this.set(i[0],i[1])}}function us(){this.__data__=[],this.size=0}function fs(p){var e=this.__data__,t=Ue(e,p);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():ss.call(e,t,1),--this.size,!0}function ps(p){var e=this.__data__,t=Ue(e,p);return t<0?void 0:e[t][1]}function xs(p){return Ue(this.__data__,p)>-1}function bs(p,e){var t=this.__data__,i=Ue(t,p);return i<0?(++this.size,t.push([p,e])):t[i][1]=e,this}de.prototype.clear=us;de.prototype.delete=fs;de.prototype.get=ps;de.prototype.has=xs;de.prototype.set=bs;function ke(p){var e=-1,t=p==null?0:p.length;for(this.clear();++e<t;){var i=p[e];this.set(i[0],i[1])}}function ms(){this.size=0,this.__data__={hash:new pe,map:new(gi||de),string:new pe}}function vs(p){var e=Ze(this,p).delete(p);return this.size-=e?1:0,e}function ys(p){return Ze(this,p).get(p)}function ws(p){return Ze(this,p).has(p)}function ks(p,e){var t=Ze(this,p),i=t.size;return t.set(p,e),this.size+=t.size==i?0:1,this}ke.prototype.clear=ms;ke.prototype.delete=vs;ke.prototype.get=ys;ke.prototype.has=ws;ke.prototype.set=ks;function Ae(p){var e=this.__data__=new de(p);this.size=e.size}function As(){this.__data__=new de,this.size=0}function Ss(p){var e=this.__data__,t=e.delete(p);return this.size=e.size,t}function Cs(p){return this.__data__.get(p)}function Ls(p){return this.__data__.has(p)}function Ps(p,e){var t=this.__data__;if(t instanceof de){var i=t.__data__;if(!gi||i.length<pa-1)return i.push([p,e]),this.size=++t.size,this;t=this.__data__=new ke(i)}return t.set(p,e),this.size=t.size,this}Ae.prototype.clear=As;Ae.prototype.delete=Ss;Ae.prototype.get=Cs;Ae.prototype.has=Ls;Ae.prototype.set=Ps;function Ms(p,e){var t=ft(p),i=!t&&ut(p),a=!t&&!i&&xi(p),s=!t&&!i&&!a&&mi(p),r=t||i||a||s,n=r?Za(p.length,String):[],o=n.length;for(var h in p)(e||ce.call(p,h))&&!(r&&(h=="length"||a&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||fi(h,o)))&&n.push(h);return n}function dt(p,e,t){(t!==void 0&&!$e(p[e],t)||t===void 0&&!(e in p))&&pt(p,e,t)}function Is(p,e,t){var i=p[e];(!(ce.call(p,e)&&$e(i,t))||t===void 0&&!(e in p))&&pt(p,e,t)}function Ue(p,e){for(var t=p.length;t--;)if($e(p[t][0],e))return t;return-1}function pt(p,e,t){e=="__proto__"&&Ve?Ve(p,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):p[e]=t}var Ts=Gs();function qe(p){return p==null?p===void 0?za:La:fe&&fe in Object(p)?Vs(p):$s(p)}function ti(p){return Re(p)&&qe(p)==si}function zs(p){if(!xe(p)||qs(p))return!1;var e=mt(p)?is:_a;return e.test(er(p))}function Xs(p){return Re(p)&&bi(p.length)&&!!U[qe(p)]}function Es(p){if(!xe(p))return Zs(p);var e=pi(p),t=[];for(var i in p)i=="constructor"&&(e||!ce.call(p,i))||t.push(i);return t}function ui(p,e,t,i,a){p!==e&&Ts(e,function(s,r){if(a||(a=new Ae),xe(s))Ys(p,e,r,t,ui,i,a);else{var n=i?i(gt(p,r),s,r+"",p,e,a):void 0;n===void 0&&(n=s),dt(p,r,n)}},vi)}function Ys(p,e,t,i,a,s,r){var n=gt(p,t),o=gt(e,t),h=r.get(o);if(h){dt(p,t,h);return}var c=s?s(n,o,t+"",p,e,r):void 0,d=c===void 0;if(d){var g=ft(o),f=!g&&xi(o),x=!g&&!f&&mi(o);c=o,g||f||x?ft(n)?c=n:tr(n)?c=Ns(n):f?(d=!1,c=Os(o,!0)):x?(d=!1,c=Hs(o,!0)):c=[]:ir(o)||ut(o)?(c=n,ut(n)?c=ar(n):(!xe(n)||mt(n))&&(c=_s(o))):d=!1}d&&(r.set(o,c),a(c,o,i,s,r),r.delete(o)),dt(p,t,c)}function Fs(p,e){return Ks(Js(p,e,yi),p+"")}var Rs=Ve?function(p,e){return Ve(p,"toString",{configurable:!0,enumerable:!1,value:rr(e),writable:!0})}:yi;function Os(p,e){if(e)return p.slice();var t=p.length,i=Kt?Kt(t):new p.constructor(t);return p.copy(i),i}function Ds(p){var e=new p.constructor(p.byteLength);return new Jt(e).set(new Jt(p)),e}function Hs(p,e){var t=e?Ds(p.buffer):p.buffer;return new p.constructor(t,p.byteOffset,p.length)}function Ns(p,e){var t=-1,i=p.length;for(e||(e=Array(i));++t<i;)e[t]=p[t];return e}function Ws(p,e,t,i){var a=!t;t||(t={});for(var s=-1,r=e.length;++s<r;){var n=e[s],o=i?i(t[n],p[n],n,t,p):void 0;o===void 0&&(o=p[n]),a?pt(t,n,o):Is(t,n,o)}return t}function Bs(p){return Fs(function(e,t){var i=-1,a=t.length,s=a>1?t[a-1]:void 0,r=a>2?t[2]:void 0;for(s=p.length>3&&typeof s=="function"?(a--,s):void 0,r&&js(t[0],t[1],r)&&(s=a<3?void 0:s,a=1),e=Object(e);++i<a;){var n=t[i];n&&p(e,n,i,s)}return e})}function Gs(p){return function(e,t,i){for(var a=-1,s=Object(e),r=i(e),n=r.length;n--;){var o=r[p?n:++a];if(t(s[o],o,s)===!1)break}return e}}function Ze(p,e){var t=p.__data__;return Us(e)?t[typeof e=="string"?"string":"hash"]:t.map}function xt(p,e){var t=Ja(p,e);return zs(t)?t:void 0}function Vs(p){var e=ce.call(p,fe),t=p[fe];try{p[fe]=void 0;var i=!0}catch{}var a=ci.call(p);return i&&(e?p[fe]=t:delete p[fe]),a}function _s(p){return typeof p.constructor=="function"&&!pi(p)?os(di(p)):{}}function fi(p,e){var t=typeof p;return e=e??ai,!!e&&(t=="number"||t!="symbol"&&ja.test(p))&&p>-1&&p%1==0&&p<e}function js(p,e,t){if(!xe(t))return!1;var i=typeof e;return(i=="number"?bt(t)&&fi(e,t.length):i=="string"&&e in t)?$e(t[e],p):!1}function Us(p){var e=typeof p;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?p!=="__proto__":p===null}function qs(p){return!!Zt&&Zt in p}function pi(p){var e=p&&p.constructor,t=typeof e=="function"&&e.prototype||_e;return p===t}function Zs(p){var e=[];if(p!=null)for(var t in Object(p))e.push(t);return e}function $s(p){return ci.call(p)}function Js(p,e,t){return e=ei(e===void 0?p.length-1:e,0),function(){for(var i=arguments,a=-1,s=ei(i.length-e,0),r=Array(s);++a<s;)r[a]=i[e+a];a=-1;for(var n=Array(e+1);++a<e;)n[a]=i[a];return n[e]=t(r),qa(p,this,n)}}function gt(p,e){if(!(e==="constructor"&&typeof p[e]=="function")&&e!="__proto__")return p[e]}var Ks=Qs(Rs);function Qs(p){var e=0,t=0;return function(){var i=ns(),a=ba-(i-t);if(t=i,a>0){if(++e>=xa)return arguments[0]}else e=0;return p.apply(void 0,arguments)}}function er(p){if(p!=null){try{return je.call(p)}catch{}try{return p+""}catch{}}return""}function $e(p,e){return p===e||p!==p&&e!==e}var ut=ti(function(){return arguments}())?ti:function(p){return Re(p)&&ce.call(p,"callee")&&!as.call(p,"callee")},ft=Array.isArray;function bt(p){return p!=null&&bi(p.length)&&!mt(p)}function tr(p){return Re(p)&&bt(p)}var xi=rs||nr;function mt(p){if(!xe(p))return!1;var e=qe(p);return e==ri||e==Aa||e==va||e==Pa}function bi(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=ai}function xe(p){var e=typeof p;return p!=null&&(e=="object"||e=="function")}function Re(p){return p!=null&&typeof p=="object"}function ir(p){if(!Re(p)||qe(p)!=ni)return!1;var e=di(p);if(e===null)return!0;var t=ce.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&je.call(t)==ts}var mi=qt?$a(qt):Xs;function ar(p){return Ws(p,vi(p))}function vi(p){return bt(p)?Ms(p,!0):Es(p)}var sr=Bs(function(p,e,t){ui(p,e,t)});function rr(p){return function(){return p}}function yi(p){return p}function nr(){return!1}we.exports=sr});var Ai=zi(jt(),1),ki=wi();function or({options:p,chartId:e,theme:t,extraJsOptions:i}){return{chart:null,options:p,chartId:e,theme:t,extraJsOptions:i,init:function(){this.$wire.$on("updateOptions",({options:a})=>{a=ki(a,this.extraJsOptions),this.updateChart(a)}),Alpine.effect(()=>{let a=Alpine.store("theme");this.$nextTick(()=>{this.chart===null?this.initChart():this.updateChart({theme:{mode:a},chart:{background:"inherit"}})})})},initChart:function(){this.options.theme={mode:this.theme},this.options.chart.background="inherit",this.options=ki(this.options,this.extraJsOptions),this.chart=new Ai.default(document.querySelector(this.chartId),this.options),this.chart.render()},updateChart:function(a){this.chart.updateOptions(a,!1,!0,!0)}}}export{or as default};
/*! Bundled license information:
apexcharts/dist/apexcharts.common.js:
(*!
* ApexCharts v3.53.0
* (c) 2018-2024 ApexCharts
* Released under the MIT License.
*)
*/