"use strict";(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[550],{4550:(Le,Ne,ut)=>{var Pe;function Me(y,e){(null==e||e>y.length)&&(e=y.length);for(var t=0,i=Array(e);t>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-s)*r)+s)+256*(Math.round((a-n)*r)+n)+(Math.round((a-o)*r)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return y.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&&"object"===J(e)&&!Array.isArray(e)&&null!=e}},{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;t1&&void 0!==arguments[1]?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(1===t.length)return t[0];var i="",a=e<0?"-":"",r=t[0].replace(".",""),s=Number(t[1])+1;if(s<0){for(i=a+"0.";s++;)i+="0";return i+r.replace(/^-/,"")}for(s-=r.length;s--;)i+="0";return r+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,r){return a.length>r.length?a:r})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?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;a1&&void 0!==arguments[1]?arguments[1]:"x";return e.toString().slice().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,r=Math.pow(10,Math.max(i,a));return(Math.round(e*r)+Math.round(t*r))/r}},{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 a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-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 r=t;t=e%t,e=r}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 a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*a))%(t=Math.round(Math.abs(t)*a))/a}}]),y}(),ce=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return F(y,[{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,r){e.attr(t).animate(a).attr(i).afterAll(function(){return r()})}},{key:"animatePathsGradually",value:function(e){var 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&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e.el,e.realIndex,e.j,"line"!==c.config.chart.type||c.globals.comboCharts?e.fill:"stroke",e.pathFrom,e.pathTo,e.speed,e.delay*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(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,r,s,n,o){var h=this,c=this.w;r||(r=e.attr("pathFrom")),s||(s=e.attr("pathTo"));var d=function(g){return"radar"===c.config.chart.type&&(n=1),"M 0 ".concat(c.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),c.globals.shouldAnimate||(n=1),e.plot(r).animate(1,c.globals.easing,o).plot(r).animate(n,c.globals.easing,o).plot(s).afterAll(function(){P.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&h.animationCompleted(e):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),y}(),K=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?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,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?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,r=this.w,s=i.blur,n=i.top,o=i.left,h=i.color,c=i.opacity;if((null===(a=r.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(t))return e;var d=e.flood(Array.isArray(h)?h[t]:h,c).composite(e.sourceAlpha,"in").offset(o,n).gaussianBlur(s).merge(e.source);return e.blend(e.source,d)}},{key:"dropShadow",value:function(e,t){var i,a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=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()&&"radialBar"===g.config.chart.type||(null===(i=g.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(a=g.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.indexOf(r))||(h=Array.isArray(h)?h[r]:h,e.filter(function(p){var x;x=P.isSafari()||P.isFirefox()||P.isMsEdge()?p.flood(h,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o):p.flood(h,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o).merge(p.source),p.blend(p.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(void 0!==a.globals.selectedDataPoints[t]&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var r=a.config.states.active.filter;"none"!==r&&this.applyFilter(e,t,r.type,r.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%"})}}]),y}(),z=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"roundPathCorners",value:function(e,t){function i(S,L,C){var M=L.x-S.x,X=L.y-S.y,I=Math.sqrt(M*M+X*X);return a(S,L,Math.min(1,C/I))}function a(S,L,C){return{x:S.x+(L.x-S.x)*C,y:S.y+(L.y-S.y)*C}}function r(S,L){S.length>2&&(S[S.length-2]=L.x,S[S.length-1]=L.y)}function s(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=s(n[0]),c=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(n[n.length-1]=c=["L",h.x,h.y]),o.push(n[0]);for(var d=1;d2&&"L"==p[0]&&x.length>2&&"L"==x[0]){var f,m,v=s(g),w=s(p),l=s(x);f=i(w,v,t),m=i(w,l,t),r(p,f),p.origPoint=w,o.push(p);var u=a(f,w,.5),b=a(w,m,.5),A=["C",u.x,u.y,b.x,b.y,m.x,m.y];A.origPoint=w,o.push(A)}else o.push(p)}if(c){var k=s(o[o.length-1]);o.push(["Z"]),r(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 r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:r,"stroke-dasharray":s,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?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:r,ry:r,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==h?h:"none","stroke-dasharray":c}),d.node.setAttribute("fill",s),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?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&&void 0!==arguments[1]?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return null!==t&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,a=e.stroke,r=void 0===a?"#a8a8a8":a,s=e.strokeWidth,n=void 0===s?1:s,o=e.fill,h=e.fillOpacity,c=void 0===h?1:h,d=e.strokeOpacity,g=void 0===d?1:d,p=e.classes,x=e.strokeLinecap,f=void 0===x?null:x,m=e.strokeDashArray,v=void 0===m?0:m,w=this.w;return null===f&&(f=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:r,"stroke-opacity":g,"stroke-linecap":f,"stroke-width":n,"stroke-dasharray":v,class:p})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w.globals.dom.Paper.group();return null!==e&&t.attr(e),t}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",e,t].join(" "):"H"===i?a=[" H",e].join(" "):"V"===i&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,r,s){return["C",e,t,i,a,r,s].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,r,s,n){var o="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a"),[o,e,t,i,a,r,s,n].join(" ")}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,r=e.pathFrom,s=e.pathTo,n=e.stroke,o=e.strokeWidth,h=e.strokeLinecap,c=e.fill,d=e.animationDelay,g=e.initialSpeed,p=e.dataChangeSpeed,x=e.className,f=e.chartType,m=e.shouldClipToGrid,v=void 0===m||m,w=e.bindEventsOnPaths,l=void 0===w||w,u=e.drawShadow,b=void 0===u||u,A=this.w,k=new K(this.ctx),S=new ce(this.ctx),L=this.w.config.chart.animations.enabled,C=L&&this.w.config.chart.animations.dynamicAnimation.enabled,M=!!(L&&!A.globals.resized||C&&A.globals.dataChanged&&A.globals.shouldAnimate);M?t=r:(t=s,A.globals.animationEnded=!0);var I,X=A.config.stroke.dashArray;I=Array.isArray(X)?X[a]:A.config.stroke.dashArray;var T=this.drawPath({d:t,stroke:n,strokeWidth:o,fill:c,fillOpacity:1,classes:x,strokeLinecap:h,strokeDashArray:I});T.attr("index",a),v&&T.attr("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?{"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}:{"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")}),"none"!==A.config.states.normal.filter.type?k.getDefaultFilter(T,a):A.config.chart.dropShadow.enabled&&b&&k.dropShadow(T,A.config.chart.dropShadow,a),l&&(T.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,T)),T.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,T)),T.node.addEventListener("mousedown",this.pathMouseDown.bind(this,T))),T.attr({pathTo:s,pathFrom:r});var D={el:T,j:i,realIndex:a,pathFrom:r,pathTo:s,fill:c,strokeWidth:o,delay:d};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(E(E({},D),{},{speed:g})),A.globals.dataChanged&&C&&M&&S.animatePathsGradually(E(E({},D),{},{speed:p})),T}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(s){"horizontalLines"===e?s.line(0,0,i,0).stroke({color:a,width:r+1}):"verticalLines"===e?s.line(0,0,0,t).stroke({color:a,width:r+1}):"slantedLines"===e?s.line(0,0,t,i).stroke({color:a,width:r}):"squares"===e?s.rect(t,i).fill("none").stroke({color:a,width:r}):"circles"===e&&s.circle(t).fill("none").stroke({color:a,width:r})})}},{key:"drawGradient",value:function(e,t,i,a,r){var s,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;t.length<9&&0===t.indexOf("#")&&(t=P.hexToRgba(t,a)),i.length<9&&0===i.indexOf("#")&&(i=P.hexToRgba(i,r));var g=0,p=1,x=1,f=null;null!==o&&(g=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,x=void 0!==o[2]?o[2]/100:1,f=void 0!==o[3]?o[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);return s=d.globals.dom.Paper.gradient(m?"radial":"linear",null===h||0===h.length?function(l){l.at(g,t,a),l.at(p,i,r),l.at(x,i,r),null!==f&&l.at(f,t,a)}:function(l){(Array.isArray(h[c])?h[c]:h).forEach(function(u){l.at(u.offset/100,u.color,u.opacity)})}),m?s.attr("bubble"!==d.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:d.globals.gridWidth/2,cy:d.globals.gridHeight/2,r:n}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):"vertical"===e?s.from(0,0).to(0,1):"diagonal"===e?s.from(0,0).to(1,1):"horizontal"===e?s.from(0,1).to(1,1):"diagonal2"===e&&s.from(1,0).to(0,1),s}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,s=this.getTextRects(t,e.fontSize,e.fontFamily),o=Math.floor(i/(s.width/t.length));return i-1){var o=i.globals.selectedDataPoints[r].indexOf(s);i.globals.selectedDataPoints[r].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(f){f.node.setAttribute("selected","false"),a.getDefaultFilter(f,r)})};d(h),d(c)}e.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[r]&&(i.globals.selectedDataPoints[r]=[]),i.globals.selectedDataPoints[r].push(s)}if("true"===n){var g=i.config.states.active.filter;if("none"!==g)a.applyFilter(e,r,g.type,g.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var p=i.config.states.hover.filter;a.applyFilter(e,r,p.type,p.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?a.getDefaultFilter(e,r):a.applyFilter(e,r,(p=i.config.states.hover.filter).type,p.value));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=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),s.globals.dom.Paper.add(n);var o=n.bbox();return r||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(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])}}]),y}(),Z=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.w,i=[];if(0===t.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===e?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 r=[];t.config.series.forEach(function(n,o){a.indexOf(t.globals.seriesNames[o])>-1&&r.push(o)});var s=t.globals.series.map(function(n,o){return-1===r.indexOf(o)?o:-1}).filter(function(n){return-1!==n});i.push(e.getStackedSeriesTotals(s))}),i}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],r=[],s=e.series.length>t.yaxis.length||t.yaxis.some(function(d){return Array.isArray(d.seriesName)});t.series.forEach(function(d,g){r.push(g),a.push(null)}),t.yaxis.forEach(function(d,g){i[g]=[]});var n=[];t.yaxis.forEach(function(d,g){var p=!1;if(d.seriesName){var x=[];Array.isArray(d.seriesName)?x=d.seriesName:x.push(d.seriesName),x.forEach(function(f){t.series.forEach(function(m,v){if(m.name===f){var w=v;g===v||s?!s||r.indexOf(v)>-1?i[g].push([g,v]):console.warn("Series '"+m.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[v].push([v,g]),w=g),p=!0,-1!==(w=r.indexOf(w))&&r.splice(w,1)}})})}p||n.push(g)}),i=i.map(function(d,g){var p=[];return d.forEach(function(x){a[x[1]]=x[0],p.push(x[1])}),p});for(var o=t.yaxis.length-1,h=0;h0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter(function(t){return null!==t}):this.w.config.series[e].data.filter(function(t){return null!==t})).length}},{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,r){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&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),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 r=0;re&&i.globals.seriesX[r][n]0){var x=function(m,v){var w=r.config.yaxis[r.globals.seriesYAxisReverseMap[v]],l=m<0?-1:1;return m=Math.abs(m),w.logarithmic&&(m=a.getBaseLog(w.logBase,m)),-l*m/n[v]};if(s.isMultipleYAxis){h=[];for(var f=0;f0&&t.forEach(function(n){var o=[],h=[];e.i.forEach(function(c,d){r.config.series[c].group===n&&(o.push(e.series[d]),h.push(c))}),o.length>0&&s.push(a.draw(o,i,h))}),s}}],[{key:"checkComboSeries",value:function(e,t){var i=!1,a=0,r=0;return void 0===t&&(t="line"),e.length&&void 0!==e[0].type&&e.forEach(function(s){"bar"!==s.type&&"column"!==s.type&&"candlestick"!==s.type&&"boxPlot"!==s.type||a++,void 0!==s.type&&s.type!==t&&r++}),r>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(e,t,i){var a,r,s,n,o,h;return null!==(a=t)&&void 0!==a&&a.yaxis&&(t=e.extendYAxis(t,i)),null!==(r=t)&&void 0!==r&&r.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),null!==(s=t)&&void 0!==s&&null!==(n=s.annotations)&&void 0!==n&&n.xaxis&&(t=e.extendXAxisAnnotations(t)),null!==(o=t)&&void 0!==o&&null!==(h=o.annotations)&&void 0!==h&&h.points&&(t=e.extendPointAnnotations(t))),t}}]),y}(),Ae=function(){function y(e){Y(this,y),this.w=e.w,this.annoCtx=e}return F(y,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("vertical"===e.label.orientation){var r=this.w.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(null!==t?t:0,"']"));if(null!==r){var s=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-s.height+4);var n="top"===e.label.position?s.width:-s.width;r.setAttribute("y",parseFloat(r.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(r),c=o.y;r.setAttribute("transform","rotate(-90 ".concat(o.x," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=e.getBoundingClientRect(),s=t.label.style.padding,n=s.left,o=s.right,h=s.top,c=s.bottom;if("vertical"===t.label.orientation){var d=[n,o,h,c];h=d[0],c=d[1],n=d[2],o=d[3]}var x=this.annoCtx.graphics.drawRect(r.left-a.left-n-i.globals.barPadForNumericAxis,r.top-a.top-h,r.width+n+o,r.height+h+c,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&x.node.classList.add(t.id),x}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,r,s){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(r,"']"));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.forEach(function(a,r){return i(a,r,"xaxis")}),t.config.annotations.yaxis.forEach(function(a,r){return i(a,r,"yaxis")}),t.config.annotations.points.forEach(function(a,r){return i(a,r,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a=this.w,r="y1"===e?t.y:t.y2,s=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(r),h=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=h?parseFloat(h.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==t.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*t.seriesIndex)}else{var c,d=a.globals.seriesYAxisMap[t.yAxisIndex][0],g=a.config.yaxis[t.yAxisIndex].logarithmic?new Z(this.annoCtx.ctx).getLogVal(a.config.yaxis[t.yAxisIndex].logBase,r,d)/a.globals.yLogRatio[d]:(r-a.globals.minYArr[d])/(a.globals.yRange[d]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(g,0),a.globals.gridHeight),s=g>a.globals.gridHeight||g<0,!t.marker||null!=t.y||(i=0),null!==(c=a.config.yaxis[t.yAxisIndex])&&void 0!==c&&c.reversed&&(i=g)}return"string"==typeof r&&r.includes("px")&&(i=parseFloat(r)),{yP:i,clipped:s}}},{key:"getX1X2",value:function(e,t){var i=this.w,a="x1"===e?t.x:t.x2,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=this.annoCtx.inversedReversedAxis?((this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX)-a)/(n/i.globals.gridWidth):(a-(this.annoCtx.invertAxis?i.globals.minY:i.globals.minX))/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(o=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(o=parseFloat(a)),null==a&&t.marker&&(o=i.globals.gridWidth),void 0!==t.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(o-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*t.seriesIndex),{x:o=Math.min(Math.max(o,0),i.globals.gridWidth),clipped:0===o||o===i.globals.gridWidth}}},{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.map(function(s){return Array.isArray(s)?s.join(" "):s}).indexOf(e),r=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return r&&(i=parseFloat(r.getAttribute("x"))),i}}]),y}(),pt=function(){function y(e){Y(this,y),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ae(this.annoCtx)}return F(y,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=this.helpers.getX1X2("x1",e),n=s.x,o=s.clipped,h=!0,c=e.label.text,d=e.strokeDashArray;if(P.isNumber(n)){if(null==e.x2){if(!o){var g=this.annoCtx.graphics.drawLine(n+e.offsetX,0+e.offsetY,n+e.offsetX,r.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id)}}else{var p=this.helpers.getX1X2("x2",e);if(a=p.x,h=p.clipped,!o||!h){if(a12?p-12:0===p?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+h(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+h(x))).replace(/(^|[^\\])h/g,"$1"+x);var f=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+h(f))).replace(/(^|[^\\])m/g,"$1"+f);var m=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+h(m))).replace(/(^|[^\\])s/g,"$1"+m);var v=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+h(v,3)),v=Math.round(v/10),t=t.replace(/(^|[^\\])ff/g,"$1"+h(v)),v=Math.round(v/10);var w=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+v)).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(),b=a||!u?"Z":u>0?"+":"-";if(!a){var A=(u=Math.abs(u))%60;b+=h(Math.floor(u/60))+":"+h(A)}t=t.replace(/(^|[^\\])K/g,"$1"+b);var k=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[k])).replace(new RegExp(o[0],"g"),o[k])).replace(new RegExp(r[0],"g"),r[d])).replace(new RegExp(s[0],"g"),s[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;void 0!==a.config.xaxis.min&&(e=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(t=a.config.xaxis.max);var r=this.getDate(e),s=this.getDate(t),n=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(s,"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:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),y}(),xe=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return F(y,[{key:"xLabelFormat",value:function(e,t,i,a){var r=this.w;if("datetime"===r.config.xaxis.type&&void 0===r.config.xaxis.labels.formatter&&void 0===r.config.tooltip.x.formatter){var s=new Q(this.ctx);return s.formatDate(s.getDate(t),r.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(0!==a.globals.yValueDecimal)e=e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal);else{var r=e.toFixed(0);e=e==r?r: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.globals.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:function(i){if(P.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(P.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return i.toFixed(a>0&&a<100?1:0)}return i.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return i},t.globals.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){t.globals.yLabelFormatters[a]=void 0!==i.labels.formatter?i.labels.formatter:function(r){return t.globals.xyCharts?Array.isArray(r)?r.map(function(s){return e.defaultYFormatter(s,i,a)}):e.defaultYFormatter(r,i,a):r}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){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}}}]),y}(),le=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"getLabel",value:function(e,t,i,a){var m,v,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,h=void 0===e[a]?"":e[a],c=h,d=o.globals.xLabelFormatter,g=o.config.xaxis.labels.formatter,p=!1,x=new xe(this.ctx);n&&(c=x.xLabelFormat(d,h,h,{i:a,dateFormatter:new Q(this.ctx).formatDate,w:o}),void 0!==g&&(c=g(h,e[a],{i:a,dateFormatter:new Q(this.ctx).formatDate,w:o}))),t.length>0?(m=t[a].unit,v=null,t.forEach(function(b){"month"===b.unit?v="year":"day"===b.unit?v="month":"hour"===b.unit?v="day":"minute"===b.unit&&(v="hour")}),p=v===m,i=t[a].position,c=t[a].value):"datetime"===o.config.xaxis.type&&void 0===g&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var l,w=new z(this.ctx);l=o.globals.rotateXLabels&&n?w.getTextRects(c,parseInt(s,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):w.getTextRects(c,parseInt(s,10));var u=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||r.indexOf(c)>=0&&u)&&(c=""),{x:i,text:c,textRect:l,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,r=a.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(a.globals.gridWidth/120)),r>i||e%Math.round(i/(r+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,r){var s=this.w;if(0===e&&s.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&s.globals.skipLastTimelinelabel&&(t.text=""),s.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=r[r.length-1];t.xa.length||a.some(function(r){return Array.isArray(r.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],r=new Z(this.ctx);return a.every(function(s){return r.isSeriesNull(s)})}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,r,s,n){var o=this.w,h=new z(this.ctx),c=o.globals.translateY+o.config.yaxis[r].labels.offsetY;if(o.globals.isBarHorizontal?c=0:"heatmap"===o.config.chart.type&&(c+=s/2),a.show&&t>0){!0===o.config.yaxis[r].opposite&&(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+=s}}}}]),y}(),ft=function(){function y(e){Y(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Ae(this.annoCtx),this.axesUtils=new le(this.annoCtx)}return F(y,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=e.strokeDashArray,n=this.helpers.getY1Y2("y1",e),o=n.yP,h=n.clipped,d=!1,g=e.label.text;if(null==e.y2){if(!h){d=!0;var p=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}else{if((a=(n=this.helpers.getY1Y2("y2",e)).yP)>o){var x=o;o=a,a=x}if(!h||!n.clipped){d=!0;var f=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),o-a,0,e.fillColor,e.opacity,1,e.borderColor,s);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),t.appendChild(f.node),e.id&&f.node.classList.add(e.id)}}if(d){var v=this.annoCtx.graphics.drawText({x:("right"===e.label.position?r.globals.gridWidth:"center"===e.label.position?r.globals.gridWidth/2:0)+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:"")});v.attr({rel:i}),t.appendChild(v.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return(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,r){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,i.node,r)}),i}}]),y}(),xt=function(){function y(e){Y(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Ae(this.annoCtx)}return F(y,[{key:"addPointAnnotation",value:function(e,t,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),r=a.x,s=a.clipped,n=(a=this.helpers.getY1Y2("y1",e)).yP,o=a.clipped;if(P.isNumber(r)&&!o&&!s){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(r+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:r+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 p=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});p.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),p.node.innerHTML=e.customSVG.SVG,t.appendChild(p.node)}if(e.image.path){var x=e.image.width?e.image.width:20,f=e.image.height?e.image.height:20;c=this.annoCtx.addImage({x:r+e.image.offsetX-x/2,y:n+e.image.offsetY-f/2,width:x,height:f,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,r){e.addPointAnnotation(a,i.node,r)}),i}}]),y}(),qe={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"}}},he=function(){function y(){Y(this,y),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 F(y,[{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:[qe],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 null!==e?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}}}}}]),y}(),bt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.graphics=new z(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ae(this),this.xAxisAnnotations=new pt(this),this.yAxisAnnotations=new ft(this),this.pointsAnnotations=new xt(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 F(y,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),r=e.config.chart.animations.enabled,s=[t,i,a],n=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(s[o]),!r||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&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 r=e.text,g=e.backgroundColor,p=e.borderWidth,x=e.strokeDashArray,f=e.borderRadius,m=e.borderColor,v=e.appendTo,w=void 0===v?".apexcharts-svg":v,l=e.paddingLeft,u=void 0===l?4:l,b=e.paddingRight,A=void 0===b?4:b,k=e.paddingBottom,S=void 0===k?2:k,L=e.paddingTop,C=void 0===L?2:L,M=this.w,X=this.graphics.drawText({x:e.x,y:e.y,text:r,textAnchor:e.textAnchor||"start",fontSize:e.fontSize||"12px",fontWeight:e.fontWeight||"regular",fontFamily:e.fontFamily||M.config.chart.fontFamily,foreColor:e.foreColor||M.config.chart.foreColor,cssClass:e.cssClass}),I=M.globals.dom.baseEl.querySelector(w);I&&I.appendChild(X.node);var T=X.bbox();if(r){var R=this.graphics.drawRect(T.x-u,T.y-C,T.width+u+A,T.height+S+C,f,g||"transparent",1,p,m,x);I.insertBefore(R.node,X.node)}}},{key:"addImage",value:function(e,t){var i=this.w,r=e.x,s=void 0===r?0:r,n=e.y,o=void 0===n?0:n,h=e.width,c=void 0===h?20:h,d=e.height,g=void 0===d?20:d,p=e.appendTo,x=void 0===p?".apexcharts-svg":p,f=i.globals.dom.Paper.image(e.path);f.size(c,g).move(s,o);var m=i.globals.dom.baseEl.querySelector(x);return m&&m.appendChild(f.node),f}},{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 void 0===this.invertAxis&&(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,r=e.type,s=e.contextMethod,n=a,o=n.w,h=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),c=h.childNodes.length+1,d=new he,g=Object.assign({},"xaxis"===r?d.xAxisAnnotation:"yaxis"===r?d.yAxisAnnotation:d.pointAnnotation),p=P.extend(g,t);switch(r){case"xaxis":this.addXaxisAnnotation(p,h,c);break;case"yaxis":this.addYaxisAnnotation(p,h,c);break;case"point":this.addPointAnnotation(p,h,c)}var x=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(x,p);return f&&h.insertBefore(f.node,x),i&&o.globals.memory.methodsToExec.push({context:n,id:p.id?p.id:P.randomId(),method:s,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--)"addText"!==t.globals.memory.methodsToExec[a].label&&"addAnnotation"!==t.globals.memory.methodsToExec[a].label||t.globals.memory.methodsToExec.splice(a,1);i=P.listToArray(i),Array.prototype.forEach.call(i,function(r){for(;r.firstChild;)r.removeChild(r.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(r,s){r.id===t&&i.globals.memory.methodsToExec.splice(s,1)}),Array.prototype.forEach.call(a,function(r){r.parentElement.removeChild(r)}))}}]),y}(),Te=function(y){var e,t=y.isTimeline,i=y.ctx,a=y.seriesIndex,r=y.dataPointIndex,s=y.y1,n=y.y2,o=y.w,h=o.globals.seriesRangeStart[a][r],c=o.globals.seriesRangeEnd[a][r],d=o.globals.labels[r],g=o.config.series[a].name?o.config.series[a].name:"",p=o.globals.ttKeyFormatter,x=o.config.tooltip.y.title.formatter,f={w:o,seriesIndex:a,dataPointIndex:r,start:h,end:c};"function"==typeof x&&(g=x(g,f)),null!==(e=o.config.series[a].data[r])&&void 0!==e&&e.x&&(d=o.config.series[a].data[r].x),t||"datetime"===o.config.xaxis.type&&(d=new xe(i).xLabelFormat(o.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new Q(i).formatDate,w:o})),"function"==typeof p&&(d=p(d,f)),Number.isFinite(s)&&Number.isFinite(n)&&(h=s,c=n);var m="",v="",w=o.globals.colors[a];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var l=new Q(i);m=l.formatDate(l.getDate(h),o.config.tooltip.x.format),v=l.formatDate(l.getDate(c),o.config.tooltip.x.format)}else m=h,v=c;else m=o.config.tooltip.x.formatter(h),v=o.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:m,endVal:v,ylabel:d,color:w,seriesName:g}},ze=function(y){var e=y.color,t=y.seriesName,i=y.ylabel,a=y.start,r=y.end,s=y.seriesIndex,n=y.dataPointIndex,o=y.ctx.tooltip.tooltipLabels.getFormatters(s);a=o.yLbFormatter(a),r=o.yLbFormatter(r);var h=o.yLbFormatter(y.w.globals.series[s][n]),c='\n '.concat(a,'\n - \n ').concat(r,"\n ");return'
'+(t||"")+'
'+i+": "+(y.w.globals.comboCharts?"rangeArea"===y.w.config.series[s].type||"rangeBar"===y.w.config.series[s].type?c:"".concat(h,""):c)+"
"},be=function(){function y(e){Y(this,y),this.opts=e}return F(y,[{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){return null!==e?t.w.config.series[t.seriesIndex].name+": "+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(),E(E({},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){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["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){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["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){var i=t.seriesIndex,a=t.dataPointIndex,r=t.w,s=function(){return r.globals.seriesRangeEnd[i][a]-r.globals.seriesRangeStart[i][a]};return r.globals.comboCharts?"rangeBar"===r.config.series[i].type||"rangeArea"===r.config.series[i].type?s():e:s()},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?(a=(i=Te(E(E({},t=e),{},{isTimeline:!0}))).color,r=i.seriesName,s=i.ylabel,n=i.startVal,o=i.endVal,ze(E(E({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))):function(t){var i=Te(t),a=i.color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end;return ze(E(E({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))}(e);var t,i,a,r,s,n,o}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return null!==(t=e.plotOptions.bar)&&void 0!==t&&t.barHeight||(e.plotOptions.bar.barHeight=2),null!==(i=e.plotOptions.bar)&&void 0!==i&&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 a=(i=Te(t=e)).color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end,ze(E(E({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}));var t,i,a,r,s,n,o}}}}},{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}),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(i){return"number"==typeof i&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return E(E({},e),{},{plotOptions:E(E({},e.plotOptions),{},{bar:E(E({},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(s){return P.isNumber(s)?Math.floor(s):s};var a=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(r=i.map(function(s){return Array.isArray(s)?s:String(s)})),r&&r.length&&(e.xaxis.labels.formatter=function(s){return P.isNumber(s)?a(r[Math.floor(s)-1]):a(s)}),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"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{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"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{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"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{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,padding:{left:0,right:0,top:0,bottom:0}},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},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,r){var s=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!==r?'
\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],"\n
"):'
')+"
".concat(a[0],': ')+s+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+h+"
"+"
".concat(a[4],': ')+c+"
"}}]),y}(),me=function(){function y(e){Y(this,y),this.opts=e}return F(y,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new he,r=new be(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var s=a.init(),n={};if(i&&"object"===J(i)){var o,h,c,d,g,p,x,f,m,v,w={};w=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?r[i.chart.type]():r.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(h=o.bar)&&void 0!==h&&h.isFunnel&&(w=r.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(w=r.stackedBars()),null!==(c=i.chart.brush)&&void 0!==c&&c.enabled&&(w=r.brush(w)),null!==(d=i.plotOptions)&&void 0!==d&&null!==(g=d.line)&&void 0!==g&&g.isSlopeChart&&(w=r.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=r.stacked100(i)),null!==(p=i.plotOptions)&&void 0!==p&&null!==(x=p.bar)&&void 0!==x&&x.isDumbbell&&(i=r.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),(null!==(f=(i=this.checkForCatToNumericXAxis(this.chartType,w,i)).chart.sparkline)&&void 0!==f&&f.enabled||null!==(m=window.Apex.chart)&&void 0!==m&&null!==(v=m.sparkline)&&void 0!==v&&v.enabled)&&(w=r.sparkline(w)),n=P.extend(s,w)}var l=P.extend(n,window.Apex);return s=P.extend(l,i),this.handleUserInputErrors(s)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,r,s=new be(i);return("bar"===e||"boxPlot"===e)&&(null===(a=i.plotOptions)||void 0===a||null===(r=a.bar)||void 0===r?void 0:r.horizontal)||"pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e||!("datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type)||"between"===(i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement)||(i=s.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new he;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(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=e.yaxis.constructor!==Array?[P.extend(i.yAxis,e.yaxis)]:P.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(s){s.logarithmic&&(a=!0)});var r=e.series;return t&&!r&&(r=t.config.series),a&&r.length!==e.yaxis.length&&r.length&&(e.yaxis=r.map(function(s,n){if(s.name||(r[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=r[n].name,e.yaxis[n];var o=P.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&r.length>1&&r.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 void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new he;return e.annotations.yaxis=P.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new he;return e.annotations.xaxis=P.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new he;return e.annotations.points=P.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(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("bar"===t.chart.type&&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"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),y}(),Ze=function(){function y(){Y(this,y)}return F(y,[{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:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&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}}]),y}(),mt=function(){function y(e){Y(this,y),this.opts=e}return F(y,[{key:"init",value:function(){var e=new me(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Ze).init(e)}}}]),y}(),re=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return F(y,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),r=parseInt(t.globals.gridHeight,10),s=a>r?a:r,n=e.image,o=0,h=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,h=i.fill.image.height):(o=s+1,h=s):(o=e.width,h=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");z.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),z.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 this.seriesIndex=("bar"===i||"rangeBar"===i)&&t.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?e.seriesNumber:e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,r,s=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var n=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(n=t.globals.seriesColors[this.seriesIndex]),"function"==typeof n&&(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(s.fill.opacity)?s.fill.opacity[this.seriesIndex]:s.fill.opacity;e.color&&(n=e.color),n||(n="#fff",console.warn("undefined color - ApexCharts"));var c=n;if(-1===n.indexOf("rgb")?n.length<9&&(c=P.hexToRgba(n,h)):n.indexOf("rgba")>-1&&(h=P.getOpacityFromRGBA(n)),e.opacity&&(h=e.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:n,fillOpacity:h,defaultColor:c})),"gradient"===o&&(r=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:n,fillOpacity:h,i:this.seriesIndex})),"image"===o){var d=s.fill.image.src,g=e.patternID?e.patternID:"",p="pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(g);-1===this.patternIDs.indexOf(p)&&(this.clippedImgArea({opacity:h,image:Array.isArray(d)?e.seriesNumber-1&&(p=P.getOpacityFromRGBA(g));var x=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[r]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)n=c.shadeColor("dark"===s.gradient.shade?-1*parseFloat(s.gradient.shadeIntensity):parseFloat(s.gradient.shadeIntensity),t.indexOf("rgb")>-1?P.rgb2hex(t):t);else if(s.gradient.gradientToColors[o.seriesNumber]){var f=s.gradient.gradientToColors[o.seriesNumber];n=f,f.indexOf("rgba")>-1&&(x=P.getOpacityFromRGBA(f))}else n=t;if(s.gradient.gradientFrom&&(g=s.gradient.gradientFrom),s.gradient.gradientTo&&(n=s.gradient.gradientTo),s.gradient.inverseColors){var m=g;g=n,n=m}return g.indexOf("rgb")>-1&&(g=P.rgb2hex(g)),n.indexOf("rgb")>-1&&(n=P.rgb2hex(n)),h.drawGradient(d,g,n,p,x,o.size,s.gradient.stops,s.gradient.colorStops,r)}}]),y}(),de=function(){function y(e,t){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{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.length4&&void 0!==arguments[4]&&arguments[4],n=this.w,o=t,h=e,c=null,d=new z(this.ctx),g=n.config.markers.discrete&&n.config.markers.discrete.length;if((n.globals.markers.size[t]>0||s||g)&&(c=d.group({class:s||g?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(h.x))for(var p=0;p0:n.config.markers.size>0)||s||g){P.isNumber(h.y[p])?f+=" w".concat(P.randomId()):f="apexcharts-nullpoint";var m=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:x});n.config.series[o].data[x]&&(n.config.series[o].data[x].fillColor&&(m.pointFillColor=n.config.series[o].data[x].fillColor),n.config.series[o].data[x].strokeColor&&(m.pointStrokeColor=n.config.series[o].data[x].strokeColor)),void 0!==a&&(m.pSize=a),(h.x[p]<-n.globals.markers.largestSize||h.x[p]>n.globals.gridWidth+n.globals.markers.largestSize||h.y[p]<-n.globals.markers.largestSize||h.y[p]>n.globals.gridHeight+n.globals.markers.largestSize)&&(m.pSize=0),(r=d.drawMarker(h.x[p],h.y[p],m)).attr("rel",x),r.attr("j",x),r.attr("index",t),r.node.setAttribute("default-marker-size",m.pSize),new K(this.ctx).setSelectionFilter(r,t,x),this.addEvents(r),c&&c.add(r)}else void 0===n.globals.pointsArray[t]&&(n.globals.pointsArray[t]=[]),n.globals.pointsArray[t].push([h.x[p],h.y[p]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,r=void 0===a?null:a,s=e.radius,n=void 0===s?null:s,o=e.size,h=void 0===o?null:o,c=e.strokeWidth,d=void 0===c?null:c,g=this.w,p=this.getMarkerStyle(i),x=null===h?g.globals.markers.size[i]:h,f=g.config.markers;return null!==r&&f.discrete.length&&f.discrete.map(function(m){m.seriesIndex===i&&m.dataPointIndex===r&&(p.pointStrokeColor=m.strokeColor,p.pointFillColor=m.fillColor,x=m.size,p.pointShape=m.shape)}),{pSize:null===n?x:n,pRadius:null!==n?n:f.radius,pointStrokeWidth:null!==d?d:Array.isArray(f.strokeWidth)?f.strokeWidth[i]:f.strokeWidth,pointStrokeColor:p.pointStrokeColor,pointFillColor:p.pointFillColor,shape:p.pointShape||(Array.isArray(f.shape)?f.shape[i]:f.shape),class:t,pointStrokeOpacity:Array.isArray(f.strokeOpacity)?f.strokeOpacity[i]:f.strokeOpacity,pointStrokeDashArray:Array.isArray(f.strokeDashArray)?f.strokeDashArray[i]:f.strokeDashArray,pointFillOpacity:Array.isArray(f.fillOpacity)?f.fillOpacity[i]:f.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new z(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}}}]),y}(),$e=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return F(y,[{key:"draw",value:function(e,t,i){var a=this.w,r=new z(this.ctx),s=i.realIndex,n=i.pointsPos,o=i.zRatio,h=i.elParent,c=r.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;df.maxBubbleRadius&&(x=f.maxBubbleRadius)}var v=n.y[d];if(x=x||0,null!==v&&void 0!==a.globals.series[s][g]||(p=!1),p){var w=this.drawPoint(n.x[d],v,x,s,g,t);c.add(w)}h.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,r,s){var n=this.w,o=a,h=new ce(this.ctx),c=new K(this.ctx),d=new re(this.ctx),g=new de(this.ctx),p=new z(this.ctx),x=g.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:r,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),f=d.fillPath({seriesNumber:a,dataPointIndex:r,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][s]}),m=p.drawMarker(e,t,x);return n.config.series[o].data[r]&&n.config.series[o].data[r].fillColor&&(f=n.config.series[o].data[r].fillColor),m.attr({fill:f}),n.config.chart.dropShadow.enabled&&c.dropShadow(m,n.config.chart.dropShadow,a),!this.initialAnim||n.globals.dataChanged||n.globals.resized?n.globals.animationEnded=!0:h.animateMarker(m,n.config.chart.animations.speed,n.globals.easing,function(){window.setTimeout(function(){h.animationCompleted(m)},100)}),m.attr({rel:r,j:r,index:a,"default-marker-size":x.pSize}),c.setSelectionFilter(m,a,r),g.addEvents(m),m.node.classList.add("apexcharts-marker"),m}},{key:"centerTextInBubble",value:function(e){return{y:e+=parseInt(this.w.config.dataLabels.style.fontSize,10)/4}}}]),y}(),ge=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"dataLabelsCorrection",value:function(e,t,i,a,r,s,n){var o=this.w,h=!1,c=new z(this.ctx).getTextRects(i,n),d=c.width,g=c.height;if(t<0&&(t=0),t>o.globals.gridHeight+g&&(t=o.globals.gridHeight+g/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:g}),void 0!==o.globals.dataLabelsRects[a][o.globals.dataLabelsRects[a].length-2]){var f=o.globals.dataLabelsRects[a][void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0];(e>f.x+f.width||t>f.y+f.height||t+gt.globals.gridWidth+w.textRects.width+30)&&(o="");var l=t.globals.dataLabels.style.colors[s];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(l=t.globals.dataLabels.style.colors[n]),"function"==typeof l&&(l=l({series:t.globals.series,seriesIndex:s,dataPointIndex:n,w:t})),p&&(l=p);var u=g.offsetX,b=g.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(u=0,b=0),t.globals.isSlopeChart&&(0!==n&&(u=-2*g.offsetX+5),0!==n&&n!==t.config.series[s].data.length-1&&(u=0)),w.drawnextLabel){if((v=i.drawText({width:100,height:parseInt(g.style.fontSize,10),x:a+u,y:r+b,foreColor:l,textAnchor:h||g.textAnchor,text:o,fontSize:c||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"})).attr({class:m||"apexcharts-datalabel",cx:a,cy:r}),g.dropShadow.enabled){var A=g.dropShadow;new K(this.ctx).dropShadow(v,A)}d.add(v),void 0===t.globals.lastDrawnDataLabelsIndexes[s]&&(t.globals.lastDrawnDataLabelsIndexes[s]=[]),t.globals.lastDrawnDataLabelsIndexes[s].push(n)}return v}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,r=a.padding,s=a.padding/2,n=t.width,o=t.height,h=new z(this.ctx).drawRect(t.x-r,t.y-s/2,n+2*r,o+s,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new K(this.ctx).dropShadow(h,a.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,r=P.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),a.config.series=r,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;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),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s=null,n=null,o=null;t.globals.axisCharts||"radialBar"===t.config.chart.type?t.globals.axisCharts?(s=t.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=t.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']")),o=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t.globals.seriesYAxisReverseMap[a],"']"))):s=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']")):s=t.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var c=0;c=h.from&&(g0&&void 0!==arguments[0]?arguments[0]:"asc",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var r=i.config.series.map(function(n,o){return n.data&&n.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(o)&&(!i.globals.comboCharts||0===t.length||t.length&&t.indexOf(i.config.series[o].type)>-1)?o:-1}),s="asc"===e?0:r.length-1;"asc"===e?s=0;"asc"===e?s++:s--)if(-1!==r[s]){a=r[s];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return"bar"===e.type||"column"===e.type?t:-1}).filter(function(e){return-1!==e}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(s,n,o){for(var h=s[n].childNodes,c={type:o,paths:[],realIndex:s[n].getAttribute("data:realIndex")},d=0;d0)for(var a=function(s){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(s,"'] rect")),o=[],h=function(d){var g=function(x){return n[d].getAttribute(x)},p={x:parseFloat(g("x")),y:parseFloat(g("y")),width:parseFloat(g("width")),height:parseFloat(g("height"))};o.push({rect:p,color:n[d].getAttribute("color")})},c=0;c0)for(var a=0;a0?t:[]})}}]),y}(),Je=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Z(this.ctx)}return F(y,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new se(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new se(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!=e[this.activeSeriesIndex].data[0]&&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,r="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,s=0;s=5?e[t].data[s][4]:e[t].data[s][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(e[t].data[s][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[s][0]);for(var o=0;o-1&&(s=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();r.isRangeBar="rangeBar"===a.chart.type&&r.isBarHorizontal,r.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,r.hasXaxisGroups&&(r.groups=a.xaxis.group.groups),e.forEach(function(p,x){r.seriesNames.push(void 0!==p.name?p.name:"series-"+parseInt(x+1,10))}),this.coreUtils.setSeriesYAxisMappings();var o=[],h=$(new Set(a.series.map(function(p){return p.group})));a.series.forEach(function(p,x){var f=h.indexOf(p.group);o[f]||(o[f]=[]),o[f].push(r.seriesNames[x])}),r.seriesGroups=o;for(var c=function(){for(var p=0;p0&&(this.twoDSeriesX=n,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var g=e[d].data.map(function(p){return P.parseNumber(p)});r.series.push(g)}r.seriesZ.push(this.threeDSeries),r.seriesColors.push(void 0!==e[d].color?e[d].color: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;a0?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(r){i.labels.indexOf(r.x)<0&&r.x&&i.labels.push(r.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new be(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 r=i.series.map(function(d,g){return d.data.filter(function(p,x,f){return f.findIndex(function(m){return m.x===p.x})===x})}),s=r.reduce(function(d,g,p,x){return x[d].length>g.length?d:p},0),n=0;n0&&r==i.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(function(i){return i})}}]),y}(),Se=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{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,r=i.config.chart.toolbar.export.scale||i.config.chart.toolbar.export.width/i.globals.svgWidth;r||(r=1);var s=e.w.globals.dom.Paper.svg(),n=e.w.globals.dom.Paper.node.cloneNode(!0);1!==r&&e.scaleSvgNode(n,r),e.convertImagesToBase64(n).then(function(){s=(new XMLSerializer).serializeToString(n),t(s.replace(/ /g," "))})})}},{key:"convertImagesToBase64",value:function(e){var t=this,i=e.getElementsByTagName("image"),a=Array.from(i).map(function(r){var s=r.getAttributeNS("http://www.w3.org/1999/xlink","href");return s&&!s.startsWith("data:")?t.getBase64FromUrl(s).then(function(n){r.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 r=document.createElement("canvas");r.width=a.width,r.height=a.height,r.getContext("2d").drawImage(a,0,0),t(r.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(r){r.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,r=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var s=document.createElement("canvas");s.width=a.globals.svgWidth*r,s.height=parseInt(a.globals.dom.elWrap.style.height,10)*r;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=s.getContext("2d");o.fillStyle=n,o.fillRect(0,0,s.width*r,s.height*r),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),s.msToBlob){var g=s.msToBlob();i({blob:g})}else{var p=s.toDataURL("image/png");i({imgURI:p})}},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;this.dataURI(t?{scale:t}:i?{width:i}:void 0).then(function(r){var s=r.imgURI,n=r.blob;n?navigator.msSaveOrOpenBlob(n,e.w.globals.chartID+".png"):e.triggerDownload(s,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,r=e.columnDelimiter,s=void 0===r?",":r,n=e.lineDelimiter,o=void 0===n?"\n":n,h=this.w;i||(i=h.config.series);var c,d,g=[],p=[],x="",f=h.globals.series.map(function(k,S){return-1===h.globals.collapsedSeriesIndices.indexOf(S)?k:[]}),m=function(k){return"function"==typeof h.config.chart.toolbar.export.csv.categoryFormatter?h.config.chart.toolbar.export.csv.categoryFormatter(k):"datetime"===h.config.xaxis.type&&String(k).length>=10?new Date(k).toDateString():P.isNumber(k)?k:k.split(s).join("")},v=function(k){return"function"==typeof h.config.chart.toolbar.export.csv.valueFormatter?h.config.chart.toolbar.export.csv.valueFormatter(k):k},w=Math.max.apply(Math,$(i.map(function(k){return k.data?k.data.length:0}))),l=new Je(this.ctx),u=new le(this.ctx),b=function(k){var S="";if(h.globals.axisCharts){if("category"===h.config.xaxis.type||h.config.xaxis.convertedCatToNumeric)if(h.globals.isBarHorizontal){var L=h.globals.yLabelFormatters[0],C=new se(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;"datetime"===h.config.xaxis.type&&(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 null===S?"nullvalue":(Array.isArray(S)&&(S=S.join(" ")),P.isNumber(S)?S:S.split(s).join(""))};g.push(h.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===h.config.chart.type?(g.push("minimum"),g.push("q1"),g.push("median"),g.push("q3"),g.push("maximum")):"candlestick"===h.config.chart.type?(g.push("open"),g.push("high"),g.push("low"),g.push("close")):"rangeBar"===h.config.chart.type?(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(s).join("")?L.split(s).join(""):"series-".concat(S))}),h.globals.axisCharts||(g.push(h.config.chart.toolbar.export.csv.headerValue),p.push(g.join(s))),h.globals.allSeriesHasEqualX||!h.globals.axisCharts||h.config.xaxis.categories.length||h.config.labels.length?i.map(function(k,S){h.globals.axisCharts?function(k,S){if(g.length&&0===S&&p.push(g.join(s)),k.data){k.data=k.data.length&&k.data||$(Array(w)).map(function(){return""});for(var L=0;L0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY="top"===i.config.xaxis.position?0:i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&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=this.xaxisBorderWidth.indexOf("%")>-1?i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return F(y,[{key:"drawXaxis",value:function(){var e=this.w,t=new z(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 r=[],s=0;s6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],g=this.w,p=h.xaxisFontSize||this.xaxisFontSize,x=h.xaxisFontFamily||this.xaxisFontFamily,f=h.xaxisForeColors||this.xaxisForeColors,m=h.fontWeight||g.config.xaxis.labels.style.fontWeight,v=h.cssClass||g.config.xaxis.labels.style.cssClass,w=g.globals.padHorizontal,l=a.length,u="category"===g.config.xaxis.type?g.globals.dataPoints:l;0===u&&l>u&&(u=l),r?(n=g.globals.gridWidth/Math.min(u>1?u-1:u,l-1),w=w+s(0,n)/2+g.config.xaxis.labels.offsetX):w=w+s(0,n=g.globals.gridWidth/u)+g.config.xaxis.labels.offsetX;for(var A=function(S){var L=w-s(S,n)/2+g.config.xaxis.labels.offsetX;0===S&&1===l&&n/2===w&&1===u&&(L=g.globals.gridWidth/2);var C=o.axesUtils.getLabel(a,g.globals.timescaleLabels,L,S,c,p,e),M=28;if(g.globals.rotateXLabels&&e&&(M=22),g.config.xaxis.title.text&&"top"===g.config.xaxis.position&&(M+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(M=M+parseFloat(p)+(g.globals.xAxisLabelsHeight-g.globals.xAxisGroupLabelsHeight)+(g.globals.rotateXLabels?10:0)),C=void 0!==g.config.xaxis.tickAmount&&"dataPoints"!==g.config.xaxis.tickAmount&&"datetime"!==g.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(S,C,l):o.axesUtils.checkForOverflowingLabels(S,C,l,c,d),g.config.xaxis.labels.show){var X=t.drawText({x:C.x,y:o.offY+g.config.xaxis.labels.offsetY+M-("top"===g.config.xaxis.position?g.globals.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:C.isBold?600:m,fontSize:p,fontFamily:x,foreColor:Array.isArray(f)?e&&g.config.xaxis.convertedCatToNumeric?f[g.globals.minX+S-1]:f[S]:f,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(X),X.on("click",function(T){if("function"==typeof g.config.chart.events.xAxisLabelClick){var R=Object.assign({},g,{labelIndex:S});g.config.chart.events.xAxisLabelClick(T,o.ctx,R)}}),e){var I=document.createElementNS(g.globals.SVGNS,"title");I.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,X.node.appendChild(I),""!==C.text&&(c.push(C.text),d.push(C))}}Sa.globals.gridWidth)){var s=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+s+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(t=s-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new z(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,s+a.config.xaxis.offsetY,r+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 r=0;r0){var c=r[r.length-1].getBBox(),d=r[0].getBBox();c.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var g=0;g0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return F(y,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new z(this.ctx);e||(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),r=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(r),e.add(a),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new z(this.ctx),a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,$(e.config.stroke.width)):e.config.stroke.width,r=function(c){var d=document.createElementNS(t.SVGNS,"clipPath");return d.setAttribute("id",c),d};t.dom.elGridRectMask=r("gridRectMask".concat(t.cuid)),t.dom.elGridRectBarMask=r("gridRectBarMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=r("gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=r("forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=r("nonForecastMask".concat(t.cuid));var s=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(s=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),n=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(0,0,t.gridWidth,t.gridHeight,0,"#fff"),t.dom.elGridRectBar=i.drawRect(-a/2-s-2,-a/2-2,t.gridWidth+a+n+s+4,t.gridHeight+a+4,0,"#fff");var o=e.globals.markers.largestSize;t.dom.elGridRectMarker=i.drawRect(-o,-o,t.gridWidth+2*o,t.gridHeight+2*o,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var h=t.dom.baseEl.querySelector("defs");h.appendChild(t.dom.elGridRectMask),h.appendChild(t.dom.elGridRectBarMask),h.appendChild(t.dom.elGridRectMarkerMask),h.appendChild(t.dom.elForecastMask),h.appendChild(t.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,n=e.xCount,h=this.w;if(!(0===t&&h.globals.skipFirstTimelinelabel||t===n-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||"radar"===h.config.chart.type)){h.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:e.y1,x2:e.x2,y2:e.y2,xCount:n,parent:e.parent});var c=0;if(h.globals.hasXaxisGroups&&"between"===h.config.xaxis.tickPlacement){var d=h.globals.groups;if(d){for(var g=0,p=0;g0&&"datetime"!==e.config.xaxis.type&&(r=t.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:r,tickAmount:s})):this._drawInvertedXYLines({xCount:r=s,tickAmount:s=t.xTickAmount}),this.drawGridBands(r,s),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.gridWidth/r}}},{key:"drawGridBands",value:function(e,t){var i,a,r=this,s=this.w;if((null===(i=s.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(x,f,m,v,w,l){for(var u=0,b=0;u=s.config.grid.row.colors.length&&(b=0),r._drawGridBandRect({c:b,x1:0,y1:v,x2:w,y2:l,type:"row"}),v+=s.globals.gridHeight/t}(0,t,0,0,s.globals.gridWidth,s.globals.gridHeight/t),(null===(a=s.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=s.globals.isBarHorizontal||"on"!==s.config.xaxis.tickPlacement||"category"!==s.config.xaxis.type&&!s.config.xaxis.convertedCatToNumeric?e:e-1;s.globals.isXNumeric&&(n=s.globals.xAxisScale.result.length-1);for(var o=s.globals.padHorizontal,h=s.globals.padHorizontal+s.globals.gridWidth/n,c=s.globals.gridHeight,d=0,g=0;d=s.config.grid.column.colors.length&&(g=0),"datetime"===s.config.xaxis.type&&(o=this.xaxisLabels[d].position,h=((null===(p=this.xaxisLabels[d+1])||void 0===p?void 0:p.position)||s.globals.gridWidth)-this.xaxisLabels[d].position),this._drawGridBandRect({c:g,x1:o,y1:0,x2:h,y2:c,type:"column"}),o+=s.globals.gridWidth/n}}}}]),y}(),Ke=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.coreUtils=new Z(this.ctx)}return F(y,[{key:"niceScale",value:function(e,t){var i,a,r,s,n=arguments.length>2&&void 0!==arguments[2]?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),r=null!=i.min,s=void 0!==i.max&&null!==i.min;var d=null!=i.stepSize,g=null!=i.tickAmount,p=g?i.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!g&&c.multiAxisTickAmount>0&&(p=c.multiAxisTickAmount,g=!0),p="dataPoints"===p?c.dataPoints-1:Math.abs(Math.round(p)),(e===Number.MIN_VALUE&&0===t||!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+p,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=0===e?0:e-1,t=0===t?2:t+1);var f=[];p<1&&(p=1);var m=p,v=Math.abs(t-e);!r&&e>0&&e/v<.15&&(e=0,r=!0),!s&&t<0&&-t/v<.15&&(t=0,s=!0);var w=(v=Math.abs(t-e))/m,l=w,u=Math.floor(Math.log10(l)),b=Math.pow(10,u),A=Math.ceil(l/b);if(w=l=(A=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][A])*b,c.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(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(r&&s){var S=v/m;if(g)if(d)if(0!=P.mod(v,w)){var L=P.getGCD(w,S);w=S/L<10?L:S}else 0==P.mod(w,S)?w=S:(S=w,g=!1);else w=S;else if(d)0==P.mod(v,w)?S=w:w=S;else if(0==P.mod(v,w))S=w;else{S=v/(m=Math.ceil(v/w));var C=P.getGCD(v,w);v/Ca&&(e=t-w*p,e+=w*Math.floor((M-e)/w))}else if(r)if(g)t=e+w*m;else{var X=t;t=w*Math.ceil(t/w),Math.abs(t-e)/P.getGCD(v,w)>a&&(t=e+w*p,t+=w*Math.ceil((X-t)/w))}}else if(c.isMultipleYAxis&&g){var I=w*Math.floor(e/w),T=I+w*m;T0&&e16&&P.getPrimeFactors(m).length<2&&m++,!g&&i.forceNiceScale&&0===c.yValueDecimal&&m>v&&(m=v,w=Math.round(v/m)),m>a&&(!g&&!d||i.forceNiceScale)){var R=P.getPrimeFactors(m),D=R.length-1,H=m;e:for(var O=0;Oae);return{result:f,niceMin:f[0],niceMax:f[f.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=Math.abs(t-e),n=[];if(e===t)return{result:n=[e],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1),r||(r=s/i),r=Math.round(10*(r+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,r=1);for(var o=e;i>=0;)n.push(o),o=P.preciseAddition(o,r),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=[],r=Math.ceil(Math.log(t)/Math.log(i)+1),s=Math.floor(Math.log(e)/Math.log(i));s5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=s.forceNiceScale?this.logarithmicScaleNice(t,i,s.logBase):this.logarithmicScale(t,i,s.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,r=Math.abs(t-e);if(t!==-Number.MAX_VALUE&&P.isNumber(t)){var s=a.xTickAmount+1;r<10&&r>1&&(s=r),a.xAxisScale=this.linearScale(e,t,s,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,t=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,r=i.minYArr,s=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,p=-Number.MAX_VALUE,x=g,f=p;if(t.chart.stacked)!function(){var w=new Array(i.dataPoints).fill(0),l=[],u=[],b=[];h.forEach(function(){l.push(w.map(function(){return Number.MIN_VALUE})),u.push(w.map(function(){return Number.MIN_VALUE})),b.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,M){if(t.series[L].group===C)for(var X=0;X=0?u[M][X]+=I:b[M][X]+=I,l[M][X]+=I,x=Math.min(x,I),f=Math.max(f,I)}})),"bar"!==c&&"column"!==c||i.barGroups.push(d)},k=0;k1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,s=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var h=s.series,c=h,d=h;"candlestick"===r.chart.type?(c=s.seriesCandleL,d=s.seriesCandleH):"boxPlot"===r.chart.type?(c=s.seriesCandleO,d=s.seriesCandleC):s.isRangeData&&(c=s.seriesRangeStart,d=s.seriesRangeEnd);var g=!1;if(s.seriesX.length>=a){var p,x=null===(p=s.brushSource)||void 0===p?void 0:p.w.config.chart.brush;(r.chart.zoom.enabled&&r.chart.zoom.autoScaleYaxis||null!=x&&x.enabled&&null!=x&&x.autoScaleYaxis)&&(g=!0)}for(var f=e;fv&&s.seriesX[f][w]>r.xaxis.max;w--);}for(var l=v;l<=w&&lc[f][l]&&c[f][l]<0&&(o=c[f][l])}else s.hasNullValues=!0}"bar"!==m&&"column"!==m||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,t=Math.min(t,0)))}return"rangeBar"===r.chart.type&&s.seriesRangeStart.length&&s.isBarHorizontal&&(o=t),"bar"===r.chart.type&&(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 r=0;re.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1);else if("dataPoints"===t.xaxis.tickAmount){if(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var r=e.maxX-e.minX;r<30&&(a=r-1)}}else a=t.xaxis.tickAmount;if(e.xTickAmount=a,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(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 s=[],n=e.minX-1;n0&&(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;t0){var n=r-a[s-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),1!==e.dataPoints&&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(s){return s})]);var a={},r={};i.forEach(function(s){a[s]=[],r[s]=[],e.w.config.series.map(function(n,o){return s.indexOf(t.seriesNames[o])>-1?o:null}).filter(function(n){return null!==n}).forEach(function(n){for(var o=0;o0?a[s][o]+=parseFloat(t.series[n][o])+1e-4:r[s][o]+=parseFloat(t.series[n][o]))}})}),Object.entries(a).forEach(function(s){var n=je(s,1)[0];a[n].forEach(function(o,h){t.maxY=Math.max(t.maxY,a[n][h]),t.minY=Math.min(t.minY,r[n][h])})})}}}]),y}(),Ee=function(){function y(e,t){Y(this,y),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="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===i.config.xaxis.position?i.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new le(e)}return F(y,[{key:"drawYaxis",value:function(e){var t=this.w,i=new z(this.ctx),a=t.config.yaxis[e].labels.style,r=a.fontSize,s=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(t.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return o;var h=i.group({class:"apexcharts-yaxis-texts-g"});o.add(h);var c=t.globals.yAxisScale[e].result.length-1,d=t.globals.gridHeight/c,g=t.globals.yLabelFormatters[e],p=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){var x=t.globals.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?x=0:"heatmap"===t.config.chart.type&&(x-=d/2),x+=parseInt(r,10)/3;for(var f=c;f>=0;f--){var m=g(p[f],f,t),v=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&0!==t.config.yaxis.length&&(v*=-1);var w=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),l=this.axesUtils.getYAxisForeColor(a.colors,e),u=Array.isArray(l)?l[f]:l,b=P.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(k){return k.textContent}),A=i.drawText({x:v,y:x,text:b.includes(m)?"":m,textAnchor:w,fontSize:r,fontFamily:s,fontWeight:n,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:u,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});h.add(A),this.addTooltip(A,m),0!==t.config.yaxis[e].labels.rotate&&this.rotateLabel(i,A,firstLabel,t.config.yaxis[e].labels.rotate),x+=d}}return this.addYAxisTitle(i,o,e),this.addAxisBorder(i,o,e,c,d),o}},{key:"getTextAnchor",value:function(e,t){return"left"===e?"start":"center"===e?"middle":"right"===e?"end":t?"start":"end"}},{key:"addTooltip",value:function(e,t){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(t)?t.join(" "):t,e.node.appendChild(i)}},{key:"rotateLabel",value:function(e,t,i,a){var r=e.rotateAroundCenter(i.node),s=e.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(".concat(a," ").concat(r.x," ").concat(s.y,")"))}},{key:"addYAxisTitle",value:function(e,t,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var r=e.group({class:"apexcharts-yaxis-title"}),n=e.drawText({x:a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});r.add(n),t.add(r)}}},{key:"addAxisBorder",value:function(e,t,i,a,r){var s=this.w,n=s.config.yaxis[i].axisBorder,o=31+n.offsetX;if(s.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var h=e.drawLine(o,s.globals.translateY+n.offsetY-2,o,s.globals.gridHeight+s.globals.translateY+n.offsetY+2,n.color,0,n.width);t.add(h)}s.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,s.config.yaxis[i].axisTicks,i,r,t)}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new z(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(r);var s=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/s+.1,o=n+t.config.xaxis.labels.offsetX,h=t.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),d=t.globals.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),s=(c=d.slice()).length),t.config.xaxis.labels.show)for(var g=d.length?0:s;d.length?g=0;d.length?g++:g--){var p=h(c[g],g,t),x=t.globals.gridWidth+t.globals.padHorizontal-(o-n+t.config.xaxis.labels.offsetX);if(d.length){var f=this.axesUtils.getLabel(c,d,x,g,this.drawnLabels,this.xaxisFontSize);x=f.x,p=f.text,this.drawnLabels.push(f.text),0===g&&t.globals.skipFirstTimelinelabel&&(p=""),g===c.length-1&&t.globals.skipLastTimelinelabel&&(p="")}var m=i.drawText({x,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:p,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 ".concat(t.config.xaxis.labels.style.cssClass)});r.add(m),m.tspan(p),this.addTooltip(m,p),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new z(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var r=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(r-=15);var s=i.drawLine(t.globals.padHorizontal+r+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(s):e.add(s)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new z(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=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 ".concat(t.config.xaxis.title.style.cssClass)});a.add(r),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new z(this.ctx),r=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),s=r?r.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var h=this.xPaddingForYAxisTitle(e,s,o,t);n.setAttribute("x",h.xPos-(t?10:0));var c=a.rotateAroundCenter(n);n.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 r=this.w,s=0,n=10;return void 0===r.config.yaxis[e].title.text||e<0?{xPos:s,padd:0}:(a?s=t.width+r.config.yaxis[e].title.offsetX+i.width/2+n/2:(s=-1*t.width+r.config.yaxis[e].title.offsetX+n/2+i.width/2,r.globals.isBarHorizontal&&(s=-1*t.width-r.config.yaxis[e].title.offsetX-(n=25))),{xPos:s,padd:n})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,r=0,s=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach(function(o,h){var c=i.globals.ignoreYAxisIndexes.includes(h)||!o.show||o.floating||0===e[h].width,d=e[h].width+t[h].width;o.opposite?i.globals.isBarHorizontal?i.globals.translateYAxisX[h]=(r=i.globals.gridWidth+i.globals.translateX-1)-o.labels.offsetX:(r=i.globals.gridWidth+i.globals.translateX+n,c||(n+=d+20),i.globals.translateYAxisX[h]=r-o.labels.offsetX+20):(a=i.globals.translateX-s,c||(s+=d+20),i.globals.translateYAxisX[h]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;P.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(t,i){var a=e.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var r=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),s=P.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=r.getBoundingClientRect();s.forEach(function(o){o.setAttribute("text-anchor",a.labels.align)}),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?r.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&r.setAttribute("transform","translate(".concat(n.width,", 0)")):r.setAttribute("transform","translate(-".concat(n.width,", 0)"))}})}}]),y}(),vt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.documentEvent=P.bind(this.documentEvent,this)}return F(y,[{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);-1!==a&&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],r=a.length,s=0;s0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(r){return r.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(qe,i);this.w.globals.locale=a.options}}]),y}(),wt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"drawAxis",value:function(e,t){var i,a,r=this,s=this.w.globals,n=this.w.config,o=new ve(this.ctx,t),h=new Ee(this.ctx,t);s.axisCharts&&"radar"!==e&&(s.isBarHorizontal?(a=h.drawYaxisInversed(0),i=o.drawXaxisInversed(0),s.dom.elGraphical.add(i),s.dom.elGraphical.add(a)):(i=o.drawXaxis(),s.dom.elGraphical.add(i),n.yaxis.map(function(c,d){if(-1===s.ignoreYAxisIndexes.indexOf(d)&&(a=h.drawYaxis(d),s.dom.Paper.add(a),"back"===r.w.config.grid.position)){var g=s.dom.Paper.children()[1];g.remove(),s.dom.Paper.add(g)}})))}}]),y}(),Ye=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new z(this.ctx),i=new K(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,g=r.enabled,p=r.left,x=r.top,f=r.blur,m=r.color,v=r.opacity,w=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===e.config.xaxis.crosshairs.fill.type&&(w=t.drawGradient("vertical",a.colorFrom,a.colorTo,a.opacityFrom,a.opacityTo,null,a.stops,null));var l=t.drawRect();1===e.config.xaxis.crosshairs.width&&(l=t.drawLine());var u=e.globals.gridHeight;(!P.isNumber(u)||u<0)&&(u=0);var b=e.config.xaxis.crosshairs.width;(!P.isNumber(b)||b<0)&&(b=0),l.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:u,width:b,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:p,top:x,blur:f,color:m,opacity:v})),e.globals.dom.elGraphical.add(l)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new z(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(r)}var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);s.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(s)}}]),y}(),kt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var r=a.responsive.slice();r.sort(function(h,c){return h.breakpoint>c.breakpoint?1:c.breakpoint>h.breakpoint?-1:0}).reverse();var s=new me({}),n=function(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=window.innerWidth>0?window.innerWidth:screen.width;if(d>r[0].breakpoint){var g=P.clone(i.globals.initialConfig);g.series=P.clone(i.config.series);var p=Z.extendArrayProps(s,g,i);h=P.extend(p,h),h=P.extend(i.config,h),t.overrideResponsiveOptions(h)}else for(var x=0;x0&&"function"==typeof e[0]?(this.isColorFn=!0,i.config.series.map(function(a,r){var s=e[r]||e[0];return"function"==typeof s?s({value:i.globals.axisCharts?i.globals.series[r][0]||0:i.globals.series[r],seriesIndex:r,dataPointIndex:r,w:t.w}):s})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,t){e.forEach(function(i,a){i&&(t[a]=i)})}},{key:"getMonochromeColors",value:function(e,t,i){var a=e.color,s=e.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,o=1/(n/e.shadeIntensity),h=0;return Array.from({length:n},function(){var c=i.shadeColor("dark"===s?-1*h:h,a);return h+=o,c})}},{key:"applyColorTypes",value:function(e,t){var i=this,a=this.w;e.forEach(function(r){a.globals[r].colors=void 0===a.config[r].colors?i.isColorFn?a.config.colors:t:a.config[r].colors.slice(),i.pushExtraColors(a.globals[r].colors)})}},{key:"applyDataLabelsColors",value:function(e){var t=this.w;t.globals.dataLabels.style.colors=void 0===t.config.dataLabels.style.colors?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=void 0===e.config.plotOptions.radar.polygons.fill.colors?["dark"===e.config.theme.mode?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var t=this.w;t.globals.markers.colors=void 0===t.config.markers.colors?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=t||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(r=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.lengthe.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){a=t.config.dataLabels.formatter(t.globals.series[h][d],{ctx:e.dCtx.ctx,seriesIndex:h,dataPointIndex:d,w:t}),i.push(a)})});var a=P.getLargestStringFromArr(i),r=new z(this.dCtx.ctx),s=t.config.dataLabels.style,n=r.getTextRects(a,parseInt(s.fontSize),s.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(s,n){return Array.isArray(s)?s.length:1}),r=Math.max.apply(Math,$(a));i=t[a.indexOf(r)]}return i}}]),y}(),Lt=function(){function y(e){Y(this,y),this.w=e.w,this.dCtx=e}return F(y,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(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="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var r=t.globals.xLabelFormatter,s=P.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,i);t.globals.isBarHorizontal&&(n=s=t.globals.yAxisScale[0].result.reduce(function(x,f){return x.length>f.length?x:f},0));var o=new xe(this.dCtx.ctx),h=s;s=o.xLabelFormat(r,s,h,{i:void 0,dateFormatter:new Q(this.dCtx.ctx).formatDate,w:t}),n=o.xLabelFormat(r,n,h,{i:void 0,dateFormatter:new Q(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===s||""===String(s).trim())&&(n=s="1");var c=new z(this.dCtx.ctx),d=c.getTextRects(s,t.config.xaxis.labels.style.fontSize),g=d;if(s!==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&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var p=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=p(s),s!==n&&(g=p(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=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,r=t.globals.groups.map(function(d){return d.title}),s=P.getLargestStringFromArr(r),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,r),o=new z(this.dCtx.ctx),h=o.getTextRects(s,a),c=h;return s!==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(void 0!==e.config.xaxis.title.text){var a=new z(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(r){return r.value}),a=i.reduce(function(r,s){return void 0===r?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>s.length?r:s},0);return 1.05*(e=new z(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,r=i.config,s=r.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal;r.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left1&&-1!==a.collapsedSeriesIndices.indexOf(d)||function(g){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var f=t.dCtx.timescaleLabels[0].position-n/1.75+t.dCtx.yAxisWidthLeft;t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight>a.svgWidth-a.translateX-("right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0)&&(a.skipLastTimelinelabel=!0),f<-(g.show&&!g.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===s?t.dCtx.gridPad.right(null===(k=String(d(b,o)))||void 0===k?void 0:k.length)?u:b},h.niceMin===Number.MIN_VALUE?0:h.niceMin),x=p=d(p,o);if(void 0!==p&&0!==p.length||(p=h.niceMax),t.globals.isBarHorizontal){a=0;var f=t.globals.labels.slice();p=P.getLargestStringFromArr(f),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),x=e.dCtx.dimHelpers.getLargestStringFromMultiArr(p,f)}var m=new z(e.dCtx.ctx),v="rotate(".concat(s.labels.rotate," 0 0)"),w=m.getTextRects(p,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1),l=w;p!==x&&(l=m.getTextRects(x,s.labels.style.fontSize,s.labels.style.fontFamily,v,!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,i=[];return this.w.config.yaxis.map(function(a,r){if(a.show&&void 0!==a.title.text){var s=new z(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),o=s.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,r=e.globals.yAxisScale.length>1?10:0,s=new le(this.dCtx.ctx),n=function(o,h){var c=e.config.yaxis[h].floating,d=0;o.width>0&&!c?(d=o.width+r,e.globals.ignoreYAxisIndexes.indexOf(h)>-1&&(d=d-o.width-r)):d=c||s.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}}]),y}(),Mt=function(){function y(e){Y(this,y),this.w=e.w,this.dCtx=e}return F(y,[{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 r=function(p){return["bar","rangeBar","candlestick","boxPlot"].includes(p)},s=i.chart.type,n=0,o=r(s)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach(function(p){r(p.type)&&(o-=1)}),i.chart.stacked&&(o=1);var h=r(s)||a.comboBarCount>0,c=Math.abs(a.initialMaxX-a.initialMinX);if(h&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==c){c<=3&&(c=a.dataPoints);var d=c/e,g=a.minXDiff&&a.minXDiff/d>0?a.minXDiff/d:0;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||!i.axisCharts?0:10;["title","subtitle"].forEach(function(n){a+=void 0!==t.config[n].text?t.config[n].margin:e.dCtx.isSparkline||!i.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||i.axisCharts||(a+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),s=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=r.height+s.height+a,i.translateY+=r.height+s.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new le(this.dCtx.ctx);i.config.yaxis.forEach(function(r,s){-1!==i.globals.ignoreYAxisIndexes.indexOf(s)||r.floating||a.isYAxisHidden(s)||(r.opposite&&(i.globals.translateX-=t[s].width+e[s].width+parseInt(r.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),y}(),Ce=function(){function y(e){Y(this,y),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 Ct(this),this.dimYAxis=new Pt(this),this.dimXAxis=new Lt(this),this.dimGrid=new Mt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return F(y,[{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,$(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(s){var n=je(s,2);e.gridPad[n[0]]=Math.max(n[1],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 r=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*r,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(r>0?r: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(),r=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(p,x){t.globals.yLabelsCoords.push({width:a[x].width,index:x}),t.globals.yTitleCoords.push({width:r[x].width,index:x})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var s=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(s,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-s.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===t.config.chart.type||this.isSparkline)&&(h=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(h=0,c=0,d=0),this.isSparkline||"treemap"===t.config.chart.type||this.dimXAxis.additionalPaddingXLabels(s);var g=function(){i.translateX=h+e.datalabelsCoords.width,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-h-2*e.datalabelsCoords.width};switch("top"===t.config.xaxis.position&&(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(r,a),new Ee(this.ctx).setYAxisXPosition(a,r)}},{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 r="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",s=i.plotOptions[r].offsetY,n=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating){t.gridHeight=t.svgHeight;var o=t.dom.elWrap.getBoundingClientRect().width;return t.gridWidth=Math.min(o,t.gridHeight),t.translateY=s,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2)}switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height,t.gridWidth=t.svgWidth,t.translateY=s-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+s+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w;this.xAxisHeight=(i.height+e.height+t.height)*(a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO)+(a.globals.hasXaxisGroups?2:1)*(a.globals.rotateXLabels?22:10)+(a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0),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.xAxisHeightd&&(this.yAxisWidth=d)}}]),y}(),It=function(){function y(e){Y(this,y),this.w=e.w,this.lgCtx=e}return F(y,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var r=(null===(e=this.lgCtx.ctx)||void 0===e||null===(t=e.opts)||void 0===t||null===(i=t.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;r&&a.setAttribute("nonce",r);var s=document.createTextNode("\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }");return a.appendChild(s),a}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect();return{clwh:e.height,clww:e.width}}},{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||"radialBar"===a.config.chart.type){a.globals.resized=!0;var r=null,s=null;a.globals.risingSeries=[],a.globals.axisCharts?(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),s=parseInt(r.getAttribute("data:realIndex"),10)):(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),s=parseInt(r.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,s)}):this.hideSeries({seriesEl:r,realIndex:s})}else{var n=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var h=a.config.plotOptions.pie.donut.labels;new z(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,r=P.clone(i.config.series);if(a.axisCharts){var s=i.config.yaxis[a.seriesYAxisReverseMap[t]],n={index:t,data:r[t].data.slice(),type:r[t].type||i.config.chart.type};if(s&&s.show&&s.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:r[t]}),a.collapsedSeriesIndices.push(t);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(r)}},{key:"hideSeries",value:function(e){for(var t=e.seriesEl,a=this.w,r=this.getSeriesAfterCollapsing({realIndex:e.realIndex}),s=t.childNodes,n=0;n0){for(var s=0;s1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var t=e.i,i=e.fillcolor,a=this.w,r=document.createElement("span");r.classList.add("apexcharts-legend-marker");var s=a.config.legend.markers.shape||a.config.markers.shape,n=s;Array.isArray(s)&&(n=s[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=r.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]&&(r.innerHTML=a.config.legend.markers.customHTML[t]()):r.innerHTML=a.config.legend.markers.customHTML();else{var p=new de(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:t,strokeWidth:d,size:o}),x=SVG(r).size("100%","100%"),f=new z(this.ctx).drawMarker(0,0,E(E({},p),{},{pointFillColor:Array.isArray(i)?i[t]:p.pointFillColor,shape:n}));SVG.select(".apexcharts-legend-marker.apexcharts-marker").members.forEach(function(m){m.node.style.transform=m.node.classList.contains("apexcharts-marker-triangle")?"translate(50%, 45%)":"translate(50%, 50%)"}),x.add(f)}return r}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,r=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if("heatmap"===t.config.chart.type){var s=t.config.plotOptions.heatmap.colorScale.ranges;a=s.map(function(b){return b.name?b.name:b.from+" - "+b.to}),r=s.map(function(b){return b.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,p=!1;if(t.globals.collapsedSeries.length>0)for(var x=0;x0)for(var f=0;f0?h-10:0)+(c>0?c-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetY,a.style.left=(s=s+e+i.config.legend.offsetX)+"px",a.style.top=n+"px","right"===i.config.legend.position&&(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=new Ce(this.ctx),i=t.dimHelpers.getTitleSubtitleCoords("title"),a=t.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"top"===e.config.legend.position&&(r=i.height+a.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;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(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("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new se(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new se(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="true"===e.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var s=this.w.config.legend.markers.onClick;"function"==typeof s&&e.target.classList.contains("apexcharts-legend-marker")&&(s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),y}(),tt=function(){function y(e){Y(this,y),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 F(y,[{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 r=0;r\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(d){e.t[d]&&t.config.chart[d].enabled&&s.push({el:"zoom"===d?e.elZoom:e.elSelection,icon:"string"==typeof e.t[d]?e.t[d]:"zoom"===d?'\n \n \n \n':'\n \n \n',title:e.localeValues["zoom"===d?"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&&s.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&s.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;hthis.wheelDelay&&(this.executeMouseWheelZoom(i),r.globals.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){s-r.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),r.globals.lastWheelExecution=s)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var s=null===(a=this.gridRect)||void 0===a?void 0:a.getBoundingClientRect();if(s){var n,o,h,d=this.minX,g=this.maxX,p=g-d;if(i.deltaY<0){var x=d+(i.clientX-s.left)/s.width*p;o=x-(n=.5*p)/2,h=x+n/2}else o=d-(n=1.5*p)/2,h=g+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),h=Math.min(h,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(h-o0&&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(null!=i.globals.selection)this.drawSelectionRect(i.globals.selection);else if(void 0!==i.config.chart.selection.xaxis.min&&void 0!==i.config.chart.selection.xaxis.max){var r=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,s=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-r;i.globals.isRangeBar&&(r=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,s=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio),this.drawSelectionRect({x:r,y:0,width:s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof i.config.chart.events.selection&&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,r=i.y,s=i.width,n=i.height,o=i.translateX,c=i.translateY,g=this.w,p=this.zoomRect,x=this.selectionRect;if(this.dragged||null!==g.globals.selection){var f={transform:"translate("+(void 0===o?0:o)+", "+(void 0===c?0:c)+")"};g.globals.zoomEnabled&&this.dragged&&(s<0&&(s=1),p.attr({x:a,y:r,width:s,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}),z.setAttrs(p.node,f)),g.globals.selectionEnabled&&(x.attr({x:a,y:r,width:s>0?s: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}),z.setAttrs(x.node,f))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var f,r=i.zoomtype,s=this.w,n=i.context,o=this.gridRect.getBoundingClientRect(),h=n.startX-1,c=n.startY,d=!1,g=!1,p=n.clientX-o.left-h,x=n.clientY-o.top-c;return Math.abs(p+h)>s.globals.gridWidth?p=s.globals.gridWidth-h:n.clientX-o.left<0&&(p=h),h>n.clientX-o.left&&(d=!0,p=Math.abs(p)),c>n.clientY-o.top&&(g=!0,x=Math.abs(x)),n.drawSelectionRect(f="x"===r?{x:d?h-p:h,y:0,width:p,height:s.globals.gridHeight}:"y"===r?{x:0,y:g?c-x:c,width:s.globals.gridWidth,height:x}:{x:d?h-p:h,y:g?c-x:c,width:p,height:x}),n.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(i,a){var r=this,s=this.w,n=this.xyRatios,o=this.selectionRect,h=0;"resizing"===i&&(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")};s.globals.selection=d,"function"==typeof s.config.chart.events.selection&&s.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g,p,x,f,m=r.gridRect.getBoundingClientRect(),v=o.node.getBoundingClientRect();s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+(v.left-m.left)*n.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+(v.right-m.left)*n.invertedYRatio,x=0,f=1):(g=s.globals.xAxisScale.niceMin+(v.left-m.left)*n.xRatio,p=s.globals.xAxisScale.niceMin+(v.right-m.left)*n.xRatio,x=s.globals.yAxisScale[0].niceMin+(m.bottom-v.bottom)*n.yRatio[0],f=s.globals.yAxisScale[0].niceMax-(v.top-m.top)*n.yRatio[0]);var w={xaxis:{min:g,max:p},yaxis:{min:x,max:f}};s.config.chart.events.selection(r.ctx,w),s.config.chart.brush.enabled&&void 0!==s.config.chart.events.brushScrolled&&s.config.chart.events.brushScrolled(r.ctx,w)},h))}},{key:"selectionDrawn",value:function(i){var r=i.zoomtype,s=this.w,n=i.context,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,p=void 0;s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=s.globals.xAxisScale.niceMin+n.startX*o.xRatio,p=s.globals.xAxisScale.niceMin+n.endX*o.xRatio);var x=[],f=[];if(s.config.yaxis.forEach(function(A,k){var S=s.globals.seriesYAxisMap[k][0];x.push(s.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.startY),f.push(s.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==p)if(s.globals.zoomEnabled){var m=P.clone(s.globals.initialConfig.yaxis),v=P.clone(s.globals.initialConfig.xaxis);if(s.globals.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),p=Math.floor(p),g<1&&(g=1,p=s.globals.dataPoints),p-g<2&&(p=g+1)),"xy"!==r&&"x"!==r||(v={min:g,max:p}),"xy"!==r&&"y"!==r||m.forEach(function(A,k){m[k].min=f[k],m[k].max=x[k]}),h){var w=h.getBeforeZoomRange(v,m);w&&(v=w.xaxis?w.xaxis:v,m=w.yaxis?w.yaxis:m)}var l={xaxis:v};s.config.chart.group||(l.yaxis=m),n.ctx.updateHelpers._updateOptions(l,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof s.config.chart.events.zoomed&&h.zoomCallback(v,m)}else if(s.globals.selectionEnabled){var u,b=null;u={min:g,max:p},"xy"!==r&&"y"!==r||(b=P.clone(s.config.yaxis)).forEach(function(A,k){b[k].min=f[k],b[k].max=x[k]}),s.globals.selection=n.selection,"function"==typeof s.config.chart.events.selection&&s.config.chart.events.selection(n.ctx,{xaxis:u,yaxis:b})}}},{key:"panDragging",value:function(i){var r=this.w,s=i.context;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-s.clientX,o=r.globals.lastClientPosition.y-s.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")}r.globals.lastClientPosition={x:s.clientX,y:s.clientY},r.config.xaxis.convertedCatToNumeric||s.panScrolled(r.globals.isRangeBar?r.globals.minY:r.globals.minX,r.globals.isRangeBar?r.globals.maxY:r.globals.maxX)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,r=i.globals.maxX,s=(i.globals.maxX-i.globals.minX)/2;"left"===this.moveDirection?(a=i.globals.minX+s,r=i.globals.maxX+s):"right"===this.moveDirection&&(a=i.globals.minX-s,r=i.globals.maxX-s),a=Math.floor(a),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:a,max:r}},a,r)}},{key:"panScrolled",value:function(i,a){var r=this.w,s=this.xyRatios,n=P.clone(r.globals.initialConfig.yaxis),o=s.xRatio,h=r.globals.minX,c=r.globals.maxX;r.globals.isRangeBar&&(o=s.invertedYRatio,h=r.globals.minY,c=r.globals.maxY),"left"===this.moveDirection?(i=h+r.globals.gridWidth/15*o,a=c+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(i=h-r.globals.gridWidth/15*o,a=c-r.globals.gridWidth/15*o),r.globals.isRangeBar||(ir.globals.initialMaxX)&&(i=h,a=c);var d={xaxis:{min:i,max:a}};r.config.chart.group||(d.yaxis=n),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,r){var s=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),"function"==typeof s.config.chart.events.scrolled&&s.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:r}})}}]),t}(),it=function(){function y(e){Y(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return F(y,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,a=e.clientX,r=e.clientY,s=this.w,n=e.elGrid.getBoundingClientRect(),o=n.width,h=n.height,c=o/(s.globals.dataPoints-1),d=h/s.globals.dataPoints,g=this.hasBars();!s.globals.comboCharts&&!g||s.config.xaxis.convertedCatToNumeric||(c=o/s.globals.dataPoints);var p=a-n.left-s.globals.barPadForNumericAxis,x=r-n.top;p<0||x<0||p>o||x>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):s.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):s.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(p/c),m=Math.floor(x/d);g&&!s.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(p/c),f-=1);var v=null,w=null,l=s.globals.seriesXvalues.map(function(S){return S.filter(function(L){return P.isNumber(L)})}),u=s.globals.seriesYvalues.map(function(S){return S.filter(function(L){return P.isNumber(L)})});if(s.globals.isXNumeric){var b=this.ttCtx.getElGrid().getBoundingClientRect(),A=p*(b.width/o);v=(w=this.closestInMultiArray(A,x*(b.height/h),l,u)).index,f=w.j,null!==v&&(f=(w=this.closestInArray(A,l=s.globals.seriesXvalues[v])).index)}return s.globals.capturedSeriesIndex=null===v?-1:v,(!f||f<1)&&(f=0),s.globals.capturedDataPointIndex=s.globals.isBarHorizontal?m:f,{capturedSeries:v,j:s.globals.isBarHorizontal?m:f,hoverX:p,hoverY:x}}},{key:"closestInMultiArray",value:function(e,t,i,a){var s=0,n=null,o=-1;this.w.globals.series.length>1?s=this.getFirstActiveXArray(i):n=0;var c=Math.abs(e-i[s][0]);if(i.forEach(function(p){p.forEach(function(x,f){var m=Math.abs(e-x);m<=c&&(c=m,o=f)})}),-1!==o){var g=Math.abs(t-a[s][o]);n=s,a.forEach(function(p,x){var f=Math.abs(t-p[o]);f<=g&&(g=f,n=x)})}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(s,n){return s.length>0?n:-1}),r=0;r0)for(var a=0;a *"):".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=$(e)).sort(function(i,a){var r=Number(i.getAttribute("data:realIndex")),s=Number(a.getAttribute("data:realIndex"));return sr?-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")),r=e.getAttribute("shape");return new z(this.ctx).getMarkerPath(i,a,r,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 void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,r=0;r ').concat(C.attrs.name,""),L+="
".concat(C.val,"
")}),l.innerHTML=S+"",u.innerHTML=L+""};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?b():(l.innerHTML="",u.innerHTML=""):b()}else l.innerHTML="",u.innerHTML="";if(null!==f&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),n&&m[0]){if(h.config.tooltip.hideEmptySeries){var A=a[t].querySelector(".apexcharts-tooltip-marker"),k=a[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(d)?(A.style.display="none",k.style.display="none"):(A.style.display="block",k.style.display="block")}m[0].parentNode.style.display=null==d||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(t)?"none":h.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(t)&&(m[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,r=this.ctx.series.filteredSeriesX(),s="",n="",o=null,h=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?h=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(s=r[t][i],0===r[t].length&&(s=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):s=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var g=s;return s=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new xe(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new Q(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,c):a.globals.xLabelFormatter(g,c),void 0!==a.config.tooltip.x.formatter&&(s=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="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(g,c):s,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(s)?s.join(" "):s,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,r=e.y2,s=e.w,n=this.ttCtx.getElTooltip(),o=s.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:s.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:r,w:s})}}]),y}(),at=function(){function y(e){Y(this,y),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return F(y,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,r=i.getElXCrosshairs(),s=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==t&&(s=a.globals.gridWidth/n*t),null===r||a.globals.isBarHorizontal||(r.setAttribute("x",s),r.setAttribute("x1",s),r.setAttribute("x2",s),r.setAttribute("y2",a.globals.gridHeight),r.classList.add("apexcharts-active")),s<0&&(s=0),s>a.globals.gridWidth&&(s=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=s;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&z.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&z.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var r,a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;e-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(e)||(e+=t.globals.translateX,r=new z(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=r.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;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),r=t.globals.translateY+a,s=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),r-=s/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=r+"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&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=this.ttCtx,s=r.getElTooltip(),n=r.tooltipRect,o=null!==i?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=r.getElGrid().getBoundingClientRect();(h=r.e.clientX-d.left)>a.globals.gridWidth/2&&(h-=r.tooltipRect.ttWidth),(c=r.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=r.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(s.style.left=(h+=a.globals.translateX)+"px",s.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 r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),s=0;s0){var x=p.getAttribute("shape"),f=h.getMarkerPath(r,s,x,1.5*d);p.setAttribute("d",f)}this.moveXCrosshairs(r),o.fixedTooltip||this.moveTooltip(r,s,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,r=0,s=0,n=a.globals.pointsArray,o=new se(this.ctx),h=new z(this.ctx);t=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(r=n[t][e][0],s=n[t][e][1]);var d=i.tooltipUtil.getAllMarkers();if(null!==d)for(var g=0;g0){var w=h.getMarkerPath(r,x,m,c);d[g].setAttribute("d",w)}else d[g].setAttribute("d","")}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,s||a.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,r=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,s=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;i.globals.isBarHorizontal&&(s=new se(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"']"));n||"number"!=typeof t||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .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-=r%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)}}]),y}(),Xt=function(){function y(e){Y(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new at(e)}return F(y,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new z(this.ctx),i=new de(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=$(a),e.config.chart.stacked&&a.sort(function(d,g){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(g.getAttribute("data:realIndex"))});for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(e,t);var s=t.getAttribute("cx"),n=t.getAttribute("cy");if(null!==i&&null!==a&&(s=i,n=a),this.tooltipPosition.moveXCrosshairs(s),!this.fixedTooltip){if("radar"===r.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();s=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(s,n,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,r=e,s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o=0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),y}(),Et=function(){function y(e){Y(this,y),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&"rangeBar"===t.config.chart.type&&t.config.plotOptions.bar.rangeBarGroupRows}return F(y,[{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,r=e.y,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(e.type,"-rect"))){var h=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=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+p,r=g+n.tooltipRect.ttHeight/2-x/2,n.tooltipPosition.moveXCrosshairs(d+p/2),a>o.globals.gridWidth/2&&(a=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){var f=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-f.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),r=o.globals.clientY-f.top-(r>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:r}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=e.x,n=e.y,o=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(r.paths.getAttribute("cx"),10),d=parseInt(r.paths.getAttribute("cy"),10),g=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),t=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var p=P.findAncestor(r.paths,"apexcharts-series");p&&(t=parseInt(p.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:t,j:i,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&h.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,s=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,r.paths,s,n)}return{x:s,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=this.ttCtx,o=n.getElTooltip(),h=0,c=0,d=0,g=this.getBarTooltipXY({e:a,opt:r}),p=g.j;if(s.globals.capturedSeriesIndex=t=g.i,s.globals.capturedDataPointIndex=p,s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!s.config.tooltip.shared?(c=g.x,d=g.y,i=Array.isArray(s.config.stroke.width)?s.config.stroke.width[t]:s.config.stroke.width,h=c):s.globals.comboCharts||s.config.tooltip.shared||(h/=2),isNaN(d)&&(d=s.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),c+n.tooltipRect.ttWidth>s.globals.gridWidth?c-=n.tooltipRect.ttWidth:c<0&&(c=0),n.w.config.tooltip.followCursor){var f=n.getElGrid().getBoundingClientRect();d=n.e.clientY-f.top}null===n.tooltip&&(n.tooltip=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||n.tooltipPosition.moveXCrosshairs(s.globals.comboBarCount>0?h+i/2:h),!n.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(d=d+s.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=c+s.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,r=this.w,s=null,n=this.ttCtx,o=0,h=0,c=0,d=0,g=0,p=i.target.classList;if(p.contains("apexcharts-bar-area")||p.contains("apexcharts-candlestick-area")||p.contains("apexcharts-boxPlot-area")||p.contains("apexcharts-rangebar-area")){var x=i.target,f=x.getBoundingClientRect(),m=a.elGrid.getBoundingClientRect(),v=f.height;g=f.height;var w=f.width,l=parseInt(x.getAttribute("cx"),10),u=parseInt(x.getAttribute("cy"),10);d=parseFloat(x.getAttribute("barWidth"));var b="touchmove"===i.type?i.touches[0].clientX:i.clientX;s=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");r.globals.comboCharts&&(o=parseInt(x.parentNode.getAttribute("data:realIndex"),10));var S=function(C){return r.globals.isXNumeric?l-w/2:t.isVerticalGroupedRangeBar?l+w/2:l-n.dataPointsDividedWidth+w/2},L=function(){return u-n.dataPointsDividedHeight+v/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:s,y1:A?parseInt(A,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&r.config.tooltip.shared,e:i}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(h=b-m.left+15,c=L()):(h=S(),c=i.clientY-m.top-n.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((h=l)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,r=this.w,s=r.globals,n=s.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&n.length>0){var o=s.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],p=s.maxYArr[c]-s.minYArr[c],x=s.minYArr[c]+(p-g);r.config.yaxis[e].reversed&&(x=s.maxYArr[c]-(p-g)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=o(x),a.tooltipPosition.moveYAxisTooltip(e)}}}]),y}(),st=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new it(this),this.tooltipLabels=new zt(this),this.tooltipPosition=new at(this),this.marker=new Xt(this),this.intersect=new Et(this),this.axesTooltip=new Yt(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 F(y,[{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(s,n){return!!(s.show&&s.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 ve(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||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 r=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],r=this.getElTooltip(),s=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 p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(g,"-group"));var x=document.createElement("span");x.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),p.appendChild(x);var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),p.appendChild(f),d.appendChild(p)}),h.appendChild(d),r.appendChild(h),a.push(h)},n=0;n0&&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,r=i.height+10,s=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(s=s+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-r-10),t.style.left=s+"px",t.style.top=n+"px",{x:s,y:n,ttWidth:a,ttHeight:r}}},{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(s){var n={paths:e[s],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[s].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},r=0;r=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=[],r=this.w;r.config.chart.group&&(a=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(a.length?a.forEach(function(s){var n=i.getElTooltip(s);s.w.globals.minX===i.w.globals.minX&&s.w.globals.maxX===i.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:{paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:s.w.globals.tooltip.ttItems},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,r=e.e,s=t.w,n=this.getElTooltip(t);n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=r,i.tooltipUtil.hasBars()&&!s.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new se(t).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),s.globals.axisCharts?i.axisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=r.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,h="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=o,s.globals.capturedSeriesIndex=-1,s.globals.capturedDataPointIndex=-1,hn.top+n.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){var c=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(r)}var d=this.getElTooltip(),g=this.getElXCrosshairs(),p=[];s.config.chart.group&&(p=this.ctx.getSyncedCharts());var x=s.globals.xyCharts||"bar"===s.config.chart.type&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.globals.series.length)return;null!==g&&g.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter(function(w){return!0===w});if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),x&&!this.showOnIntersect||p.length>1)this.handleStickyTooltip(a,o,h,r);else if("heatmap"===s.config.chart.type||"treemap"===s.config.chart.type){var m=this.intersect.handleHeatTreeTooltip({e:a,opt:r,x:t,y:i,type:s.config.chart.type});i=m.y,d.style.left=(t=m.x)+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:r,x:t,y:i});if(this.yaxisTooltips.length)for(var v=0;vh.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||r.globals.isBarHorizontal){var c=r.globals.series.findIndex(function(d,g){return!r.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,c,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var r=this.w;if(this.tConfig.shared||null!==r.globals.series[t][a]){if(void 0!==r.globals.series[t][a])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 s=r.globals.series.findIndex(function(n,o){return!r.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,s,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new z(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,k=this.w,S=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===A&&(A=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(i),C=this.tooltipUtil.getElBars();if(k.config.legend.tooltipHoverFormatter){var M=k.config.legend.tooltipHoverFormatter,X=Array.from(this.legendLabels);X.forEach(function(U){var q=U.getAttribute("data:default-text");U.innerHTML=decodeURIComponent(q)});for(var I=0;I0?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 z(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;B0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(p-=c*k)),A&&(p=p+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)),m.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===r&&v.enabled){var M=new z(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:a}),f.fontSize);s=L?C-M.height/2-u-v.offsetY+18:C+M.height+u+v.offsetY-18,n=b+(t.globals.isXNumeric?-c*t.globals.barGroups.length/2:t.globals.barGroups.length*c/2-(t.globals.barGroups.length-1)*c-S)+v.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:p,dataLabelsY:x,totalDataLabelsX:n,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,r=e.j,s=e.realIndex,n=e.bcy,o=e.barHeight,h=e.barWidth,c=e.textRects,d=e.dataLabelsX,g=e.strokeWidth,p=e.dataLabelsConfig,x=e.barDataLabelsConfig,f=e.barTotalDataLabelsConfig,m=e.offX,v=e.offY,w=t.globals.gridHeight/t.globals.dataPoints;h=Math.abs(h);var l,u,b=n-(this.barCtx.isRangeBar?0:w)+o/2+c.height/2+v-3,A="start",k=t.globals.series[a][r]<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-m:Math.max(c.width/2,S-h/2)+m;break;case"bottom":d=k?S+h-g-m:S-h+g+m;break;case"top":d=k?S-g-m:S-g+m}if(this.barCtx.lastActiveBarSerieIndex===s&&f.enabled){var L=new z(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),p.fontSize);k?(l=S-g-m-f.offsetX,A="end"):l=S+m+f.offsetX+(this.barCtx.isReversed?-(h+g):g),u=b-c.height/2+L.height/2+f.offsetY+g}return t.config.chart.stacked||("start"===p.textAnchor?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):"middle"===p.textAnchor?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):"end"===p.textAnchor&&(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:b,totalDataLabelsX:l,totalDataLabelsY:u,totalDataLabelsAnchor:A}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,r=e.i,s=e.j,n=e.textRects,o=e.barHeight,h=e.barWidth,c=e.dataLabelsConfig,d=this.w,g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new ge(this.barCtx.ctx),x=new z(this.barCtx.ctx),f=c.formatter,m=null,v=d.globals.collapsedSeriesIndices.indexOf(r)>-1;if(c.enabled&&!v){m=x.group({class:"apexcharts-data-labels",transform:g});var w="";void 0!==a&&(w=f(a,E(E({},d),{},{seriesIndex:r,dataPointIndex:s,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");var l=d.globals.series[r][s]<0,u=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===u&&(c.textAnchor=l?"end":"start"),"center"===u&&(c.textAnchor="middle"),"bottom"===u&&(c.textAnchor=l?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(w=""):n.height/1.6>Math.abs(o)&&(w=""));var b=E({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?b.textAnchor="end":"end"===c.textAnchor&&(b.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:w,i:r,j:s,parent:m,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}},{key:"drawTotalDataLabels",value:function(e){var o,t=e.x,i=e.y,a=e.val,r=e.realIndex,s=e.textAnchor,n=e.barTotalDataLabelsConfig,h=new z(this.barCtx.ctx);return n.enabled&&void 0!==t&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===r&&(o=h.drawText({x:t,y:i,foreColor:n.style.color,text:a,textAnchor:s,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),y}(),Rt=function(){function y(e){Y(this,y),this.w=e.w,this.barCtx=e}return F(y,[{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;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=h.globals.minXDiff/g),(s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(s=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(s=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-s*this.barCtx.seriesLen)/2}return h.globals.barHeight=r,h.globals.barWidth=s,{x:e,y:t,yDivision:i,xDivision:a,barHeight:r,barWidth:s,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 r,s,n,o,h,c=this.w,d=this.barCtx.ctx.fill,g=null,p=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)}),null!==(r=c.config.series[t].data[i])&&void 0!==r&&r.fillColor&&(g=c.config.series[t].data[i].fillColor),d.fillPath({seriesNumber:this.barCtx.barOptions.distributed?p:a,dataPointIndex:i,color:g,value:e[t][i],fillConfig:null===(s=c.config.series[t].data[i])||void 0===s?void 0:s.fill,fillType:null!==(n=c.config.series[t].data[i])&&void 0!==n&&null!==(o=n.fill)&&void 0!==o&&o.type?null===(h=c.config.series[t].data[i])||void 0===h?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,r=this.w;return this.barCtx.isNullValue=null==this.barCtx.series[e][t],r.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&&"last"===t.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===e&&(i=!0):i=!0),i}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,r=e.x2,s=e.y1,n=e.y2,o=e.elSeries,h=this.w,c=new z(this.barCtx.ctx),d=new se(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 p=c.drawRect(void 0!==a?a:0,void 0!==s?s:0,void 0!==r?r:h.globals.gridWidth,void 0!==n?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(p),p.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,r=e.y1,s=e.y2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,p=new z(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var x=i,f=a;null!==(t=g.config.series[h].data[d])&&void 0!==t&&t.columnWidthOffset&&(f=a-g.config.series[h].data[d].columnWidthOffset/2,x=i+g.config.series[h].data[d].columnWidthOffset);var m=n/2,v=f+m,w=f+x-m;s+=.001+m;var l=p.move(v,r+=.001-m),u=p.move(v,r),b=p.line(w,r);if(g.globals.previousPaths.length>0&&(u=this.barCtx.getPreviousPath(h,d,!1)),l=l+p.line(v,s)+p.line(w,s)+p.line(w,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),u=u+p.line(v,r)+b+b+b+b+b+p.line(v,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(h)&&(l=p.roundPathCorners(l,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).yArrj.push(s-m),A.yArrjF.push(Math.abs(r-s+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,r=e.x1,s=e.x2,n=e.strokeWidth,o=e.seriesGroup,h=e.realIndex,c=e.i,d=e.j,g=e.w,p=new z(this.barCtx.ctx);(n=Array.isArray(n)?n[h]:n)||(n=0);var x=i,f=a;null!==(t=g.config.series[h].data[d])&&void 0!==t&&t.barHeightOffset&&(x=i-g.config.series[h].data[d].barHeightOffset/2,f=a+g.config.series[h].data[d].barHeightOffset);var m=n/2,v=x+m,w=x+f-m;s+=.001+m;var l=p.move(r+=.001-m,v),u=p.move(r,v);g.globals.previousPaths.length>0&&(u=this.barCtx.getPreviousPath(h,d,!1));var b=p.line(r,w);if(l=l+p.line(s,v)+p.line(s,w)+b+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),u=u+p.line(r,v)+b+b+b+b+b+p.line(r,v)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(h)&&(l=p.roundPathCorners(l,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[o]).xArrj.push(s+m),A.xArrjF.push(Math.abs(r-s)),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;a2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(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&&void 0!==arguments[3]&&!arguments[3]?null:t;return null!=e&&(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,r,s){var n=this,o=this.w,h=[],c=function(p,x){var f;h.push((we(f={},e,"x"===e?n.getXForValue(p,t,!1):n.getYForValue(p,i,s,!1)),we(f,"attrs",x),f))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][r]&&Array.isArray(o.globals.seriesGoals[a][r])&&o.globals.seriesGoals[a][r].forEach(function(p){c(p.value,p)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,g={strokeHeight:"x"===e?0:o.globals.markers.size[a],strokeWidth:"x"===e?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][r],g),c(o.globals.seriesRangeEnd[a][r],E(E({},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,r=e.goalY,s=e.barWidth,n=e.barHeight,o=new z(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=void 0!==d.attrs.strokeHeight?d.attrs.strokeHeight:n/2,p=i+g+n/2;c=o.drawLine(d.x,p-2*g,d.x,p,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(r)&&r.forEach(function(d){if(d.y>=-1&&d.y<=o.w.globals.gridHeight+1){var g=void 0!==d.attrs.strokeWidth?d.attrs.strokeWidth:s/2,p=t+g+s/2;c=o.drawLine(p-2*g,d.y,p,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,r=this.w,s=t.x,n=t.x1,h=i.x,c=i.x1,d=i.barYPosition,g=t.barYPosition+i.barHeight,p=new z(this.barCtx.ctx),x=new P,f=p.move(n,g)+p.line(s,g)+p.line(h,d)+p.line(c,d)+p.line(n,g)+("around"===r.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return p.drawPath({d:f,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,r=this.w,s=0,n=0;return(r.config.plotOptions.bar.horizontal?r.globals.series.map(function(o,h){return h}):(null===(t=r.globals.columnSeries)||void 0===t?void 0:t.i.map(function(o){return o}))||[]).forEach(function(o){var h=r.globals.seriesPercent[o][a];h&&s++,o-1}),a=this.barCtx.columnGroupIndices,r=a.indexOf(i);return r<0&&(a.push(i),r=a.length-1),{groupIndex:i,columnGroupIndex:r}}}]),y}(),ue=function(){function y(e,t){Y(this,y),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,null!==this.xyRatios&&(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 se(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var r=a.getBarSeriesIndices(),s=new Z(this.ctx);this.stackedSeriesTotals=s.getStackedSeriesTotals(this.w.config.series.map(function(n,o){return-1===r.indexOf(o)?o:-1}).filter(function(n){return-1!==n})),this.barHelpers=new Rt(this)}return F(y,[{key:"draw",value:function(e,t){var i=this.w,a=new z(this.ctx),r=new Z(this.ctx,i);e=r.getLogSeries(e),this.series=e,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var s=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;n0&&(this.visibleI=this.visibleI+1);var u=0,b=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[v],this.translationsIndex=v);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,p=k.x,b=k.barWidth,h=k.xDivision,d=k.zeroH,this.horizontal||m.push(p+b/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":v});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 M=0;M0){var D=this.barHelpers.drawBarShadow({color:"string"==typeof R&&-1===R?.indexOf("url")?R:P.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:I});D&&C.add(D)}this.pathArr.push(I);var H=this.barHelpers.drawGoalLine({barXPosition:I.barXPosition,barYPosition:I.barYPosition,goalX:I.goalX,goalY:I.goalY,barHeight:u,barWidth:b});H&&L.add(H),x=I.y,p=I.x,M>0&&m.push(p+b/2),f.push(x),this.renderSeries({realIndex:v,pathFill:R,j:M,i:n,columnGroupIndex:w,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:X,elSeries:l,x:p,y:x,series:e,barHeight:Math.abs(I.barHeight?I.barHeight:u),barWidth:Math.abs(I.barWidth?I.barWidth:b),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:C,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=f,s.add(l)}return s}},{key:"renderSeries",value:function(e){var H,O,W,t=e.realIndex,i=e.pathFill,a=e.lineFill,r=e.j,s=e.i,n=e.columnGroupIndex,o=e.pathFrom,h=e.pathTo,c=e.strokeWidth,d=e.elSeries,g=e.x,p=e.y,x=e.y1,f=e.y2,m=e.series,v=e.barHeight,w=e.barWidth,l=e.barXPosition,u=e.barYPosition,b=e.elDataLabelsWrap,A=e.elGoalsMarkers,k=e.elBarShadows,S=e.visibleSeries,L=e.type,C=this.w,M=new z(this.ctx);if(!a){var X="function"==typeof C.globals.stroke.colors[t]?(H=t,W=C.config.stroke.colors,Array.isArray(W)&&W.length>0&&((O=W[H])||(O=""),"function"==typeof O)?O({value:C.globals.series[H][r],dataPointIndex:r,w:C}):O):C.globals.stroke.colors[t];a=this.barOptions.distributed?C.globals.stroke.colors[r]:X}C.config.series[s].data[r]&&C.config.series[s].data[r].strokeColor&&(a=C.config.series[s].data[r].strokeColor),this.isNullValue&&(i="none");var T=M.renderPaths({i:s,j:r,realIndex:t,pathFrom:o,pathTo:h,stroke:a,strokeWidth:c,strokeLineCap:C.config.stroke.lineCap,fill:i,animationDelay:r/C.config.chart.animations.animateGradually.delay*(C.config.chart.animations.speed/C.globals.dataPoints)/2.4,initialSpeed:C.config.chart.animations.speed,dataChangeSpeed:C.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area"),chartType:L});T.attr("clip-path","url(#gridRectBarMask".concat(C.globals.cuid,")"));var R=C.config.forecastDataPoints;R.count>0&&r>=C.globals.dataPoints-R.count&&(T.node.setAttribute("stroke-dasharray",R.dashArray),T.node.setAttribute("stroke-width",R.strokeWidth),T.node.setAttribute("fill-opacity",R.fillOpacity)),void 0!==x&&void 0!==f&&(T.attr("data-range-y1",x),T.attr("data-range-y2",f)),new K(this.ctx).setSelectionFilter(T,t,r),d.add(T);var D=new Ft(this).handleBarDataLabels({x:g,y:p,y1:x,y2:f,i:s,j:r,series:m,realIndex:t,columnGroupIndex:n,barHeight:v,barWidth:w,barXPosition:l,barYPosition:u,renderedPath:T,visibleSeries:S});return null!==D.dataLabels&&b.add(D.dataLabels),D.totalDataLabels&&b.add(D.totalDataLabels),d.add(b),A&&d.add(A),k&&d.add(k),d}},{key:"drawBarPaths",value:function(e){var t,n,i=e.indexes,a=e.barHeight,r=e.strokeWidth,s=e.zeroW,o=e.y,h=e.yDivision,c=e.elSeries,d=this.w,g=i.i,p=i.j;if(d.globals.isXNumeric)t=(o=(d.globals.seriesX[g][p]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var x=0,f=0;d.globals.seriesPercent.forEach(function(v,w){v[p]&&x++,w0&&(a=this.seriesLen*a/x),t=o+a*this.visibleI,t-=a*f}else t=o+a*this.visibleI;this.isFunnel&&(s-=(this.barHelpers.getXForValue(this.series[g][p],s)-s)/2),n=this.barHelpers.getXForValue(this.series[g][p],s);var m=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:s,x2:n,strokeWidth:r,series:this.series,realIndex:i.realIndex,i:g,j:p,w:d});return d.globals.isXNumeric||(o+=h),this.barHelpers.barBackground({j:p,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x1:s,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",s,null,g,p),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,r,i=e.indexes,a=e.x,s=e.xDivision,n=e.barWidth,o=e.zeroH,h=e.strokeWidth,c=e.elSeries,d=this.w,g=i.realIndex,p=i.translationsIndex,x=i.i,f=i.j,m=i.bc;if(d.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:a,j:f,realIndex:g,barWidth:n});a=v.x,t=v.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var w=this.barHelpers.getZeroValueEncounters({i:x,j:f}),l=w.nonZeroColumns;l>0&&(n=this.seriesLen*n/l),t=a+n*this.visibleI,t-=n*w.zeroEncounters}else t=a+n*this.visibleI;r=this.barHelpers.getYForValue(this.series[x][f],o,p);var b=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:r,strokeWidth:h,series:this.series,realIndex:g,i:x,j:f,w:d});return d.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({bc:m,j:f,i:x,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:c}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x:a,y:r,goalY:this.barHelpers.getGoalValues("y",null,o,x,f,p),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,r=e.j,s=this.w,n=a;return s.globals.seriesX[a].length||(n=s.globals.maxValsInArrayIndex),s.globals.seriesX[n][r]&&(t=(s.globals.seriesX[n][r]-s.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,r=0;r0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==a.globals.previousPaths[r].paths[t]&&(i=a.globals.previousPaths[r].paths[t].d)}return i}}]),y}(),rt=function(y){fe(t,ue);var e=pe(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var r=this,s=this.w;this.graphics=new z(this.ctx),this.bar=new ue(this.ctx,this.xyRatios);var n=new Z(this.ctx,s);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),"100%"===s.config.chart.stackType&&(i=s.globals.comboCharts?a.map(function(x){return s.globals.seriesPercent[x]}):s.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,f){var m=void 0,v=void 0,w=void 0,l=void 0,u=s.globals.comboCharts?a[x]:x,b=r.barHelpers.getGroupIndex(u),A=b.groupIndex,k=b.columnGroupIndex;r.groupCtx=r[s.globals.seriesGroups[A]];var S=[],L=[],C=0;r.yRatio.length>1&&(r.yaxisIndex=s.globals.seriesYAxisReverseMap[u][0],C=u),r.isReversed=s.config.yaxis[r.yaxisIndex]&&s.config.yaxis[r.yaxisIndex].reversed;var M=r.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(s.globals.seriesNames[u]),rel:x+1,"data:realIndex":u});r.ctx.series.addCollapsedClassToSeries(M,u);var X=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":u}),I=r.graphics.group({class:"apexcharts-bar-goals-markers"}),T=0,R=0,D=r.initialPositions(h,c,m,v,w,l,C);c=D.y,v=D.yDivision,l=D.zeroW,h=D.x,R=D.barWidth,m=D.xDivision,w=D.zeroH,s.globals.barHeight=T=D.barHeight,s.globals.barWidth=R,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every(function(q){return isNaN(q)})&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map(function(){return w}),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map(function(){return 0}));for(var H=0;H1?d=(r=g.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(x).indexOf("%")?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+(r-d)/2}var f=g.globals.barGroups.length||1;return{x:i,y:a,yDivision:s,xDivision:r,barHeight:c/f,barWidth:d/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,h,r=i.indexes,s=i.barHeight,n=i.strokeWidth,o=i.zeroW,c=i.y,g=i.seriesGroup,p=i.yDivision,x=i.elSeries,f=this.w,m=c+i.columnGroupIndex*s,v=r.i,w=r.j,l=r.realIndex,u=r.translationsIndex,b=0,A=0;A0){var S=o;this.groupCtx.prevXVal[k-1][w]<0?S=this.series[v][w]>=0?this.groupCtx.prevX[k-1][w]+b-2*(this.isReversed?b:0):this.groupCtx.prevX[k-1][w]:this.groupCtx.prevXVal[k-1][w]>=0&&(S=this.series[v][w]>=0?this.groupCtx.prevX[k-1][w]:this.groupCtx.prevX[k-1][w]-b+2*(this.isReversed?b:0)),a=S}else a=o;var L=this.barHelpers.getBarpaths({barYPosition:m,barHeight:s,x1:a,x2:h=null===this.series[v][w]?a:a+this.series[v][w]/this.invertedYRatio-2*(this.isReversed?this.series[v][w]/this.invertedYRatio:0),strokeWidth:n,series:this.series,realIndex:r.realIndex,seriesGroup:g,i:v,j:w,w:f});return this.barHelpers.barBackground({j:w,i:v,y1:m,y2:s,elSeries:x}),c+=p,{pathTo:L.pathTo,pathFrom:L.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,v,w,u),barXPosition:a,barYPosition:m,x:h,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var s,a=i.indexes,r=i.x,n=i.xDivision,o=i.barWidth,h=i.zeroH,d=i.seriesGroup,g=i.elSeries,p=this.w,x=a.i,f=a.j,m=a.bc,v=a.realIndex,w=a.translationsIndex;if(p.globals.isXNumeric){var l=p.globals.seriesX[v][f];l||(l=0),r=(l-p.globals.minX)/this.xRatio-o/2*p.globals.barGroups.length}for(var u,b=r+i.columnGroupIndex*o,A=0,k=0;k0&&!p.globals.isXNumeric||S>0&&p.globals.isXNumeric&&p.globals.seriesX[v-1][f]===p.globals.seriesX[v][f]){var L,C,M,X=Math.min(this.yRatio.length+1,v+1);if(void 0!==this.groupCtx.prevY[S-1]&&this.groupCtx.prevY[S-1].length)for(var I=1;I=0?M-A+2*(this.isReversed?A:0):M;break}if((null===(H=this.groupCtx.prevYVal[S-R])||void 0===H?void 0:H[f])>=0){C=this.series[x][f]>=0?M:M+A-2*(this.isReversed?A:0);break}}void 0===C&&(C=p.globals.gridHeight),u=null!==(L=this.groupCtx.prevYF[0])&&void 0!==L&&L.every(function(W){return 0===W})&&this.groupCtx.prevYF.slice(1,S).every(function(W){return W.every(function(N){return isNaN(N)})})?h:C}else u=h;var O=this.barHelpers.getColumnPaths({barXPosition:b,barWidth:o,y1:u,y2:s=this.series[x][f]?u-this.series[x][f]/this.yRatio[w]+2*(this.isReversed?this.series[x][f]/this.yRatio[w]:0):u,yRatio:this.yRatio[w],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:x,j:f,w:p});return this.barHelpers.barBackground({bc:m,j:f,i:x,x1:b,x2:o,elSeries:g}),{pathTo:O.pathTo,pathFrom:O.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,x,f),barXPosition:b,x:p.globals.isXNumeric?r:r+n,y:s}}}]),t}(),Fe=function(y){fe(t,ue);var e=pe(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a,r){var s=this,n=this.w,o=new z(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,c=new re(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 Z(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")}),p=function(f){s.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[f].type;var m,v,w,l,u=void 0,b=void 0,A=[],k=[],S=n.globals.comboCharts?r[f]:f,L=s.barHelpers.getGroupIndex(S).columnGroupIndex,C=o.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[S]),rel:f+1,"data:realIndex":S});s.ctx.series.addCollapsedClassToSeries(C,S),i[f].length>0&&(s.visibleI=s.visibleI+1);var M,X,I=0;s.yRatio.length>1&&(s.yaxisIndex=n.globals.seriesYAxisReverseMap[S][0],I=S);var T=s.barHelpers.initialPositions();b=T.y,M=T.barHeight,v=T.yDivision,l=T.zeroW,m=T.xDivision,w=T.zeroH,k.push((u=T.x)+(X=T.barWidth)/2);for(var R=o.group({class:"apexcharts-datalabels","data:realIndex":S}),D=function(O){var W=s.barHelpers.getStrokeWidth(f,O,S),N=null,B={indexes:{i:f,j:O,realIndex:S,translationsIndex:I},x:u,y:b,strokeWidth:W,elSeries:C};N=s.isHorizontal?s.drawHorizontalBoxPaths(E(E({},B),{},{yDivision:v,barHeight:M,zeroW:l})):s.drawVerticalBoxPaths(E(E({},B),{},{xDivision:m,barWidth:X,zeroH:w})),b=N.y,u=N.x,O>0&&k.push(u+X/2),A.push(b),N.pathTo.forEach(function(U,q){var _=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?N.color[q]:n.globals.stroke.colors[f],ae=c.fillPath({seriesNumber:S,dataPointIndex:O,color:N.color[q],value:i[f][O]});s.renderSeries({realIndex:S,pathFill:ae,lineFill:_,j:O,i:f,pathFrom:N.pathFrom,pathTo:U,strokeWidth:W,elSeries:C,x:u,y:b,series:i,columnGroupIndex:L,barHeight:M,barWidth:X,elDataLabelsWrap:R,visibleSeries:s.visibleI,type:n.config.chart.type})})},H=0;Hu.c&&(x=!1);var k=Math.min(u.o,u.c),S=Math.max(u.o,u.c),L=u.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[l][p]-c.globals.minX)/this.xRatio-n/2);var C=r+n*this.visibleI;null==this.series[g][p]?(k=o,S=o):(k=o-k/w,S=o-S/w,b=o-u.h/w,A=o-u.l/w,L=o-u.m/w);var M=d.move(C,o),X=d.move(C+n/2,k);return c.globals.previousPaths.length>0&&(X=this.getPreviousPath(l,p,!0)),M=this.isBoxPlot?[d.move(C,k)+d.line(C+n/2,k)+d.line(C+n/2,b)+d.line(C+n/4,b)+d.line(C+n-n/4,b)+d.line(C+n/2,b)+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,b)+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)],X+=d.move(C,k),c.globals.isXNumeric||(r+=s),{pathTo:M,pathFrom:X,x:r,y:S,barXPosition:C,color:this.isBoxPlot?v:x?[f]:[m]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes,r=i.y,s=i.yDivision,n=i.barHeight,o=i.zeroW,h=i.strokeWidth,c=this.w,d=new z(this.ctx),g=a.i,p=a.j,x=this.boxOptions.colors.lower;this.isBoxPlot&&(x=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,m=a.realIndex,v=this.getOHLCValue(m,p),w=o,l=o,u=Math.min(v.o,v.c),b=Math.max(v.o,v.c),A=v.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[m][p]-c.globals.minX)/this.invertedXRatio-n/2);var k=r+n*this.visibleI;null==this.series[g][p]?(u=o,b=o):(u=o+u/f,b=o+b/f,w=o+v.h/f,l=o+v.l/f,A=o+v.m/f);var S=d.move(o,k),L=d.move(u,k+n/2);return c.globals.previousPaths.length>0&&(L=this.getPreviousPath(m,p,!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(b,k+n)+d.line(b,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(b,k+n/2)+d.line(b,k)+d.line(A,k)+"z"],L+=d.move(u,k),c.globals.isXNumeric||(r+=s),{pathTo:S,pathFrom:L,x:b,y:r,barYPosition:k,color:x}}},{key:"getOHLCValue",value:function(i,a){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[i][a]:r.globals.seriesCandleO[i][a],h:this.isBoxPlot?r.globals.seriesCandleO[i][a]:r.globals.seriesCandleH[i][a],m:r.globals.seriesCandleM[i][a],l:this.isBoxPlot?r.globals.seriesCandleC[i][a]:r.globals.seriesCandleL[i][a],c:this.isBoxPlot?r.globals.seriesCandleL[i][a]:r.globals.seriesCandleC[i][a]}}}]),t}(),nt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{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,r){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var r=this.w,s=1,n=r.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);r.globals.hasNegs||a?s=r.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):1.25*n*(1-o.percent/100):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(s=1-o.percent/100,"treemap"===e&&(s=1.25*n*(1-o.percent/100)));var h=o.color,c=new P;if(r.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){var d=c.shadeColor(-1*s,o.color);h=P.hexToRgba(P.isColorHex(d)?d:P.rgb2hex(d),r.config.fill.opacity)}else{var g=c.shadeColor(s,o.color);h=P.hexToRgba(P.isColorHex(g)?g:P.rgb2hex(g),r.config.fill.opacity)}return{color:h,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,r=a.globals.series[t][i],s=a.config.plotOptions[e],n=s.colorScale.inverse?i:t;s.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],h=null,c=Math.min.apply(Math,$(a.globals.series[t])),d=Math.max.apply(Math,$(a.globals.series[t]));s.distributed||"heatmap"!==e||(c=a.globals.minY,d=a.globals.maxY),void 0!==s.colorScale.min&&(c=s.colorScale.mina.globals.maxY?s.colorScale.max:a.globals.maxY);var g=Math.abs(d)+Math.abs(c),p=100*r/(0===g?g-1e-6:g);return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(x,f){if(r>=x.from&&r<=x.to){o=x.color,h=x.foreColor?x.foreColor:null,c=x.from,d=x.to;var m=Math.abs(d)+Math.abs(c);p=100*r/(0===m?m-1e-6:m)}}),{color:o,foreColor:h,percent:p}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,r=e.i,s=e.j,n=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,c=new z(this.ctx),d=new ge(this.ctx),g=null;if(h.enabled){g=c.group({class:"apexcharts-data-labels"});var x=h.offsetY,f=i+h.offsetX,m=a+parseFloat(h.style.fontSize)/3+x;d.plotDataLabelsText({x:f,y:m,text:t,i:r,j:s,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:h})}return g}},{key:"addListeners",value:function(e){var t=new z(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))}}]),y}(),Dt=function(){function y(e,t){Y(this,y),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 nt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return F(y,[{key:"draw",value:function(e){var t=this.w,i=new z(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var r=t.globals.gridWidth/t.globals.dataPoints,s=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=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 K(this.ctx).dropShadow(d,g,c)}for(var p=0,x=t.config.plotOptions.heatmap.shadeIntensity,f=0;f-1&&this.pieClicked(g),i.config.dataLabels.enabled){var b=l.x,A=l.y,k=100*x/this.fullAngle+"%";if(0!==x&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=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+s*Math.cos(h),p=i.centerY+s*Math.sin(h),x=i.centerX+s*Math.cos(d),f=i.centerY+s*Math.sin(d),m=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),v=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),w=r>180?1:0,l=["M",g,p,"A",s,s,0,w,1,x,f];return t="donut"===i.chartType?[].concat(l,["L",m.x,m.y,"A",i.donutSize,i.donutSize,0,w,0,v.x,v.y,"L",g,p,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(l,["L",i.centerX,i.centerY,"L",g,p]).join(" "):[].concat(l).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new Ke(this.ctx),a=new z(this.ctx),r=new ot(this.ctx),s=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),p=0;p1&&e.total.show&&(r=e.total.color);var n=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,s),a||"function"!=typeof e.total.formatter||(i=e.total.formatter(s)),t=this.donutDataLabels.total.label?e.name.formatter(t,t===e.total.label,s):"",null!==n&&(n.textContent=t),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=r)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,r,a,e);var s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==s&&(s.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new z(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var s=[],n=360/i.globals.series.length,o=0;o0&&(A=t.getPreviousPath(v));for(var k=0;k=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?r-=10:e.y>0&&(r+=10)),{textAnchor:i,newX:a,newY:r}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(r.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[a].paths[0]&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],r=0;r=360&&(f=360-Math.abs(this.startAngle)-.1);var m=r.drawPath({d:"",stroke:p,strokeWidth:h*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});g.dropShadow.enabled&&n.dropShadow(m,g.dropShadow),d.add(m),m.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(m,{centerX:i.centerX,centerY:i.centerY,endAngle:f,startAngle:x,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return s}},{key:"drawArcs",value:function(i){var a=this.w,r=new z(this.ctx),s=new re(this.ctx),n=new K(this.ctx),o=r.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;void 0!==a.config.plotOptions.radialBar.hollow.image&&(c=this.drawHollowImage(i,o,d,c));var p=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});a.config.plotOptions.radialBar.hollow.dropShadow.enabled&&n.dropShadow(p,a.config.plotOptions.radialBar.hollow.dropShadow);var f=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(f=0);var m=null;if(this.radialDataLabels.show){var v=a.globals.dom.Paper.select(".apexcharts-datalabels-group").members[0];m=this.renderInnerDataLabels(v,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:f})}"back"===a.config.plotOptions.radialBar.hollow.position&&(o.add(p),m&&o.add(m));var w=!1;a.config.plotOptions.radialBar.inverseOrder&&(w=!0);for(var l=w?i.series.length-1:0;w?l>=0:l100?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 M=L-A,X=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[l]:a.config.stroke.dashArray,I=r.drawPath({d:"",stroke:b,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+l,strokeDashArray:X});if(z.setAttrs(I.node,{"data:angle":M,"data:value":i.series[l]}),a.config.chart.dropShadow.enabled&&n.dropShadow(I,a.config.chart.dropShadow,l),n.setSelectionFilter(I,0,l),this.addListeners(I,this.radialDataLabels),u.add(I),I.attr({index:0,j:l}),this.barLabels.enabled){var R=P.polarToCartesian(i.centerX,i.centerY,i.size,A),D=this.barLabels.formatter(a.globals.seriesNames[l],{seriesIndex:l,w:a}),H=["apexcharts-radialbar-label"];this.barLabels.onClick||H.push("apexcharts-no-click");var O=this.barLabels.useSeriesColors?a.globals.colors[l]:a.config.chart.foreColor;O||(O=a.config.chart.foreColor);var W=R.x+this.barLabels.offsetX,N=R.y+this.barLabels.offsetY,B=r.drawText({x:W,y:N,text:D,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:O,cssClass:H.join(" ")});B.on("click",this.onBarLabelClick),B.attr({rel:l+1}),0!==A&&B.attr({"transform-origin":"".concat(W," ").concat(N),transform:"rotate(".concat(A," 0 0)")}),u.add(B)}var U=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(U=a.config.chart.animations.speed),a.globals.dataChanged&&(U=a.config.chart.animations.dynamicAnimation.speed),this.animDur=U/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(I,{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:U,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:p,dataLabels:m}}},{key:"drawHollow",value:function(i){var a=new z(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,r,s){var n=this.w,o=new re(this.ctx),h=P.randomId(),c=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:c,patternID:"pattern".concat(n.globals.cuid).concat(h)}),s="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(void 0===d&&void 0===g){var p=n.globals.dom.Paper.image(c).loaded(function(f){this.move(i.centerX-f.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-f.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(p)}else{var x=n.globals.dom.Paper.image(c).loaded(function(f){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 s}},{key:"getStrokeWidth",value:function(i){return i.size*(100-parseInt(this.w.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,r=this.barLabels.onClick,s=this.w;r&&r(s.globals.seriesNames[a],{w:s,seriesIndex:a})}}]),t}(),Nt=function(y){fe(t,ue);var e=pe(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var r=this.w,s=new z(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=r.globals.seriesRangeStart,this.seriesRangeEnd=r.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=s.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var w=0,l=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[f][0],u=f);var b=this.barHelpers.initialPositions();x=b.y,g=b.zeroW,p=b.x,l=b.barWidth,w=b.barHeight,h=b.xDivision,c=b.yDivision,d=b.zeroH;for(var A=s.group({class:"apexcharts-datalabels","data:realIndex":f}),k=s.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0});return this.isHorizontal?(s=f.config.plotOptions.bar.rangeBarGroupRows?o+g*u:o+c*this.visibleI+g*u,b>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(m=f.globals.seriesRange[a][b].overlaps).indexOf(v)>-1&&(s=(c=x.barHeight/m.length)*this.visibleI+g*(100-parseInt(this.barOptions.barHeight,10))/100/2+c*(this.visibleI+m.indexOf(v))+g*u)):(u>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?h+p*u:h+d*this.visibleI+p*u),b>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(m=f.globals.seriesRange[a][b].overlaps).indexOf(v)>-1&&(n=(d=x.barWidth/m.length)*this.visibleI+p*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+m.indexOf(v))+p*u)),{barYPosition:s,barXPosition:n,barHeight:c,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,r=i.x,s=i.xDivision,n=i.barWidth,o=i.barXPosition,h=i.zeroH,c=this.w,d=a.i,g=a.j,p=a.realIndex,x=a.translationsIndex,f=this.yRatio[x],m=this.getRangeValue(p,g),v=Math.min(m.start,m.end),w=Math.max(m.start,m.end);null==this.series[d][g]?v=h:(v=h-v/f,w=h-w/f);var l=Math.abs(w-v),u=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:v,y2:w,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:p,i:p,j:g,w:c});if(c.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:r,j:g,realIndex:p,barWidth:n});r=b.x,o=b.barXPosition}else r+=s;return{pathTo:u.pathTo,pathFrom:u.pathFrom,barHeight:l,x:r,y:m.start<0&&m.end<0?v: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,r=i.y,n=i.y2,o=i.yDivision,h=i.barHeight,c=i.barYPosition,d=i.zeroW,g=this.w,p=a.realIndex,x=a.j,f=this.preventBarOverflow(d+i.y1/this.invertedYRatio),m=this.preventBarOverflow(d+n/this.invertedYRatio),v=this.getRangeValue(p,x),w=Math.abs(m-f),l=this.barHelpers.getBarpaths({barYPosition:c,barHeight:h,x1:f,x2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:p,realIndex:p,j:x,w:g});return g.globals.isXNumeric||(r+=o),{pathTo:l.pathTo,pathFrom:l.pathFrom,barWidth:w,x:v.start<0&&v.end<0?f:m,goalX:this.barHelpers.getGoalValues("x",d,null,p,x),y:r}}},{key:"getRangeValue",value:function(i,a){var r=this.w;return{start:r.globals.seriesRangeStart[i][a],end:r.globals.seriesRangeEnd[i][a]}}}]),t}(),Wt=function(){function y(e){Y(this,y),this.w=e.w,this.lineCtx=e}return F(y,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new Z(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,a=e.x,r=e.y,s=e.i,n=e.j,o=e.prevY,h=this.w,c=[],d=[];if(0===n){var g=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(g=(h.globals.seriesX[e.realIndex][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),c.push(g),d.push(P.isNumber(t[s][0])?o+h.config.markers.offsetY:null),c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[s][n+1])?r+h.config.markers.offsetY:null)}else c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[s][n+1])?r+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,r=this.w,s=0;s0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[s].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[s].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[s].paths[1]&&(t=r.globals.previousPaths[s].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,r=e.i,s=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||"bar"===(null===(t=this.w.config.series[s])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[s])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[r])||void 0===a?void 0:a[0]))o=(h=g&&r>0?this.lineCtx.prevSeriesY[r-1][0]:this.lineCtx.zeroY)-n[r][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?n[r][0]/this.lineCtx.yRatio[c]:0);else if(g&&r>0&&void 0===n[r][0])for(var p=r-1;p>=0;p--)if(null!=n[p][0]){o=h=this.lineCtx.prevSeriesY[p][0];break}return{prevY:o,lineYPosition:h}}}]),y}(),Vt=function(y,e,t){var i=y.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 Re(y,e){return(e[1]-y[1])/(e[0]-y[0])}var De=function(){function y(e,t,i){Y(this,y),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new $e(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Wt(this),this.markers=new de(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return F(y,[{key:"draw",value:function(e,t,i,a){var r,s=this.w,n=new z(this.ctx),o=s.globals.comboCharts?t:s.config.chart.type,h=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),c=new Z(this.ctx,s);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;g1?p:0;this._initSerieVariables(e,g,p);var f=[],m=[],v=[],w=s.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,p),s.globals.isXNumeric&&s.globals.seriesX.length>0&&(w=(s.globals.seriesX[p][0]-s.globals.minX)/this.xRatio),v.push(w);var l,u=w,b=void 0,A=u,k=this.zeroY,S=this.zeroY;k=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:e,prevY:k,lineYPosition:0,translationsIndex:x}).prevY,f.push("monotoneCubic"===s.config.stroke.curve&&null===e[g][0]?null:k),l=k,"rangeArea"===o&&(b=S=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:a,prevY:S,lineYPosition:0,translationsIndex:x}).prevY,m.push(null!==f[0]?S:null));var L=this._calculatePathsFrom({type:o,series:e,i:g,realIndex:p,translationsIndex:x,prevX:A,prevY:k,prevY2:S}),C=[f[0]],M=[m[0]],X={type:o,series:e,realIndex:p,translationsIndex:x,i:g,x:w,y:1,pX:u,pY:l,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:v,yArrj:f,y2Arrj:m,seriesRangeEnd:a},I=this._iterateOverDataPoints(E(E({},X),{},{iterations:"rangeArea"===o?e[g].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:g,realIndex:p,prevX:A,prevY:S}),R=this._iterateOverDataPoints(E(E({},X),{},{series:a,xArrj:[w],yArrj:C,y2Arrj:M,pY:b,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[g].length-1,isRangeStart:!1})),D=I.linePaths.length/2,H=0;H=0;O--)h.add(d[O]);else for(var W=0;W1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],s=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[s]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[s]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:P.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i}),this.elSeries.attr({"data:longestSeries":e[t].length===a.globals.dataPoints,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,r,s=e.type,n=e.series,o=e.i,h=e.realIndex,c=e.translationsIndex,d=e.prevX,g=e.prevY,p=e.prevY2,x=this.w,f=new z(this.ctx);if(null===n[o][0]){for(var m=0;m0){var v=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:r,realIndex:h});a=v.pathFromLine,r=v.pathFromArea}return{prevX:d,prevY:g,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:r}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,r=e.paths,s=this.w,n=new z(this.ctx),o=new re(this.ctx);this.prevSeriesY.push(r.yArrj),s.globals.seriesXvalues[i]=r.xArrj,s.globals.seriesYvalues[i]=r.yArrj;var h=s.config.forecastDataPoints;if(h.count>0&&"rangeArea"!==t){var c=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-h.count-1],d=n.drawRect(c,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var x=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==t){var k=n.renderPaths(b);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(s.globals.cuid,")")),A.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,r=e.type,s=e.series,n=e.iterations,o=e.realIndex,h=e.translationsIndex,c=e.i,d=e.x,g=e.y,p=e.pX,x=e.pY,f=e.pathsFrom,m=e.linePaths,v=e.areaPaths,w=e.seriesIndex,l=e.lineYPosition,u=e.xArrj,b=e.yArrj,A=e.y2Arrj,k=e.isRangeStart,S=e.seriesRangeEnd,L=this.w,C=new z(this.ctx),M=this.yRatio,X=f.prevY,I=f.linePath,T=f.areaPath,R=f.pathFromLine,D=f.pathFromArea,H=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 O=function(ee,te){return te-ee/M[h]+2*(a.isReversed?ee/M[h]:0)},W=g,N=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(t=this.w.config.series[o])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),B=L.config.stroke.curve;Array.isArray(B)&&(B=Array.isArray(w)?B[w[c]]:B[c]);for(var U,q=0,_=0;_0&&L.globals.collapsedSeries.length0;te--){if(!(L.globals.collapsedSeriesIndices.indexOf(w?.[te]||te)>-1))return te;te--}return 0}(c-1)][_+1]:this.zeroY,ae?g=O(H,l):(g=O(s[c][_+1],l),"rangeArea"===r&&(W=O(S[c][_+1],l))),u.push(d),!ae||"smooth"!==L.config.stroke.curve&&"monotoneCubic"!==L.config.stroke.curve?(b.push(g),A.push(W)):(b.push(null),A.push(null));var G=this.lineHelpers.calculatePoints({series:s,x:d,y:g,realIndex:o,i:c,j:_,prevY:X}),j=this._createPaths({type:r,series:s,i:c,realIndex:o,j:_,x:d,y:g,y2:W,xArrj:u,yArrj:b,y2Arrj:A,pX:p,pY:x,pathState:q,segmentStartX:U,linePath:I,areaPath:T,linePaths:m,areaPaths:v,curve:B,isRangeStart:k});v=j.areaPaths,m=j.linePaths,p=j.pX,x=j.pY,q=j.pathState,U=j.segmentStartX,T=j.areaPath,I=j.linePath,!this.appendPathFrom||"monotoneCubic"===B&&"rangeArea"===r||(R+=C.line(d,this.zeroY),D+=C.line(d,this.zeroY)),this.handleNullDataPoints(s,G,c,_,o),this._handleMarkersAndLabels({type:r,pointsPos:G,i:c,j:_,realIndex:o,isRangeStart:k})}return{yArrj:b,xArrj:u,pathFromArea:D,areaPaths:v,pathFromLine:R,linePaths:m,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,r=e.i,s=e.j,n=e.realIndex,o=this.w,h=new ge(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,s,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[r].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,n,s+1);null!==c&&this.elPointsMain.add(c)}var d=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:s+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var r,t=e.type,i=e.series,a=e.i,s=e.j,n=e.x,o=e.y,h=e.xArrj,c=e.yArrj,d=e.y2,g=e.y2Arrj,p=e.pX,x=e.pY,f=e.pathState,m=e.segmentStartX,v=e.linePath,w=e.areaPath,l=e.linePaths,u=e.areaPaths,b=e.curve,A=e.isRangeStart,k=new z(this.ctx),S=this.areaBottomY,L="rangeArea"===t,C="rangeArea"===t&&A;switch(b){case"monotoneCubic":var M=A?c:g;switch(f){case 0:if(null===M[s+1])break;f=1;case 1:if(!(L?h.length===i[a].length:s===i[a].length-2))break;case 2:var X=A?h:h.slice().reverse(),I=A?M:M.slice().reverse(),T=(r=I,X.map(function(V,G){return[V,r[G]]}).filter(function(V){return null!==V[1]})),R=T.length>1?function(y){var e=function(y){for(var e,t,i,a,r=function(c){for(var d=[],g=c[0],p=c[1],x=d[0]=Re(g,p),f=1,m=c.length-1;f9&&(a=3*i/Math.sqrt(a),r[o]=a*e,r[o+1]=a*t);for(var h=0;h<=s;h++)a=(y[Math.min(s,h+1)][0]-y[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),n.push([a||0,r[h]*a||0]);return n}(y),t=y[1],i=y[0],a=[],r=e[1],s=e[0];a.push(i,[i[0]+s[0],i[1]+s[1],t[0]-r[0],t[1]-r[1],t[0],t[1]]);for(var n=2,o=e.length;n0&&(ie.push(oe),oe=0)}),oe>0&&ie.push(oe),ie}(V),ee=[],te=0,ne=0;te4?(ne+="C".concat(ie[0],", ").concat(ie[1]),ne+=", ".concat(ie[2],", ").concat(ie[3]),ne+=", ".concat(ie[4],", ").concat(ie[5])):oe>2&&(ne+="S".concat(ie[0],", ").concat(ie[1]),ne+=", ".concat(ie[2],", ").concat(ie[3]))}return ne}(V),j=O,ee=(O+=V.length)-1;C?v=k.move(T[j][0],T[j][1])+G:L?v=k.move(D[j][0],D[j][1])+k.line(T[j][0],T[j][1])+G+k.line(D[ee][0],D[ee][1]):(v=k.move(T[j][0],T[j][1])+G,w=v+k.line(T[ee][0],S)+k.line(T[j][0],S)+"z",u.push(w)),l.push(v)}),L&&H>1&&!C){var W=l.slice(H).reverse();l.splice(H),W.forEach(function(V){return l.push(V)})}f=0}break;case"smooth":var N=.35*(n-p);if(null===i[a][s])f=0;else switch(f){case 0:if(m=p,v=C?k.move(p,g[s])+k.line(p,x):k.move(p,x),w=k.move(p,x),null===i[a][s+1]){l.push(v),u.push(w);break}if(f=1,s=i[a].length-2&&(C&&(v+=k.curve(n,o,n,o,n,d)+k.move(n,d)),w+=k.curve(n,o,n,o,n,S)+k.line(m,S)+"z",l.push(v),u.push(w),f=-1)}}p=n,x=o;break;default:var q=function(V,G,j){var ee=[];switch(V){case"stepline":ee=k.line(G,null,"H")+k.line(null,j,"V");break;case"linestep":ee=k.line(null,j,"V")+k.line(G,null,"H");break;case"straight":ee=k.line(G,j)}return ee};if(null===i[a][s])f=0;else switch(f){case 0:if(m=p,v=C?k.move(p,g[s])+k.line(p,x):k.move(p,x),w=k.move(p,x),null===i[a][s+1]){l.push(v),u.push(w);break}if(f=1,s=i[a].length-2&&(C&&(v+=k.line(n,d)),w+=k.line(n,S)+k.line(m,S)+"z",l.push(v),u.push(w),f=-1)}}p=n,x=o}return{linePaths:l,areaPaths:u,pX:p,pY:x,pathState:f,segmentStartX:m,linePath:v,areaPath:w}}},{key:"handleNullDataPoints",value:function(e,t,i,a,r){var s=this.w;if(null===e[i][a]&&s.config.markers.showNullDataPoints||1===e[i].length){var n=this.strokeWidth-s.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(t,r,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),y}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function y(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,p=[],x=this.xoffset,f=this.yoffset,m=r(d)/this.height,v=r(d)/this.width;if(this.width>=this.height)for(g=0;g=this.height){var p=d/this.height;g=new y(this.xoffset+p,this.yoffset,this.width-p,this.height)}else{var f=d/this.width;g=new y(this.xoffset,this.yoffset+f,this.width,this.height-f)}return g}}function e(n,o,h,c,d){return c=void 0===c?0:c,d=void 0===d?0:d,function(p){var x,f,m=[];for(x=0;x=i(v,m))?(o.push(g),t(n.slice(1),o,h,c)):(p=h.cutArea(r(o),c),c.push(h.getCoordinates(o)),t(n,[],p,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=r(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 r(n){var o,h=0;for(o=0;os-a&&h.width<=n-r){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,r,s){var n=new z(this.ctx),o=n.getTextRects(e,t).width+this.w.config.stroke.width+5>r-i&&s-a>r-i?s-a:r-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 r=new ce(this.ctx);r.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(){r.animationCompleted(e)})}}]),y}(),Ut=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return F(y,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var r=new Q(this.ctx),s=(t-e)/864e5;this.determineInterval(s),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,s<.00011574074074074075?a.globals.disableZoomIn=!0:s>5e4&&(a.globals.disableZoomOut=!0);var n=r.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/s,h=o/24,c=h/60,d=c/60,g=Math.floor(24*s),p=Math.floor(1440*s),x=Math.floor(86400*s),f=Math.floor(s),m=Math.floor(s/30),v=Math.floor(s/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:p,numberOfHours:g,numberOfDays:f,numberOfMonths:m,numberOfYears:v};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(b){var A={position:b.position,unit:b.unit,year:b.year,day:b.day?b.day:1,hour:b.hour?b.hour:0,month:b.month+1};return"month"===b.unit?E(E({},A),{},{day:1,value:b.value+1}):"day"===b.unit||"hour"===b.unit?E(E({},A),{},{value:b.value}):"minute"===b.unit?E(E({},A),{},{value:b.value,minute:b.value}):"second"===b.unit?E(E({},A),{},{value:b.value,minute:b.minute,second:b.second}):b});return u.filter(function(b){var A=1,k=Math.ceil(a.globals.gridWidth/120),S=b.value;void 0!==a.config.xaxis.tickAmount&&(k=a.config.xaxis.tickAmount),u.length>k&&(A=Math.floor(u.length/k));var L=!1,C=!1;switch(i.tickInterval){case"years":"year"===b.unit&&(L=!0);break;case"half_year":A=7,"year"===b.unit&&(L=!0);break;case"months":A=1,"year"===b.unit&&(L=!0);break;case"months_fortnight":A=15,"year"!==b.unit&&"month"!==b.unit||(L=!0),30===S&&(C=!0);break;case"months_days":A=10,"month"===b.unit&&(L=!0),30===S&&(C=!0);break;case"week_days":A=8,"month"===b.unit&&(L=!0);break;case"days":A=1,"month"===b.unit&&(L=!0);break;case"hours":"day"===b.unit&&(L=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(C=!0);break;case"seconds_tens":S%10!=0&&(C=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){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),r=this.removeOverlappingTS(a);i.globals.timescaleLabels=r.slice(),new Ce(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,r=e.daysWidthOnXAxis,s=e.numberOfYears,n=t.minYear,o=0,h=new Q(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)*r,this.timeScaleArray.push({position:o,value:n=t.minYear+1,unit:c,year:n,month:P.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:c,year:a,month:P.monthMod(i+1)});for(var g=n,p=o,x=0;x1){h=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*s,o=P.monthMod(a+1);var p=r+g,x=P.monthMod(o),f=o;0===o&&(d="year",f=p,x=1,p+=g+=1),this.timeScaleArray.push({position:h,value:f,unit:d,year:p,month:x})}else this.timeScaleArray.push({position:h,value:o,unit:d,year:r,month:P.monthMod(a)});for(var m=o+1,v=h,w=0,l=1;wn.determineDaysOfMonths(u+1,b)&&(c=1,o="month",p=u+=1),u},g=(24-t.minHour)*r,p=h,x=d(c,i,a);0===t.minHour&&1===t.minDate?(g=0,p=P.monthMod(t.minMonth),o="month",c=t.minDate):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(g=0,p=h=t.minDate,x=d(c=h,i,a)),this.timeScaleArray.push({position:g,value:p,unit:o,year:this._getYear(a,x,0),month:P.monthMod(x),day:c});for(var f=g,m=0;mo.determineDaysOfMonths(k+1,r)&&(m=1,k+=1),{month:k,date:m}},d=function(A,k){return A>o.determineDaysOfMonths(k+1,r)?k+=1:k},g=60-(t.minMinute+t.minSecond/60),p=g*s,x=t.minHour+1,f=x;60===g&&(p=0,f=x=t.minHour);var m=i;f>=24&&(f=0,m+=1,h="day");var v=c(m,a).month;v=d(m,v),this.timeScaleArray.push({position:p,value:x,unit:h,day:m,hour:f,year:r,month:P.monthMod(v)}),f++;for(var w=p,l=0;l=24&&(f=0,h="day",v=c(m+=1,v).month,v=d(m,v));var u=this._getYear(r,v,0);this.timeScaleArray.push({position:w=60*s+w,value:0===f?m:f,unit:h,hour:f,day:m,year:u,month:P.monthMod(v)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var h=e.minutesWidthOnXAxis,d=e.numberOfMinutes,g=e.currentMinute+1,p=e.currentDate,x=e.currentMonth,f=e.currentYear,m=e.currentHour,v=(60-e.currentSecond-e.currentMillisecond/1e3)*e.secondsWidthOnXAxis,w=0;w=60&&(g=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:v,value:g,unit:"minute",hour:m,minute:g,day:p,year:this._getYear(f,x,0),month:P.monthMod(x)}),v+=h,g++}},{key:"generateSecondScale",value:function(e){for(var h=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=e.currentSecond+1,g=e.currentMinute,p=e.currentDate,x=e.currentMonth,f=e.currentYear,m=e.currentHour,v=(1e3-e.currentMillisecond)/1e3*h,w=0;w=60&&(d=0,++g>=60&&(g=0,24==++m&&(m=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:m,minute:g,second:d,day:p,year:this._getYear(f,x,0),month:P.monthMod(x)}),v+=h,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),i+="day"===e.unit?"day"===e.unit?"-"+("0"+t).slice(-2):"-01":"-"+("0"+(e.day?e.day:"1")).slice(-2),i+="hour"===e.unit?"hour"===e.unit?"T"+("0"+t).slice(-2):"T00":"T"+("0"+(e.hour?e.hour:"0")).slice(-2),i+="minute"===e.unit?":"+("0"+t).slice(-2):":"+(e.minute?("0"+e.minute).slice(-2):"00"),i+="second"===e.unit?":"+("0"+t).slice(-2):":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var r=a.value.toString(),s=new Q(t.ctx),n=t.createRawDateString(a,r),o=s.getDate(s.parseDate(n));if(t.utc||(o=s.getDate(s.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var h="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;"year"===a.unit&&(h=c.year),"month"===a.unit&&(h=c.month),"day"===a.unit&&(h=c.day),"hour"===a.unit&&(h=c.hour),"minute"===a.unit&&(h=c.minute),"second"===a.unit&&(h=c.second),r=s.formatDate(o,h)}else r=s.formatDate(o,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:r,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new z(this.ctx),r=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(r=!0,t=a.getTextRects(e[0].value).width);var s=0;return e.map(function(o,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=r?t:a.getTextRects(e[s].value).width;return o.position>e[s].position+c+10?(s=h,o):null}return o}).filter(function(o){return null!==o})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),y}(),qt=function(){function y(e,t){Y(this,y),this.ctx=t,this.w=t.w,this.el=e}return F(y,[{key:"setupElements",value:function(){var e=this.w,t=e.globals,i=e.config,a=i.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,t.chartClass=".apexcharts".concat(t.chartID),t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),z.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas ".concat(t.chartClass.substring(1))}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),t.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject"),z.setAttrs(t.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elLegendContainer=document.createElement("div"),Object.assign(t.dom.elLegendContainer.style,{position:"relative",height:"100%",width:"100%"}),t.dom.elLegendContainer.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.dom.elLegendContainer.appendChild(t.dom.elLegendWrap),t.dom.elLegendForeign.appendChild(t.dom.elLegendContainer),t.dom.Paper.node.appendChild(t.dom.elLegendForeign),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=this.ctx,r=i.config,s=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=r.chart.type||"line",h=null,c=0;s.series.forEach(function(A,k){var S=e[k].type||o;n[S]?("rangeArea"===S?(n[S].series.push(s.seriesRangeStart[k]),n[S].seriesRangeEnd.push(s.seriesRangeEnd[k])):n[S].series.push(A),n[S].i.push(k),"column"!==S&&"bar"!==S||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(S)?h=S:"bar"===S?(n.column.series.push(A),n.column.i.push(k)):console.warn("You have specified an unrecognized series type (".concat(S,").")),o!==S&&"scatter"!==S&&c++}),c>0&&(h&&console.warn("Chart or series type ".concat(h," cannot appear with other chart or series types.")),n.column.series.length>0&&r.plotOptions.bar.horizontal&&(c-=n.column.series.length,n.column={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=c>0);var d=new De(a,t),g=new Fe(a,t);a.pie=new lt(a);var p=new Ot(a);a.rangeBar=new Nt(a,t);var x=new Ht(a),f=[];if(s.comboCharts){var m,v,w=new Z(a);if(n.area.series.length>0&&(m=f).push.apply(m,$(w.drawSeriesByGroup(n.area,s.areaGroups,"area",d))),n.column.series.length>0)if(r.chart.stacked){var l=new rt(a,t);f.push(l.draw(n.column.series,n.column.i))}else a.bar=new ue(a,t),f.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&f.push(d.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0&&(v=f).push.apply(v,$(w.drawSeriesByGroup(n.line,s.lineGroups,"line",d))),n.candlestick.series.length>0&&f.push(g.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&f.push(g.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&f.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var u=new De(a,t,!0);f.push(u.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var b=new De(a,t,!0);f.push(b.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(r.chart.type){case"line":f=d.draw(s.series,"line");break;case"area":f=d.draw(s.series,"area");break;case"bar":r.chart.stacked?f=new rt(a,t).draw(s.series):(a.bar=new ue(a,t),f=a.bar.draw(s.series));break;case"candlestick":f=new Fe(a,t).draw(s.series,"candlestick");break;case"boxPlot":f=new Fe(a,t).draw(s.series,r.chart.type);break;case"rangeBar":f=a.rangeBar.draw(s.series);break;case"rangeArea":f=d.draw(s.seriesRangeStart,"rangeArea",void 0,s.seriesRangeEnd);break;case"heatmap":f=new Dt(a,t).draw(s.series);break;case"treemap":f=new jt(a,t).draw(s.series);break;case"pie":case"donut":case"polarArea":f=a.pie.draw(s.series);break;case"radialBar":f=p.draw(s.series);break;case"radar":f=x.draw(s.series);break;default:f=d.draw(s.series)}return f}},{key:"setSVGDimensions",value:function(){var e=this.w,t=e.globals,i=e.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",t.svgWidth=i.chart.width,t.svgHeight=i.chart.height;var a=P.getDimensions(this.el),r=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===r?P.isNumber(a[0])&&(0===a[0].width&&(a=P.getDimensions(this.el.parentNode)),t.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==r&&""!==r||(t.svgWidth=parseInt(i.chart.width,10));var s=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===s){var n=P.getDimensions(this.el.parentNode);t.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else t.svgHeight=parseInt(i.chart.height,10);else t.svgHeight=t.axisCharts?t.svgWidth/1.61:t.svgWidth/1.2;t.svgWidth=Math.max(t.svgWidth,0),t.svgHeight=Math.max(t.svgHeight,0),z.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==s&&(t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(t.svgHeight+(i.chart.sparkline.enabled?0:t.axisCharts?i.chart.parentHeightOffset:0),"px")),t.dom.elWrap.style.width="".concat(t.svgWidth,"px"),t.dom.elWrap.style.height="".concat(t.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY;z.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(e.translateX,", ").concat(t,")")})}},{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,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=new et(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var r=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),s=2.05*e.globals.radialSize;if(r&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var n=P.getBoundingClientRect(r);s=n.bottom,s=Math.max(2.05*e.globals.radialSize,n.bottom-n.top)}var h=Math.ceil(s+t.translateY+i+a);t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).includes("%")||(t.dom.elWrap.style.height="".concat(h,"px"),z.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(h,"px"))}},{key:"coreCalculations",value:function(){new Xe(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(){return[]})},i=new Ze,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,t=null;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new Ye(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new Ye(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Ut(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new Z(this.ctx).getCalculatedRatios()}return t}},{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&&"function"!=typeof t.config.chart.events.selection){var i=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];i.forEach(function(a){var r=ApexCharts.getChartByID(a);r.w.globals.brushSource=e.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),t.config.chart.events.selection=function(a,r){i.forEach(function(s){ApexCharts.getChartByID(s).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),y}(),Zt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(n){var o=[t.ctx];r&&(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&&"object"===J(e)&&(h.config=new me(e),e=Z.extendArrayProps(h.config,e,d),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=P.extend(d.config,e),s&&(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;g2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(r){var s,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(s=e.map(function(o,h){return i._extendSeries(o,h)})).length&&(s=[{data:[]}]),n.config.series=s):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(){r(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return E(E({},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:void 0!==e.hidden?e.hidden:a?.hidden,data:e.data?e.data:a?.data,zIndex:void 0!==e.zIndex?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,r=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"'], ").concat(r," circle[j='").concat(t,"'], ").concat(r," rect[j='").concat(t,"']")).members[0]:void 0===t&&(a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),a?(new z(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){void 0!==e.xaxis[a]&&(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 be(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&"100%"===e.chart.stackType&&(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,r=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(r=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map(function(n,o){i.globals.zoomed||void 0!==r[o]?function(n){void 0!==r[n]&&(i.config.yaxis[n].min=r[n].min,i.config.yaxis[n].max=r[n].max)}(o):void 0!==t.ctx.opts.yaxis[o]&&(n.min=t.ctx.opts.yaxis[o].min,n.max=t.ctx.opts.yaxis[o].max)})}}]),y}();He=typeof window<"u"?window:void 0,ht=function(y,e){var t=(void 0!==this?this:y).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 b=l.length-1;b>=0;b--)if(l[b])for(var A in u)l[b].prototype[A]=u[A];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(l){var u="function"==typeof l.create?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="svg"==l.nodeName?l.parentNode instanceof y.SVGElement?new t.Nested:new t.Doc:"linearGradient"==l.nodeName?new t.Gradient("linear"):"radialGradient"==l.nodeName?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 b=l.length,A=[],k=0;k1?1: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 t.regex.isHex.test(l+="")||t.regex.isRgb.test(l)},t.Color.isRgb=function(l){return l&&"number"==typeof l.r&&"number"==typeof l.g&&"number"==typeof l.b},t.Color.isColor=function(l){return t.Color.isRgb(l)||t.Color.test(l)},t.Array=function(l,u){0==(l=(l||[]).valueOf()).length&&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,b){return u.x=b.x=l[0],u.y=b.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,b){return u.x=b.x,u.y=b.y,["Z"]}},a="mlhvqtcsaz".split(""),r=0,s=a.length;rL);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||"","number"==typeof l?this.value=isNaN(l)?0:isFinite(l)?l:l<0?-34e37:34e37:"string"==typeof l?(u=l.match(t.regex.numberAndUnit))&&(this.value=parseFloat(u[1]),"%"==u[5]?this.value/=100:"s"==u[5]&&(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:"s"==this.unit?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"string"==typeof l&&(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 null==l?this.x()+this.width()/2:this.x(l-this.width()/2)},cy:function(l){return null==l?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 b=g(this,l,u);return this.width(new t.Number(b.width)).height(new t.Number(b.height))},clone:function(l){this.writeDataToDom();var u=f(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"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var l=this.attr("class");return null==l?[]:l.trim().split(t.regex.delimiter)},hasClass:function(l){return-1!=this.classes().indexOf(l)},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 y.SVGElement;){if("string"==typeof l?u.matches(l):u instanceof l)return u;if(!u.node.parentNode||"#document"==u.node.parentNode.nodeName)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=[],b=this;do{if(!(b=b.parent(l))||!b.node)break;u.push(b)}while(b.parent);return u},matches:function(l){return((u=this.node).matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector).call(u,l);var u},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(/^/,"").replace(/<\/svg>$/,"");u.innerHTML=""+l.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var b=0,A=u.firstChild.childNodes.length;b":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,b){return new t.MorphObj(u,b).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,b){"object"===J(l)&&(u=l.ease,b=l.delay,l=l.duration);var A=new t.Situation({duration:l||1e3,delay:b||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=y.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){y.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("function"==typeof l||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 b in u.animations){l=this.target()[b](),Array.isArray(l)||(l=[l]),Array.isArray(u.animations[b])||(u.animations[b]=[u.animations[b]]);for(var A=l.length;A--;)u.animations[b][A]instanceof t.Number&&(l[A]=new t.Number(l[A])),u.animations[b][A]=l[A].morph(u.animations[b][A])}for(var b in u.attrs)u.attrs[b]=new t.MorphObj(this.target().attr(b),u.attrs[b]);for(var b in u.styles)u.styles[b]=new t.MorphObj(this.target().style(b),u.styles[b]);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 b=this.active;return this.active=!1,u&&this.clearQueue(),l&&this.situation&&(!b&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(l){var u=this.last();return this.target().on("finished.fx",function b(A){A.detail.situation==u&&(l.call(this,u),this.off("finished.fx",b))}),this._callStart()},during:function(l){var u=this.last(),b=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",b).on("during.fx",b),this.after(function(){this.off("during.fx",b)}),this._callStart()},afterAll:function(l){var u=function b(A){l.call(this),this.off("allfinished.fx",b)};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,b){return this.last()[b||"animations"][l]=u,this._callStart()},step:function(l){var u,b,A;l||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(u=Math.max(this.absPos,0),b=Math.floor(u),!0===this.situation.loops||bthis.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(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(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,b=this.target(),A=this.situation;for(var k in A.animations)l=[].concat(A.animations[k]).map(function(C){return"string"!=typeof C&&C.at?C.at(A.ease(u.pos),u.pos):C}),b[k].apply(b,l);for(var k in A.attrs)l=[k].concat(A.attrs[k]).map(function(M){return"string"!=typeof M&&M.at?M.at(A.ease(u.pos),u.pos):M}),b.attr.apply(b,l);for(var k in A.styles)l=[k].concat(A.styles[k]).map(function(M){return"string"!=typeof M&&M.at?M.at(A.ease(u.pos),u.pos):M}),b.style.apply(b,l);if(A.transforms.length){l=A.initialTransformation,k=0;for(var S=A.transforms.length;k=0;--b)this[v[b]]=null!=l[v[b]]?l[v[b]]:u[v[b]]},extend:{extract:function(){var l=p(this,0,1);p(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((u=l,u instanceof t.Matrix||(u=new t.Matrix(u)),u).native()));var u},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=v.length-1;u>=0;u--)l[v[u]]=this[v[u]];return l},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(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 b;b=Array.isArray(l)?{x:l[0],y:l[1]}:"object"===J(l)?{x:l.x,y:l.y}:null!=l?{x:l,y:u??l}:{x:0,y:0},this.x=b.x,this.y=b.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,b){if(null==l){for(l={},b=(u=this.node.attributes).length-1;b>=0;b--)l[u[b].nodeName]=t.regex.isNumber.test(u[b].nodeValue)?parseFloat(u[b].nodeValue):u[b].nodeValue;return l}if("object"===J(l))for(var A in l)this.attr(A,l[A]);else if(null===u)this.node.removeAttribute(l);else{if(null==u)return null==(u=this.node.getAttribute(l))?t.defaults.attrs[l]:t.regex.isNumber.test(u)?parseFloat(u):u;"stroke-width"==l?this.attr("stroke",parseFloat(u)>0?this._stroke:null):"stroke"==l&&(this._stroke=u),"fill"!=l&&"stroke"!=l||(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)}))),"number"==typeof u?u=new t.Number(u):t.Color.isColor(u)?u=new t.Color(u):Array.isArray(u)&&(u=new t.Array(u)),"leading"==l?this.leading&&this.leading(u):"string"==typeof b?this.node.setAttributeNS(b,l,u.toString()):this.node.setAttribute(l,u.toString()),!this.rebuild||"font-size"!=l&&"x"!=l||this.rebuild(l,u)}return this}}),t.extend(t.Element,{transform:function(l,u){var b;return"object"!==J(l)?(b=new t.Matrix(this).extract(),"string"==typeof l?b[l]:b):(b=new t.Matrix(this),u=!!u||!!l.relative,null!=l.a&&(b=u?b.multiply(new t.Matrix(l)):new t.Matrix(l)),this.attr("transform",b))}}),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(b){return parseFloat(b)})]}).reduce(function(l,u){return"matrix"==u[0]?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(),b=l.screenCTM().inverse();return this.addTo(l).untransform().transform(b.multiply(u)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(l,u){if(arguments.length>1&&"boolean"!=typeof u)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(l))for(var b=0,A=this.arguments.length;b=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 b=this.children(),A=0,k=b.length;A=0;u--)l.childNodes[u]instanceof y.SVGElement&&f(l.childNodes[u]);return t.adopt(l).id(t.eid(l.nodeName))}function m(l){return Math.abs(l)>1e-37?l:0}["fill","stroke"].forEach(function(l){var u={};u[l]=function(b){if(void 0===b)return this;if("string"==typeof b||t.Color.isRgb(b)||b&&"function"==typeof b.fill)this.attr(l,b);else for(var A=n[l].length-1;A>=0;A--)null!=b[n[l][A]]&&this.attr(n.prefix(l,n[l][A]),b[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(6==arguments.length?[].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,b=l.length;u-1&&this.members.splice(u,1),this},each:function(l){for(var u=0,b=this.members.length;u=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)"function"==typeof t.Shape.prototype[u]&&"function"!=typeof t.Set.prototype[u]&&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=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(b){var A=(b||"").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(b){return t.adopt(b)}))},t.extend(t.Parent,{select:function(l){return t.select(l,this.node)}});var v="abcdef".split("");if("function"!=typeof y.CustomEvent){var w=function(l,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var b=e.createEvent("CustomEvent");return b.initCustomEvent(l,u.bubbles,u.cancelable,u.detail),b};w.prototype=y.Event.prototype,t.CustomEvent=w}else t.CustomEvent=y.CustomEvent;return t},void 0!==(Pe=function(){return ht(He,He.document)}.call(Ne,ut,Ne,Le))&&(Le.exports=Pe), /*! svg.filter.js - v2.0.2 - 2016-02-24 * https://github.com/wout/svg.filter.js * Copyright (c) 2016 Wout Fierens; Licensed MIT */ 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(s,n){return this.add(s,n),!s.attr("in")&&this.autoSetIn&&s.attr("in",this.source),s.attr("result")||s.attr("result",s),s},blend:function(s,n,o){return this.put(new SVG.BlendEffect(s,n,o))},colorMatrix:function(s,n){return this.put(new SVG.ColorMatrixEffect(s,n))},convolveMatrix:function(s){return this.put(new SVG.ConvolveMatrixEffect(s))},componentTransfer:function(s){return this.put(new SVG.ComponentTransferEffect(s))},composite:function(s,n,o){return this.put(new SVG.CompositeEffect(s,n,o))},flood:function(s,n){return this.put(new SVG.FloodEffect(s,n))},offset:function(s,n){return this.put(new SVG.OffsetEffect(s,n))},image:function(s){return this.put(new SVG.ImageEffect(s))},merge:function(){var s=[void 0];for(var n in arguments)s.push(arguments[n]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,s)))},gaussianBlur:function(s,n){return this.put(new SVG.GaussianBlurEffect(s,n))},morphology:function(s,n){return this.put(new SVG.MorphologyEffect(s,n))},diffuseLighting:function(s,n,o){return this.put(new SVG.DiffuseLightingEffect(s,n,o))},displacementMap:function(s,n,o,h,c){return this.put(new SVG.DisplacementMapEffect(s,n,o,h,c))},specularLighting:function(s,n,o,h){return this.put(new SVG.SpecularLightingEffect(s,n,o,h))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(s,n,o,h,c){return this.put(new SVG.TurbulenceEffect(s,n,o,h,c))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(s){var n=this.put(new SVG.Filter);return"function"==typeof s&&s.call(n,n),n}}),SVG.extend(SVG.Container,{filter:function(s){return this.defs().filter(s)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(s){return this.filterer=s instanceof SVG.Element?s:this.doc().filter(s),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(s){return this.filterer&&!0===s&&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(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}});var y={blend:function(s,n){return this.parent()&&this.parent().blend(this,s,n)},colorMatrix:function(s,n){return this.parent()&&this.parent().colorMatrix(s,n).in(this)},convolveMatrix:function(s){return this.parent()&&this.parent().convolveMatrix(s).in(this)},componentTransfer:function(s){return this.parent()&&this.parent().componentTransfer(s).in(this)},composite:function(s,n){return this.parent()&&this.parent().composite(this,s,n)},flood:function(s,n){return this.parent()&&this.parent().flood(s,n)},offset:function(s,n){return this.parent()&&this.parent().offset(s,n).in(this)},image:function(s){return this.parent()&&this.parent().image(s)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(s,n){return this.parent()&&this.parent().gaussianBlur(s,n).in(this)},morphology:function(s,n){return this.parent()&&this.parent().morphology(s,n).in(this)},diffuseLighting:function(s,n,o){return this.parent()&&this.parent().diffuseLighting(s,n,o).in(this)},displacementMap:function(s,n,o,h){return this.parent()&&this.parent().displacementMap(this,s,n,o,h)},specularLighting:function(s,n,o,h){return this.parent()&&this.parent().specularLighting(s,n,o,h).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(s,n,o,h,c){return this.parent()&&this.parent().turbulence(s,n,o,h,c).in(this)}};SVG.extend(SVG.Effect,y),SVG.extend(SVG.ParentEffect,y),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(s){this.attr("in",s)}}});var e={blend:function(s,n,o){this.attr({in:s,in2:n,mode:o||"normal"})},colorMatrix:function(s,n){"matrix"==s&&(n=a(n)),this.attr({type:s,values:void 0===n?null:n})},convolveMatrix:function(s){s=a(s),this.attr({order:Math.sqrt(s.split(" ").length),kernelMatrix:s})},composite:function(s,n,o){this.attr({in:s,in2:n,operator:o})},flood:function(s,n){this.attr("flood-color",s),null!=n&&this.attr("flood-opacity",n)},offset:function(s,n){this.attr({dx:s,dy:n})},image:function(s){this.attr("href",s,SVG.xlink)},displacementMap:function(s,n,o,h,c){this.attr({in:s,in2:n,scale:o,xChannelSelector:h,yChannelSelector:c})},gaussianBlur:function(s,n){this.attr("stdDeviation",null!=s||null!=n?function(o){if(!Array.isArray(o))return o;for(var h=0,c=o.length,d=[];h1&&(W*=c=Math.sqrt(c),N*=c),d=(new SVG.Matrix).rotate(B).scale(1/W,1/N).rotate(-B),V=V.transform(d),x=(g=[(G=G.transform(d)).x-V.x,G.y-V.y])[0]*g[0]+g[1]*g[1],p=Math.sqrt(x),g[0]/=p,g[1]/=p,f=x<4?Math.sqrt(1-x/4):0,U===q&&(f*=-1),m=new SVG.Point((G.x+V.x)/2+f*-g[1],(G.y+V.y)/2+f*g[0]),v=new SVG.Point(V.x-m.x,V.y-m.y),w=new SVG.Point(G.x-m.x,G.y-m.y),l=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(l*=-1),u=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(u*=-1),q&&l>u&&(u+=2*Math.PI),!q&&ls.maxX-t.width&&(n=(a=s.maxX-t.width)-this.startPoints.box.x),null!=s.minY&&rs.maxY-t.height&&(o=(r=s.maxY-t.height)-this.startPoints.box.y),null!=s.snapToGrid&&(a-=a%s.snapToGrid,r-=r%s.snapToGrid,n-=n%s.snapToGrid,o-=o%s.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:n,y:o},!0):this.el.move(a,r));return i},y.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){"function"!=typeof e&&"object"!=typeof e||(t=e,e=!0);var i=this.remember("_draggable")||new y(this);return(e=void 0===e||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function y(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 r="string"!=typeof t?t:i[t];return a?r/2:r},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,"t"===t||"b"===t),y:this.pointCoord(a[1],i,"r"===t||"l"===t)}}}y.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==t[r]&&(this.options[r]=t[r]);var s=["points","pointsExclude"];for(var r in s){var n=this.options[s[r]];"string"==typeof n?n=n.length>0?n.split(/\s*,\s*/i):[]:"boolean"==typeof n&&"points"===s[r]&&(n=n?a:[]),this.options[s[r]]=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&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},y.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},y.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]})},y.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)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(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)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(r,s){var n=r+this.parameters.p.x,o=s+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(r,s){var n=this.snapToGrid(r,s,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(r){t.update(r||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(r){t.update(r||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},y.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,r=i.y-this.parameters.p.y;this.lastUpdateCall=[a,r],this.calc(a,r),this.el.fire("resizing",{dx:a,dy:r,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},y.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")},y.prototype.snapToGrid=function(e,t,i,a){var r;return r=void 0!==a?[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:[(this.parameters.box.x+e+(1&(i=i??3)?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&&(r[0]-=this.options.snapToGrid),t<0&&(r[1]-=this.options.snapToGrid),e-=Math.abs(r[0])n.maxX&&(e=n.maxX-r),void 0!==n.minY&&s+tn.maxY&&(t=n.maxY-s),[e,t]},y.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+e[0],s=this.parameters.box.height-e[1],n=r/s;return na&&(i[0]=this.parameters.box.width-s*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new y(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var dt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{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 ce(this.ctx),this.ctx.axes=new wt(this.ctx),this.ctx.core=new qt(this.ctx.el,this.ctx),this.ctx.config=new me({}),this.ctx.data=new Je(this.ctx),this.ctx.grid=new Qe(this.ctx),this.ctx.graphics=new z(this.ctx),this.ctx.coreUtils=new Z(this.ctx),this.ctx.crosshairs=new Ye(this.ctx),this.ctx.events=new vt(this.ctx),this.ctx.exports=new Se(this.ctx),this.ctx.fill=new re(this.ctx),this.ctx.localization=new yt(this.ctx),this.ctx.options=new he,this.ctx.responsive=new kt(this.ctx),this.ctx.series=new se(this.ctx),this.ctx.theme=new At(this.ctx),this.ctx.formatters=new xe(this.ctx),this.ctx.titleSubtitle=new St(this.ctx),this.ctx.legend=new et(this.ctx),this.ctx.toolbar=new tt(this.ctx),this.ctx.tooltip=new st(this.ctx),this.ctx.dimensions=new Ce(this.ctx),this.ctx.updateHelpers=new Zt(this.ctx),this.ctx.zoomPanSelection=new Tt(this.ctx),this.ctx.w.globals.tooltip=new st(this.ctx)}}]),y}(),gt=function(){function y(e){Y(this,y),this.ctx=e,this.w=e.w}return F(y,[{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(){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!e.isUpdating&&(a.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach(function(n){r.removeEventListener(n,t.ctx.events.documentEvent)});var s=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(s.Paper),s.Paper.remove(),s.elWrap=null,s.elGraphical=null,s.elLegendContainer=null,s.elLegendWrap=null,s.elLegendForeign=null,s.baseEl=null,s.elGridRect=null,s.elGridRectMask=null,s.elGridRectBarMask=null,s.elGridRectMarkerMask=null,s.elForecastMask=null,s.elNonForecastMask=null,s.elDefs=null}}]),y}(),Oe=new WeakMap,$t=function(){function y(e,t){Y(this,y),this.opts=t,this.ctx=this,this.w=new mt(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 dt(this).initModules(),this.create=P.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return F(y,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(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;"function"==typeof a&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(g,p){var x=!1;if(g.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var f=g.getBoundingClientRect();"none"!==g.style.display&&0!==f.width||(x=!0)}var m=new ResizeObserver(function(v){x&&p.call(g,v),x=!0});g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(g.children).forEach(function(v){return m.observe(v)}):m.observe(g),Oe.set(p,m)}(e.el.parentNode,e.parentResizeHandler);var r=e.el.getRootNode&&e.el.getRootNode(),s=P.is("ShadowRoot",r),n=e.el.ownerDocument,o=s?r.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!o){var h;(o=document.createElement("style")).id="apexcharts-css",o.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_boundingRect,\n.svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_boundingRect,\n.apexcharts-selection-rect+g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_points_l,\n.apexcharts-selection-rect+g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}\n';var c=(null===(h=e.opts.chart)||void 0===h?void 0:h.nonce)||e.w.config.chart.nonce;c&&o.setAttribute("nonce",c),s?r.prepend(o):n.head.appendChild(o)}var d=e.create(e.w.config.series,{});if(!d)return t(e);e.mount(d).then(function(){"function"==typeof e.w.config.chart.events.mounted&&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 dt(this).initModules();var r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,this.responsive.checkResponsiveConfig(t),a.config.xaxis.convertedCatToNumeric&&new be(a.config).convertCatToNumericXaxis(a.config,this.ctx),null===this.el||(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===r.svgWidth))return r.animationEnded=!0,null;var s=e;e.forEach(function(g,p){g.hidden&&(s=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:p}))});var n=Z.checkComboSeries(s,a.config.chart.type);r.comboCharts=n.comboCharts,r.comboBarCount=n.comboBarCount;var o=s.every(function(g){return g.data&&0===g.data.length});(0===s.length||o&&r.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(s),this.theme.init(),new de(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),r.noData&&r.collapsedSeries.length!==r.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),r.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Z(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var c=this.core.plotChartType(s,h),d=new ge(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&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise(function(r,s){if(null===i.el)return s(new Error("Not enough data to display or target element not found"));(null===t||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Qe(i);var n,o,h=i.grid.drawGrid();if(i.annotations=new bt(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&(h&&a.globals.dom.elGraphical.add(h.el),null!=h&&null!==(n=h.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(h.elGridBorders)),Array.isArray(t.elGraph))for(var c=0;c0&&a.globals.memory.methodsToExec.forEach(function(x){x.method(x.params,!1,x.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),r(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),(t=Oe.get(e=this.parentResizeHandler))&&(t.disconnect(),Oe.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,r){a.id===P.escapeString(i)&&Apex._chartInstances.splice(r,1)}),new gt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||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,r,s)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||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&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||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&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),r=0;r0&&void 0!==arguments[0])||arguments[0],!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{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 i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addYaxisAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addPointAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?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&&void 0!==arguments[0]?arguments[0]:0;return new Xe(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Xe(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 Se(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Se(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;"function"==typeof e&&(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;t2?r-2:0),n=2;n