s){var c=s;s=a,a=c}var h=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),s-a,0,e.fillColor,e.opacity,1,e.borderColor,r);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}var u="right"===e.label.position?n.globals.gridWidth:"center"===e.label.position?n.globals.gridWidth/2:0,d=this.annoCtx.graphics.drawText({x:u+e.label.offsetX,y:(null!=a?a:s)+e.label.offsetY-3,text:o,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:"")});d.attr({rel:i}),t.appendChild(d.node)}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map((function(t,a){e.addYaxisAnnotation(t,i.node,a)})),i}}]),e}(),N=function(){function e(t){o(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new E(this.annoCtx)}return c(e,[{key:"addPointAnnotation",value:function(e,t,i){this.w;var a=this.helpers.getX1X2("x1",e),n=this.helpers.getY1Y2("y1",e);if(w.isNumber(a)){var r={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:"")},s=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,n+e.marker.offsetY,r);t.appendChild(s.node);var o=e.label.text?e.label.text:"",l=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:o,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(l.attr({rel:i}),t.appendChild(l.node),e.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});c.attr({transform:"translate(".concat(a+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),c.node.innerHTML=e.customSVG.SVG,t.appendChild(c.node)}if(e.image.path){var h=e.image.width?e.image.width:20,u=e.image.height?e.image.height:20;s=this.annoCtx.addImage({x:a+e.image.offsetX-h/2,y:n+e.image.offsetY-u/2,width:h,height:u,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&s.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&s.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&s.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(t,a){e.addPointAnnotation(t,i.node,a)})),i}}]),e}(),T={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"}}},j=function(){function e(){o(this,e),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,radius:2,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 c(e,[{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:"transparent",locales:[T],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",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{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(e,t){return e+t}),0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,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(e,t){return e+t}),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:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},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",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!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:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),e}(),M=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.graphics=new C(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new E(this),this.xAxisAnnotations=new L(this),this.yAxisAnnotations=new P(this),this.pointsAnnotations=new N(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 c(e,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),n=e.config.chart.animations.enabled,r=[t,i,a],s=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(r[o]),!n||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&s[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:s[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map((function(t,i){e.addImage(t,i)}))}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map((function(t,i){e.addText(t,i)}))}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var i=e.x,a=e.y,n=e.text,r=e.textAnchor,s=e.foreColor,o=e.fontSize,l=e.fontFamily,c=e.fontWeight,h=e.cssClass,u=e.backgroundColor,d=e.borderWidth,f=e.strokeDashArray,p=e.borderRadius,g=e.borderColor,x=e.appendTo,m=void 0===x?".apexcharts-svg":x,b=e.paddingLeft,v=void 0===b?4:b,y=e.paddingRight,w=void 0===y?4:y,k=e.paddingBottom,S=void 0===k?2:k,C=e.paddingTop,A=void 0===C?2:C,E=this.w,L=this.graphics.drawText({x:i,y:a,text:n,textAnchor:r||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:l||E.config.chart.fontFamily,foreColor:s||E.config.chart.foreColor,cssClass:h}),P=E.globals.dom.baseEl.querySelector(m);P&&P.appendChild(L.node);var N=L.bbox();if(n){var T=this.graphics.drawRect(N.x-v,N.y-A,N.width+v+w,N.height+S+A,p,u||"transparent",1,d,g,f);P.insertBefore(T.node,L.node)}}},{key:"addImage",value:function(e,t){var i=this.w,a=e.path,n=e.x,r=void 0===n?0:n,s=e.y,o=void 0===s?0:s,l=e.width,c=void 0===l?20:l,h=e.height,u=void 0===h?20:h,d=e.appendTo,f=void 0===d?".apexcharts-svg":d,p=i.globals.dom.Paper.image(a);p.size(c,u).move(r,o);var g=i.globals.dom.baseEl.querySelector(f);return g&&g.appendChild(p.node),p}},{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,n=e.type,r=e.contextMethod,s=a,o=s.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,h=new j,u=Object.assign({},"xaxis"===n?h.xAxisAnnotation:"yaxis"===n?h.yAxisAnnotation:h.pointAnnotation),d=w.extend(u,t);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),p=this.helpers.addBackgroundToAnno(f,d);return p&&l.insertBefore(p.node,f),i&&o.globals.memory.methodsToExec.push({context:s,id:d.id?d.id:w.randomId(),method:r,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map((function(e,i){"addText"!==e.label&&"addAnnotation"!==e.label||t.globals.memory.methodsToExec.splice(i,1)})),i=w.listToArray(i),Array.prototype.forEach.call(i,(function(e){for(;e.firstChild;)e.removeChild(e.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(e,a){e.id===t&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(e){e.parentElement.removeChild(e)})))}}]),e}(),z=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return c(e,[{key:"isValidDate",value:function(e){return"number"!=typeof e&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,n=["\0"].concat(m(i.months)),r=["\x01"].concat(m(i.shortMonths)),s=["\x02"].concat(m(i.days)),o=["\x03"].concat(m(i.shortDays));function l(e,t){var i=e+"";for(t=t||2;i.length12?d-12:0===d?12:d;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(d))).replace(/(^|[^\\])H/g,"$1"+d)).replace(/(^|[^\\])hh+/g,"$1"+l(f))).replace(/(^|[^\\])h/g,"$1"+f);var p=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var x=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(x,3)),x=Math.round(x/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(x)),x=Math.round(x/10);var b=d<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+x)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var v=b.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-e.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}t=t.replace(/(^|[^\\])K/g,"$1"+w);var S=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(o[0],"g"),o[S])).replace(new RegExp(n[0],"g"),n[h])).replace(new RegExp(r[0],"g"),r[h])).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 n=this.getDate(e),r=this.getDate(t),s=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(s[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(s[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(s[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(s[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(s[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(s[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(s[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=w.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}}]),e}(),I=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.tooltipKeyFormat="dd MMM"}return c(e,[{key:"xLabelFormat",value:function(e,t,i,a){var n=this.w;if("datetime"===n.config.xaxis.type&&void 0===n.config.xaxis.labels.formatter&&void 0===n.config.tooltip.x.formatter){var r=new z(this.ctx);return r.formatDate(r.getDate(t),n.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map((function(e){return e})):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;return w.isNumber(e)&&(e=0!==a.globals.yValueDecimal?e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal):a.globals.maxYArr[i]-a.globals.minYArr[i]<5?e.toFixed(1):e.toFixed(0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttKeyFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttZFormatter=function(e){return e},t.globals.legendFormatter=function(t){return e.defaultGeneralFormatter(t)},void 0!==t.config.xaxis.labels.formatter?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(e){if(w.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(w.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);var i=t.globals.maxX-t.globals.minX;return i>0&&i<100?e.toFixed(1):e.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?e.toFixed(1):e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=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){void 0!==i.labels.formatter?t.globals.yLabelFormatters[a]=i.labels.formatter:t.globals.yLabelFormatters[a]=function(n){return t.globals.xyCharts?Array.isArray(n)?n.map((function(t){return e.defaultYFormatter(t,i,a)})):e.defaultYFormatter(n,i,a):n}})),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(e,t){return e.length>t.length?e:t}),0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),e}(),R=function(e){var t,i=e.isTimeline,a=e.ctx,n=e.seriesIndex,r=e.dataPointIndex,s=e.y1,o=e.y2,l=e.w,c=l.globals.seriesRangeStart[n][r],h=l.globals.seriesRangeEnd[n][r],u=l.globals.labels[r],d=l.config.series[n].name?l.config.series[n].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,g={w:l,seriesIndex:n,dataPointIndex:r,start:c,end:h};"function"==typeof p&&(d=p(d,g)),null!==(t=l.config.series[n].data[r])&&void 0!==t&&t.x&&(u=l.config.series[n].data[r].x),i||"datetime"===l.config.xaxis.type&&(u=new I(a).xLabelFormat(l.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new z(a).formatDate,w:l})),"function"==typeof f&&(u=f(u,g)),Number.isFinite(s)&&Number.isFinite(o)&&(c=s,h=o);var x="",m="",b=l.globals.colors[n];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new z(a);x=v.formatDate(v.getDate(c),l.config.tooltip.x.format),m=v.formatDate(v.getDate(h),l.config.tooltip.x.format)}else x=c,m=h;else x=l.config.tooltip.x.formatter(c),m=l.config.tooltip.x.formatter(h);return{start:c,end:h,startVal:x,endVal:m,ylabel:u,color:b,seriesName:d}},D=function(e){var t=e.color,i=e.seriesName,a=e.ylabel,n=e.start,r=e.end,s=e.seriesIndex,o=e.dataPointIndex,l=e.ctx.tooltip.tooltipLabels.getFormatters(s);n=l.yLbFormatter(n),r=l.yLbFormatter(r);var c=l.yLbFormatter(e.w.globals.series[s][o]),h='\n '.concat(n,'\n - \n ').concat(r,"\n ");return'"},O=function(){function e(t){o(this,e),this.opts=t}return c(e,[{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(),w.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:"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",radius:2,size:8}},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(),r(r({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,n=t.w;return e._getBoxTooltip(n,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,a=t.dataPointIndex,n=t.w;return e._getBoxTooltip(n,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var i=t.seriesIndex,a=t.dataPointIndex,n=t.w,r=function(){var e=n.globals.seriesRangeStart[i][a];return n.globals.seriesRangeEnd[i][a]-e};return n.globals.comboCharts?"rangeBar"===n.config.series[i].type||"rangeArea"===n.config.series[i].type?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(e){var t=R(r(r({},e),{},{isTimeline:!0})),i=t.color,a=t.seriesName,n=t.ylabel,s=t.startVal,o=t.endVal;return D(r(r({},e),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(e):function(e){var t=R(e),i=t.color,a=t.seriesName,n=t.ylabel,s=t.start,o=t.end;return D(r(r({},e),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(e)}},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 function(e){var t=R(e),i=t.color,a=t.seriesName,n=t.ylabel,s=t.start,o=t.end;return D(r(r({},e),{},{color:i,seriesName:a,ylabel:n,start:s,end:o}))}(e)}}}}},{key:"brush",value:function(e){return w.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(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100})),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(e){return"number"==typeof e&&e?e.toFixed(0)+"%":e}),e}},{key:"stackedBars",value:function(){var e=this.bar();return r(r({},e),{},{plotOptions:r(r({},e.plotOptions),{},{bar:r(r({},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(e){return w.isNumber(e)?Math.floor(e):e};var a=e.xaxis.labels.formatter,n=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(n=i.map((function(e){return Array.isArray(e)?e:String(e)}))),n&&n.length&&(e.xaxis.labels.formatter=function(e){return w.isNumber(e)?a(n[Math.floor(e)-1]):a(e)}),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",size:10,offsetY:2}},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:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,n){var r=e.globals.seriesCandleO[t][i],s=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],l=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==n?'\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],"\n
"):'"}}]),e}(),F=function(){function e(t){o(this,e),this.opts=t}return c(e,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new j,n=new O(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),o={};if(i&&"object"===s(i)){var l,c,h,u,d,f,p,g,x={};x=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?n[i.chart.type]():n.line(),null!==(l=i.plotOptions)&&void 0!==l&&null!==(c=l.bar)&&void 0!==c&&c.isFunnel&&(x=n.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(x=n.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(x=n.brush(x)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=n.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(d=u.bar)&&void 0!==d&&d.isDumbbell&&(i=n.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,x,i)).chart.sparkline)&&void 0!==f&&f.enabled||null!==(p=window.Apex.chart)&&void 0!==p&&null!==(g=p.sparkline)&&void 0!==g&&g.enabled)&&(x=n.sparkline(x)),o=w.extend(r,x)}var m=w.extend(o,window.Apex);return r=w.extend(m,i),this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,n,r=new O(i),s=("bar"===e||"boxPlot"===e)&&(null===(a=i.plotOptions)||void 0===a||null===(n=a.bar)||void 0===n?void 0:n.horizontal),o="pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,c=i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return s||o||!l||"between"===c||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new j;(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=w.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[w.extend(i.yAxis,e.yaxis)]:e.yaxis=w.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach((function(e){e.logarithmic&&(a=!0)}));var n=e.series;return t&&!n&&(n=t.config.series),a&&n.length!==e.yaxis.length&&n.length&&(e.yaxis=n.map((function(t,a){if(t.name||(n[a].name="series-".concat(a+1)),e.yaxis[a])return e.yaxis[a].seriesName=n[a].name,e.yaxis[a];var r=w.extend(i.yAxis,e.yaxis[0]);return r.show=!1,r}))),a&&n.length>1&&n.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 j;return e.annotations.yaxis=w.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new j;return e.annotations.xaxis=w.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new j;return e.annotations.points=w.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.chart.background||(e.chart.background="#424242"),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}}]),e}(),Y=function(){function e(){o(this,e)}return c(e,[{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.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"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,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=w.extend({},e),t.initialSeries=w.clone(e.series),t.lastXAxis=w.clone(t.initialConfig.xaxis),t.lastYAxis=w.clone(t.initialConfig.yaxis),t}}]),e}(),X=function(){function e(t){o(this,e),this.opts=t}return c(e,[{key:"init",value:function(){var e=new F(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Y).init(e)}}}]),e}(),B=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.opts=null,this.seriesIndex=0}return c(e,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),n=parseInt(t.globals.gridHeight,10),r=a>n?a:n,s=e.image,o=0,l=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,l=i.fill.image.height):(o=r+1,l=r):(o=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");C.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var h=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(h),h.setAttributeNS(window.SVG.xlink,"href",s),C.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.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("bar"===i||"rangeBar"===i)&&t.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,n,r=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var s=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(s=t.globals.seriesColors[this.seriesIndex]),"function"==typeof s&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=e.fillType?e.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;e.color&&(s=e.color),s||(s="#fff",console.warn("undefined color - ApexCharts"));var c=s;if(-1===s.indexOf("rgb")?s.length<9&&(c=w.hexToRgba(s,l)):s.indexOf("rgba")>-1&&(l=w.getOpacityFromRGBA(s)),e.opacity&&(l=e.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:s,fillOpacity:l,defaultColor:c})),"gradient"===o&&(n=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:s,fillOpacity:l,i:this.seriesIndex})),"image"===o){var h=r.fill.image.src,u=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(h)?e.seriesNumber-1&&(f=w.getOpacityFromRGBA(d));var p=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[n]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)o="dark"===s.gradient.shade?h.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),t.indexOf("rgb")>-1?w.rgb2hex(t):t):h.shadeColor(parseFloat(s.gradient.shadeIntensity),t.indexOf("rgb")>-1?w.rgb2hex(t):t);else if(s.gradient.gradientToColors[l.seriesNumber]){var g=s.gradient.gradientToColors[l.seriesNumber];o=g,g.indexOf("rgba")>-1&&(p=w.getOpacityFromRGBA(g))}else o=t;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(o=s.gradient.gradientTo),s.gradient.inverseColors){var x=d;d=o,o=x}return d.indexOf("rgb")>-1&&(d=w.rgb2hex(d)),o.indexOf("rgb")>-1&&(o=w.rgb2hex(o)),c.drawGradient(u,d,o,f,p,l.size,s.gradient.stops,s.gradient.colorStops,n)}}]),e}(),H=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{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],s=this.w,o=t,l=e,c=null,h=new C(this.ctx),u=s.config.markers.discrete&&s.config.markers.discrete.length;if((s.globals.markers.size[t]>0||r||u)&&(c=h.group({class:r||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(l.x))for(var d=0;d0:s.config.markers.size>0)||r||u){w.isNumber(l.y[d])?p+=" w".concat(w.randomId()):p="apexcharts-nullpoint";var g=this.getMarkerConfig({cssClass:p,seriesIndex:t,dataPointIndex:f});s.config.series[o].data[f]&&(s.config.series[o].data[f].fillColor&&(g.pointFillColor=s.config.series[o].data[f].fillColor),s.config.series[o].data[f].strokeColor&&(g.pointStrokeColor=s.config.series[o].data[f].strokeColor)),a&&(g.pSize=a),(l.x[d]<0||l.x[d]>s.globals.gridWidth||l.y[d]<-s.globals.markers.largestSize||l.y[d]>s.globals.gridHeight+s.globals.markers.largestSize)&&(g.pSize=0),(n=h.drawMarker(l.x[d],l.y[d],g)).attr("rel",f),n.attr("j",f),n.attr("index",t),n.node.setAttribute("default-marker-size",g.pSize),new S(this.ctx).setSelectionFilter(n,t,f),this.addEvents(n),c&&c.add(n)}else void 0===s.globals.pointsArray[t]&&(s.globals.pointsArray[t]=[]),s.globals.pointsArray[t].push([l.x[d],l.y[d]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,n=void 0===a?null:a,r=e.finishRadius,s=void 0===r?null:r,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],h=o.config.markers;return null!==n&&h.discrete.length&&h.discrete.map((function(e){e.seriesIndex===i&&e.dataPointIndex===n&&(l.pointStrokeColor=e.strokeColor,l.pointFillColor=e.fillColor,c=e.size,l.pointShape=e.shape)})),{pSize:null===s?c:s,pRadius:h.radius,width:Array.isArray(h.width)?h.width[i]:h.width,height:Array.isArray(h.height)?h.height[i]:h.height,pointStrokeWidth:Array.isArray(h.strokeWidth)?h.strokeWidth[i]:h.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(h.shape)?h.shape[i]:h.shape),class:t,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[i]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[i]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[i]:h.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new C(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}}}]),e}(),W=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return c(e,[{key:"draw",value:function(e,t,i){var a=this.w,n=new C(this.ctx),r=i.realIndex,s=i.pointsPos,o=i.zRatio,l=i.elParent,c=n.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(s.x))for(var h=0;hg.maxBubbleRadius&&(p=g.maxBubbleRadius)}a.config.chart.animations.enabled||(f=p);var x=s.x[h],m=s.y[h];if(f=f||0,null!==m&&void 0!==a.globals.series[r][u]||(d=!1),d){var b=this.drawPoint(x,m,f,p,r,u,t);c.add(b)}l.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,n,r,s){var o=this.w,l=n,c=new k(this.ctx),h=new S(this.ctx),u=new B(this.ctx),d=new H(this.ctx),f=new C(this.ctx),p=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:r,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[n]&&"bubble"===o.config.series[n].type?a:null});a=p.pSize;var g,x=u.fillPath({seriesNumber:n,dataPointIndex:r,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[n][s]});if("circle"===p.shape?g=f.drawCircle(i):"square"!==p.shape&&"rect"!==p.shape||(g=f.drawRect(0,0,p.width-p.pointStrokeWidth/2,p.height-p.pointStrokeWidth/2,p.pRadius)),o.config.series[l].data[r]&&o.config.series[l].data[r].fillColor&&(x=o.config.series[l].data[r].fillColor),g.attr({x:e-p.width/2-p.pointStrokeWidth/2,y:t-p.height/2-p.pointStrokeWidth/2,cx:e,cy:t,fill:x,"fill-opacity":p.pointFillOpacity,stroke:p.pointStrokeColor,r:a,"stroke-width":p.pointStrokeWidth,"stroke-dasharray":p.pointStrokeDashArray,"stroke-opacity":p.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var m=o.config.chart.dropShadow;h.dropShadow(g,m,n)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var b=o.config.chart.animations.speed;c.animateMarker(g,0,"circle"===p.shape?a:{width:p.width,height:p.height},b,o.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(g)}),100)}))}if(o.globals.dataChanged&&"circle"===p.shape)if(this.dynamicAnim){var v,y,w,A,E=o.config.chart.animations.dynamicAnimation.speed;null!=(A=o.globals.previousPaths[n]&&o.globals.previousPaths[n][s])&&(v=A.x,y=A.y,w=void 0!==A.r?A.r:a);for(var L=0;Lo.globals.gridHeight+u&&(t=o.globals.gridHeight+u/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:h,height:u});var d=o.globals.dataLabelsRects[a].length-2,f=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][d]){var p=o.globals.dataLabelsRects[a][f];(e>p.x+p.width||t>p.y+p.height||t+ut.globals.gridWidth+g.textRects.width+30)&&(o="");var x=t.globals.dataLabels.style.colors[r];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(x=t.globals.dataLabels.style.colors[s]),"function"==typeof x&&(x=x({series:t.globals.series,seriesIndex:r,dataPointIndex:s,w:t})),d&&(x=d);var m=u.offsetX,b=u.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(m=0,b=0),g.drawnextLabel){var v=i.drawText({width:100,height:parseInt(u.style.fontSize,10),x:a+m,y:n+b,foreColor:x,textAnchor:l||u.textAnchor,text:o,fontSize:c||u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight||"normal"});if(v.attr({class:"apexcharts-datalabel",cx:a,cy:n}),u.dropShadow.enabled){var y=u.dropShadow;new S(this.ctx).dropShadow(v,y)}h.add(v),void 0===t.globals.lastDrawnDataLabelsIndexes[r]&&(t.globals.lastDrawnDataLabelsIndexes[r]=[]),t.globals.lastDrawnDataLabelsIndexes[r].push(s)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,n=a.padding,r=a.padding/2,s=t.width,o=t.height,l=new C(this.ctx).drawRect(t.x-n,t.y-r/2,s+2*n,o+r,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new S(this.ctx).dropShadow(l,a.dropShadow),l}},{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,n=w.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),a.config.series=n,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,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:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var n=parseInt(t.getAttribute("rel"),10)-1,r=null,s=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"']")),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(n,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"'] path"));for(var o=0;o=e.from&&a<=e.to&&n[t].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[s])}else"mouseout"===e.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&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 n=i.config.series.map((function(e,a){return e.data&&e.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===t.length||t.length&&t.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===e?0:n.length-1;"asc"===e?r=0;"asc"===e?r++:r--)if(-1!==n[r]){a=n[r];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(t,i,a){for(var n=t[i].childNodes,r={type:a,paths:[],realIndex:t[i].getAttribute("data:realIndex")},s=0;s0)for(var a=function(t){for(var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(t,"'] rect")),a=[],n=function(e){var t=function(t){return i[e].getAttribute(t)},n={x:parseFloat(t("x")),y:parseFloat(t("y")),width:parseFloat(t("width")),height:parseFloat(t("height"))};a.push({rect:n,color:i[e].getAttribute("color")})},r=0;r0)for(var a=0;a0?e:[]}))}}]),e}(),_=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new A(this.ctx)}return c(e,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new G(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 G(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&void 0!==e[this.activeSeriesIndex].data[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,n="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,r=0;r=5?this.twoDSeries.push(w.parseNumber(e[t].data[r][4])):this.twoDSeries.push(w.parseNumber(e[t].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var s=new Date(e[t].data[r][0]);s=new Date(s).getTime(),this.twoDSeriesX.push(s)}else this.twoDSeriesX.push(e[t].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:this.ctx,n=this.w.config,r=this.w.globals,s=new z(a),o=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();if(r.isRangeBar="rangeBar"===n.chart.type&&r.isBarHorizontal,r.hasXaxisGroups="category"===n.xaxis.type&&n.xaxis.group.groups.length>0,r.hasXaxisGroups&&(r.groups=n.xaxis.group.groups),r.hasSeriesGroups=null===(t=e[0])||void 0===t?void 0:t.group,r.hasSeriesGroups){var l=[],c=m(new Set(e.map((function(e){return e.group}))));e.forEach((function(e,t){var i=c.indexOf(e.group);l[i]||(l[i]=[]),l[i].push(e.name)})),r.seriesGroups=l}for(var h=function(){for(var e=0;e0&&(this.twoDSeriesX=o,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var d=e[u].data.map((function(e){return w.parseNumber(e)}));r.series.push(d)}r.seriesZ.push(this.threeDSeries),void 0!==e[u].name?r.seriesNames.push(e[u].name):r.seriesNames.push("series-"+parseInt(u+1,10)),void 0!==e[u].color?r.seriesColors.push(e[u].color):r.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;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(e){e.forEach((function(e){i.labels.indexOf(e.x)<0&&e.x&&i.labels.push(e.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new O(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 n=i.series.map((function(e,t){return e.data.filter((function(e,t,i){return i.findIndex((function(t){return t.x===e.x}))===t}))})),r=n.reduce((function(e,t,i,a){return a[e].length>t.length?e:i}),0),s=0;s0&&n==i.length&&t.push(a)})),e.globals.ignoreYAxisIndexes=t.map((function(e){return e}))}}]),e}(),U=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"getLabel",value:function(e,t,i,a){var n,r,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,h=void 0===e[a]?"":e[a],u=h,d=c.globals.xLabelFormatter,f=c.config.xaxis.labels.formatter,p=!1,g=new I(this.ctx),x=h;l&&(u=g.xLabelFormat(d,h,x,{i:a,dateFormatter:new z(this.ctx).formatDate,w:c}),void 0!==f&&(u=f(h,e[a],{i:a,dateFormatter:new z(this.ctx).formatDate,w:c}))),t.length>0?(n=t[a].unit,r=null,t.forEach((function(e){"month"===e.unit?r="year":"day"===e.unit?r="month":"hour"===e.unit?r="day":"minute"===e.unit&&(r="hour")})),p=r===n,i=t[a].position,u=t[a].value):"datetime"===c.config.xaxis.type&&void 0===f&&(u=""),void 0===u&&(u=""),u=Array.isArray(u)?u:u.toString();var m,b=new C(this.ctx);m=c.globals.rotateXLabels&&l?b.getTextRects(u,parseInt(o,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(u,parseInt(o,10));var v=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&("NaN"===String(u)||s.indexOf(u)>=0&&v)&&(u=""),{x:i,text:u,textRect:m,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,n=a.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(a.globals.gridWidth/120)),n>i||e%Math.round(i/(n+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,n){var r=this.w;if(0===e&&r.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(t.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var s=n[n.length-1];t.x0){!0===o.config.yaxis[n].opposite&&(e+=a.width);for(var h=t;h>=0;h--){var u=c+t/10+o.config.yaxis[n].labels.offsetY-1;o.globals.isBarHorizontal&&(u=r*h),"heatmap"===o.config.chart.type&&(u+=r/2);var d=l.drawLine(e+i.offsetX-a.width+a.offsetX,u+a.offsetY,e+i.offsetX+a.offsetX,u+a.offsetY,a.color);s.add(d),c+=r}}}}]),e}(),q=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{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:"fixSvgStringForIe11",value:function(e){if(!w.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(e){return 2===++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':e}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){null==e&&(e=1);var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{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(e){e.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(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise((function(i){var a=t.w,n=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*n,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*n;var s="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=r.getContext("2d");o.fillStyle=s,o.fillRect(0,0,r.width*n,r.height*n);var l=t.getSvgString(n);if(window.canvg&&w.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var h=r.msToBlob();c.stop(),i({blob:h})}else{var u="data:image/svg+xml,"+encodeURIComponent(l),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(o.drawImage(d,0,0),r.msToBlob){var e=r.msToBlob();i({blob:e})}else{var t=r.toDataURL("image/png");i({imgURI:t})}},d.src=u}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then((function(t){var i=t.imgURI,a=t.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,n=e.columnDelimiter,r=void 0===n?",":n,s=e.lineDelimiter,o=void 0===s?"\n":s,l=this.w;i||(i=l.config.series);var c,h,u=[],d=[],f="",p=l.globals.series.map((function(e,t){return-1===l.globals.collapsedSeriesIndices.indexOf(t)?e:[]})),g=function(e){return"datetime"===l.config.xaxis.type&&String(e).length>=10},x=Math.max.apply(Math,m(i.map((function(e){return e.data?e.data.length:0})))),b=new _(this.ctx),v=new U(this.ctx),y=function(e){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],n=new G(t.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[e],{seriesIndex:n,dataPointIndex:e,w:l})}else i=v.getLabel(l.globals.labels,l.globals.timescaleLabels,0,e).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[e]:l.config.labels.length&&(i=l.config.labels[e]))}else i=l.config.labels[e];return Array.isArray(i)&&(i=i.join(" ")),w.isNumber(i)?i:i.split(r).join("")};u.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(u.push("minimum"),u.push("q1"),u.push("median"),u.push("q3"),u.push("maximum")):"candlestick"===l.config.chart.type?(u.push("open"),u.push("high"),u.push("low"),u.push("close")):"rangeBar"===l.config.chart.type?(u.push("minimum"),u.push("maximum")):i.map((function(e,t){var i=(e.name?e.name:"series-".concat(t))+"";l.globals.axisCharts&&u.push(i.split(r).join("")?i.split(r).join(""):"series-".concat(t))})),l.globals.axisCharts||(u.push(l.config.chart.toolbar.export.csv.headerValue),d.push(u.join(r))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?i.map((function(e,t){l.globals.axisCharts?function(e,t){if(u.length&&0===t&&d.push(u.join(r)),e.data){e.data=e.data.length&&e.data||m(Array(x)).map((function(){return""}));for(var a=0;a0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===a.config.xaxis.position?this.offY=0:this.offY=a.globals.gridHeight+1,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return c(e,[{key:"drawXaxis",value:function(){var e=this.w,t=new C(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 n=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},c=[],h=[],u=this.w,d=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||u.config.xaxis.labels.style.fontWeight,x=l.cssClass||u.config.xaxis.labels.style.cssClass,m=u.globals.padHorizontal,b=a.length,v="category"===u.config.xaxis.type?u.globals.dataPoints:b;if(0===v&&b>v&&(v=b),n){var y=v>1?v-1:v;s=u.globals.gridWidth/Math.min(y,b-1),m=m+r(0,s)/2+u.config.xaxis.labels.offsetX}else s=u.globals.gridWidth/v,m=m+r(0,s)+u.config.xaxis.labels.offsetX;for(var w=function(n){var l=m-r(n,s)/2+u.config.xaxis.labels.offsetX;0===n&&1===b&&s/2===m&&1===v&&(l=u.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,u.globals.timescaleLabels,l,n,c,d,e),w=28;if(u.globals.rotateXLabels&&e&&(w=22),u.config.xaxis.title.text&&"top"===u.config.xaxis.position&&(w+=parseFloat(u.config.xaxis.title.style.fontSize)+2),e||(w=w+parseFloat(d)+(u.globals.xAxisLabelsHeight-u.globals.xAxisGroupLabelsHeight)+(u.globals.rotateXLabels?10:0)),y=void 0!==u.config.xaxis.tickAmount&&"dataPoints"!==u.config.xaxis.tickAmount&&"datetime"!==u.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(n,y,b):o.axesUtils.checkForOverflowingLabels(n,y,b,c,h),u.config.xaxis.labels.show){var k=t.drawText({x:y.x,y:o.offY+u.config.xaxis.labels.offsetY+w-("top"===u.config.xaxis.position?u.globals.xAxisHeight+u.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:g,fontSize:d,fontFamily:f,foreColor:Array.isArray(p)?e&&u.config.xaxis.convertedCatToNumeric?p[u.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(e){if("function"==typeof u.config.chart.events.xAxisLabelClick){var t=Object.assign({},u,{labelIndex:n});u.config.chart.events.xAxisLabelClick(e,o.ctx,t)}})),e){var S=document.createElementNS(u.globals.SVGNS,"title");S.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(S),""!==y.text&&(c.push(y.text),h.push(y))}}na.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(t=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var s=new C(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,n+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(s),s.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 n=0;n0){var c=n[n.length-1].getBBox(),h=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),h.x+h.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var u=0;u0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return c(e,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new C(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),n=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(n),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new C(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var n=0;e.config.stroke.width.forEach((function(e){n=Math.max(n,e)})),a=n}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var r=e.config.chart.type,s=0,o=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(s=e.config.grid.padding.left,o=e.config.grid.padding.right,t.barPadForNumericAxis>s&&(s=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a-s-2,2*-a-2,t.gridWidth+a+o+s+4,t.gridHeight+4*a+4,0,"#fff");var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,a=e.y1,n=e.x2,r=e.y2,s=e.xCount,o=e.parent,l=this.w;if(!(0===t&&l.globals.skipFirstTimelinelabel||t===s-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:a,x2:n,y2:r,xCount:s,parent:o});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var h=l.globals.groups;if(h){for(var u=0,d=0;u0&&"datetime"!==e.config.xaxis.type&&(a=e.globals.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:a,tickAmount:o})):(a=o,o=e.globals.xTickAmount,this._drawInvertedXYLines({xCount:a,tickAmount:o}));return this.drawGridBands(a,o),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.globals.gridWidth/a}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,n=i.globals.gridHeight/t,r=i.globals.gridWidth,s=0,o=0;s=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:r,y2:n,type:"row"}),a+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"on"!==i.config.xaxis.tickPlacement||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,h=i.globals.padHorizontal+i.globals.gridWidth/l,u=i.globals.gridHeight,d=0,f=0;d=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:h,y2:u,type:"column"}),c+=i.globals.gridWidth/l}}]),e}(),K=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"niceScale",value:function(e,t){var i,a,n,r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(i=l.config.xaxis,a=Math.max((c.svgWidth-100)/25,2)):(i=l.config.yaxis[s],a=Math.max((c.svgHeight-100)/15,2)),n=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var h=void 0!==i.stepSize&&null!==i.stepSize,u=void 0!==i.tickAmount&&null!==i.tickAmount,d=u?i.tickAmount:i.forceNiceScale?c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)]:10;if(c.isMultipleYAxis&&!u&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,u=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(e===Number.MIN_VALUE&&0===t||!w.isNumber(e)&&!w.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=0,t=d,c.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var f=t;t=e,e=f}else e===t&&(e=0===e?0:e-1,t=0===t?2:t+1);var p=[];d<1&&(d=1);var g=d,x=Math.abs(t-e);i.forceNiceScale&&(!n&&e>0&&e/x<.15&&(e=0,n=!0),!r&&t<0&&-t/x<.15&&(t=0,r=!0),x=Math.abs(t-e));var m=x/g,b=m,v=Math.floor(Math.log10(b)),y=Math.pow(10,v),k=Math.ceil(b/y);if(m=b=(k=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][k])*y,c.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(m=i.stepSize,h=!0):h&&(m=i.stepSize),h&&i.forceNiceScale){var S=Math.floor(Math.log10(m));m*=Math.pow(10,v-S)}if(n&&r){var C=x/g;if(u)if(h)if(0!=w.mod(x,m)){var A=w.getGCD(m,C);m=C/A<10?A:C}else 0==w.mod(m,C)?m=C:(C=m,u=!1);else m=C;else if(h)0==w.mod(x,m)?C=m:m=C;else if(0==w.mod(x,m))C=m;else{C=x/(g=Math.ceil(x/m));var E=w.getGCD(x,m);x/Ea&&(e=t-m*d,e+=m*Math.floor((L-e)/m))}else n&&(t=u?e+m*g:m*Math.ceil(t/m));else if(u){var P=m/(t-e>t?1:2),N=P*Math.floor(e/P);Math.abs(N-e)<=P/2?t=(e=N)+m*g:e=(t=P*Math.ceil(t/P))-m*g}else e=m*Math.floor(e/m),t=m*Math.ceil(t/m);x=Math.abs(t-e),m=w.getGCD(x,m),g=Math.round(x/m)}if(u||n||r||(g=Math.ceil((x-o)/(m+o)))>16&&w.getPrimeFactors(g).length<2&&g++,c.isMultipleYAxis&&0==c.multiAxisTickAmount&&(c.multiAxisTickAmount=g),g>a&&(!u&&!h||i.forceNiceScale)){var T=w.getPrimeFactors(g),j=T.length-1,M=g;e:for(var z=0;zX);return{result:p,niceMin:p[0],niceMax:p[p.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,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),n||(n=r/i),i===Number.MAX_VALUE&&(i=5,n=1);for(var s=[],o=e;i>=0;)s.push(o),o+=n,i-=1;return{result:s,niceMin:s[0],niceMax:s[s.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=[],n=Math.ceil(Math.log(t)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(t,i,r.logBase):this.logarithmicScale(t,i,r.logBase)):i!==-Number.MAX_VALUE&&w.isNumber(i)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,i,e)):a.yAxisScale[e]=this.linearScale(0,10,10,e,n.yaxis[e].stepSize)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,n=Math.abs(t-e);return t!==-Number.MAX_VALUE&&w.isNumber(t)?a.xAxisScale=this.linearScale(e,t,i.config.xaxis.tickAmount?i.config.xaxis.tickAmount:n<10&&n>1?n+1:10,0,i.config.xaxis.stepSize):a.xAxisScale=this.linearScale(0,10,10),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this.w.globals,t=this.w.config,i=e.minYArr,a=e.maxYArr,n=[],r=[],s=[];t.series.forEach((function(e,t){s.push(t),r.push(null)}));var o,l=[];t.yaxis.forEach((function(e,i){if(e.seriesName){var a=[];Array.isArray(e.seriesName)?a=e.seriesName:a.push(e.seriesName),n[i]=[],a.forEach((function(e){t.series.forEach((function(t,a){if(t.name===e){n[i].push(a),r[a]=i;var o=s.indexOf(a);s.splice(o,1)}}))}))}else l.push(i)}));for(var c=0;c=0;o--)i.splice(s[o],1);i.forEach((function(i,s){var o=Number.MAX_VALUE,l=-Number.MAX_VALUE;if(n.chart.stacked){for(var c=r.seriesX[i[0]].map((function(e){return Number.MIN_VALUE})),h=r.seriesX[i[0]].map((function(e){return Number.MIN_VALUE})),u=r.seriesX[i[0]].map((function(e){return Number.MIN_VALUE})),d=n.series[i[0]].type,f=0;f=0?h[g]+=x:u[g]+=x,c[g]+=x}}"bar"===d?(o=Math.min.apply(null,u),l=Math.max.apply(null,h)):(o=Math.min.apply(null,c),l=Math.max.apply(null,c))}else{for(var m=0;m1&&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,n=this.w.config,r=this.w.globals,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var l=0,c=0,h=void 0;if(r.seriesX.length>=a){var u,d;l=0,c=(h=m(new Set((u=[]).concat.apply(u,m(r.seriesX.slice(e,a)))))).length-1;var f=null===(d=r.brushSource)||void 0===d?void 0:d.w.config.chart.brush;if(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=f&&f.enabled&&null!=f&&f.autoScaleYaxis){if(n.xaxis.min)for(l=0;ll&&h[c]>=n.xaxis.max;c--);}}var p=r.series,g=p,x=p;"candlestick"===n.chart.type?(g=r.seriesCandleL,x=r.seriesCandleH):"boxPlot"===n.chart.type?(g=r.seriesCandleO,x=r.seriesCandleC):r.isRangeData&&(g=r.seriesRangeStart,x=r.seriesRangeEnd);for(var b=e;bg[b][y]&&g[b][y]<0&&(o=g[b][y])}else r.hasNullValues=!0}"bar"!==v&&"column"!==v||(o<0&&s<0&&(s=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,t=Math.min(t,0)))}return"rangeBar"===n.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=t),"bar"===n.chart.type&&(o<0&&s<0&&(s=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:s,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 n=0;ne.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(a=e.maxX-e.minX-1)):a=t.xaxis.tickAmount,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 n=[],r=e.minX-1;r0&&(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=t-a[i-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.config.series.map((function(e){return e.name}))]);var a={},n={};i.forEach((function(i){a[i]=[],n[i]=[],e.w.config.series.map((function(e,t){return i.indexOf(e.name)>-1?t:null})).filter((function(e){return null!==e})).forEach((function(r){for(var s=0;s0?a[i][s]+=parseFloat(t.series[r][s])+1e-4:n[i][s]+=parseFloat(t.series[r][s]))}}))})),Object.entries(a).forEach((function(e){var i=x(e,1)[0];a[i].forEach((function(e,r){t.maxY=Math.max(t.maxY,a[i][r]),t.minY=Math.min(t.minY,n[i][r])}))}))}}}]),e}(),$=function(){function e(t,i){o(this,e),this.ctx=t,this.elgrid=i,this.w=t.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===a.config.chart.type&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===a.config.xaxis.position&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new U(t)}return c(e,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new C(this.ctx),n=i.config.yaxis[e].labels.style,r=n.fontSize,s=n.fontFamily,o=n.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=a.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var h=i.globals.yAxisScale[e].result.length-1,u=i.globals.gridHeight/h,d=i.globals.translateY,f=i.globals.yLabelFormatters[e],p=i.globals.yAxisScale[e].result.slice();p=this.axesUtils.checkForReversedLabels(e,p);var g="";if(i.config.yaxis[e].labels.show)for(var x=function(l){var x=p[l];x=f(x,l,i);var m=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(m*=-1);var b="end";i.config.yaxis[e].opposite&&(b="start"),"left"===i.config.yaxis[e].labels.align?b="start":"center"===i.config.yaxis[e].labels.align?b="middle":"right"===i.config.yaxis[e].labels.align&&(b="end");var v=t.axesUtils.getYAxisForeColor(n.colors,e),y=i.config.yaxis[e].labels.offsetY;"heatmap"===i.config.chart.type&&(y-=(i.globals.gridHeight/i.globals.series.length-1)/2);var w=a.drawText({x:m,y:d+h/10+y+1,text:x,textAnchor:b,fontSize:r,fontFamily:s,fontWeight:o,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:Array.isArray(v)?v[l]:v,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+n.cssClass});l===h&&(g=w),c.add(w);var k=document.createElementNS(i.globals.SVGNS,"title");if(k.textContent=Array.isArray(x)?x.join(" "):x,w.node.appendChild(k),0!==i.config.yaxis[e].labels.rotate){var S=a.rotateAroundCenter(g.node),C=a.rotateAroundCenter(w.node);w.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(S.x," ").concat(C.y,")"))}d+=u},m=h;m>=0;m--)x(m);if(void 0!==i.config.yaxis[e].title.text){var b=a.group({class:"apexcharts-yaxis-title"}),v=0;i.config.yaxis[e].opposite&&(v=i.globals.translateYAxisX[e]);var y=a.drawText({x:v,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});b.add(y),l.add(b)}var w=i.config.yaxis[e].axisBorder,k=31+w.offsetX;if(i.config.yaxis[e].opposite&&(k=-31-w.offsetX),w.show){var S=a.drawLine(k,i.globals.translateY+w.offsetY-2,k,i.globals.gridHeight+i.globals.translateY+w.offsetY+2,w.color,0,w.width);l.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,h,w,i.config.yaxis[e].axisTicks,e,u,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new C(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(n);var r=t.globals.yAxisScale[e].result.length-1,s=t.globals.gridWidth/r+.1,o=s+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),h=t.globals.timescaleLabels;h.length>0&&(this.xaxisLabels=h.slice(),r=(c=h.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var u=h.length;if(t.config.xaxis.labels.show)for(var d=u?0:r;u?d=0;u?d++:d--){var f=c[d];f=l(f,d,t);var p=t.globals.gridWidth+t.globals.padHorizontal-(o-s+t.config.xaxis.labels.offsetX);if(h.length){var g=this.axesUtils.getLabel(c,h,p,d,this.drawnLabels,this.xaxisFontSize);p=g.x,f=g.text,this.drawnLabels.push(g.text),0===d&&t.globals.skipFirstTimelinelabel&&(f=""),d===c.length-1&&t.globals.skipLastTimelinelabel&&(f="")}var x=i.drawText({x:p,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:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});n.add(x),x.tspan(f);var m=document.createElementNS(t.globals.SVGNS,"title");m.textContent=f,x.node.appendChild(m),o+=s}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new C(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var n=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(n-=15);var r=i.drawLine(t.globals.padHorizontal+n+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new C(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});a.add(n),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new C(this.ctx),n={width:0,height:0},r={width:0,height:0},s=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==s&&(n=s.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(r=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(e,n,r,t);o.setAttribute("x",l.xPos-(t?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var n=this.w,r=0,s=0,o=10;return void 0===n.config.yaxis[e].title.text||e<0?{xPos:s,padd:0}:(a?(s=t.width+n.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(r+=1)&&(s-=o/2)):(s=-1*t.width+n.config.yaxis[e].title.offsetX+o/2+i.width/2,n.globals.isBarHorizontal&&(o=25,s=-1*t.width-n.config.yaxis[e].title.offsetX-o)),{xPos:s,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,n=0,r=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===e[l].width,h=e[l].width+t[l].width;o.opposite?i.globals.isBarHorizontal?(n=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=n-o.labels.offsetX):(n=i.globals.gridWidth+i.globals.translateX+s,c||(s=s+h+20),i.globals.translateYAxisX[l]=n-o.labels.offsetX+20):(a=i.globals.translateX-r,c||(r=r+h+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=w.listToArray(t)).forEach((function(t,i){var a=e.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var n=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=w.listToArray(r);var s=n.getBoundingClientRect();"left"===a.labels.align?(r.forEach((function(e,t){e.setAttribute("text-anchor","start")})),a.opposite||n.setAttribute("transform","translate(-".concat(s.width,", 0)"))):"center"===a.labels.align?(r.forEach((function(e,t){e.setAttribute("text-anchor","middle")})),n.setAttribute("transform","translate(".concat(s.width/2*(a.opposite?1:-1),", 0)"))):"right"===a.labels.align&&(r.forEach((function(e,t){e.setAttribute("text-anchor","end")})),a.opposite&&n.setAttribute("transform","translate(".concat(s.width,", 0)")))}}))}}]),e}(),ee=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.documentEvent=w.bind(this.documentEvent,this)}return c(e,[{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],n=a.length,r=0;r0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter((function(t){return t.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=w.extend(T,i);this.w.globals.locale=a.options}}]),e}(),ie=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawAxis",value:function(e,t){var i,a,n=this,r=this.w.globals,s=this.w.config,o=new Q(this.ctx,t),l=new $(this.ctx,t);r.axisCharts&&"radar"!==e&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),s.yaxis.map((function(e,t){if(-1===r.ignoreYAxisIndexes.indexOf(t)&&(a=l.drawYaxis(t),r.dom.Paper.add(a),"back"===n.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),e}(),ae=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new C(this.ctx),i=new S(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,n=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,s=a.colorFrom,o=a.colorTo,l=a.opacityFrom,c=a.opacityTo,h=a.stops,u=n.enabled,d=n.left,f=n.top,p=n.blur,g=n.color,x=n.opacity,m=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===r&&(m=t.drawGradient("vertical",s,o,l,c,null,h,null));var b=t.drawRect();1===e.config.xaxis.crosshairs.width&&(b=t.drawLine());var v=e.globals.gridHeight;(!w.isNumber(v)||v<0)&&(v=0);var y=e.config.xaxis.crosshairs.width;(!w.isNumber(y)||y<0)&&(y=0),b.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:v,width:y,height:v,fill:m,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}),u&&(b=i.dropShadow(b,{left:d,top:f,blur:p,color:g,opacity:x})),e.globals.dom.elGraphical.add(b)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new C(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var n=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(n)}var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),e}(),ne=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return c(e,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var n=a.responsive.slice();n.sort((function(e,t){return e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0})).reverse();var r=new F({}),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n[0].breakpoint,s=window.innerWidth>0?window.innerWidth:screen.width;if(s>a){var o=A.extendArrayProps(r,i.globals.initialConfig,i);e=w.extend(o,e),e=w.extend(i.config,e),t.overrideResponsiveOptions(e)}else for(var l=0;l0&&"function"==typeof i.config.colors[0]&&(i.globals.colors=i.config.series.map((function(e,a){var n=i.config.colors[a];return n||(n=i.config.colors[0]),"function"==typeof n?(t.isColorFn=!0,n({value:i.globals.axisCharts?i.globals.series[a][0]?i.globals.series[a][0]:0:i.globals.series[a],seriesIndex:a,dataPointIndex:a,w:i})):n})))),i.globals.seriesColors.map((function(e,t){e&&(i.globals.colors[t]=e)})),i.config.theme.monochrome.enabled){var n=[],r=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=i.globals.series[0].length*i.globals.series.length);for(var s=i.config.theme.monochrome.color,o=1/(r/i.config.theme.monochrome.shadeIntensity),l=i.config.theme.monochrome.shadeTo,c=0,h=0;h2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,n=t||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(n=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:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map((function(e,t){return Array.isArray(e)?e.length:1})),n=Math.max.apply(Math,m(a));i=t[a.indexOf(n)]}return i}}]),e}(),le=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return c(e,[{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 n=t.globals.xLabelFormatter,r=w.getLargestStringFromArr(i),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);t.globals.isBarHorizontal&&(s=r=t.globals.yAxisScale[0].result.reduce((function(e,t){return e.length>t.length?e:t}),0));var o=new I(this.dCtx.ctx),l=r;r=o.xLabelFormat(n,r,l,{i:void 0,dateFormatter:new z(this.dCtx.ctx).formatDate,w:t}),s=o.xLabelFormat(n,s,l,{i:void 0,dateFormatter:new z(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(s=r="1");var c=new C(this.dCtx.ctx),h=c.getTextRects(r,t.config.xaxis.labels.style.fontSize),u=h;if(r!==s&&(u=c.getTextRects(s,t.config.xaxis.labels.style.fontSize)),(e={width:h.width>=u.width?h.width:u.width,height:h.height>=u.height?h.height:u.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 d=function(e){return c.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};h=d(r),r!==s&&(u=d(s)),e.height=(h.height>u.height?h.height:u.height)/1.5,e.width=h.width>u.width?h.width:u.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,n=t.globals.groups.map((function(e){return e.title})),r=w.getLargestStringFromArr(n),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,n),o=new C(this.dCtx.ctx),l=o.getTextRects(r,a),c=l;return r!==s&&(c=o.getTextRects(s,a)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.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 C(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(e){return e.value})),a=i.reduce((function(e,t){return void 0===e?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):e.length>t.length?e:t}),0);return 1.05*(e=new C(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,n=i.config,r=n.xaxis.type,s=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(e,o){n.yaxis.length>1&&function(e){return-1!==a.collapsedSeriesIndices.indexOf(e)}(o)||function(e){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var o=t.dCtx.timescaleLabels[0],l=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+s/1.75-t.dCtx.yAxisWidthRight,c=o.position-s/1.75+t.dCtx.yAxisWidthLeft,h="right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-h&&(a.skipLastTimelinelabel=!0),c<-(e.show&&!e.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:s/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?t.dCtx.gridPad.right(null===(a=String(h(t,o)))||void 0===a?void 0:a.length)?e:t}),u),f=d=h(d,o);if(void 0!==d&&0!==d.length||(d=l.niceMax),t.globals.isBarHorizontal){a=0;var p=t.globals.labels.slice();d=w.getLargestStringFromArr(p),d=h(d,{seriesIndex:s,dataPointIndex:-1,w:t}),f=e.dCtx.dimHelpers.getLargestStringFromMultiArr(d,p)}var g=new C(e.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),m=g.getTextRects(d,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),b=m;d!==f&&(b=g.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(c>b.width||c>m.width?c:b.width>m.width?b.width:m.width)+a,height:b.height>m.height?b.height:m.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,i=[];return t.config.yaxis.map((function(t,a){if(t.show&&void 0!==t.title.text){var n=new C(e.dCtx.ctx),r="rotate(".concat(t.title.rotate," 0 0)"),s=n.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,r,!1);i.push({width:s.width,height:s.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,n=e.globals.yAxisScale.length>1?10:0,r=new U(this.dCtx.ctx),s=function(s,o){var l=e.config.yaxis[o].floating,c=0;s.width>0&&!l?(c=s.width+n,function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1}(o)&&(c=c-s.width-n)):c=l||r.isYAxisHidden(o)?0:5,e.config.yaxis[o].opposite?a+=c:i+=c,t+=c};return e.globals.yLabelsCoords.map((function(e,t){s(e,t)})),e.globals.yTitleCoords.map((function(e,t){s(e,t)})),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}}]),e}(),he=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return c(e,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var i=function(e){return"bar"===e||"rangeBar"===e||"candlestick"===e||"boxPlot"===e},a=t.config.chart.type,n=0,r=i(a)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(r=t.globals.comboBarCount),t.globals.collapsedSeries.forEach((function(e){i(e.type)&&(r-=1)})),t.config.chart.stacked&&(r=1),(i(a)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&r>0){var s,o,l=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);l<=3&&(l=t.globals.dataPoints),s=l/e,t.globals.minXDiff&&t.globals.minXDiff/s>0&&(o=t.globals.minXDiff/s),o>e/2&&(o/=2),(n=o*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),t.globals.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==t.config[i].text?a+=t.config[i].margin:a+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5})),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(a+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-n.height-r.height-a,i.translateY=i.translateY+n.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new U(this.dCtx.ctx);i.config.yaxis.map((function(n,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||n.floating||a.isYAxisHidden(r)||(n.opposite&&(i.globals.translateX=i.globals.translateX-(t[r].width+e[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),e}(),ue=function(){function e(t){o(this,e),this.ctx=t,this.w=t.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 oe(this),this.dimYAxis=new ce(this),this.dimXAxis=new le(this),this.dimGrid=new he(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return c(e,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(t){var i=x(t,2),a=i[0],n=i[1];e.gridPad[a]=Math.max(n,e.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(t.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(t.config.stroke.width/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 a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4: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(),n=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map((function(e,i){t.globals.yLabelsCoords.push({width:a[i].width,index:i}),t.globals.yTitleCoords.push({width:n[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),s=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,s),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 l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var h=10;("radar"===t.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(l=0,c=0,h=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var u=function(){i.translateX=l,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-l};switch("top"===t.config.xaxis.position&&(h=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=h,u();break;case"top":i.translateY=this.lgRect.height+h,u();break;case"left":i.translateY=h,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=h,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,a),new $(this.ctx).setYAxisXPosition(a,n)}},{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 n="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[n].offsetY,s=i.plotOptions[n].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=r,void(t.translateX=s+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=r-10,t.translateX=s+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+r+10,t.translateX=s+(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=r,t.translateX=s+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=r,t.translateX=s+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w,n=a.globals.hasXaxisGroups?2:1,r=i.height+e.height+t.height,s=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*s+n*o+l,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.xAxisHeighth&&(this.yAxisWidth=h)}}]),e}(),de=function(){function e(t){o(this,e),this.w=t.w,this.lgCtx=t}return c(e,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var n=(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;n&&a.setAttribute("nonce",n);var r=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 }\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\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: inline-block;\n cursor: pointer;\n margin-right: 3px;\n border-style: solid;\n }\n\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\n display: inline-block;\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(r),a}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var n=null,r=null;a.globals.risingSeries=[],a.globals.axisCharts?(n=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(n.getAttribute("data:realIndex"),10)):(n=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(n.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(e){i.riseCollapsedSeries(e.cs,e.csi,r)})):this.hideSeries({seriesEl:n,realIndex:r})}else{var s=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 l=a.config.plotOptions.pie.donut.labels;new C(this.lgCtx.ctx).pathMouseDown(s.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(s.members[0].node,l)}s.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,a=this.w,n=w.clone(a.config.series);if(a.globals.axisCharts){var r=a.config.yaxis[a.globals.seriesYAxisReverseMap[i]];if(r&&r.show&&r.showAlways)a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:n[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i));else if(a.globals.collapsedSeriesIndices.indexOf(i)<0){a.globals.collapsedSeries.push({index:i,data:n[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var s=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(s,1)}}else a.globals.collapsedSeries.push({index:i,data:n[i]}),a.globals.collapsedSeriesIndices.push(i);for(var o=t.childNodes,l=0;l0){for(var r=0;r-1&&(e[a].data=[])})):e.forEach((function(i,a){t.globals.collapsedSeriesIndices.indexOf(a)>-1&&(e[a]=0)})),e}}]),e}(),fe=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new de(this)}return c(e,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),w.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,n=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var r=t.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(e){return e.name?e.name:e.from+" - "+e.to})),n=r.map((function(e){return e.color}))}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var s=t.globals.legendFormatter,o=t.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var c,h=s(a[l],{seriesIndex:l,w:t}),u=!1,d=!1;if(t.globals.collapsedSeries.length>0)for(var f=0;f0)for(var p=0;p0?l-10:0)+(c>0?c-10:0)}a.style.position="absolute",r=r+e+i.config.legend.offsetX,s=s+t+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=s+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(e){a.style[e]&&(a.style[e]=parseInt(i.config.legend[e],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new ue(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),n=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===e.config.legend.position?r=-t.clwh/1.8:"top"===e.config.legend.position&&(r=a.height+n.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.getLegendBBox(),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 G(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new G(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"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&e.target.classList.contains("apexcharts-legend-marker")&&(r(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)}}}]),e}(),pe=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return c(e,[{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 n=0;n\n \n \n\n'),s("zoomOut",this.elZoomOut,'\n');var o=function(i){e.t[i]&&t.config.chart[i].enabled&&r.push({el:"zoom"===i?e.elZoom:e.elSelection,icon:"string"==typeof e.t[i]?e.t[i]:"zoom"===i?'':'',title:e.localeValues["zoom"===i?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),s("reset",this.elZoomReset,''),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&t.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:e.globals.gridWidth,maxY:e.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var e=this.w,t=this.xyRatios;if(!e.globals.zoomEnabled)if(void 0!==e.globals.selection&&null!==e.globals.selection)this.drawSelectionRect(e.globals.selection);else if(void 0!==e.config.chart.selection.xaxis.min&&void 0!==e.config.chart.selection.xaxis.max){var i=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,a=e.globals.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-i;e.globals.isRangeBar&&(i=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,a=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);var n={x:i,y:0,width:a,height:e.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(e){var t=e.x,i=e.y,a=e.width,n=e.height,r=e.translateX,s=void 0===r?0:r,o=e.translateY,l=void 0===o?0:o,c=this.w,h=this.zoomRect,u=this.selectionRect;if(this.dragged||null!==c.globals.selection){var d={transform:"translate("+s+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),h.attr({x:t,y:i,width:a,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),C.setAttrs(h.node,d)),c.globals.selectionEnabled&&(u.attr({x:t,y:i,width:a>0?a:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),C.setAttrs(u.node,d))}}},{key:"hideSelectionRect",value:function(e){e&&e.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(e){var t,i=e.context,a=e.zoomtype,n=this.w,r=i,s=this.gridRect.getBoundingClientRect(),o=r.startX-1,l=r.startY,c=!1,h=!1,u=r.clientX-s.left-o,d=r.clientY-s.top-l;return Math.abs(u+o)>n.globals.gridWidth?u=n.globals.gridWidth-o:r.clientX-s.left<0&&(u=o),o>r.clientX-s.left&&(c=!0,u=Math.abs(u)),l>r.clientY-s.top&&(h=!0,d=Math.abs(d)),t="x"===a?{x:c?o-u:o,y:0,width:u,height:n.globals.gridHeight}:"y"===a?{x:0,y:h?l-d:l,width:n.globals.gridWidth,height:d}:{x:c?o-u:o,y:h?l-d:l,width:u,height:d},r.drawSelectionRect(t),r.selectionDragging("resizing"),t}},{key:"selectionDragging",value:function(e,t){var i=this,a=this.w,n=this.xyRatios,r=this.selectionRect,s=0;"resizing"===e&&(s=30);var o=function(e){return parseFloat(r.node.getAttribute(e))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};a.globals.selection=l,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var e,t,s,o,l=i.gridRect.getBoundingClientRect(),c=r.node.getBoundingClientRect();a.globals.isRangeBar?(e=a.globals.yAxisScale[0].niceMin+(c.left-l.left)*n.invertedYRatio,t=a.globals.yAxisScale[0].niceMin+(c.right-l.left)*n.invertedYRatio,s=0,o=1):(e=a.globals.xAxisScale.niceMin+(c.left-l.left)*n.xRatio,t=a.globals.xAxisScale.niceMin+(c.right-l.left)*n.xRatio,s=a.globals.yAxisScale[0].niceMin+(l.bottom-c.bottom)*n.yRatio[0],o=a.globals.yAxisScale[0].niceMax-(c.top-l.top)*n.yRatio[0]);var h={xaxis:{min:e,max:t},yaxis:{min:s,max:o}};a.config.chart.events.selection(i.ctx,h),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,h)}),s))}},{key:"selectionDrawn",value:function(e){var t=e.context,i=e.zoomtype,a=this.w,n=t,r=this.xyRatios,s=this.ctx.toolbar;if(n.startX>n.endX){var o=n.startX;n.startX=n.endX,n.endX=o}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,h=void 0;a.globals.isRangeBar?(c=a.globals.yAxisScale[0].niceMin+n.startX*r.invertedYRatio,h=a.globals.yAxisScale[0].niceMin+n.endX*r.invertedYRatio):(c=a.globals.xAxisScale.niceMin+n.startX*r.xRatio,h=a.globals.xAxisScale.niceMin+n.endX*r.xRatio);var u=[],d=[];if(a.config.yaxis.forEach((function(e,t){u.push(a.globals.yAxisScale[t].niceMax-r.yRatio[t]*n.startY),d.push(a.globals.yAxisScale[t].niceMax-r.yRatio[t]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==h)if(a.globals.zoomEnabled){var f=w.clone(a.globals.initialConfig.yaxis),p=w.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),h=Math.floor(h),c<1&&(c=1,h=a.globals.dataPoints),h-c<2&&(h=c+1)),"xy"!==i&&"x"!==i||(p={min:c,max:h}),"xy"!==i&&"y"!==i||f.forEach((function(e,t){f[t].min=d[t],f[t].max=u[t]})),s){var g=s.getBeforeZoomRange(p,f);g&&(p=g.xaxis?g.xaxis:p,f=g.yaxis?g.yaxis:f)}var x={xaxis:p};a.config.chart.group||(x.yaxis=f),n.ctx.updateHelpers._updateOptions(x,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&s.zoomCallback(p,f)}else if(a.globals.selectionEnabled){var m,b=null;m={min:c,max:h},"xy"!==i&&"y"!==i||(b=w.clone(a.config.yaxis)).forEach((function(e,t){b[t].min=d[t],b[t].max=u[t]})),a.globals.selection=n.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(n.ctx,{xaxis:m,yaxis:b})}}},{key:"panDragging",value:function(e){var t=e.context,i=this.w,a=t;if(void 0!==i.globals.lastClientPosition.x){var n=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(n)>Math.abs(r)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(r)&&n<0?this.moveDirection="right":Math.abs(r)>Math.abs(n)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(n)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var s=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(s,o)}},{key:"delayedPanScrolled",value:function(){var e=this.w,t=e.globals.minX,i=e.globals.maxX,a=(e.globals.maxX-e.globals.minX)/2;"left"===this.moveDirection?(t=e.globals.minX+a,i=e.globals.maxX+a):"right"===this.moveDirection&&(t=e.globals.minX-a,i=e.globals.maxX-a),t=Math.floor(t),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:t,max:i}},t,i)}},{key:"panScrolled",value:function(e,t){var i=this.w,a=this.xyRatios,n=w.clone(i.globals.initialConfig.yaxis),r=a.xRatio,s=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,s=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(e=s+i.globals.gridWidth/15*r,t=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(e=s-i.globals.gridWidth/15*r,t=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ei.globals.initialMaxX)&&(e=s,t=o);var l={xaxis:{min:e,max:t}};i.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,e,t)}},{key:"updateScrolledChart",value:function(e,t,i){var a=this.w;this.ctx.updateHelpers._updateOptions(e,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:t,max:i}})}}]),i}(),xe=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx}return c(e,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,n=e.clientY,r=this.w,s=i.getBoundingClientRect(),o=s.width,l=s.height,c=o/(r.globals.dataPoints-1),h=l/r.globals.dataPoints,u=this.hasBars();!r.globals.comboCharts&&!u||r.config.xaxis.convertedCatToNumeric||(c=o/r.globals.dataPoints);var d=a-s.left-r.globals.barPadForNumericAxis,f=n-s.top;d<0||f<0||d>o||f>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(d/c),g=Math.floor(f/h);u&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(d/c),p-=1);var x=null,m=null,b=r.globals.seriesXvalues.map((function(e){return e.filter((function(e){return w.isNumber(e)}))})),v=r.globals.seriesYvalues.map((function(e){return e.filter((function(e){return w.isNumber(e)}))}));if(r.globals.isXNumeric){var y=this.ttCtx.getElGrid().getBoundingClientRect(),k=d*(y.width/o),S=f*(y.height/l);x=(m=this.closestInMultiArray(k,S,b,v)).index,p=m.j,null!==x&&(b=r.globals.seriesXvalues[x],p=(m=this.closestInArray(k,b)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=g:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?g:p,hoverX:d,hoverY:f}}},{key:"closestInMultiArray",value:function(e,t,i,a){var n=this.w,r=0,s=null,o=-1;n.globals.series.length>1?r=this.getFirstActiveXArray(i):s=0;var l=i[r][0],c=Math.abs(e-l);if(i.forEach((function(t){t.forEach((function(t,i){var a=Math.abs(e-t);a<=c&&(c=a,o=i)}))})),-1!==o){var h=a[r][o],u=Math.abs(t-h);s=r,a.forEach((function(e,i){var a=Math.abs(t-e[o]);a<=u&&(u=a,s=i)}))}return{index:s,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map((function(e,t){return e.length>0?t:-1})),n=0;n0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=m(e)).sort((function(e,t){var i=Number(e.getAttribute("data:realIndex")),a=Number(t.getAttribute("data:realIndex"));return ai?-1:0}));var t=[];return e.forEach((function(e){t.push(e.querySelector(".apexcharts-marker"))})),t}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{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,n=0;n";u.forEach((function(i,a){e+=' ').concat(i.attrs.name,"
"),t+="".concat(i.val,"
")})),b.innerHTML=e+"",v.innerHTML=t+""};s?l.globals.seriesGoals[t][i]&&Array.isArray(l.globals.seriesGoals[t][i])?y():(b.innerHTML="",v.innerHTML=""):y()}else b.innerHTML="",v.innerHTML="";if(null!==p&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),s&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=a[t].querySelector(".apexcharts-tooltip-marker"),k=a[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(h)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==h||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,n=this.ctx.series.filteredSeriesX(),r="",s="",o=null,l=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},h=a.globals.ttZFormatter;null===i?l=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=n[t][i],0===n[t].length&&(r=n[this.tooltipUtil.getFirstActiveXArray(n)][i])):r=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var u=r;return r=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new I(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new z(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](u,c):a.globals.xLabelFormatter(u,c),void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(u,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=h(a.globals.seriesZ[t][i],a)),s="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(u,c):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(s)?s.join(" "):s,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,n=e.y2,r=e.w,s=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),s.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:n,w:r})}}]),e}(),be=function(){function e(t){o(this,e),this.ttCtx=t,this.ctx=t.ctx,this.w=t.w}return c(e,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,n=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,s=a.globals.labels.slice().length;if(null!==t&&(r=a.globals.gridWidth/s*t),null===n||a.globals.isBarHorizontal||(n.setAttribute("x",r),n.setAttribute("x1",r),n.setAttribute("x2",r),n.setAttribute("y2",a.globals.gridHeight),n.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&C.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&C.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 a,n=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e))e+=t.globals.translateX,a=new C(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=a.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=n+"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),n=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect().height,s=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(s-=26),n-=r/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=n+"px",i.yaxisTTEls[e].style.left=s+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,n=this.ttCtx,r=n.getElTooltip(),s=n.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(l>a.globals.gridWidth/2&&(l=l-s.ttWidth-o-10),l>a.globals.gridWidth-s.ttWidth-10&&(l=a.globals.gridWidth-s.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var h=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-h.left)>a.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+a.globals.translateY-h.top)>a.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||s.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-s.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var n=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,n=0,r=0,s=a.globals.pointsArray;t=new G(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(t);s[t]&&(n=s[t][e][0],r=s[t][e][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",u)):l[c]&&l[c].setAttribute("r",0)}}this.moveXCrosshairs(n),i.fixedTooltip||this.moveTooltip(n,r||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,n=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;i.globals.isBarHorizontal&&(r=new G(this.ctx).getActiveConfigSeriesIndex("desc")+1);var s=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));s||"number"!=typeof t||(s=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=s?parseFloat(s.getAttribute("cx")):0,l=s?parseFloat(s.getAttribute("cy")):0,c=s?parseFloat(s.getAttribute("barWidth")):0,h=a.getElGrid().getBoundingClientRect(),u=s&&(s.classList.contains("apexcharts-candlestick-area")||s.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(s&&!u&&(o-=n%2!=0?c/2:0),s&&u&&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?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-h.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),e}(),ve=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new be(t)}return c(e,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new C(this.ctx),i=new H(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=m(a),e.config.chart.stacked&&a.sort((function(e,t){return parseFloat(e.getAttribute("data:realIndex"))-parseFloat(t.getAttribute("data:realIndex"))}));for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(e,t);var r=t.getAttribute("cx"),s=t.getAttribute("cy");if(null!==i&&null!==a&&(r=i,s=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===n.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,s,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,n=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),s=t.config.markers.hover.size,o=0;o=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),e}(),ye=function(){function e(t){o(this,e),this.w=t.w;var i=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&"rangeBar"===i.config.chart.type&&i.config.plotOptions.bar.rangeBarGroupRows}return c(e,[{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,n=e.y,r=e.type,s=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),h=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),d=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(s.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,a=h+s.tooltipRect.ttWidth/2+d,n=u+s.tooltipRect.ttHeight/2-f/2,s.tooltipPosition.moveXCrosshairs(h+d/2),a>o.globals.gridWidth/2&&(a=h-s.tooltipRect.ttWidth/2+d),s.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?s.tooltipRect.ttWidth:0),n=o.globals.clientY-p.top-(n>o.globals.gridHeight/2?s.tooltipRect.ttHeight:0)}}return{x:a,y:n}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,n=e.opt,r=e.x,s=e.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),h=parseInt(n.paths.getAttribute("cy"),10),u=parseFloat(n.paths.getAttribute("val"));if(i=parseInt(n.paths.getAttribute("rel"),10),t=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=w.findAncestor(n.paths,"apexcharts-series");d&&(t=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,r=c,s=h+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();s=l.e.clientY+o.globals.translateY-f.top}u<0&&(s=h),l.marker.enlargeCurrentPoint(i,n.paths,r,s)}return{x:r,y:s}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,n=e.opt,r=this.w,s=this.ttCtx,o=s.getElTooltip(),l=0,c=0,h=0,u=this.getBarTooltipXY({e:a,opt:n});t=u.i;var d=u.barHeight,f=u.j;r.globals.capturedSeriesIndex=t,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=u.x,h=u.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,l=c):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(h)&&(h=r.globals.svgHeight-s.tooltipRect.ttHeight);var p=parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),g=r.globals.isMultipleYAxis?r.config.yaxis[p]&&r.config.yaxis[p].reversed:r.config.yaxis[0].reversed;if(c+s.tooltipRect.ttWidth>r.globals.gridWidth&&!g?c-=s.tooltipRect.ttWidth:c<0&&(c=0),s.w.config.tooltip.followCursor){var x=s.getElGrid().getBoundingClientRect();h=s.e.clientY-x.top}null===s.tooltip&&(s.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?s.tooltipPosition.moveXCrosshairs(l+i/2):s.tooltipPosition.moveXCrosshairs(l)),!s.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars())&&(g&&(c-=s.tooltipRect.ttWidth)<0&&(c=0),!g||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||(h=h+d-2*(r.globals.series[t][f]<0?d:0)),h=h+r.globals.translateY-s.tooltipRect.ttHeight/2,o.style.left=c+r.globals.translateX+"px",o.style.top=h+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,n=this.w,r=null,s=this.ttCtx,o=0,l=0,c=0,h=0,u=0,d=i.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var f=i.target,p=f.getBoundingClientRect(),g=a.elGrid.getBoundingClientRect(),x=p.height;u=p.height;var m=p.width,b=parseInt(f.getAttribute("cx"),10),v=parseInt(f.getAttribute("cy"),10);h=parseFloat(f.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(f.getAttribute("j"),10),o=parseInt(f.parentNode.getAttribute("rel"),10)-1;var w=f.getAttribute("data-range-y1"),k=f.getAttribute("data-range-y2");n.globals.comboCharts&&(o=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var S=function(e){return n.globals.isXNumeric?b-m/2:t.isVerticalGroupedRangeBar?b+m/2:b-s.dataPointsDividedWidth+m/2},C=function(){return v-s.dataPointsDividedHeight+x/2-s.tooltipRect.ttHeight/2};s.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!s.showOnIntersect&&n.config.tooltip.shared,e:i}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=y-g.left+15,c=C()):(l=S(),c=i.clientY-g.top-s.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=b)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,n=this.w,r=n.globals.yLabelFormatters[e];if(a.yaxisTooltips[e]){var s=a.getElGrid().getBoundingClientRect(),o=(t-s.top)*i.yRatio[e],l=n.globals.maxYArr[e]-n.globals.minYArr[e],c=n.globals.minYArr[e]+(l-o);a.tooltipPosition.moveYCrosshairs(t-s.top),a.yaxisTooltipText[e].innerHTML=r(c),a.tooltipPosition.moveYAxisTooltip(e)}}}]),e}(),ke=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new xe(this),this.tooltipLabels=new me(this),this.tooltipPosition=new be(this),this.marker=new ve(this),this.intersect=new ye(this),this.axesTooltip=new we(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=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return c(e,[{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(e,i){return!!(e.show&&e.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 Q(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 n=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(n=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(n),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],n=this.getElTooltip(),r=function(r){var s=document.createElement("div");s.classList.add("apexcharts-tooltip-series-group"),s.style.order=i.config.tooltip.inverseOrder?e-r:r+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(r)<0&&s.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],s.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach((function(e){var t=document.createElement("div");t.classList.add("apexcharts-tooltip-".concat(e,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(e,"-label")),t.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(e,"-value")),t.appendChild(a),l.appendChild(t)})),s.appendChild(l),n.appendChild(s),a.push(s)},s=0;s0&&this.addPathsEventListeners(f,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,n=i.height+10,r=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(s=s+e.globals.svgHeight-n-10),t.style.left=r+"px",t.style.top=s+"px",{x:r,y:s,ttWidth:a,ttHeight:n}}},{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(a){var n={paths:e[a],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(t){return e[a].addEventListener(t,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})}))},n=0;n=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=[],n=this.w;n.config.chart.group&&(a=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(a.length?a.forEach((function(a){var n=i.getElTooltip(a),r={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,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,n=e.e,r=t.w,s=this.getElTooltip();s&&(i.tooltipRect={x:0,y:0,ttWidth:s.getBoundingClientRect().width,ttHeight:s.getBoundingClientRect().height},i.e=n,!i.tooltipUtil.hasBars()||r.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new G(t).toggleSeriesOnHover(n,n.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:n,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:n,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,n=e.opt,r=this.w,s=n.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ls.top+s.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var h=this.getElTooltip(),u=this.getElXCrosshairs(),d=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==u&&u.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter((function(e){return!0===e}));if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,n);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:a,opt:n,x:t,y:i,type:r.config.chart.type});t=p.x,i=p.y,h.style.left=t+"px",h.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:n,x:t,y:i});if(this.yaxisTooltips.length)for(var g=0;gl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(e,o,a,s);else if(this.tooltipUtil.isXoverlap(s)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(e,t){return!n.globals.collapsedSeriesIndices.includes(t)}));this.create(e,this,c,s,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[t][a]){if(void 0!==n.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 r=n.globals.series.findIndex((function(e,t){return!n.globals.collapsedSeriesIndices.includes(t)}));this.create(e,this,r,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new C(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,A=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===k&&(k=this.tConfig.shared);var E=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(S.config.legend.tooltipHoverFormatter){var P=S.config.legend.tooltipHoverFormatter,N=Array.from(this.legendLabels);N.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}));for(var T=0;T0?A.marker.enlargePoints(a):A.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var D=new C(this.ctx),O=S.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var F=0;F0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=h*k)),w&&(f=f+d.height/2-b/2-2);var A=this.barCtx.series[n][r]<0,E=l;switch(this.barCtx.isReversed&&(E=l-u+(A?2*u:0),l-=u),x.position){case"center":p=w?A?E-u/2+y:E+u/2-y:A?E-u/2+d.height/2+y:E+u/2+d.height/2-y;break;case"bottom":p=w?A?E-u+y:E+u-y:A?E-u+d.height+b+y:E+u-d.height/2+b-y;break;case"top":p=w?A?E+y:E-y:A?E-d.height/2-y:E+d.height+y}if(this.barCtx.lastActiveBarSerieIndex===s&&m.enabled){var L=new C(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),g.fontSize);t=A?E-L.height/2-y-m.offsetY+18:E+L.height+y+m.offsetY-18,i=f+m.offsetX}return a.config.chart.stacked||(p<0?p=0+b:p+d.height/3>a.globals.gridHeight&&(p=a.globals.gridHeight-b)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:i,totalDataLabelsY:t,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,n=e.j,r=e.realIndex,s=e.groupIndex,o=e.bcy,l=e.barHeight,c=e.barWidth,h=e.textRects,u=e.dataLabelsX,d=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,g=e.barTotalDataLabelsConfig,x=e.offX,m=e.offY,b=t.globals.gridHeight/t.globals.dataPoints;c=Math.abs(c);var v,y,w=(o+=-1!==s?s*l:0)-(this.barCtx.isRangeBar?0:b)+l/2+h.height/2+m-3,k="start",S=this.barCtx.series[a][n]<0,A=i;switch(this.barCtx.isReversed&&(A=i+c-(S?2*c:0),i=t.globals.gridWidth-c),p.position){case"center":u=S?A+c/2-x:Math.max(h.width/2,A-c/2)+x;break;case"bottom":u=S?A+c-d-Math.round(h.width/2)-x:A-c+d+Math.round(h.width/2)+x;break;case"top":u=S?A-d+Math.round(h.width/2)-x:A-d-Math.round(h.width/2)+x}if(this.barCtx.lastActiveBarSerieIndex===r&&g.enabled){var E=new C(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),f.fontSize);S?(v=A-d+Math.round(E.width/2)-x-g.offsetX-15,k="end"):v=A-d-Math.round(E.width/2)+x+g.offsetX+15,y=w+g.offsetY}return t.config.chart.stacked||(u<0?u=u+h.width+d:u+h.width/2>t.globals.gridWidth&&(u=t.globals.gridWidth-h.width-d)),{bcx:i,bcy:o,dataLabelsX:u,dataLabelsY:w,totalDataLabelsX:v,totalDataLabelsY:y,totalDataLabelsAnchor:k}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,n=e.i,s=e.j,o=e.textRects,l=e.barHeight,c=e.barWidth,h=e.dataLabelsConfig,u=this.w,d="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(t,", ").concat(i,")"));var f=new V(this.barCtx.ctx),p=new C(this.barCtx.ctx),g=h.formatter,x=null,m=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(h.enabled&&!m){x=p.group({class:"apexcharts-data-labels",transform:d});var b="";void 0!==a&&(b=g(a,r(r({},u),{},{seriesIndex:n,dataPointIndex:s,w:u}))),!a&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b="");var v=u.globals.series[n][s]<0,y=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&cMath.abs(c)&&(b=""):o.height/1.6>Math.abs(l)&&(b=""));var w=r({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),f.plotDataLabelsText({x:t,y:i,text:b,i:n,j:s,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(e){var t,i=e.x,a=e.y,n=e.val,r=e.barWidth,s=e.barHeight,o=e.realIndex,l=e.textAnchor,c=e.barTotalDataLabelsConfig,h=this.w,u=new C(this.barCtx.ctx);return c.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===o&&(t=u.drawText({x:i-(!h.globals.isBarHorizontal&&h.globals.seriesGroups.length?r/h.globals.seriesGroups.length:0),y:a-(h.globals.isBarHorizontal&&h.globals.seriesGroups.length?s/h.globals.seriesGroups.length:0),foreColor:c.style.color,text:n,textAnchor:l,fontFamily:c.style.fontFamily,fontSize:c.style.fontSize,fontWeight:c.style.fontWeight})),t}}]),e}(),Ce=function(){function e(t){o(this,e),this.w=t.w,this.barCtx=t}return c(e,[{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=l.globals.minXDiff/u),(r=a/h*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),s=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=r,{x:e,y:t,yDivision:i,xDivision:a,barHeight:n,barWidth:r,zeroH:s,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.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=[]})):(e.prevY=[],e.prevX=[],e.prevYF=[],e.prevXF=[],e.prevYVal=[],e.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.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=[]})):(e.xArrj=[],e.xArrjF=[],e.xArrjVal=[],e.yArrj=[],e.yArrjF=[],e.yArrjVal=[])}},{key:"getPathFillColor",value:function(e,t,i,a){var n,r,s,o,l=this.w,c=new B(this.barCtx.ctx),h=null,u=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){e[t][i]>=a.from&&e[t][i]<=a.to&&(h=a.color)})),l.config.series[t].data[i]&&l.config.series[t].data[i].fillColor&&(h=l.config.series[t].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?u:a,dataPointIndex:i,color:h,value:e[t][i],fillConfig:null===(n=l.config.series[t].data[i])||void 0===n?void 0:n.fill,fillType:null!==(r=l.config.series[t].data[i])&&void 0!==r&&null!==(s=r.fill)&&void 0!==s&&s.type?null===(o=l.config.series[t].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[t]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,n=this.w;return void 0===this.barCtx.series[e][t]||null===this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,n.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,n=e.x2,r=e.y1,s=e.y2,o=e.elSeries,l=this.w,c=new C(this.barCtx.ctx),h=new G(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var u=this.barCtx.barOptions.colors.backgroundBarColors[t],d=c.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==n?n:l.globals.gridWidth,void 0!==s?s:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,u,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(d),d.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,n=e.y1,r=e.y2,s=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,h=e.j,u=e.w,d=new C(this.barCtx.ctx);(s=Array.isArray(s)?s[l]:s)||(s=0);var f=i,p=a;null!==(t=u.config.series[l].data[h])&&void 0!==t&&t.columnWidthOffset&&(p=a-u.config.series[l].data[h].columnWidthOffset/2,f=i+u.config.series[l].data[h].columnWidthOffset);var g=p,x=p+f;n+=.001,r+=.001;var m=d.move(g,n),b=d.move(g,n),v=d.line(x-s,n);if(u.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(l,h,!1)),m=m+d.line(g,r)+d.line(x-s,r)+d.line(x-s,n)+("around"===u.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),b=b+d.line(g,n)+v+v+v+v+v+d.line(g,n)+("around"===u.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(m=d.roundPathCorners(m,u.config.plotOptions.bar.borderRadius)),u.config.chart.stacked){var y=this.barCtx;u.globals.hasSeriesGroups&&o&&(y=this.barCtx[o]),y.yArrj.push(r),y.yArrjF.push(Math.abs(n-r)),y.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:m,pathFrom:b}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,n=e.x1,r=e.x2,s=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,h=e.j,u=e.w,d=new C(this.barCtx.ctx);(s=Array.isArray(s)?s[l]:s)||(s=0);var f=i,p=a;null!==(t=u.config.series[l].data[h])&&void 0!==t&&t.barHeightOffset&&(f=i-u.config.series[l].data[h].barHeightOffset/2,p=a+u.config.series[l].data[h].barHeightOffset);var g=f,x=f+p;n+=.001,r+=.001;var m=d.move(n,g),b=d.move(n,g);u.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(l,h,!1));var v=d.line(n,x-s);if(m=m+d.line(r,g)+d.line(r,x-s)+v+("around"===u.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),b=b+d.line(n,g)+v+v+v+v+v+d.line(n,g)+("around"===u.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(m=d.roundPathCorners(m,u.config.plotOptions.bar.borderRadius)),u.config.chart.stacked){var y=this.barCtx;u.globals.hasSeriesGroups&&o&&(y=this.barCtx[o]),y.xArrj.push(r),y.xArrjF.push(Math.abs(n-r)),y.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:m,pathFrom:b}}},{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){var i=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(i=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),i}},{key:"getGoalValues",value:function(e,t,i,a,n){var s=this,o=this.w,l=[],c=function(a,n){var r;l.push((h(r={},e,"x"===e?s.getXForValue(a,t,!1):s.getYForValue(a,i,!1)),h(r,"attrs",n),r))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][n]&&Array.isArray(o.globals.seriesGoals[a][n])&&o.globals.seriesGoals[a][n].forEach((function(e){c(e.value,e)})),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,d={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(u[a])?u[a][0]:u[a]};c(o.globals.seriesRangeStart[a][n],d),c(o.globals.seriesRangeEnd[a][n],r(r({},d),{},{strokeColor:Array.isArray(u[a])?u[a][1]:u[a]}))}return l}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,n=e.goalY,r=e.barWidth,s=e.barHeight,o=new C(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(e){var t=void 0!==e.attrs.strokeHeight?e.attrs.strokeHeight:s/2,a=i+t+s/2;c=o.drawLine(e.x,a-2*t,e.x,a,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),l.add(c)})):Array.isArray(n)&&n.forEach((function(e){var i=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:r/2,a=t+i+r/2;c=o.drawLine(a-2*i,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),l.add(c)})),l}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,n=this.w,r=t.x,s=t.x1,o=t.barYPosition,l=i.x,c=i.x1,h=i.barYPosition,u=o+i.barHeight,d=new C(this.barCtx.ctx),f=new w,p=d.move(s,u)+d.line(r,u)+d.line(l,h)+d.line(c,h)+d.line(s,u)+("around"===n.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return d.drawPath({d:p,fill:f.shadeColor(.5,w.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(e){var t=e.i,i=e.j,a=this.w,n=0,r=0;return a.globals.seriesPercent.forEach((function(e,a){e[i]&&n++,a