1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9932],{24468:function(t,e,i){i.d(e,{Z:function(){return s.ZP}});var s=i(65892),a=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,c=(t,e,i)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,d=(t,e)=>{for(var i in e||(e={}))l.call(e,i)&&c(t,i,e[i]);if(o)for(var i of o(e))h.call(e,i)&&c(t,i,e[i]);return t},u=(t,e)=>r(t,n(e));const p=s.BG,g=s.WC,f=s.i2,m=s.$9,x=s.Zp,b=s.uX,y=s.UQ,w=s.V0,v=s.kD,A=s.qY,_=s.GG,S=s.br,C=s.rN,k=s.hv,M=s.J1,P=s.Pj,L=s.Pw,I=s.Tl,E=s.UW,D=s.NI,F=s.z$,R=s.Ip,z=s.Vg,T=s.kb,X=s.Bl,O=s.$I,W=s.d4,$=s.o6,Y=s.hA,B=s.QK,N=s.Mp,H=s.CT,j=s.XD,V=s.hW,G=s.pe,q=s.kp,Z=s.jf,U=s.H5,K=s.MG,J=s.b0,Q=s.tO,tt=s.nM,et=s.cG,it=s.NE,st=s.LB,at=s.ej,rt=s.kC,nt=s.Zi,ot=s.nN,lt=s.hV,ht=s.ji,ct=s.nx,dt=s.Ap,ut=s.Mq,pt=s.k$,gt=s.RH,ft=s.LH,mt=s.WN,xt=s.LN,bt=s.Tq,yt=s.C7,wt=s.pt,vt=s.cT,At=s.qj,_t=s.TZ,St=s.fe,Ct=s.dZ,kt=s.IG,Mt=s.Ac,Pt=s.hc,Lt=s.oU,It=s.u9,Et=s.x,Dt=s.ax,Ft=s.x0,Rt=s.l4,zt=s.Ro,Tt=s.j3,Xt=s.fP,Ot=s.In,Wt=s.zS,$t=s.Vf,Yt=s.a$,Bt=s.uw,Nt=s.aj,Ht=s.A_,jt=s.mt,Vt=s.XY,Gt=Object.freeze(Object.defineProperty({__proto__:null,__apex_Animations:g,__apex_Animations_applyAnimationPolicy:m,__apex_Animations_applyProgressiveReveal:b,__apex_Animations_computeStagger:f,__apex_Animations_prefersReducedMotion:x,__apex_Base:y,__apex_BrowserAPIs_BrowserAPIs:ut,__apex_ChartFactory_getChartClass:v,__apex_ChartFactory_isCustom:A,__apex_ChartFactory_register:w,__apex_Config:et,__apex_Constants_LINE_HEIGHT_RATIO:Xt,__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD:Ot,__apex_Constants_NICE_SCALE_DEFAULT_TICKS:Wt,__apex_Core:_,__apex_CoreUtils:S,__apex_Crosshairs:C,__apex_DOMShim_SSRClassList:ft,__apex_DOMShim_SSRDOMShim:pt,__apex_DOMShim_SSRElement:gt,__apex_Data:k,__apex_DataLabels:M,__apex_DateTime:$t,__apex_Defaults:it,__apex_Environment_Environment:Yt,__apex_Events:P,__apex_Fill:L,__apex_Filters:I,__apex_Formatters:E,__apex_Globals:st,__apex_Graphics:D,__apex_Markers:F,__apex_Options:at,__apex_PathMorphing_arrayToPath:yt,__apex_PathMorphing_morphPaths:xt,__apex_PathMorphing_parsePath:mt,__apex_PathMorphing_pathBbox:bt,__apex_PerformanceCache:Bt,__apex_Range:R,__apex_Resize_addResizeListener:Nt,__apex_Resize_removeResizeListener:Ht,__apex_Responsive:z,__apex_SVGAnimation_SVGAnimationRunner:wt,__apex_SVGAnimation_installAnimationMethods:vt,__apex_SVGContainer:At,__apex_SVGDraggable_installDraggable:_t,__apex_SVGElement:St,__apex_SVGFilter_FilterBuilder:kt,__apex_SVGFilter_SVGFilter:Ct,__apex_SVGFilter_installFilterMethods:Mt,__apex_SVGGradient_SVGGradient:Pt,__apex_SVGPattern_SVGPattern:Lt,__apex_SVGSelectable_installSelectable:It,__apex_Scales:T,__apex_Series:X,__apex_Theme:O,__apex_ThemePalettes_getThemePalettes:jt,__apex_TimeScale:W,__apex_TitleSubtitle:$,__apex_Utils:Vt,__apex_axes_Axes:Y,__apex_axes_AxesUtils:B,__apex_axes_Grid:N,__apex_axes_XAxis:H,__apex_axes_YAxis:j,__apex_charts_Scatter:p,__apex_dimensions_Dimensions:V,__apex_dimensions_Grid:G,__apex_dimensions_Helpers:q,__apex_dimensions_XAxis:Z,__apex_dimensions_YAxis:U,__apex_helpers_Destroy:K,__apex_helpers_InitCtxVariables:J,__apex_helpers_Localization:Q,__apex_helpers_UpdateHelpers:tt,__apex_index_Box:Dt,__apex_index_SVG:Et,__apex_math_Box:Tt,__apex_math_Matrix:zt,__apex_math_Point:Rt,__apex_math_SVGNS:Ft,__apex_tooltip_AxesTooltip:rt,__apex_tooltip_Intersect:nt,__apex_tooltip_Labels:ot,__apex_tooltip_Marker:lt,__apex_tooltip_Position:ht,__apex_tooltip_Tooltip:ct,__apex_tooltip_Utils:dt,default:s.ZP},Symbol.toStringTag,{value:"Module"}));class qt{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const i=parseFloat(t.getAttributeNS(null,"width")),s=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",s*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+s)}inlineCanvasLayers(t){const e=this.w.dom.elWrap.querySelectorAll(".apexcharts-series-canvas");if(!e.length)return;const i=t.querySelectorAll(".apexcharts-canvas-series");for(let a=0;a<e.length&&a<i.length;a++){let t;try{t=e[a].toDataURL()}catch(s){continue}const r=i[a],n=document.createElementNS(Ft,"image");n.setAttribute("x",r.getAttribute("x")||"0"),n.setAttribute("y",r.getAttribute("y")||"0"),n.setAttribute("width",r.getAttribute("width")||"0"),n.setAttribute("height",r.getAttribute("height")||"0"),n.setAttribute("href",t),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),r.parentNode&&r.parentNode.replaceChild(n,r)}}queryStyleable(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))}setStyleDefaults(t,e){Object.keys(e).forEach((i=>{""===t.style.getPropertyValue(i)&&t.style.setProperty(i,e[i])}))}applyExportStyles(t){const e=this.w;this.queryStyleable(t,"style").forEach((t=>t.remove())),this.queryStyleable(t,[".apexcharts-tooltip",".apexcharts-toolbar",".apexcharts-xaxistooltip",".apexcharts-yaxistooltip",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs",".apexcharts-zoom-rect",".apexcharts-selection-rect"].join(", ")).forEac
1h((t=>{t.style.setProperty("display","none","important")})),this.queryStyleable(t,".apexcharts-flip-y").forEach((t=>{this.setStyleDefaults(t,{transform:"scaleY(-1) translateY(-100%)","transform-origin":"top","transform-box":"fill-box"})})),this.queryStyleable(t,".apexcharts-flip-x").forEach((t=>{this.setStyleDefaults(t,{transform:"scaleX(-1)","transform-origin":"center","transform-box":"fill-box"})})),e.config.legend.show&&e.dom.elLegendWrap&&e.dom.elLegendWrap.children.length&&(this.queryStyleable(t,".apexcharts-legend").forEach((t=>{this.setStyleDefaults(t,{display:"flex",overflow:"auto",padding:"0 10px"});const e=t.classList,i=e.contains("apx-legend-position-left")||e.contains("apx-legend-position-right"),s=e.contains("apx-legend-position-top")||e.contains("apx-legend-position-bottom");e.contains("apexcharts-legend-group-horizontal")&&this.setStyleDefaults(t,{"flex-direction":"column"}),i&&this.setStyleDefaults(t,{"flex-direction":"column",bottom:"0"}),s&&this.setStyleDefaults(t,{"flex-wrap":"wrap"}),i||s&&e.contains("apexcharts-align-left")?this.setStyleDefaults(t,{"justify-content":"flex-start","align-items":"flex-start"}):s&&e.contains("apexcharts-align-center")?this.setStyleDefaults(t,{"justify-content":"center","align-items":"center"}):s&&e.contains("apexcharts-align-right")&&this.setStyleDefaults(t,{"justify-content":"flex-end","align-items":"flex-end"})})),this.queryStyleable(t,".apexcharts-legend-group").forEach((t=>{this.setStyleDefaults(t,{display:"flex"})})),this.queryStyleable(t,".apexcharts-legend-group-vertical").forEach((t=>{this.setStyleDefaults(t,{"flex-direction":"column-reverse"})})),this.queryStyleable(t,".apexcharts-legend-series").forEach((t=>{this.setStyleDefaults(t,{cursor:t.classList.contains("apexcharts-no-click")?"auto":"pointer","line-height":"normal",display:"flex","align-items":"center"})})),this.queryStyleable(t,".apexcharts-legend-text").forEach((t=>{this.setStyleDefaults(t,{position:"relative","font-size":"14px"})})),this.queryStyleable(t,".apexcharts-legend-marker").forEach((t=>{this.setStyleDefaults(t,{position:"relative",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","margin-right":"1px"})})),this.queryStyleable(t,".apexcharts-inactive-legend").forEach((t=>{this.setStyleDefaults(t,{opacity:"0.45"})})),this.queryStyleable(t,".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series").forEach((t=>{t.style.setProperty("display","none","important")})))}resolveExportBackground(){const t=this.w,e=t.config.chart.background;return e&&"transparent"!==e?e:"dark"===t.config.theme.mode?"#343A3F":"#fff"}collectFontFamilies(){const t=new Set,e=this.w;if(!Yt.isBrowser()||!e.dom.elWrap)return t;const i=this.queryStyleable(e.dom.elWrap,"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text");return[e.dom.elWrap,...i].forEach((e=>{const i=ut.getComputedStyle(e),s=i&&i.fontFamily;s&&s.split(",").forEach((e=>{const i=e.trim().replace(/^['"]|['"]$/g,"");i&&t.add(i.toLowerCase())}))})),t}collectFontFaceRules(){if(!Yt.isBrowser())return Promise.resolve([]);const t=[],e=[],i=e=>{(e.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach((e=>{const i=e.match(/font-family\s*:\s*([^;}]+)/i);if(!i)return;const s=i[1].trim().replace(/^['"]|['"]$/g,"");t.push({family:s.toLowerCase(),css:e})}))};return Array.from(document.styleSheets||[]).forEach((t=>{let s=null;try{s=t.cssRules}catch(a){s=null}s?Array.from(s).forEach((t=>{5===t.type&&t.cssText&&i(t.cssText)})):t.href&&e.push(fetch(t.href).then((t=>t.ok?t.text():"")).then(i).catch((()=>{})))})),Promise.all(e).then((()=>t))}embedFonts(t){const e=this.w;if(!Yt.isBrowser()||!e.config.chart.toolbar.export.embedFonts||"function"!==typeof fetch)return Promise.resolve();const i=this.collectFontFamilies();return i.size?this.collectFontFaceRules().then((t=>{const e=t.filter((t=>i.has(t.family)));return e.length?Promise.all(e.map((t=>this.inlineFontFaceUrls(t.css).catch((()=>null))))):Promise.resolve([])})).then((e=>{const i=(e||[]).filter(Boolean).join("\n");if(!i)return;const s=document.createElementNS(Ft,"style");s.textContent=i,t.insertBefore(s,t.firstChild)})).catch((()=>{})):Promise.resolve()}inlineFontFaceUrls(t){const e=[],i=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi;let s;for(;null!==(s=i.exec(t));)s[2].startsWith("data:")||e.push(s[2]);return e.length?Promise.all(e.map((t=>this.fetchAsDataUri(t).then((e=>({url:t,dataUri:e}))).catch((()=>({url:t,dataUri:null})))))).then((e=>{let i=t,s=0;return e.forEach((({url:t,dataUri:e})=>{e&&(i=i.split(t).join(e),s++)})),s?i:null})):Promise.resolve(t.includes("data:")?t:null)}fetchAsDataUri(t){return"function"!==typeof fetch||"function"!==typeof btoa?Promise.reject(new Error("fetch unavailable")):fetch(t).then((e=>{if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);const i=e.headers.get("content-type")||"application/octet-stream";return e.arrayBuffer().then((t=>{const e=new Uint8Array(t);let s="";for(let i=0;i<e.length;i+=32768)s+=String.fromCharCode.apply(null,e.subarray(i,i+32768));return`data:${i};base64,${btoa(s)}`}))}))}getSvgString(t){return new Promise((e=>{const i=this.w;let s=t||i.config.chart.toolbar.export.scale||i.config.chart.toolbar.export.width/i.globals.svgWidth;s||(s=1);const a=i.globals.svgWidth*s,r=i.globals.svgHeight*s,n=i.dom.elWrap.cloneNode(!0);n.style.width=a+"px",n.style.height=r+"px",this.inlineCanvasLayers(n),this.applyExportStyles(n);const o=(new XMLSerializer).serializeToString(n);let l=`\n <svg xmlns="http://www.w3.org/2000/svg"\n version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n class="apexcharts-svg"\n xmlns:data="ApexChartsNS"\n transform="translate(0, 0)"\n width="${i.globals.svgWidth}px" height="${i.globals.svgHeight}px">\n <foreignObject width="100%" height="100%">\n <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${r}px;">\n ${o}\n </div>\n </foreignObject>\n </svg>\n `;const h=this.svgStringToNode(l);1!==s&&this.scaleSvgNode(h,s),Promise.all([this.convertImagesToBase64(h),this.embedFonts(h)]).then((()=>{l=(new XMLSerializer).serializeToString(h),e(l.replace(/ /g," "))}))}))}convertImagesToBase64(t){const e="http://www.w3.org/1999/xlink",i=t.getElementsByTagName("image"),s=Array.from(i).map((t=>{const i=t.getAttributeNS(e,"href"),s=t.getAttribute("href"),a=i||s;if(!a||a.startsWith("data:"))return Promise.resolve();const r=a=>{i&&t.setAttributeNS(e,"href",a),!s&&i||t.setAttribute("href",a)};return this.fetchAsDataUri(a).then(r).catch((()=>this.getBase64FromUrl(a).then(r).catch((t=>{console.error("Error converting image to base64:",t)}))))}));return Promise.all(s)}getBase64FromUrl(t){return Yt.isSSR()?Promise.resolve(t):new Promise(((e,i)=>{const s=new Image;s.crossOrigin="Anonymous",s.onload=()=>{const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const i=t.getContext("2d");i&&i.drawImage(s,0,0),e(t.toDataURL())},s.onerror=i,s.src=t}))}svgUrl(){return new Promise((t=>
1{this.getSvgString().then((e=>{const i=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(i))}))}))}dataURI(t){return Yt.isSSR()?Promise.resolve({imgURI:""}):new Promise((e=>{const i=this.w,s=t?t.scale||t.width/i.globals.svgWidth:1,a=document.createElement("canvas");a.width=i.globals.svgWidth*s,a.height=parseInt(i.dom.elWrap.style.height,10)*s;const r=this.resolveExportBackground(),n=a.getContext("2d");n&&(n.fillStyle=r,n.fillRect(0,0,a.width,a.height),this.getSvgString(s).then((t=>{const i="data:image/svg+xml,"+encodeURIComponent(t),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{n.drawImage(s,0,0);const t=a;if(t.msToBlob){const i=t.msToBlob();e({blob:i})}else{const t=a.toDataURL("image/png");e({imgURI:t})}},s.src=i})))}))}exportToSVG(){this.svgUrl().then((t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")}))}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,i=t?{scale:t}:e?{width:e}:void 0;this.dataURI(i).then((({imgURI:t,blob:e})=>{e?navigator.msSaveOrOpenBlob(e,this.w.globals.chartID+".png"):this.triggerDownload(t,this.w.config.chart.toolbar.export.png.filename,".png")}))}exportToCSV({series:t,fileName:e,columnDelimiter:i=",",lineDelimiter:s="\n"}){const a=this.w;t||(t=a.config.series);let r=[];const n=[];let o="";const l=a.seriesData.series.map(((t,e)=>-1===a.globals.collapsedSeriesIndices.indexOf(e)?t:[])),h=t=>{if(null==t||Vt.isNumber(t))return t;const e=String(t);return/^[=+\-@\t\r]/.test(e)?`'${e}`:e},c=t=>"function"===typeof a.config.chart.toolbar.export.csv.categoryFormatter?a.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===a.config.xaxis.type&&String(t).length>
vendor: 5,766 bytes, line 1
1=10?new Date(t).toDateString():Vt.isNumber(t)?t:h(t.split(i).join("")),d=t=>"function"===typeof a.config.chart.toolbar.export.csv.valueFormatter?a.config.chart.toolbar.export.csv.valueFormatter(t):h(t),u=Math.max(...t.map((t=>t.data?t.data.length:0))),p=new k(this.w),g=new B(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),f=t=>{let e="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const i=a.formatters.yLabelFormatters[0],s=new X(this.ctx.w).getActiveConfigSeriesIndex();e=i(a.labelData.labels[t],{seriesIndex:s,dataPointIndex:t,w:a})}else e=g.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,t).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?e=a.config.xaxis.categories[t]:a.config.labels.length&&(e=a.config.labels[t]))}else e=a.config.labels[t];return null===e?"nullvalue":(Array.isArray(e)&&(e=e.join(" ")),Vt.isNumber(e)?e:e.split(i).join(""))},m=(e,s)=>{var o,h,g,m,x,b;if(r.length&&0===s&&n.push(r.join(i)),e.data){const y=e.data.length?e.data:[...Array(u)].map((()=>""));for(let u=0;u<y.length;u++){r=[];let y=f(u);if("nullvalue"!==y){if(y||(p.isFormatXY()?y=t[s].data[u].x:p.isFormat2DArray()&&(y=t[s].data[u]?t[s].data[u][0]:"")),0===s){r.push(c(y));for(let e=0;e<a.seriesData.series.length;e++){const i=p.isFormatXY()?null==(o=t[e].data[u])?void 0:o.y:l[e][u];r.push(d(i))}}("candlestick"===a.config.chart.type||e.type&&"candlestick"===e.type)&&(r.pop(),r.push(a.candleData.seriesCandleO[s][u]),r.push(a.candleData.seriesCandleH[s][u]),r.push(a.candleData.seriesCandleL[s][u]),r.push(a.candleData.seriesCandleC[s][u])),("boxPlot"===a.config.chart.type||e.type&&"boxPlot"===e.type)&&(r.pop(),r.push(a.candleData.seriesCandleO[s][u]),r.push(a.candleData.seriesCandleH[s][u]),r.push(a.candleData.seriesCandleM[s][u]),r.push(a.candleData.seriesCandleL[s][u]),r.push(a.candleData.seriesCandleC[s][u])),"rangeBar"===a.config.chart.type&&(r.pop(),r.push(a.rangeData.seriesRangeStart[s][u]),r.push(a.rangeData.seriesRangeEnd[s][u])),("violin"===a.config.chart.type||e.type&&"violin"===e.type)&&(r.pop(),r.push(null==(h=a.violinData.seriesViolinMin[s])?void 0:h[u]),r.push(null==(g=a.violinData.seriesViolinMax[s])?void 0:g[u]),r.push(null!=(b=null==(x=null==(m=a.violinData.seriesViolinPoints[s])?void 0:m[u])?void 0:x.length)?b:0)),r.length&&n.push(r.join(i))}}}};r.push(a.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===a.config.chart.type?(r.push("minimum"),r.push("q1"),r.push("median"),r.push("q3"),r.push("maximum")):"candlestick"===a.config.chart.type?(r.push("open"),r.push("high"),r.push("low"),r.push("close")):"rangeBar"===a.config.chart.type?(r.push("minimum"),r.push("maximum")):"violin"===a.config.chart.type?(r.push("minimum"),r.push("maximum"),r.push("observations")):t.map(((t,e)=>{const s=(t.name?t.name:`series-${e}`)+"";a.globals.axisCharts&&r.push(s.split(i).join("")?s.split(i).join(""):`series-${e}`)})),a.globals.axisCharts||(r.push(a.config.chart.toolbar.export.csv.headerValue),n.push(r.join(i))),a.globals.allSeriesHasEqualX||!a.globals.axisCharts||a.config.xaxis.categories.length||a.config.labels.length?t.map(((t,e)=>{a.globals.axisCharts?m(t,e):(r=[],r.push(c(a.labelData.labels[e])),r.push(d(l[e])),n.push(r.join(i)))})):(()=>{const e=new Set,s={};t.forEach(((i,a)=>{null==i||i.data.forEach((i=>{let r,n;if(p.isFormatXY())r=i.x,n=i.y;else{if(!p.isFormat2DArray())return;r=i[0],n=i[1]}s[r]||(s[r]=Array(t.length).fill("")),s[r][a]=d(n),e.add(r)}))})),r.length&&n.push(r.join(i)),Array.from(e).sort().forEach((t=>{const e=s[t];n.push([c(t),...e].join(i))}))})(),o+=n.join(s),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+o),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,i){if(Yt.isSSR())return;const s=document.createElement("a");s.href=t,s.download=(e||this.w.globals.chartID)+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}s.ZP.registerFeatures({exports:qt});const Zt=["#cf4d3f","#8f9499","#26a75b"],Ut=(t,e,i)=>t+(e-t)*i;function Kt(t){return Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")}function Jt(t,e,i){const s=Vt.parseHex(Qt(t)),a=Vt.parseHex(Qt(e));return s&&a?"#"+Kt(Ut(s[0],a[0],i))+Kt(Ut(s[1],a[1],i))+Kt(Ut(s[2],a[2],i)):t}function Qt(t){if("string"!==typeof t)return"#000000";if(Vt.isColorHex(t))return t;return Vt.rgb2hex(t)||"#000000"}function te(t,e,i){const s=t.config.series[e];return ee(t,s&&Array.isArray(s.data)?s.data[i]:null,e,i)}function ee(t,e,i,s){var a,r,n;if(!e||"object"!==typeof e)return null;const o=null==(n=null==(r=null==(a=t.config.plotOptions)?void 0:a.treemap)?void 0:r.colorScale)?void 0:n.colorValue;let l;if(l="function"===typeof o?o(e,{seriesIndex:i,dataPointIndex:s,w:t}):"string"===typeof o?e[o]:e.colorValue,null==l)return null;const h=Number(l);return Number.isFinite(h)?h:null}function ie(t){var e,i,s;const a=null==(s=null==(i=null==(e=t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:s.colorScale,r=a&&a.gradient;if(!r)return null;if(!1===r.enabled)return null;const n=t.config.series||[];let o=1/0,l=-1/0,h=!1;for(let m=0;m<n.length;m++){const e=n[m]&&n[m].data;if(Array.isArray(e))for(let i=0;i<e.length;i++){const s=ee(t,e[i],m,i);null!=s&&(h=!0,s<o&&(o=s),s>l&&(l=s))}}if(!h&&!0!==r.enabled)return null;Number.isFinite(o)||(o=0,l=0);let c=Number.isFinite(Number(r.min))?Number(r.min):o,d=Number.isFinite(Number(r.max))?Number(r.max):l,u=null;if(null===r.midpoint?u=null:Number.isFinite(Number(r.midpoint))?u=Number(r.midpoint):c<0&&d>0&&(u=0),null!=u&&!1!==r.symmetric&&!Number.isFinite(Number(r.min))&&!Number.isFinite(Number(r.max))){const t=Math.max(Math.abs(c-u),Math.abs(d-u));c=u-t,d=u+t}d===c&&(c-=.5,d+=.5);
vendor: 17,025 bytes, line 1
1const p=function(t,e,i,s){if(Array.isArray(t.stops)&&t.stops.length>=2)return t.stops.filter((t=>t&&Number.isFinite(Number(t.value)))).map((t=>({value:Number(t.value),color:Qt(t.color)}))).sort(((t,e)=>t.value-e.value));const a=(Array.isArray(t.colors)&&t.colors.length>=2?t.colors:Zt).map(Qt),r=a.length;if(null!=s&&r>=3){const t=Math.floor((r-1)/2),n=[];for(let i=0;i<=t;i++)n.push({value:Ut(e,s,i/t),color:a[i]});for(let e=t+1;e<r;e++)n.push({value:Ut(s,i,(e-t)/(r-1-t)),color:a[e]});return n}return a.map(((t,s)=>({value:Ut(e,i,s/(r-1)),color:t})))}(r,c,d,u);if(p.length<2)return null;const g=d-c,f=p.map((t=>({percent:0===g?0:(t.value-c)/g,color:t.color})));return{min:c,max:d,midpoint:u,stops:p,at:t=>{if(!Number.isFinite(t))return p[Math.floor(p.length/2)].color;if(t<=p[0].value)return p[0].color;const e=p[p.length-1];if(t>=e.value)return e.color;for(let i=1;i<p.length;i++){const e=p[i];if(t<=e.value){const s=p[i-1],a=e.value-s.value,r=0===a?0:(t-s.value)/a;return Jt(s.color,e.color,r)}}return e.color},legendStops:f}}function se(t){const e=Qt(t);return Vt.getContrastRatio(e,"#ffffff")>=Vt.getContrastRatio(e,"#000000")?"#ffffff":"#000000"}const ae="http://www.w3.org/2000/svg";class re{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._targetEl=null,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this._cfg();return"function"===typeof t.formatter?t.formatter:t=>{if(!Number.isFinite(t))return String(t);const e=Math.abs(t);return e>=1e3?t.toFixed(0):e>=10?t.toFixed(1):t.toFixed(2)}}static colorScaleOf(t){var e,i,s,a,r;const n=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return n&&(null==(r=null==(a=null==(s=null==t?void 0:t.config)?void 0:s.plotOptions)?void 0:a[n])?void 0:r.colorScale)||null}static configFor(t){const e=re.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return re.configFor(this.w)||{}}static isEnabled(t){if(!re.supports(t))return!1;const e=re.configFor(t);return!(!e||!e.enabled)}static supports(t){var e,i;const s=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return"heatmap"===s||"treemap"===s}draw(t=null){var e,i,s,a,r,n,o,l;const h=this.w;this._targetEl=t;const c=t||h.dom.elLegendWrap;if(!c)return;const d=this._cfg(),u=h.config.legend.position,p="left"===u||"right"===u,g=null!=(i=null==(e=d.arrow)?void 0:e.size)?i:8,f=g+4,m=d.showLabels?28:4,x=d.showLabels?20:4,b=d.showLabels?44:0,y=this._resolveStripLength(p?d.height:d.width,p),w=d.thickness,v=p?Math.max(w+f+4,b):y+2*m,A=p?y+2*x:w+f+4,_=(v-(w+f))/2,S=p?"left"===u?_:_+f:m,C=p?x:"top"===u?f:4,k=ut.createElementNS(ae,"svg");k.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),k.setAttribute("width",String(v)),k.setAttribute("height",String(A)),k.setAttribute("overflow","visible");const M=ut.createElementNS(ae,"defs"),P=`apexcharts-heatmap-gradient-${h.globals.cuid}`,L=ut.createElementNS(ae,"linearGradient");L.setAttribute("id",P),p?(L.setAttribute("x1","0"),L.setAttribute("y1","1"),L.setAttribute("x2","0"),L.setAttribute("y2","0")):(L.setAttribute("x1","0"),L.setAttribute("y1","0"),L.setAttribute("x2","1"),L.setAttribute("y2","0"));const{min:I,max:E,stops:D,bands:F}=this._computeStops();this._min=I,this._max=E,D.forEach((t=>{const e=ut.createElementNS(ae,"stop");e.setAttribute("offset",`${(100*t.percent).toFixed(2)}%`),e.setAttribute("stop-color",t.color),L.appendChild(e)})),M.appendChild(L),k.appendChild(M);const R=ut.createElementNS(ae,"rect");if(R.setAttribute("x",String(S)),R.setAttribute("y",String(C)),R.setAttribute("width",String(p?w:y)),R.setAttribute("height",String(p?y:w)),R.setAttribute("rx","2"),R.setAttribute("fill",`url(#${P})`),k.appendChild(R),d.showLabels){const t=(null==(s=d.labelStyle)?void 0:s.colors)||(Array.isArray(h.config.legend.labels.colors)?h.config.legend.labels.colors[0]:h.config.legend.labels.colors)||h.config.chart.foreColor,e=(null==(a=d.labelStyle)?void 0:a.fontSize)||"11px",i=(null==(r=d.labelStyle)?void 0:r.fontFamily)||h.config.chart.fontFamily,n=this._getFormatter(),o=(s,a,r,n)=>{const o=ut.createElementNS(ae,"text");return o.setAttribute("x",String(a)),o.setAttribute("y",String(r)),o.setAttribute("text-anchor",n),o.setAttribute("dominant-baseline","middle"),o.setAttribute("fill",t),o.setAttribute("font-size",e),i&&o.setAttribute("font-family",i),o.textContent=String(s),o};if(p){const t=S+w/2;k.appendChild(o(n(I),t,C+y+10,"middle")),k.appendChild(o(n(E),t,C-10,"middle"))}else{const t=C+w/2;k.appendChild(o(n(I),S-6,t,"end")),k.appendChild(o(n(E),S+y+6,t,"start"))}}const z=(null==(n=d.arrow)?void 0:n.color)||h.config.chart.foreColor,T=this._buildArrow(g,z,u);if(k.appendChild(T),this.arrowEl=T,this._bandHitEls=[],h.config.legend.onItemHover.highlightDataSeries&&F.length>0&&F.forEach((t=>{const e=ut.createElementNS(ae,"rect");if(p){const i=C+y-t.p2*y,s=C+y-t.p1*y;e.setAttribute("x",String(S)),e.setAttribute("y",String(i)),e.setAttribute("width",String(w)),e.setAttribute("height",String(Math.max(0,s-i)))}else e.setAttribute("x",String(S+t.p1*y)),e.setAttribute("y",String(C)),e.setAttribute("width",String(Math.max(0,(t.p2-t.p1)*y))),e.setAttribute("height",String(w));e.setAttribute("fill","transparent"),e.setAttribute("class","apexcharts-heatmap-gradient-band"),e.setAttribute("data:range-index",String(t.index)),e.style.cursor="pointer",k.appendChild(e),this._bandHitEls.push(e)})),this._geom={isVertical:p,position:u,stripX:S,stripY:C,stripLength:y,stripThickness:w,arrowSize:g,svgWidth:v,svgHeight:A},d.showHoverValue){const t=ut.createElement("div");t.classList.add("apexcharts-heatmap-gradient-legend-value"),t.style.position="absolute",t.style.fontSize=(null==(o=d.labelStyle)?void 0:o.fontSize)||"11px",t.style.fontFamily=(null==(l=d.labelStyle)?void 0:l.fontFamily)||h.config.chart.fontFamily||"",t.style.color=h.config.chart.foreColor,t.style.background="rgba(0,0,0,0.65)",t.style.color="#fff",t.style.padding="2px 6px",t.style.borderRadius="3px",t.style.pointerEvents="none",t.style.whiteSpace="nowrap",t.style.opacity="0",t.style.transition="opacity 120ms ease",this.hoverValueEl=t}c.classList.add("apexcharts-heatmap-gradient-legend-wrap"),c.classList.add("apx-legend-position-"+u),c.appendChild(k),this.hoverValueEl&&c.appendChild(this.hoverValueEl),this.svgEl=k,t?(c.style.width=v+"px",c.style.height=A+"px",c.style.position="relative",c.style.overflow="visible"):this._applyWrapAlignment(c,u,p,v,A),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const i=this.w,s=e?i.globals.svgHeight||i.config.chart.height||300:i.globals.svgWidth||i.config.chart.width||600;if("string"===typeof t){const e=t.trim();if(e.endsWith("%")){const t=parseFloat(e)||0;return Math.max(20,s*t/100)}const i=parseFloat(e);return Number.isFinite(i)?i:200}return"number"===typeof t&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,i,s,a){const r=this.w,n=this._cfg().align||"center",o=12,l=r.globals.svgWidth||r.config.chart.width||600,h=r.globals.svgHeight||r.config.chart.height||300,c=r.config.legend.offsetX||0,d=r.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=s+"px",t.style.height=a+"px",t.style.right="auto",t.style.bottom="auto",i){const i=h-a-24;let r;r="start"===n?o:"end"===n?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.top=r+d+"px",t.style.left="left"===e?o+c+"px":l-s-o+c+"px"}else{const i=l-s-24;let r;r="start"===n?o:"end"===n?o+Math.max(0,i):o+Math.max(0,i)/2,t.style.left=r+c+"px",t.style.top="top"===e?o+d+"px":h-a-o+d+"px"}}repositionToPlot(){var t,e;if(!Yt.isBrowser())return;if(this._targetEl)return;const i=this.w,s=i.globals,a=i.dom.elLegendWrap;if(!a||!this._geom)return;if(!Number.isFinite(s.gridWidth)||!Number.isFinite(s.gridHeight))return;const{isVertical:r,position:n,svgWidth:o,svgHeight:l,stripX:h,stripY:c,stripThickness:d}=this._geom,u=this._cfg().align||"center",p=i.config.legend.offsetX||0,g=i.config.legend.offsetY||0,f=null==(e=null==(t=this.ctx)?void 0:t.dimensions)?void 0:e.dimHelpers,m=f?f.getTitleSubtitleCoords("title").height+f.getTitleSubtitleCoords("subtitle").height:0,x=i.layout.xAxisHeight||0,b=(t,e)=>{const i=Math.max(0,t-e);return"start"===u?0:"end"===u?i:i/2};if(r){a.style.top=s.translateY+b(s.gridHeight,l)+g+"px";const t=(("left"===n?0:s.translateX+s.gridWidth)+("left"===n?s.translateX:s.svgWidth))/2;a.style.left=t-h-d/2+p+"px"}else{a.style.left=s.translateX+b(s.gridWidth,o)+p+"px";const t=(("top"===n?m:s.translateY+s.gridHeight+x)+("top"===n?s.translateY:s.svgHeight))/2;a.style.top=t-c-d/2+g+"px"}ut.requestAnimationFrame((()=>this._enforceMinPlotGap()))}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,i=this.svgEl&&this.svgEl.querySelector("rect"),s=t.dom.baseEl.querySelector(".apexcharts-grid");if(!e||!i||!s||!this._geom)return;const a=i.getBoundingClientRect(),r=s.getBoundingClientRect();if(!a.width||!a.height||!r.width||!r.height)return;const{isVertical:n,position:o}=this._geom;if(n){const t="left"===o?r.left-a.right:a.left-r.right;if(t<16){const i=parseFloat(e.style.left)||0,s=16-t;e.style.left=i+("left"===o?-s:s)+"px"}}else{const t="top"===o?r.top-a.bottom:a.top-r.bottom;if(t<16){const i=parseFloat(e.style.top)||0,s=16-t;e.style.top=i+("top"===o?-s:s)+"px"}}}destroy(){var t,e,i,s,a,r,n;for(let l=0;l<this._bandHitEls.length;l++){const i=this._bandHitEls[l];null==(t=i.removeEventListener)||t.call(i,"mousemove",this._onBandEnter),null==(e=i.removeEventListener)||e.call(i,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,null==(i=this.ctx)?void 0:i.events)try{null==(a=(s=this.ctx.events).removeEventListener)||a.call(s,"dataPointMouseEnter",this._onCellEnter),null==(n=(r=this.ctx.events).removeEventListener)||n.call(r,"dataPointMouseLeave",this._onCellLeave)}catch(o){}}_attachBandHoverListeners(){if(Yt.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,i,s,a;const r=this.w,n=t.currentTarget,o=parseInt(null!=(e=n.getAttribute("data:range-index"))?e:"-1",10);o<0||o===this._activeBandIndex||(this._activeBandIndex=o,null==(a=null==(s=null==(i=this.ctx)?void 0:i.events)?void 0:s.fireEvent)||a.call(s,"legendHover",[this.ctx,o,r]),new X(r).highlightRangeInSeries(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,new X(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;Yt.isBrowser()&&(null==(e=null==(t=this.ctx)?void 0:t.events)?void 0:e.addEventListener)&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,i,s;const a=this.w;if(!this.arrowEl)return;const r=t[t.length-1];if(!r||"object"!==typeof r)return;const n=r.seriesIndex,o=r.dataPointIndex;if("number"!==typeof n||"number"!==typeof o)return;if(!re.supports(a))return;let l;l=this._continuous?te(a,n,o):null==(s=null==(i=null==(e=a.seriesData)?void 0:e.series)?void 0:i[n])?void 0:s[o],null==l||Number.isNaN(l)||this._positionArrow(l)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:i,stripX:s,stripY:a,stripLength:r,stripThickness:n,arrowSize:o}=this._geom,l=this._min,h=this._max-l;let c;if(c=0===h?.5:(t-l)/h,c<0&&(c=0),c>1&&(c=1),e){const t=a+r-c*r;let e,l;"left"===i?(e=s+n,l=e+o):(e=s,l=e-o);const h=[`${e},${t}`,`${l},${t-o/2}`,`${l},${t+o/2}`].join(" ");this.arrowEl.setAttribute("points",h)}else{const t=s+c*r;let e,l;"top"===i?(e=a+n,l=e+o):(e=a,l=e-o);const h=[`${t},${e}`,`${t-o/2},${l}`,`${t+o/2},${l}`].join(" ");this.arrowEl.setAttribute("points",h)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const l=this._getFormatter();if(this.hoverValueEl.textContent=l(t),e){const t=a+r-c*r;"left"===i?this.hoverValueEl.style.left=`${s+n+o+8}px`:(this.hoverValueEl.style.left=s-o-8+"px",this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=t-9+"px"}else{const t=s+c*r;this.hoverValueEl.style.left=`${t}px`,this.hoverValueEl.style.transform="translateX(-50%)",this.hoverValueEl.style.top="top"===i?`${a+n+o+8}px`:a-o-18+"px"}this.hoverValueEl.style.opacity="1"}}_buildArrow(t,e,i){const s=ut.createElementNS(ae,"polygon");return s.setAttribute("fill",e),s.setAttribute("opacity","0"),s.setAttribute("class","apexcharts-heatmap-gradient-arrow"),s.setAttribute("points","0,0 0,0 0,0"),s.setAttribute("pointer-events","none"),s}_computeStops(){var t,e;const i=this.w,s=re.colorScaleOf(i)||{},a=this._cfg(),r=ie(i);if(r)return this._continuous=!0,{min:r.min,max:r.max,stops:r.legendStops,bands:[]};this._continuous=!1;let n=1/0,o=-1/0;const l=(null==(t=i.seriesData)?void 0:t.series)||[];for(let d=0;d<l.length;d++){const t=l[d];if(t)for(let e=0;e<t.length;e++){const i=t[e];null==i||Number.isNaN(i)||(i<n&&(n=i),i>o&&(o=i))}}Number.isFinite(n)||(n=0),Number.isFinite(o)||(o=0);let h=n,c=o;"undefined"!==typeof s.min&&"undefined"!==typeof s.max&&s.max>s.min?(h=s.min,c=s.max):("undefined"!==typeof s.min&&(h=s.min<n?s.min:n),"undefined"!==typeof s.max&&(c=s.max>o?s.max:o));const p=[],g=[];if(s.ranges&&s.ranges.length>0){const t=s.ranges.map(((t,e)=>u(d({},t),{_originalIndex:e}))).sort(((t,e)=>t.from-e.from)),e=t[0].from,i=t[t.length-1].to;h=e,c=i;const a=i-e||1;t.forEach((t=>{const i=(t.from-e)/a,s=(t.to-e)/a;p.push({percent:(i+s)/2,color:t.color}),g.push({index:t._originalIndex,p1:i,p2:s})}))}else{const t=i.globals.colors[0]||"#008FFB",s=new Vt,r=i.config.plotOptions[i.config.chart.type]||{},n=null!=(e=r.shadeIntensity)?e:.5,o=i.globals.hasNegs,l=Math.max(2,a.stops||16);for(let e=0;e<l;e++){const a=e/(l-1),d=h+a*(c-h),u=Math.abs(c)+Math.abs(h),g=0===u?0:100*d/u;let f;f=o?r.reverseNegativeShade?g<0?g/100*(1.25*n):1.25*n*(1-g/100):g<=0?1-(1+g/100)*n:(1-g/100)*n:1-g/100,f>1&&(f=1),f<-1&&(f=-1);const m=r.enableShades?s.shadeColor("dark"===i.config.theme.mode?-1*f:f,t):t;p.push({percent:a,color:m})}}return{min:h,max:c,stops:p,bands:g}}}s.ZP.registerFeatures({legend:class{constructor(t,e){this.w=t,this.ctx=e,this.updateSeries=(...t)=>e.updateHelpers._updateSeries(...t),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 class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(Yt.isSSR())return null;const t=document.createElement("style");t.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);const i=document.createTextNode(".apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n}\n.apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n}\n.apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n}\n.apexcharts-legend.apexcharts-legend-group-horizontal {\n flex-direction: column;\n}\n.apexcharts-legend-group {\n display: flex;\n}\n.apexcharts-legend-group-vertical {\n flex-direction: column-reverse;\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 align-items: 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 align-items: 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 align-items: flex-end;\n}\n.apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n}\n.apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n}\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n}\n.apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;
1\n cursor: pointer;\n margin-right: 1px;\n}\n\n.apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n}\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n}\n.apexcharts-inactive-legend {\n opacity: 0.45;\n} ");return t.appendChild(i),t}getLegendDimensions(){const t=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!t)return{clwh:0,clww:0};const{width:e,height:i}=t.getBoundingClientRect();return{clwh:i,clww:e}}appendToForeignObject(){var t;const e=this.getLegendStyles();!1!==this.w.config.chart.injectStyleSheet&&e&&(null==(t=this.w.dom.elLegendForeign)||t.appendChild(e))}toggleDataSeries(t,e){var i,s,a;const r=this.w;if(r.globals.axisCharts||"radialBar"===r.config.chart.type){r.globals.resized=!0;let n=null,o=null;if(r.globals.risingSeries=[],r.globals.axisCharts){if(n=null!=(i=Array.prototype.find.call(r.dom.baseEl.querySelectorAll(".apexcharts-series"),(e=>e.getAttribute("data:realIndex")===String(t))))?i:null,!n)return;o=parseInt(null!=(s=n.getAttribute("data:realIndex"))?s:"",10)}else{if(n=r.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!n)return;o=parseInt(null!=(a=n.getAttribute("rel"))?a:"",10)-1}if(e?[{cs:r.globals.collapsedSeries,csi:r.globals.collapsedSeriesIndices},{cs:r.globals.ancillaryCollapsedSeries,csi:r.globals.ancillaryCollapsedSeriesIndices}].forEach((t=>{const e=t.cs,i=t.csi;this.riseCollapsedSeries(e,i,o)})):this.hideSeries({seriesEl:n,realIndex:o}),r.config.chart.accessibility.enabled){const e=r.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(e){const i=r.globals.collapsedSeriesIndices.includes(o)||r.globals.ancillaryCollapsedSeriesIndices.includes(o);e.setAttribute("aria-pressed",i?"true":"false");const s=e.querySelector(".apexcharts-legend-text"),a=s?s.textContent:r.seriesData.seriesNames[t],n=i?"hidden":"visible";e.setAttribute("aria-label",`${a}, ${n}. Press Enter or Space to toggle.`)}}}else{if(r.globals.resized=!0,r.globals.risingSeries=[],e)this.riseCollapsedSeries(r.globals.collapsedSeries,r.globals.collapsedSeriesIndices,t);else{const e=this.getSeriesAfterCollapsing({realIndex:t});this.lgCtx.updateSeries(e,r.config.chart.animations.dynamicAnimation.enabled)}if(r.config.chart.accessibility.enabled){const e=r.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(e){const i=r.globals.collapsedSeriesIndices.includes(t);e.setAttribute("aria-pressed",i?"true":"false");const s=e.querySelector(".apexcharts-legend-text"),a=s?s.textContent:r.seriesData.seriesNames[t],n=i?"hidden":"visible";e.setAttribute("aria-label",`${a}, ${n}. Press Enter or Space to toggle.`)}}}}_nonAxisSliceContainer(t){const e=this.w.config.chart.type;return("pie"===e||"donut"===e||"polarArea"===e||"sunburst"===e)&&1===t.length&&t[0]&&"object"===typeof t[0]&&Array.isArray(t[0].data)?t[0].data:t}_readSliceValue(t){return"unit"===this.w.config.chart.type&&t&&Array.isArray(t.data)?t.data:t&&"object"===typeof t?t.y:t}_writeSliceValue(t,e,i){const s=t[e];"unit"===this.w.config.chart.type&&s&&Array.isArray(s.data)?s.data=Array.isArray(i)?i:[]:s&&"object"===typeof s?s.y=i:t[e]=i}getSeriesAfterCollapsing({realIndex:t}){var e,i;const s=this.w,a=s.globals,r=Vt.clone(s.config.series);if(a.axisCharts){const e=s.config.yaxis[a.seriesYAxisReverseMap[t]],i={index:t,data:r[t].data.slice(),type:r[t].type||s.config.chart.type,name:(a.seriesNames||[])[t]};if(e&&e.show&&e.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(a.ancillaryCollapsedSeries.push(i),a.ancillaryCollapsedSeriesIndices.push(t));else if(a.collapsedSeriesIndices.indexOf(t)<0){a.collapsedSeries.push(i),a.collapsedSeriesIndices.push(t);const e=a.risingSeries.indexOf(t);a.risingSeries.splice(e,1)}}else if(a.collapsedSeriesIndices.indexOf(t)<0){const n=this._nonAxisSliceContainer(r);a.collapsedSeries.push({index:t,data:this._readSliceValue(n[t]),type:null!=(i=null==(e=s.config.series[t])?void 0:e.type)?i:"line",name:(a.seriesNames||[])[t]}),a.collapsedSeriesIndices.push(t)}const n=a.axisCharts?s.config.series.length:this._nonAxisSliceContainer(r).length;return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===n,this._getSeriesBasedOnCollapsedState(r)}hideSeries({seriesEl:t,realIndex:e}){const i=this.w,s=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let l=0;l<a.length;l++)a[l].classList.contains("apexcharts-series-markers-wrap")&&(a[l].classList.contains("apexcharts-hide")?a[l].classList.remove("apexcharts-hide"):a[l].classList.add("apexcharts-hide"));const r=i.config.chart.animations.dynamicAnimation.enabled;r&&(i.globals.collapsingSeriesIndices=[e]);const n=()=>{i.globals.collapsingSeriesIndices=[]},o=this.lgCtx.updateSeries(s,r);
vendor: 11,256 bytes, line 1
1n(),o&&"function"===typeof o.then&&o.then(n,n)}riseCollapsedSeries(t,e,i){const s=this.w;let a=Vt.clone(s.config.series);if(t.length>0){for(let r=0;r<t.length;r++)if(t[r].index===i){if(s.globals.axisCharts)a[i].data=t[r].data.slice(),a[i].hidden=!1;else{const e=this._nonAxisSliceContainer(a);this._writeSliceValue(e,i,t[r].data)}t.splice(r,1),e.splice(r,1),s.globals.risingSeries.push(i),r--}a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,s.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){const e=this.w;let i=0;if(e.globals.axisCharts)t.forEach(((s,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0||(t[a].data=[],i++)}));else{const s=this._nonAxisSliceContainer(t);s.forEach(((t,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0||(this._writeSliceValue(s,a,0),i++)}))}const s=e.globals.axisCharts?t.length:this._nonAxisSliceContainer(t).length;return e.globals.allSeriesCollapsed=i===s,t}}(this)}init(){const t=this.w,e=t.globals,i=t.config;this.isBarsDistributed="bar"===i.chart.type&&i.plotOptions.bar.distributed&&1===i.series.length;const s=i.legend.showForSingleSeries&&1===this.w.seriesData.series.length||this.isBarsDistributed||"heatmap"===i.chart.type||re.isEnabled(t)||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(s||!e.axisCharts)&&i.legend.show){const e=t.dom.elLegendWrap;for(;e.firstChild;)e.removeChild(e.firstChild);this.heatmapGradientLegend&&(this.heatmapGradientLegend.destroy(),this.heatmapGradientLegend=null),re.isEnabled(t)?(this.heatmapGradientLegend=new re(t,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical())}}createLegendMarker({i:t,fillcolor:e}){const s=this.w,a=ut.createElement("span");a.classList.add("apexcharts-legend-marker");const r=s.config.legend.markers.shape||s.config.markers.shape;let n=r;Array.isArray(r)&&(n=r[t]);const o=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),l=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),h=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),c=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),p=a.style;if(p.height=2*(o+c)+"px",p.width=2*(o+c)+"px",p.left=l+"px",p.top=h+"px",s.config.legend.markers.customHTML)p.background="transparent",p.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(a.innerHTML=s.config.legend.markers.customHTML[t]()):a.innerHTML=s.config.legend.markers.customHTML();else{const r=new F(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${n}`,seriesIndex:t,strokeWidth:c,size:o}),l=(Yt.isBrowser()?window.SVG:i.g.SVG)().addTo(a).size("100%","100%"),h=new D(this.w).drawMarker(0,0,u(d({},r),{pointFillColor:Array.isArray(e)?e[t]:r.pointFillColor,shape:n}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((t=>{t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),l.add(h)}return a}drawLegends(){var t;const e=this,i=this.w,s=i.dom.elLegendWrap,a=i.config.legend.fontFamily;let r=i.seriesData.seriesNames,n=i.config.legend.markers.fillColors?i.config.legend.markers.fillColors.slice():i.globals.colors.slice();if("heatmap"===i.config.chart.type){const t=i.config.plotOptions.heatmap.colorScale.ranges;r=t.map((t=>t.name?t.name:t.from+" - "+t.to)),n=t.map((t=>t.color))}else this.isBarsDistributed&&(r=i.labelData.labels.slice());i.config.legend.customLegendItems.length&&(r=i.config.legend.customLegendItems);const o=i.formatters.legendFormatter,l=i.config.legend.inverseOrder,h=[];i.labelData.seriesGroups.length>1&&i.config.legend.clusterGroupedSeries&&i.labelData.seriesGroups.forEach(((t,e)=>{h[e]=ut.createElement("div"),h[e].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${e}`),"horizontal"===i.config.legend.clusterGroupedSeriesOrientation?s.classList.add("apexcharts-legend-group-horizontal"):h[e].classList.add("apexcharts-legend-group-vertical")}));for(let c=l?r.length-1:0;l?c>=0:c<=r.length-1;l?c--:c++){const e=o(r[c],{seriesIndex:c,w:i});let l=!1,d=!1;if(i.globals.collapsedSeries.length>0)for(let t=0;t<i.globals.collapsedSeries.length;t++)i.globals.collapsedSeries[t].index===c&&(l=!0);if(i.globals.ancillaryCollapsedSeriesIndices.length>0)for(let t=0;t<i.globals.ancillaryCollapsedSeriesIndices.length;t++)i.globals.ancillaryCollapsedSeriesIndices[t]===c&&(d=!0);const u=this.createLegendMarker({i:c,fillcolor:n});D.setAttrs(u,{rel:c+1,"data:collapsed":l||d}),(l||d)&&u.classList.add("apexcharts-inactive-legend");const p=ut.createElement("div");if(i.config.chart.accessibility.enabled&&i.config.chart.accessibility.keyboard.enabled){p.setAttribute("role","button"),p.setAttribute("tabindex","0");const t=Array.isArray(e)?e.join(" "):e,i=l||d,s=i?"hidden":"visible";p.setAttribute("aria-label",`${t}, ${s}. Press Enter or Space to toggle.`),p.setAttribute("aria-pressed",i?"true":"false")}const g=ut.createElement("span");g.classList.add("apexcharts-legend-text"),g.innerHTML=Array.isArray(e)?e.join(" "):e;let f=i.config.legend.labels.useSeriesColors?i.globals.colors[c]:Array.isArray(i.config.legend.labels.colors)?null==(t=i.config.legend.labels.colors)?void 0:t[c]:i.config.legend.labels.colors;f||(f=i.config.chart.foreColor),g.style.color=f,g.style.fontSize=i.config.legend.fontSize,g.style.fontWeight=i.config.legend.fontWeight,g.style.fontFamily=a||i.config.chart.fontFamily,D.setAttrs(g,{rel:c+1,i:c,"data:default-text":encodeURIComponent(e),"data:collapsed":l||d}),p.appendChild(u),p.appendChild(g);const m=new S(this.w);if(!i.config.legend.showForZeroSeries){0===m.getSeriesTotalByIndex(c)&&m.seriesHaveSameValues(c)&&!m.isSeriesNull(c)&&-1===i.globals.collapsedSeriesIndices.indexOf(c)&&-1===i.globals.ancillaryCollapsedSeriesIndices.indexOf(c)&&p.classList.add("apexcharts-hidden-zero-series")}i.config.legend.showForNullSeries||m.isSeriesNull(c)&&-1===i.globals.collapsedSeriesIndices.indexOf(c)&&-1===i.globals.ancillaryCollapsedSeriesIndices.indexOf(c)&&p.classList.add("apexcharts-hidden-null-series"),h.length?i.labelData.seriesGroups.forEach(((t,e)=>{var a,r;t.includes(null!=(r=null==(a=i.config.series[c])?void 0:a.name)?r:"")&&(s.appendChild(h[e]),h[e].appendChild(p))})):s.appendChild(p),s.classList.add(`apexcharts-align-${i.config.legend.horizontalAlign}`),s.classList.add("apx-legend-position-"+i.config.legend.position),p.classList.add("apexcharts-legend-series"),p.style.margin=`${i.config.legend.itemMargin.vertical}px ${i.config.legend.itemMargin.horizontal}px`,s.style.width=i.config.legend.width?i.config.legend.width+"px":"",s.style.height=i.config.legend.height?i.config.legend.height+"px":"",D.setAttrs(p,{rel:c+1,seriesName:Vt.escapeString(r[c]),"data:collapsed":l||d}),(l||d)&&p.classList.add("apexcharts-inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||p.classList.add("apexcharts-no-click")}i.dom.elWrap.addEventListener("click",e.onLegendClick,!0),i.config.legend.onItemHover.highlightDataSeries&&0===i.config.legend.customLegendItems.length&&(i.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),i.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.keyboard.enabled&&i.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const i=this.w,s=i.dom.elLegendWrap,a=s.clientHeight;let r=0,n=0;if("bottom"===i.config.legend.position)n=i.globals.svgHeight-Math.min(a,i.globals.svgHeight/2)-5;else if("top"===i.config.legend.position){const t=new V(this.w,this.ctx),e=t.dimHelpers.getTitleSubtitleCoords("title").height,i=t.dimHelpers.getTitleSubtitleCoords("subtitle").height;n=(e>0?e-10:0)+(i>0?i-10:0)}s.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,s.style.left=r+"px",s.style.top=n+"px","right"===i.config.legend.position&&(s.style.left="auto",s.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((t=>{s&&s.style[t]&&(s.style[t]=parseInt(String(i.config.legend[t]),10)+"px")}))}legendAlignHorizontal(){const t=this.w;t.dom.elLegendWrap.style.right="0";const e=new V(this.w,this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),s=e.dimHelpers.getTitleSubtitleCoords("subtitle");let a=0;"top"===t.config.legend.position&&(a=i.height+s.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}legendAlignVertical(){const t=this.w,e=this.legendHelpers.getLegendDimensions();let i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}onLegendHovered(t){var e;const i=this.w,s=t.target,a=s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker");if("heatmap"===i.config.chart.type||this.isBarsDistributed){if(a){const i=parseInt(null!=(e=s.getAttribute("rel"))?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]);const a=new X(this.ctx.w);"mousemove"===t.type?a.highlightRangeInSeries(i,"highlight"):"mouseout"===t.type&&a.highlightRangeInSeries(i,"reset")}}else if(!s.classList.contains("apexcharts-inactive-legend")&&a){new X(this.ctx.w).toggleSeriesOnHover(t,s)}}onLegendKeyDown(t){const e=this,i=this.w,s=t.target;if((s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker"))&&("Enter"===t.key||" "===t.key)){t.preventDefault();const a=s.getAttribute("rel");e.onLegendClick(t),null!==a&&i.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame((()=>{const t=i.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${a}"]`);t&&t.focus()}))}}onLegendClick(t){var e;const i=this.w,s=t.target;if(!i.config.legend.customLegendItems.length&&(s.classList.contains("apexcharts-legend-series")||s.classList.contains("apexcharts-legend-text")||s.classList.contains("apexcharts-legend-marker"))){const t=parseInt(null!=(e=s.getAttribute("rel"))?e:"0",10)-1,a="true"===s.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"===typeof r&&r(this.ctx,t,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,t,this.w]);const n=this.w.config.legend.markers.onClick;"function"===typeof n&&s.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,t,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,t,this.w]));"treemap"!==i.config.chart.type&&"heatmap"!==i.config.chart.type&&!this.isBarsDistributed&&i.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(t,a)}}}});
vendor: 5,006 bytes, line 1
1class ne{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var t,e;const i=this.w,s=()=>ut.createElementNS("http://www.w3.org/1999/xhtml","div"),a=()=>{const t=ut.createElementNS("http://www.w3.org/1999/xhtml","button");return t.setAttribute("type","button"),t},r=s();if(r.setAttribute("class","apexcharts-toolbar"),r.style.top=i.config.chart.toolbar.offsetY+"px",r.style.right=3-i.config.chart.toolbar.offsetX+"px",i.dom.elWrap.appendChild(r),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elMeasure=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=s(),this.elCustomIcons=[],this.t=i.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let h=0;h<this.t.customIcons.length;h++)this.elCustomIcons.push(a());const n=[],o=(t,e,s)=>{const a=t.toLowerCase();this.t[a]&&i.config.chart.zoom.enabled&&n.push({el:e,icon:"string"===typeof this.t[a]?this.t[a]:s,title:this.localeValues[t],class:`apexcharts-${a}-icon`})};o("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M12 5v14M5 12h14"/>\n</svg>\n'),o("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 12h14"/>\n</svg>\n');const l=t=>{this.t[t]&&i.config.chart[t].enabled&&n.push({el:"zoom"===t?this.elZoom:this.elSelection,icon:"string"===typeof this.t[t]?this.t[t]:"zoom"===t?'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="7"/>\n <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>\n</svg>\n':'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 3a2 2 0 0 0-2 2"/>\n <path d="M19 3a2 2 0 0 1 2 2"/>\n <path d="M21 19a2 2 0 0 1-2 2"/>\n <path d="M5 21a2 2 0 0 1-2-2"/>\n <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>\n</svg>\n',title:this.localeValues["zoom"===t?"selectionZoom":"selection"],class:`apexcharts-${t}-icon`})};l("zoom"),l("selection"),this.t.pan&&i.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:"string"===typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 9 2 12l3 3"/>\n <path d="M9 5l3-3 3 3"/>\n <path d="M15 19l-3 3-3-3"/>\n <path d="M19 9l3 3-3 3"/>\n <path d="M2 12h20"/>\n <path d="M12 2v20"/>\n</svg>\n',title:this.localeValues.pan,class:"apexcharts-pan-icon"}),this.t.measure&&i.config.chart.measure&&i.config.chart.measure.enabled&&n.push({el:this.elMeasure,icon:"string"===typeof this.t.measure?this.t.measure:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>\n <path d="m14.5 12.5 2-2"/>\n <path d="m11.5 9.5 2-2"/>\n <path d="m8.5 6.5 2-2"/>\n <path d="m17.5 15.5 2-2"/>\n</svg>\n',title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),o("reset",this.elZoomReset,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>\n <path d="M3 3v5h5"/>\n</svg>\n'),this.t.download&&n.push({el:this.elMenuIcon,icon:"string"===typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 6h16M4 12h16M4 18h16"/>\n</svg>\n',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let h=0;h<this.elCustomIcons.length;h++)n.push({el:this.elCustomIcons[h],icon:this.t.customIcons[h].icon,title:this.t.customIcons[h].title,index:this.t.customIcons[h].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[h].class});
1n.forEach(((t,e)=>{t.index&&Vt.moveIndexInArray(n,e,t.index)}));for(let h=0;h<n.length;h++)D.setAttrs(n[h].el,{class:n[h].class,title:n[h].title,"aria-label":n[h].title}),n[h].el.innerHTML=n[h].icon,r.appendChild(n[h].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!i.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!i.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!i.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute("aria-pressed",String(!!i.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(r),i.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):i.interact.panEnabled?this.elPan.classList.add(this.selectedClass):i.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):i.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),null==(e=null==(t=this.ctx.measure)?void 0:t.startMeasure)||e.call(t)),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),D.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let i=0;i<e.length;i++)this.elMenuItems.push(ut.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[i].innerHTML=e[i].title,D.setAttrs(this.elMenuItems[i],{class:`apexcharts-menu-item ${e[i].name}`,title:e[i].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[i])}addToolbarEventListeners(){var t,e,i,s,a,r,n,o,l;null==(t=this.elZoomReset)||t.addEventListener("click",this.handleZoomReset.bind(this)),null==(e=this.elSelection)||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),null==(i=this.elZoom)||i.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),null==(s=this.elZoomIn)||s.addEventListener("click",this.handleZoomIn.bind(this)),null==(a=this.elZoomOut)||a.addEventListener("click",this.handleZoomOut.bind(this)),null==(r=this.elPan)||r.addEventListener("click",this.togglePanning.bind(this)),null==(n=this.elMeasure)||n.addEventListener("click",this.toggleMeasure.bind(this)),null==(o=this.elMenuIcon)||o.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((t=>{t.classList.contains("exportSVG")?t.addEventListener("click",this.handleDownload.bind(this,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",this.handleDownload.bind(this,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",this.handleDownload.bind(this,"csv"))}));for(let h=0;h<this.t.customIcons.length;h++)this.elCustomIcons[h].addEventListener("click",this.t.customIcons[h].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach((t=>{t.addEventListener("keydown",(e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const i=t.className;t.click(),requestAnimationFrame((()=>{const t=this.w.dom.baseEl;if(!t)return;const e=i.split(" ").find((t=>t.startsWith("apexcharts-")));if(!e)return;const s=t.querySelector(`.${e}`);
1s&&s.focus()}))}}))})),null==(l=this.elMenuIcon)||l.addEventListener("keydown",(t=>{var e;"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),(null==(e=this.elMenu)?void 0:e.classList.contains("apexcharts-menu-open"))||this.toggleMenu(),window.setTimeout((()=>{const e="ArrowDown"===t.key?0:this.elMenuItems.length-1;this.elMenuItems[e]&&this.elMenuItems[e].focus()}),20))})),this.elMenuItems.forEach(((t,e)=>{t.addEventListener("keydown",(i=>{var s;if("ArrowDown"===i.key){i.preventDefault();(this.elMenuItems[e+1]||this.elMenuItems[0]).focus()}else if("ArrowUp"===i.key){i.preventDefault();(this.elMenuItems[e-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()}else"Escape"===i.key||"Tab"===i.key?(this._closeMenu(),null==(s=this.elMenuIcon)||s.focus(),"Tab"===i.key||i.preventDefault()):"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),t.click())}))}))}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach((e=>{const i=e.ctx.toolbar,s="selection"===t?"selectionEnabled":"zoomEnabled",a=!!e.w.globals[s];i.toggleOtherControls();const r="selection"===t?i.elSelection:i.elZoom;a||(e.w.globals[s]=!0,r.classList.add(i.selectedClass)),r.setAttribute("aria-pressed",String(!!e.w.globals[s]))}))}toggleMeasure(){var t,e,i,s;const a=this.w,r=!a.interact.measureEnabled;this.toggleOtherControls(),r&&(a.interact.measureEnabled=!0,null==(t=this.elMeasure)||t.classList.add(this.selectedClass),null==(i=null==(e=this.ctx.measure)?void 0:e.startMeasure)||i.call(e)),null==(s=this.elMeasure)||s.setAttribute("aria-pressed",String(a.interact.measureEnabled))}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon")),this.elMeasure||(this.elMeasure=t.dom.baseEl.querySelector(".apexcharts-measure-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),"pan"===t?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach((t=>{const e=t.ctx.toolbar,i=!!t.w.interact.panEnabled;e.toggleOtherControls(),i||(t.w.interact.panEnabled=!0,e.elPan.classList.add(e.selectedClass)),e.elPan.setAttribute("aria-pressed",String(!!t.w.interact.panEnabled))}))}toggleOtherControls(){var t,e,i;const s=this.w;s.interact.panEnabled=!1,s.interact.zoomEnabled=!1,s.interact.selectionEnabled=!1,s.interact.measureEnabled&&(s.interact.measureEnabled=!1,null==(e=null==(t=this.ctx.measure)?void 0:t.stopMeasure)||e.call(t),null==(i=this.elMeasure)||i.setAttribute("aria-pressed","false")),this.getToolbarIconsReference();[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach((t=>{t&&t.classList.remove(this.selectedClass)}))}_currentXRange(){const t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();this.minX=e,this.maxX=i;const s=(e+i)/2,a=(e+s)/2,r=(i+s)/2,n=this._getNewMinXMaxX(a,r);t.interact.disableZoomIn||this.zoomUpdateOptions(n.minX,n.maxX)}handleZoomOut(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();if(this.minX=e,this.maxX=i,"datetime"===t.config.xaxis.type&&new Date(e).getUTCFullYear()<1e3)return;const s=(e+i)/2,a=e-(s-e),r=i-(s-i),n=this._getNewMinXMaxX(a,r);t.interact.disableZoomOut||this.zoomUpdateOptions(n.minX,n.maxX)}_getNewMinXMaxX(t,e){const i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}zoomUpdateOptions(t,e){const i=this.w;if(void 0===t&&void 0===e)return void this.handleZoomReset();if(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))return;let s={min:t,max:e};const a=this.getBeforeZoomRange(s,void 0);a&&(s=a.xaxis);const r={xaxis:s};if(!i.globals.initialConfig)return;const n=Vt.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(r.yaxis=n),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(s,n)}zoomCallback(t,e){"function"===typeof this.ev.zoomed&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let i=null;return"function"===typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}toggleMenu(){window.setTimeout((()=>{var t,e,i;(null==(t=this.elMenu)?void 0:t.classList.contains("apexcharts-menu-open"))?this._closeMenu():(null==(e=this.elMenu)||e.classList.add("apexcharts-menu-open"),null==(i=this.elMenuIcon)||i.setAttribute("aria-expanded","true"))}),0)}_closeMenu(){var t,e;null==(t=this.elMenu)||t.classList.remove("apexcharts-menu-open"),null==(e=this.elMenuIcon)||e.setAttribute("aria-expanded","fal
1se")}handleDownload(t){const e=this.w,i=new qt(this.w,this.ctx);switch(t){case"svg":i.exportToSVG();break;case"png":i.exportToPng();break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach((t=>{const e=t.w;if(!e.interact.zoomed)return;if(e.globals.lastXAxis.min=e.globals.initialConfig.xaxis.min,e.globals.lastXAxis.max=e.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),"function"===typeof e.config.chart.events.beforeResetZoom){const i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"===typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max});const i=t.ctx.series.emptyCollapsedSeries(Vt.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(i,e.config.chart.animations.dynamicAnimation.enabled),e.interact.zoomed=!1}))}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}}class oe{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/oe.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*oe.xRatio(t)}static screenXToPlotPx(t,e){const i=t.dom.baseEl,s=i&&i.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const a=s.getBoundingClientRect(),r=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(r||1)-t.layout.translateX}}s.ZP.registerFeatures({toolbar:ne,zoomPanSelection:class extends ne{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new D(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none"}init({xyRatios:t}){const e=this.w,i=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new Dt(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),"x"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((e=>{var s;null==(s=this.hoverArea)||s.addEventListener(e,i.svgMouseEvents.bind(i,t),{capture:!1,passive:!0})})),this._wheelZoomEnabled()&&this.hoverArea.addEventListener("wheel",i.mouseWheelEvent.bind(i),{capture:!1,passive:!1}),this._momentumEnabled()&&["touchstart","touchmove","touchend","touchcancel"].forEach((t=>{var e;null==(e=this.hoverArea)||e.addEventListener(t,i.momentumTouch.bind(i),{capture:!1,passive:!1})})))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(t,e){const i=this.w,s=this.ctx.toolbar;if(i.interact.momentum&&i.interact.momentum.busy)return;if(this._momentumEnabled()&&e.touches&&e.touches.length>1)return;const a=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,r=i.config.chart.toolbar.autoSelected;if("measure"!==r&&(e.shiftKey?(i.interact.shiftWasPressed=!0,s.enableZoomPanFromToolbar("pan"===r?"zoom":"pan")):i.interact.shiftWasPressed&&(s.enableZoomPanFromToolbar(r),i.interact.shiftWasPressed=!1)),!e.target)return;const n=e.target.classList;let o;e.target.parentNode&&null!==e.target.parentNode&&(o=e.target.parentNode.classList);if(!(n.contains("apexcharts-legend-marker")||n.contains("apexcharts-legend-text")||o&&o.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){const t=this._gridRect();if(!t)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-t.top,this.dragged=!1,this.w.interact.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),"mouseup"!==e.type&&"touchend"!==e.type&&"mouseleave"!==e.type||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){const i=this.w,s=this._gridRect();s&&(this.w.interact.mousedown||e)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-s.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(t){var e,i,s;const a=this.w.config.chart;return!(!a.zoom||!a.zoom.enabled)&&("auto"!==t?!!t:!(!(null==(e=a.toolbar)?void 0:e.show)||!(null==(s=null==(i=a.toolbar)?void 0:i.tools)?void 0:s.reset)))}_wheelZoomEnabled(){const{zoom:t}=this.w.config.chart;return this._incidentalZoomEnabled(t&&t.allowMouseWheelZoom)}_wheel(){const t=this.w.interact;return t.wheel||(t.wheel={factor:1,clientX:0,rafId:null,endTimer:null}),t.wheel}mouseWheelEvent(t){t.preventDefault();const e=this._wheel();let i=t.deltaY;1===t.deltaMode?i*=33:2===t.deltaMode&&(i*=330),e.factor*=Math.pow(2,i/240),e.clientX=t.clientX,null==e.rafId&&(e.rafId=requestAnimationFrame((()=>this._applyWheelZoom()))),e.endTimer&&clearTimeout(e.endTimer),e.endTimer=setTimeout((()=>this._endWheelZoom()),150)}_applyWheelZoom(){const t=this.w,e=this._wheel();e.rafId=null;const i=e.factor;if(e.factor=1,1===i||t.globals.isDestroyed)return;const s=this._gridRect();if(!s||!s.width)return;const{min:a,max:r}=this._currentXWindow(),n=r-a,o=Math.min(Math.max((e.clientX-s.left)/s.width,0),1);let l=n*i;const h=this._clampBounds();if(h){const e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,i=Math.max(2*e,1e-6*(h.max-h.min));l<i&&(l=i),l>h.max-h.min&&(l=h.max-h.min)}let c=a+o*n-o*l,d=c+l;const u=1e-9*n;if(Math.abs(c-a)<u&&Math.abs(d-r)<u)return;if(isNaN(c)||isNaN(d))return;const p=this.getBeforeZoomRange({min:c,max:d},void 0);p&&p.xaxis&&(c=p.xaxis.min,d=p.xaxis.max),this._applyXRange(c,d,!0)}_endWheelZoom(){const t=this.w;if(this._wheel().endTimer=null,t.globals.isDestroyed||!t.interact.zoomed)return;const{min:e,max:i}=this._currentXWindow(),s=t.globals.initialConfig?Vt.clone(t.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback({min:e,max:i},s)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(t,e,i,s,a)=>"l"===a||"r"===a?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0),updateHandle:(t,e)=>t.center(e[0],e[1])}).resize().on("resize",(()=>{var e;if(this._clampSelectionRectToPlot(),t.interact.selectionEnabled)t.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute("x")),y:parseFloat(this.selectionRect.node.getAttribute("y")),width:parseFloat(this.selectionRect.node.getAttribute("width")),height:parseFloat(this.selectionRect.node.getAttribute("height"))},clearTimeout(null!=(e=this.w.globals.selectionResizeTimer)?e:void 0),this.w.globals.selectionResizeTimer=window.setTimeout((()=>{this._emitSelectionFromRect()}),30);else{const e=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:e,isResized:!0})}})))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled)if("undefined"!==typeof t.interact.selection&&null!==t.interact.selection)this.drawSelectionRect(u(d({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){let i=oe.dataXToPx(t,t.config.chart.selection.xaxis.min),s=oe.dataXToPx(t,t.config.chart.selection.xaxis.max)-i;t.axisFlags.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,s=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const a={x:i,y:0,width:s,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"===typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}drawSelectionRect({x:t,y:e,width:i,height:s,translateX:a=0,translateY:r=0}){const n=this.w,o=this.zoomRect,l=this.selectionRect;if(this.dragged||null!==n.interact.selection){const h={transform:"translate("+a+", "+r+")"};n.interact.zoomEnabled&&this.dragged&&(i<0&&(i=1),o.attr({x:t,y:e,width:i,height:s,fill:n.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":n.config.chart.zoom.zoomedArea.fill.opacity,stroke:n.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":n.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":n.config.chart.zoom.zoomedArea.stroke.opacity}),D.setAttrs(o.node,h)),n.interact.selectionEnabled&&(l.attr({x:t,y:e,width:i>0?i:0,height:s>0?s:0,fill:n.config.chart.selection.fill.color,"fill-opacity":n.config.chart.selection.fill.opacity,stroke:n.config.chart.selection.stroke.color,"stroke-width":n.config.chart.selection.stroke.width,"stroke-dasharray":n.config.chart.selection.stroke.dashArray,"stroke-opacity":n.config.chart.selection.stroke.opacity}),D.setAttrs(l.node,h))}}_clampSelectionRectToPlot(){const t=this.selectionRect;if(!t||!t.node)return;const e=this.w.layout.gridWidth;
vendor: 11,285 bytes, line 1
1if(!(e>0))return;const i=parseFloat(t.node.getAttribute("x"))||0,s=parseFloat(t.node.getAttribute("width"))||0,a=t=>Math.min(Math.max(t,0),e),r=a(i),n=a(i+s);r===i&&n===i+s||(t.attr({x:r,width:n-r}),t._updateSelectPositions&&t._updateSelectPositions())}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){const i=this.w,s=t,a=this._gridRect();if(!a)return;const r=s.startX-1,n=s.startY;let o=!1,l=!1;const h=this._screenXToPlotPx(s.clientX),c=s.clientY-a.top;let p=h-r,g=c-n,f={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(p+r)>i.layout.gridWidth?p=i.layout.gridWidth-r:h<0&&(p=r),r>h&&(o=!0,p=Math.abs(p)),n>c&&(l=!0,g=Math.abs(g)),f="x"===e?{x:o?r-p:r,y:0,width:p,height:i.layout.gridHeight}:"y"===e?{x:0,y:l?n-g:n,width:i.layout.gridWidth,height:g}:{x:o?r-p:r,y:l?n-g:n,width:p,height:g},f=u(d({},f),{translateX:i.layout.translateX,translateY:i.layout.translateY}),s.drawSelectionRect(f),s.selectionDragging("resizing"),f}selectionDragging(t,e){var i;const s=this.w;if(!e)return;e.preventDefault();const{handler:a,box:r}=e.detail,n=this.constraints;let{x:o,y:l}=r;o<n.x&&(o=n.x),l<n.y&&(l=n.y),r.x2>n.x2&&(o=n.x2-r.w),r.y2>n.y2&&(l=n.y2-r.h),a.move(o,l);const h=this.selectionRect;let c=0;"resizing"===t&&(c=30);const d=t=>parseFloat(h.node.getAttribute(t)),u={x:d("x"),y:d("y"),width:d("width"),height:d("height")};s.interact.selection=u;const p=s.config.chart.link,g=!(!p||!p.enabled&&"function"!==typeof p.dimension);("function"===typeof s.config.chart.events.selection||g)&&s.interact.selectionEnabled&&(clearTimeout(null!=(i=this.w.globals.selectionResizeTimer)?i:void 0),this.w.globals.selectionResizeTimer=window.setTimeout((()=>{this._emitSelectionFromRect()}),c))}_emitSelectionFromRect(){var t;const e=this.w;if(!e.interact.selectionEnabled)return;const i=e.config.chart.link,s=!(!i||!i.enabled&&"function"!==typeof i.dimension);if("function"!==typeof e.config.chart.events.selection&&!s)return;const a=this._gridRect();if(!a)return;const r=this.selectionRect.node.getBoundingClientRect(),n=this.xyRatios;let o,l,h,c;const d=this._screenXToPlotPx(r.left),u=this._screenXToPlotPx(r.right);if(e.axisFlags.isRangeBar)o=e.globals.yAxisScale[0].niceMin+d*n.invertedYRatio,l=e.globals.yAxisScale[0].niceMin+u*n.invertedYRatio,h=0,c=1;else{if(!e.globals.xAxisScale)return;o=oe.pxToDataX(e,d),l=oe.pxToDataX(e,u),h=e.globals.yAxisScale[0].niceMin+(a.bottom-r.bottom)*n.yRatio[0],c=e.globals.yAxisScale[0].niceMax-(r.top-a.top)*n.yRatio[0]}const p={xaxis:{min:o,max:l},yaxis:{min:h,max:c}};"function"===typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,p),e.config.chart.brush.enabled&&void 0!==e.config.chart.events.brushScrolled&&e.config.chart.events.brushScrolled(this.ctx,p),null==(t=this.ctx.linkedViews)||t.onSourceSelection(p.xaxis)}selectionDrawn({context:t,zoomtype:e}){var i;const s=this.w,a=t,r=this.xyRatios,n=this.ctx.toolbar,o=s.interact.zoomEnabled?a.zoomRect.node.getBoundingClientRect():a.selectionRect.node.getBoundingClientRect(),l=a._gridRect();if(!l)return;const h=this._screenXToPlotPx(o.left),c=this._screenXToPlotPx(o.right),d=o.top-l.top,u=o.bottom-l.top;let p,g;s.axisFlags.isRangeBar?(p=s.globals.yAxisScale[0].niceMin+h*r.invertedYRatio,g=s.globals.yAxisScale[0].niceMin+c*r.invertedYRatio):(p=oe.pxToDataX(s,h),g=oe.pxToDataX(s,c));const f=[],m=[];if(s.config.yaxis.forEach(((t,e)=>{const i=s.globals.seriesYAxisMap[e][0],a=s.globals.yAxisScale[e].niceMax-r.yRatio[i]*d,n=s.globals.yAxisScale[e].niceMax-r.yRatio[i]*u;f.push(a),m.push(n)})),a.dragged&&(a.dragX>10||a.dragY>10)&&p!==g)if(s.interact.zoomEnabled){if(!s.globals.initialConfig)return;let t=Vt.clone(s.globals.initialConfig.yaxis),i=Vt.clone(s.globals.initialConfig.xaxis);if(s.interact.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(p=Math.floor(p),g=Math.floor(g),p<1&&(p=1,g=s.globals.dataPoints),g-p<2&&(g=p+1)),"xy"!==e&&"x"!==e||(i={min:p,max:g}),"xy"!==e&&"y"!==e||t.forEach(((e,i)=>{t[i].min=m[i],t[i].max=f[i]})),n){const e=n.getBeforeZoomRange(i,t);e&&(i=e.xaxis?e.xaxis:i,t=e.yaxis?e.yaxis:t)}const r={xaxis:i};s.config.chart.group||(r.yaxis=t),a.ctx.updateHelpers._updateOptions(r,!1,a.w.config.chart.animations.dynamicAnimation.enabled),"function"===typeof s.config.chart.events.zoomed&&n.zoomCallback(i,t)}else if(s.interact.selectionEnabled){let t=null,r=null;if(r={min:p,max:g},"xy"===e||"y"===e){const e=Vt.clone(s.config.yaxis);t=e,e.forEach(((t,i)=>{e[i].min=m[i],e[i].max=f[i]}))}s.interact.selection=a.selection,"function"===typeof s.config.chart.events.selection&&s.config.chart.events.selection(a.ctx,{xaxis:r,yaxis:t}),null==(i=a.ctx.linkedViews)||i.onSourceSelection(r)}}panDragging({context:t}){var e;const i=this.w,s=t;if("undefined"!==typeof i.interact.lastClientPosition.x){const t=i.interact.lastClientPosition.x-s.clientX,a=(null!=(e=i.interact.lastClientPosition.y)?e:0)-s.clientY;Math.abs(t)>Math.abs(a)&&t>0?this.moveDirection="left":Math.abs(t)>Math.abs(a)&&t<0?this.moveDirection="right":Math.abs(a)>Math.abs(t)&&a>0?this.moveDirection="up":Math.abs(a)>Math.abs(t)&&a<0&&(this.moveDirection="down")}i.interact.lastClientPosition={x:s.clientX,y:s.clientY};const a=i.axisFlags.isRangeBar?i.globals.minY:i.globals.minX,r=i.axisFlags.isRangeBar?i.globals.maxY:i.globals.maxX;s.panScrolled(a,r)}panScrolled(t,e){var i,s;const a=this.w,r=this.xyRatios;if(!a.globals.initialConfig)return;const n=Vt.clone(a.globals.initialConfig.yaxis);let o=r.xRatio,l=a.globals.minX,h=a.globals.maxX;if(a.axisFlags.isRangeBar&&(o=r.invertedYRatio,l=a.globals.minY,h=a.globals.maxY),"left"===this.moveDirection?(t=l+a.layout.gridWidth/15*o,e=h+a.layout.gridWidth/15*o):"right"===this.moveDirection&&(t=l-a.layout.gridWidth/15*o,e=h-a.layout.gridWidth/15*o),!a.axisFlags.isRangeBar){const r=null!=(i=a.globals.dataReducerRawMinX)?i:a.globals.initialMinX,n=null!=(s=a.globals.dataReducerRawMaxX)?s:a.globals.initialMaxX;(t<r||e>n)&&(t=l,e=h)}const c={xaxis:{min:t,max:e}};a.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,t,e)}updateScrolledChart(t,e,i){const s=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"===typeof s.config.chart.events.scrolled){const t={xaxis:{min:e,max:i}};s.config.chart.events.scrolled(this.ctx,t),this.ctx.events.fireEvent("scrolled",t)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){const t=this.w.config.chart;return!(!t.pan||!t.pan.inertia)}_m(){const t=this.w.interact;return t.momentum||(t.momentum={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null}),t.momentum}_currentXWindow(){const t=this.w;return t.axisFlags.isRangeBar?{min:t.globals.minY,max:t.globals.maxY}:{min:t.globals.minX,max:t.globals.maxX}}_gridRect(){const t=this.w.dom.baseEl,e=t&&t.querySelector(".apexcharts-grid");return e?e.getBoundingClientRect():null}_screenXToPlotPx(t){return oe.screenXToPlotPx(this.w,t)}_clampBounds(){var t,e;const i=this.w;return i.axisFlags.isRangeBar?null:{min:null!=(t=i.globals.dataReducerRawMinX)?t:i.globals.initialMinX,max:null!=(e=i.globals.dataReducerRawMaxX)?e:i.globals.initialMaxX}}_applyXRange(t,e,i){const s=this.w;if(!s.globals.initialConfig)return!1;const a=this._currentXWindow(),r=i&&e-t>a.max-a.min,n=this._clampBounds();if(n){const i=e-t;t<n.min&&(e=(t=n.min)+i),e>n.max&&(t=(e=n.max)-i),t<n.min&&(t=n.min)}if(s.config.xaxis.convertedCatToNumeric&&(t=Math.floor(t),e=r?Math.ceil(e):Math.floor(e),t<1&&(t=1),n&&e>n.max&&(e=Math.floor(n.max)),e-t<2))return!1;if(!(e>t))return!1;const o={xaxis:{min:t,max:e}};return s.config.chart.group||(o.yaxis=Vt.clone(s.globals.initialConfig.yaxis)),i&&(s.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(o,!1,!1),{minX:t,maxX:e}}_cancelInertia(){const t=this._m();null!=t.inertiaRAF&&(cancelAnimationFrame(t.inertiaRAF),t.inertiaRAF=null)}_fireScrolled(){const t=this.w;if("function"!==typeof t.config.chart.events.scrolled)return;const{min:e,max:i}=this._currentXWindow(),s={xaxis:{min:e,max:i}};t.config.chart.events.scrolled(this.ctx,s),this.ctx.events.fireEvent("scrolled",s)}_pushSample(t,e){const i=this._m().samples;for(i.push({x:t,t:e});i.length>6;)i.shift()}momentumTouch(t){const e=this.w,i=this._m(),s=t.type;if("touchstart"!==s)"touchmove"!==s?(i.pinch?t.touches.length<2&&this._endPinch():i.panState&&0===t.touches.length&&this._endPan(),0===t.touches.length&&(e.interact.mousedown=!1,this.dragged=!1,null!=i.inertiaRAF||i.pinch||i.panState||(i.busy=!1))):i.pinch&&t.touches.length>=2?(t.preventDefault(),this._movePinch(t)):i.panState&&1===t.touches.length&&this._movePan(t);else{this._cancelInertia();const s=this._gridRect();if(!s)return;if(t.touches.length>=2&&this._pinchEnabled())t.preventDefault(),i.busy=!0,i.panState=null,this._beginPinch(t,s);else if(1===t.touches.length&&this._panInertiaEnabled()&&e.interact.panEnabled){i.busy=!0,i.pinch=null;const s=t.touches[0],a=this._currentXWindow(),r=e.layout.gridWidth||1;i.panState={startX:s.clientX,startY:s.clientY,axis:null,minX0:a.min,maxX0:a.max,ratio0:(a.max-a.min)/r},i.samples=[{x:s.clientX,t:t.timeStamp}]}}}_beginPinch(t,e){const i=this.w,s=t.touches[0],a=t.touches[1],r=Math.hypot(a.clientX-s.clientX,a.clientY-s.clientY)||1,n=(s.clientX+a.clientX)/2-e.left-i.globals.barPadForNumericAxis,{min:o,max:l}=this._currentXWindow();this._m().pinch={d0:r,cx0:n,minX0:o,maxX0:l,gridWidth:i.layout.gridWidth||1}}_movePinch(t){const e=this.w,i=this._m().pinch;if(!i)return;const s=this._gridRect();if(!s)return;const a=t.touches[0],r=t.touches[1],n=Math.hypot(r.clientX-a.clientX,r.clientY-a.clientY)||1,o=(a.clientX+r.clientX)/2-s.left-e.globals.barPadForNumericAxis,l=i.maxX0-i.minX0,h=l*(i.d0/n);let c=i.minX0+i.cx0/i.gridWidth*l-o/i.gridWidth*h,d=c+h;const u=this._clampBounds();if(u){const t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,i=Math.max(2*t,1e-6*(u.max-u.min));if(d-c<i){const t=(c+d)/2;c=t-i/2,d=t+i/2}}this._applyXRange(c,d,!0)}_endPinch(){const t=this.w;this._m().pinch=null;const{min:e,max:i}=this._currentXWindow(),s={min:e,max:i},a=t.globals.initialConfig?Vt.clone(t.globals.initialConfig.yaxis):[],r=this.ctx.toolbar;r&&r.zoomCallback(s,a)}_movePan(t){const e=this._m(),i=e.panState,s=t.touches[0];if(!i.axis){const a=Math.abs(s.clientX-i.startX),r=Math.abs(s.clientY-i.startY);if(a<6&&r<6)return void this._pushSample(s.clientX,t.timeStamp);if(r>a)return e.busy=!1,void(e.panState=null);i.axis="x"}if("x"!==i.axis)return;t.preventDefault();const a=(s.clientX-i.startX)*i.ratio0;this._pushSample(s.clientX,t.timeStamp),this._applyXRange(i.minX0-a,i.maxX0-a,!1)}_endPan(){const t=this._m(),e=t.panState;t.panState=null;let i=0;const s=t.samples;if(s.length>=2){const t=s[0],e=s[s.length-1],a=e.t-t.t;a>0&&(i=(e.x-t.x)/a)}t.samples=[],e&&"x"===e.axis&&this._panInertiaEnabled()&&Math.abs(i)>.05?this._startInertia(i):(t.busy=!1,this._fireScrolled())}_startInertia(t){const e=this.w,i=this._m(),s=e.config.chart.pan&&e.config.chart.pan.friction,a="number"===typeof s?Math.min(Math.max(s,.5),.999):.92;let r=t,n=null;i.busy=!0;const o=t=>{if(e.globals.isDestroyed)return i.inertiaRAF=null,void(i.busy=!1);if(null==n)return n=t,void(i.inertiaRAF=requestAnimationFrame(o));const s=t-n;
vendor: 9,808 bytes, line 1
1if(n=t,r*=Math.pow(a,s/16.6667),Math.abs(r)<.02)return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();const l=this._currentXWindow(),h=e.layout.gridWidth||1,c=(l.max-l.min)/h,d=r*s*c,u=this._applyXRange(l.min-d,l.max-d,!1),p=this._clampBounds();if(!u||p&&(d>0&&u.minX<=p.min+1e-6*(p.max-p.min)||d<0&&u.maxX>=p.max-1e-6*(p.max-p.min)))return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();i.inertiaRAF=requestAnimationFrame(o)};i.inertiaRAF=requestAnimationFrame(o)}}});let le=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var i,s;const a=this.w;if("vertical"===t.label.orientation){const r=null!==e?e:0,n=a.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(null!==n){const e=n.getBBox();n.setAttribute("x",String(parseFloat(null!=(i=n.getAttribute("x"))?i:"0")-e.height+4));const a="top"===t.label.position?e.width:-e.width;n.setAttribute("y",String(parseFloat(null!=(s=n.getAttribute("y"))?s:"0")+a));const{x:r,y:o}=this.annoCtx.graphics.rotateAroundCenter(n);n.setAttribute("transform",`rotate(-90 ${r} ${o})`)}}}addBackgroundToAnno(t,e){const i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;const s=i.dom.baseEl.querySelector(".apexcharts-grid");if(!s)return null;const a=s.getBoundingClientRect(),r=s.getBBox(),n=a.width/r.width||1,o=t.getBoundingClientRect();let{left:l,right:h,top:c,bottom:d}=e.label.style.padding;"vertical"===e.label.orientation&&([c,d,l,h]=[l,h,c,d]);const u=a.left-r.x*n,p=a.top-r.y*n,g=(o.left-u)/n-l,f=(o.top-p)/n-c,m=this.annoCtx.graphics.drawRect(g,f,o.width/n+l+h,o.height/n+c+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&m.node.classList.add(e.id),m}annotationsBackground(){const t=this.w,e=(e,i,s)=>{const a=t.dom.baseEl.querySelector(`.apexcharts-${s}-annotations .apexcharts-${s}-annotation-label[rel='${i}']`);if(a){const i=a.parentNode,s=this.addBackgroundToAnno(a,e);if(s){null==i||i.insertBefore(s.node,a);const r=a.getAttribute("x");null!==r&&b(s,parseFloat(r),t),e.label.mouseEnter&&s.node.addEventListener("mouseenter",e.label.mouseEnter.bind(this,e)),e.label.mouseLeave&&s.node.addEventListener("mouseleave",e.label.mouseLeave.bind(this,e)),e.label.click&&s.node.addEventListener("click",e.label.click.bind(this,e))}}};t.config.annotations.xaxis.forEach(((t,i)=>e(t,i,"xaxis"))),t.config.annotations.yaxis.forEach(((t,i)=>e(t,i,"yaxis"))),t.config.annotations.points.forEach(((t,i)=>e(t,i,"point")))}usesCategoryX(){const t=this.w;return("category"===t.config.xaxis.type||t.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!t.axisFlags.dataFormatXNumeric&&!t.config.chart.sparkline.enabled}hasXDomain(){const t=this.w;return this.annoCtx.invertAxis?Vt.isNumber(t.globals.minY)&&Vt.isNumber(t.globals.yRange[0]):this.usesCategoryX()?t.labelData.labels.length>0||t.labelData.categoryLabels.length>0:Vt.isNumber(t.globals.minX)&&Vt.isNumber(t.globals.xRange)}getY1Y2(t,e){var i,s,a;const r=this.w,n="y1"===t?e.y:e.y2,o="string"===typeof n&&n.includes("px");let l,h=!1;if(this.annoCtx.invertAxis){const t=r.config.xaxis.convertedCatToNumeric?r.labelData.categoryLabels:r.labelData.labels,s=t.indexOf(n);if(!o&&-1===s)return{yP:0,clipped:!0};const a=r.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${s+1})`);l=a?parseFloat(null!=(i=a.getAttribute("y"))?i:"0"):(r.layout.gridHeight/t.length-1)*(s+1)-r.globals.barHeight,void 0!==e.seriesIndex&&r.globals.barHeight&&(l-=r.globals.barHeight/2*(r.seriesData.series.length-1)-r.globals.barHeight*e.seriesIndex)}else{if(!r.config.yaxis[e.yAxisIndex])return{yP:0,clipped:!0};const t=r.globals.seriesYAxisMap[e.yAxisIndex],i=null!=(s=null==t?void 0:t[0])?s:null;if(null===i&&r.seriesData.series.length)return{yP:0,clipped:!0};const o=null===i?r.globals.minY:r.globals.minYArr[i],c=null===i?r.globals.maxY-r.globals.minY:r.globals.yRange[i],d=r.config.yaxis[e.yAxisIndex].logarithmic&&null!==i?new S(this.w).getLogVal(r.config.yaxis[e.yAxisIndex].logBase,n,i)/r.globals.yLogRatio[i]:(n-o)/(c/r.layout.gridHeight);l=r.layout.gridHeight-Math.min(Math.max(d,0),r.layout.gridHeight),h=d>r.layout.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(l=0),(null==(a=r.config.yaxis[e.yAxisIndex])?void 0:a.reversed)&&(l=d)}return o&&(l=parseFloat(n)),{yP:l,clipped:h}}getX1X2(t,e){const i=this.w,s="x1"===t?e.x:e.x2,a=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange;let o=!1;const l="string"===typeof s&&s.includes("px"),h=(void 0===s||null===s)&&e.marker;if(!l&&!h&&!this.hasXDomain())return{x:0,clipped:!0};let c=this.annoCtx.inversedReversedAxis?(r-s)/(n/i.layout.gridWidth):(s-a)/(n/i.layout.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.axisFlags.dataFormatXNumeric||i.config.chart.sparkline.enabled||(c=this.getStringX(s)),"string"===typeof s&&s.includes("px")&&(c=parseFloat(s)),void 0!==s&&null!==s||!e.marker||(c=i.layout.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=i.globals.barWidth/2*(i.seriesData.series.length-1)-i.globals.barWidth*e.seriesIndex),"number"!==typeof c&&(c=0,o=!0),parseFloat(c.toFixed(10))>parseFloat(i.layout.gridWidth.toFixed(10))?(c=i.layout.gridWidth,o=!0):c<0&&(c=0,o=!0),{x:c,clipped:o}}getStringX(t){var e;const i=this.w;let s=t;if(i.config.xaxis.convertedCatToNumeric&&i.labelData.categoryLabels.length){const e=String(t);t=i.labelData.categoryLabels.findIndex((t=>String(t)===e))+1}const a=i.labelData.labels.map((t=>Array.isArray(t)?t.join(" "):t)).indexOf(t),r=i.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return r&&(s=parseFloat(null!=(e=r.getAttribute("x"))?e:"0")),s}};class he{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new le(this.annoCtx)}addXaxisAnnotation(t,e,i){const s=this.w,a=this.helpers.getX1X2("x1",t);let r=a.x;const n=a.clipped;let o,l=!0;const h=t.label.text,c=t.strokeDashArray;if(Vt.isNumber(r)){if(null===t.x2||"undefined"===typeof t.x2){if(!n){const i=this.annoCtx.graphics.drawLine(r+t.offsetX,0+t.offsetY,r+t.offsetX,s.layout.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(i.node),t.id&&i.node.classList.add(t.id),b(i,r+t.offsetX,s)}}else{const i=this.helpers.getX1X2("x2",t);if(o=i.x,l=i.clipped,o<r){const t=r;r=o,o=t}const a=this.annoCtx.graphics.drawRect(r+t.offsetX,0+t.offsetY,o-r,s.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,c);a.node.classList.add("apexcharts-annotation-rect"),a.attr("clip-path",`url(#gridRectMask${s.globals.cuid})`),e.appendChild(a.node),t.id&&a.node.classList.add(t.id),b(a,r+t.offsetX,s)}if(!n||!l){const a=this.annoCtx.graphics.getTextRects(h,t.label.style.fontSize),n="top"===t.label.position?4:"center"===t.label.position?s.layout.gridHeight/2+("vertical"===t.label.orientation?a.width/2:0):s.layout.gridHeight,o=this.annoCtx.graphics.drawText({x:r+t.label.offsetX,y:n+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?a.width/2-12:-a.width/2:0),text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});o.attr({rel:i}),e.appendChild(o.node),b(o,r+t.label.offsetX,s),this.annoCtx.helpers.setOrientations(t,i)}}}drawXAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map(((t,i)=>{this.addXaxisAnnotation(t,e.node,i)})),e}}class ce{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new le(this.annoCtx),this.axesUtils=new B(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,i){const s=this.w,a=t.strokeDashArray;let r=this.helpers.getY1Y2("y1",t),n=r.yP;const o=r.clipped;let l,h=!0,c=!1;const d=t.label.text;if(null===t.y2||"undefined"===typeof t.y2){if(!o){c=!0;const i=this.annoCtx.graphics.drawLine(0+t.offsetX,n+t.offsetY,this._getYAxisAnnotationWidth(t),n+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(i.node),t.id&&i.node.classList.add(t.id)}}else{if(r=this.helpers.getY1Y2("y2",t),l=r.yP,h=r.clipped,l>n){const t=n;n=l,l=t}if(!o||!h){c=!0;const i=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),n-l,0,t.fillColor,t.opacity,1,t.borderColor,a);i.node.classList.add("apexcharts-annotation-rect"),i.attr("clip-path",`url(#gridRectMask${s.globals.cuid})`),e.appendChild(i.node),t.id&&i.node.classList.add(t.id)}}if(c){const a="right"===t.label.position?s.layout.gridWidth:"center"===t.label.position?s.layout.gridWidth/2:0,r=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:(null!=l?l:n)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});r.attr({rel:i}),e.appendChild(r.node)}}_getYAxisAnnotationWidth(t){const e=this.w;let i=e.layout.gridWidth;return i=t.width.indexOf("%")>-1?e.layout.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10),i+t.offsetX}drawYAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach(((t,i)=>{t.yAxisIndex=this.axesUtils.translateYAxisIndex(t.yAxisIndex),this.axesUtils.isYAxisHidden(t.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(t.yAxisIndex)||this.addYaxisAnnotation(t,e.
vendor: 27,381 bytes, line 1
1node,i)})),e}}class de{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new le(this.annoCtx)}addPointAnnotation(t,e,i){const s=this.w;if(s.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;const a=this.helpers.getX1X2("x1",t),r=a.x,n=a.clipped,o=this.helpers.getY1Y2("y1",t),l=o.yP,h=o.clipped;if(Vt.isNumber(r)&&!h&&!n){const a={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`};let n=this.annoCtx.graphics.drawMarker(r+t.marker.offsetX,l+t.marker.offsetY,a);e.appendChild(n.node);const o=[n.node];b(n,r,s);const h=t.label.text?t.label.text:"",c=this.getConstrainedLabelX(h,r+t.label.offsetX,t.label),d=this.annoCtx.graphics.drawText({x:c,y:l+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(d.attr({rel:i}),e.appendChild(d.node),b(d,r,s),t.customSVG.SVG){const i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});i.attr({transform:`translate(${r+t.customSVG.offsetX}, ${l+t.customSVG.offsetY})`}),i.node.innerHTML=t.customSVG.SVG,e.appendChild(i.node),o.push(i.node)}if(t.image.path){const e=t.image.width?t.image.width:20,i=t.image.height?t.image.height:20;n=this.annoCtx.addImage({x:r+t.image.offsetX-e/2,y:l+t.image.offsetY-i/2,width:e,height:i,path:t.image.path,appendTo:".apexcharts-point-annotations"}),o.push(n.node)}t.tooltip&&t.tooltip.enabled&&o.forEach((e=>{e.addEventListener("mouseenter",(()=>{this.showPointTooltip(t,e)})),e.addEventListener("mouseleave",(()=>{this.hidePointTooltip()}))})),t.mouseEnter&&n.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&n.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&n.node.addEventListener("click",t.click.bind(this,t))}}getConstrainedLabelX(t,e,i){const s=this.w;if(!t)return e;const{width:a}=this.annoCtx.graphics.getTextRects(t,i.style.fontSize,i.style.fontFamily,void 0,!0,i.style.fontWeight);let r,n;switch(i.textAnchor){case"start":r=e,n=e+a;break;case"end":r=e-a,n=e;break;default:r=e-a/2,n=e+a/2}const o=i.style.padding||{};return r-=o.left||0,n+=o.right||0,r<0?e-r:n>s.layout.gridWidth?e-(n-s.layout.gridWidth):e}getPointTooltipEl(){const t=this.w;let e=t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");return e||(e=ut.createElementNS("http://www.w3.org/1999/xhtml","div"),e.classList.add("apexcharts-tooltip","apexcharts-annotation-tooltip"),t.dom.elWrap.appendChild(e)),e}getPointTooltipContent(t){const e=this.w,i=t.tooltip||{};if("function"===typeof i.formatter)return i.formatter({annotation:t,seriesIndex:t.seriesIndex,id:t.id,w:e});let s=null!=i.text?i.text:t.label&&t.label.text;return Array.isArray(s)&&(s=s.join("<br/>")),null==s?"":String(s)}showPointTooltip(t,e){const i=this.w,s=this.getPointTooltipContent(t);if(!s)return;const a=this.getPointTooltipEl();a.innerHTML=s;const r=t.tooltip.theme||i.config.tooltip.theme||"light";a.classList.remove("apexcharts-theme-light","apexcharts-theme-dark"),a.classList.add(`apexcharts-theme-${r}`),a.classList.add("apexcharts-active");const n=i.dom.elWrap.getBoundingClientRect(),o=e.getBoundingClientRect(),l=a.getBoundingClientRect(),h=t.tooltip.offsetX||0,c=t.tooltip.offsetY||0;let d=o.left-n.left+o.width/2-l.width/2,u=o.top-n.top-l.height-10;d=Math.max(0,Math.min(d,n.width-l.width)),u<0&&(u=o.top-n.top+o.height+10),a.style.left=d+h+"px",a.style.top=u+c+"px"}hidePointTooltip(){const t=this.w.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");t&&t.classList.remove("apexcharts-active")}drawPointAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(((t,i)=>{this.addPointAnnotation(t,e.node,i)})),e}}s.ZP.registerFeatures({annotations:class{constructor(t,{theme:e=null,timeScale:i=null}={}){this.w=t,this.theme=e,this.timeScale=i,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new D(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new le(this),this.xAxisAnnotations=new he(this),this.yAxisAnnotations=new ce(this),this.pointsAnnotations=new de(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const t=this.w;if(t.globals.axisCharts){const e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),s=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,r=[e,i,s],n=[i.node,e.node,s.node],o="line"===t.config.chart.type||"area"===t.config.chart.type||"rangeArea"===t.config.chart.type,l=[o,!1,o];for(let h=0;h<3;h++)t.dom.elGraphical.add(r[h]),!a||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&!l[h]&&n[h].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[h],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map((t=>{this.addImage(t)}))}drawTextAnnos(){this.w.config.annotations.texts.map((t=>{this.addText(t)}))}addXaxisAnnotation(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}addYaxisAnnotation(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}addPointAnnotation(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}addText(t){const{x:e,y:i,text:s,textAnchor:a,foreColor:r,fontSize:n,fontFamily:o,fontWeight:l,cssClass:h,backgroundColor:c,borderWidth:d,strokeDashArray:u,borderRadius:p,borderColor:g,appendTo:f=".apexcharts-svg",paddingLeft:m=4,paddingRight:x=4,paddingBottom:b=2,paddingTop:y=2}=t,w=this.w,v=this.graphics.drawText({x:e,y:i,text:s,textAnchor:a||"start",fontSize:n||"12px",fontWeight:l||"regular",fontFamily:o||w.config.chart.fontFamily,foreColor:r||w.config.chart.foreColor,cssClass:h}),A=w.dom.baseEl.querySelector(f);A&&A.appendChild(v.node);const _=v.bbox();if(s){const t=this.graphics.drawRect(_.x-m,_.y-y,_.width+m+x,_.height+b+y,p,c||"transparent",1,d,g,u);A.insertBefore(t.node,v.node)}}addImage(t){const e=this.w,{path:i,x:s=0,y:a=0,width:r=20,height:n=20,appendTo:o=".apexcharts-svg"}=t,l=e.dom.Paper.image(i);l.size(r,n).move(s,a);const h=e.dom.baseEl.querySelector(o);return h&&h.appendChild(l.node),l}addXaxisAnnotationExternal(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}addYaxisAnnotationExternal(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}addPointAnnotationExternal(t,e,i){return"undefined"===typeof this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}addAnnotationExternal({params:t,pushToMemory:e,context:i,type:s,contextMethod:a}){const r=i,n=r.w,o=n.dom.baseEl.querySelector(`.apexcharts-${s}-annotations`),l=o.childNodes.length+1,h=new at,c=Object.assign({},"xaxis"===s?h.xAxisAnnotation:"yaxis"===s?h.yAxisAnnotation:h.pointAnnotation),d=Vt.extend(c,t);switch(s){case"xaxis":this.addXaxisAnnotation(d,o,l);break;case"yaxis":this.addYaxisAnnotation(d,o,l);break;case"point":this.addPointAnnotation(d,o,l)}const u=n.dom.baseEl.querySelector(`.apexcharts-${s}-annotations .apexcharts-${s}-annotation-label[rel='${l}']`),p=this.helpers.addBackgroundToAnno(u,d);return p&&o.insertBefore(p.node,u),e&&n.globals.memory.methodsToExec.push({context:r,id:d.id?d.id:Vt.randomId(),method:a,label:"addAnnotation",params:t}),i}_removeAnnotationTooltip(t){const e=t.dom.elWrap&&t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");e&&e.parentNode&&e.parentNode.removeChild(e)}clearAnnotations(t){const e=t.w;this._removeAnnotationTooltip(e);const i=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let s=e.globals.memory.methodsToExec.length-1;s>=0;s--)"addText"!==e.globals.memory.methodsToExec[s].label&&"addAnnotation"!==e.globals.memory.methodsToExec[s].label||e.globals.memory.methodsToExec.splice(s,1);Array.prototype.forEach.call(i,(t=>{for(;t.firstChild;)t.removeChild(t.firstChild)}))}removeAnnotation(t,e){const i=t.w;this._removeAnnotationTooltip(i);const s=i.dom.baseEl.querySelectorAll(`.${e}`);s&&(i.globals.memory.methodsToExec.map(((t,s)=>{t.id===e&&i.globals.memory.methodsToExec.splice(s,1)})),Object.keys(i.config.annotations).forEach((t=>{const s=i.config.annotations[t];Array.isArray(s)&&(i.config.annotations[t]=s.filter((t=>t.id!==e)))})),Array.prototype.forEach.call(s,(t=>{t.parentElement.removeChild(t)})))}}});function ue(t,e){if(!(e>0))return[];if(1===e)return[d({},t)];const i=t.width>=t.height,s=i?t.width:t.height,a=i?t.height:t.width,r=a>0?s/a:e;let n=Math.max(1,Math.ceil(Math.sqrt(r*e)));n>e&&(n=e);const o=Math.floor(e/n);let l=e-o*n;const h=[],c=s/n;let u=0;for(let d=0;d<n;d++){const e=o+(l>0?1:0);l>0&&l--;const s=e>0?a/e:0;for(let a=0;a<e;a++)h.push(i?{x:t.x+u,y:t.y+a*s,width:c,height:s}:{x:t.x+a*s,y:t.y+u,width:s,height:c});u+=c}return h}function pe(t,e,i){if(!(e>0))return[];const s=t.width>=t.height,a=s?t.width:t.height,r=s?t.height:t.width,n=s?t.y:t.x,o=n+r,l=r>0?a/r:e;let h=Math.max(Math.ceil(Math.sqrt(l*e)),Math.ceil(a/16));h>=1||(h=1),h>e&&(h=e);const c=Math.floor(e/h);let d=e-c*h;const u=[],p=a/h;let g=s?t.x:t.y;for(let f=0;f<h;f++){const t=c+(d>0?1:0);d>0&&d--;const e=[],a=i(g,g+p,s);if(Array.isArray(a))for(let i=0;i<a.length;i++){const t=a[i];if(!t)continue;const s=Math.max(n,Math.min(t[0],t[1])),r=Math.min(o,Math.max(t[0],t[1]));r>s&&e.push([s,r])}e.length||e.push([n,o]);const r=e.reduce(((t,e)=>t+(e[1]-e[0])),0),l=e.map((i=>r>0?(i[1]-i[0])/r*t:t/e.length)),h=l.map((t=>Math.floor(t)));let f=h.reduce(((t,e)=>t+e),0);const m=l.map(((t,e)=>({i:e,frac:t-Math.floor(t)}))).sort(((t,e)=>e.frac-t.frac));for(let i=0;f<t;i++,f++)h[m[i%m.length].i]++;for(let i=0;i<e.length;i++){const t=h[i];if(t<=0)continue;const a=e[i][0],r=(e[i][1]-a)/t;for(let e=0;e<t;e++)u.push(s?{x:g,y:a+e*r,width:p,height:r}:{x:a+e*r,y:g,width:r,height:p})}g+=p}return u}function ge(t,e,i,s,a,r){let n=a===i?0:Math.round((t-i)/(a-i)*32767),o=r===s?0:Math.round((e-s)/(r-s)*32767),l=0;for(let h=32768;h>=1;h/=2){const t=(n&h)>0?1:0,e=(o&h)>0?1:0;if(l+=h*h*(3*t^e),0===e){1===t&&(n=h-1-n,o=h-1-o);const e=n;n=o,o=e}}return l}function fe(t,e){let i=1/0,s=1/0,a=-1/0,r=-1/0;const n=t.map((t=>{const[n,o]=e(t);return n<i&&(i=n),n>a&&(a=n),o<s&&(s=o),o>r&&(r=o),[n,o]}));return t.map(((t,e)=>({item:t,d:ge(n[e][0],n[e][1],i,s,a,r)}))).sort(((t,e)=>t.d-e.d)).map((t=>t.item))}function me(t){if(!t||"string"!==typeof t)return null;const e=t.trim();if("#"===e[0]){const t=e.slice(1);return 3===t.length?[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),1]:6===t.length||8===t.length?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),8===t.length?parseInt(t.slice(6,8),16)/255:1]:null}const i=e.match(/^rgba?\(([^)]+)\)$/i);if(i){const t=i[1].split(",").map((t=>parseFloat(t)));return t.length<3||t.some((t=>!isFinite(t)))?null:[t[0],t[1],t[2],t.length>3?t[3]:1]}return null}function xe(t,e){const i=me(t),s=me(e);return i&&s?t=>{const e=Math.round(i[0]+(s[0]-i[0])*t),a=Math.round(i[1]+(s[1]-i[1])*t),r=Math.round(i[2]+(s[2]-i[2])*t),n=i[3]+(s[3]-i[3])*t;return n>=1?`rgb(${e},${a},${r})`:`rgba(${e},${a},${r},${n})`}:null}function be(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}s.ZP.registerFeatures({keyboardNavigation:class{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){const t=this.w.dom.Paper.node;t&&(t.setAttribute("tabindex","0"),t.addEventListener("focus",this._onFocus),t.addEventListener("blur",this._onBlur),t.addEventListener("mousedown",this._onPointerDown,{capture:!0}),t.addEventListener("pointerdown",this._onPointerDown,{capture:!0}),t.addEventListener("touchstart",this._onPointerDown,{capture:!0,passive:!0}),t.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const t=this.w,e=t.dom.Paper&&t.dom.Paper.node;this.ctx.events.removeEventListener("legendClick",this._onLegendClick),e&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur),e.removeEventListener("keydown",this._onKeyDown),e.removeEventListener("mousedown",this._onPointerDown,{capture:!0}),e.removeEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.removeEventListener("touchstart",this._onPointerDown,{capture:!0}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(t){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){var e,i,s;if(this._isNavEnabled()&&this.active){if(t.shiftKey&&("ArrowRight"===t.key||"ArrowLeft"===t.key)&&this._canPan())return t.preventDefault(),void this._panBy("ArrowRight"===t.key?1:-1);switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"+":case"=":this._canZoom()&&(t.preventDefault(),null==(e=this.ctx.toolbar)||e.handleZoomIn(),this._announce("Zoomed in"));break;case"-":case"_":this._canZoom()&&(t.preventDefault(),null==(i=this.ctx.toolbar)||i.handleZoomOut(),this._announce("Zoomed out"));break;case"0":this._canZoom()&&this.w.interact.zoomed&&(t.preventDefault(),null==(s=this.ctx.toolbar)||s.handleZoomReset(),this._announce("Zoom reset"));break;case"Escape":t.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus())}}}_canZoom(){const t=this.w;return Boolean(t.globals.axisCharts&&t.config.chart.zoom&&t.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(t){const e=this.w,i=this.ctx.toolbar;if(!i)return;const s=Number(e.globals.minX),a=Number(e.globals.maxX);if(!isFinite(s)||!isFinite(a)||s===a)return;const r=.1*(a-s)*t;i.zoomUpdateOptions(s+r,a+r),this._announce(t>0?"Panned right":"Panned left")}_move(t,e){const i=this.w,s=i.config.chart.accessibility.keyboard.navigation.wrapAround;if(0!==t){const e=this.w.globals.tooltip;if(e&&e.tConfig&&e.tConfig.shared){const t=this.dataPointIndex;if(e.tooltipUtil&&e.tooltipUtil.isXoverlap(t)&&e.tooltipUtil.isInitialSeriesSameLen())return}const a=this._getSeriesCount();let r=this.seriesIndex+t,n=0;for(;n<a&&(r<0&&(r=s?a-1:0),r>=a&&(r=s?0:a-1),i.globals.collapsedSeriesIndices.includes(r));)r+=t,n++;this.seriesIndex=r;const o=this._getDataPointCount(r);this.dataPointIndex>=o&&(this.dataPointIndex=o-1)}if(0!==e){const t=this._getDataPointCount(this.seriesIndex);let i=this.dataPointIndex+e;i<0&&(i=s?t-1:0),i>=t&&(i=s?0:t-1),this.dataPointIndex=i,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const t=this.w,e=this.seriesIndex,i=this._getDataPointCount(e);let s=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<i&&null===t.seriesData.series[e][s];)s=(s+1)%i,a++;this.dataPointIndex=s}}_skipNullBackward(){const t=this.w,e=this.seriesIndex,i=this._getDataPointCount(e);let s=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<i&&null===t.seriesData.series[e][s];)s=(s-1+i)%i,a++;this.dataPointIndex=s}}_showCurrentPoint(){const{seriesIndex:t,dataPointIndex:e}=this,i=this.w,s=i.globals.tooltip;s&&s.ttItems&&(i.interact.capturedSeriesIndex=t,i.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,s))}_hideFocus(){const t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const i=e.getElTooltip();i&&(i.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&i.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");const s=e.getElXCrosshairs();s&&s.classList.remove("apexcharts-active")}_showTooltip(t,e,i){const s=this.w,a=s.config.chart.type,r=i.getElTooltip();if(!r)return;const n=i.getCachedDimensions();i.tooltipRect={x:0,y:0,ttWidth:n.ttWidth||0,ttHeight:n.ttHeight||0},this._setSyntheticEvent(t,e,i),s.dom.baseEl.classList.add("apexcharts-tooltip-active"),r.classList.add("apexcharts-active"),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.announcements.enabled&&r.removeAttribute("aria-hidden"),"pie"===a||"donut"===a||"polarArea"===a?this._showTooltipNonAxis(t,e,i,r):"radialBar"===a?this._showTooltipRadialBar(t,e,i,r):"heatmap"===a||"treemap"===a?this._showTooltipHeatTree(t,e,i,r,a):"bar"===a||"candlestick"===a||"boxPlot"===a||"violin"===a||"rangeBar"===a?this._showTooltipBar(t,e,i):this._showTooltipAxisLine(t,e,i)}_setSyntheticEvent(t,e,i){const s=this.w,a=s.config.chart.type;let r=0,n=0;const o=this._getFocusableElement(t,e);if(o){const t=o.getBoundingClientRect();r=t.left+t.width/2,n=t.top+t.height/2}else if(s.globals.pointsArray&&s.globals.pointsArray[t]&&s.globals.pointsArray[t][e]){const a=s.globals.pointsArray[t][e],o=i.getElGrid&&i.getElGrid();if(o){const t=o.getBoundingClientRect();r=t.left+(a[0]||0),n=t.top+(a[1]||0)}}else{const t=s.dom.Paper&&s.dom.Paper.node;if(t){const e=t.getBoundingClientRect();r=e.left+e.width/2,n=e.top+e.height/2}}if(("line"===a||"area"===a||"rangeArea"===a||"scatter"===a||"bubble"===a||"radar"===a)&&s.globals.pointsArray&&s.globals.pointsArray[t]&&s.globals.pointsArray[t][e]){const a=s.globals.pointsArray[t][e],o=i.getElGrid&&i.getElGrid();if(o){const t=o.getBoundingClientRect();r=t.left+(a[0]||0),n=t.top+(a[1]||0)}}i.e={type:"mousemove",clientX:r,clientY:n}}_showTooltipBar(t,e,i){var s,a,r,n;const o=this.w,l=i.tConfig.shared&&(i.tooltipUtil.isXoverlap(e)||o.globals.isBarHorizontal)&&i.tooltipUtil.isInitialSeriesSameLen(),h=null==(n=null==(r=null==(a=null==(s=o.rangeData.seriesRange)?void 0:s[t])?void 0:a[e])?void 0:r.y)?void 0:n[0];i.tooltipLabels.drawSeriesTexts(u(d(d({ttItems:i.ttItems,i:t,j:e},void 0!==(null==h?void 0:h.y1)&&{y1:h.y1}),void 0!==(null==h?void 0:h.y2)&&{y2:h.y2}),{shared:l}));const c=`.apexcharts-series[data\\:realIndex='${t}']`,p=o.dom.Paper.findOne(`${c} path[j='${e}'], ${c} circle[j='${e}'], ${c} rect[j='${e}']`);if(p){this._leaveHoveredBar();new D(this.w,this.ctx).pathMouseEnter(p,null),this._hoveredBarEl=p}if(o.globals.isBarHorizontal){const t=p&&p.node;if(t){const e=o.dom.elWrap.getBoundingClientRect(),s=t.getBoundingClientRect(),a=s.left-e.left,r=s.top-e.top,n=s.height,l=s.width,h=i.tooltipRect.ttWidth||0,c=r+n/2-(i.tooltipRect.ttHeight||0)/2;let d=a+l;a<(i.xyRatios&&null!=i.xyRatios.baseLineInvertedY?i.xyRatios.baseLineInvertedY:e.width/2)&&(d=a-h);const u=i.getElTooltip();u&&(u.style.left=d+"px",u.style.top=c+"px")}}else i.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,i){const s=this.w,a=s.config.chart.type,r=i.tConfig.shared&&i.tooltipUtil.isXoverlap(e)&&i.tooltipUtil.isInitialSeriesSameLen();i.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:t,j:e,shared:r});const n="scatter"===a||"bubble"===a,o=s.globals.markers.largestSize>0&&!s.globals.markers.batched;n?this._showScatterBubblePoint(t,e,i):o?r?i.marker.enlargePoints(e):i.tooltipPosition.moveDynamicPointOnHover(e,t):r?i.tooltipPosition.moveDynamicPointsOnHover(e):i.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,i){const s=this.w.dom.baseEl;this._enlargedScatterMarker&&(i.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const a=s.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;const r=a.querySelector(`.apexcharts-marker[rel='${e}']`);r&&(i.marker.enlargeCurrentPoint(e,r),this._enlargedScatterMarker=r)}_showTooltipNonAxis(t,e,i,s){const a=this.w;i.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:e,shared:!1});const r=s.getBoundingClientRect(),n=r.width||i.tooltipRect.ttWidth||0,o=r.height||i.tooltipRect.ttHeight||0,l=a.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`),h=i.getSliceAnchor(l);h&&(s.style.left=h.x-n/2+"px",s.style.top=h.y-o-10+"px")}_showTooltipRadialBar(t,e,i,s){var a;const r=this.w;i.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:t,shared:!1});const{ttWidth:n=0,ttHeight:o=0}=i.getCachedDimensions(),l=r.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(l){const e=parseFloat(null!=(a=l.getAttribute("data:angle"))?a:"")||0,i=(r.config.plotOptions.radialBar.startAngle||0)+e/2,h=r.layout.gridWidth/2,c=r.layout.gridHeight/2,d=r.globals.radialSize||Math.min(r.layout.gridWidth,r.layout.gridHeight)/2,u=r.seriesData.series.length,p=d/Math.max(u,1),g=d-t*p,f=(g+(g-p))/2,m=Vt.polarToCartesian(h,c,f,i),x=m.x+(r.layout.translateX||0),b=m.y+(r.layout.translateY||0);s.style.left=x-n/2+"px",s.style.top=b-o-10+"px"}}_showTooltipHeatTree(t,e,i,s,a){var r,n;const o=this.w;i.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:t,j:e,shared:!1});const l=s.getBoundingClientRect(),h=l.width||i.tooltipRect.ttWidth||0,c=l.height||i.tooltipRect.ttHeight||0,d="heatmap"===a?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",u=o.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(u){const t=o.dom.elWrap.getBoundingClientRect(),e=u.getBoundingClientRect(),a=e.left-t.left,l=e.top-t.top,d=e.width,p=e.height,g=parseFloat(null!=(r=u.getAttribute("cx"))?r:""),f=parseFloat(null!=(n=u.getAttribute("width"))?n:"");i.tooltipPosition.moveXCrosshairs(g+f/2);let m=a+d+h/2;const x=l+p/2-c/2;a+d>o.layout.gridWidth/2&&(m=a-h/2),s.style.left=m+"px",s.style.top=x+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const i=this._getFocusableElement(t,e)||this._getBatchedFocusEl(t);if(i){i.classList.add("apexcharts-keyboard-focused"),i.setAttribute("role","img");const s=this._buildPointLabel(t,e);s&&i.setAttribute("aria-label",s),this._focusedEl=i}}_getBatchedFocusEl(t){return this.w.globals.markers.batched?this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`):null}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl.removeAttribute("role"),this._focusedEl.removeAttribute("aria-label"),this._focusedEl=null)}_buildPointLabel(t,e){var i,s,a,r,n,o,l,h;const c=this.w,d=c.config.chart.type,u=c.seriesData.seriesNames||[],p=c.seriesData.series||[];if("pie"===d||"donut"===d||"polarArea"===d){const t=null!=(s=(null==(i=c.labelData)?void 0:i.labels)&&c.labelData.labels[e])?s:"",a=Array.isArray(p)?p[e]:"";return t?`${t}: ${a}`:`${a}`}if("radialBar"===d){return`${u[t]||`Series ${t+1}`}: ${Array.isArray(p)?p[t]:""}`}const g=u[t]||`Series ${t+1}`,f=(Array.isArray(p[t])?p[t]:[])[e];let m=null==f?"":String(f);const x=null==(r=null==(a=c.formatters)?void 0:a.yLabelFormatters)?void 0:r[t];if("function"===typeof x)try{m=x(f,{seriesIndex:t,dataPointIndex:e,w:c})}catch(v){}let b="";const y=null==(n=c.labelData)?void 0:n.categoryLabels,w=null==(l=null==(o=c.seriesData)?void 0:o.seriesX)?void 0:l[t];if(Array.isArray(y)&&null!=y[e])b=String(y[e]);else if(Array.isArray(w)&&null!=w[e]){const i=null==(h=c.formatters)?void 0:h.xLabelFormatter;if("function"===typeof i)try{b=String(i(w[e],{seriesIndex:t,dataPointIndex:e,w:c}))}catch(v){b=String(w[e])}else b=String(w[e])}return b?`${g}: ${m}, ${b}`:`${g}: ${m}`}_leaveHoveredBar(){if(this._hoveredBarEl){new D(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null}}_getFocusableElement(t,e){const i=this.w,s=i.config.chart.type,a=i.dom.baseEl;if("pie"===s||"donut"===s||"polarArea"===s)return a.querySelector(`.apexcharts-pie-area[j='${e}']`);if("heatmap"===s)return a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`);if("treemap"===s)return a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`);if("radialBar"===s)return a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if("bar"===s||"candlestick"===s||"boxPlot"===s||"violin"===s||"rangeBar"===s)return a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`);return a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const t=this.w.globals.tooltip;if(!t)return;t.markerClick({type:"mouseup",clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){const t=this.w,e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e?1:t.seriesData.series.length}_getDataPointCount(t){const e=this.w,i=e.config.chart.type;if("pie"===i||"donut"===i||"polarArea"===i)return e.seriesData.series.length;const s=e.seriesData.series;return s[t]&&Array.isArray(s[t])?s[t].length:0}_clampCursor(){const t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);const e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const t=this.w,e=t.globals,i=this.seriesIndex;if(!t.interact.zoomed)return;const s=t.seriesData.seriesX&&t.seriesData.seriesX[i];if(!s||!s.length)return;const a=e.minX,r=e.maxX;if(void 0===a||void 0===r)return;const n=s[this.dataPointIndex];if(n>=a&&n<=r)return;const o=s.length;for(let l=0;l<o;l++)if(s[l]>=a&&s[l]<=r)return void(this.dataPointIndex=l)}_snapToVisibleRangeInDirection(t){const e=this.w,i=e.globals,s=this.seriesIndex,a=e.seriesData.seriesX&&e.seriesData.seriesX[s];if(!a||!a.length)return;const r=i.minX,n=i.maxX;if(void 0===r||void 0===n)return;const o=a.length;if(t>=0){for(let l=0;l<o;l++)if(a[l]>=r&&a[l]<=n)return void(this.dataPointIndex=l)}else for(let l=o-1;l>=0;
1l--)if(a[l]>=r&&a[l]<=n)return void(this.dataPointIndex=l)}_isDataPointVisible(t,e){const i=this.w,s=i.globals;if(!i.interact.zoomed)return!0;const a=i.seriesData.seriesX&&i.seriesData.seriesX[t];if(!a)return!0;const r=a[e];return void 0===r||r>=s.minX&&r<=s.maxX}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const i=e.dom.baseEl;if(!i)return;const s=i.querySelector(".apexcharts-sr-status");s&&(s.textContent="",setTimeout((()=>{s.textContent=t}),0))}}});const ye=new Set(["bar","funnel","pyramid","histogram"]),we=new Set(["pie","donut","polarArea","radialBar","gauge"]),ve=new Set(["unit","waffle"]),Ae=new Set(["treemap","sunburst"]),_e=new Set(["boxPlot","violin"]),Se=1500;function Ce(t){return ye.has(t)?"bar":we.has(t)?"radial":ve.has(t)?"unit":Ae.has(t)?"partition":_e.has(t)?"summary":null}s.ZP.registerFeatures({morphTypeChange:class{constructor(t,e){this.w=t,this.ctx=e,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(t,e){if(t===e)return!1;const i=Ce(t),s=Ce(e);return!(!i||!s)&&("partition"===i===("partition"===s)||"unit"!==i&&"unit"!==s)}isCompatibleSeriesShape(t,e,i){if(!Array.isArray(i)||0===i.length)return!1;const s=Ce(t),a=Ce(e);return"unit"===a?!!i.every((t=>"number"===typeof t))||i.every((t=>t&&"object"===typeof t&&Array.isArray(t.data))):"partition"===a||("radial"===a?!!i.every((t=>"number"===typeof t))||1===i.length&&i[0]&&"object"===typeof i[0]&&Array.isArray(i[0].data):"bar"===a||"summary"===a?i.every((t=>t&&"object"===typeof t&&Array.isArray(t.data))):null!==s&&null!==a)}captureBeforeDestroy({fromType:t,toType:e,newSeries:i}){if(this._snapshot=null,this._removeGhost(),this._cancelPieces(),!Yt.isBrowser())return!1;const s=this.w.config.chart.animations;if(!s||!1===s.enabled)return!1;if(s.chartTypeMorph&&!1===s.chartTypeMorph.enabled)return!1;if(s.respectReducedMotion&&x())return!1;if(!this.canMorphTypes(t,e))return!1;if(!this.isCompatibleSeriesShape(t,e,i))return!1;const{marks:a,branches:r,unitDots:n}=this._captureFromDOM(t);if(!a.length)return!1;const o=this._buildMapping(a,t,e,i,r);if(0===o.size)return!1;this._snapshot={fromType:t,toType:e,mapping:o,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};const l=Ce(t),h=Ce(e),c=this._canProbePaths();if("unit"===h&&("bar"===l||"summary"===l||"radial"===l&&c)){const t=this._countUnitSeries(i);this._snapshot.pieceOut=t>0&&t<=Se}else if("unit"===l&&("bar"===h||"summary"===h||"radial"===h&&c)){let t=0;if(n.forEach((e=>{t+=e.length})),t>0&&t<=Se){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=n;const t=[];"radial"===h?(Array.isArray(i)?i:[]).forEach(((e,i)=>{t.push(`${i}:0`)})):(Array.isArray(i)?i:[]).forEach(((e,i)=>{const s=e&&Array.isArray(e.data)?e.data:[];for(let a=0;a<s.length;a++)t.push(`${i}:${a}`)})),this._snapshot.keyOrder=t}}return!this._needsGhost(t,e)||this._snapshot.pieceOut||this._snapshot.pieceIn||this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(t,e){return"unit"===Ce(t)||"unit"===Ce(e)}_captureGhost(){var t,e;const i=null==(t=this.w.dom)?void 0:t.Paper,s=i&&i.node;if(!s||"function"!==typeof s.cloneNode)return;const a=s.cloneNode(!0),r=[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text",".apexcharts-annotations",".apexcharts-zoom-rect",".apexcharts-selection-rect",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs"];"function"===typeof a.querySelectorAll&&r.forEach((t=>{a.querySelectorAll(t).forEach((t=>{t.parentNode&&t.parentNode.removeChild(t)}))})),"function"===typeof a.querySelectorAll&&a.querySelectorAll("[id]").forEach((t=>{t.removeAttribute("id")})),null==(e=a.removeAttribute)||e.call(a,"id"),this._ghost=a}_mountGhost(){var t,e,i;const s=this._ghost;if(!s||!Yt.isBrowser())return;const a=null==(t=this.w.dom)?void 0:t.elWrap;if(!a||"function"!==typeof a.appendChild)return void(this._ghost=null);const r=s.style;r&&(r.position="absolute",r.left="0",r.top="0",r.background="transparent",r.pointerEvents="none",r.opacity="1"),null==(e=s.setAttribute)||e.call(s,"aria-hidden","true"),null==(i=s.setAttribute)||i.call(s,"class","apexcharts-morph-ghost"),a.appendChild(s);const n=this.getSpeed(),o=Math.max(120,Math.round(.55*n));ut.requestAnimationFrame((()=>{r&&(r.transition=`opacity ${o}ms ease-in`,r.opacity="0")})),setTimeout((()=>this._removeGhost()),o+60)}_removeGhost(){const t=this._ghost;this._ghost=null,t&&t.parentNode&&t.parentNode.removeChild(t)}_countUnitSeries(t){if(!Array.isArray(t))return 0;let e=0;for(const i of t){if(!i||"object"!==typeof i||!Array.isArray(i.data))return 0;e+=i.data.length}return e}usesPieceTakeover(){return!(!this._snapshot||!this._snapshot.pieceOut)}claimsTargetMark(t,e){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${t}:${e}`))}_makePieceLayer(){var t,e;const i=null==(t=this.w.dom)?void 0:t.elGraphical,s=i&&i.node;if(!s||"function"!==typeof s.appendChild)return null;const a=ut.createElementNS("http://www.w3.org/2000/svg","g");if(!a)return null;a.setAttribute("class","apexcharts-morph-pieces"),a.setAttribute("pointer-events","none");const r=null==(e=this.w.globals)?void 0:e.cuid;return r&&a.setAttribute("clip-path",`url(#gridRectBarMask${r})`),s.appendChild(a),this._pieceLayer=a,a}_revealPieceHidden(){var t;const e=null==(t=this.w.globals.dom)?void 0:t.baseEl;e&&"function"===typeof e.querySelectorAll&&e.querySelectorAll("[data-piece-hidden]").forEach((t=>
1{t.removeAttribute("opacity"),t.removeAttribute("data-piece-hidden")}))}_cancelPieces(){this._pieceCancel&&(this._pieceCancel(),this._pieceCancel=null);const t=this._pieceLayer;this._pieceLayer=null,t&&t.parentNode&&t.parentNode.removeChild(t),this._revealPieceHidden()}_canProbePaths(){if(!Yt.isBrowser())return!1;const t=ut.createElementNS("http://www.w3.org/2000/svg","path");return!!t&&"function"===typeof t.isPointInFill}_makeExtentProber(t,e,i){const s=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",t),s.setAttribute("fill","#000"),s.setAttribute("stroke","#000"),s.setAttribute("stroke-width","3"),s.setAttribute("visibility","hidden"),i.appendChild(s);const a=s.ownerSVGElement;if("function"!==typeof s.isPointInFill||!a||"function"!==typeof a.createSVGPoint)return i.removeChild(s),null;const r=a.createSVGPoint(),n=(t,e)=>{r.x=t,r.y=e;const i=s;return i.isPointInFill(r)||"function"===typeof i.isPointInStroke&&i.isPointInStroke(r)},o=48;return{intervalsAt:(t,i,s)=>{const a=s?e.y:e.x,r=a+(s?e.height:e.width);if(!(r>a))return null;const l=(t,e)=>s?n(e,t):n(t,e),h=[t+.1*(i-t),(t+i)/2,i-.1*(i-t)],c=(t,e,i)=>{let s=e,a=t;for(let r=0;r<6;r++){const t=(s+a)/2;l(t,i)?a=t:s=t}return(s+a)/2},d=(r-a)/o,u=new Array(49).fill(null);let p=!1;for(const e of h)for(let t=0;t<=o;t++)null===u[t]&&l(a+t*d,e)&&(u[t]=e,p=!0);if(!p)return null;const g=[];let f=-1;for(let e=0;e<=49;e++){const t=e<=o&&null!==u[e];if(t&&f<0&&(f=e),!t&&f>=0){const t=e-1,i=u[f],s=0===f?a:c(a+f*d,a+(f-1)*d,i),n=t===o?r:c(a+t*d,a+(t+1)*d,u[t]);n>s&&g.push([s,n]),f=-1}}return g.length?g:null},dispose:()=>{s.parentNode&&s.parentNode.removeChild(s)}}}_separatePieces(){var t;const e=this._snapshot,i=null==(t=this.w.globals.dom)?void 0:t.baseEl;if(!e||!i)return this._revealPieceHidden();const s=new Map;let a=0;if(i.querySelectorAll(".apexcharts-unit-area").forEach((t=>{var e,i,r,n,o,l,h;const c=parseInt(null!=(e=t.getAttribute("i"))?e:"",10);if(isNaN(c))return;const d=t.getAttribute("cx");let u,p,g=3;if(null!=d)u=parseFloat(d),p=parseFloat(null!=(i=t.getAttribute("cy"))?i:""),g=parseFloat(null!=(r=t.getAttribute("r"))?r:"3")||3;else{const e=parseFloat(null!=(n=t.getAttribute("width"))?n:"0")||0,i=parseFloat(null!=(o=t.getAttribute("height"))?o:"0")||0;u=parseFloat(null!=(l=t.getAttribute("x"))?l:"")+e/2,p=parseFloat(null!=(h=t.getAttribute("y"))?h:"")+i/2,g=Math.max(e,i)/2||3}if(!isFinite(u)||!isFinite(p))return;let f=s.get(c);f||(f=[],s.set(c,f)),f.push({el:t,x:u,y:p,r:g,fill:t.getAttribute("fill")}),a++})),0===a||a>Se)return this._revealPieceHidden();const r=this._makePieceLayer();if(!r)return this._revealPieceHidden();const n=[],o=r.ownerDocument,l=Ce(e.fromType),h="summary"===l||"radial"===l;if(Array.from(s.keys()).sort(((t,e)=>t-e)).forEach((t=>{var i;const a=s.get(t),l=this.getInitialBBoxFor(t),c=e.mapping.get(`${t}:0`);if(!l||!c)return void a.forEach((t=>{t.el.removeAttribute("opacity"),t.el.removeAttribute("data-piece-hidden")}));const d=c.fill&&0!==c.fill.indexOf("url(")?c.fill:(null==(i=this.w.globals.colors)?void 0:i[t])||a[0].fill;let u=null;if(h){const e=this.getInitialPathFor(t,0);e&&(u=this._makeExtentProber(e,l,r))}const p=u?pe(l,a.length,u.intervalsAt):ue(l,a.length);u&&u.dispose();const g=fe(p,(t=>[t.x+t.width/2,t.y+t.height/2])),f=fe(a,(t=>[t.x,t.y]));for(let e=0;e<f.length;e++){const i=g[e],s=f[e],a=o.createElementNS("http://www.w3.org/2000/svg","rect");a.setAttribute("data-i",String(t)),a.setAttribute("x",String(i.x)),a.setAttribute("y",String(i.y)),a.setAttribute("width",String(i.width)),a.setAttribute("height",String(i.height)),a.setAttribute("rx","0"),a.setAttribute("fill",String(d)),r.appendChild(a),n.push({el:a,from:{x:i.x,y:i.y,width:i.width,height:i.height,rx:0},to:{x:s.x-s.r,y:s.y-s.r,width:2*s.r,height:2*s.r,rx:s.r},fill:xe(d,s.fill),fillEnd:s.fill,delay:0,meta:{dotEl:s.el}})}})),!n.length)return this._cancelPieces();this._runPieces(n,(t=>{const e=t.meta.dotEl;e.removeAttribute("opacity"),e.removeAttribute("data-piece-hidden"),t.el.parentNode&&t.el.parentNode.removeChild(t.el)}))}_combinePieces(){var t,e;const i=this._snapshot,s=null==(t=this.w.globals.dom)?void 0:t.baseEl;if(!i||!i.sourceDots||!i.keyOrder||!s)return this._revealPieceHidden();const a=this._collectTargetMarks(i.toType);if(!a.size)return this._revealPieceHidden();const r=i.oldLayout.translateX-(this.w.layout.translateX||0),n=i.oldLayout.translateY-(this.w.layout.translateY||0),o=Array.from(i.sourceDots.keys()).sort(((t,e)=>t-e)),l=this._makePieceLayer();if(!l)return this._revealPieceHidden();const h=l.ownerDocument,c=[],d=Ce(i.toType),u="summary"===d||"radial"===d;for(let p=0;p<o.length;p++){const t=i.sourceDots.get(o[p]),s=i.keyOrder[p],d=s?a.get(s):null;
1if(!d||!t||!t.length){d&&d.els.forEach((t=>{t.removeAttribute("opacity"),t.removeAttribute("data-piece-hidden")}));continue}const g=d.fill&&0!==d.fill.indexOf("url(")?d.fill:(null==(e=this.w.globals.colors)?void 0:e[d.realIndex])||t[0].fill;let f=null;if(u){const t=d.d||d.els.map((t=>t.getAttribute("pathTo")||t.getAttribute("d"))).filter(Boolean).join(" ");t&&(f=this._makeExtentProber(t,d.bbox,l))}const m=f?pe(d.bbox,t.length,f.intervalsAt):ue(d.bbox,t.length);f&&f.dispose();const x=fe(m,(t=>[t.x+t.width/2,t.y+t.height/2])),b=fe(t,(t=>[t.x,t.y])),y={remaining:b.length,els:d.els,tiles:[]};for(let e=0;e<b.length;e++){const t=b[e],i=x[e],a=h.createElementNS("http://www.w3.org/2000/svg","rect"),o=t.x+r-t.r,d=t.y+n-t.r;a.setAttribute("data-key",s),a.setAttribute("x",String(o)),a.setAttribute("y",String(d)),a.setAttribute("width",String(2*t.r)),a.setAttribute("height",String(2*t.r)),a.setAttribute("rx",String(t.r)),a.setAttribute("fill",String(t.fill||g)),l.appendChild(a),y.tiles.push(a),c.push({el:a,from:{x:o,y:d,width:2*t.r,height:2*t.r,rx:t.r},to:{x:i.x,y:i.y,width:i.width,height:i.height,rx:0},fill:xe(t.fill,g),fillEnd:String(g),delay:0,meta:{markState:y}})}}if(!c.length)return this._cancelPieces();this._runPieces(c,(t=>{const e=t.meta.markState;e.remaining--,0===e.remaining&&(e.els.forEach((t=>{t.removeAttribute("opacity"),t.removeAttribute("data-piece-hidden")})),e.tiles.forEach((t=>{t.parentNode&&t.parentNode.removeChild(t)})))}))}_runPieces(t,e){const i=this.getSpeed(),s=Math.min(300,.35*i),a=Math.max(180,i-s);for(let r=0;r<t.length;r++)t[r].delay=t.length>1?r/(t.length-1)*s:0;this._pieceCancel=function({pieces:t,duration:e,onPieceDone:i,onAllDone:s}){let a=!1;const r=Date.now(),n=Math.max(1,e),o=(t,e)=>{const i=t.from,s=t.to,a=t.el;a.setAttribute("x",String(i.x+(s.x-i.x)*e)),a.setAttribute("y",String(i.y+(s.y-i.y)*e)),a.setAttribute("width",String(Math.max(0,i.width+(s.width-i.width)*e))),a.setAttribute("height",String(Math.max(0,i.height+(s.height-i.height)*e))),a.setAttribute("rx",String(Math.max(0,i.rx+(s.rx-i.rx)*e))),t.fill?a.setAttribute("fill",t.fill(e)):e>=1&&t.fillEnd&&a.setAttribute("fill",t.fillEnd)},l=()=>{if(a)return;const e=Date.now()-r;let h=!1;for(let s=0;s<t.length;s++){const a=t[s];if(a._done)continue;const r=(e-a.delay)/n;if(r<1&&(h=!0),r<=0)continue;const l=Math.min(1,r);o(a,be(l)),l>=1&&(a._done=!0,i&&i(a))}h?ut.requestAnimationFrame(l):s&&s()};return ut.requestAnimationFrame(l),()=>{a=!0}}({pieces:t,duration:a,onPieceDone:e,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(t){var e;const i=null==(e=this.w.globals.dom)?void 0:e.baseEl,s=new Map;if(!i)return s;const a=Ce(t);if("radial"===a)return i.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach(((t,e)=>{const i=t.getAttribute("data:pathFinal")||t.getAttribute("d");if(!i||!i.trim())return;const a=this._pathBBox(i);a&&s.set(`${e}:0`,{realIndex:e,j:0,d:i,bbox:{x:a.minX,y:a.minY,width:a.maxX-a.minX,height:a.maxY-a.minY},fill:t.getAttribute("fill"),els:[t]})})),s;const r="summary"===a?`.apexcharts-${t}-series`:".apexcharts-bar-series";return i.querySelectorAll(`${r} .apexcharts-series`).forEach((t=>{var e;const i=parseInt(null!=(e=t.getAttribute("data:realIndex"))?e:"0",10)||0;let a=0;t.querySelectorAll("path[pathTo]").forEach((t=>{var e;const r=t.getAttribute("pathTo")||t.getAttribute("d");if(!r||!r.trim())return;const n=parseInt(null!=(e=t.getAttribute("j"))?e:"",10),o=isNaN(n)?a++:n,l=this._pathBBox(r);if(!l)return;const h=`${i}:${o}`,c=s.get(h);c?(c.els.push(t),c.bbox={x:Math.min(c.bbox.x,l.minX),y:Math.min(c.bbox.y,l.minY),width:Math.max(c.bbox.x+c.bbox.width,l.maxX)-Math.min(c.bbox.x,l.minX),height:Math.max(c.bbox.y+c.bbox.height,l.maxY)-Math.min(c.bbox.y,l.minY)}):s.set(h,{realIndex:i,j:o,bbox:{x:l.minX,y:l.minY,width:l.maxX-l.minX,height:l.maxY-l.minY},fill:t.getAttribute("fill"),els:[t]})}))})),s}_captureFromDOM(t){var e;const i=null==(e=this.w.globals.dom)?void 0:e.baseEl;if(!i)return{marks:[],branches:[],unitDots:new Map};const s=[],a=[],r=new Map,n=Ce(t);if("bar"===n){i.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach((t=>{var e;const i=parseInt(null!=(e=t.getAttribute("data:realIndex"))?e:"0",10);t.querySelectorAll("path[pathTo]").forEach(((t,e)=>{const a=t.getAttribute("pathTo")||t.getAttribute("d");a&&s.push({realIndex:i,j:e,d:a,fill:t.getAttribute("fill")})}))}))}else if("summary"===n){const e=new Map;i.querySelectorAll(`.apexcharts-${t}-area`).forEach((t=>{var i,s;const a=parseInt(null!=(i=t.getAttribute("j"))?i:"",10);if(isNaN(a))return;const r=t.getAttribute("pathTo")||t.getAttribute("d");if(!r||!r.trim())return;const n="function"===typeof t.closest?t.closest(".apexcharts-series"):null,o=parseInt(null!=(s=null==n?void 0:n.getAttribute("data:realIndex"))?s:"0",10)||0,l=`${o}:${a}`,h=e.get(l);h?h.d+=` ${r}`:e.set(l,{realIndex:o,j:a,d:r,fill:t.getAttribute("fill")})})),Array.from(e.values()).sort(((t,e)=>
1t.realIndex-e.realIndex||t.j-e.j)).forEach((t=>s.push(t)))}else if("partition"===n)if("treemap"===t){const t=t=>{var e,i,s,a;const r=parseFloat(null!=(e=t.getAttribute("x"))?e:""),n=parseFloat(null!=(i=t.getAttribute("y"))?i:""),o=parseFloat(null!=(s=t.getAttribute("width"))?s:""),l=parseFloat(null!=(a=t.getAttribute("height"))?a:"");return[r,n,o,l].every((t=>isFinite(t)))?`M ${r} ${n} L ${r+o} ${n} L ${r+o} ${n+l} L ${r} ${n+l} Z`:null};i.querySelectorAll(".apexcharts-treemap-rect").forEach((e=>{var i,a;const r=t(e);r&&s.push({realIndex:parseInt(null!=(i=e.getAttribute("i"))?i:"0",10)||0,j:parseInt(null!=(a=e.getAttribute("j"))?a:"0",10)||0,d:r,fill:e.getAttribute("fill"),key:e.getAttribute("data:key")||null})}));i.querySelectorAll(".apexcharts-treemap-parent-rect").forEach((e=>{const i=t(e),s=e.getAttribute("data:key");i&&s&&a.push({key:s,d:i,fill:e.getAttribute("fill")})}))}else{const t=i.querySelectorAll(".apexcharts-sunburst-arc"),e=[];t.forEach((t=>{"true"===t.getAttribute("data:leaf")&&e.push(t)}));(e.length?e:Array.from(t)).forEach(((t,e)=>{const i=t.getAttribute("d");i&&i.trim()&&s.push({realIndex:e,j:0,d:i,fill:t.getAttribute("fill"),key:t.getAttribute("data:key")||null})})),t.forEach((t=>{if("true"===t.getAttribute("data:leaf"))return;const e=t.getAttribute("d"),i=t.getAttribute("data:key");e&&e.trim()&&i&&a.push({key:i,d:e,fill:t.getAttribute("fill")})}))}else if("unit"===n){const t=i.querySelectorAll(".apexcharts-unit-area"),e=new Map;t.forEach((t=>{var i,s,a,n,o,l,h;const c=parseInt(null!=(i=t.getAttribute("i"))?i:"",10);if(isNaN(c))return;const d=t.getAttribute("cx");let u,p,g=3;if(null!=d)u=parseFloat(d),p=parseFloat(null!=(s=t.getAttribute("cy"))?s:""),g=parseFloat(null!=(a=t.getAttribute("r"))?a:"3")||3;else{const e=parseFloat(null!=(n=t.getAttribute("width"))?n:"0")||0,i=parseFloat(null!=(o=t.getAttribute("height"))?o:"0")||0;u=parseFloat(null!=(l=t.getAttribute("x"))?l:"")+e/2,p=parseFloat(null!=(h=t.getAttribute("y"))?h:"")+i/2,g=Math.max(e,i)/2||3}if(!isFinite(u)||!isFinite(p))return;let f=r.get(c);f||(f=[],r.set(c,f)),f.push({x:u,y:p,r:g,fill:t.getAttribute("fill")});const m=e.get(c);m?(u<m.minX&&(m.minX=u),u>m.maxX&&(m.maxX=u),p<m.minY&&(m.minY=p),p>m.maxY&&(m.maxY=p)):e.set(c,{minX:u,minY:p,maxX:u,maxY:p,fill:t.getAttribute("fill")})})),Array.from(e.keys()).sort(((t,e)=>t-e)).forEach((t=>{const i=e.get(t),a=i.minX-2,r=i.minY-2,n=i.maxX+2,o=i.maxY+2;s.push({realIndex:t,j:0,d:`M ${a} ${r} L ${n} ${r} L ${n} ${o} L ${a} ${o} Z`,fill:i.fill})}))}else if("radial"===n)if("radialBar"===t||"gauge"===t){const t=this.w.layout.gridWidth/2,e=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;i.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach((i=>{var a;const r=i.parentElement,n=parseInt(null!=(a=null==r?void 0:r.getAttribute("data:realIndex"))?a:"0",10),o=i.getAttribute("d");if(!o)return;const l=parseFloat(i.getAttribute("stroke-width")||"0"),h=l>1&&this._radialArcToFilledSegment(o,l,t,e)||o;s.push({realIndex:n,j:0,d:h,fill:i.getAttribute("stroke")})}))}else{i.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach(((t,e)=>{const i=t.getAttribute("d");i&&s.push({realIndex:e,j:0,d:i,fill:t.getAttribute("fill")})}))}return{marks:s,branches:a,unitDots:r}}_radialArcToFilledSegment(t,e,i,s){const a=t.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!a)return null;const r=parseFloat(a[1]),n=parseFloat(a[2]),o=parseFloat(a[3]),l=parseInt(a[4],10),h=parseInt(a[5],10),c=parseFloat(a[6]),d=parseFloat(a[7]);if(!isFinite(o)||o<=0)return null;const u=e/2,p=o+u,g=Math.max(0,o-u),f=(t,e,a)=>{const r=t-i,n=e-s,o=Math.sqrt(r*r+n*n);if(0===o)return{x:i,y:s};const l=a/o;return{x:i+r*l,y:s+n*l}},m=f(r,n,p),x=f(c,d,p),b=f(r,n,g),y=f(c,d,g),w=h?0:1;return`M ${m.x} ${m.y} A ${p} ${p} 0 ${l} ${h} ${x.x} ${x.y} L ${y.x} ${y.y} A ${g} ${g} 0 ${l} ${w} ${b.x} ${b.y} Z`}buildRingSegmentPath(t,e,i,s,a,r){const n=s/2,o=i+n,l=Math.max(0,i-n),h=(a-90)*Math.PI/180,c=(r-90)*Math.PI/180,d=t+o*Math.cos(h),u=e+o*Math.sin(h),p=t+o*Math.cos(c),g=e+o*Math.sin(c),f=t+l*Math.cos(h),m=e+l*Math.sin(h),x=t+l*Math.cos(c),b=e+l*Math.sin(c),y=r>a?1:0,w=Math.abs(r-a)>180?1:0;return`M ${d} ${u} A ${o} ${o} 0 ${w} ${y} ${p} ${g} L ${x} ${b} A ${l} ${l} 0 ${w} ${1-y} ${f} ${m} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(t,e,i,s,a){const r=new Map,n=Ce(i),o=t.slice().sort(((t,e)=>t.realIndex-e.realIndex||t.j-e.j));if("partition"===n&&a&&a.length){const t=o.filter((t=>t.key));t.length===o.length&&(t.forEach((t=>{r.set(`key:${t.key}`,{d:t.d,fill:t.fill})})),a.forEach((t=>{r.set(`key:${t.key}`,{d:t.d,fill:t.fill})})))}if("radial"===n||"unit"===n||"partition"===n)return o.forEach(((t,e)=>{r.set(`${e}:0`,{d:t.d,fill:t.fill})})),r;if("bar"===n||"summary"===n){const t=[];
1return(Array.isArray(s)?s:[]).forEach(((e,i)=>{const s=e&&Array.isArray(e.data)?e.data:[];for(let a=0;a<s.length;a++)t.push({realIndex:i,j:a})})),o.forEach(((e,i)=>{const s=t[i];s&&r.set(`${s.realIndex}:${s.j}`,{d:e.d,fill:e.fill})})),r}return r}isActive(){return null!==this._snapshot}getInitialPathFor(t,e){if(!this._snapshot)return null;const i=this._snapshot.mapping.get(`${t}:${e}`);if(!i)return null;const s=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return 0===s&&0===a?i.d:this._translatePathD(i.d,s,a)}_translatePathD(t,e,i){if(0===e&&0===i)return t;return mt(t).map((t=>{const s=t[0];return"Z"===s?"Z":"M"===s||"L"===s||"T"===s?`${s} ${t[1]+e} ${t[2]+i}`:"H"===s?`${s} ${t[1]+e}`:"V"===s?`${s} ${t[1]+i}`:"C"===s?`${s} ${t[1]+e} ${t[2]+i} ${t[3]+e} ${t[4]+i} ${t[5]+e} ${t[6]+i}`:"S"===s||"Q"===s?`${s} ${t[1]+e} ${t[2]+i} ${t[3]+e} ${t[4]+i}`:"A"===s?`${s} ${t[1]} ${t[2]} ${t[3]} ${t[4]} ${t[5]} ${t[6]+e} ${t[7]+i}`:t.join(" ")})).join(" ")}getInitialCenterFor(t){const e=this.getInitialBBoxFor(t);return e?{x:e.x+e.width/2,y:e.y+e.height/2}:null}getInitialPathAt(t){return this.getInitialPathFor(t,0)}getInitialPathForKey(t){return this._snapshot&&t?this.getInitialPathFor("key",t):null}hasKeyedMarks(){if(!this._snapshot)return!1;for(const t of this._snapshot.mapping.keys())if("string"===typeof t&&t.startsWith("key:"))return!0;return!1}getInitialSlotFor(t,e,i){const s=this.getInitialBBoxFor(t);if(!s)return null;const a=s.x+s.width/2,r=s.y+s.height/2;if(!(i>1)||!(e>=0))return{x:a,y:r};const n=(Math.min(e,i-1)+.5)/i;return s.height>=s.width?{x:a,y:s.y+s.height*(1-n)}:{x:s.x+s.width*n,y:r}}getInitialBBoxFor(t){if(!this._snapshot)return null;const e=this._snapshot.mapping.get(`${t}:0`);if(!e)return null;const i=this._pathBBox(e.d);if(!i)return null;const s=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:i.minX+s,y:i.minY+a,width:i.maxX-i.minX,height:i.maxY-i.minY}}_pathBBox(t){const e=mt(t);let i=1/0,s=1/0,a=-1/0,r=-1/0,n=!1;return e.forEach((t=>{const e=t[0];if("Z"===e)return;let o=[];if("H"===e)o=[[t[1],(s+r)/2||t[1]]];else if("V"===e)o=[[(i+a)/2||t[1],t[1]]];else if("A"===e)o=[[t[6],t[7]]];else for(let i=1;i+1<t.length;i+=2)o.push([t[i],t[i+1]]);o.forEach((([t,e])=>{isFinite(t)&&isFinite(e)&&(n=!0,t<i&&(i=t),t>a&&(a=t),e<s&&(s=e),e>r&&(r=e))}))})),n?{minX:i,minY:s,maxX:a,maxY:r}:null}getInitialFillFor(t,e){if(!this._snapshot)return null;const i=this._snapshot.mapping.get(`${t}:${e}`);return i?i.fill:null}getSpeed(){const t=this.w.config.chart.animations;return t.chartTypeMorph&&t.chartTypeMorph.speed||t.speed||600}applyChromeFade(){var t;if(!this._snapshot||!Yt.isBrowser())return;const e=null==(t=this.w.globals.dom)?void 0:t.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();const i=this.getSpeed();[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text"].forEach((t=>{e.querySelectorAll(t).forEach((t=>{t.style&&(t.style.opacity="0",t.style.transition=`opacity ${i}ms ease-out`,ut.requestAnimationFrame((()=>{t.style.opacity="1"})),setTimeout((()=>{t.style.transition="",t.style.opacity=""}),i+80))}))})),setTimeout((()=>this.cleanup()),i+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}}});const ke="http://www.w3.org/1999/xhtml";function Me(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return d(d({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i),e||{})}function Pe(t,e){const i=[".apexcharts-title-text",".apexcharts-subtitle-text"].map((e=>t.dom.baseEl.querySelector(e))).filter((t=>null!==t));if(!i.length)return;const s=t.dom.elWrap.getBoundingClientRect().top;for(let a=0;a<i.length+1;a++){const t=e.getBoundingClientRect(),a=i.find((e=>{const i=e.getBoundingClientRect();return t.left<i.right&&t.right>i.left&&t.top<i.bottom&&t.bottom>i.top}
1));if(!a)break;e.style.top=a.getBoundingClientRect().bottom-s+4+"px"}}function Le(t,e,i,s){var a;const r=null==(a=null==e?void 0:e.dimensions)?void 0:a.dimHelpers,n=r?r.getTitleSubtitleCoords("title").height+r.getTitleSubtitleCoords("subtitle").height:0,o=i.getBoundingClientRect().height||18,l=s&&s.offsetY||0,h=function(t,e){const i=t.layout.translateY||0,s=t.dom.elWrap;if(!s)return i;const a=t.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!a.length)return i;const r=s.getBoundingClientRect().top,n=e.getBoundingClientRect();let o=i;for(let l=0;l<a.length;l++){const t=a[l].getBoundingClientRect();t.height&&(t.left>=n.right||t.right<=n.left||(o=Math.min(o,t.top-r)))}return o}(t,i);if(h-n>=o+1)return i.style.top=`${h-o-1+l}px`,!0;i.style.top=`${n+l}px`;const c="dark"===t.config.theme.mode;return i.style.background=c?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",i.style.borderRadius="4px",!1}function Ie(t){const e=t.dom.elWrap;if(!e)return;const i=e.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i)}const Ee="http://www.w3.org/1999/xhtml";class De{constructor(t,e,i){this.w=t,this.ctx=e,this.drilldown=i}render(t){if(!Yt.isBrowser())return;const e=this.w,i=e.dom.elWrap;if(!i)return;const s=i.querySelector(".apexcharts-breadcrumb");s&&s.parentNode&&s.parentNode.removeChild(s);const a=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!a||!1===a.show)return;if(0===this.drilldown.depth)return;const r=ut.createElementNS(Ee,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label","Drilldown breadcrumb"),this._position(r,a);const n=null!=a.separator?a.separator:" / ";t.forEach(((e,i)=>{if(i>0){const t=ut.createElementNS(Ee,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=n,r.appendChild(t)}const s=this._label(e,i);if(i===t.length-1){const t=ut.createElementNS(Ee,"span");t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=s,r.appendChild(t)}else{const t=ut.createElementNS(Ee,"button");if(t.setAttribute("type","button"),t.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const e=ut.createElementNS(Ee,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",t.appendChild(e)}const e=ut.createElementNS(Ee,"span");e.setAttribute("class","apexcharts-breadcrumb-label"),e.textContent=s,t.appendChild(e),t.addEventListener("click",(()=>this.drilldown.drillToLevel(i))),r.appendChild(t)}})),i.appendChild(r),this.w.globals.axisCharts&&Le(this.w,this.ctx,r,a),this._avoidChromeOverlap(r)}_avoidChromeOverlap(t){const e=this.w,i=[".apexcharts-title-text",".apexcharts-subtitle-text"].map((t=>e.dom.baseEl.querySelector(t))).filter((t=>null!==t));if(!i.length)return;const s=e.dom.elWrap.getBoundingClientRect().top;for(let a=0;a<i.length+1;a++){const e=t.getBoundingClientRect(),a=i.find((t=>{const i=t.getBoundingClientRect();return e.left<i.right&&e.right>i.left&&e.top<i.bottom&&e.bottom>i.top}));if(!a)break;t.style.top=a.getBoundingClientRect().bottom-s+4+"px"}}_label(t,e){const i=this.w.config.drilldown.breadcrumb;let s;if(0===e)s=null!=i.rootLabel?i.rootLabel:"All";else{const e=(this.w.config.drilldown.series||[]).find((e=>e&&e.id===t));s=e&&e.name||String(t)}return"function"===typeof i.formatter?i.formatter(s,{index:e,depth:this.drilldown.depth}):s}_position(t,e){const i=e.offsetX||0,s=e.offsetY||0;t.style.position="absolute",t.style.top=s+"px","top-right"===e.position?t.style.right=3-i+"px":t.style.left=i+"px"}}const Fe="http://www.w3.org/1999/xhtml",Re="apexcharts-drilldown-loading";class ze{constructor(t){this.w=t,this.el=null}_cfg(){const t=this.w.config.drilldown,e=t&&t.loading;return!1===e?{show:!1}:e||{}}show(){if(!Yt.isBrowser())return;const t=this._cfg();if(!1===t.show)return;const e=this.w.dom.elWrap;if(!e)return;this.hide();const i=ut.createElementNS(Fe,"div");i.setAttribute("class",Re),i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-label",t.text||"Loading");const s=ut.createElementNS(Fe,"div");if(s.setAttribute("class",`${Re}-spinner`),s.setAttribute("aria-hidden","true"),i.appendChild(s),t.text){const e=ut.createElementNS(Fe,"span");e.setAttribute("class",`${Re}-text`),e.textContent=t.text,i.appendChild(e)}e.appendChild(i),this.el=i}hide(){const t=this.w.dom.elWrap;if(t){const e=t.querySelectorAll(`.${Re}`);for(let t=0;t<e.length;t++){const i=e[t];i.parentNode&&i.parentNode.removeChild(i)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}}const Te="__apexDrilldownMarker";s.ZP.registerFeatures({drilldown:class{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new De(t,e,this),this.loading=new ze(t),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this.init()}init(){const t=this.w;t.config.drilldown&&t.config.drilldown.enabled&&(this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series))))}get path(){return["root",...this.stack.map((t=>t.id))]}get depth(){return this.stack.length}drillDown(t,e,i){const s=this._resolveChild(t);return s?this._drillInto(s,e,i):"function"===typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(t,e,i):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){const e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);const i=this.path[this.path.length-1],s=0===t?this.rootSnapshot:this.stack[t].restore;this.stack=this.stack.slice(0,t);const a=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(s),"up",{from:i,to:a})}
vendor: 5,529 bytes, line 1
1_resolveChild(t){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find((e=>e&&e.id===t))||null}_drillInto(t,e,i){if(this.stack.length>=32)return console.warn("ApexCharts: drilldown max depth (32) reached."),Promise.resolve(this.ctx);this.rootSnapshot||(this.rootSnapshot=this._snapshot());const s=this.path[this.path.length-1];return this.stack.push({id:t.id,name:t.name,restore:this._snapshot()}),this._apply(this._viewFromChild(t),"down",{from:s,to:t.id,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex})}_drillDownAsync(t,e,i){const s=this.w.config.drilldown.onDrillDown,a=this._cacheGet(t);if(a)return this._drillInto(a,e,i);if(this._pending)return this._pending;let r;this.loading.show();try{r=s({id:t,point:e,seriesIndex:i&&i.seriesIndex,dataPointIndex:i&&i.dataPointIndex})}catch(l){return this.loading.hide(),this._fire("drillDownError",{id:t,error:l}),Promise.resolve(this.ctx)}const n=()=>{this._pending=null,this.loading.hide()},o=Promise.resolve(r).then((s=>{if(n(),this._isDead())return this.ctx;if(!s||!s.data)return this._fire("drillDownError",{id:t,error:new Error(`drilldown: onDrillDown resolved without a drillable level for id "${t}" (expected an object with a \`data\` array).`)}),this.ctx;const a=null!=s.id?s:u(d({},s),{id:t});return this._cacheSet(t,a),this._drillInto(a,e,i)}),(e=>(n(),this._isDead()||this._fire("drillDownError",{id:t,error:e}),this.ctx)));return this._pending=o,o}_isDead(){const t=this.w;return!t||!t.globals||!0===t.globals.isDestroyed}_cacheEnabled(){const t=this.w.config.drilldown;return!(!t||!1===t.cache)}_cacheGet(t){return this._cacheEnabled()&&null!=t&&this._asyncCache.get(t)||null}_cacheSet(t,e){this._cacheEnabled()&&null!=t&&this._asyncCache.set(t,e)}clearCache(t){return null==t?this._asyncCache.clear():this._asyncCache.delete(t),this.ctx}_snapshot(){const t=this.w.config,e=this._overrideFields(),i={series:this._uncollapseSeries(Vt.clone(t.series))};return Array.isArray(t.labels)&&t.labels.length&&(i.labels=Vt.clone(t.labels)),i.chart={type:t.chart.type,stacked:t.chart.stacked},e.has("xaxis")&&(i.xaxis=Vt.clone(t.xaxis)),e.has("yaxis")&&(i.yaxis=Vt.clone(t.yaxis)),e.has("colors")&&(i.colors=t.colors?Vt.clone(t.colors):void 0),e.has("plotOptions")&&(i.plotOptions=Vt.clone(t.plotOptions)),e.has("fill")&&(i.fill=Vt.clone(t.fill)),e.has("legend")&&(i.legend=Vt.clone(t.legend)),i}_uncollapseSeries(t){const e=this.w,i=e.globals,s=[...i.collapsedSeries||[],...i.ancillaryCollapsedSeries||[]];if(!s.length)return t;const a=e.config.chart.type,r=("pie"===a||"donut"===a||"polarArea"===a)&&1===t.length&&t[0]&&"object"===typeof t[0]&&Array.isArray(t[0].data)?t[0].data:t;for(const n of s){const e=n.index;i.axisCharts?t[e]&&(t[e].data=Array.isArray(n.data)?n.data.slice():n.data):r[e]&&"object"===typeof r[e]?r[e].y=n.data:void 0!==r[e]&&(r[e]=n.data)}return t}_overrideFields(){const t=new Set,e=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(const i of e)i&&(i.xaxis&&t.add("xaxis"),i.yaxis&&t.add("yaxis"),i.colors&&t.add("colors"),i.plotOptions&&t.add("plotOptions"),i.fill&&t.add("fill"),i.legend&&t.add("legend"));return t}_copyOptionalViewFields(t,e){e.xaxis&&(t.xaxis=e.xaxis),e.yaxis&&(t.yaxis=e.yaxis),e.colors&&(t.colors=e.colors),e.plotOptions&&(t.plotOptions=e.plotOptions),e.fill&&(t.fill=e.fill),e.legend&&(t.legend=e.legend)}_viewFromChild(t){const e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];const i={};return t.chart&&t.chart.type&&(i.type=t.chart.type),t.chart&&null!=t.chart.stacked&&(i.stacked=t.chart.stacked),Object.keys(i).length&&(e.chart=i),this._copyOptionalViewFields(e,t),e}_viewFromSnapshot(t){const e={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(e.labels=t.labels),this._copyOptionalViewFields(e,t),e}_apply(t,e,i){const s=this.w;s.interact.selectedDataPoints=[],s.globals.collapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeries=[],s.globals.ancillaryCollapsedSeriesIndices=[],s.globals.allSeriesCollapsed=!1,s.globals.risingSeries=[],t.markers=u(d({},t.markers||{}),{discrete:this._drillMarkers(t.series)});const a=(!s.config.drilldown.animation||!1!==s.config.drilldown.animation.enabled)&&!1!==s.config.chart.animations.enabled;"down"===e&&this._fire("drillDownStart",i);const r=e=>this.ctx.updateOptions(t,!1,e,!1,!1),n=()=>(this._fire("down"===e?"drillDownEnd":"drillUp",i),this.ctx);if(a&&this._zoomEnabled()){const t=this._triggerOrigin(i);if(t)return this._zoomDrill(t,e,(()=>r(!1))).then(n)}return r(a).then(n)}_zoomEnabled(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!(!t||!t.zoomFromPoint)}_svgNode(){const t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){const t=this._svgNode();return t&&"function"===typeof t.querySelector?t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap"):null}_triggerOrigin(t){if(!Yt.isBrowser())return null;const e=this._svgNode(),i=this._markGroup();if(!e||!i||"function"!==typeof i.animate||"function"!==typeof e.getBoundingClientRect)return null;const s=e.getBoundingClientRect();let a=null;if(t&&null!=t.seriesIndex&&null!=t.dataPointIndex&&this.w.dom.baseEl&&(a=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),a&&"function"===typeof a.getBoundingClientRect){const t=a.getBoundingClientRect();return{x:t.left+t.width/2-s.left,y:t.top+t.height/2-s.top}}const r=i.getBoundingClientRect();
1return{x:r.left+r.width/2-s.left,y:r.top+r.height/2-s.top}}_zoomDrill(t,e,i){return s=this,a=null,r=function*(){const s=this._zoomDuration(),a="down"===e,r=Math.round(.55*s),n=a?"scale(1.03)":"scale(0.97)",o=a?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=e=>{e.style.transformBox="view-box",e.style.transformOrigin=`${t.x}px ${t.y}px`},h=this._markGroup();let c=null;if(h){l(h),c=h.animate([{transform:"scale(1)",opacity:1},{transform:n,opacity:0}],{duration:r,easing:"ease-in",fill:"forwards"});try{yield c.finished}catch(p){}}yield i();const d=this._markGroup();if(d){l(d),d.style.opacity="0",d.style.transform=o,c&&h===d&&c.cancel();const t=d.animate([{transform:o,opacity:0},{transform:"scale(1)",opacity:1}],{duration:s,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield t.finished}catch(p){}(u=d).style.transform="",u.style.opacity="",u.style.transformOrigin="",u.style.transformBox="",t.cancel()}var u},new Promise(((t,e)=>{var i=t=>{try{o(r.next(t))}catch(i){e(i)}},n=t=>{try{o(r.throw(t))}catch(i){e(i)}},o=e=>e.done?t(e.value):Promise.resolve(e.value).then(i,n);o((r=r.apply(s,a)).next())}));var s,a,r}_zoomDuration(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&"number"===typeof t.speed?t.speed:260;return Math.max(80,e)}_fire(t,e){const i=this.w.config.chart.events&&this.w.config.chart.events[t];"function"===typeof i&&i(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,i){if(!i)return;const s=this._pointAt(i.seriesIndex,i.dataPointIndex);return s&&"object"===typeof s&&null!=s.drilldown?this.drillDown(s.drilldown,s,i):"function"===typeof this.w.config.drilldown.onDrillDown?this._drillDownAsync(null,s,i):void 0}_pointAt(t,e){const i=this.w.config.series;if(!Array.isArray(i)||null==t||null==e)return null;const s=i[t];return s&&Array.isArray(s.data)&&null!=s.data[e]?s.data[e]:null}_afterRender(){const t=this.w;t.config.drilldown&&t.config.drilldown.enabled&&(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),t.config.markers&&(t.config.markers.discrete=this._drillMarkers(t.config.series)))}_markDrillableTargets(){if(!Yt.isBrowser())return;const t=this.w,e=t.dom.baseEl,i=t.config.series;if(!e||!Array.isArray(i))return;let s=0;i.forEach(((t,i)=>{const a=t&&Array.isArray(t.data)?t.data:null;a&&a.forEach(((t,a)=>{if(!t||"object"!==typeof t||null==t.drilldown)return;const r=e.querySelectorAll(`[index="${i}"][j="${a}"]`);r.length||s++,r.forEach((t=>{this._isClickThroughMark(t)&&t.classList.remove("no-pointer-events"),t.classList.add("apexcharts-drilldown-target")}))}))})),s&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${s} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!Yt.isBrowser())return;const t=this.w.dom.baseEl;t&&this._plotClickWired!==t&&(this._plotClickWired&&(this._plotClickWired.removeEventListener("mousedown",this._onPlotDown),this._plotClickWired.removeEventListener("click",this._onPlotClick)),t.addEventListener("mousedown",this._onPlotDown),t.addEventListener("click",this._onPlotClick),this._plotClickWired=t)}_onPlotDown(t){this._downAt={x:t.clientX,y:t.clientY}}_onPlotClick(t){const e=this.w;if(!e.config.drilldown||!e.config.drilldown.enabled)return;const i=this._downAt;if(this._downAt=null,i&&Math.hypot(t.clientX-i.x,t.clientY-i.y)>4)return;const s=t.target;if(!s||"function"!==typeof s.closest)return;if(s.closest(".apexcharts-drilldown-target"))return;if(s.closest(".apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip"))return;const a=e.interact.capturedSeriesIndex,r=e.interact.capturedDataPointIndex;if(null==a||null==r||a<0||r<0)return;if(!this._isPointBasedSeries(e.config.series[a]))return;const n=this._pointAt(a,r);return n&&"object"===typeof n&&null!=n.drilldown?this.drillDown(n.drilldown,n,{seriesIndex:a,dataPointIndex:r}):void 0}_isClickThroughMark(t){return!(!t.classList||!t.classList.contains("no-pointer-events"))&&(!!t.classList.contains("apexcharts-marker")&&!("function"===typeof t.closest&&t.closest(".apexcharts-tooltip")))}_drillMarkers(t){const e=this.w,i=e.config.drilldown,s=Array.isArray(e.config.markers&&e.config.markers.discrete)?e.config.markers.discrete.filter((t=>!t||!t[Te])):[],a=i&&i.marker||{};if(!1===a.show||!Array.isArray(t))return s;const r=[];return t.forEach(((t,e)=>{if(!this._seriesNeedsDrillMarker(e,t))return;const i=t&&Array.isArray(t.data)?t.data:null;
1i&&i.forEach(((t,i)=>{if(!t||"object"!==typeof t||null==t.drilldown)return;const s={seriesIndex:e,dataPointIndex:i,[Te]:!0};void 0!==a.size&&(s.size=a.size),void 0!==a.shape&&(s.shape=a.shape),void 0!==a.fillColor&&(s.fillColor=a.fillColor),void 0!==a.strokeColor&&(s.strokeColor=a.strokeColor),r.push(s)}))})),s.concat(r)}_seriesNeedsDrillMarker(t,e){if(!this._isPointBasedSeries(e))return!1;const i=this.w.config.markers&&this.w.config.markers.size,s=Array.isArray(i)?i[t]:i;return!(Number(s)>0)}_isPointBasedSeries(t){const e=t&&t.type||this.w.config.chart.type;return"line"===e||"area"===e}}});const Xe="__apexcharts_plugins__";function Oe(t){return function(){const t=globalThis;return t[Xe]||(t[Xe]={}),t[Xe]}()[t]||null}const We=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","highlightSeries","isSeriesHidden","zoomX","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","dataURI","exportToCSV"];function $e(t){const e={};return We.forEach((i=>{"function"===typeof t[i]&&(e[i]=t[i].bind(t))})),Object.freeze(e)}const Ye=class t{constructor(t,e){this.w=t,this.ctx=e,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._derived=null,this._reserved=null,this._reserveTimer=null,this._pointerSubs=null,this._pointerWired=null,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map(((t,e)=>({entry:t,order:null!=t.order?t.order:e}))).sort(((t,e)=>
1t.order-e.order)).forEach((t=>this._activate(t.entry))),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||(this.ctx.addEventListener("updated",this._onUpdated),this._updatedWired=!0)}_onUpdated(){this._repairInitialSeries(),this.dispatch("afterUpdate",{pass:"update"})}_activate(t){const e=Oe(t.name);if(!e)return void console.error(`[apexcharts] plugin "${t.name}" is not registered.`);const i=null!=e.apiVersion?Math.trunc(e.apiVersion):1;if(!(i>=1)||i>4)return void console.error(`[apexcharts] plugin "${e.name}" targets Weave API v${e.apiVersion}, host is v4; skipped.`);const s={def:e,options:Object.freeze(d({},t.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};s.api=function(t,e){const i=t.ctx,s=t.w,a={name:e.def.name,version:4,get options(){return e.options},on(t,i){const s=e.handlers;return s.has(t)||s.set(t,[]),s.get(t).push(i),a},off(t,i){const s=e.handlers.get(t);if(s){const t=s.indexOf(i);t>-1&&s.splice(t,1)}return a},store:{},layer:i=>t._layer(e.def.name,i||{}),get scales(){return t._currentScales},get data(){return t._lastData||(t._lastData=t._dataSnapshot())},theme:Object.freeze({get mode(){return s.config.theme.mode},get foreColor(){return s.config.chart.foreColor},seriesColor:t=>s.globals.colors[t],token:e=>t._token(e)}),chart:$e(i),get info(){return Object.freeze({type:String(s.config.chart&&(s.config.chart.requestedType||s.config.chart.type)||"line"),axisChart:!0===s.globals.axisCharts,datetimeX:!(!s.config.xaxis||"datetime"!==s.config.xaxis.type),horizontalBars:!!(s.config.plotOptions&&s.config.plotOptions.bar&&s.config.plotOptions.bar.horizontal),dataLabels:Object.freeze({enabled:!(!s.config.dataLabels||!s.config.dataLabels.enabled),enabledOnSeries:Array.isArray(s.config.dataLabels&&s.config.dataLabels.enabledOnSeries)?s.config.dataLabels.enabledOnSeries.slice():null})})},get categories(){return t._categories()},markDerived:i=>(t._markDerived(e.def.name,i),a),reserve:i=>(t._reserve(e.def.name,i),a),pointer:i=>t._onPointer(e.def.name,i),emit(t,s){i.events.fireEvent(`plugin:${e.def.name}:${t}`,[i,s])},get el(){return s.dom.baseEl}};return Object.freeze(a)}(this,s),this.active.push(s),this._guard(s,"setup",(()=>e.setup(s.api)))}dispatch(t,e){if("draw"===t&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;"afterParse"===t?this._currentScales=null:e&&"xyRatios"in e&&this._setScales(e.xyRatios);const i=e&&e.pass||"full";let s=null;for(const a of this.active){if(a.disabled)continue;const e=a.handlers.get(t);if(!e||!e.length)continue;null===s&&(s=this._dataSnapshot(),this._lastData=s);const r={api:a.api,scales:this._currentScales,data:s,pass:i,hook:t};for(const i of e.slice())this._guard(a,t,(()=>i(r)))}}_guard(t,e,i){if(!t.disabled)try{i()}catch(s){console.error(`[apexcharts] plugin "${t.def.name}" threw in "${e}":`,s),t.failures=(t.failures||0)+1,t.failures>=3&&(t.disabled=!0,console.error(`[apexcharts] plugin "${t.def.name}" disabled after repeated errors.`))}}_setScales(t){const e=this.w,i=e.globals,s=e.layout;if(!t||!i.axisCharts)return void(this._currentScales=null);const a=t.xRatio,r=t.yRatio||[],n=t=>null!=i.maxYArr[t]?i.maxYArr[t]:i.maxY,o=t=>null!=i.minYArr[t]?i.minYArr[t]:i.minY,l=!e.axisFlags.isXNumeric&&!i.isBarHorizontal&&i.dataPoints>0,h=l?s.gridWidth/i.dataPoints:0;this._currentScales={x:l?t=>h*(t+.5):t=>(t-i.minX)/a,y:(t,e=0)=>(n(e)-t)/(t=>null!=r[t]?r[t]:r[0])(e),domainX:l?[-.5,i.dataPoints-.5]:[i.minX,i.maxX],domainY:(t=0)=>[o(t),n(t)],gridWidth:s.gridWidth,gridHeight:s.gridHeight,ratios:t}}_dataSnapshot(){const t=this.w,e=t.globals,i=t.seriesData.series||[],s=t.seriesData.seriesX||[],a=Array.isArray(t.config.series)?t.config.series:[];return i.map(((t,i)=>{const r=Array.isArray(t)?t:[t],n=s[i]||[],o=r.map(((t,e)=>({x:null!=n[e]?n[e]:e,y:t}))),l=a[i],h=l&&"object"===typeof l&&Array.isArray(l.data)?l.data:[];return{name:e.seriesNames?e.seriesNames[i]:void 0,hidden:(e.collapsedSeriesIndices||[]).includes(i),color:e.colors?e.colors[i]:void 0,points:o,raw:h}}))}_categories(){const t=this.w,e=t.globals,i=t.config.xaxis&&Array.isArray(t.config.xaxis.categories)?t.config.xaxis.categories:[],s=Array.isArray(e.categoryLabels)?e.categoryLabels:[],a=Array.isArray(e.labels)?e.labels:[],r=i.length?i:s.length?s:a,n=t.seriesData.series||[];let o=0;for(let h=0;h<n.length;h++){const t=n[h];Array.isArray(t)&&t.length>
1o&&(o=t.length)}o||(o=r.length);const l=[];for(let h=0;h<o;h++){const t=r[h];l.push(String(void 0===t||null===t?h+1:t))}return l}_markDerived(t,e){this._derived||(this._derived=new Map);const i=Array.isArray(e)?e.map((t=>String(t))):[];i.length?this._derived.set(t,i):this._derived.delete(t),this._repairInitialSeries()}_onPointer(t,e){if("function"!==typeof e)return()=>{};this._pointerSubs||(this._pointerSubs=new Map);const i=this._pointerSubs.get(t)||[];return i.push(e),this._pointerSubs.set(t,i),this._wirePointer(),()=>{const i=this._pointerSubs&&this._pointerSubs.get(t);if(!i)return;const s=i.indexOf(e);s>-1&&i.splice(s,1)}}_wirePointer(){if(this._pointerWired)return;if(!this.ctx||"function"!==typeof this.ctx.addEventListener)return;const t=[["enter","dataPointMouseEnter"],["leave","dataPointMouseLeave"],["select","dataPointSelection"]];this._pointerWired=[];for(const[e,i]of t){const t=(t,i,s)=>{this._emitPointer(e,s)};this.ctx.addEventListener(i,t),this._pointerWired.push([i,t])}}_emitPointer(e,i){if(!this._pointerSubs||!this._pointerSubs.size)return;const s=i&&"number"===typeof i.seriesIndex?i.seriesIndex:-1,a=i&&"number"===typeof i.dataPointIndex?i.dataPointIndex:-1,r=this._categories()||[],n=this.w,o=n&&n.config&&n.config.series||[],l={type:e,seriesIndex:s,dataPointIndex:a,category:a>-1?r[a]:void 0,seriesName:t._seriesName(o,s),selected:"select"===e?t._isSelected(i,s,a):void 0};for(const[t,c]of this._pointerSubs)for(const e of c.slice())try{e(l)}catch(h){console.warn('[apexcharts] plugin "'+t+'" threw in a pointer handler',h)}}static _seriesName(t,e){if(e<0)return;const i=t[e];return i&&"object"===typeof i&&"string"===typeof i.name?i.name:void 0}static _isSelected(t,e,i){const s=t&&t.selectedDataPoints;if(!Array.isArray(s)||e<0)return;const a=s[e];return!!Array.isArray(a)&&a.indexOf(i)>-1}_reserve(e,i){const s=t._normaliseBox(i),a=this._reserved?this._reserved.get(e):void 0;if(s){if(a&&a.left===s.left&&a.right===s.right&&a.top===s.top&&a.bottom===s.bottom)return;this._reserved||(this._reserved=new Map),this._reserved.set(e,s)}else{if(!a||!this._reserved)return;this._reserved.delete(e)}this._resizeForReservation()}static _normaliseBox(t){if(!t||"object"!==typeof t)return null;const e=t=>Number.isFinite(t)&&t>0?Math.round(t):0,i={left:e(t.left),right:e(t.right),top:e(t.top),bottom:e(t.bottom)};return i.left||i.right||i.top||i.bottom?i:null}reservedBox(){if(!this._reserved||0===this._reserved.size)return t.NO_RESERVATION;const e={left:0,right:0,top:0,bottom:0};for(const t of this._reserved.values())e.left+=t.left,e.right+=t.right,e.top+=t.top,e.bottom+=t.bottom;return e}_resizeForReservation(){null==this._reserveTimer&&(this._reserveTimer=setTimeout((()=>{this._reserveTimer=null;const t=this.w.globals;if(!t.isDestroyed){t.resized=!0,t.dataChanged=!1;try{this.ctx.update()}catch(e){}}}),0))}_derivedNames(){const t=new Set;if(!this._derived)return t;for(const e of this._derived.values())for(const i of e)t.add(i);return t}_repairInitialSeries(){const t=this._derivedNames();if(!t.size)return;const e=this.w,i=(Array.isArray(e.config.series)?e.config.series:[]).filter((e=>!t.has(String(e&&e.name))));if(i.length)try{e.globals.initialSeries=i,e.globals.initialConfig&&Array.isArray(e.globals.initialConfig.series)&&(e.globals.initialConfig.series=i)}catch(s){}}_token(t){const e=this.w,i=e.globals;switch(t){case"foreColor":return e.config.chart.foreColor;case"background":return e.config.chart.background;case"accent":case"primary":return i.colors?i.colors[0]:void 0;default:return/^series-\d+$/.test(t)&&i.colors?i.colors[Number(t.split("-")[1])]:void 0}}_layer(t,{z:e="front",className:i=""}={}){let s=this._layers.get(t);if(!s){s=this.ctx.graphics.group({class:`apexcharts-plugin-${t} ${i}`.trim()});const a=this.w.dom.elGraphical.node;"behind"===e?a.insertBefore(s.node,a.firstChild):a.appendChild(s.node),s.node.setAttribute("aria-hidden","true"),this._layers.set(t,s)}return function(t,e){const i=e=>(e&&t.add(e),e),s={get node(){return t.node},path(t={}){const{d:s="",stroke:a="#000",width:r=1,fill:n="none",opacity:o=1,dash:l=0,className:h=""}=t;return i(e.drawPath({d:s,stroke:a,strokeWidth:r,fill:n,fillOpacity:"none"===n?0:o,strokeOpacity:o,strokeDashArray:l,classes:h}))},line(t={}){const{x1:s,y1:a,x2:r,y2:n,stroke:o="#000",width:l=1,dash:h=0}=t;return i(e.drawLine(s,a,r,n,o,h,l))},rect(t={}){const{x:s=0,y:a=0,w:r=0,h:n=0,r:o=0,fill:l="#000",stroke:h=null,opacity:c=1}=t;return i(e.drawRect(s,a,r,n,o,l,c,null!=h?1:null,h))},circle(t={}){const{cx:s=0,cy:a=0,r:r=0,fill:n="#000",stroke:o=null}=t;return i(e.drawCircle(r,{cx:s,cy:a,fill:n,stroke:o||"none"}))},text(t={}){const{x:s=0,y:a=0,text:r="",color:n,size:o,anchor:l="start",weight:h}=t;return i(e.drawText({x:s,y:a,text:r,textAnchor:l,fontSize:o,foreColor:n,fontWeight:h}))},clear(){const e=t.node;for(;e.firstChild;)e.removeChild(e.firstChild);return s}};return s}(s,this.ctx.graphics)}_resetLayers(){const t=this.w.dom.elGraphical,e=t&&t.node;if(e){const t=e.querySelectorAll('g[class*="apexcharts-plugin-"]');Array.prototype.forEach.call(t,(t=>t.remove()))}this._layers.clear()}_reconcile(){const t=this.w.config.plugins||[];if(t===this._lastPluginsRef)return;this._lastPluginsRef=t;const e=new Map(t.map(((t,e)=>[t.name,{entry:t,order:null!=t.order?t.order:e}])));for(let a=this.active.length-1;a>=0;a--){const t=this.active[a],i=e.get(t.def.name);i?t.options=Object.freeze(d({},i.entry.options||{})):(this._guard(t,"destroy",(()=>t.def.destroy&&t.def.destroy(t.api))),this.active.splice(a,1),this._reserve(t.def.name,null))}const i=new Set(this.active.map((t=>t.def.name))),s=[];e.forEach(((t,e)=>{i.has(e)||s.push(t)})),s.sort(((t,e)=>
vendor: 4,842 bytes, line 1
1t.order-e.order)).forEach((t=>this._activate(t.entry)))}teardown(t){if(!t){this.dispatch("destroy");for(const t of this.active)this._guard(t,"destroy",(()=>t.def.destroy&&t.def.destroy(t.api)));if(this.active=[],this._derived=null,this._reserved=null,this._pointerSubs=null,this._pointerWired){for(const[t,e]of this._pointerWired)this.ctx.removeEventListener&&this.ctx.removeEventListener(t,e);this._pointerWired=null}null!=this._reserveTimer&&(clearTimeout(this._reserveTimer),this._reserveTimer=null),this._updatedWired&&(this.ctx.removeEventListener&&this.ctx.removeEventListener("updated",this._onUpdated),this._updatedWired=!1)}this._layers.clear()}};var Be,Ne,He;Be=Ye,Ne="NO_RESERVATION",He=Object.freeze({left:0,right:0,top:0,bottom:0}),c(Be,"symbol"!==typeof Ne?Ne+"":Ne,He);let je=Ye;function Ve(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}s.ZP.registerFeatures({weave:je}),s.ZP._customSeriesFactory=function(t,e){const i=class{constructor(t,e,i){this.w=t,this.ctx=e,this.xyRatios=i,this._warned=!1}draw(i,s,a){var r,n;const o=this.w,l=new D(o,this.ctx),h=Ve(this.ctx,l),c=l.group({class:"apexcharts-marks-series"});return i.forEach(((i,s)=>{var r;const n=Array.isArray(a)?a[s]:s,d=l.group({class:"apexcharts-series",rel:n+1,seriesName:Vt.escapeString(o.seriesData.seriesNames[n]),"data:realIndex":n}),u=this._scales(n,(o.seriesData.series[n]||[]).length),p=o.globals.colors[n],g=(null==(r=o.config.series[n])?void 0:r.data)||[],f=o.seriesData.seriesX[n]||[],m=o.seriesData.series[n]||[];o.globals.seriesXvalues[n]=[],o.globals.seriesYvalues[n]=[],"undefined"===typeof o.globals.pointsArray[n]&&(o.globals.pointsArray[n]=[]);for(let a=0;a<m.length;a++){const i=m[a];if(null===i||"undefined"===typeof i)continue;const s=f[a],r=u.xAt(a,s),l=u.y(i),c=this._api(h,d,n,a);try{e.renderItem({datum:g[a],x:r,y:l,scales:u,api:c,seriesIndex:n,dataPointIndex:a,color:p})}catch(x){this._warned||(console.warn(`[apexcharts] renderItem for series type "${t}" threw; skipping datum:`,x),this._warned=!0)}o.globals.seriesXvalues[n][a]=r,o.globals.seriesYvalues[n][a]=l,o.globals.pointsArray[n][a]=[r,l]}l.setupEventDelegation(d,".apexcharts-marks-mark"),c.add(d)})),null==(n=null==(r=this.ctx.animations)?void 0:r.animationCompleted)||n.call(r,c),c}_scales(t,e){var i,s,a,r;const n=this.w.globals,o=this.w.config,l=this.xyRatios.xRatio,h=this.xyRatios.yRatio,c=null!=(s=null==(i=n.seriesYAxisReverseMap)?void 0:i[t])?s:0,d=Array.isArray(h)?null!=(a=h[c])?a:h[0]:h,u=n.maxYArr,p=Array.isArray(u)&&u.length&&null!=(r=u[c])?r:n.maxY,g=n.gridWidth,f=n.gridHeight,m=!n.isXNumeric,x=e||n.dataPoints||1,b=x>0?g/x:g,y="on"===o.xaxis.tickPlacement,w=t=>l?(t-n.minX)/l:g/2,v=n.minXDiff||1;return{x:w,xAt:(t,e)=>m?y&&x>1?t/(x-1)*g:(t+.5)*b:w(e),y:t=>(p-t)/d,gridWidth:g,gridHeight:f,band:m?b:l?v/l:g}}_api(t,e,i,s){const a=t=>{if(t){try{t.node.setAttribute("index",String(i)),t.node.setAttribute("j",String(s)),t.node.classList.add("apexcharts-marks-mark")}catch(a){}e.add(t)}return t};return{path:(e={})=>{var i,s,r,n,o,l,h,c,d;return a(t.drawPath({d:e.d||"",stroke:null!=(i=e.stroke)?i:"#000",strokeWidth:null!=(r=null!=(s=e.width)?s:e.strokeWidth)?r:1,fill:null!=(n=e.fill)?n:"none",fillOpacity:null!=(l=e.fillOpacity)?l:e.fill&&"none"!==e.fill?null!=(o=e.opacity)?o:1:0,strokeOpacity:null!=(c=null!=(h=e.strokeOpacity)?h:e.opacity)?c:1,strokeDashArray:null!=(d=e.dash)?d:0,strokeLinecap:e.lineCap}))},line:(e={})=>{var i,s,r,n;return a(t.drawLine(e.x1,e.y1,e.x2,e.y2,null!=(i=e.stroke)?i:"#000",null!=(s=e.dash)?s:0,null!=(n=null!=(r=e.width)?r:e.strokeWidth)?n:1))},rect:(e={})=>{var i,s,r,n,o,l,h,c;return a(t.drawRect(null!=(i=e.x)?i:0,null!=(s=e.y)?s:0,null!=(r=e.w)?r:0,null!=(n=e.h)?n:0,null!=(o=e.r)?o:0,null!=(l=e.fill)?l:"#000",null!=(h=e.opacity)?h:1,null!=e.stroke?null!=(c=e.strokeWidth)?c:1:null,e.stroke))},circle:(e={})=>{var i,s,r,n,o;return a(t.drawCircle(null!=(i=e.r)?i:0,{cx:null!=(s=e.cx)?s:0,cy:null!=(r=e.cy)?r:0,fill:null!=(n=e.fill)?n:"#000",stroke:e.stroke||"none","stroke-width":null!=(o=e.strokeWidth)?o:e.stroke?1:0}))},text:(e={})=>{var i,s,r,n;return a(t.drawText({x:null!=(i=e.x)?i:0,y:null!=(s=e.y)?s:0,text:null!=(r=e.text)?r:"",textAnchor:null!=(n=e.anchor)?n:"start",fontSize:e.size,foreColor:e.color,fontWeight:e.weight}))}}}};return i.dataType=e.dataType||"xy",i.yExtent="function"===typeof e.yExtent?e.yExtent:null,i};class Ge{constructor(t,e){if(this.w=t,this.ctx=e,"os"!==t.config.theme.follow||!Yt.isBrowser())return;const i=this._ensureMedia();i&&(this._applyToConfig(i),this._ensureListeners(i))}_ensureMedia(){if(!this.ctx._osThemeMedia){const t=ut.matchMedia("(prefers-color-scheme: dark)"),e=ut.matchMedia("(prefers-contrast: more)");if(!t&&!e)return null;this.ctx._osThemeMedia={dark:t,contrast:e,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(t){const e=this.w.config.theme;
1t.dark&&(e.mode=t.dark.matches?"dark":"light"),t.contrast&&t.contrast.matches&&(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode="highContrast")}_ensureListeners(t){if(t.handler)return;const e=this.ctx,i=()=>{const t=e._osThemeMedia;if(!t)return;const i={mode:t.dark&&t.dark.matches?"dark":"light"};t.contrast&&t.contrast.matches?i.accessibility={colorBlindMode:"highContrast"}:i.accessibility={colorBlindMode:""},e.updateOptions({theme:i},!1,!0,!1)};Ge._add(t.dark,i),Ge._add(t.contrast,i),t.handler=i}teardown(){const t=this.ctx._osThemeMedia;t&&(t.handler&&(Ge._remove(t.dark,t.handler),Ge._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(t,e){t&&("function"===typeof t.addEventListener?t.addEventListener("change",e):"function"===typeof t.addListener&&t.addListener(e))}static _remove(t,e){t&&("function"===typeof t.removeEventListener?t.removeEventListener("change",e):"function"===typeof t.removeListener&&t.removeListener(e))}}s.ZP.registerFeatures({osThemeWatcher:Ge});const qe="__apexcharts_series_transforms__";function Ze(t,e){t&&"string"===typeof t?"function"===typeof e?globalThis[qe][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[qe]||(globalThis[qe]={});const Ue="__apexcharts_row_sources__";function Ke(t,e){t&&"string"===typeof t?"function"===typeof e?globalThis[Ue][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}globalThis[Ue]||(globalThis[Ue]={});function Je(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const s=(i-1)*e,a=Math.floor(s),r=Math.ceil(s);return a===r?t[a]:t[a]+(t[r]-t[a])*(s-a)}function Qe(t){const e=t.length;if(e<2)return 0;let i=0;for(let r=0;r<e;r++)i+=t[r];const s=i/e;let a=0;for(let r=0;r<e;r++){const e=t[r]-s;a+=e*e}return Math.sqrt(a/e)}function ti(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort(((t,e)=>t-e));let s=i[0],a=i[i.length-1];const r=e.range;if(Array.isArray(r)&&2===r.length){const t=Number(r[0]),e=Number(r[1]);isFinite(t)&&isFinite(e)&&e>t&&(s=t,a=e)}if(!(a>s)){const t=Math.abs(s)>0?.05*Math.abs(s):.5;return{edges:[s-t,s+t],binWidth:2*t,rule:"single",capped:!1}}const n=a-s;let o,l;if("number"===typeof e.binWidth&&e.binWidth>0)o=e.binWidth,l="binWidth";else if("number"===typeof e.bins&&e.bins>=1)o=n/Math.floor(e.bins),l="count";else{const t=function(t,e,i){const s=t.length,a=t=>e/Math.max(1,Math.ceil(t));switch(i){case"sqrt":return{width:a(Math.sqrt(s)),rule:"sqrt"};case"rice":return{width:a(2*Math.cbrt(s)),rule:"rice"};case"scott":{const e=Qe(t);return e>0?{width:3.49*e*Math.pow(s,-1/3),rule:"scott"}:{width:a(Math.log2(s)+1),rule:"sturges"}}case"fd":{const e=Je(t,.75)-Je(t,.25);return e>0?{width:2*e*Math.pow(s,-1/3),rule:"fd"}:{width:a(Math.log2(s)+1),rule:"sturges"}}case"auto":{const e=a(Math.log2(s)+1),i=Je(t,.75)-Je(t,.25);if(i<=0)return{width:e,rule:"sturges"};const r=2*i*Math.pow(s,-1/3);return r<e?{width:r,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:a(Math.log2(s)+1),rule:"sturges"}}}(i,n,"string"===typeof e.bins?e.bins:"auto");o=t.width,l=t.rule}(!isFinite(o)||o<=0)&&(o=n);let h=Math.ceil(n/o);(!isFinite(h)||h<1)&&(h=1);let c=!1;h>1e3&&(h=1e3,o=n/h,c=!0),o=n/h;const d=new Array(h+1);for(let u=0;u<=h;u++)d[u]=s+u*o;return d[h]=Math.max(d[h],a),{edges:d,binWidth:o,rule:l,capped:c}}function ei(t,e){const i=e.length-1;if(!(t>=e[0])||t>e[i])return-1;if(t===e[i])return i-1;const s=(e[i]-e[0])/i;if(s>0){let a=Math.floor((t-e[0])/s);return a<0&&(a=0),a>i-1&&(a=i-1),t<e[a]?a--:t>=e[a+1]&&a++,a<0||a>i-1?-1:a}let a=0,r=i-1;for(;a<=r;){const i=a+r>>1;if(t<e[i])r=i-1;else{if(!(t>=e[i+1]))return i;a=i+1}}return-1}function ii(t,e){var i;if(!t||"object"!==typeof t||Array.isArray(t))return null;let s=null;if(Array.isArray(t.points)?s=t.points:Array.isArray(null==(i=t.y)?void 0:i.points)?s=t.y.points:e&&Array.isArray(t.y)&&"number"===typeof t.y[0]&&(s=t.y),!s)return null;const a=[];for(let r=0;r<s.length;r++){const t=Vt.parseNumber(s[r]);null!==t&&isFinite(t)&&a.push(t)}return a.length?a:null}function si(t){const e=[];
1if(!Array.isArray(t))return e;for(let i=0;i<t.length;i++){const s=t[i];let a=s;Array.isArray(s)?a=1===s.length?s[0]:s[1]:s&&"object"===typeof s&&(a=void 0!==s.y?s.y:s.x);const r=Vt.parseNumber(a);null!==r&&isFinite(r)&&e.push(r)}return e}const ai=new WeakSet;function ri(t,e,i){const s=i&&null!=i.maxRows?i.maxRows:3e3,a=function(t,e){let i=0,s=0;for(const o of t)i+=o.length,o.length>s&&(s=o.length);if(i<=e)return{clusters:t,stride:1,total:i,kept:i};const a=e=>{let i=0;for(const s of t)i+=Math.ceil(s.length/e);return i};let r=Math.max(2,Math.ceil(i/e));for(;r<s&&a(r)>e;)r++;let n=0;return{clusters:t.map((t=>{const e=[];for(let i=0;i<t.length;i+=r)e.push(t[i]);return n+=e.length,e})),stride:r,total:i,kept:n}}(e.map((t=>t.rows)),s);a.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${a.total} rows to ${a.kept} (every ${a.stride}${2===a.stride?"nd":3===a.stride?"rd":"th"} row) to stay under maxRows=${s}. Raise maxRows to draw more.`);const r=t.globals&&t.globals.colors||[];return e.map(((t,e)=>{const i=r[t.realIndex]||r[0];return{name:t.name,data:a.clusters[e].map(((s,a)=>d({id:`${t.realIndex}:${e}:${a}`,x:t.name,y:s},i?{fillColor:i}:{})))}}))}function ni(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function oi(t){return(e,i)=>{var s;const a=t(e);if(!Array.isArray(a)||!a.length)return null;const r=e.globals&&e.globals.collapsedSeriesIndices||[],n=e.globals&&((null==(s=e.globals.categoryLabels)?void 0:s.length)?e.globals.categoryLabels:e.globals.labels)||[],o=[];return a.forEach(((t,i)=>{var s;if(-1!==r.indexOf(i))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(s=e.seriesData.seriesNames)?void 0:s[i]);t.forEach(((t,e)=>{const s=null!=n[e]?String(n[e]):`#${e+1}`;o.push({name:a.length>1&&l?`${l} ${s}`:s,realIndex:i,rows:Array.isArray(t)?t.slice():[]})}))})),o.length?ri(e,o,i):null}}const li=oi((t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints})),hi=oi((t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints}));Ze("histogram",(function(t,e){var i;const s=e.config,a=e.globals;if(!Array.isArray(t))return t;a.histogramRawSeries||(a.histogramRawSeries=t.map((t=>u(d({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))));const r=a.histogramRawSeries,n=(null==(i=s.plotOptions)?void 0:i.histogram)||{},o=r.map((t=>si(null==t?void 0:t.data)));let l=[];if(1===o.length)l=o[0];else for(const d of o)l=l.concat(d);const h=ti(l,{bins:n.bins,binWidth:n.binWidth,range:n.range});if(!h)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},r;const{edges:c,binWidth:p}=h,g=o.map((t=>function(t,e){const i=new Array(Math.max(0,e.length-1)).fill(0);for(let s=0;s<t.length;s++){const a=ei(t[s],e);a>=0&&i[a]++}return i}(t,c)));e.histogramData={edges:c,binWidth:p,counts:g,rule:h.rule,capped:h.capped};const f=a.collapsedSeriesIndices||[];return r.map(((t,e)=>{if(-1!==f.indexOf(e))return u(d({},t),{data:[]});const i=function(t,e={}){let i=t.slice();if(e.cumulative){let t=0;i=i.map((e=>t+=e))}const s=t.reduce(((t,e)=>t+e),0);if(s<=0)return i;if("relative"===e.normalize)return i.map((t=>t/s*100));if("density"===e.normalize){const t=e.binWidth;
1if("number"===typeof t&&t>0)return i.map((e=>e/(s*t)))}return i}(g[e],{normalize:n.normalize,cumulative:n.cumulative,binWidth:p}),s=[];for(let a=0;a<i.length;a++)s.push({x:(c[a]+c[a+1])/2,y:i[a]});return u(d({},t),{data:s})}))})),Ze("boxPlot",(function(t,e){var i,s;if(!Array.isArray(t))return t;const a=(null==(s=null==(i=e.config.plotOptions)?void 0:i.boxPlot)?void 0:s.whiskers)||"minmax";return t.map((t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const i=t.data.map((t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!ai.has(t))return t;const i=ii(t,!1);if(!i)return t;const s=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort(((t,e)=>t-e)),s=Je(i,.25),a=Je(i,.5),r=Je(i,.75),n=r-s;let o=i[0],l=i[i.length-1],h=[];if("tukey"===e.whiskers&&n>0){const t=s-1.5*n,e=r+1.5*n;let a=0;for(;a<i.length&&i[a]<t;)a++;let c=i.length-1;for(;c>=0&&i[c]>e;)c--;a<=c&&(o=i[a],l=i[c],h=i.slice(0,a).concat(i.slice(c+1)))}return{summary:[o,s,a,r,l],outliers:h,iqr:n}}(i,{whiskers:a});if(!s)return t;e=!0;const r=u(d({},t),{y:s.summary,points:i});return ai.add(r),r}));return e?u(d({},t),{data:i}):t}))})),Ze("violin",(function(t,e){var i,s;if(!Array.isArray(t))return t;const a=(null==(s=null==(i=e.config.plotOptions)?void 0:i.violin)?void 0:s.kde)||{};return t.map((t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let e=!1;const i=t.data.map((t=>{var i;if(Array.isArray(null==(i=null==t?void 0:t.y)?void 0:i.density)&&t.y.density.length&&!ai.has(t))return t;const s=ii(t,!0);if(!s)return t;const r=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort(((t,e)=>t-e)),s=i.length;let a=e.bandwidth;if(!("number"===typeof a&&a>0)){const t=Qe(i),e=Je(i,.75)-Je(i,.25);a=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(s,-.2)}if(!isFinite(a)||a<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),n=i[0]-2*a,o=(i[s-1]+2*a-n)/(r-1),l=1/(s*a*Math.sqrt(2*Math.PI)),h=[];for(let c=0;c<r;c++){const t=n+c*o;let e=0;for(let r=0;r<s;r++){const s=(t-i[r])/a;e+=Math.exp(-.5*s*s)}h.push([t,e*l])}return{density:h,bandwidth:a}}(s,{bandwidth:a.bandwidth,resolution:a.resolution});if(!r)return t;e=!0;const n=u(d({},t),{y:{density:r.density,points:s}});return ai.add(n),n}));return e?u(d({},t),{data:i}):t}))})),Ke("histogram",(function(t,e){const i=t.globals,s=t.histogramData,a=i&&i.histogramRawSeries;if(!s||!Array.isArray(s.edges)||s.edges.length<2)return null;if(!Array.isArray(a)||!a.length)return null;const r=i&&i.collapsedSeriesIndices||[],n=s.edges,o=[];return a.forEach(((e,i)=>{var s;if(-1!==r.indexOf(i))return;const l=function(t,e){const i=Math.max(0,e.length-1),s=new Array(i);for(let a=0;a<i;a++)s[a]=[];for(let a=0;a<t.length;a++){const i=ei(t[a],e);i>=0&&s[i].push(t[a])}return s}(si(e&&e.data),n),h=t.seriesData&&(null==(s=t.seriesData.seriesNames)?void 0:s[i])||(null==e?void 0:e.name);l.forEach(((t,e)=>{const s=`${ni(n[e])}-${ni(n[e+1])}`;o.push({name:a.length>1&&h?`${h} ${s}`:s,realIndex:i,rows:t})}))})),o.length?ri(t,o,e):null})),Ke("boxPlot",li),Ke("violin",hi);function ci(t,e,i){const s=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:s,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:s,y:t[1],isSubtotal:!1,isTotal:!1,rest:{}}:"object"===typeof t?{x:void 0!==t.x?t.x:s,y:t.y,isSubtotal:!0===t.isSubtotal,isTotal:!0===t.isTotal,rest:t}:{x:s,y:t,isSubtotal:!1,isTotal:!1,rest:{}}}function di(t,e,i){if(t&&t.fillColor)return t.fillColor;const s=i[e];return"string"===typeof s&&s?s:void 0}function ui(t,e,i){const s=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:s,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:s,y:t[1],rest:{}}:"object"===typeof t?{x:void 0!==t.x?t.x:s,y:t.y,rest:t}:{x:s,y:t,rest:{}}}Ze("waterfall",(function(t,e){var i,s,a;const r=e.config,n=e.globals;if(!Array.isArray(t))return t;n.waterfallRawSeries||(n.waterfallRawSeries=t.map((t=>u(d({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))));const o=n.waterfallRawSeries,l=(null==(s=null==(i=r.plotOptions)?void 0:i.waterfall)?void 0:s.colors)||{}
1,h=null==(a=r.xaxis)?void 0:a.categories,c=n.collapsedSeriesIndices||[],p=[],g=[],f=[],m=o.map(((t,e)=>{const i=Array.isArray(null==t?void 0:t.data)?t.data:[];if(-1!==c.indexOf(e))return p[e]=[],g[e]=[],f[e]=[],u(d({},t),{data:[]});if(function(t){for(let e=0;e<t.length;e++){const i=t[e],s=Array.isArray(i)?i[1]:i&&"object"===typeof i?i.y:i;if(Array.isArray(s)&&2===s.length)return!0}return!1}(i))return p[e]=i.map((t=>{const e=Array.isArray(t)?t[1]:t&&"object"===typeof t?t.y:t;if(!Array.isArray(e))return null;const i=Vt.parseNumber(e[0]),s=Vt.parseNumber(e[1]);return null===i||null===s?null:s-i})),g[e]=i.map((t=>{const e=Array.isArray(t)?t[1]:t&&"object"===typeof t?t.y:t,i=Array.isArray(e)?Vt.parseNumber(e[1]):null;return null===i?0:i})),f[e]=i.map((()=>null)),t;const s=function(t,e,i){const s=[],a=[],r=[],n=[];let o=0,l=0;for(let h=0;h<t.length;h++){const{x:c,y:p,isSubtotal:g,isTotal:f,rest:m}=ci(t[h],h,e);let x,b,y;if(f||g)x=f?0:l,b=o,y=f?"total":"subtotal",l=o;else{const t=Vt.parseNumber(p);if(null===t||!isFinite(t)){s.push(u(d({},m),{x:c,y:null})),a.push(null),r.push(o),n.push(null);continue}x=o,b=o+t,o=b,y=t<0?"negative":"positive"}const w=di(m,y,i);s.push(d(u(d({},m),{x:c,y:[x,b]}),w?{fillColor:w}:{})),a.push(b-x),r.push(o),n.push(y)}return{data:s,values:a,cumulative:r,kinds:n}}(i,h,l);return p[e]=s.values,g[e]=s.cumulative,f[e]=s.kinds,u(d({},t),{data:s.data})}));return e.waterfallData={values:p,cumulative:g,kinds:f,geometry:[]},m})),s.ZP.registerFeatures({waterfall:class{constructor(t,e){this.w=t,this.ctx=e}isActive(){return"waterfall"===this.w.config.chart.requestedType}drawConnectors(){var t,e;const i=this.w;if(!this.isActive())return;const s=null==(e=null==(t=i.config.plotOptions)?void 0:t.waterfall)?void 0:e.connectors;if(!s||!1===s.show)return;const a=i.dom.elGraphical,r=i.waterfallData&&i.waterfallData.geometry;if(!a||!r)return;this.removeConnectors();const n=new D(i,this.ctx),o=n.group({class:"apexcharts-waterfall-connectors"}),l=s.color||i.config.grid.borderColor,h=null==s.strokeWidth?1:s.strokeWidth,c=null==s.strokeDashArray?3:s.strokeDashArray;let d=0;for(let p=0;p<r.length;p++){const t=r[p];if(Array.isArray(t))for(let e=0;e<t.length-1;e++){const i=t[e],s=t[e+1];if(!i||!s)continue;if(!(s.slotStart-i.slotEnd>.5))continue;const a=i.horizontal?n.drawLine(i.levelEnd,i.slotEnd,i.levelEnd,s.slotStart,l,c,h):n.drawLine(i.slotEnd,i.levelEnd,s.slotStart,i.levelEnd,l,c,h);a.node.classList.add("apexcharts-waterfall-connector"),o.add(a),d++}}if(!d)return;o.attr("clip-path",`url(#gridRectBarMask${i.globals.cuid})`);const u=a.node.querySelector(".apexcharts-xaxis");u?a.node.insertBefore(o.node,u):a.add(o),this.holdUntilBarsLand(o)}removeConnectors(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-waterfall-connectors");e&&e.parentNode&&e.parentNode.removeChild(e)}holdUntilBarsLand(t){const e=this.w;Yt.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}}),Ze("dumbbell",(function(t,e){var i;const s=e.config,a=e.globals;if(!Array.isArray(t))return t;a.dumbbellRawSeries||(a.dumbbellRawSeries=t.map((t=>u(d({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))));const r=a.dumbbellRawSeries,n=r.some((t=>function(t){for(let e=0;e<t.length;e++){const i=t[e],s=Array.isArray(i)?i[1]:i&&"object"===typeof i?i.y:i;if(Array.isArray(s)&&2===s.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])));if(n)return e.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},t;const o=null==(i=s.xaxis)?void 0:i.categories,l=a.collapsedSeriesIndices||[],{xs:h,rows:c,byX:p}=function(t,e){var i;const s=[],a=[],r=new Map,n=[];for(let o=0;o<t.length;o++){const l=Array.isArray(null==(i=t[o])?void 0:i.data)?t[o].data:[],h=new Map;for(let t=0;t<l.length;t++){const{x:i,y:n,rest:o}=ui(l[t],t,e),c=i instanceof Date?i.getTime():i;r.has(c)||(r.set(c,s.length),s.push(i),a.push(d({},o)));const u=r.get(c);h.set(u,Vt.parseNumber(n))}n.push(h)}return{xs:s,rows:a,byX:n}}(r,o),g=[],f=[],m=[];for(let d=0;d<r.length;d++)-1===l.indexOf(d)&&m.push(d);const x=[];for(let y=0;y<h.length;y++){const t=[];for(let n=0;n<r.length;n++){const e=p[n].has(y)?p[n].get(y):null;t.push(null!==e&&void 0!==e&&isFinite(e)?e:null)}g.push(t);
1let e=null,i=null,s=-1,a=-1;for(let r=0;r<m.length;r++){const n=m[r],o=t[n];null!==o&&((null===e||o<e)&&(e=o,s=n),(null===i||o>i)&&(i=o,a=n))}null!==e&&null!==i?(f.push([s,a]),x.push(u(d({},c[y]),{x:h[y],y:[e,i]}))):(f.push(null),x.push(u(d({},c[y]),{x:h[y],y:null})))}e.dumbbellData={form:"series",names:r.map(((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`})),values:g,order:f,carrier:m.length?m[0]:0,hidden:r.map(((t,e)=>e)).filter((t=>-1!==l.indexOf(t)))};const b=e.dumbbellData.carrier;return r.map(((t,e)=>u(d({},t),{data:e===b&&m.length?x:[]})))}));const pi=["wiggle","silhouette","zero","expand"],gi=["inside-out","inverse","none"];function fi(t,e,i){const s=i&&void 0!==i[e]?i[e]:e+1;return null==t?{x:s,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:s,y:t[1],rest:{}}:"object"===typeof t?{x:void 0!==t.x?t.x:s,y:t.y,rest:t}:{x:s,y:t,rest:{}}}Ze("streamgraph",(function(t,e){var i,s;const a=e.config,r=e.globals;if(!Array.isArray(t))return t;r.streamgraphRawSeries||(r.streamgraphRawSeries=t.map((t=>u(d({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))));const n=r.streamgraphRawSeries;if(n.some((t=>function(t){for(let e=0;e<t.length;e++){const i=t[e],s=Array.isArray(i)?i[1]:i&&"object"===typeof i?i.y:i;if(Array.isArray(s)&&2===s.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[]))))return e.streamgraphData=null,t;const o=(null==(i=a.plotOptions)?void 0:i.streamgraph)||{},l=-1!==pi.indexOf(o.offset)?o.offset:"wiggle",h=-1!==gi.indexOf(o.order)?o.order:"inside-out",c=null==(s=a.xaxis)?void 0:s.categories,p=r.collapsedSeriesIndices||[],{xs:g,rows:f,grids:m}=function(t,e){var i;const s=[],a=[],r=new Map,n=[];for(let o=0;o<t.length;o++){const l=Array.isArray(null==(i=t[o])?void 0:i.data)?t[o].data:[],h=new Map;for(let t=0;t<l.length;t++){const{x:i,y:n,rest:o}=fi(l[t],t,e),c=i instanceof Date?i.getTime():i;r.has(c)||(r.set(c,s.length),s.push(i),a.push(d({},o))),h.set(r.get(c),Vt.parseNumber(n))}n.push(h)}return{xs:s,rows:a,grids:n}}(n,c),x=function(t){const e=[];for(let a=0;a<t.length;a++){const i=t[a]instanceof Date?t[a].getTime():t[a];if("number"!==typeof i||!isFinite(i))return null;e.push(a)}const i=e.map((e=>({j:e,v:t[e]instanceof Date?t[e].getTime():t[e]})));i.sort(((t,e)=>t.v-e.v));const s=i.map((t=>t.j));for(let a=0;a<s.length;a++)if(s[a]!==a)return s;return null}(g),b=x?x.map((t=>g[t])):g,y=x?x.map((t=>f[t])):f,w=b.length;let v=!1;const A=[];for(let d=0;d<n.length;d++){const t=new Array(w);for(let e=0;e<w;e++){const i=m[d].get(x?x[e]:e);let s=void 0===i||null===i?0:Number(i);isFinite(s)||(s=0),s<0&&(v=!0,s=0),t[e]=s}A.push(t)}v&&!r.streamgraphWarnedNegative&&(r.streamgraphWarnedNegative=!0,console.warn('ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.'));const _=[];for(let d=0;d<n.length;d++)-1===p.indexOf(d)&&_.push(d);let S=A;if("expand"===l){S=A.map((t=>t.slice()));for(let t=0;t<w;t++){let e=0;for(let i=0;i<_.length;i++)e+=S[_[i]][t];if(e)for(let i=0;i<_.length;i++)S[_[i]][t]/=e}}const C=function(t,e,i){if("none"===t)return e.slice();if("inverse"===t)return e.slice().reverse();const s={},a={};for(let c=0;c<e.length;c++){const t=e[c],r=i[t];let n=0,o=-1/0,l=0;for(let e=0;e<r.length;e++)n+=r[e],r[e]>o&&(o=r[e],l=e);s[t]=n,a[t]=l}const r=e.slice().sort(((t,e)=>a[t]-a[e]||t-e));let n=0,o=0;const l=[],h=[];for(let c=0;c<r.length;c++){const t=r[c];n<o?(n+=s[t],l.push(t)):(o+=s[t],h.push(t))}return h.reverse().concat(l)}
vendor: 8,966 bytes, line 1
1(h,_,S),k=function(t,e,i,s){const a=new Array(s).fill(0);if(0===s||0===e.length)return a;if("zero"===t||"expand"===t)return a;if("silhouette"===t){for(let t=0;t<s;t++){let s=0;for(let a=0;a<e.length;a++)s+=i[e[a]][t];a[t]=-s/2}return a}let r=0;for(let n=1;n<s;n++){let t=0,s=0;for(let a=0;a<e.length;a++){const r=i[e[a]],o=r[n];let l=(o-r[n-1])/2;for(let t=0;t<a;t++){const s=i[e[t]];l+=s[n]-s[n-1]}t+=o,s+=l*o}t&&(r-=s/t),a[n]=r}return a}(l,C,S,w),M=n.map((()=>null)),P=n.map((()=>null));for(let d=0;d<C.length;d++)M[C[d]]=new Array(w),P[C[d]]=new Array(w);for(let d=0;d<w;d++){let t=k[d];for(let e=0;e<C.length;e++){const i=C[e],s=M[i],a=P[i];s[d]=t,t+=S[i][d],a[d]=t}}return e.streamgraphData={names:n.map(((t,e)=>{var i;return null!=(i=null==t?void 0:t.name)?i:`Series ${e+1}`})),xs:b,values:A,lows:M,highs:P,order:C,offset:l,hidden:n.map(((t,e)=>e)).filter((t=>-1!==p.indexOf(t)))},n.map(((t,e)=>{const i=M[e],s=P[e];if(!i||!s)return u(d({},t),{data:[]});const a=new Array(w);for(let r=0;r<w;r++)a[r]=u(d({},y[r]),{x:b[r],y:[i[r],s[r]]});return u(d({},t),{data:a})}))})),s.ZP.registerFeatures({streamgraph:class{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(t){var e;const i=this.w,s=i.globals,a=i.layout.gridHeight,r=s.maxY-s.minY;if(!r||!isFinite(r))return a/2;const n=(t-s.minY)/r;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?n*a:a-n*a}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,i,s,a,r,n;const o=this.w;if(!this.isActive())return;const l=null==(e=null==(t=o.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels;if(!l||!1===l.show)return;const h=o.dom.elGraphical,c=o.streamgraphData;if(!h||!c)return;this.removeLabels();const d=new D(o,this.ctx),u=d.group({class:"apexcharts-streamgraph-labels"}),p=(null==(i=l.style)?void 0:i.fontSize)||"auto",g=(null==(s=l.style)?void 0:s.fontFamily)||o.config.chart.fontFamily,f=(null==(a=l.style)?void 0:a.fontWeight)||600,m=null==l.minWidth?24:l.minWidth,x=[];for(let w=0;w<c.order.length;w++){const t=c.order[w],e=this._placeLabel(t,{fontSize:p,fontFamily:g,fontWeight:f,minWidth:m,graphics:d});e&&x.push(e)}let b=0;for(const w of this._deconflict(x)){const t=w.k,e=d.drawText({x:w.x,y:w.y,text:w.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:w.fontSize,fontFamily:g,fontWeight:f,foreColor:(null==(n=null==(r=l.style)?void 0:r.colors)?void 0:n[t])||w.color,cssClass:"apexcharts-streamgraph-label"});e.node.setAttribute("data:realIndex",String(t)),u.add(e),b++}if(!b)return;const y=h.node.querySelector(".apexcharts-xaxis");y?h.node.insertBefore(u.node,y):h.add(u),this.holdUntilBandsLand(u)}_placeLabel(t,{fontSize:e,fontFamily:i,fontWeight:s,minWidth:a,graphics:r}){const n=this.w,o=n.streamgraphData,l=o.lows[t],h=o.highs[t];if(!l||!h)return null;const c=n.globals.seriesXvalues[t],d=l.length;if(!Array.isArray(c)||c.length<d||0===d)return null;const u=new Array(d);let p=0;for(let v=0;v<d;v++){const t=Math.abs(this._yPx(h[v])-this._yPx(l[v]));u[v]=t,t>p&&(p=t)}if(p<=0)return null;const g=this._resolveFontSize(e,p),f=String(o.names[t]);let m=g,x=r.getTextRects(f,`${m}px`,i,"",!0,s);if(p<x.height+6)return null;const b=this._widestRun(u,c,x.height+6,d);if(!b)return null;if(x.width>b.width&&"auto"===e){const t=Math.floor(m*(b.width/x.width));if(t<this._autoBounds().min)return null;if(m=t,x=r.getTextRects(f,`${m}px`,i,"",!0,s),p<x.height+6)return null}const y=x.height+6,w=[];for(const v of this._runs(u,y,d)){const e=Number(c[v.l]),s=Number(c[v.r]);if(!isFinite(e)||!isFinite(s))continue;let n=s-e;if(n<=0&&d>1){const t=Math.abs(Number(c[Math.min(v.r+1,d-1)])-Number(c[Math.max(v.l-1,0)]));n=isFinite(t)?t:0}if(n<a||n<.35*x.width)continue;const o=x.width<=n?f:r.getTextBasedOnMaxWidth({text:f,maxWidth:n,fontSize:`${m}px`,fontFamily:i});if(!o||"..."===o)continue;const u=o===f?x.width:x.width*(o.length/f.length),p=[e+n/2];n>2.2*u&&p.push(e+u/2+2,s-u/2-2);for(const i of p){let e=v.l,s=1/0;for(let t=v.l;t<=v.r;t++){const a=Math.abs(Number(c[t])-i);a<s&&(s=a,e=t)}w.push({x:i,y:(this._yPx(l[e])+this._yPx(h[e]))/2,text:o,color:this._contrastOn(t),fontSize:`${m}px`,width:u,height:x.height})}if(w.length>=6)break}return w.length?{k:t,weight:p,candidates:w}:null}_runs(t,e,i){const s=[];let a=0;for(;a<i;){if(t[a]<e){a++;continue}let r=a,n=t[a];for(;r+1<i&&t[r+1]>=e;)r++,t[r]>n&&(n=t[r]);s.push({l:a,r:r,maxT:n}),a=r+1}return s.sort(((t,e)=>e.maxT-t.maxT))}_widestRun(t,e,i,s){let a=-1;for(const r of this._runs(t,i,s)){const t=Number(e[r.r])-Number(e[r.l]);isFinite(t)&&t>a&&(a=t)}return a>=0?{width:a}:null}_deconflict(t){const e=t.slice().sort(((t,e)=>e.weight-t.weight)),i=[],s=t=>!i.some((e=>t.left<e.box.right&&t.right>e.box.left&&t.top<e.box.bottom&&t.bottom>e.box.top));for(const a of e)for(const t of a.candidates){const e={left:t.x-t.width/2,right:t.x+t.width/2,top:t.y-t.height/2,bottom:t.y+t.height/2};if(s(e)){i.push(u(d({k:a.k},t),{box:e}));break}}return i}_autoBounds(){var t,e;const i=(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels)||{};return{min:null==i.minFontSize?9:i.minFontSize,max:null==i.maxFontSize?30:i.maxFontSize}}_resolveFontSize(t,e){if("auto"!==t){const e=parseFloat(t);return isFinite(e)&&e>0?e:12}const{min:i,max:s}=this._autoBounds();return Math.max(i,Math.min(s,Math.round(.36*e)))}_contrastOn(t){var e;const i=this.w,s=null==(e=i.globals.colors)?void 0:e[t],a="string"===typeof s?Vt.parseHex(s):null;return a?Vt.relativeLuminance(a)>.45?"#000000":"#ffffff":i.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!Yt.isBrowser())return;if(!1===this._hoverCfg().show)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");e&&!e.__apexStreamHover&&(e.__apexStreamHover=!0,e.addEventListener("mousemove",(t=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(t))})),e.addEventListener("mouseleave",(()=>{this._dim(-1)})))}_hoverCfg(){var t,e;return(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.hover)||{}}_bandAt(t){const e=this.w,i=e.streamgraphData;if(!i||!i.order.length)return-1;const s=e.dom.baseEl&&e.dom.baseEl.querySelector(".apexcharts-svg");if(!s)return-1;const a=s.getBoundingClientRect(),r=e.globals.svgWidth?a.width/e.globals.svgWidth:1,n=oe.screenXToPlotPx(e,t.clientX),o=(t.clientY-a.top)/(r||1)-e.layout.translateY;if(n<0||n>e.layout.gridWidth)return-1;if(o<0||o>e.layout.gridHeight)return-1;const l=e.globals.seriesXvalues[i.order[0]];if(!Array.isArray(l)||!l.length)return-1;const h=e.interact?e.interact.capturedDataPointIndex:-1;let c=-1;if(h>=0&&h<l.length)c=h;else{let t=1/0;for(let e=0;e<l.length;e++){const i=Math.abs(Number(l[e])-n);i<t&&(t=i,c=e)}}if(c<0)return-1;let d=-1,u=1/0;for(let p=0;p<i.order.length;p++){const t=i.order[p],e=this._yPx(i.highs[t][c]),s=this._yPx(i.lows[t][c]),a=Math.min(e,s),r=Math.max(e,s);if(o>=a&&o<=r)return t;const n=o<a?a-o:o-r;n<u&&(u=n,d=t)}return d}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const i=this._hoverCfg(),s=null==i.opacity?.35:i.opacity,a=e.dom.baseEl.querySelectorAll(".apexcharts-series"),r=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),n=(e,i)=>t<0||i===t;for(let o=0;o<a.length;o++){const t=a[o];t.style.transition="opacity .15s ease",t.style.opacity=n(0,Number(t.getAttribute("data:realIndex")))?"":String(s)}for(let o=0;o<r.length;o++){const t=r[o];t.style.transition="opacity .15s ease, fill .15s ease",n(0,Number(t.getAttribute("data:realIndex")))?this._restoreLabel(t):(t.getAttribute("data:fill")||t.setAttribute("data:fill",t.getAttribute("fill")||""),t.setAttribute("fill",e.config.chart.foreColor),t.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let s=0;s<e.length;s++){e[s].style.opacity=""}const i=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let s=0;s<i.length;s++)this._restoreLabel(i[s])}holdUntilBandsLand(t){const e=this.w;Yt.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}});const mi=(t,e,i,s)=>{if("function"!==typeof t)return t;const a=t({series:e.seriesData.series,seriesIndex:i,dataPointIndex:s,w:e});return Number.isFinite(a)?a:0};function xi(t){return-Math.cos(t*Math.PI)/2+.5}function bi(t,e,i,s){t=Math.min(Math.max(t,0),1),i=Math.min(Math.max(i,0),1);const a=3*t,r=3*(i-t)-a,n=1-a-r,o=3*e,l=3*(s-e)-o,h=1-o-l,c=t=>((n*t+r)*t+a)*t;return t=>t<=0?0:t>=1?1:(t=>((h*t+l)*t+o)*t)((t=>{let e=0,i=1,s=t;if(s<e)return e;if(s>i)return i;for(;e<i;){const a=c(s);
1if(Math.abs(a-t)<1e-4)return s;t>a?e=s:i=s,s=(e+i)/2}return s})(t))}const yi=new Map;function wi(t){return"function"===typeof t?vi(t):(e=t,Array.isArray(e)&&4===e.length&&e.every((t=>"number"===typeof t))?bi(t[0],t[1],t[2],t[3]):"string"===typeof t&&yi.has(t)?vi(yi.get(t)):xi);var e}function vi(t){return e=>{const i=t(e);return"number"===typeof i&&isFinite(i)?i:e}}function Ai(t,e,i){if(!t||"string"!==typeof t)return null;const s=mt(t);if(!s.length||"M"!==s[0][0])return null;for(let l=1;l<s.length;l++)if("M"===s[l][0])return null;let a=s,r=null;if(i){if(s.length<5)return null;if(r=s.slice(-3),a=s.slice(0,-3),"Z"!==r[2][0])return null;if("L"!==r[1][0])return null;if("L"!==r[0][0]&&"C"!==r[0][0])return null}else if("Z"===s[s.length-1][0])return null;if(a.length!==e||a.length<2)return null;const n=a[1][0];if("L"!==n&&"C"!==n)return null;for(let l=2;l<a.length;l++)if(a[l][0]!==n)return null;const o=a.map((t=>"C"===t[0]?[Number(t[5]),Number(t[6])]:[Number(t[1]),Number(t[2])]));for(const l of o)if(!isFinite(l[0])||!isFinite(l[1]))return null;return{body:a,closing:r,segType:n,anchors:o}}function _i(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]}function Si(t,e,i){const s=t,a=[e[1],e[2]],r=[e[3],e[4]],n=[e[5],e[6]],o=_i(s,a,i),l=_i(a,r,i),h=_i(r,n,i),c=_i(o,l,i),d=_i(l,h,i),u=_i(c,d,i);
1return{first:["C",o[0],o[1],c[0],c[1],u[0],u[1]],second:["C",d[0],d[1],h[0],h[1],n[0],n[1]],mid:u}}function Ci(t,e,i){const s=[e[1],e[2]],a=_i(t,s,i);return{first:["L",a[0],a[1]],second:["L",s[0],s[1]],mid:a}}function ki(t,e){const{body:i,closing:s,segType:a,anchors:r}=t,n=r.length,o=e.length,l=t=>"C"===a?["C",t[0],t[1],t[0],t[1],t[0],t[1]]:["L",t[0],t[1]],h=[["M",r[0][0],r[0][1]]];let c=0;for(;c<o&&0!==e[c];)c++;for(let u=1;u<=c;u++)h.push(l(r[0]));let d=c+1;for(let u=0;u<n-1;u++){let t=0;for(;d+t<o&&-1===e[d+t];)t++;const s=i[u+1];if(t){const e=t+1;let i=r[u],n=s;for(let s=0;s<t;s++){const t=1/(e-s),r="C"===a?Si(i,n,t):Ci(i,n,t);h.push(r.first),i=r.mid,n=r.second}h.push(n)}else h.push(s.slice());d+=t+1}for(;d<o;)h.push(l(r[n-1])),d++;return s&&s.forEach((t=>h.push(t.slice()))),h}function Mi(t,e,i,s,a,r){const n=Ai(t,s,r);if(!n)return null;const o=Ai(e,a,r);if(!o)return null;if(n.segType!==o.segType)return null;if((n.closing||o.closing)&&(!n.closing||!o.closing||n.closing[0][0]!==o.closing[0][0]))return null;const l=i.map((t=>t.oldJ)),h=i.map((t=>t.newJ));return{from:yt(ki(n,l)),toInterp:yt(ki(o,h))}}function Pi(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const s=null!=(e=i.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(Yt.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function Li(t,e,i){var s,a,r,n;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[i])return"x:"+s[i]}const o=null==(n=t.globals.labels)?void 0:n[i];return null!=o&&""!==String(o)?"c:"+(Array.isArray(o)?o.join(" "):String(o)):"j:"+i}function Ii(t){const e=new Map;return t.map((t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`}))}function Ei(t,e,i=!1,s=!1){var a,r;if(!Pi(t))return null;const n=t.globals.prevStreamFrame;if(!n)return null;const o=null==(a=n.seriesY)?void 0:a[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(o)||!Array.isArray(l))return null;if(!o.length||!l.length)return null;const h=Ii(o.map(((t,i)=>function(t,e,i){var s,a;if(t.isXNumeric){const a=null==(s=t.seriesX)?void 0:s[e];if(a&&a.length&&null!=a[i])return"x:"+a[i]}const r=null==(a=t.labels)?void 0:a[i];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+i}(n,e,i)))),c=Ii(l.map(((i,s)=>Li(t,e,s)))),d=function(t,e){const i=new Map;t.forEach(((t,e)=>{i.has(t)||i.set(t,e)}));const s=new Array(e.length),a=new Set;let r=-1,n=!0,o=t.length===e.length;e.forEach(((t,e)=>{const l=i.has(t)&&!a.has(i.get(t))?i.get(t):-1;s[e]=l,-1!==l&&(a.add(l),l<r&&(n=!1),r=l),l!==e&&(o=!1)}));const l=[];for(let h=0;h<t.length;h++)a.has(h)||l.push(h);return{toOld:s,exits:l,ordered:n,changed:!o}}(h,c);return(d.ordered||s)&&(d.changed||i)?{join:d,oldKeys:h,newKeys:c}:null}function Di(t,e,i,s,a){const r=performance.now(),n=o=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(o-r)/e));s(i(l),l),l<1?ut.requestAnimationFrame(n):a&&a()};ut.requestAnimationFrame(n)}function Fi(t,{elPointsMain:e,realIndex:i,speed:s}){var a,r,n,o;if(!(null==e?void 0:e.node))return!1;const l=Ei(t,i,!0);if(!l)return!1;const h=t.globals.prevStreamFrame;if(!h)return!1;const c=null==(a=h.xPixels)?void 0:a[i],d=null==(r=h.yPixels)?void 0:r[i];if(!c||!d)return!1;const u=e.node.querySelectorAll(".apexcharts-marker");if(!u.length)return!1;const p=(null==(n=t.globals.seriesXvalues)?void 0:n[i])||[],g=(null==(o=t.globals.seriesYvalues)?void 0:o[i])||[],f=function(t){var e,i;const s=t.config.chart.animations;return wi(null!=(i=null==(e=s.dynamicAnimation)?void 0:e.easing)?i:s.easing)}(t),m=Math.max(1,s||1);return e.node.classList.remove("apexcharts-element-hidden"),u.forEach((e=>{var s,a,r,n,o,u,x,b,y;const w=parseInt(null!=(a=null!=(s=e.getAttribute("j"))?s:e.getAttribute("rel"))?a:"",10);if(!isFinite(w)||w<0||w>=l.join.toOld.length)return;const v=l.join.toOld[w],A=null!=p[w]&&null!=g[w]?[p[w],g[w]]:null;if(-1===v||!A){const i=e.style;return i.opacity="0",void Di(t,m,f,(t=>{i.opacity=String(t)}),(()=>{i.opacity=""}))}const _=(null!=(r=c[v])?r:NaN)-A[0],S=(null!=(n=d[v])?n:NaN)-A[1];if(!isFinite(_)||!isFinite(S))return;const C=null!=(x=null==(u=null==(o=h.rPixels)?void 0:o[i])?void 0:u[v])?x:NaN,k=parseFloat(null!=(y=null!=(b=e.getAttribute("r"))?b:e.getAttribute("default-marker-size"))?
1y:""),M=isFinite(C)&&isFinite(k)&&k>0&&Math.abs(C-k)>.25;if(!(Math.abs(_)>=.5||Math.abs(S)>=.5)&&!M)return;const P=t=>{const i=_*(1-t),s=S*(1-t);if(M){const a=(C+(k-C)*t)/k;e.setAttribute("transform",`translate(${i+A[0]*(1-a)}, ${s+A[1]*(1-a)}) scale(${a})`)}else e.setAttribute("transform",`translate(${i}, ${s})`)};P(0),Di(t,m,f,P,(()=>{e.removeAttribute("transform")}))})),!0}function Ri(t,{type:e,realIndex:i,pathFromLine:s,pathFromArea:a,linePaths:r,areaPaths:n}){var o,l;const h=Ei(t,i);if(!h)return null;const{join:c,oldKeys:d,newKeys:u}=h,p=t.globals.prevStreamFrame;if(!p)return null;const g=null==(o=p.seriesY)?void 0:o[i],f=null==(l=t.seriesData.series)?void 0:l[i];if(g.length<2||f.length<2)return null;if(g.some((t=>null===t))||f.some((t=>null===t)))return null;const m=function(t,e){const i=new Set(t.exits),s=[];let a=0;for(let r=0;r<t.toOld.length;r++){const e=t.toOld[r];if(-1!==e){for(;a<e;)i.has(a)&&s.push({oldJ:a,newJ:-1}),a++;s.push({oldJ:e,newJ:r}),a=e+1}else s.push({oldJ:-1,newJ:r})}for(;a<e;)i.has(a)&&s.push({oldJ:a,newJ:-1}),a++;return s}(c,d.length),x={};return Array.isArray(r)&&1===r.length&&s&&(x.line=Mi(s,r[0],m,d.length,u.length,!1)),"area"===e&&Array.isArray(n)&&1===n.length&&a&&(x.area=Mi(a,n[0],m,d.length,u.length,!0)),x.line||x.area?x:null}function zi({w:t,elSeries:e,record:i,newKeys:s,isHorizontal:a,speed:r}){var n;if(!Pi(t))return;if(!i||!Array.isArray(i.paths)||!(null==e?void 0:e.node))return;const o=new Set(s),l=i.paths.filter((t=>t&&t.d&&null!=t.key&&!o.has(t.key)));if(!l.length)return;const h=new D(t),c=null==(n=t.globals.colors)?void 0:n[parseInt(String(i.realIndex),10)];l.forEach((i=>{let s=i.fill||c||"#c8c8c8";0===String(s).indexOf("url(")&&(s=c||"#c8c8c8");const n=h.drawPath({d:i.d,stroke:"none",strokeWidth:0,fill:s,fillOpacity:1,classes:"apexcharts-bar-ghost"}),o=n.node;o.setAttribute("pointer-events","none"),n.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(o,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const i=parseFloat(e[1]),s=parseFloat(e[2]);return isFinite(i)&&isFinite(s)?{x:i,y:s}:null}(i.d);let d=a?"left center":"center bottom";try{const t=o.getBBox();l&&t&&(d=a?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(m){}const u=o.style;u.transformBox="fill-box",u.transformOrigin=d;const p=Math.max(1,r||1),g=performance.now(),f=e=>{if(t.globals.isDestroyed||!o.parentNode)return;const i=Math.max(0,Math.min(1,(e-g)/p)),s=1-Math.pow(1-i,3),r=1-s;u.transform=a?`scaleX(${r})`:`scaleY(${r})`,u.opacity=String(1-s),i<1?ut.requestAnimationFrame(f):o.parentNode.removeChild(o)};ut.requestAnimationFrame(f)}))}yi.set("linear",(t=>t)),yi.set("easeInOutSine",xi),yi.set("easeInSine",(t=>1-Math.cos(t*Math.PI/2))),yi.set("easeOutSine",(t=>Math.sin(t*Math.PI/2))),yi.set("easeInQuad",(t=>t*t)),yi.set("easeOutQuad",(t=>1-(1-t)*(1-t))),yi.set("easeInOutQuad",(t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2)),yi.set("easeInCubic",(t=>t*t*t)),yi.set("easeOutCubic",(t=>1-Math.pow(1-t,3))),yi.set("easeInOutCubic",(t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2)),yi.set("easeOutBack",(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)})),yi.set("easeInOutBack",(t=>{const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2}));class Ti{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,i;const{x:s,y:a,y1:r,y2:n,i:o,j:l,realIndex:h,columnGroupIndex:c,barHeight:p,barWidth:g,barXPosition:f,barYPosition:m,visibleSeries:x}=t,b=this.w,y=new D(this.barCtx.w),w=b.waterfallData&&b.waterfallData.values,v=w&&w[h]&&null!=w[h][l]?w[h][l]:null,A=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;let _,S;b.axisFlags.isXNumeric&&!b.globals.isBarHorizontal?(_=s+g*(x+1),S=a+p*(x+1)-A):(_=s+g*x,S=a+p*x);let C=null,k=null,M=s,P=a,L={};const I=b.config.dataLabels,E=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;"undefined"!==typeof m&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&
vendor: 12,213 bytes, line 1
1(S=m,P=m),"undefined"!==typeof f&&this.barCtx.isVerticalGroupedRangeBar&&(_=f,M=f);const R=mi(I.offsetX,b,h,l),z=mi(I.offsetY,b,h,l);let T={width:0,height:0};if(b.config.dataLabels.enabled){const t=null!==v?v:b.seriesData.series[h][l];T=y.getTextRects(b.config.dataLabels.formatter?b.config.dataLabels.formatter(t,u(d({},b),{seriesIndex:h,dataPointIndex:l,w:b})):b.formatters.yLabelFormatters[0](t),parseFloat(I.style.fontSize).toString(),I.style.fontFamily,void 0,!0,I.style.fontWeight)}const X={x:s,y:a,i:o,j:l,realIndex:h,columnGroupIndex:c,bcx:_,bcy:S,barHeight:p,barWidth:g,textRects:T,strokeWidth:A,dataLabelsX:M,dataLabelsY:P,dataLabelsConfig:I,barDataLabelsConfig:E,barTotalDataLabelsConfig:F,offX:R,offY:z};if(L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),null!==v&&this.barCtx.isHorizontal&&"center"===E.position){const t=null==(i=null==(e=b.waterfallData.geometry)?void 0:e[h])?void 0:i[l];t&&t.horizontal&&(L.dataLabelsX=(t.levelStart+t.levelEnd)/2+R)}return C=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:null!==v?v:this.barCtx.isRangeBar?[r,n]:"100%"===b.config.chart.stackType?b.globals.seriesPercent[h][l]:b.seriesData.series[h][l],i:h,j:l,barWidth:g,barHeight:p,textRects:T,dataLabelsConfig:I}),b.config.chart.stacked&&F.enabled&&(k=this.drawTotalDataLabels({x:L.totalDataLabelsX,y:L.totalDataLabelsY,barWidth:g,barHeight:p,realIndex:h,j:l,textAnchor:L.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:l}),rawVal:this.getStackedTotalValue({realIndex:h,j:l}),dataLabelsConfig:I,barTotalDataLabelsConfig:F})),{dataLabelsPos:L,dataLabels:C,totalDataLabels:k}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,i=this.getTotalGroupContext(t);return i&&e&&e.length>i.groupIndex?e[i.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const i=this.w,s=this.getTotalGroupContext(t),a=i.seriesData.stackedSeriesTotalsByGroups;return s&&a&&a[s.groupIndex]?a[s.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const i=this.w;let s=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(s=this.totalFormatter(s,u(d({},i),{seriesIndex:t,dataPointIndex:e,w:i}))),s}calculateColumnsDataLabelsPosition(t){const e=this.w;let i,s,{i:a,j:r,realIndex:n,y:o,bcx:l,barWidth:h,barHeight:c,textRects:d,dataLabelsX:u,dataLabelsY:p,dataLabelsConfig:g,barDataLabelsConfig:f,barTotalDataLabelsConfig:m,strokeWidth:x,offX:b,offY:y}=t;const w=l;c=Math.abs(c);const v="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:A}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:r});l-=x/2;const _=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?u+=h/2:(u=e.axisFlags.isXNumeric?l-h/2+b:l-_+h/2+b,!e.config.chart.stacked&&A>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*A)),v){const t=2;u=u+d.height/2-x/2-t}const S=e.seriesData.series[a][r]<0;let C=o;switch(this.barCtx.isReversed&&(C=o+(S?c:-c)),f.position){case"center":p=v?S?C-c/2+y:C+c/2-y:S?C-c/2+d.height/2+y:C+c/2+d.height/2-y;break;case"bottom":p=v?S?C-c+y:C+c-y:S?C-c+d.height+x+y:C+c-d.height/2+x-y;break;case"top":p=v?S?C+y:C-y:S?C-d.height/2-y:C+d.height+y}let k=C;const M=this.getTotalGroupContext(n);if((M?[M.group]:e.labelData.seriesGroups).forEach((t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach((t=>{k=S?Math.max(t[r],k):Math.min(t[r],k)}))})),this.drawsStackedTotal(n)&&m.enabled){const t=18,a=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:r}),g.fontSize);i=S?k-a.height/2-y-m.offsetY+t:k+a.height+y+m.offsetY-t;const o=_;s=w+(e.axisFlags.isXNumeric?-h/2:h/2-o)+m.offsetX}return e.config.chart.stacked||(p<0?p=0+x:p+d.height/3>e.layout.gridHeight&&(p=e.layout.gridHeight-x)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:p,totalDataLabelsX:s,totalDataLabelsY:i,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const i=this.w;let{x:s,i:a,j:r,realIndex:n,bcy:o,barHeight:l,barWidth:h,textRects:c,dataLabelsX:d,strokeWidth:u,dataLabelsConfig:p,barDataLabelsConfig:g,barTotalDataLabelsConfig:f,offX:m,offY:x}=t;const b=i.layout.gridHeight/i.globals.dataPoints,{zeroEncounters:y}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:r});let w,v,A;if(h=Math.abs(h),this.barCtx.isPyramid){w=o+l/2+x-(null!=(e=c.centerOffset)?e:0)}else w=o-(this.barCtx.isRangeBar?0:b)+l/2+c.height/2+x-3;!i.config.chart.stacked&&y>0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w-=l*y);let _="start";const S=i.seriesData.series[a][r]<0;let C=s;if(this.barCtx.isReversed&&(C=s+(S?-h:h),_=S?"start":"end"),this.barCtx.isPyramid)d=i.layout.gridWidth/2+m;else switch(g.position){case"center":d=S?C+h/2-m:Math.max(c.width/2,C-h/2)+m;break;case"bottom":d=S?C+h-u-m:C-h+u+m;break;case"top":d=S?C-u-m:C-u+m}let k=C;const M=this.getTotalGroupContext(n);if((M?[M.group]:i.labelData.seriesGroups).forEach((t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach((t=>{k=S?Math.min(t[r],k):Math.max(t[r],k)}))})),this.drawsStackedTotal(n)&&f.enabled){const t=new D(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:r}),p.fontSize);S?(v=k-u-m-f.offsetX,_="end"):v=k+m+f.offsetX+(this.barCtx.isReversed?-(h+u):u),A=w-c.height/2+t.height/2+f.offsetY+u,i.globals.barGroups.length>1&&!M&&(A-=i.globals.barGroups.length/2*(l/2))}if(!i.config.chart.stacked){const t=S&&"middle"!==p.textAnchor?"start"===p.textAnchor?"end":"start":p.textAnchor;let e;e="vertical"===g.orientation?c.height/2:"end"===t?c.width:"middle"===t?c.width/2:0;const s=("vertical"===g.orientation?c.height:c.width)-e;d+s>i.layout.gridWidth-u&&(d=i.layout.gridWidth-s-u),d-e<u&&(d=e+u)}return{bcx:s,bcy:o,dataLabelsX:d,dataLabelsY:w,totalDataLabelsX:v,totalDataLabelsY:A,totalDataLabelsAnchor:_}}drawCalculatedDataLabels({x:t,y:e,val:i,i:s,j:a,textRects:r,barHeight:n,barWidth:o,dataLabelsConfig:l}){var h,c,p;const g=this.w;let f="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(f=`rotate(-90, ${t}, ${e})`);const m=new M(this.barCtx.w,this.barCtx.ctx),x=new D(this.barCtx.w),b=l.formatter;let y=null;const w=g.globals.collapsedSeriesIndices.indexOf(s)>-1,v=(g.globals.collapsingSeriesIndices||[]).indexOf(s)>-1;if(v){const t=null==(h=g.globals.prevDataLabels)?void 0:h.get(`${s}::${Li(g,s,a)}`);t&&isFinite(t.val)&&(i=t.val)}if(l.enabled&&(!w||v)){y=x.group({class:"apexcharts-data-labels",transform:f});const h=g.config.dataLabels;((null==(c=h.animate)?void 0:c.enabled)||(null==(p=h.countUp)?void 0:p.enabled))&&(y.node.setAttribute("data:dlKey",`${s}::${Li(g,s,a)}`),y.node.setAttribute("data:dlJ",String(a)),"number"===typeof i&&isFinite(i)&&y.node.setAttribute("data:dlVal",String(i)));let w="";"undefined"!==typeof i&&(w=b(i,u(d({},g),{seriesIndex:s,dataPointIndex:a,w:g}))),!i&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");const A=g.seriesData.series[s][a]<0,_=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===_&&(l.textAnchor=A?"end":"start"),"center"===_&&(l.textAnchor="middle"),"bottom"===_&&(l.textAnchor=A?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){o<x.getTextRects(w,parseFloat(l.style.fontSize).toString()).width&&(w="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!v&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(o)&&(w=""):r.height/1.6>Math.abs(n)&&(w=""));const S=d({},l);this.barCtx.isHorizontal&&i<0&&("start"===l.textAnchor?S.textAnchor="end":"end"===l.textAnchor&&(S.textAnchor="start")),m.plotDataLabelsText({x:t,y:e,text:w,i:s,j:a,parent:y,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return y}drawTotalDataLabels({x:t,y:e,val:i,rawVal:s,realIndex:a,j:r,textAnchor:n,barTotalDataLabelsConfig:o}){var l,h;const c=new D(this.barCtx.w);let d;if(o.enabled&&"undefined"!==typeof t&&"undefined"!==typeof e&&this.drawsStackedTotal(a)){d=c.drawText({x:t,y:e,foreColor:o.style.color,text:i,textAnchor:n,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight}),d.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(a);d.node.setAttribute("data:dlTotalKey",`${t}::${Li(this.w,a,r)}`),d.node.setAttribute("data:dlTotalSeries",String(a)),"number"===typeof s&&isFinite(s)&&d.node.setAttribute("data:dlTotalVal",String(s))}}return d}}function Xi(t){var e,i,s,a,r,n,o;return"histogram"===(null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.requestedType)&&(!1!==(null==(a=null==(s=t.config.plotOptions)?void 0:s.histogram)?void 0:a.overlap)&&(null!=(o=null==(n=null==(r=t.seriesData)?void 0:r.series)?void 0:n.length)?o:0)>1)}class Oi{constructor(t,e,i){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=i,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const s=new X(this.w);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=s.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const a=s.getBarSeriesIndices(),r=new S(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(((t,e)=>-1===a.indexOf(e)?e:-1)).filter((t=>-1!==t))),this.barHelpers=new class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let i=0;i<t.length;i++)if(t[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.axisFlags.isXNumeric)for(let s=0;s<t[i].length;s++)e.seriesData.seriesX[i][s]>e.globals.minX&&e.seriesData.seriesX[i][s]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),Vt.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map((t=>t.map((t=>"none"))))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const i=t.globals.maxX-t.globals.minX;e=i>0?i/4:0}else if(e=this._unionMinXGap(),!(e>0)||!isFinite(e)){const i=t.globals.minXDiff;e=i>0&&isFinite(i)&&.5!==i?i:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let r=0;r<t.length;r++){const i=t[r];Array.isArray(i)&&i.length>0&&e.push(i)}if(!e.length)return 0;const i=new Array(e.length).fill(0);let s=NaN,a=1/0;for(;;){let t=1/0,r=-1;for(let s=0;s<e.length;s++){const a=e[s];for(;i[s]<a.length&&"number"!==typeof a[i[s]];)i[s]++;if(i[s]>=a.length)continue;const n=a[i[s]];n===n?n<t&&(t=n,r=s):(i[s]++,s--)}if(-1===r)break;
1if(i[r]++,s===s){const e=t-s;e>0&&e<a&&(a=e)}s=t}return isFinite(a)?a:0}initialPositions(t){const e=this.w;let i,s,a,r,n,o,l,h,c=e.globals.dataPoints;this.barCtx.isRangeBar&&(c=e.labelData.labels.length);let d=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||Xi(e))&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/c,n=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,n=a/this.barCtx.seriesLen),n=n*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),s=(a-n*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),o=r/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),o=r/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,o<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),i=e.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:i,j:0,realIndex:t,barWidth:o}).x:e.globals.padHorizontal+Vt.noExponents(r-o*this.barCtx.seriesLen)/2}return e.globals.barHeight=n,e.globals.barWidth=o,{x:i,y:s,yDivision:a,xDivision:r,barHeight:n,barWidth:o,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach((e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach((e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}getPathFillColor(t,e,i,s){var a;const r=this.w,n=new L(this.barCtx.w);let o=null;const l=this.barCtx.barOptions.distributed?i:e;let h=!1;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((s=>{t[e][i]>=s.from&&t[e][i]<=s.to&&(o=s.color,h=!0)}));const c=this.getDumbbellConnectorFill(e,i)||(null==(a=r.config.series[e].data[i])?void 0:a.fill),d=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let u;return d&&d.color&&(o=d.color,u=d.opacity),{color:n.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:s,dataPointIndex:i,color:o,opacity:u,value:t[e][i],fillConfig:c,fillType:(null==c?void 0:c.type)?c.type:Array.isArray(r.config.fill.type)?r.config.fill.type[s]:r.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const i=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const s=i.dumbbellData;if(!s||"series"!==s.form)return null;const a=i.config.plotOptions.bar.dumbbell.connector;if(a.color)return null;const r=s.order[e];if(!r)return null;const n=i.globals.colors[r[0]],o=i.globals.colors[r[1]];return n&&o?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:n,gradientTo:o,opacityFrom:a.opacity,opacityTo:a.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,i){let s=0;const a=this.w;return"undefined"===typeof this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===a.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),s}getStackedSeriesIndices(t){const e=this.w,i=e.labelData.seriesGroups,s=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,a=t=>!s||s.has(t);if(!i||i.length<2){const e=Array.from({length:t},((t,e)=>e)).filter(a);return e.length?[e]:[]}const r=Array.from({length:i.length},(()=>[])),n=[];for(let o=0;o<t;o++){if(!a(o))continue;const t=this.getSeriesGroupIndex(o);t>-1?r[t].push(o):n.push(o)}return n.length&&r.push(n),r.filter((t=>t.length>0))}createBorderRadiusArr(t){var e;const i=this.w,s=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,a=t.length,r=0|(null==(e=t[0])?void 0:e.length),n=Array.from({length:a},(()=>Array(r).fill(s?"top":"none")));if(s)return n;const o="bar"===this.w.config.chart.type&&1===r,l=o?"top":"both",h=o?"top":"bottom";
vendor: 6,180 bytes, line 1
1for(const c of this.getStackedSeriesIndices(a))for(let e=0;e<r;e++){const i=[],s=[];for(const a of c){const r=t[a][e];r>0?i.push(a):r<0&&s.push(a)}if(i.length>0&&0===s.length)if(1===i.length)n[i[0]][e]=l;else{const t=i[0],s=i[i.length-1];for(const a of i)n[a][e]=a===t?h:a===s?"top":"none"}else if(s.length>0&&0===i.length)if(1===s.length)n[s[0]][e]="both";else{const t=Math.max(...s),i=Math.min(...s);for(const a of s)n[a][e]=a===t?"bottom":a===i?"top":"none"}else if(i.length>0&&s.length>0){const t=i[i.length-1];for(const s of i)n[s][e]=s===t?"top":"none";const a=Math.max(...s);for(const i of s)n[i][e]=i===a?"bottom":"none"}}return n}barBackground({j:t,i:e,x1:i,x2:s,y1:a,y2:r,elSeries:n}){const o=this.w,l=new D(this.barCtx.w),h=new X(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect("undefined"!==typeof i?i:0,"undefined"!==typeof a?a:0,"undefined"!==typeof s?s:o.layout.gridWidth,"undefined"!==typeof r?r:o.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);n.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:i,y2:s,strokeWidth:a,isReversed:r,series:n,seriesGroup:o,realIndex:l,i:h,j:c,w:d}){var u,p,g;const f=new D(this.barCtx.w);(a=Array.isArray(a)?a[l]:a)||(a=0);let m=t,x=e;(null==(u=d.config.series[l].data[c])?void 0:u.columnWidthOffset)&&(x=e-d.config.series[l].data[c].columnWidthOffset/2,m=t+d.config.series[l].data[c].columnWidthOffset);const b=a/2,y=x+b,w=x+m-b,v=(n[h][c]>=0?1:-1)*(r?-1:1);i+=.001-b*v,s+=.001+b*v;const A=f.line(w,i),_="around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z",S=f.move(y,i)+f.line(y,s)+f.line(w,s)+A+_;let C=S;"none"!==this.arrBorderRadius[l][c]&&(C=f.roundPathCorners(C,d.config.plotOptions.bar.borderRadius));let k=null;const M=null==(g=null==(p=this.barCtx.ctx)?void 0:p.morphTypeChange)?void 0:g.getInitialPathFor(l,c);if(M?k=M:d.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(l,c,C,S)),null==k&&(k=f.move(y,i)+f.line(y,i)+A+A+A+A+A+f.line(y,i)+_),d.config.chart.stacked){let t=this.barCtx;t=this.barCtx[o],t.yArrj.push(s-b*v),t.yArrjF.push(Math.abs(i-s+a*v)),t.yArrjVal.push(this.barCtx.series[h][c])}return{pathTo:C,pathFrom:k,drawnBox:{x1:y,x2:w,y1:i,y2:s}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:i,i:s,j:a,realIndex:r,strokeWidth:n,w:o}){var l,h;const c=new D(this.barCtx.w),d=o.layout.gridWidth/2,u=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,p=u(i[s][a]),g=a===i[s].length-1,f="taper"===o.config.plotOptions.funnel.lastShape?"taper":"flat";let m;m=g?"taper"===f?0:p:u(i[s][a+1]);const x=n/2,b=t+x,y=t+e-x,w=d-p,v=d+p,A=d-m,_=d+m,S=c.move(w,b)+c.line(v,b)+c.line(_,y)+c.line(A,y)+" Z";let C=null;const k=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,a);return k?C=k:o.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(r,a,S)),null==C&&(C=c.move(d,b)+c.line(d,b)+c.line(d,y)+c.line(d,y)+" Z"),{pathTo:S,pathFrom:C,x:v,x1:w,barXPosition:d}}computePyramidLayout(t){const e=this.w,i=e.layout.gridHeight,s=e.layout.gridWidth,a=t.map((t=>Math.abs(Number(t)||0))),r=a.reduce(((t,e)=>t+e),0);if(0===r||i<=0)return a.map((()=>({y:0,height:0,topHalf:0,bottomHalf:0})));const n=s/2;let o=0;const l=[];for(let h=0;h<a.length;h++){const t=o/r;o+=a[h];const e=o/r,s=t*i,c=e*i;l.push({y:s,height:c-s,topHalf:t*n,bottomHalf:e*n})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:i,bottomHalf:s,realIndex:a,j:r,strokeWidth:n,w:o}){var l,h;const c=new D(this.barCtx.w),d=o.layout.gridWidth/2,u=n/2,p=t+u,g=t+e-u,f=d-i,m=d+i,x=d-s,b=d+s,y=c.move(f,p)+c.line(m,p)+c.line(b,g)+c.line(x,g)+" Z";let w=null;const v=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(a,r);return v?w=v:o.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(a,r,y)),null==w&&(w=c.move(d,p)+c.line(d,p)+c.line(d,g)+c.line(d,g)+" Z"),{pathTo:y,pathFrom:w,x:m,x1:f,barXPosition:d}}getBarpaths({barYPosition:t,barHeight:e,x1:i,x2:s,strokeWidth:a,isReversed:r,series:n,seriesGroup:o,realIndex:l,i:h,j:c,w:d}){var u,p,g;const f=new D(this.barCtx.w);(a=Array.isArray(a)?a[l]:a)||(a=0);let m=t,x=e;(null==(u=d.config.series[l].data[c])?void 0:u.barHeightOffset)&&(m=t-d.config.series[l].data[c].barHeightOffset/2,x=e+d.config.series[l].data[c].barHeightOffset);const b=a/2,y=m+b,w=m+x-b,v=(n[h][c]>=0?1:-1)*(r?-1:1);i+=.001+b*v,s+=.001-b*v;const A=this.barCtx.isFunnel,_=A?(i+s)/2:i,S=f.line(i,w),C="around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z",k=f.move(i,y)+f.line(s,y)+f.line(s,w)+S+C;let M=k;"none"!==this.arrBorderRadius[l][c]&&(M=f.roundPathCorners(M,d.config.plotOptions.bar.borderRadius));let P=null;const L=null==(g=null==(p=this.barCtx.ctx)?void 0:p.morphTypeChange)?void 0:g.getInitialPathFor(l,c);if(L?P=L:d.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(l,c,M,k)),null==P){const t=A?f.line(_,w):S;P=f.move(_,y)+f.line(_,y)+t+t+t+t+t+f.line(_,y)+C}if(d.config.chart.stacked){let t=this.barCtx;t=this.barCtx[o],t.xArrj.push(s+b*v),t.xArrjF.push(Math.abs(i-s-a*v)),t.xArrjVal.push(this.barCtx.series[h][c])}return{pathTo:M,pathFrom:P,drawnBox:{x1:i,x2:s,y1:y,y2:w}}}getXForValue(t,e,i=!0){let s=i?e:null;return"undefined"!==typeof t&&null!==t&&(s=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),s}getYForValue(t,e,i,s=!0){let a=s?e:null;return"undefined"!==typeof t&&null!==t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}getGoalValues(t,e,i,s,a,r){const n=this.w,o=[],l=(s,a)=>{o.push({[t]:"x"===t?this.getXForValue(s,e,!1):this.getYForValue(s,i,r,!1),attrs:a})};if(n.seriesData.seriesGoals[s]&&n.seriesData.seriesGoals[s][a]&&Array.isArray(n.seriesData.seriesGoals[s][a])&&n.seriesData.seriesGoals[s][a].forEac
1h((t=>{l(t.value,t)})),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(s,a);if(e.length){const i={strokeHeight:"x"===t?0:n.globals.markers.size[s],strokeWidth:"x"===t?n.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round"};let r=0,o=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[o].value&&(o=t);const h=n.config.plotOptions.bar.dumbbell.dataLabels;e.forEach(((t,e)=>{const n=u(d({},i),{strokeColor:t.color});!h.enabled||e!==r&&e!==o||(n.label={text:this.getDumbbellLabelText(t.value,s,a,t.index),color:h.colorFromMarker?t.color:Array.isArray(h.style.colors)?h.style.colors[t.index]||h.style.colors[0]:h.style.colors,outward:e===r&&r!==o?-1:1}),l(t.value,n)}))}}return o}getDumbbellEnds(t,e){const i=this.w,s=[],a=i.dumbbellData;if(a&&"series"===a.form){const t=a.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===a.hidden.indexOf(e)&&s.push({value:r,color:i.globals.colors[e],index:e})}return s}if(!i.rangeData.seriesRange.length)return s;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:i.globals.colors,n=e=>Array.isArray(r[t])?r[t][e]:r[t];return[{value:i.rangeData.seriesRangeStart[t][e],color:n(0),index:0},{value:i.rangeData.seriesRangeEnd[t][e],color:n(1),index:1}]}getDumbbellLabelText(t,e,i,s){const a=this.w,r=a.config.plotOptions.bar.dumbbell.dataLabels;if("function"===typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:i,endpointIndex:s,w:a});const n=this.barCtx.isHorizontal?a.formatters.xLabelFormatter:a.formatters.yLabelFormatters[0];return"function"===typeof n?n(t,i,a):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:i,goalY:s,barWidth:a,barHeight:r}){if(!(Array.isArray(i)&&i.length>0||Array.isArray(s)&&s.length>0))return null;const n=new D(this.barCtx.w),o=n.group({class:"apexcharts-bar-goals-groups"});o.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:o.node}),o.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((t=>{if(t.x>=-1&&t.x<=n.w.layout.gridWidth+1){const i="undefined"!==typeof t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,s=e+i+r/2;l=n.drawLine(t.x,s-2*i,t.x,s,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),o.add(l),t.attrs.label&&o.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:s-i,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}})):Array.isArray(s)&&s.forEach((e=>{if(e.y>=-1&&e.y<=n.w.layout.gridHeight+1){const i="undefined"!==typeof e.attrs.strokeWidth?e.attrs.strokeWidth:a/2,s=t+i+a/2;l=n.drawLine(s-2*i,e.y,s,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),o.add(l),e.attrs.label&&o.add(this.drawDumbbellLabel(e.attrs,{x:s-i,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}})),o}drawDumbbellLabel(t,e){const i=this.w,s=new D(i),a=i.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+a.offset,n=t.label.outward;return s.drawText({x:e.x+(e.horizontal?r*n:0),y:e.y-(e.horizontal?0:r*n),text:t.label.text,textAnchor:e.horizontal?n<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":n<0?"hanging":"auto",foreColor:t.label.color,fontSize:a.style.fontSize,fontFamily:a.style.fontFamily,fontWeight:a.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:i,realIndex:s,j:a}){const r=this.w,{x:n,x1:o,barYPosition:l}=t,{x:h,x1:c,barYPosition:d}=e,u=l+e.barHeight,p=new D(this.barCtx.w),g=new Vt,f=p.move(o,u)+p.line(n,u)+p.line(h,d)+p.line(c,d)+p.line(o,u)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[s][a]?" Z":" z");return p.drawPath({d:f,fill:g.shadeColor(.5,Vt.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var i;const s=this.w;let a=0,r=0;return(s.config.plotOptions.bar.horizontal?s.seriesData.series.map(((t,e)=>e)):(null==(i=s.globals.columnSeries)?void 0:i.i.map((t=>
vendor: 6,855 bytes, line 1
1t)))||[]).forEach((i=>{const n=s.globals.seriesPercent[i][e];n&&a++,i<t&&0===n&&r++})),{nonZeroColumns:a,zeroEncounters:r}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex((i=>i.indexOf(e.seriesData.seriesNames[t])>-1))}getGroupIndex(t){const e=this.w,i=e.labelData.seriesGroups.findIndex((i=>i.indexOf(e.seriesData.seriesNames[t])>-1)),s=this.barCtx.columnGroupIndices;let a=s.indexOf(i);return a<0&&(s.push(i),a=s.length-1),{groupIndex:i,columnGroupIndex:a}}}(this)}draw(t,e){var i,s,a;const r=this.w,n=new D(this.w),o=new S(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const l=n.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let h=0,c=0;h<t.length;h++,c++){let o,p;const g=[],f=[],m=r.globals.comboCharts?e[h]:h,{columnGroupIndex:x}=this.barHelpers.getGroupIndex(m),b=n.group({class:"apexcharts-series",rel:h+1,seriesName:Vt.escapeString(r.seriesData.seriesNames[m]),"data:realIndex":m});X.addCollapsedClassToSeries(this.w,b,m),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[m],this.translationsIndex=m);const y=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const w=this.barHelpers.initialPositions(m),{y:v,yDivision:A,zeroW:_,x:S,xDivision:C,zeroH:k}=w;let M=w.barHeight,P=w.barWidth;p=v,o=S,this.isHorizontal||f.push(o+(null!=P?P:0)/2);const L=n.group({class:"apexcharts-datalabels","data:realIndex":m});r.globals.delayedElements.push({el:L.node,holdUntilComplete:!(null==(i=r.config.dataLabels.animate)?void 0:i.enabled)&&this.isLengthTransition(m)}),L.node.classList.add("apexcharts-element-hidden");const E=n.group({class:"apexcharts-bar-goals-markers"}),D=n.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:D.node}),D.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const i=this.barHelpers.getStrokeWidth(h,e,m);let n=null;const l={indexes:{i:h,j:e,realIndex:m,translationsIndex:y,bc:c},x:o,y:p,strokeWidth:i,elSeries:b};this.isHorizontal?(n=this.drawBarPaths(u(d({},l),{barHeight:M,zeroW:_,yDivision:A})),P=this.series[h][e]/this.invertedYRatio):(n=this.drawColumnPaths(u(d({},l),{xDivision:C,barWidth:P,zeroH:k})),M=this.series[h][e]/this.yRatio[y]);const w=this.barHelpers.getPathFillColor(t,h,e,m);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(s=r.config.plotOptions.funnel)?void 0:s.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"===typeof w.color&&-1===(null==(a=w.color)?void 0:a.indexOf("url"))?w.color:Vt.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:n,realIndex:m,j:e});if(D.add(t),r.config.chart.dropShadow.enabled){new I(this.w).dropShadow(t,r.config.chart.dropShadow,m)}}this.pathArr.push(n);const v=this.barHelpers.drawGoalLine({barXPosition:n.barXPosition,barYPosition:n.barYPosition,goalX:n.goalX,goalY:n.goalY,barHeight:M,barWidth:P});v&&E.add(v),p=n.y,o=n.x,e>0&&f.push(o+(null!=P?P:0)/2),g.push(p),this.renderSeries(u(d({realIndex:m,pathFill:w.color},w.useRangeColor?{lineFill:w.color}:{}),{j:e,i:h,columnGroupIndex:x,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:i,elSeries:b,x:o,y:p,series:t,barHeight:Math.abs(n.barHeight?n.barHeight:M),barWidth:Math.abs(n.barWidth?n.barWidth:P),elDataLabelsWrap:L,elGoalsMarkers:E,elBarShadows:D,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[m]=f,r.globals.seriesYvalues[m]=g,r.globals.previousPaths.length>0){const e=[];for(let i=0;i<t[h].length;i++)e.push(Li(r,m,i));zi({w:r,elSeries:b,record:this._prevRecord(m),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}l.add(b)}return l}renderSeries({realIndex:t,pathFill:e,lineFill:i,j:s,i:a,columnGroupIndex:r,pathFrom:n,pathTo:o,strokeWidth:l,elSeries:h,x:c,y:d,y1:u,y2:p,series:g,barHeight:m,barWidth:x,barXPosition:b,barYPosition:y,elDataLabelsWrap:w,elGoalsMarkers:v,elBarShadows:A,visibleSeries:_,type:S,classes:C}){var k,M,P,L,E,F,R;const z=this.w,T=new D(this.w,this.ctx),X=Ve(this.ctx,T);let O=!1;const W=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,T.setupEventDelegation(h,`.apexcharts-${S}-area`)),!i){let e=function(t){const e=z.config.stroke.colors;let i;return Array.isArray(e)&&e.length>0&&(i=e[t],i||(i=""),"function"===typeof i)?i({value:z.seriesData.series[t][s],dataPointIndex:s,w:z}):i};const a="function"===typeof z.globals.stroke.colors[t]?e(t):z.globals.stroke.colors[t];i=this.barOptions.distributed?z.globals.stroke.colors[s]:a}const $=z.config.chart.animations,Y=$.animateGradually;let B=0,N=0;if(Y&&!1!==Y.enabled&&!(z.globals.dataChanged&&this.isLayoutShift(t))){const t=z.globals.dataPoints||1,e=Y.delay||0,i=Math.min(e,.5*$.speed/Math.max(1,t));N=f({style:"sequential",index:s,baseDelay:i}),z.config.chart.stacked&&!z.globals.dataChanged&&(N+=a*i*.5);B=N/(e||1)}const H=new Ti(this).handleBarDataLabels({x:c,y:d,y1:u,y2:p,i:a,j:s,series:g,realIndex:t,columnGroupIndex:r,barHeight:m,barWidth:x,barXPosition:b,barYPosition:y,visibleSeries:_});if(N>0){const t=z.config.dataLabels;if((null==(k=t.animate)?void 0:k.enabled)||(null==(M=t.countUp)?void 0:M.enabled)){const t=String(Math.round(N));null==(L=null==(P=H.dataLabels)?void 0:P.node)||L.setAttribute("data:dlDelay",t),null==(F=null==(E=H.totalDataLabels)?void 0:E.node)||F.setAttribute("data:dlDelay",t)}}if(z.globals.isBarHorizontal||(H.dataLabelsPos.dataLabelsX+Math.max(x,z.globals.barPadForNumericAxis)<0||H.dataLabelsPos.dataLabelsX-Math.max(x,z.globals.barPadForNumericAxis)>z.layout.gridWidth)&&(O=!0),z.config.series[a].data[s]&&z.config.series[a].data[s].strokeColor&&(i=z.config.series[a].data[s].strokeColor),this.isNullValue&&-1===z.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!O){const r=!0===(null==(R=this.ctx.morphTypeChange)?void 0:R.isActive()),c=r?this.ctx.morphTypeChange.getSpeed():z.config.chart.animations.dynamicAnimation.speed,d=r&&this.ctx.morphTypeChange.claimsTargetMark(t,s);d&&(n=o,B=0);const g=X.renderPaths({i:a,j:s,realIndex:t,pathFrom:n,pathTo:o,stroke:i,strokeWidth:l,strokeLineCap:z.config.stroke.lineCap,fill:e,pathToInterp:W,animationDelay:B,initialSpeed:z.config.chart.animations.speed,dataChangeSpeed:c,className:`apexcharts-${S}-area${C?` ${C}`:""}`,chartType:S,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${z.globals.cuid}
1)`),d&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const f=z.config.forecastDataPoints;f.count>0&&s>=z.globals.dataPoints-f.count&&(g.node.setAttribute("stroke-dasharray",f.dashArray),g.node.setAttribute("stroke-width",f.strokeWidth),g.node.setAttribute("fill-opacity",f.fillOpacity)),"undefined"!==typeof u&&"undefined"!==typeof p&&(g.attr("data-range-y1",u),g.attr("data-range-y2",p));new I(this.w).setSelectionFilter(g,t,s),h.add(g),g.attr({cy:H.dataLabelsPos.bcy,cx:H.dataLabelsPos.bcx,j:s,val:z.seriesData.series[a][s],barHeight:m,barWidth:x,"data:pathKey":Li(z,t,s)}),"canvas"===X.kind&&(z.globals.barCanvasCoords||(z.globals.barCanvasCoords={}),z.globals.barCanvasCoords[t]||(z.globals.barCanvasCoords[t]={}),z.globals.barCanvasCoords[t][s]={cx:H.dataLabelsPos.bcx,cy:H.dataLabelsPos.bcy,barWidth:x}),null!==H.dataLabels&&w.add(H.dataLabels),H.totalDataLabels&&w.add(H.totalDataLabels),h.add(w),v&&h.add(v),A&&h.add(A)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:i,zeroW:s,x:a,y:r,yDivision:n,elSeries:o}){const l=this.w,h=t.i,c=t.j;let d;if(l.axisFlags.isXNumeric)d=(r=(l.seriesData.seriesX[h][c]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:i}=this.barHelpers.getZeroValueEncounters({i:h,j:c});t>0&&(e=this.seriesLen*e/t),d=r+e*this.visibleI,d-=e*i}else d=r+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[c]:null,g=!!p;if(p)d=p.y,e=p.height;else if(this.isFunnel&&!u){const t=null!=s?s:0;s=t-(this.barHelpers.getXForValue(this.series[h][c],t)-t)/2}let f;return a=this.barHelpers.getXForValue(this.series[h][c],null!=s?s:0),f=p?this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:e,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:t.realIndex,j:c,strokeWidth:i,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:this.series,i:h,j:c,realIndex:t.realIndex,strokeWidth:i,w:l}):this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:c,w:l}),(u||g)&&(s=f.x1,a=f.x),l.axisFlags.isXNumeric||g||(r+=n),g&&(r=d),this.barHelpers.barBackground({j:c,i:h,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:o}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:s,x:a,y:r,goalX:this.barHelpers.getGoalValues("x",s,null,t.realIndex,c,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:i,xDivision:s,barWidth:a,zeroH:r,strokeWidth:n,elSeries:o}){const l=this.w,h=t.realIndex,c=t.translationsIndex,d=t.i,u=t.j,p=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:a});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:i}=this.barHelpers.getZeroValueEncounters({i:d,j:u});t>0&&(a=this.seriesLen*a/t),g=e+a*this.visibleI,g-=a*i}else g=e+a*this.visibleI;i=this.barHelpers.getYForValue(this.series[d][u],r,c);const f=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:r,y2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:u,w:l});return l.axisFlags.isXNumeric||(e+=s),this.barHelpers.barBackground({bc:p,j:u,i:d,x1:g-n/2-a*this.visibleI,x2:a*this.seriesLen+n/2,elSeries:o}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x:e,y:i,goalY:this.barHelpers.getGoalValues("y",null,r,h,u,c),barXPosition:g,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:i,j:s}){const a=this.w;let r=i;return a.seriesData.seriesX[i].length||(r=a.globals.maxValsInArrayIndex),Vt.isNumber(a.seriesData.seriesX[r][s])&&(t=oe.dataXToPx(a,a.seriesData.seriesX[r][s])-e*this.seriesLen/2),{barXPosition:t+(Xi(a)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let i=null;for(let s=0;s<e.globals.previousPaths.length;s++){const a=e.globals.previousPaths[s];a.paths&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&(i=a)}return i}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let i=null;if(e&&e.paths.every((t=>null!=t.key))){const t=new Map;e.paths.forEach((e=>{t.set(e.key,e)})),i=t}return this._prevKeyed[t]=i,i}
vendor: 37,122 bytes, line 1
1isLengthTransition(t){var e,i;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const s=this.w;let a=!1;if(Pi(s)&&s.globals.previousPaths.length>0){const r=this._prevRecord(t),n=null!=(i=null==(e=s.seriesData.series[t])?void 0:e.length)?i:0;if(r)if(r.paths.length!==n)a=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let i=0;i<n;i++)if(!e.has(Li(s,t,i))){a=!0;break}}else a=n>0}return this._ltCache[t]=a,a}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=Ei(this.w,t,!0,!0),i=!(!e||!e.join.changed);return this._layoutShiftCache[t]=i,i}getPreviousPath(t,e,i,s){const a=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return Pi(a)?null:i;let n=null,o=!1;const l=this._prevKeyedPaths(t);if(l){const i=l.get(Li(a,t,e));i?n=i.d:o=!0}else"undefined"!==typeof r.paths[e]?n=r.paths[e].d:o=!0;if(n){const t=Oi.pathCommandCount(n),e=Oi.pathCommandCount(i);if(t===e)return n;const r=new D(a),o=t=>{const e=Oi.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?o(n)>1:o(i)>1;if(t<e){const t=r.roundPathCorners(n,0);if(Oi.pathCommandCount(t)===e){if(l&&s){const t=r.roundPathCorners(s,0);Oi.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(i,0);if(Oi.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=Oi.squareLike(n),i=e?r.roundPathCorners(e,0):null;if(i&&Oi.pathCommandCount(i)===t)return i}return n}}}return o&&Pi(a)?null:i}static pathBox(t){if(!t)return null;const e=[],i=/([MLC])([^MLCZz]*)/g;let s;for(;null!==(s=i.exec(t));){const t=s[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const a=e.map((t=>t[0])),r=e.map((t=>t[1]));return{minX:Math.min(...a),maxX:Math.max(...a),minY:Math.min(...r),maxY:Math.max(...r),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=Oi.pathBox(t);if(!e)return null;const{minX:i,maxX:s,minY:a,maxY:r,start:n,vertical:o}=e,l=(t,e,i)=>Math.abs(t-e)<=Math.abs(t-i)?[e,i]:[i,e];let h,c,d,u;o?(h=Math.abs(n[0]-i)<=Math.abs(n[0]-s)?i:s,c=h===i?s:i,[d,u]=l(n[1],a,r)):(d=Math.abs(n[1]-a)<=Math.abs(n[1]-r)?a:r,u=d===a?r:a,[h,c]=l(n[0],i,s));const p=t.trim().endsWith("Z")?" Z":" z";return o?`M ${h} ${d} L ${h} ${u} L ${c} ${u} L ${c} ${d}${p}`:`M ${h} ${d} L ${c} ${d} L ${c} ${u} L ${h} ${u}${p}`}getPreviousFlip(t,e){const i=this.w,s=this._prevRecord(t);if(!s)return null;const a=this._prevKeyedPaths(t),r=a?a.get(Li(i,t,e)):s.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}function Wi({w:t,points:e,seedA:i,seedB:s,center:a,halfExtent:r,alongFn:n,isHorizontal:o,options:l,clampAt:h,sideSign:c}){const d=l;if(!d||!1===d.show)return[];if(!e||!e.length)return[];const u=d.maxPoints||3e3,p=e.length>u?Math.ceil(e.length/u):1,g=null!=d.size?d.size:2.5,f=r*(null!=d.jitter?d.jitter:.5),m=!1!==d.constrainToViolin&&"function"===typeof h,x="square"===d.shape,b=d.colorScale,y=b&&Array.isArray(b.colors)&&b.colors.length>0,w=y?Math.max(2,b.steps||24):1,v=y&&null!=b.min?b.min:t.globals.minY,A=(y&&null!=b.max?b.max:t.globals.maxY)-v||1,_=y?new Array(w).fill(""):[""];for(let C=0;C<e.length;C+=p){const t=e[C],r=n(t);let l=2*(Ni(7919*i+100003*s+C)-.5)*f;if(m){const e=h(t);l>e&&(l=e),l<-e&&(l=-e)}c&&(l=Math.abs(l)*c);const d=o?r:a+l,u=o?a+l:r,p=x?ji(d,u,g):Hi(d,u,g);if(y){let e=(t-v)/A;e<0&&(e=0),e>1&&(e=1),_[Math.round(e*(w-1))]+=p}else _[0]+=p}if(!y)return _[0]?[{fill:null,d:_[0]}]:[];const S=[];for(let C=0;C<w;C++)_[C]&&S.push({fill:Bi(b.colors,C/(w-1)),d:_[C]});return S}function $i({graphics:t,w:e,elSeries:i,pointsByCat:s,options:a,distributed:r,realIndex:n,wrapClass:o,pointClass:l}){if(!a||!1===a.show||!s.length)return;const h=null!=a.opacity?a.opacity:.9,c=null!=a.strokeColor?a.strokeColor:"#fff",d=null!=a.strokeWidth?a.strokeWidth:1,u=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,p=t.group({class:u?`${o} apexcharts-element-hidden`:o});u&&e.globals.delayedElements.push({el:p.node}),s.forEach((({groups:i,j:s})=>{const o=r?e.globals.colors[s]:e.globals.colors[n],u=a.fillColor,g="series"===u?o:"series-dark"===u?Yi(o,.45):u||Yi(o,.45);i.forEach((i=>{const a=t.drawPath({d:i.d,fill:null!=i.fill?i.fill:g,stroke:d>0?c:"none",strokeWidth:d,fillOpacity:h,classes:l});a.attr("data:realIndex",n),a.attr("j",s),a.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),a.node.style.pointerEvents="none",p.add(a)}))})),i.add(p)}function Yi(t,e){const i=Vt.parseHex(t);if(!i)return t;const s=Math.max(0,1-e);return`rgb(${Math.round(i[0]*s)},${Math.round(i[1]*s)},${Math.round(i[2]*s)})`}function Bi(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const i=Math.max(0,Math.min(1,e))*(t.length-1),s=Math.floor(i),a=i-s,r=Vt.parseHex(t[s])||[0,0,0],n=Vt.parseHex(t[Math.min(s+1,t.length-1)])||r,o=(t,e)=>Math.round(t+(e-t)*a);return`rgb(${o(r[0],n[0])},${o(r[1],n[1])},${o(r[2],n[2])})`}function Ni(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function Hi(t,e,i){return`M ${t-i} ${e} a ${i} ${i} 0 1 0 ${2*i} 0 a ${i} ${i} 0 1 0 ${-2*i} 0 `}function ji(t,e,i){return`M ${t-i} ${e-i} h ${2*i} v ${2*i} h ${-2*i} z `}class Vi extends Oi{draw(t,e,i){var s;const a=this.w,r=new D(this.w),n=a.globals.comboCharts?e:a.config.chart.type,o=new L(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&"ohlc"===this.candlestickOptions.type,this.coreUtils=new S(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const l=r.group({class:`apexcharts-${n}-series apexcharts-plot-series`});for(let h=0;h<t.length;h++){let e,n;this.isBoxPlot="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[h].type;const c=[],p=[],g=a.globals.comboCharts?i[h]:h,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(g),m=r.group({class:"apexcharts-series",seriesName:Vt.escapeString(a.seriesData.seriesNames[g]),rel:h+1,"data:realIndex":g});X.addCollapsedClassToSeries(this.w,m,g),t[h].length>0&&(this.visibleI=this.visibleI+1);let x=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g][0],x=g);const b=this.barHelpers.initialPositions(g),{y:y,barHeight:w,yDivision:v,zeroW:A,x:_,barWidth:S,xDivision:C,zeroH:k}=b;n=y,e=_,p.push(e+(null!=S?S:0)/2);const M=r.group({class:"apexcharts-datalabels","data:realIndex":g}),P=r.group({class:"apexcharts-bar-goals-markers"}),L=this.isBoxPlot?this.boxOptions.points:null,I=[],E=a.layout.gridWidth,D=null!=S?S:0;for(let i=0;i<a.globals.dataPoints;i++){const r=this.barHelpers.getStrokeWidth(h,i,g);let l=null;const b={indexes:{i:h,j:i,realIndex:g,translationsIndex:x},x:e,y:n,strokeWidth:r,elSeries:m};if(l=this.isHorizontal?this.drawHorizontalBoxPaths(u(d({},b),{yDivision:v,barHeight:w,zeroW:A})):this.drawVerticalBoxPaths(u(d({},b),{xDivision:C,barWidth:S,zeroH:k,cullBounds:{lo:-D,hi:E+D}})),n=l.y,e=l.x,i>0&&p.push(e+(null!=S?S:0)/2),c.push(n),l.culled)continue;const y=this.barHelpers.drawGoalLine({barXPosition:l.barXPosition,barYPosition:l.barYPosition,goalX:l.goalX,goalY:l.goalY,barHeight:w,barWidth:S});if(y&&P.add(y),l.pathTo.forEach(((s,c)=>{const d=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?l.color[c]:a.globals.stroke.colors[h],u=o.fillPath({seriesNumber:g,dataPointIndex:i,color:l.color[c],value:t[h][i]});this.renderSeries({realIndex:g,pathFill:u,lineFill:d,j:i,i:h,pathFrom:l.pathFrom,pathTo:s,strokeWidth:r,elSeries:m,x:e,y:n,series:t,columnGroupIndex:f,barHeight:w,barWidth:S,elDataLabelsWrap:M,elGoalsMarkers:P,visibleSeries:this.visibleI,type:a.config.chart.type})})),L&&!1!==L.show){const t=null==(s=a.candleData.seriesBoxPoints[g])?void 0:s[i];if(t&&t.length){const e=t=>this.coreUtils.getLogValAtSeriesIndex(t,g);let s,r,n;if(this.isHorizontal){const t=this.invertedYRatio,i=null!=w?w:0,a=null!=A?A:0;s=l.barYPosition+i/2,r=i/2,n=i=>a+e(i)/t}else{const t=this.yRatio[x],i=null!=S?S:0,a=null!=k?k:0;s=l.barXPosition+i/2,r=i/2,n=i=>a-e(i)/t}const o=Wi({w:a,points:t,seedA:g,seedB:i,center:s,halfExtent:r,alongFn:n,isHorizontal:this.isHorizontal,options:L});o.length&&I.push({groups:o,j:i})}}}L&&$i({graphics:r,w:a,elSeries:m,pointsByCat:I,options:L,distributed:a.config.plotOptions.bar.distributed,realIndex:g,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[g]=p,a.globals.seriesYvalues[g]=c,l.add(m)}return l}drawVerticalBoxPaths({indexes:t,x:e,xDivision:i,barWidth:s,zeroH:a,strokeWidth:r,cullBounds:n=null}){var o,l,h,c;const d=this.w,u=new D(this.w),p=t.i,g=t.j,{colors:f}=d.config.plotOptions.candlestick,{colors:m}=this.boxOptions,x=t.realIndex,b=t=>Array.isArray(t)?t[x]:t,y=b(f.upward),w=b(f.downward),v=this.yRatio[t.translationsIndex],A=this.getOHLCValue(x,g);let _=a,S=a,C=A.o<A.c?[y]:[w];this.isBoxPlot&&(C=[b(m.lower),b(m.upper)]);let k=Math.min(A.o,A.c),M=Math.max(A.o,A.c),P=A.m;d.axisFlags.isXNumeric&&(e=(d.seriesData.seriesX[x][g]-d.globals.minX)/this.xRatio-s/2);const L=e+s*this.visibleI;if("undefined"===typeof(null==(o=this.series[p])?void 0:o[g])||null===(null==(l=this.series[p])?void 0:l[g])?(k=a,M=a):(k=a-k/v,M=a-M/v,_=a-A.h/v,S=a-A.l/v,P=a-A.m/v),n&&(L+s<n.lo||L>n.hi))return{pathTo:null,pathFrom:null,x:d.axisFlags.isXNumeric?e:e+i,y:M,barXPosition:L,color:C,culled:!0};let I;if(this.isOHLC){const t=L+s/2,e=a-A.o/v,i=a-A.c/v;I=[u.move(t,_)+u.line(t,S)+u.move(t,e)+u.line(L,e)+u.move(t,i)+u.line(L+s,i)]}else I=this.isBoxPlot?[u.move(L,k)+u.line(L+s/2,k)+u.line(L+s/2,_)+u.line(L+s/4,_)+u.line(L+s-s/4,_)+u.line(L+s/2,_)+u.line(L+s/2,k)+u.line(L+s,k)+u.line(L+s,P)+u.line(L,P)+u.line(L,k+r/2),u.move(L,P)+u.line(L+s,P)+u.line(L+s,M)+u.line(L+s/2,M)+u.line(L+s/2,S)+u.line(L+s-s/4,S)+u.line(L+s/4,S)+u.line(L+s/2,S)+u.line(L+s/2,M)+u.line(L,M)+u.line(L,P)+"z"]:[u.move(L,M)+u.line(L+s/2,M)+u.line(L+s/2,_)+u.line(L+s/2,M)+u.line(L+s,M)+u.line(L+s,k)+u.line(L+s/2,k)+u.line(L+s/2,S)+u.line(L+s/2,k)+u.line(L,k)+u.line(L,M-r/2)];let E=null;const F=null==(c=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:c.getInitialPathFor(x,g);return F?E=F:d.globals.previousPaths.length>0&&(E=this.getPreviousPath(x,g,I[0])),null==E&&(E=u.move(L+s/2,k)+u.move(L,k)),d.axisFlags.isXNumeric||(e+=i),{pathTo:I,pathFrom:E,x:e,y:M,goalY:this.barHelpers.getGoalValues("y",null,a,x,g,t.translationsIndex),barXPosition:L,color:C}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:i,barHeight:s,zeroW:a,strokeWidth:r}){var n,o,l,h;const c=this.w,d=new D(this.w),u=t.i,p=t.j,g=t.realIndex,{colors:f}=c.config.plotOptions.candlestick,{colors:m}=this.boxOptions,x=t=>Array.isArray(t)?t[g]:t,b=this.invertedYRatio,y=this.getOHLCValue(g,p);let w=y.o<y.c?[x(f.upward)]:[x(f.downward)];this.isBoxPlot&&(w=[x(m.lower),x(m.upper)]);let v=a,A=a,_=Math.min(y.o,y.c),S=Math.max(y.o,y.c),C=y.m;c.axisFlags.isXNumeric&&(e=(c.seriesData.seriesX[g][p]-c.globals.minX)/this.invertedXRatio-s/2);const k=e+s*this.visibleI;"undefined"===typeof(null==(n=this.series[u])?void 0:n[p])||null===(null==(o=this.series[u])?void 0:o[p])?(_=a,S=a):(_=a+_/b,S=a+S/b,v=a+y.h/b,A=a+y.l/b,C=a+y.m/b);const M=[d.move(_,k)+d.line(_,k+s/2)+d.line(v,k+s/2)+d.line(v,k+s/2-s/4)+d.line(v,k+s/2+s/4)+d.line(v,k+s/2)+d.line(_,k+s/2)+d.line(_,k+s)+d.line(C,k+s)+d.line(C,k)+d.line(_+r/2,k),d.move(C,k)+d.line(C,k+s)+d.line(S,k+s)+d.line(S,k+s/2)+d.line(A,k+s/2)+d.line(A,k+s-s/4)+d.line(A,k+s/4)+d.line(A,k+s/2)+d.line(S,k+s/2)+d.line(S,k)+d.line(C,k)+"z"];let P=null;const L=null==(h=null==(l=this.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(g,p);return L?P=L:c.globals.previousPaths.length>0&&(P=this.getPreviousPath(g,p,M[0])),null==P&&(P=d.move(_,k+s/2)+d.move(_,k)),c.axisFlags.isXNumeric||(e+=i),{pathTo:M,pathFrom:P,x:S,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,g,p,0),barYPosition:k,color:w}}getOHLCValue(t,e){const i=this.w,s=this.coreUtils,a=i=>i[t]&&null!=i[t][e]?s.getLogValAtSeriesIndex(i[t][e],t):0,r=a(i.candleData.seriesCandleH),n=a(i.candleData.seriesCandleO),o=a(i.candleData.seriesCandleM),l=a(i.candleData.seriesCandleC),h=a(i.candleData.seriesCandleL);return{o:this.isBoxPlot?r:n,h:this.isBoxPlot?n:r,m:o,l:this.isBoxPlot?l:h,c:this.isBoxPlot?h:l}}}const Gi=t=>{const e=function(t){const e=[];let i=t[0],s=t[1],a=e[0]=Ui(i,s),r=1;for(let n=t.length-1;r<n;r++)i=s,s=t[r+1],e[r]=.5*(a+(a=Ui(i,s)));return e[r]=a,e}(t),i=t.length-1,s=[];let a,r,n,o;for(let l=0;l<i;l++)n=Ui(t[l],t[l+1]),Math.abs(n)<1e-6?e[l]=e[l+1]=0:(a=e[l]/n,r=e[l+1]/n,o=a*a+r*r,o>9&&(o=3*n/Math.sqrt(o),e[l]=o*a,e[l+1]=o*r));for(let l=0;l<=i;l++)o=(t[Math.min(i,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+e[l]*e[l])),s.push([o||0,e[l]*o||0]);return s},qi=t=>{let e="";for(let i=0;i<t.length;i++){const s=t[i],a=s.length;a>4?(e+=`C${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`,e+=`, ${s[4]}, ${s[5]}`):a>2&&(e+=`S${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`)}return e},Zi={points(t){const e=Gi(t),i=t[1],s=t[0],a=[],r=e[1],n=e[0];a.push(s,[s[0]+n[0],s[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(let o=2,l=e.length;o<l;o++){const i=t[o],s=e[o];a.push([i[0]-s[0],i[1]-s[1],i[0],i[1]])}return a},slice(t,e,i){const s=t.slice(e,i);if(e){if(i-e>1&&s[1].length<6){const t=s[0].length;s[1]=[2*s[0][t-2]-s[0][t-4],2*s[0][t-1]-s[0][t-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function Ui(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ki(t){const e=[];for(let i=0;i<t.length;i+=2)e.push(t[i+1],t[i]);return e}function Ji(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function Qi(t,e){let i=e;if("string"===typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(i=e/100)}else"number"===typeof t&&isFinite(t)&&(i=t);return Math.min(.5,Math.max(0,i))}function ts({halfExtent:t,cloudSign:e,rainSign:i,boxFrac:s,rainFrac:a}){const r=s*t,n=0===i?t:a*t,o=0===i?0:i*(t-n);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:o,rainHalfPx:n};const l=0===i?0:a,h=2*Math.max(0,1-l-s)*t,c=e*(t-h);return{cloudBaseOff:c,cloudMaxPx:h,boxCenterOff:c-e*r,boxHalfPx:r,rainCenterOff:o,rainHalfPx:n}}class es{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((t=>{t.from<=0&&(e=!0)})),e}getShadeColor(t,e,i,s){const a=this.w;let r=1;const n=a.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);a.globals.hasNegs||s?r=a.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));let l=o.color;const h=new Vt;if(a.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){const t=h.shadeColor(-1*r,o.color);l=Vt.hexToRgba(Vt.isColorHex(t)?t:Vt.rgb2hex(t),a.config.fill.opacity)}else{const t=h.shadeColor(r,o.color);l=Vt.hexToRgba(Vt.isColorHex(t)?t:Vt.rgb2hex(t),a.config.fill.opacity)}return{color:l,colorProps:o}}determineColor(t,e,i){const s=this.w,a=s.seriesData.series[e][i],r=s.config.plotOptions[t];let n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===s.config.chart.type&&(n=i);let o,l,h=s.globals.colors[n],c=null;if(r.distributed||"heatmap"!==t){const t=s.seriesData.series[e];o=t.length?t[0]:0,l=o;for(let e=1;e<t.length;e++)t[e]<o&&(o=t[e]),t[e]>l&&(l=t[e])}else o=s.globals.minY,l=s.globals.maxY;const d=r.colorScale.min,u=r.colorScale.max;"undefined"!==typeof d&&"undefined"!==typeof u&&u>d?(o=d,l=u):"undefined"!==typeof d&&(o=d<s.globals.minY?d:s.globals.minY,l=u>s.globals.maxY?u:s.globals.maxY);const p=Math.abs(l)+Math.abs(o),g=Math.min(Math.max(a,o),l);let f=0===p?0:100*g/p;if(r.colorScale.ranges.length>0){r.colorScale.ranges.map((t=>{if(a>=t.from&&a<=t.to){h=t.color,c=t.foreColor?t.foreColor:null,o=t.from,l=t.to;const e=Math.abs(l)+Math.abs(o);f=0===e?0:100*a/e}}))}return{color:h,foreColor:c,percent:f}}calculateDataLabels({text:t,x:e,y:i,i:s,j:a,colorProps:r,fontSize:n}){const o=this.w,l=o.config.dataLabels,h=new D(this.w),c=new M(this.w,this.ctx);let d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});const u=mi(l.offsetX,o,s,a),p=mi(l.offsetY,o,s,a),g=e+u,f=i+parseFloat(l.style.fontSize)/3+p;c.plotDataLabelsText({x:g,y:f,text:t,i:s,j:a,color:r.foreColor,parent:d,fontSize:n,dataLabelsConfig:l})}return d}}class is{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){const i=this.w;if("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t]){if(new S(this.lineCtx.w).seriesHaveSameValues(t)){const i=e[t].slice();i[i.length-1]=i[i.length-1]+1e-6,e[t]=i}}return e}calculatePoints({series:t,realIndex:e,x:i,y:s,i:a,j:r,prevY:n}){const o=this.w,l=[],h=[];let c=this.lineCtx.categoryAxisCorrection+o.config.markers.offsetX;return o.axisFlags.isXNumeric&&(c=(o.seriesData.seriesX[e][0]-o.globals.minX)/this.lineCtx.xRatio+o.config.markers.offsetX),0===r&&(l.push(c),h.push(Vt.isNumber(t[a][0])?n+o.config.markers.offsetY:null)),l.push(i+o.config.markers.offsetX),h.push(Vt.isNumber(t[a][r+1])?s+o.config.markers.offsetY:null),{x:l,y:h}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:i}){const s=this.w;for(let a=0;a<s.globals.previousPaths.length;a++){const r=s.globals.previousPaths[a];("line"===r.type||"area"===r.type)&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(i,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[a].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[a].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[a].paths[1]&&(t=s.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:i,prevY:s,lineYPosition:a,translationsIndex:r}){var n,o,l;const h=this.w,c=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(n=this.w.config.series[e])?void 0:n.type)||"column"===(null==(o=this.w.config.series[e])?void 0:o.type));if("undefined"!==typeof(null==(l=i[t])?void 0:l[0])){if(c)if(t>0){const t=this.lineCtx.stackTopAt(e,0);a=void 0===t?this.lineCtx.zeroY:t}else a=this.lineCtx.zeroY;else a=this.lineCtx.zeroY;s=a-i[t][0]/this.lineCtx.yRatio[r]+2*(this.lineCtx.isReversed?i[t][0]/this.lineCtx.yRatio[r]:0)}else if(c&&t>0&&"undefined"===typeof i[t][0])for(let d=t-1;d>=0;d--)if(null!==i[d][0]&&"undefined"!==typeof i[d][0]){s=a=this.lineCtx.prevSeriesY[d][0];break}return{prevY:s,lineYPosition:a}}}const ss=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function as(t,e){const{ax:i,bx:s,ay:a,by:r}=e,n=[],o=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let l;for(;null!==(l=o.exec(t));){const t=l[1].toUpperCase(),e=(l[2].match(ss)||[]).map(parseFloat);if("Z"===t){n.push("z");continue}if("H"===t){for(const t of e)n.push(`H ${i*t+s}`);continue}if("V"===t){for(const t of e)n.push(`V ${a*t+r}`);continue}if("A"===t){for(let t=0;t+6<e.length;t+=7)n.push(`A ${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${i*e[t+5]+s} ${a*e[t+6]+r}`);continue}const o=[];for(let n=0;n+1<e.length;n+=2)o.push(`${i*e[n]+s} ${a*e[n+1]+r}`);o.length&&n.push(`${t} ${o.join(" ")}`)}return n.join(" ")}class rs{constructor(t,e,i,s){this.ctx=e,this.w=t,this.xyRatios=i,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new p(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new is(this),this.markers=new F(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(t,e,i,s){var a;const r=this.w,n=new D(this.w),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),h=new S(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const c=[];for(let p=0;p<t.length;p++){t=this.lineHelpers.sameValueSeriesFix(p,t);const e=r.globals.comboCharts?i[p]:p,a=this.yRatio.length>1?e:0;this._initSerieVariables(t,p,e);const n=[],l=[],h=[];let g=r.globals.padHorizontal+this.categoryAxisCorrection;const f=1,m=[],x=[];X.addCollapsedClassToSeries(this.w,this.elSeries,e),r.axisFlags.isXNumeric&&r.seriesData.seriesX.length>0&&(g=(r.seriesData.seriesX[e][0]-r.globals.minX)/this.xRatio),h.push(g);const b=g;let y;const w=b;let v=this.zeroY,A=this.zeroY;const _=0;v=this.lineHelpers.determineFirstPrevY({i:p,realIndex:e,series:t,prevY:v,lineYPosition:_,translationsIndex:a}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[p][0]?n.push(null):n.push(v);const S=v;let C;"rangeArea"===o&&(C=this.lineHelpers.determineFirstPrevY({i:p,realIndex:e,series:s,prevY:A,lineYPosition:_,translationsIndex:a}),A=C.prevY,y=A,l.push(null!==n[0]?A:null));const k=this._calculatePathsFrom({type:o,series:t,i:p,realIndex:e,translationsIndex:a,prevX:w,prevY:v,prevY2:A}),M=[n[0]],P=[l[0]],L={type:o,series:t,realIndex:e,translationsIndex:a,i:p,x:g,y:f,pX:b,pY:S,pathsFrom:k,linePaths:m,areaPaths:x,seriesIndex:i,lineYPosition:_,xArrj:h,yArrj:n,y2Arrj:l,seriesRangeEnd:s},I=this._iterateOverDataPoints(u(d({},L),{iterations:"rangeArea"===o?t[p].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){const t=this._calculatePathsFrom({series:s,i:p,realIndex:e,prevX:w,prevY:A}),i=this._iterateOverDataPoints(u(d({},L),{series:s,xArrj:[g],yArrj:M,y2Arrj:P,pY:y,areaPaths:I.areaPaths,pathsFrom:t,iterations:s[p].length-1,isRangeStart:!1})),a=I.linePaths.length/2;for(let e=0;e<a;e++)I.linePaths[e]=i.linePaths[e+a]+I.linePaths[e];I.linePaths.splice(a),I.pathFromLine=i.pathFromLine+I.pathFromLine}else/z\s*$/i.test(I.pathFromArea)||(I.pathFromArea+="z");this._handlePaths({type:o,realIndex:e,i:p,paths:I}),this.markers.flushBatch(this.elPointsMain,e),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),c.push(this.elSeries)}if("undefined"!==typeof(null==(a=r.config.series[0])?void 0:a.zIndex)&&c.sort(((t,e)=>Number(t.node.getAttribute("zIndex"))-Number(e.node.getAttribute("zIndex")))),r.config.chart.stacked)for(let d=c.length-1;d>=0;d--)l.add(c[d]);else for(let d=0;d<c.length;d++)l.add(c[d]);return l}_initSerieVariables(t,e,i){const s=this.w,a=new D(this.w);this.xDivision=s.layout.gridWidth/(s.globals.dataPoints-("on"===s.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(s.config.stroke.width)?s.config.stroke.width[i]:s.config.stroke.width;let r=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed,this.zeroY=s.layout.gridHeight-this.baseLineY[r]-(this.isReversed?s.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>s.layout.gridHeight||"end"===s.config.plotOptions.area.fillTo)&&(this.areaBottomY=s.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const n=s.config.series[i];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:"undefined"!==typeof n.zIndex?n.zIndex:i,seriesName:Vt.escapeString(s.seriesData.seriesNames[i])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,s.globals.hasNullValues){const t=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[s.layout.gridHeight+s.globals.markers.largestSize]},seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==t&&this.elPointsMain.add(t)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":i});const o=t[e].length===s.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:i,realIndex:s,translationsIndex:a,prevX:r,prevY:n,prevY2:o}){const l=this.w,h=new D(this.w);let c,d,u,p;if(null===e[i][0]){for(let g=0;g<e[i].length;g++)if(null!==e[i][g]){r=this.xDivision*g,n=this.zeroY-e[i][g]/this.yRatio[a],c=h.move(r,n),d=h.move(r,this.areaBottomY);break}}else c=h.move(r,n),"rangeArea"===t&&(c=h.move(r,o)+h.line(r,n)),d=h.move(r,this.areaBottomY)+h.line(r,n);if(u=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),p=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),l.globals.previousPaths.length>0){const t=this.lineHelpers.checkPreviousPaths({pathFromLine:u,pathFromArea:p,realIndex:s});u=t.pathFromLine,p=t.pathFromArea}return{prevX:r,prevY:n,linePath:c,areaPath:d,pathFromLine:u,pathFromArea:p}}_stackKey(t,e){if(!this.w.axisFlags.isXNumeric)return e;const i=this.w.seriesData.seriesX[t];return i?i[e]:void 0}stackTopAt(t,e){const i=this._stackKey(t,e);if(void 0!==i&&null!==i)return this.prevSeriesYByX.get(i)}_recordStackTops(t,e){const i=this.w;if(Array.isArray(e)&&-1===i.globals.collapsedSeriesIndices.indexOf(t)&&-1===i.globals.ancillaryCollapsedSeriesIndices.indexOf(t))for(let s=0;s<e.length;s++){const i=this._stackKey(t,s);if(void 0===i||null===i)continue;const a=e[s];Vt.isNumber(a)&&this.prevSeriesYByX.set(i,a)}}_handlePaths({type:t,realIndex:e,i:i,paths:s}){var a,r,n,o,l,h,c;const p=this.w,g=new D(this.w),f=Ve(this.ctx,g),m=new L(this.w);this.prevSeriesY.push(s.yArrj),this._recordStackTops(e,s.yArrj);let x=null;"line"!==t&&"area"!==t||!p.globals.dataChanged||(x=function(t,e,i,s){var a;const r=t.globals,n=r.prevStreamFrame;if(!n||!r.dataChanged||!(null==(a=t.axisFlags)?void 0:a.isXNumeric))return null;const o=n.seriesX[e],l=n.seriesY[e],h=t.seriesData.seriesX[e],c=t.seriesData.series[e];if(!o||!l||!h||!c)return null;if(o.length<3||h.length<3)return null;let d=-1;for(let E=0;E<o.length;E++)if(o[E]===h[0]){d=E;break}if(-1===d)return null;const u=Math.min(o.length-d,h.length);if(u<2)return null;const p=h.length-u;if(0===d&&0===p)return null;for(let E=0;E<u;E++){if(o[d+E]!==h[E])return null;const t=l[d+E],e=c[E];if(t!==e&&(null!=t||null!=e))return null}const g=n.xPixels[e],f=n.yPixels[e];if(!g||!f)return null;let m=-1,x=-1;for(let E=0;E<u;E++)null!=g[d+E]&&null!=f[d+E]&&null!=i[E]&&null!=s[E]&&(-1===m&&(m=E),x=E);if(-1===m||x<=m)return null;const b=i[m],y=i[x],w=g[d+m],v=g[d+x];if(Math.abs(y-b)<1e-6)return null;const A=(v-w)/(y-b),_=w-A*b;if(!isFinite(A)||!isFinite(_))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(_)<.5)return null;let S=m,C=m;for(let E=m;E<=x;E++){const t=s[E];null!=t&&null!=f[d+E]&&(t<s[S]&&(S=E),t>s[C]&&(C=E))}let k=1,M=0;const P=s[S],L=s[C];if(Math.abs(L-P)>1e-6?(k=(f[d+C]-f[d+S])/(L-P),M=f[d+S]-k*P):M=f[d+S]-P,!isFinite(k)||!isFinite(M)||k<.2||k>5)return null;const I=Math.floor((m+x)/2);if(I!==m&&I!==x&&null!=i[I]&&null!=g[d+I]){const t=A*i[I]+_;if(Math.abs(t-g[d+I])>1.5)return null;if(null!=s[I]&&null!=f[d+I]){const t=k*s[I]+M;if(Math.abs(t-f[d+I])>1.5)return null}}return r.streamScrolled=!0,{ax:A,bx:_,ay:k,by:M}}(p,e,s.xArrj,s.yArrj));let b=null;x||"line"!==t&&"area"!==t||(b=Ri(p,{type:t,realIndex:e,pathFromLine:s.pathFromLine,pathFromArea:s.pathFromArea,linePaths:s.linePaths,areaPaths:s.areaPaths})),p.globals.seriesXvalues[e]=s.xArrj,p.globals.seriesYvalues[e]=s.yArrj;const y=p.config.forecastDataPoints;if(y.count>0&&"rangeArea"!==t){const t=p.globals.seriesXvalues[e][p.globals.seriesXvalues[e].length-y.count-1],i=g.drawRect(t,0,p.layout.gridWidth,p.layout.gridHeight,0);p.dom.elForecastMask.appendChild(i.node);const s=g.drawRect(0,0,t,p.layout.gridHeight,0);p.dom.elNonForecastMask.appendChild(s.node)}this.pointsChart?Fi(p,{elPointsMain:this.elPointsMain,realIndex:e,speed:p.config.chart.animations.dynamicAnimation.speed}):(p.globals.delayedElements.push({el:this.elPointsMain.node,index:e}),Fi(p,{elPointsMain:this.elPointsMain,realIndex:e,speed:p.config.chart.animations.dynamicAnimation.speed}),Ei(p,e)&&(null==(a=this.elDataLabelsWrap)?void 0:a.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),p.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const w={i:i,realIndex:e,animationDelay:i,initialSpeed:p.config.chart.animations.speed,dataChangeSpeed:p.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`},v=s.numericXY,A="line"===t||"area"===t,_=A&&s.linePaths.length>1?[s.linePaths.join(" ")]:s.linePaths,S=A&&s.areaPaths.length>1?[s.areaPaths.join(" ")]:s.areaPaths;if("area"===t){const t=m.fillPath({seriesNumber:e});for(let e=0;e<S.length;e++){const i=f.renderPaths(u(d({},w),{pathFrom:x?as(s.areaPaths[e],x):null!=(n=null==(r=null==b?void 0:b.area)?void 0:r.from)?n:s.pathFromArea,pathTo:S[e],pathToNumeric:v?{xs:v.xs,ys:v.ys,closeY:v.areaCloseY}:void 0,pathToInterp:null==(o=null==b?void 0:b.area)?void 0:o.toInterp,scrollMorph:!!x,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:t}));this.elSeries.add(i)}}if(p.config.stroke.show&&!this.pointsChart){let a=null;if("line"===t)a=m.fillPath({seriesNumber:e,i:i});else if("solid"===p.config.stroke.fill.type)a=p.globals.stroke.colors[e];else{const t=p.config.fill;p.config.fill=p.config.stroke.fill,a=m.fillPath({seriesNumber:e,i:i}),p.config.fill=t}for(let i=0;i<_.length;i++){let r=a;"rangeArea"===t&&(r=m.fillPath({seriesNumber:e}));const n=u(d({},w),{pathFrom:x?as(s.linePaths[i],x):null!=(h=null==(l=null==b?void 0:b.line)?void 0:l.from)?h:s.pathFromLine,pathTo:_[i],pathToNumeric:v?{xs:v.xs,ys:v.ys}:void 0,pathToInterp:null==(c=null==b?void 0:b.line)?void 0:c.toInterp,scrollMorph:!!x,stroke:a,strokeWidth:this.strokeWidth,strokeLineCap:p.config.stroke.lineCap,fill:"rangeArea"===t?r:"none"}),o=f.renderPaths(n);if(this.elSeries.add(o),o.attr("fill-rule","evenodd"),y.count>0&&"rangeArea"!==t){const t=f.renderPaths(n);t.node.setAttribute("stroke-dasharray",y.dashArray),y.strokeWidth&&t.node.setAttribute("stroke-width",y.strokeWidth),this.elSeries.add(t),t.attr("clip-path",`url(#forecastMask${p.globals.cuid})`),o.attr("clip-path",`url(#nonForecastMask${p.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:i,realIndex:s,translationsIndex:a,i:r,x:n,y:o,pX:l,pY:h,pathsFrom:c,linePaths:d,areaPaths:u,seriesIndex:p,lineYPosition:g,xArrj:f,yArrj:m,y2Arrj:x,isRangeStart:b,seriesRangeEnd:y}){var w,v;const A=this.w,_=new D(this.w),S=this.yRatio;let{prevY:C,linePath:k,areaPath:M,pathFromLine:P,pathFromArea:L}=c;const I=Vt.isNumber(A.globals.minYArr[s])?A.globals.minYArr[s]:A.globals.minY;i||(i=A.globals.dataPoints>1?A.globals.dataPoints-1:A.globals.dataPoints);const E=(t,e)=>e-t/S[a]+2*(this.isReversed?t/S[a]:0);let F=o;const R=A.config.chart.stacked&&!A.globals.comboCharts||A.config.chart.stacked&&A.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(w=this.w.config.series[s])?void 0:w.type)||"column"===(null==(v=this.w.config.series[s])?void 0:v.type));let z=A.config.stroke.curve;Array.isArray(z)&&(z=Array.isArray(p)?z[p[r]]:z[r]);let T,X=0;const O=this.pointsChart?this._scatterJitterPx(s):null;if("straight"===z&&!this.pointsChart){const p=this._fastStraightPath({type:t,series:e,i:r,realIndex:s,translationsIndex:a,iterations:i,x:n,y:o,pX:l,pY:h,pathsFrom:c,linePaths:d,areaPaths:u,xArrj:f,yArrj:m,y2Arrj:x,stackSeries:R});if(p)return p}for(let D=0;D<i&&0!==e[r].length;D++){const a="undefined"===typeof e[r][D+1]||null===e[r][D+1];if(A.axisFlags.isXNumeric){let t=A.seriesData.seriesX[s][D+1];"undefined"===typeof A.seriesData.seriesX[s][D+1]&&(t=A.seriesData.seriesX[s][i-1]),n=(t-A.globals.minX)/this.xRatio}else n+=this.xDivision;if(R)if(r>0&&A.globals.collapsedSeries.length<A.config.series.length-1){if((t=>{var e;for(let i=t;i>=0;i--){const t=null!=(e=null==p?void 0:p[i])?e:i;if(-1===A.globals.collapsedSeriesIndices.indexOf(t)&&-1===A.globals.ancillaryCollapsedSeriesIndices.indexOf(t))return i}return-1})(r-1)<0)g=this.zeroY;else{const t=this.stackTopAt(s,D+1);g=void 0===t?this.zeroY:t}}else g=this.zeroY;else g=this.zeroY;a?o=E(I,g):(o=E(e[r][D+1],g),"rangeArea"===t&&(F=E(y[r][D+1],g)));let c=n,w=o;if(O){const t=100003*s+(D+1);O.x&&(c=n+2*(Ni(7919*t+13)-.5)*O.x),O.y&&(w=o+2*(Ni(6271*t+97)-.5)*O.y)}f.push(null===e[r][D+1]?null:c),!a||"smooth"!==A.config.stroke.curve&&"monotoneCubic"!==A.config.stroke.curve?(m.push(w),x.push(F)):(m.push(null),x.push(null));const v=this.lineHelpers.calculatePoints({series:e,x:c,y:w,realIndex:s,i:r,j:D,prevY:C}),S=this._createPaths({type:t,series:e,i:r,j:D,x:n,y:o,y2:F,xArrj:f,yArrj:m,y2Arrj:x,pX:l,pY:h,pathState:X,segmentStartX:T,linePath:k,areaPath:M,linePaths:d,areaPaths:u,curve:z,isRangeStart:b});u=S.areaPaths,d=S.linePaths,l=S.pX,h=S.pY,X=S.pathState,T=S.segmentStartX,M=S.areaPath,k=S.linePath,!this.appendPathFrom||A.globals.hasNullValues||"monotoneCubic"===z&&"rangeArea"===t||(P+=_.line(n,this.areaBottomY),L+=_.line(n,this.areaBottomY)),this.handleNullDataPoints(e,v,r,D,s),this._handleMarkersAndLabels({type:t,pointsPos:v,i:r,j:D,realIndex:s,isRangeStart:b})}return{yArrj:m,xArrj:f,pathFromArea:L,areaPaths:u,pathFromLine:P,linePaths:d,linePath:k,areaPath:M}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:i,i:s,j:a,realIndex:r}){const n=this.w,o=new M(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:r,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!n.globals.dataChanged&&!n.globals.resized&&!n.globals.markers.batched)&&n.seriesData.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const t=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:r,j:a+1});null!==t&&t!==this._elLastPointsWrap&&(this.elPointsMain.add(t),this._elLastPointsWrap=t)}const l=o.drawDataLabel({type:t,isRangeStart:i,pos:e,i:r,j:a+1});null!==l&&this.elDataLabelsWrap.add(l)}_scatterJitterPx(t){var e;const i=this.w,s=null==(e=i.config.plotOptions.scatter)?void 0:e.jitter;if(!s||!s.enabled||!s.x&&!s.y)return null;const a=i.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,r=this.yRatio.length>1?t:0,n=this.yRatio[r]?1/this.yRatio[r]:0;return{x:(s.x||0)*a,y:(s.y||0)*n}}_fastStraightPath({type:t,series:e,i:i,realIndex:s,translationsIndex:a,iterations:r,x:n,y:o,pX:l,pY:h,pathsFrom:c,linePaths:d,areaPaths:u,xArrj:p,yArrj:g,y2Arrj:f,stackSeries:m}){const x=this.w;if("line"!==t&&"area"!==t)return null;if(x.globals.comboCharts||m)return null;if(x.config.dataLabels.enabled)return null;if(x.config.markers.discrete.length)return null;if(x.globals.markers.size[s]>0)return null;const b=e[i],y=b.length;if(!r||y<2||y-1!==r)return null;for(let q=0;q<=r;q++){const t=b[q];if(null===t||"undefined"===typeof t)return null}const w=x.axisFlags.isXNumeric,v=w?x.seriesData.seriesX[s]:null;if(w&&(!v||v.length<y))return null;const A=this.yRatio[a],_=this.isReversed,S=this.zeroY,C=this.areaBottomY,k=this.xRatio,M=x.globals.minX,P=this.xDivision,L=x.config.markers.offsetX,I=x.config.markers.offsetY,E=this.appendPathFrom&&!x.globals.hasNullValues;let{pathFromLine:D,pathFromArea:F}=c;const R=this.ctx&&this.ctx.renderer,z=!(!R||!R.kind||"svg"===R.kind),T=!z||x.globals.dataChanged&&!!x.globals.prevStreamFrame,X=z?new Float64Array(y):null,O=z?new Float64Array(y):null;X&&O&&(X[0]=l,O[0]=h),"undefined"===typeof x.globals.pointsArray[s]&&(x.globals.pointsArray[s]=[]);const W=x.globals.pointsArray[s],$=v?(v[0]-M)/k+L:this.categoryAxisCorrection+L;W.push([$,c.prevY+I]);const Y=T?new Array(r+1):[];T&&(Y[0]="M "+l+" "+h);const B=T&&E?new Array(r):null;let N=n,H=l,j=h;for(let q=0;q<r;q++){v?H=(v[q+1]-M)/k:(N+=P,H=N);const t=b[q+1];j=S-t/A+2*(_?t/A:0),p.push(H),g.push(j),f.push(o),W.push([H+L,j+I]),T&&(Y[q+1]=" L "+H+" "+j,B&&(B[q]=" L "+H+" "+C)),X&&O&&(X[q+1]=H,O[q+1]=j)}let V="",G="";if(T&&(V=Y.join(""),G=V+" L "+H+" "+C+" L "+l+" "+C+"z"),B){const t=B.join("");D+=t,F+=t}else!T&&E&&(D+=" L "+H+" "+C,F+=" L "+H+" "+C);return d.push(V),u.push(G),{yArrj:g,xArrj:p,pathFromArea:F,areaPaths:u,pathFromLine:D,linePaths:d,linePath:V,areaPath:G,numericXY:X?{xs:X,ys:O,areaCloseY:C}:void 0}}_createPaths({type:t,series:e,i:i,j:s,x:a,y:r,xArrj:n,yArrj:o,y2:l,y2Arrj:h,pX:c,pY:d,pathState:u,segmentStartX:p,linePath:g,areaPath:f,linePaths:m,areaPaths:x,curve:b,isRangeStart:y}){const w=new D(this.w),v=this.areaBottomY,A="rangeArea"===t,_="rangeArea"===t&&y;switch(b){case"monotoneCubic":{const t=y?o:h,a=(t,e)=>t.map(((t,i)=>[t,e[i]])).filter((t=>null!==t[1])),r=t=>{const e=[];let i=0;return t.forEach((t=>{null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e},l=(t,e)=>{const i=r(t),s=[];for(let a=0,r=0;a<i.length;r+=i[a++])s[a]=Zi.slice(e,r,r+i[a]);return s};switch(u){case 0:if(null===t[s+1])break;u=1;
vendor: 4,668 bytes, line 1
1case 1:if(!(A?n.length===e[i].length:s===e[i].length-2))break;case 2:{const e=y?n:n.slice().reverse(),i=y?t:t.slice().reverse(),s=a(e,i),r=s.length>1?Zi.points(s):s;let o=[];A&&(_?x=s:o=x.reverse());let h=0,c=0;if(l(i,r).forEach((t=>{h++;const e=qi(t),i=c;c+=t.length;const a=c-1;_?g=w.move(s[i][0],s[i][1])+e:A?g=w.move(o[i][0],o[i][1])+w.line(s[i][0],s[i][1])+e+w.line(o[a][0],o[a][1]):(g=w.move(s[i][0],s[i][1])+e,f=g+w.line(s[a][0],v)+w.line(s[i][0],v)+"z",x.push(f)),m.push(g)})),A&&h>1&&!_){const t=m.slice(h).reverse();m.splice(h),t.forEach((t=>m.push(t)))}u=0;break}}break}case"smooth":{const t=.35*(a-c);if(null===e[i][s])u=0;else switch(u){case 0:if(p=c,g=_?w.move(c,h[s])+w.line(c,d):w.move(c,d),f=w.move(c,d),null===e[i][s+1]||"undefined"===typeof e[i][s+1]){m.push(g),x.push(f);break}if(u=1,s<e[i].length-2){const e=w.curve(c+t,d,a-t,r,a,r);g+=e,f+=e;break}case 1:if(null===e[i][s+1])g+=_?w.line(c,l):w.move(c,d),f+=w.line(c,v)+w.line(p,v)+"z",m.push(g),x.push(f),u=-1;else{const n=w.curve(c+t,d,a-t,r,a,r);g+=n,f+=n,s>=e[i].length-2&&(_&&(g+=w.curve(a,r,a,r,a,l)+w.move(a,l)),f+=w.curve(a,r,a,r,a,v)+w.line(p,v)+"z",m.push(g),x.push(f),u=-1)}}c=a,d=r;break}default:{const t=(t,e,i)=>{let s="";switch(t){case"stepline":s=w.line(e,null,"H")+w.line(null,i,"V");break;case"linestep":s=w.line(null,i,"V")+w.line(e,null,"H");break;case"straight":s=w.line(e,i)}return s};if(null===e[i][s])u=0;else switch(u){case 0:if(p=c,g=_?w.move(c,h[s])+w.line(c,d):w.move(c,d),f=w.move(c,d),null===e[i][s+1]||"undefined"===typeof e[i][s+1]){m.push(g),x.push(f);break}if(u=1,s<e[i].length-2){const e=t(b,a,r);g+=e,f+=e;break}case 1:if(null===e[i][s+1])g+=_?w.line(c,l):w.move(c,d),f+=w.line(c,v)+w.line(p,v)+"z",m.push(g),x.push(f),u=-1;else{const n=t(b,a,r);g+=n,f+=n,s>=e[i].length-2&&(_&&(g+=w.line(a,l)),f+=w.line(a,v)+w.line(p,v)+"z",m.push(g),x.push(f),u=-1)}}c=a,d=r;break}}return{linePaths:m,areaPaths:x,pX:c,pY:d,pathState:u,segmentStartX:p,linePath:g,areaPath:f}}handleNullDataPoints(t,e,i,s,a){const r=this.w;if(null===t[i][s]&&r.config.markers.showNullDataPoints||1===t[i].length){let t=this.strokeWidth-r.config.markers.strokeWidth/2;t>0||(t=0);const i=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:s+1,pSize:t,alwaysDrawMarker:!0});null!==i&&this.elPointsMain.add(i)}}}function ns(t,e){const{lines:i,lineHeight:s,anchor:a,elbow:r,labelX:n,labelY:o,side:l,connector:h,style:c,foreColor:d}=e,u=new D(t),p=u.group({class:e.groupClass||"apexcharts-outer-label-group"});if(h.show){const t=`M ${a.x} ${a.y} L ${r.x} ${r.y} L ${n} ${o}`,i=u.drawPath({d:t,stroke:h.color,strokeWidth:h.width,fill:"none",strokeLinecap:"round"});i.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(i)}const g="right"===l?n+4:n-4,f=i.length,m=o-(f-1)*s/2,x=u.drawText({x:g,y:m,text:1===f?i[0]:i,textAnchor:"right"===l?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:d,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(f>1){const t=x.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${g}`),t[e].setAttribute("dy",0===e?"0":`${s}`)}return p.add(x),p}function os(t,e,i,s){const a=t.slice().sort(((t,e)=>t.idealY-e.idealY));a.forEach((t=>{t.labelY=t.idealY}));for(let o=1;o<a.length;o++)a[o].labelY-a[o-1].labelY<e&&(a[o].labelY=a[o-1].labelY+e);const r=a[a.length-1],n=r?r.labelY-i:0;if(n>0)for(let o=a.length-1;o>=0;o--)a[o].labelY-=n,o<a.length-1&&a[o+1].labelY-a[o].labelY<e&&(a[o].labelY=a[o+1].labelY-e);if(null!=s&&a.length&&a[0].labelY<s){const t=s-a[0].labelY;for(let e=0;e<a.length;e++)a[e].labelY+=t}}class ls{constructor(t){this.w=t}drawYAxisTexts(t,e,i,s){const a=this.w,r=a.config.yaxis[0],n=a.formatters.yLabelFormatters[0];return new D(this.w).drawText({x:t+r.labels.offsetX,y:e+r.labels.offsetY,text:n(s,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}getMaxLabelWidth(t,{fontSize:e,fontFamily:i}={}){const s=new D(this.w);let a=0;return t.forEach((t=>{if(null===t||"undefined"===typeof t||""===t)return;const r=s.getTextRects(`${t}`,e||"12px",i,"");a=Math.max(a,r.width)})),a}drawExternalLabel(t){return ns(this.w,u(d({},t),{groupClass:"apexcharts-pie-name-label-group",textClass:"apexcharts-pie-name-label",connectorClass:"apexcharts-pie-label-connector"}))}}const hs=Math.PI/180,cs=180/Math.PI;function ds(t,e,i,s){return{x:t+i*Math.cos((s-90)*hs),y:e+i*Math.sin((s-90)*hs)}}const us=t=>`${t.x} ${t.y}`;function ps({cx:t,cy:e,rIn:i,rOut:s,a0:a,a1:r,r:n,spanDeg:o}){const l=(i,s)=>
vendor: 5,970 bytes, line 1
1ds(t,e,i,s),h=n/s*cs,c=n/i*cs,d=l(s,a+h),u=l(s,r-h),p=o-2*h>180?1:0,g=l(s,r),f=l(s-n,r),m=l(s,a),x=l(s-n,a),b=l(i,r-c),y=l(i,a+c),w=o-2*c>180?1:0,v=l(i,r),A=l(i+n,r),_=l(i,a),S=l(i+n,a);return["M",us(d),"A",s,s,0,p,1,us(u),"Q",us(g),us(f),"L",us(A),"Q",us(v),us(b),"A",i,i,0,w,0,us(y),"Q",us(_),us(S),"L",us(x),"Q",us(m),us(d),"Z"].join(" ")}function gs({cx:t,cy:e,rIn:i,rOut:s,a0:a,a1:r,spanDeg:n}){const o=(i,s)=>ds(t,e,i,s),l=n>180?1:0,h=o(s,a),c=o(s,r),d=o(i,r),u=o(i,a);return["M",us(h),"A",s,s,0,l,1,us(c),"L",us(d),"A",i,i,0,l,0,us(u),"Z"].join(" ")}class fs{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.layout.gridWidth,t.layout.gridHeight),this.centerY=t.layout.gridHeight/2,this.centerX=t.layout.gridWidth/2,"radialBar"===t.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.externalCfg=t.config.plotOptions.pie.dataLabels.external;const i=t.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||i.fontSize,fontFamily:this.externalCfg.fontFamily||i.fontFamily,fontWeight:this.externalCfg.fontWeight||i.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,t.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&"polarArea"!==this.chartType,this.showExternalLabels&&!t.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;const s=t.config.plotOptions.pie.customScale,a=t.layout.gridWidth/2,r=t.layout.gridHeight/2;this.translateX=a-a*s,this.translateY=r-r*s,this.dataLabelsGroup=new D(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${s})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(t){var e,i,s;const a=this.w,r=a.seriesData.seriesNames[t],n=this.externalCfg.formatter;return"function"===typeof n?n(r,{seriesIndex:t,percent:null==(i=null==(e=a.globals.seriesPercent)?void 0:e[t])?void 0:i[0],value:null==(s=a.globals.seriesTotals)?void 0:s[t],w:a}):null==r?"":`${r}`}getExternalLabelLines(t){const e=this.getExternalLabelText(t);return(Array.isArray(e)?e:`${null==e?"":e}`.split("\n")).map((t=>null==t?"":`${t}`))}reserveExternalLabelSpace(){const t=this.w,e=new ls(t),i=(t.seriesData.seriesNames||[]).map(((t,e)=>this.getExternalLabelLines(e))),s=e.getMaxLabelWidth(i.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=i.reduce(((t,e)=>Math.max(t,e.length)),1),this.externalLabelLineH=Math.round(1.35*(parseFloat(this.externalLabelStyle.fontSize)||12));const a=this.externalCfg.connector,r=this.externalLabelMaxLines*this.externalLabelLineH,n=s+(a.length||0)+(a.gap||0)+12,o=r/2+(a.gap||0)+6,l=Math.min(t.globals.radialSize,t.layout.gridWidth/2-n,t.layout.gridHeight/2-o);t.globals.radialSize=Math.max(l,.15*this.defaultSize),t.globals.pieExternalLabelMarginY=o;const h=t.config.chart.height?String(t.config.chart.height):"",c=""!==h&&"auto"!==h;this.centerY=c?t.layout.gridHeight/2:t.globals.radialSize+o}draw(t){var e;const i=this.w,s=new D(this.w),a=s.group({class:"apexcharts-pie"});if(i.globals.noData)return a;let r=0;for(let u=0;u<t.length;u++)r+=Vt.negToZero(t[u]);const n=[],o=s.group();0===r&&(r=1e-5),t.forEach((t=>{this.maxY=Math.max(this.maxY,t)})),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(a);const l=i.globals.collapsedSeriesIndices||[];let h=1;if("polarArea"===this.chartType){let e=0;for(let i=0;i<t.length;i++)-1===l.indexOf(i)&&e++;h=Math.max(1,e)}for(let u=0;u<t.length;u++){const e=this.fullAngle*Vt.negToZero(t[u])/r;n.push(e),"polarArea"===this.chartType?(n[u]=l.indexOf(u)>-1?0:this.fullAngle/h,this.sliceSizes.push(i.globals.radialSize*t[u]/(this.maxY||1))):this.sliceSizes.push(i.globals.radialSize)}const c=!0===(null==(e=this.ctx.morphTypeChange)?void 0:e.isActive());if(i.globals.dataChanged&&!c)if("polarArea"===this.chartType){const t=i.globals.previousPaths,e=i.globals.prevPolarAngles;if(Array.isArray(e)&&e.length===t.length)this.prevSectorAngleArr=e.slice();else for(let i=0;i<t.length;i++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,t.length));let s=0;for(let i=0;i<t.length;i++)s=Math.max(s,Vt.negToZero(t[i]));i.config.yaxis[0].max&&(s=i.config.yaxis[0].max),this.prevSliceSizes=t.map((t=>i.globals.radialSize*Vt.negToZero(t)/(s||1)))}else{let t,e=0;for(let s=0;s<i.globals.previousPaths.length;s++)e+=Vt.negToZero(i.globals.previousPaths[s]);for(let s=0;s<i.globals.previousPaths.length;s++)t=this.fullAngle*Vt.negToZero(i.globals.previousPaths[s])/e,this.prevSectorAngleArr.push(t)}if("polarArea"===this.chartType&&(i.globals.prevPolarAngles=n.slice()),this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){const t=s.drawCircle(this.donutSize);t.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),o.add(t)}const d=this.drawArcs(n,t);
vendor: 4,498 bytes, line 1
1if(this.sliceLabels.forEach((t=>{d.add(t)})),o.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${i.config.plotOptions.pie.customScale})`}),o.add(d),a.add(o),this.donutDataLabels.show){const t=this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0,e=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:t?0:this.donutDataLabels.show});if(t){const t=this.dataLabelsGroup.node;t.style.transition="opacity 280ms ease-out",setTimeout((()=>{t.style.opacity="1"}),this.animDur)}a.add(e)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(a),a}drawArcs(t,e){var i,s,a,r,n;const o=this.w,l=new I(this.w),h=new D(this.w),c=new L(this.w),d=h.group({class:"apexcharts-slices"});this.elHoverOutline=h.group({class:"apexcharts-pie-hover-outline"}),this.elHoverOutline.node.style.pointerEvents="none",this.elHoverOutline.node.style.opacity="0",o.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition="opacity 180ms ease-out"),d.add(this.elHoverOutline);let u=this.initialAngle,p=this.initialAngle,g=this.initialAngle,f=this.initialAngle;this.strokeWidth=o.config.stroke.show?o.config.stroke.width:0;const m=!0===(null==(i=this.ctx.morphTypeChange)?void 0:i.isActive());for(let x=0;x<t.length;x++){const i=h.group({class:"apexcharts-series apexcharts-pie-series",seriesName:Vt.escapeString(o.seriesData.seriesNames[x]),rel:x+1,"data:realIndex":x});d.add(i),u=g,p=f,g=u+t[x],f=p+this.prevSectorAngleArr[x];const b=g<u?this.fullAngle+g-u:g-u,y=c.fillPath({seriesNumber:x,size:this.sliceSizes[x],value:e[x]}),w=m?this.ctx.morphTypeChange.getInitialPathFor(x,0):null,v="polarArea"===this.chartType&&o.globals.dataChanged&&!m?this.prevSliceSizes[x]||0:void 0,A=w||this.getChangedPath(p,f,v),_=h.drawPath({d:A,stroke:Array.isArray(this.lineColorArr)?null!=(s=this.lineColorArr[x])?s:this.lineColorArr[x%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:y,fillOpacity:o.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${x}`});if(_.attr({index:0,j:x}),l.setSelectionFilter(_,0,x),o.config.chart.dropShadow.enabled){const t=o.config.chart.dropShadow;l.dropShadow(_,t,x)}this.addListeners(_,this.donutDataLabels,x);let S={x:0,y:0};const C=(u+b/2)%this.fullAngle;let k={x:this.centerX,y:this.centerY};"pie"===this.chartType||"polarArea"===this.chartType?(S=Vt.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/1.25+o.config.plotOptions.pie.dataLabels.offset,C),k=Vt.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize/2,C)):"donut"===this.chartType&&(S=Vt.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2+o.config.plotOptions.pie.dataLabels.offset,C),k=Vt.polarToCartesian(this.centerX,this.centerY,(o.globals.radialSize+this.donutSize)/2,C)),D.setAttrs(_.node,{"data:angle":b,"data:startAngle":u,"data:strokeWidth":this.strokeWidth,"data:value":e[x],"data:cx":k.x,"data:cy":k.y}),i.add(_);let M=!1;if(m){const t=this.getPiePath({me:this,startAngle:u,angle:b,size:this.sliceSizes[x]});_.node.setAttribute("data:pathFinal",t),M=!0===(null==(r=(a=this.ctx.morphTypeChange).claimsTargetMark)?void 0:r.call(a,x,0)),M&&(_.attr({d:t}),_.node.setAttribute("data:pathOrig",t),_.node.setAttribute("opacity","0"),_.node.setAttribute("data-piece-hidden","1"))}let P=0;if(!this.initialAnim||o.globals.resized||o.globals.dataChanged?this.animBeginArr.push(0):(P=b/this.fullAngle*o.config.chart.animations.speed,0===P&&(P=1),this.animDur=P+this.animDur,this.animBeginArr.push(this.animDur)),M);else if(m&&w){const t=this.getPiePath({me:this,startAngle:u,angle:b,size:this.sliceSizes[x]}),e=this.ctx.morphTypeChange.getSpeed(),i=this.ctx.animations;_.node.setAttribute("data:pathOrig",t);const s=_.animate(e).plot(t,"polygons").attr({"stroke-width":this.strokeWidth});s&&"function"===typeof s.after?s.after((()=>i.animationCompleted(_))):i.animationCompleted(_)}else this.dynamicAnim&&o.globals.dataChanged?this.animatePaths(_,{size:this.sliceSizes[x],prevSize:v,endAngle:g,startAngle:u,prevStartAngle:p,prevEndAngle:f,animateStartingPos:!0,i:x,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:o.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(_,{size:this.sliceSizes[x],endAngle:g,startAngle:u,i:x,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:P});if(this.getExpandOffset()>
vendor: 2,322 bytes, line 1
10?_.node.addEventListener("mouseup",this.pieClicked.bind(this,x)):0===x&&I.drilldownBlocksSliceOffset(o)&&(null==(n=this.ctx.drilldown)||n.warnSliceOffsetDisabled()),"undefined"!==typeof o.interact.selectedDataPoints[0]&&o.interact.selectedDataPoints[0].indexOf(x)>-1)if(this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged&&this.animDur>0){const t=this,e=x;setTimeout((()=>t.pieClicked(e,{animate:!1})),this.animDur)}else this.pieClicked(x,{animate:!1});if(o.config.dataLabels.enabled){const e=S.x,i=S.y;let s=100*b/this.fullAngle+"%";if(0!==b&&o.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[x]){const t=o.config.dataLabels.formatter;void 0!==t&&(s=t(o.globals.seriesPercent[x][0],{seriesIndex:x,w:o}));const a=o.globals.dataLabels.style.colors[x],r=h.group({class:"apexcharts-datalabels"}),n=h.drawText({x:e,y:i,text:s,textAnchor:"middle",fontSize:o.config.dataLabels.style.fontSize,fontFamily:o.config.dataLabels.style.fontFamily,fontWeight:o.config.dataLabels.style.fontWeight,foreColor:a});if(r.add(n),o.config.dataLabels.dropShadow.enabled){const t=o.config.dataLabels.dropShadow;l.dropShadow(n,t)}n.node.classList.add("apexcharts-pie-label"),o.config.chart.animations.animate&&!1===o.globals.resized&&(n.node.classList.add("apexcharts-pie-label-delay"),n.node.style.animationDelay=o.config.chart.animations.speed/940+"s"),this.sliceLabels.push(r),this.sliceLabelGroups[x]=r.node}}if(this.showExternalLabels&&0!==b){const t=this.getExternalLabelLines(x);if(t.some((t=>""!==t))){const e=Vt.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize,C),i=Vt.polarToCartesian(this.centerX,this.centerY,o.globals.radialSize+(this.externalCfg.connector.gap||0),C),s=i.x>=this.centerX,a=s?i.x+(this.externalCfg.connector.length||0):i.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:x,lines:t,anchor:e,elbow:i,side:s?"right":"left",labelX:a+parseFloat(this.externalCfg.offsetX||0),idealY:i.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||o.globals.colors[x],foreColor:this.externalCfg.color||o.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const t=Yt.isBrowser()&&(m||this.dynamicAnim&&o.globals.dataChanged||this.initialAnim&&!o.globals.resized&&!o.globals.dataChanged);
1this.externalLabels.forEach((e=>{const i=new ls(o).drawExternalLabel({lines:e.lines,lineHeight:this.externalLabelLineH,anchor:e.anchor,elbow:e.elbow,labelX:e.labelX,labelY:e.labelY,side:e.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:e.connectorColor},style:this.externalLabelStyle,foreColor:e.foreColor});t&&(i.node.classList.add("apexcharts-element-hidden"),o.globals.delayedElements.push({el:i.node})),this.externalLabelGroups[e.i]=i.node,d.add(i)}))}return d}placeExternalLabels(){const t=this.w,e=this.externalLabelMaxLines*this.externalLabelLineH+2,i=this.centerY+t.globals.radialSize+t.globals.pieExternalLabelMarginY;["left","right"].forEach((t=>{os(this.externalLabels.filter((e=>e.side===t)),e,i)}))}addListeners(t,e,i){const s=new D(this.w,this.ctx);t.node.addEventListener("mouseenter",s.pathMouseEnter.bind(s,t)),t.node.addEventListener("mouseleave",s.pathMouseLeave.bind(s,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),"number"===typeof i&&(t.node.addEventListener("mouseenter",this.showHoverOutline.bind(this,i)),t.node.addEventListener("mouseleave",this.hideHoverOutline.bind(this))),t.node.addEventListener("mousedown",s.pathMouseDown.bind(s,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){const i=this.w;let s=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,a=s,r=e.startAngle;const n=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(r=e.prevEndAngle,a=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===i.config.series.length-1&&(s+n>this.fullAngle?e.endAngle=e.endAngle-(s+n):s+n<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(s+n)))),s===this.fullAngle&&(s=this.fullAngle-.01),this.animateArc(t,r,n,s,a,e)}animateArc(t,e,i,s,a,r){const n=this,o=this.w,l=new g(this.w),h=r.size;let c;(isNaN(e)||isNaN(a))&&(e=i,a=s,r.dur=0);let d=s,u=i;const p=e<i?this.fullAngle+e-i:e-i,f="number"===typeof r.prevSize;o.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(c=n.getPiePath({me:n,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:f?r.prevSize:h}),t.attr({d:c})),0!==r.dur?t.animate(r.dur,r.animBeginArr[r.i]).after((function(){"pie"!==n.chartType&&"donut"!==n.chartType&&"polarArea"!==n.chartType||this.animate(o.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":n.strokeWidth}),r.i===o.config.series.length-1&&l.animationCompleted(t)})).during((o=>{d=p+(s-p)*o,r.animateStartingPos&&(d=a+(s-a)*o,u=e-a+(i-(e-a))*o),c=n.getPiePath({me:n,startAngle:u,angle:d,size:f?r.prevSize+(h-r.prevSize)*o:h}),t.node.setAttribute("data:pathOrig",c),t.attr({d:c})})):(c=n.getPiePath({me:n,startAngle:u,angle:s,size:h}),r.isTrack||(o.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",c),t.attr({d:c,"stroke-width":n.strokeWidth}))}pieClicked(t,e){const i=this.w,s=!(e&&!1===e.animate),a=i.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);if(!a)return;if("true"===a.attr("data:pieClicked"))return a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(),void this.offsetSlice(t,0,s);const r=i.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(r,(t=>{const e="true"===t.getAttribute("data:pieClicked");t.setAttribute("data:pieClicked","false"),e&&this.offsetSlice(parseInt(t.getAttribute("j"),10),0,s)})),i.interact.capturedDataPointIndex=t,a.attr("data:pieClicked","true"),this.offsetSlice(t,this.getExpandOffset(),s)}getExpandOffset(){const t=this.w.config.plotOptions.pie;if(!t.expandOnClick||"polarArea"===this.chartType)return 0;if(I.drilldownBlocksSliceOffset(this.w))return 0;const e=Number(t.expandOffset);return Number.isFinite(e)&&e>0?e:0}getSliceMovers(t){const e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return[e?e.node:null,this.sliceLabelGroups[t],this.externalLabelGroups[t],this.hoverOutlineIndex===t&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(
vendor: 8,958 bytes, line 1
1Boolean)}offsetSlice(t,e,i=!0){const s=this.w;if(!s.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`))return;const{dx:a,dy:r}=this.getSliceOffsetVector(t,e),n=`translate(${a} ${r})`,o=i&&s.config.chart.animations.enabled?"transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)":"";this.getSliceMovers(t).forEach((t=>{t.style.transition=o,t.setAttribute("transform",n)}))}getSliceOffsetVector(t,e){const i=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`),s=i?parseFloat(i.attr("data:angle")):NaN;if(!e||!Number.isFinite(s)||s>=this.fullAngle)return{dx:0,dy:0};const a=parseFloat(i.attr("data:startAngle")),r=Math.PI*(a+s/2-90)/180;return{dx:e*Math.cos(r),dy:e*Math.sin(r)}}showHoverOutline(t){const e=this.w;if(!I.hoverOutlineOwnsHoverState(e))return;if(!this.elHoverOutline)return;const i=this.getHoverOutlinePath(t);if(!i)return;const s=e.config.plotOptions.pie.hoverOutline,a=s.color||e.globals.colors[t];if(!this.elHoverOutlinePath){const t=new D(e);this.elHoverOutlinePath=t.drawPath({d:i,fill:a,strokeWidth:0,classes:"apexcharts-pie-hover-outline-band"}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:i,fill:a,"fill-opacity":s.opacity});const{dx:r,dy:n}=this.getSliceOffsetVector(t,this.isSliceOut(t)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition="",this.elHoverOutlinePath.node.setAttribute("transform",`translate(${r} ${n})`),this.hoverOutlineIndex=t,this.elHoverOutline.node.style.opacity="1"}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity="0")}isSliceOut(t){const e=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);return!!e&&"true"===e.attr("data:pieClicked")}getHoverOutlinePath(t){const e=this.w,i=e.config.plotOptions.pie.hoverOutline,s=e.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${t}`);if(!s)return null;const a=parseFloat(s.attr("data:angle"));if(!Number.isFinite(a)||a<=0)return null;const r=this.sliceSizes[t],n=Number(i.size);if(!Number.isFinite(r)||!Number.isFinite(n)||n<=0)return null;const{startDeg:o,spanDeg:l}=this.getSliceExtent({me:this,startAngle:parseFloat(s.attr("data:startAngle")),angle:a,size:r});if(!(l>0))return null;const h=r+(this.strokeWidth||0)/2+(Number(i.gap)||0),c=h+n,p={cx:this.centerX,cy:this.centerY,rIn:h,rOut:c,a0:o,a1:o+l,spanDeg:l},g=Math.min(n/2,l*Math.PI/180/2*h);return g>.5?ps(u(d({},p),{r:g})):gs(p)}getChangedPath(t,e,i){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:t,angle:e-t,size:"number"===typeof i?i:this.size})),s}getSliceExtent({me:t,startAngle:e,angle:i,size:s}){const a=this.w;let r=e,n=i+e;Math.ceil(n)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let o=n-r;const l="pie"===t.chartType||"donut"===t.chartType||"polarArea"===t.chartType,h=a.config.plotOptions.pie.spacing;if(l&&h>0&&o>0){const e="donut"===t.chartType?(s+t.donutSize)/2:s,i=e>0?h/e*(180/Math.PI):0,a=Math.min(i/2,Math.max(0,o/2-.5));r+=a,o-=2*a}return n=r+o,Math.ceil(n)>this.fullAngle&&(n-=this.fullAngle),{startDeg:r,spanDeg:o,endDeg:n}}getPiePath({me:t,startAngle:e,angle:i,size:s}){let a;const r=this.w,n=new D(this.w),{startDeg:o,spanDeg:l,endDeg:h}=this.getSliceExtent({me:t,startAngle:e,angle:i,size:s}),c="pie"===t.chartType||"donut"===t.chartType||"polarArea"===t.chartType,d=Math.PI*(o-90)/180,u=r.config.plotOptions.pie.borderRadius;if(u>0&&c){const e=this.getRoundedSlicePath({me:t,startDeg:o,spanDeg:l,size:s,borderRadius:u});if(e)return e}const p=Math.PI*(h-90)/180,g=t.centerX+s*Math.cos(d),f=t.centerY+s*Math.sin(d),m=t.centerX+s*Math.cos(p),x=t.centerY+s*Math.sin(p),b=Vt.polarToCartesian(t.centerX,t.centerY,t.donutSize,h),y=Vt.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),w=l>180?1:0,v=["M",g,f,"A",s,s,0,w,1,m,x];return a="donut"===t.chartType?[...v,"L",b.x,b.y,"A",t.donutSize,t.donutSize,0,w,0,y.x,y.y,"L",g,f,"z"].join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[...v,"L",t.centerX,t.centerY,"L",g,f].join(" "):[...v].join(" "),n.roundPathCorners(a,2*this.strokeWidth)}getRoundedSlicePath({me:t,startDeg:e,spanDeg:i,size:s,borderRadius:a}){if(!(i>0))return null;const r=Math.PI/180,n=t.centerX,o=t.centerY,l="donut"===t.chartType,h=s,c=l?t.donutSize:0,d=i*r;let u=a;if(u=Math.min(u,d*h/2),l?(u=Math.min(u,d*c/2),u=Math.min(u,(h-c)/2)):u=Math.min(u,h/2),!(u>.5))return null;const p=e,g=e+i;return l?ps({cx:n,cy:o,rIn:c,rOut:h,a0:p,a1:g,r:u,spanDeg:i}):function({cx:t,cy:e,rOut:i,a0:s,a1:a,r:r,spanDeg:n}){const o=(i,s)=>ds(t,e,i,s),l=r/i*cs,h=o(i,s+l),c=o(i,a-l),d=n-2*l>180?1:0,u=o(i,a),p=o(i-r,a),g=o(i,s),f=o(i-r,s);return["M",us(h),"A",i,i,0,d,1,us(c),"Q",us(u),us(p),"L",`${t} ${e}`,"L",us(f),"Q",us(g),us(h),"Z"].join(" ")}({cx:n,cy:o,rOut:h,a0:p,a1:g,r:u,spanDeg:i})}drawPolarElements(t){const e=this.w,i=new T(this.w),s=new D(this.w),a=new ls(this.w),r=s.group(),n=s.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;let c=e.globals.radialSize;const d=c/(h-1);for(let u=0;u<h-1;u++){const t=s.drawCircle(c);if(t.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const t=a.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);n.add(t)}r.add(t),c-=d}this.drawSpokes(t),t.add(r),t.add(n)}renderInnerDataLabels(t,e,i){const s=this.w,a=new D(this.w),r=e.total.show;t.node.innerHTML="",t.node.style.opacity=i.opacity;const n=i.centerX,o=this.donutDataLabels.total.label?i.centerY:i.centerY-i.centerY/6;let l,h;l=void 0===e.name.color?s.globals.colors[0]:e.name.color;let c=e.name.fontSize,d=e.name.fontFamily,u=e.name.fontWeight;h=void 0===e.value.color?s.config.chart.foreColor:e.value.color;const p=e.value.formatter;let g="",f="";if(r?(l=e.total.color,c=e.total.fontSize,d=e.total.fontFamily,u=e.total.fontWeight,f=this.donutDataLabels.total.label?e.total.label:"",g=e.total.formatter(s)):1===s.seriesData.series.length&&(g=p(s.seriesData.series[0],s),f=s.seriesData.seriesNames[0]),f&&(f=e.name.formatter(f,e.total.show,s)),e.name.show){const i=a.drawText({x:n,y:o+parseFloat(e.name.offsetY),text:f,textAnchor:"middle",foreColor:l,fontSize:c,fontWeight:u,fontFamily:d});i.node.classList.add("apexcharts-datalabel-label"),t.add(i)}if(e.value.show){const i=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,s=a.drawText({x:n,y:o+i,text:g,textAnchor:"middle",foreColor:h,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});s.node.classList.add("apexcharts-datalabel-value"),t.add(s)}return t}printInnerLabels(t,e,i,s){const a=this.w;let r;s?r=void 0===t.name.color?a.globals.colors[parseInt(s.parentNode.getAttribute("rel"),10)-1]:t.name.color:a.seriesData.series.length>1&&t.total.show&&(r=t.total.color);const n=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=a.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,a),s||"function"!==typeof t.total.formatter||(i=t.total.formatter(a));const l=e===t.total.label;if(e=this.donutDataLabels.total.label?t.name.formatter(e,l,a):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n){n.style.fill=r}}printDataLabelsInner(t,e){const i=this.w,s=t.getAttribute("data:value"),a=i.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.seriesData.series.length>1&&this.printInnerLabels(e,a,s,t);const r=i.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(null!==r){r.style.opacity="1"}}drawSpokes(t){const e=this.w,i=new D(this.w),s=e.config.plotOptions.polarArea.spokes;if(0===s.strokeWidth)return;const a=[],r=360/e.seriesData.series.length;for(let n=0;n<e.seriesData.series.length;n++)a.push(Vt.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+r*n));a.forEach(((e,a)=>{const r=i.drawLine(e.x,e.y,this.centerX,this.centerY,Array.isArray(s.connectorColors)?s.connectorColors[a]:s.connectorColors);t.add(r)}))}revertDataLabelsInner(){const t=this.w;if(this.donutDataLabels.show){const e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),i=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(i)}}}function ms(t,e){let i=0;for(let r=0;r<t.length;r++)i+=t[r];const s=e/i,a=new Array(t.length);for(let r=0;r<t.length;r++)a[r]=t[r]*s;return a}function xs(t,e,i,s){const a=s*s,r=i*i;return Math.max(a*e/r,r/(a*t))}function bs(t,e,i,s,a,r){if(0===t)return!0;return xs(e,i,s,r)>=xs(Math.min(e,a),Math.max(i,a),s+a,r)}function ys(t,e,i,s,a,r,n,o){if(n>=o){const n=s/o;let l=r;
1for(let s=0;s<i;s++){const i=e[s]/n;t.push([a,l,a+n,l+i]),l+=i}}else{const o=s/n;let l=a;for(let s=0;s<i;s++){const i=e[s]/o;t.push([l,r,l+i,r+o]),l+=i}}}function ws(t,e,i,s,a){const r=[],n=t.length;if(0===n)return r;const o=new Array(n);let l=0,h=0,c=1/0,d=-1/0,u=0;for(;u<n;){const n=Math.min(s,a),p=t[u];if(bs(l,c,d,h,p,n))o[l]=p,l++,h+=p,p<c&&(c=p),p>d&&(d=p),u++;else{if(ys(r,o,l,h,e,i,s,a),s>=a){const t=h/a;e+=t,s-=t}else{const t=h/s;i+=t,a-=t}l=0,h=0,c=1/0,d=-1/0}}return l>0&&ys(r,o,l,h,e,i,s,a),r}function vs(t){const e=t.children;if(e&&e.length){let i=0;for(let t=0;t<e.length;t++)i+=vs(e[t]);return t._area=i,i}const i=Number(t.value),s=isNaN(i)?0:Math.abs(i);return t._area=s,s}function As(t,e,i,s,a,r,n,o){const l=t.length;if(0===l||s<=0||a<=0)return;const h=new Array(l);let c=0;for(let u=0;u<l;u++)h[u]=t[u]._area,c+=h[u];if(c<=0)return;const d=ws(ms(h,s*a),e,i,s,a);for(let u=0;u<l;u++){const e=t[u],i=d[u];if(!i)continue;e.rect=i,e.depth=r;const s=e.children;if(!s||!s.length)continue;const a=i[2]-i[0],l=i[3]-i[1];let h=Math.max(0,n(e,r,a,l)||0);(2*h>=a||2*h>=l)&&(h=0);let c=Math.max(0,o(e,r,a,l)||0);c>0&&l-2*h-c<c&&(c=0),e.headerHeight=c,As(s,i[0]+h,i[1]+c+h,a-2*h,l-c-2*h,r+1,n,o)}}const _s={generate:function(t,e,i){const s=t.length,a=new Array(s);for(let o=0;o<s;o++){let e=0;const i=t[o];for(let t=0;t<i.length;t++)e+=i[t];a[o]=e}const r=ws(ms(a,e*i),0,0,e,i),n=new Array(s);for(let o=0;o<s;o++){const e=r[o],i=e[0],s=e[1],a=e[2]-i,l=e[3]-s;n[o]=ws(ms(t[o],a*l),i,s,a,l)}return n},generateNested:function(t,e,i,s={}){if(!Array.isArray(t)||0===t.length)return t||[];const a=s.padding||(()=>0),r=s.header||(()=>0);for(let n=0;n<t.length;n++)vs(t[n]);return As(t,0,0,e,i,0,a,r),t}};function Ss(t,e,i,s,a,r=null,n={}){var o,l,h;const c=e&&"object"===typeof e,d=c&&null!=(l=null!=(o=e.x)?o:e.name)?l:"",u=Number(c?null!=(h=e.y)?h:e.value:e),p={name:String(d),value:isNaN(u)?null:u,color:c&&e.color?e.color:void 0,_key:`${a}/${i}:${d}`};if(s&&!p.color&&(p.color=s[i%s.length]),n.keepDatum&&(p._datum=e),c&&Array.isArray(e.children)&&e.children.length)p.children=e.children.map(((e,i)=>Ss(t,e,i,null,p._key,r,n)));else if(c&&null!=e.drilldown&&!1!==n.expandDrilldown){const i=r||new Set;if(!i.has(e.drilldown)){const s=function(t,e){const i=t.config.drilldown;return(i&&Array.isArray(i.series)?i.series:[]).find((t=>t&&t.id===e))}(t,e.drilldown);if(s&&Array.isArray(s.data)&&s.data.length){const a=new Set(i);a.add(e.drilldown);const r=Array.isArray(s.colors)?s.colors:null;p.children=s.data.map(((e,i)=>Ss(t,e,i,r,p._key,a,n)))}}}return p}function Cs(t){t.children&&t.children.length&&(t.children.forEach((t=>Cs(t))),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce(((t,e)=>t+Math.max(0,e.value||0)),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function ks(t){if("string"!==typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}function Ms(t){const e=t.globals.treemapRoots;if(e&&e.length)return{roots:e,maxDepth:t.globals.treemapMaxDepth||1,nested:!0};const i=function(t,e,i={}){const s=e||t.config.series;return Array.isArray(s)?s.map(((e,s)=>{var a,r;const n=e&&Array.isArray(e.data)?e.data:[],o=`${s}:${null!=(a=null==e?void 0:e.name)?a:""}`;return{name:String(null!=(r=null==e?void 0:e.name)?r:""),value:null,color:(null==e?void 0:e.color)||void 0,_key:o,_seriesIndex:s,children:n.map(((e,s)=>Ss(t,e,s,null,o,null,i)))}})):[]}(t,t.config.series,{keepDatum:!0,expandDrilldown:!1});i.forEach(Cs);const{maxDepth:s}=function(t){const e=[];let i=0;return t.forEach(((t,s)=>{const a=[],r=(t,e,n)=>{t._parent=n,t._depth=e,t._si=s,t._leaf=!(t.children&&t.children.length),e>i&&(i=e),t._leaf?(t._di=a.length,a.push(t)):(t._di=-1,t.children.forEach((i=>r(i,e+1,t))))};r(t,0,null),e.push(a)})),{leaves:e,maxDepth:i}}(i);return{roots:i,maxDepth:s,nested:!1}}function Ps(t,e,i,s){return{value:t,velocity:0,target:t,stiffness:e,damping:i}}function Ls(t,e){if(e<=0)return Es(t);let i=e;for(;i>0;){const e=Math.min(i,.022222222222222223),s=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=s*e,t.value+=t.velocity*e,i-=e}return!!Es(t)&&(t.value=t.target,t.velocity=0,!0)}function Is(t,e){t.target=e}function Es(t){var e,i;const s=null!=(e=t.restVelocity)?e:.05,a=null!=(i=t.restDisplacement)?i:.05;return Math.abs(t.velocity)<s&&Math.abs(t.value-t.target)<a}const Ds={crisp:[210,26],gentle:[120,20],snappy:[320,30]};const Fs="__apexcharts_unit_layouts__";function Rs(t){return t&&globalThis[Fs][t]||null}globalThis[Fs]||(globalThis[Fs]={});const zs="__apexcharts_unit_marks__";function Ts(t,e){if("string"===typeof t){const e=t.trim();return e?Object.freeze({name:"anonymous",path:e,viewBox:[0,0,100,100]}):null}if(!t||"object"!==typeof t)return null;if("string"!==typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every((t=>isFinite(t)))||i[2]<=0||i[3]<=0?null:Object.freeze(u(d({},t),{name:t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function Xs(t){return t&&globalThis[zs][t]||null}globalThis[zs]||(globalThis[zs]={});const Os=Math.PI*(3-Math.sqrt(5));function Ws(t){return 1-Math.pow(1-t,3)}function $s(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function Ys(t,e){const[i,s]=function(t){var e;return null!=(e=Ds[null!=t?t:"crisp"])?e:Ds.crisp}(t),a=800/Math.max(1,e);return[i*a*a,s*a]}const Bs=Math.PI/180,Ns=180/Math.PI,Hs="http://www.w3.org/2000/svg",js="http://www.w3.org/1999/xhtml",Vs=(t,e,i)=>t+(e-t)*i;s.ZP.use({line:rs,area:rs,scatter:rs,bubble:rs,rangeArea:rs,bar:Oi,column:Oi,barStacked:class extends Oi{draw(t,e){const i=this.w;this.graphics=new D(this.w),this.bar=new Oi(this.w,this.ctx,this.xyRatios);const s=new S(this.w);
vendor: 5,941 bytes, line 1
1t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===i.config.chart.stackType&&(t=i.globals.comboCharts?e.map((t=>i.globals.seriesPercent[t])):i.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,n=0;const o=i.config.chart.animations,l=o.enabled&&o.dynamicAnimation.enabled&&i.globals.previousPaths.length>0;let h=!1;for(let c=0,p=0;c<t.length;c++,p++){const s=i.globals.comboCharts?e[c]:c,{groupIndex:o,columnGroupIndex:g}=this.barHelpers.getGroupIndex(s);this.groupCtx=this[i.labelData.seriesGroups[o]];const f=[],m=[];let x=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s][0],x=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;let b=this.graphics.group({class:"apexcharts-series",seriesName:Vt.escapeString(i.seriesData.seriesNames[s]),rel:c+1,"data:realIndex":s});X.addCollapsedClassToSeries(this.w,b,s);const y=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":s});X.addCollapsedClassToSeries(this.w,y,s),(i.globals.collapsingSeriesIndices||[]).indexOf(s)>-1&&y.node.style.setProperty("--apexcharts-dl-exit",`${i.config.chart.animations.dynamicAnimation.speed}ms`);const w=this.graphics.group({class:"apexcharts-bar-goals-markers"}),v=this.initialPositions(r,n,void 0,void 0,void 0,void 0,x),{xDivision:A,yDivision:_,zeroH:S,zeroW:C}=v;let k=v.barHeight,M=v.barWidth;n=v.y,r=v.x,i.globals.barHeight=k,i.globals.barWidth=M,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every((t=>isNaN(t)))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map((()=>S)),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map((()=>0)));for(let e=0;e<i.globals.dataPoints;e++){const a=this.barHelpers.getStrokeWidth(c,e,s),v={indexes:{i:c,j:e,realIndex:s,translationsIndex:x,bc:p},strokeWidth:a,x:r,y:n,elSeries:b,columnGroupIndex:g,seriesGroup:i.labelData.seriesGroups[o]};let P=null;this.isHorizontal?(P=this.drawStackedBarPaths(u(d({},v),{zeroW:C,barHeight:k,yDivision:_})),M=this.series[c][e]/this.invertedYRatio):(P=this.drawStackedColumnPaths(u(d({},v),{xDivision:A,barWidth:M,zeroH:S})),k=this.series[c][e]/this.yRatio[x]);const L=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:k,barWidth:M});L&&w.add(L),n=P.y,r=P.x,f.push(r),m.push(n);const I=this.barHelpers.getPathFillColor(t,c,e,s);let E="";const D=i.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",F="bottom"===this.barHelpers.arrBorderRadius[s][e]&&i.seriesData.series[s][e]>0||"top"===this.barHelpers.arrBorderRadius[s][e]&&i.seriesData.series[s][e]<0,R=l&&!F&&this.getPreviousFlip(s,e);(F||R)&&(E=D),R&&(E+=" apexcharts-flip-held",h=!0),b=this.renderSeries(u(d({realIndex:s,pathFill:I.color},I.useRangeColor?{lineFill:I.color}:{}),{j:e,i:c,columnGroupIndex:g,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:a,elSeries:b,x:r,y:n,series:t,barHeight:k,barWidth:M,elDataLabelsWrap:y,elGoalsMarkers:w,type:"bar",visibleSeries:g,classes:E}))}i.globals.seriesXvalues[s]=f,i.globals.seriesYvalues[s]=m,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(b)}return h&&this.settleHeldMirrors(),a}settleHeldMirrors(){const t=this.w;if(!Yt.isBrowser())return;const e=t.config.chart.animations,i=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout((()=>{!t.globals.isDestroyed&&Vt.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach((t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")}))}),i)}initialPositions(t,e,i,s,a,r,n){const o=this.w;let l,h;if(this.isHorizontal){s=o.layout.gridHeight/o.globals.dataPoints;const t=o.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):s*parseInt(t,10)/100,r=o.globals.padHorizontal+(this.isReversed?o.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(s-l)/2}else{h=i=o.layout.gridWidth/o.globals.dataPoints;const e=o.config.plotOptions.bar.columnWidth,s=o.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;s>0?h=(i=s/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),a=this.isReversed?this.baseLineY[n]:o.layout.gridHeight-this.baseLineY[n],t=o.globals.padHorizontal+(i-h)/2}const c=o.globals.barGroups.length||1;return{x:t,y:e,yDivision:s,xDivision:i,barHeight:(null!=l?l:0)/c,barWidth:(null!=h?h:0)/c,zeroH:a,zeroW:r}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:i,zeroW:s,x:a,y:r,columnGroupIndex:n,seriesGroup:o,yDivision:l,elSeries:h}){var c,d,u,p,g;const f=this.w,m=r+n*e;let x;const b=t.i,y=t.j,w=t.realIndex,v=t.translationsIndex;let A=0;for(let C=0;C<this.groupCtx.prevXF.length;C++)A+=this.groupCtx.prevXF[C][y];const _=this.groupCtx.prevX.length;if(_>0){let t=s;this.groupCtx.prevXVal[_-1][y]<0?t=(null==(c=this.series[b])?void 0:c[y])>=0?this.groupCtx.prevX[_-1][y]+A-2*(this.isReversed?A:0):this.groupCtx.prevX[_-1][y]:this.groupCtx.prevXVal[_-1][y]>=0&&(t=(null==(d=this.series[b])?void 0:d[y])>=0?this.groupCtx.prevX[_-1][y]:this.groupCtx.prevX[_-1][y]-A+2*(this.isReversed?A:0)),x=t}else x=s;a=null===(null==(u=this.series[b])?void 0:u[y])?x:x+(null==(p=this.series[b])?void 0:p[y])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[b])?void 0:g[y])/this.invertedYRatio:0);const S=this.barHelpers.getBarpaths({barYPosition:m,barHeight:e,x1:x,x2:a,strokeWidth:i,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:o,i:b,j:y,w:f});
vendor: 10,329 bytes, line 1
1return this.barHelpers.barBackground({j:y,i:b,y1:m,y2:e,elSeries:h}),r+=l,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",s,null,w,y,v),barXPosition:x,barYPosition:m,x:a,y:r}}drawStackedColumnPaths({indexes:t,x:e,y:i,xDivision:s,barWidth:a,zeroH:r,columnGroupIndex:n,seriesGroup:o,elSeries:l}){var h,c,d,u,p,g,f,m,x;const b=this.w,y=t.i,w=t.j,v=t.bc,A=t.realIndex,_=t.translationsIndex;if(b.axisFlags.isXNumeric){let t=b.seriesData.seriesX[A][w];t||(t=0),e=(t-b.globals.minX)/this.xRatio-a/2*b.globals.barGroups.length}const S=e+n*a;let C,k=0;for(let L=0;L<this.groupCtx.prevYF.length;L++)k+=isNaN(this.groupCtx.prevYF[L][w])?0:this.groupCtx.prevYF[L][w];const M=this.groupCtx.prevY.length;if(M>0&&!b.axisFlags.isXNumeric||M>0&&b.axisFlags.isXNumeric&&b.seriesData.seriesX[A-1][w]===b.seriesData.seriesX[A][w]){let t,e;const i=Math.min(this.yRatio.length+1,A+1);if(void 0!==this.groupCtx.prevY[M-1]&&this.groupCtx.prevY[M-1].length)for(let s=1;s<i;s++)if(!isNaN(null==(h=this.groupCtx.prevY[M-s])?void 0:h[w])){e=this.groupCtx.prevY[M-s][w];break}for(let s=1;s<i;s++){if((null==(c=this.groupCtx.prevYVal[M-s])?void 0:c[w])<0){t=(null==(d=this.series[y])?void 0:d[w])>=0?e-k+2*(this.isReversed?k:0):e;break}if((null==(u=this.groupCtx.prevYVal[M-s])?void 0:u[w])>=0){t=(null==(p=this.series[y])?void 0:p[w])>=0?e:e+k-2*(this.isReversed?k:0);break}}"undefined"===typeof t&&(t=b.layout.gridHeight),C=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every((t=>0===t)))&&this.groupCtx.prevYF.slice(1,M).every((t=>t.every((t=>isNaN(t)))))?r:t}else C=r;i=(null==(f=this.series[y])?void 0:f[w])?C-(null==(m=this.series[y])?void 0:m[w])/this.yRatio[_]+2*(this.isReversed?(null==(x=this.series[y])?void 0:x[w])/this.yRatio[_]:0):C;const P=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:a,y1:C,y2:i,yRatio:this.yRatio[_],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:o,realIndex:t.realIndex,i:y,j:w,w:b});return this.barHelpers.barBackground({bc:v,j:w,i:y,x1:S,x2:a,elSeries:l}),{pathTo:P.pathTo,pathFrom:P.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,A,w,0),barXPosition:S,x:b.axisFlags.isXNumeric?e:e+s,y:i}}},rangeBar:class extends Oi{draw(t,e){var i,s,a,r,n,o,l,h,c;const u=this.w,p=new D(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.rangeData.seriesRangeStart,this.seriesRangeEnd=u.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const g=p.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let f=0;f<t.length;f++){let m,x;const b=u.globals.comboCharts?e[f]:f,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(b),w=p.group({class:"apexcharts-series",seriesName:Vt.escapeString(u.seriesData.seriesNames[b]),rel:f+1,"data:realIndex":b});X.addCollapsedClassToSeries(this.w,w,b),t[f].length>0&&(this.visibleI=this.visibleI+1);let v=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[b][0],v=b);const A=this.barHelpers.initialPositions(b),{y:_,zeroW:S,x:C,zeroH:k}=A;let M=null!=(i=A.barWidth)?i:0,P=null!=(s=A.barHeight)?s:0;const L=null!=(a=A.yDivision)?a:0,I=null!=(r=A.xDivision)?r:0;x=_,m=C;const E=p.group({class:"apexcharts-datalabels","data:realIndex":b}),D=p.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<u.globals.dataPoints;e++){const i=this.barHelpers.getStrokeWidth(f,e,b),s=this.seriesRangeStart[f][e],a=this.seriesRangeEnd[f][e];let r=null,p=null,g=null;const _={x:m,y:x,strokeWidth:i,elSeries:w};let C=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(C=1),"undefined"===typeof(null==(n=u.config.series[f].data)?void 0:n[e]))break;if(this.isHorizontal){g=x+P*this.visibleI;const t=(L-P*C)/2;if(null==(l=null==(o=u.config.series[f].data)?void 0:o[e])?void 0:l.x){const i=this.detectOverlappingBars({i:f,j:e,barYPosition:g,srty:t,barHeight:P,yDivision:L,initPositions:A});P=i.barHeight,g=i.barYPosition}r=this.drawRangeBarPaths(d({indexes:{i:f,j:e,realIndex:b},barHeight:P,barYPosition:g,zeroW:S,yDivision:L,y1:s,y2:a},_)),M=r.barWidth}else{u.axisFlags.isXNumeric&&(m=(u.seriesData.seriesX[f][e]-u.globals.minX)/this.xRatio-M/2),p=m+M*this.visibleI;const t=(I-M*C)/2;if(null==(c=null==(h=u.config.series[f].data)?void 0:h[e])?void 0:c.x){const i=this.detectOverlappingBars({i:f,j:e,barXPosition:p,srtx:t,barWidth:M,xDivision:I,initPositions:A});M=i.barWidth,p=i.barXPosition}r=this.drawRangeColumnPaths(d({indexes:{i:f,j:e,realIndex:b,translationsIndex:v},barWidth:M,barXPosition:p,zeroH:k,xDivision:I},_)),P=r.barHeight}const F=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:g,goalX:r.goalX,goalY:r.goalY,barHeight:P,barWidth:M});F&&D.add(F),x=r.y,m=r.x;const R=this.barHelpers.getPathFillColor(t,f,e,b);this.renderSeries({realIndex:b,pathFill:R.color,lineFill:R.useRangeColor?R.color:u.globals.stroke.colors[b],j:e,i:f,x:m,y:x,y1:s,y2:a,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:i,elSeries:w,series:t,barHeight:P,barWidth:M,barXPosition:p,barYPosition:g,columnGroupIndex:y,elDataLabelsWrap:E,elGoalsMarkers:D,visibleSeries:this.visibleI,type:"rangebar"})}g.add(w)}return g}detectOverlappingBars({i:t,j:e,barYPosition:i,barXPosition:s,srty:a,srtx:r,barHeight:n,barWidth:o,yDivision:l,xDivision:h,initPositions:c}){var d,u,p,g;const f=this.w;let m=[];const x=null==(u=null==(d=f.globals.seriesRangeName)?void 0:d[t])?void 0:u[e],b=null==(g=null==(p=f.config.series[t].data)?void 0:p[e])?void 0:g.x,y=Array.isArray(b)?b.join(" "):b,w=f.labelData.labels.map((t=>Array.isArray(t)?t.join(" "):t)).indexOf(y),v=f.rangeData.seriesRange[t].findIndex((t=>{var e;return t.x===y&&(null==(e=t.overlaps)?void 0:e.size)>0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?a+l*w:a+n*this.visibleI+l*w,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(m=Array.from(f.rangeData.seriesRange[t][v].overlaps),m.indexOf(x)>-1&&(i=(n=c.barHeight/m.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+n*(this.visibleI+m.indexOf(x))+l*w))):(w>-1&&!f.labelData.timescaleLabels.length&&(s=f.config.plotOptions.bar.rangeBarGroupRows?r+h*w:r+o*this.visibleI+h*w),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(m=Array.from(f.rangeData.seriesRange[t][v].overlaps),m.indexOf(x)>-1&&(s=(o=c.barWidth/m.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+o*(this.visibleI+m.indexOf(x))+h*w))),{barYPosition:i,barXPosition:s,barHeight:n,barWidth:o}}drawRangeColumnPaths({indexes:t,x:e,xDivision:i,barWidth:s,barXPosition:a,zeroH:r}){var n,o;const l=this.w,{i:h,j:c,realIndex:d,translationsIndex:u}=t,p=this.yRatio[u],g=this.getRangeValue(d,c);let f=Math.min(g.start,g.end),m=Math.max(g.start,g.end);const x=!("undefined"===typeof(null==(n=this.series[h])?void 0:n[c])||null===(null==(o=this.series[h])?void 0:o[c]));x?(f=r-f/p,m=r-m/p):f=r;const b=Math.abs(m-f),y=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:s,y1:f,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:c,w:l});if(x){const t=y.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(d,c,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:d,barWidth:s});e=t.x,a=t.barXPosition}else e+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:e,y:g.start<0&&g.end<0?f:m,goalY:this.barHelpers.getGoalValues("y",null,r,d,c,u),barXPosition:a}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:i,y2:s,yDivision:a,barHeight:r,barYPosition:n,zeroW:o}){const l=this.w,{realIndex:h,j:c}=t,d=this.preventBarOverflow(o+i/this.invertedYRatio),u=this.preventBarOverflow(o+s/this.invertedYRatio),p=this.getRangeValue(h,c),g=Math.abs(u-d),f=this.barHelpers.getBarpaths({barYPosition:n,barHeight:r,x1:d,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:c,w:l});if(null!=p.start&&null!=p.end){const t=f.drawnBox;this.recordColumnGeometry(h,c,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=a),{pathTo:f.pathTo,pathFrom:f.pathFrom,barWidth:g,x:p.start<0&&p.end<0?d:u,goalX:this.barHelpers.getGoalValues("x",o,null,h,c,0),y:e}}recordColumnGeometry(t,e,i){const s=this.w.waterfallData&&this.w.waterfallData.geometry;s&&isFinite(i.slotStart)&&isFinite(i.levelEnd)&&(s[t]||(s[t]=[]),s[t][e]=i)}getRangeValue(t,e){const i=this.w;return{start:i.rangeData.seriesRangeStart[t][e],end:i.rangeData.seriesRangeEnd[t][e]}}},candlestick:Vi,boxPlot:Vi,violin:class extends Oi{draw(t,e,i){var s;const a=this.w,r=new D(this.w),n=new L(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Ji(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:Ji(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?Qi(this.boxOptions.width,.15):0,this.rainFrac=Qi(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new S(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const o=r.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let l=0;l<t.length;l++){let e,h;const c=[],d=[],u=a.globals.comboCharts?i[l]:l,{columnGroupIndex:p}=this.barHelpers.getGroupIndex(u),g=r.group({class:"apexcharts-series",seriesName:Vt.escapeString(a.seriesData.seriesNames[u]),rel:l+1,"data:realIndex":u});X.addCollapsedClassToSeries(this.w,g,u),t[l].length>0&&(this.visibleI=this.visibleI+1);let f=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[u][0],f=u);const m=this.barHelpers.initialPositions(u),{y:x,barHeight:b,yDivision:y,zeroW:w,x:v,barWidth:A,xDivision:_,zeroH:S}=m;h=x,e=v,d.push(e+(null!=A?A:0)/2);const C=r.group({class:"apexcharts-datalabels","data:realIndex":u});if(this.seriesMaxWeight=0,"group"===this.normalize){(a.violinData.seriesViolinDensity[u]||[]).forEac
vendor: 9,448 bytes, line 1
1h((t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)}))}const k=[];for(let i=0;i<a.globals.dataPoints;i++){const r=this.barHelpers.getStrokeWidth(l,i,u),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:l,j:i,realIndex:u,translationsIndex:f},y:h,yDivision:y,barHeight:b,zeroW:w}):this.drawVerticalViolin({indexes:{i:l,j:i,realIndex:u,translationsIndex:f},x:e,xDivision:_,barWidth:A,zeroH:S});e=o.x,h=o.y,i>0&&d.push(o.center),c.push(o.alongRepresentative);const m=this.buildPointsSubPath({realIndex:u,j:i,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight,cloudBase:o.cloudBase,cloudMaxPx:o.cloudMaxPx,rainCenter:o.rainCenter,rainHalfPx:o.rainHalfPx});m.length&&k.push({groups:m,j:i});const x=n.fillPath({seriesNumber:this.distributed?i:u,dataPointIndex:i,color:this.distributed?a.globals.colors[i]:void 0,value:t[l][i]});this.renderSeries({realIndex:u,pathFill:x,lineFill:a.globals.stroke.colors[u],j:i,i:l,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:r,elSeries:g,x:e,y:h,series:t,columnGroupIndex:p,barHeight:b,barWidth:A,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin"});const v=g.node.querySelector(`path.apexcharts-violin-area[j='${i}']`);if(v&&isFinite(o.alongRepresentative)&&v.setAttribute(this.isHorizontal?"cx":"cy",`${o.alongRepresentative}`),o.boxPaths){const r=null!=(s=this.boxOptions.strokeWidth)?s:1;o.boxPaths.forEach((s=>{this.renderSeries({realIndex:u,pathFill:s.filled?this.boxOptions.fillColor||x:"none",lineFill:a.globals.stroke.colors[u],j:i,i:l,pathFrom:s.pathFrom,pathTo:s.pathTo,strokeWidth:r,elSeries:g,x:e,y:h,series:t,columnGroupIndex:p,barHeight:b,barWidth:A,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box"})}))}}$i({graphics:r,w:a,elSeries:g,pointsByCat:k,options:this.pointsOptions,distributed:this.distributed,realIndex:u,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[u]=d,a.globals.seriesYvalues[u]=c,o.add(g)}return o}drawVerticalViolin({indexes:t,x:e,xDivision:i,barWidth:s,zeroH:a}){var r,n,o,l,h,c,d;const u=this.w,{realIndex:p,j:g,translationsIndex:f}=t,m=this.yRatio[f];u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[p][g]-u.globals.minX)/this.xRatio-s/2);const x=e+s*this.visibleI+s/2,b=s/2,y=this.getDensity(p,g),w=this.effectiveMaxWeight(y),v=t=>a-this.logVal(t,p)/m,A=ts({halfExtent:b,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(n=this.rainSign)?n:0,boxFrac:null!=(o=this.boxFrac)?o:0,rainFrac:null!=(l=this.rainFrac)?l:0}),_=x+A.cloudBaseOff,S=this.buildBodyPath({nodes:y.nodes,center:_,halfExtent:A.cloudMaxPx,maxWeight:w,vertical:!0,alongFn:v,collapsed:!1,sideSign:this.cloudSign});let C=null;const k=null==(c=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:c.getInitialPathFor(p,g);return k?C=k:u.globals.previousPaths.length>0&&(C=this.getPreviousPath(p,g,S)),null==C&&(C=this.buildBodyPath({nodes:y.nodes,center:_,halfExtent:A.cloudMaxPx,maxWeight:w,vertical:!0,alongFn:v,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=i),{pathTo:S,pathFrom:C,x:e,y:a,center:x,halfExtent:b,alongFn:v,density:y,maxWeight:w,cloudBase:_,cloudMaxPx:A.cloudMaxPx,rainCenter:x+A.rainCenterOff,rainHalfPx:A.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:g,boxCenter:x+A.boxCenterOff,boxHalfPx:A.boxHalfPx,alongFn:v,vertical:!0}),alongRepresentative:v(null!=(d=this.series[t.i][g])?d:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:i,barHeight:s,zeroW:a}){var r,n,o,l,h,c,d;const u=this.w,{realIndex:p,j:g}=t,f=this.invertedYRatio;u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[p][g]-u.globals.minX)/this.invertedXRatio-s/2);const m=e+s*this.visibleI+s/2,x=s/2,b=this.getDensity(p,g),y=this.effectiveMaxWeight(b),w=t=>a+this.logVal(t,p)/f,v=ts({halfExtent:x,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(n=this.rainSign)?n:0,boxFrac:null!=(o=this.boxFrac)?o:0,rainFrac:null!=(l=this.rainFrac)?l:0}),A=m+v.cloudBaseOff,_=this.buildBodyPath({nodes:b.nodes,center:A,halfExtent:v.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:w,collapsed:!1,sideSign:this.cloudSign});let S=null;const C=null==(c=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:c.getInitialPathFor(p,g);return C?S=C:u.globals.previousPaths.length>0&&(S=this.getPreviousPath(p,g,_)),null==S&&(S=this.buildBodyPath({nodes:b.nodes,center:A,halfExtent:v.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:w,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=i),{pathTo:_,pathFrom:S,x:a,y:e,center:m,halfExtent:x,alongFn:w,maxWeight:y,density:b,cloudBase:A,cloudMaxPx:v.cloudMaxPx,rainCenter:m+v.rainCenterOff,rainHalfPx:v.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:p,j:g,boxCenter:m+v.boxCenterOff,boxHalfPx:v.boxHalfPx,alongFn:w,vertical:!1}),alongRepresentative:w(null!=(d=this.series[t.i][g])?d:0)}}getDensity(t,e){var i;const s=null==(i=this.w.violinData.seriesViolinDensity[t])?void 0:i[e];if(!s||!s.values.length)return{nodes:[],maxWeight:0};const a=s.values.map(((t,e)=>e));a.sort(((t,e)=>s.values[t]-s.values[e]));const r=[];let n=null;for(const o of a){const t=s.values[o];null!==n&&t===n||(r.push({v:t,w:s.weights[o]}),n=t)}return{nodes:r,maxWeight:s.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:i,maxWeight:s,vertical:a,alongFn:r,collapsed:n,sideSign:o=0}){const l=new D(this.w);if(0===t.length){const t=r(0);return a?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const h=t=>{if(n||s<=0)return 0;const e=t/s*i*this.bandwidthScale;return Math.min(i,Math.max(0,e))},c=[],d=[];for(let u=0;u<t.length;u++){const i=r(t[u].v),s=h(t[u].w),n=0===o?e+s:e+o*s,l=0===o?e-s:e;a?(c.push([n,i]),d.push([l,i])):(c.push([i,n]),d.push([i,l]))}return d.reverse(),this.smoothSegment(c,a,!1)+this.smoothSegment(d,a,!0)+"z"}buildBoxSubPaths({realIndex:t,j:e,boxCenter:i,boxHalfPx:s,alongFn:a,vertical:r}){var n,o;const l=this.w;if(!this.boxShown||s<=0)return null;const h=null==(n=l.violinData.seriesViolinSummary[t])?void 0:n[e];if(!h)return null;const c=s*Math.min(1,Math.max(0,null!=(o=this.boxOptions.capWidth)?o:.5)),[d,u,p,g,f]=h.map((t=>a(t))),m=(t,e)=>{const s=new D(this.w),a=(t,e)=>r?[t,e]:[e,t],n=t=>t.map((([t,e],i)=>0===i?s.move(t,e):s.line(t,e))).join(""),o=i;return{whiskers:n([a(o,d),a(o,u)])+n([a(o,g),a(o,f)])+n([a(o-t,d),a(o+t,d)])+n([a(o-t,f),a(o+t,f)]),box:n([a(o-e,u),a(o+e,u),a(o+e,g),a(o-e,g)])+"z"+n([a(o-e,p),a(o+e,p)])}},x=m(c,s),b=m(0,0),y=(i,s)=>{let a=null;return l.globals.previousPaths.length>0&&(a=this.getPreviousPath(t,e,i)),null==a?s:a};return[{pathTo:x.whiskers,pathFrom:y(x.whiskers,b.whiskers),filled:!1},{pathTo:x.box,pathFrom:y(x.box,b.box),filled:!0}]}smoothSegment(t,e,i){const s=new D(this.w),a=t[0];let r=i?s.line(a[0],a[1]):s.move(a[0],a[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=s.line(t[e][0],t[e][1]);return r}const n=t.map((([t,i])=>e?[i,t]:[t,i])),o=Zi.points(n),l=e?o.map(Ki):o;return r+=qi(l),r}strictlyMonotonic(t,e){const i=e?1:0;for(let s=1;s<t.length;s++)if(t[s][i]===t[s-1][i])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:i,halfExtent:s,alongFn:a,density:r,maxWeight:n,cloudBase:o,cloudMaxPx:l,rainCenter:h,rainHalfPx:c}){var d;const u=0!==this.rainSign,p=u?h:0!==this.cloudSign?o:i,g=u?c:0!==this.cloudSign?l:s;return Wi({w:this.w,points:null==(d=this.w.violinData.seriesViolinPoints[t])?void 0:d[e],seedA:t,seedB:e,center:p,halfExtent:g,alongFn:a,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:t=>this.halfWidthAtValue(t,r,g,n),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,i,s){const{nodes:a}=e,r=null!=s?s:e.maxWeight;if(!a.length||r<=0)return 0;const n=t=>Math.min(i,t/r*i*this.bandwidthScale);if(t<=a[0].v)return n(a[0].w);if(t>=a[a.length-1].v)return n(a[a.length-1].w);for(let o=1;o<a.length;o++)if(t<=a[o].v){const e=a[o-1],i=a[o],s=i.v===e.v?0:(t-e.v)/(i.v-e.v);return n(e.w+(i.w-e.w)*s)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}},pie:fs,donut:fs,polarArea:fs,radialBar:class extends fs{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),360===this.endAngle&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){var e;const i=this.w,s=new D(this.w),a=s.group({class:"apexcharts-radialbar"});if(i.globals.noData)return a;const r=s.group(),n=i.layout.gridHeight/2,o=i.layout.gridWidth/2;let l=this.defaultSize/2.05;i.config.chart.sparkline.enabled||(l=l-i.config.stroke.width-i.config.chart.dropShadow.blur);const h=i.globals.fill.colors,c=i.config.plotOptions.radialBar,d=Array.isArray(c.bands)&&c.bands.length>
vendor: 7,288 bytes, line 1
10,u=d&&c.bandsStyle&&c.bandsStyle.hideTrackWhenPresent,p="needle"===c.shape;if(c.track.show&&!u){const e=this.drawTracks({size:l,centerX:o,centerY:n,colorArr:h,series:t});r.add(e)}if(d){const e=this.drawBands({size:l,centerX:o,centerY:n,series:t});r.add(e)}const g=this.drawArcs({size:l,centerX:o,centerY:n,colorArr:h,series:t,skipValueArc:p&&!(null==(e=c.needle)?void 0:e.showValueArc)});if(c.ticks&&c.ticks.show){const e=this.drawTicks({size:l,centerX:o,centerY:n,series:t});if(this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized&&Yt.isBrowser()&&i.globals.shouldAnimate){const t=e.node;t.style.opacity="0",t.style.transition="opacity 280ms ease-out";const s=i.config.chart.animations.speed||800;setTimeout((()=>{t.style.opacity="1"}),s)}r.add(e)}if(p){const e=this.drawNeedle({size:l,centerX:o,centerY:n,series:t});r.add(e)}let f=360;i.config.plotOptions.radialBar.startAngle<0&&(f=this.totalAngle);const m=(360-f)/360;if(i.globals.radialSize=l-l*m,this.radialDataLabels.value.show){const t=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);i.globals.radialSize+=t*m}return r.add(g.g),"front"===i.config.plotOptions.radialBar.hollow.position&&(g.g.add(g.elHollow),g.dataLabels&&g.g.add(g.dataLabels)),a.add(r),a}drawTracks(t){const e=this.w,i=new D(this.w),s=i.group({class:"apexcharts-tracks"}),a=new I(this.w),r=new L(this.w),n=this.getStrokeWidth(t);t.size=t.size-n/2;for(let o=0;o<t.series.length;o++){const l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});s.add(l),l.attr({rel:o+1}),t.size=t.size-n-this.margin;const h=e.config.plotOptions.radialBar.track,c=r.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(h.background)?h.background[o]:h.background,solid:!0}),d=this.trackStartAngle;let u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);const p=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){const t=h.dropShadow;a.dropShadow(p,t)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return s}drawArcs(t){var e;const i=this.w,s=new D(this.w),a=new L(this.w),r=new I(this.w),n=s.group(),o=this.getStrokeWidth(t);t.size=t.size-o/2;let l=i.config.plotOptions.radialBar.hollow.background;const h=t.size-o*t.series.length-this.margin*t.series.length-o*parseInt(i.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=h-i.config.plotOptions.radialBar.hollow.margin;void 0!==i.config.plotOptions.radialBar.hollow.image&&(l=this.drawHollowImage(t,n,h,l));const d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:l||"transparent"});if(i.config.plotOptions.radialBar.hollow.dropShadow.enabled){const t=i.config.plotOptions.radialBar.hollow.dropShadow;r.dropShadow(d,t)}let u=1;!this.radialDataLabels.total.show&&i.seriesData.series.length>1&&(u=0);let p=null;if(this.radialDataLabels.show){const e=i.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(e,this.radialDataLabels,{hollowSize:h,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===i.config.plotOptions.radialBar.hollow.position&&(n.add(d),p&&n.add(p));let g=!1;i.config.plotOptions.radialBar.inverseOrder&&(g=!0);const f=!0===(null==(e=this.ctx.morphTypeChange)?void 0:e.isActive());for(let m=g?t.series.length-1:0;g?m>=0:m<t.series.length;g?m--:m++){const e=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:Vt.escapeString(i.seriesData.seriesNames[m])});n.add(e),e.attr({rel:m+1,"data:realIndex":m}),X.addCollapsedClassToSeries(this.w,e,m),t.size=t.size-o-this.margin;const l=a.fillPath({seriesNumber:m,size:t.size,value:t.series[m]}),h=this.startAngle;let c;const d=i.config.plotOptions.radialBar,u="number"===typeof d.min?d.min:0,p="number"===typeof d.max?d.max:100,g=p===u?1:p-u,x=t=>{const e=Math.min(Math.max(t,u),p);return Math.max(0,(e-u)/g)},b=x(Vt.negToZero(t.series[m]));let y,w=Math.round(this.totalAngle*b)+this.startAngle;i.globals.dataChanged&&(c=this.startAngle,y=Math.round(this.totalAngle*x(Vt.negToZero(i.globals.previousPaths[m])))+c);Math.abs(w)+Math.abs(h)>360&&(w-=.01);Math.abs(y)+Math.abs(c)>360&&(y-=.01);const v=w-h,A=Array.isArray(i.config.stroke.dashArray)?i.config.stroke.dashArray[m]:i.config.stroke.dashArray,_=f?this.ctx.morphTypeChange.getInitialPathFor(m,0):null,S=f?this.ctx.morphTypeChange.getFromType():null,C=!!_&&("bar"===S||"funnel"===S||"pyramid"===S||"pie"===S||"donut"===S||"polarArea"===S),k=s.drawPath({d:_||"",stroke:C||t.skipValueArc?"transparent":l,strokeWidth:C||t.skipValueArc?0:o,fill:C?l:"none",fillOpacity:i.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+m,strokeDashArray:A}),M=h+v/2,P=Vt.polarToCartesian(t.centerX,t.centerY,t.size,M);if(D.setAttrs(k.node,{"data:angle":v,"data:value":t.series[m],"data:cx":P.x,"data:cy":P.y}),i.config.chart.dropShadow.enabled){const t=i.config.chart.dropShadow;r.dropShadow(k,t,m)}if(r.setSelectionFilter(k,0,m),this.addListeners(k,this.radialDataLabels),e.add(k),k.attr({index:0,j:m}),this.barLabels.enabled){const a=Vt.polarToCartesian(t.centerX,t.centerY,t.size,h),r=this.barLabels.formatter(i.seriesData.seriesNames[m],{seriesIndex:m,w:i}),n=["apexcharts-radialbar-label"];this.barLabels.onClick||n.push("apexcharts-no-click");let o=this.barLabels.useSeriesColors?i.globals.colors[m]:i.config.chart.foreColor;o||(o=i.config.chart.foreColor);const l=a.x+this.barLabels.offsetX,c=a.y+this.barLabels.offsetY,d=s.drawText({x:l,y:c,text:r,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:n.join(" ")});d.on("click",this.onBarLabelClick),d.attr({rel:m+1}),0!==h&&d.attr({"transform-origin":`${l} ${c}`,transform:`rotate(${h} 0 0)`}),e.add(d)}let L=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged||(L=i.config.chart.animations.speed),i.globals.dataChanged&&(L=i.config.chart.animations.dynamicAnimation.speed),this.animDur=L/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),f&&_){const e=this.ctx.morphTypeChange.getSpeed(),i=this.getPiePath({me:this,startAngle:h,angle:v,size:t.size});if(C){const s=this.ctx.morphTypeChange.buildRingSegmentPath(t.centerX,t.centerY,t.size,o,h,h+v);k.animate(e).plot(s,"polygons").after((function(){this.attr({d:i,fill:"none",stroke:t.skipValueArc?"transparent":l,"stroke-width":t.skipValueArc?0:o})}))}else k.animate(e).plot(i,"polygons").attr({"stroke-width":o})}else this.animatePaths(k,{centerX:t.centerX,centerY:t.centerY,endAngle:w,startAngle:h,prevEndAngle:y,prevStartAngle:c,size:t.size,i:m,totalItems:2,animBeginArr:this.animBeginArr,dur:L,shouldSetPrevPaths:!0})}return{g:n,elHollow:d,dataLabels:p}}_angleAtValue(t){const e=this.w.config.plotOptions.radialBar,i="number"===typeof e.min?e.min:0,s="number"===typeof e.max?e.max:100,a=s===i?i+1:s,r=(Math.max(i,Math.min(a,Number(t)))-i)/(a-i);return this.startAngle+r*(this.endAngle-this.startAngle)}_describeArc(t,e,i,s,a){const r=Vt.polarToCartesian(t,e,i,a),n=Vt.polarToCartesian(t,e,i,s),o=a-s,l=
vendor: 10,370 bytes, line 1
1Math.abs(o)>180?1:0;return`M ${r.x} ${r.y} A ${i} ${i} 0 ${l} 0 ${n.x} ${n.y}`}drawBands(t){const e=this.w,i=new D(this.w),s=e.config.plotOptions.radialBar,a=s.bands||[],r=i.group({class:"apexcharts-gauge-bands"}),n=this.getStrokeWidth(t),o=t.size-n/2-n-this.margin,l=n*parseInt(s.bandsStyle.strokeWidth,10)/100,h="number"===typeof s.min?s.min:0,c="number"===typeof s.max?s.max:100,d=c===h?0:(s.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(c-h));for(let u=0;u<a.length;u++){const e=a[u];if(void 0===e.from||void 0===e.to)continue;const n=this._angleAtValue(e.from),h=this._angleAtValue(e.to),c=Math.min(n,h)+d/2,p=Math.max(n,h)-d/2;if(p-c<=0)continue;const g=i.drawPath({d:this._describeArc(t.centerX,t.centerY,o,c,p),stroke:e.color||"#ccc",strokeWidth:l,fill:"none",strokeLinecap:s.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});g.node.setAttribute("data-band-index",String(u)),r.add(g)}return r}drawTicks(t){var e,i,s,a;const r=this.w,n=new D(this.w),o=r.config.plotOptions.radialBar,l=o.ticks,h=n.group({class:"apexcharts-gauge-ticks"}),c=this.getStrokeWidth(t),d=t.size-c/2-c-this.margin,u="number"===typeof o.min?o.min:0,p="number"===typeof o.max?o.max:100,g=Math.max(2,null!=(i=null==(e=l.major)?void 0:e.count)?i:11),f=Math.max(0,null!=(a=null==(s=l.minor)?void 0:s.count)?a:0),m=(e,i,s)=>{var a,r,o;const c=this._angleAtValue(e),u=null!=(a=i.length)?a:8,p="inside"===i.placement?d-u:d,g="inside"===i.placement?d:d+u,f=Vt.polarToCartesian(t.centerX,t.centerY,p,c),m=Vt.polarToCartesian(t.centerX,t.centerY,g,c),x=n.drawLine(f.x,f.y,m.x,m.y,i.color||(s?"#666":"#999"),0,i.width||(s?2:1));if(h.add(x),s&&(null==(r=l.labels)?void 0:r.show)){const s=("inside"===i.placement?p:g)+("inside"===i.placement?-1:1)*(null!=(o=l.labels.offset)?o:6),a=Vt.polarToCartesian(t.centerX,t.centerY,s,c),r="function"===typeof l.labels.formatter?l.labels.formatter(e):String(e),d=n.drawText({x:a.x,y:a.y,text:r,textAnchor:"middle",dominantBaseline:"middle",fontFamily:l.labels.fontFamily,fontSize:l.labels.fontSize,fontWeight:l.labels.fontWeight,foreColor:l.labels.color,cssClass:"apexcharts-gauge-tick-label"});h.add(d)}};for(let x=0;x<g;x++){if(m(u+x/(g-1)*(p-u),l.major||{},!0),x<g-1&&f>0)for(let t=1;t<=f;t++){m(u+(x+t/(f+1))/(g-1)*(p-u),l.minor||{},!1)}}return h}drawNeedle(t){var e,i,s,a,r;const n=this.w,o=new D(this.w),l=n.config.plotOptions.radialBar.needle||{},h=o.group({class:"apexcharts-gauge-needle"});if(!t.series||0===t.series.length)return h;const c=this.getStrokeWidth(t),d=t.size-c/2-c-this.margin,u="string"===typeof l.length&&l.length.endsWith("%")?d*parseInt(l.length,10)/100:Number(l.length||.85*d),p=null!=(e=l.baseWidth)?e:4,g=null!=(i=l.tipWidth)?i:1,f=l.color||"#333",m=t.centerX,x=Number(null!=(s=l.offsetY)?s:0),b=t.centerY+x,y=`M ${m+p/2} ${b} A ${p/2} ${p/2} 0 0 1 ${m-p/2} ${b} L ${m-g/2} ${b-u} L ${m+g/2} ${b-u} Z`,w=o.drawPath({d:y,stroke:f,strokeWidth:0,fill:f,classes:"apexcharts-gauge-needle-shape"});h.add(w);const v=Number(t.series[0]),A=this._angleAtValue(v),_=this.initialAnim&&!n.globals.dataChanged&&!n.globals.resized,S=this.ctx,C="number"===typeof S._lastNeedleAngle?S._lastNeedleAngle:this.startAngle;S._lastNeedleAngle=A;if(Yt.isBrowser()&&n.globals.shouldAnimate&&(_||n.globals.dataChanged)&&C!==A){const t=h.node;t.setAttribute("transform-origin",`${m} ${b}`),t.setAttribute("transform",`rotate(${C})`);const e=(null==(a=l.animation)?void 0:a.duration)&&Number(l.animation.duration)||l.animationSpeed&&Number(l.animationSpeed)||(null==(r=n.config.chart.animations.dynamicAnimation)?void 0:r.speed)||n.config.chart.animations.speed||800,i=1.70158,s=i+1,o=t=>1+s*Math.pow(t-1,3)+i*Math.pow(t-1,2),c=t=>1-Math.pow(1-t,3),d=_?o:c;null!=n.globals.radialNeedleRAF&&(ut.cancelAnimationFrame(n.globals.radialNeedleRAF),n.globals.radialNeedleRAF=null);const u=performance.now(),p=i=>{if(this.w.globals.isDestroyed)return void(n.globals.radialNeedleRAF=null);const s=Math.max(0,Math.min(1,(i-u)/e)),a=C+(A-C)*d(s);t.setAttribute("transform",`rotate(${a})`),n.globals.radialNeedleRAF=s<1?ut.requestAnimationFrame(p):null};n.globals.radialNeedleRAF=ut.requestAnimationFrame(p)}else h.attr({"transform-origin":`${m} ${b}`,transform:`rotate(${A})`});return h}drawHollow(t){var e;const i=new D(this.w),s=this.w.config.plotOptions.radialBar.hollow,a=i.drawCircle(2*t.size),r={class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill};return(s.stroke||s.strokeDasharray)&&(r.stroke=s.stroke||"transparent",r["stroke-width"]=null!=(e=s.strokeWidth)?e:1,s.strokeDasharray&&(r["stroke-dasharray"]=s.strokeDasharray)),a.attr(r),a}drawHollowImage(t,e,i,s){const a=this.w,r=new L(this.w),n=Vt.randomId(),o=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:`pattern${a.globals.cuid}${n}`}),s=`url(#pattern${a.globals.cuid}${n})`;else{const i=a.config.plotOptions.radialBar.hollow.imageWidth,s=a.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===i&&void 0===s){const i=a.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(i)}else{const r=a.dom.Paper.image(o,(function(){this.move(t.centerX-i/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-s/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(i,s)}));e.add(r)}}return s}getStrokeWidth(t){const e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;const i=t.target,s=parseInt(null!=(e=i.getAttribute("rel"))?e:"",10)-1,a=this.barLabels.onClick,r=this.w;a&&a(r.seriesData.seriesNames[s],{w:r,seriesIndex:s})}},radar:class{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new D(this.w),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new S(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.layout.xAxisLabelsWidth/1.75),void 0!==t.config.plotOptions.radar.size&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){const e=this.w,i=new L(this.w),s=[],a=new M(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;const r=e.layout.gridWidth/2,n=e.layout.gridHeight/2,o=r+e.config.plotOptions.radar.offsetX,l=n+e.config.plotOptions.radar.offsetY,h=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${o||0}, ${l||0})`});let c=[],p=null,g=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach(((t,r)=>{const n=t.length===e.globals.dataPoints,o=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":n,seriesName:Vt.escapeString(e.seriesData.seriesNames[r]),rel:r+1,"data:realIndex":r});this.dataRadiusOfPercent[r]=[],this.dataRadius[r]=[],this.angleArr[r]=[],t.forEach(((t,e)=>{const i=Math.abs(this.maxValue-this.minValue);t-=this.minValue,this.isLog&&(t=this.coreUtils.getLogVal(this.logBase,t,0)),this.dataRadiusOfPercent[r][e]=t/i,this.dataRadius[r][e]=this.dataRadiusOfPercent[r][e]*this.size,this.angleArr[r][e]=e*this.disAngle})),c=this.getDataPointsPos(this.dataRadius[r],this.angleArr[r]);const l=this.createPaths(c,{x:0,y:0});p=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),g=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":r}),e.globals.delayedElements.push({el:p.node,index:r});const h={i:r,realIndex:r,animationDelay:r,initialSpeed:e.config.chart.animations.speed,dataChangeSpeed:e.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:e.globals.stroke.colors[r],strokeLineCap:e.config.stroke.lineCap};let f=null;e.globals.previousPaths.length>0&&(f=this.getPreviousPath(r));for(let s=0;s<l.linePathsTo.length;s++){const t=this.graphics.renderPaths(u(d({},h),{pathFrom:null===f?l.linePathsFrom[s]:f,pathTo:l.linePathsTo[s],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[r]:this.strokeWidth,fill:"none",drawShadow:!1}));o.add(t);const a=i.fillPath({seriesNumber:r}),n=this.graphics.renderPaths(u(d({},h),{pathFrom:null===f?l.areaPathsFrom[s]:f,pathTo:l.areaPathsTo[s],strokeWidth:0,fill:a,drawShadow:!1,drawMask:{type:"radial",cx:0,cy:0,r:this.size}}));if(e.config.chart.dropShadow.enabled){const t=new I(this.w),i=e.config.chart.dropShadow;t.dropShadow(n,Object.assign({},i,{noUserSpaceOnUse:!0}),r)}o.add(n)}t.forEach(((t,i)=>{const s=new F(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:r,dataPointIndex:i});s.pSize||(s.pSize=5,s.pointFillColor="transparent",s.pointStrokeColor="transparent",s.pointStrokeWidth=0);const n=this.graphics.drawMarker(c[i].x,c[i].y,s);n.attr("rel",i),n.attr("j",i),n.attr("index",r),n.node.setAttribute("default-marker-size",s.pSize);const l=this.graphics.group({class:"apexcharts-series-markers"});l&&l.add(n),p.add(l),o.add(p);const h=e.config.dataLabels;if(h.enabled){const t=h.formatter(e.seriesData.series[r][i],{seriesIndex:r,dataPointIndex:i,w:e});a.plotDataLabelsText({x:c[i].x,y:c[i].y,text:t,textAnchor:"middle",i:r,j:r,seriesIndex:r,dataPointIndex:i,parent:g,offsetCorrection:!1,dataLabelsConfig:d({},h)})}o.add(g)})),s.push(o)})),this.drawPolygons({parent:h}),e.config.xaxis.labels.show){const t=this.drawXAxisTexts();h.add(t)}
1return s.forEach((t=>{h.add(t)})),h.add(this.yaxisLabels),h}drawPolygons(t){const e=this.w,{parent:i}=t,s=new ls(this.w),a=e.globals.yAxisScale[0].result.reverse(),r=a.length,n=[],o=this.size/(r-1);for(let c=0;c<r;c++)n[c]=o*c;n.reverse();const l=[],h=[];n.forEach(((t,e)=>{const i=Vt.getPolygonPos(t,this.dataPointsLen);let s="";i.forEach(((t,i)=>{if(0===e){const e=this.graphics.drawLine(t.x,t.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[i]:this.polygons.connectorColors);h.push(e)}0===i&&this.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),s+=t.x+","+t.y+" "})),l.push(s)})),l.forEach(((t,s)=>{const a=this.polygons.strokeColors,r=this.polygons.strokeWidth,n=this.graphics.drawPolygon(t,Array.isArray(a)?a[s]:a,Array.isArray(r)?r[s]:r,e.globals.radarPolygons.fill.colors[s]);i.add(n)})),h.forEach((t=>{i.add(t)})),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(((t,e)=>{const i=s.drawYAxisTexts(t.x,t.y,e,a[e]);this.yaxisLabels.add(i)}))}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,i=this.graphics.group({class:"apexcharts-xaxis"}),s=Vt.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach(((a,r)=>{const n=t.config.xaxis.labels.formatter,o=new M(this.w,this.ctx);if(s[r]){const l=this.getTextPos(s[r],this.size),h=n(a,{seriesIndex:-1,dataPointIndex:r,w:t});o.plotDataLabelsText({x:l.newX,y:l.newY,text:h,textAnchor:l.textAnchor,i:r,j:r,parent:i,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[r]?e.style.colors[r]:"#a8a8a8",dataLabelsConfig:d({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",(e=>{if("function"===typeof t.config.chart.events.xAxisLabelClick){const i=Object.assign({},t,{labelIndex:r});t.config.chart.events.xAxisLabelClick(e,this.ctx,i)}}))}})),i}createPaths(t,e){const i=[];let s=[];const a=[];let r=[];if(t.length){s=[this.graphics.move(e.x,e.y)],r=[this.graphics.move(e.x,e.y)];let n=this.graphics.move(t[0].x,t[0].y),o=this.graphics.move(t[0].x,t[0].y);t.forEach(((e,i)=>{n+=this.graphics.line(e.x,e.y),o+=this.graphics.line(e.x,e.y),i===t.length-1&&(n+="Z",o+="Z")})),i.push(n),a.push(o)}return{linePathsFrom:s,linePathsTo:i,areaPathsFrom:r,areaPathsTo:a}}getTextPos(t,e){let i="middle",s=t.x,a=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",s+=10):t.x<0&&(i="end",s-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?a-=10:t.y>0&&(a+=10)),{textAnchor:i,newX:s,newY:a}}getPreviousPath(t){const e=this.w;let i=null;for(let s=0;s<e.globals.previousPaths.length;s++){const a=e.globals.previousPaths[s];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&"undefined"!==typeof e.globals.previousPaths[s].paths[0]&&(i=e.globals.previousPaths[s].paths[0].d)}return i}getDataPointsPos(t,e,i=this.dataPointsLen){t=t||[],e=e||[];const s=[];for(let a=0;a<i;a++){const i={};i.x=t[a]*Math.sin(e[a]),i.y=-t[a]*Math.cos(e[a]),s.push(i)}return s}},heatmap:class{constructor(t,e,i){this.ctx=e,this.w=t,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new es(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.shape=this.w.config.plotOptions.heatmap.shape||"rect",this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){var e,i;const s=this.w,a=new D(this.w,this.ctx),r=a.group({class:"apexcharts-heatmap"}),n=s.layout.gridWidth/s.globals.dataPoints,o=s.layout.gridHeight/s.seriesData.series.length,l=("numeric"===s.config.xaxis.type||"datetime"===s.config.xaxis.type)&&s.axisFlags.isXNumeric&&this.xRatio>0;let h=n;if(l){const t=s.globals.minXDiff;h=Number.isFinite(t)&&t>0?t/this.xRatio:n}let c=this.shape;l&&"hexagon"===c&&(c="rect");const d=Ve(this.ctx,a),u="rect"===c&&d!==a&&"function"===typeof d.drawRectCell;"hexagon"===c?this.applyHexagonClipPath(r,a,n,o):r.attr("clip-path",`url(#gridRectMask${s.globals.cuid})`);const p=Array.isArray(s.config.fill.opacity)?null!=(e=s.config.fill.opacity[0])?e:1:null!=(i=s.config.fill.opacity)?i:1;let f=0,m=!1;this.negRange=this.helpers.checkColorRange();const x=t.slice();s.config.yaxis[0].reversed&&(m=!0,x.reverse());for(let y=m?0:x.length-1;m?y<x.length:y>=0;m?y++:y--){const e=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:Vt.escapeString(s.seriesData.seriesNames[y]),rel:y+1,"data:realIndex":y});if(X.addCollapsedClassToSeries(this.w,e,y),u||a.setupEventDelegation(e,".apexcharts-heatmap-rect"),s.config.chart.dropShadow.enabled){const t=s.config.chart.dropShadow;new I(this.w).dropShadow(e,t,y)}let i=0;const m=s.config.plotOptions.heatmap.shadeIntensity,b=Math.round(f/o),w="hexagon"===c?(b%2===0?-1:1)*n/4:0;let v=0;for(let r=0;r<s.globals.dataPoints;
vendor: 13,669 bytes, line 1
1r++){if(!l&&s.seriesData.seriesX.length&&!s.globals.allSeriesHasEqualX&&s.globals.minX+s.globals.minXDiff*r<s.seriesData.seriesX[y][v]){i+=n;continue}if(v>=x[y].length)break;const b=l?h:n;if(l){const t=s.seriesData.seriesX[y]?s.seriesData.seriesX[y][v]:null;if(null==t||t!==t){v++;continue}i=(t-s.globals.minX)/this.xRatio-h/2}const A=this.helpers.getShadeColor(s.config.chart.type,y,v,this.negRange);let _=A.color;const S=A.colorProps;if("image"===s.config.fill.type){_=new L(this.w).fillPath({seriesNumber:y,dataPointIndex:v,opacity:s.globals.hasNegs?S.percent<0?1-(1+S.percent/100):m+S.percent/100:S.percent/100,patternID:Vt.randomId(),width:s.config.fill.image.width?s.config.fill.image.width:b,height:s.config.fill.image.height?s.config.fill.image.height:o})}const C=this.rectRadius,k=s.config.plotOptions.heatmap.useFillColorAsStroke?_:s.globals.stroke.colors[0];if(u)d.drawRectCell(i,f,b,o,{fill:_,fillOpacity:p,stroke:k,strokeWidth:this.strokeWidth,radius:C,seriesIndex:y,dataPointIndex:v});else{const r="rect"===c,n=r?a.drawRect(i,f,b,o,C):a.drawPath({d:this.cellShapePath(c,i+w,f,b,o),stroke:k,strokeWidth:this.strokeWidth,fill:_,fillOpacity:1});if(n.attr({cx:i+w,cy:f}),n.node.classList.add("apexcharts-heatmap-rect"),e.add(n),n.attr({fill:_,i:y,index:y,j:v,val:t[y][v],"stroke-width":this.strokeWidth,stroke:k,color:_}),r||n.attr({width:b,height:o}),s.config.chart.animations.enabled&&!s.globals.dataChanged){let t=1;if(s.globals.resized||(t=s.config.chart.animations.speed),r)this.animateHeatMap(n,i,f,b,o,t,y,v);else{const e=new g(this.w);e.animatePop(n,{speed:t,delay:this.enterStaggerDelay(t,y,v),onComplete:()=>{e.animationCompleted(n)}})}}if(s.globals.dataChanged){let t=1;if(this.dynamicAnim.enabled&&s.globals.shouldAnimate){t=this.dynamicAnim.speed;let e=s.globals.previousPaths[y]&&s.globals.previousPaths[y][v]&&s.globals.previousPaths[y][v].color;e||(e="rgba(255, 255, 255, 0)"),this.animateHeatColor(n,Vt.isColorHex(e)?e:Vt.rgb2hex(e),Vt.isColorHex(_)?_:Vt.rgb2hex(_),t)}}}const M=(0,s.config.dataLabels.formatter)(s.seriesData.series[y][v],{value:s.seriesData.series[y][v],seriesIndex:y,dataPointIndex:v,w:s}),P=this.helpers.calculateDataLabels({text:M,x:i+w+b/2,y:f+o/2,i:y,j:v,colorProps:S,series:x});null!==P&&e.add(P),l||(i+=n),v++}f+=o,r.add(e)}const b=s.globals.yAxisScale[0].result.slice();return s.config.yaxis[0].reversed?b.unshift(""):b.push(""),s.globals.yAxisScale[0].result=b,r}animateHeatMap(t,e,i,s,a,r,n=0,o=0){const l=new g(this.w),h=this.enterStaggerDelay(r,n,o);l.animateRect(t,{x:e+s/2,y:i+a/2,width:0,height:0},{x:e,y:i,width:s,height:a},r,(()=>{l.animationCompleted(t)}),h)}enterStaggerDelay(t,e,i){const s=this.w,a=s.config.chart.animations.animateGradually;if(!a||!1===a.enabled)return 0;const r=((s.seriesData.series||[]).length||1)+(s.globals.dataPoints||1)-2,n=Math.min(a.delay||0,.5*t/Math.max(1,r));return f({style:"diagonal",index:i,row:e,col:i,baseDelay:n})}cellShapePath(t,e,i,s,a){const r=e+s/2,n=i+a/2;if("circle"===t){const t=Math.min(s,a)/2;return`M ${r-t} ${n} a ${t} ${t} 0 1 0 ${2*t} 0 a ${t} ${t} 0 1 0 ${2*-t} 0 Z`}if("diamond"===t)return`M ${r} ${i} L ${e+s} ${n} L ${r} ${i+a} L ${e} ${n} Z`;const o=e+s;return`M ${r} ${i-a/6} L ${o} ${i+a/6} L ${o} ${i+5*a/6} L ${r} ${i+7*a/6} L ${e} ${i+5*a/6} L ${e} ${i+a/6} Z`}applyHexagonClipPath(t,e,i,s){const a=this.w,r=this.strokeWidth/2+2,n=`heatmapHexMask${a.globals.cuid}`,o=a.dom.elDefs.node,l=o.querySelector(`clipPath[id="${n}"]`);l&&l.parentNode&&l.parentNode.removeChild(l);const h=ut.createElementNS(Ft,"clipPath");h.setAttribute("id",n),h.appendChild(e.drawRect(-i/4-r,-s/6-r,a.layout.gridWidth+i/2+2*r,a.layout.gridHeight+s/3+2*r,0,"#fff").node),o.appendChild(h),t.attr("clip-path",`url(#${n})`)}animateHeatColor(t,e,i,s){t.attr({fill:e}).animate(s).attr({fill:i})}},treemap:class{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new es(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(t){var e;const i=this.w,s=new D(this.w,this.ctx),a=new L(this.w),r=s.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;t.forEach((t=>{t.map((t=>Math.abs(t)))})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(((t,e)=>{t.data.forEach((t=>{Array.isArray(this.labels[e])||(this.labels[e]=[]),this.labels[e].push(t.x)}))}));const n=Ms(i);this.nested=n.nested,this.roots=n.roots,this.scale=ie(i);const o=1===n.roots.length?n.roots[0].children||[]:n.roots;this.drawn=o;const l=i.config.plotOptions.treemap.parents;this.showParents=!0===l.show||!1!==l.show&&this.nested;const h=this._resolveFocus(o),c=h?[h]:o;_s.generateNested(c,i.layout.gridWidth,i.layout.gridHeight,{padding:(t,e,i,s)=>this.showParents?this._levelPadding(e,i,s):0,header:(t,e,i,s)=>this.showParents?this._levelHeader(t,e,i,s):0});const d=null==(e=this.ctx)?void 0:e.morphTypeChange,u=!!d&&"function"===typeof d.isActive&&d.isActive()&&"function"===typeof d.getInitialPathAt;this._morphLeafIndex=0;const p=this._leavesBySeries(c,i.config.series.length),g=this.showParents?this._parentsBySeries(c,i.config.series.length):[];return p.forEach(((e,n)=>{var o;const l=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:Vt.escapeString(i.seriesData.seriesNames[n]),rel:n+1,"data:realIndex":n});if(s.setupEventDelegation(l,".apexcharts-treemap-rect"),i.config.chart.dropShadow.enabled){const t=i.config.chart.dropShadow;new I(this.w).dropShadow(r,t,n)}const h=s.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(g[n]||[]).forEach((t=>{this._drawParent(l,t,n)}));const d=i.config.chart.animations,p=d.animateGradually,f=p&&!1!==p.enabled,m=new Array(e.length).fill(0);if(f){const t=e.length||1,i=Math.min(p.delay||0,.5*d.speed/t);e.map(((t,e)=>{return{j:e,area:t.rect?(i=t.rect,(i[2]-i[0])*(i[3]-i[1])):0};var i})).sort(((t,e)=>e.area-t.area)).forEach(((t,e)=>{m[t.j]=e*i}))}e.forEach(((e,r)=>{const o=e.rect;if(!o)return;const h=e._di,d=o[0],p=o[1],g=o[2],f=o[3];c.xMin=Math.min(c.xMin,d),c.yMin=Math.min(c.yMin,p),c.xMax=Math.max(c.xMax,g),c.yMax=Math.max(c.yMax,f);const x=this._leafColor(n,h),b=x.color,y=a.fillPath({color:b,seriesNumber:n,dataPointIndex:h}),w=u?this._morphSourceForLeaf(e):null,v=w?s.drawPath({d:this._tilePath(d,p,g,f),fill:"#fff",stroke:i.config.plotOptions.treemap.useFillColorAsStroke?b:i.globals.stroke.colors[n],strokeWidth:this.strokeWidth,fillOpacity:1}):s.drawRect(d,p,g-d,f-p,i.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?b:i.globals.stroke.colors[n]);v.attr({cx:d,cy:p,index:n,i:n,j:h,width:g-d,height:f-p,fill:y}),v.node.classList.add("apexcharts-treemap-rect"),v.node.setAttribute("data:key",ks(e._key));let A={x:d+(g-d)/2,y:p+(f-p)/2,width:0,height:0};const _={x:d,y:p,width:g-d,height:f-p};if(w)this._morphTile(v,w,this._tilePath(d,p,g,f),this.ctx.morphTypeChange.getSpeed(),n,h);else if(i.config.chart.animations.enabled&&!i.globals.dataChanged){let t=1;i.globals.resized||(t=i.config.chart.animations.speed),this.animateTreemap(v,A,_,t,m[r]||0)}if(i.globals.dataChanged){let t=1;this.dynamicAnim.enabled&&i.globals.shouldAnimate&&(t=this.dynamicAnim.speed,i.globals.previousPaths[n]&&i.globals.previousPaths[n][h]&&i.globals.previousPaths[n][h].rect&&(A=i.globals.previousPaths[n][h].rect),this.animateTreemap(v,A,_,t))}let S=this.getFontSize(o);"truncate"===i.config.plotOptions.treemap.dataLabels.format&&(S=parseInt(String(i.config.dataLabels.style.fontSize),10));let C=null;if(i.config.dataLabels.enabled&&this._labelCanShow(S,g-d,f-p)){let e=i.config.dataLabels.formatter(this.labels[n][h],{value:i.seriesData.series[n][h],seriesIndex:n,dataPointIndex:h,w:i});"truncate"===i.config.plotOptions.treemap.dataLabels.format&&(e=this.truncateLabels(String(e),S,d,p,g,f)),i.seriesData.series[n][h]&&(C=this.helpers.calculateDataLabels({text:e,x:(d+g)/2,y:(p+f)/2+this.strokeWidth/2+S/3,i:n,j:h,colorProps:x,fontSize:S,series:t})),i.config.dataLabels.enabled&&C&&this.rotateToFitLabel(C,S,e,d,p,g,f)}l.add(v),null!==C&&l.add(C)}));const x=i.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&i.config.series.length>1&&x&&x.show){const t=i.config.series[n].name||"";if(t&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:e,offsetY:a,borderColor:r,borderWidth:n,borderRadius:h,style:d}=x,u=d.color||i.config.chart.foreColor,p={left:d.padding.left,right:d.padding.right,top:d.padding.top,bottom:d.padding.bottom},g=s.getTextRects(t,d.fontSize,d.fontFamily),f=g.width+p.left+p.right,m=g.height+p.top+p.bottom,b=c.xMin+(e||0),y=c.yMin+(a||0),w=s.drawRect(b,y,f,m,h,d.background,1,n,r),v=s.drawText({x:b+p.left,y:y+p.top+.75*(null!=(o=null==g?void 0:g.height)?o:0),text:t,fontSize:d.fontSize,fontFamily:d.fontFamily,fontWeight:d.fontWeight,foreColor:u,cssClass:d.cssClass||""});l.add(w),l.add(v)}}l.add(h),r.add(l)})),this._renderBreadcrumb(),r}_levelCfg(t){if(this._levelCache||(this._levelCache=[]),this._levelCache[t])return this._levelCache[t];const e=this.w.config.plotOptions.treemap,i=e.parents||{},s=(e.levels||[])[t]||{},a=u(d(d({},i),s),{header:u(d(d({},i.header||{}),s.header||{}),{style:d(d({},(i.header||{}).style||{}),(s.header||{}).style||{})}),hover:d(d({},i.hover||{}),s.hover||{})});return this._levelCache[t]=a,a}_levelPadding(t,e,i){const s=this._levelCfg(t);return Number(s.padding)||0}_levelHeader(t,e,i,s){const a=this._levelCfg(e).header||{};if(!1===a.show)return 0;const r=Number(a.height);if(!Number.isFinite(r)||r<=0)return 0;return i<(Number(a.minWidth)||40)||s<2*r?0:r}_leavesBySeries(t,e){const i=new Array(Math.max(1,e));for(let a=0;a<i.length;a++)i[a]=[];const s=t=>{if(t.children&&t.children.length)t.children.forEach(s);else{const e=t._si||0;i[e]&&i[e].push(t)}};return t.forEach(s),i}_parentsBySeries(t,e){const i=new Array(Math.max(1,e));for(let a=0;a<i.length;a++)i[a]=[];const s=t=>{if(!t.children||!t.children.length)return;const e=t._si||0;i[e]&&i[e].push(t),t.children.forEach(s)};return t.forEach(s),i.forEach((t=>t.sort(((t,e)=>(t.depth||0)-(e.depth||0))))),i}_leafColor(t,e){const i=this.w;if(this.scale){const s=te(i,t,e);if(null!=s){const t=this.scale.at(s);return{color:t,foreColor:se(t),colorProps:{color:t,foreColor:se(t),percent:0}}}}return this.helpers.getShadeColor(i.config.chart.type,t,e,this.negRange)}_parentChrome(t){const e=this.w,i=this._levelCfg(t),s="dark"===e.config.theme.mode,a=(i.header||{}).style||{},r=Math.min(t,3),n=s?255:0,o=`${n},${n},${n}`;return{fill:i.fill||`rgba(${o},${(s?.04:.03)+.02*r})`,fillOpacity:null==i.fillOpacity?1:i.fillOpacity,borderColor:i.borderColor||`rgba(${o},${s?.18:.14})`,borderWidth:null==i.borderWidth?1:i.borderWidth,borderRadius:null==i.borderRadius?e.config.plotOptions.treemap.borderRadius:i.borderRadius,headerBg:a.background||`rgba(${o},${s?.1:.07})`,headerColor:a.color||(s?"#e8e8e8":e.config.chart.foreColor),headerFontSize:a.fontSize||"12px",headerFontFamily:a.fontFamily||e.config.chart.fontFamily,headerFontWeight:null==a.fontWeight?600:a.fontWeight,hoverColor:i.hover&&i.hover.color||(s?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:i.hover&&i.hover.width||2,hoverShow:!(i.hover&&!1===i.hover.show)}}_drawParent(t,e,i){var s;const a=e.rect;if(!a)return;const r=this.w,n=new D(this.w,this.ctx),o=e.depth||0,l=this._levelCfg(o),h=this._parentChrome(o),c=a[0],d=a[1],u=a[2]-a[0],p=a[3]-a[1];if(u<=0||p<=0)return;const g=n.group({class:"apexcharts-treemap-parent","data:depth":o,"data:name":Vt.escapeString(e.name)}),f=ks(e._key),m=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(f):null,x=m?n.drawPath({d:this._tilePath(c,d,c+u,d+p),fill:h.fill,stroke:h.borderColor,strokeWidth:h.borderWidth,fillOpacity:h.fillOpacity}):n.drawRect(c,d,u,p,h.borderRadius,h.fill,h.fillOpacity,h.borderWidth,h.borderColor);x.node.classList.add("apexcharts-treemap-parent-rect"),x.node.setAttribute("data:key",f),x.node.setAttribute("data:depth",String(o)),m&&this._morphTile(x,m,this._tilePath(c,d,c+u,d+p),this.ctx.morphTypeChange.getSpeed(),i,o),g.add(x);const b=e.headerHeight||0;let y="";if(b>0){const t=l.header||{},a=n.drawRect(c,d,u,b,0,h.headerBg,1,0,"transparent");a.node.classList.add("apexcharts-treemap-parent-header"),g.add(a);let p=String(null!=(s=e.name)?s:"");"function"===typeof t.formatter?p=String(t.formatter(e.name,{value:e.value,depth:o,seriesIndex:i,node:e,w:r})):t.showValue&&(p=`${p} ${this._formatValue(e.value)}`),y=p;const f=Number(t.offsetX)||0,m=t.align||"left",w=6,v=Math.max(0,u-2*w-Math.abs(f)),A=parseFloat(String(h.headerFontSize))||12,_=n.getTextBasedOnMaxWidth({text:p,maxWidth:v,fontSize:A});if(_){let e=c+w+f,i="start";"center"===m?(e=c+u/2+f,i="middle"):"right"===m&&(e=c+u-w+f,i="end");const s=n.drawText({x:e,y:d+b/2+A/3+(Number(t.offsetY)||0),text:_,textAnchor:i,fontSize:h.headerFontSize,fontFamily:h.headerFontFamily,fontWeight:h.headerFontWeight,foreColor:h.headerColor,cssClass:`apexcharts-treemap-parent-label ${t.style&&t.style.cssClass||""}`});s.node.setAttribute("pointer-events","none"),g.add(s)}this._attachParentEvents(a.node,e,h,x),this._makeParentAccessible(a.node,e,h,x,y)}this._attachParentEvents(x.node,e,h,x),g.node.setAttribute("role","group"),g.node.setAttribute("aria-label",this._parentLabel(e,y)),t.add(g)}_parentLabel(t,e){const i=this._drawnTotal(),s=i>0?(t._area/i*100).toFixed(1):"0",a=this._countLeaves(t);return`${e&&String(e).trim()?String(e).replace(/\s+/g," ").trim():`${t.name}, ${this._formatValue(t._area)}`}, ${a}
1 ${1===a?"item":"items"}, ${s}% of total`}_makeParentAccessible(t,e,i,s,a){t&&t.setAttribute&&this._zoomEnabled()&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`${this._parentLabel(e,a)}. Zoom in`),t.setAttribute("aria-expanded","false"),Yt.isBrowser()&&t.addEventListener&&(t.addEventListener("focus",(()=>{s.node.setAttribute("stroke",i.hoverColor),s.node.setAttribute("stroke-width",String(i.hoverWidth+1))})),t.addEventListener("blur",(()=>{s.node.setAttribute("stroke",i.borderColor),s.node.setAttribute("stroke-width",String(i.borderWidth))})),t.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),this._zoomTo(e,!0))}))))}_attachParentEvents(t,e,i,s){if(!Yt.isBrowser()||!t||!t.addEventListener)return;const a=this.w;i.hoverShow&&(t.addEventListener("mouseenter",(()=>{s.node.setAttribute("stroke",i.hoverColor),s.node.setAttribute("stroke-width",String(i.hoverWidth))})),t.addEventListener("mouseleave",(()=>{s.node.setAttribute("stroke",i.borderColor),s.node.setAttribute("stroke-width",String(i.borderWidth))}))),a.config.tooltip.enabled&&(t.addEventListener("mouseenter",(t=>this._showParentTooltip(t,e))),t.addEventListener("mousemove",(t=>this._positionTooltip(t))),t.addEventListener("mouseleave",(()=>this._hideParentTooltip()))),this._zoomEnabled()&&(t.style.cursor="pointer",t.addEventListener("click",(()=>this._zoomTo(e))))}_zoomEnabled(){const t=this.w,e=t.config.plotOptions.treemap.zoom;if(!e||!e.enabled||!this.showParents)return!1;const i=t.config.drilldown;return!(i&&i.enabled&&Array.isArray(i.series)&&i.series.length)||(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1)}_resolveFocus(t){const e=this.w.globals.treemapFocusKey;if(!e||!this._zoomEnabled())return null;let i=null;const s=t=>{i||(t._key!==e?t.children&&t.children.forEach(s):i=t)};return t.forEach(s),i&&i.children&&i.children.length?i:null}_zoomTo(t,e=!1){const i=this.w;if(!t||!t.children||!t.children.length)return;const s=i.globals.treemapFocusKey===t._key?null:t._key;i.globals.treemapFocusKey=s,this._hideParentTooltip();const a=this.ctx.update();e&&a&&"function"===typeof a.then&&a.then((()=>
vendor: 5,134 bytes, line 1
1{if(!Yt.isBrowser())return;const t=i.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(t&&t.focus)return void t.focus();const e=i.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");e&&e.focus&&e.focus()}))}_focusChain(){const t=[],e=new Set(this.drawn||[]);let i=this._resolveFocus(this.drawn||[]);for(;i&&(t.unshift(i),!e.has(i));)i=i._parent;return t}_breadcrumbCfg(){const t=this.w.config.plotOptions.treemap.zoom;return Me(this.w,t&&t.breadcrumb)}_renderBreadcrumb(){if(!Yt.isBrowser())return;const t=this.w;if(!t.dom.elWrap)return;if(Ie(t),!this._zoomEnabled())return;const e=this._focusChain();if(!e.length)return;const i=function(t,e){if(!Yt.isBrowser())return null;const i=t.dom.elWrap;if(!i)return null;Ie(t);const s=e.config||Me(t);if(!1===s.show)return null;const a=e.crumbs||[];if(a.length<2)return null;const r=ut.createElementNS(ke,"nav");r.setAttribute("class","apexcharts-breadcrumb"),r.setAttribute("aria-label",e.ariaLabel||"Breadcrumb"),function(t,e){const i=e.offsetX||0,s=e.offsetY||0;t.style.position="absolute",t.style.top=s+"px","top-right"===e.position?t.style.right=3-i+"px":t.style.left=i+"px"}(r,s),e.compact&&(r.style.fontSize="11px",r.style.padding="0 2px");const n=null!=s.separator?s.separator:" / ";return a.forEach(((t,i)=>{var o;if(i>0){const t=ut.createElementNS(ke,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=n,r.appendChild(t)}let l=0===i?null!=(o=s.rootLabel)?o:"All":t.label;if("function"===typeof s.formatter&&(l=s.formatter(l,{index:i,depth:a.length-1,data:t.data})),i===a.length-1){const t=ut.createElementNS(ke,"span");return t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=String(l),void r.appendChild(t)}const h=ut.createElementNS(ke,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),0===i){const t=ut.createElementNS(ke,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.setAttribute("aria-hidden","true"),t.textContent="\u2190",h.appendChild(t)}const c=ut.createElementNS(ke,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=String(l),h.appendChild(c),h.addEventListener("click",(()=>e.onNavigate(i,t))),r.appendChild(h)})),i.appendChild(r),r}(t,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(e.map((t=>({label:t.name,data:t})))),onNavigate:(e,i)=>{t.globals.treemapFocusKey=i.data?i.data._key:null,this._hideParentTooltip(),this.ctx.update()}});i&&(this._placeBreadcrumb(i),Pe(t,i))}_placeBreadcrumb(t){var e,i;const s=this.w,a=s.layout.translateY||0,r=null==(i=null==(e=this.ctx)?void 0:e.dimensions)?void 0:i.dimHelpers,n=r?r.getTitleSubtitleCoords("title").height+r.getTitleSubtitleCoords("subtitle").height:0,o=t.getBoundingClientRect().height||18;if(a-n>=o+1)return void(t.style.top=a-o-1+"px");t.style.top=`${n}px`;const l="dark"===s.config.theme.mode;t.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",t.style.borderRadius="4px"}_showParentTooltip(t,e){const i=this.w,s=this._tip();if(!s)return;const a=this._drawnTotal(),r=e._parent?e._parent._area:a,n=a>0?(e._area/a*100).toFixed(1):"0.0",o=r>0?(e._area/r*100).toFixed(1):n,l=this.w.config.plotOptions.treemap.parents,h=l&&l.tooltip&&l.tooltip.formatter,c=this._countLeaves(e);let d;if("function"===typeof h)d=h({name:e.name,value:e._area,depth:e.depth||0,leafCount:c,percentOfParent:Number(o),percentOfTotal:Number(n),node:e,w:i});else{const t=this._parentChrome(e.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${i.config.tooltip.fillSeriesColor?`background-color:${t};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${Vt.escapeString(e.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(e._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${c} items, </span><span class="apexcharts-tooltip-text-y-value">${o}% of parent, ${n}% of total</span></div></div></div>`}s.innerHTML=d,s.classList.add("apexcharts-active"),s.style.opacity="1",this._tipOwned=!0,this._positionTooltip(t)}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_positionTooltip(t){const e=this._tip();if(!e||!this._tipOwned)return;const i=this.w.dom.elWrap.getBoundingClientRect(),s=e.offsetWidth,a=e.offsetHeight;let r=t.clientX-i.left+12;r+s>i.width&&(r=t.clientX-i.left-s-12),r=Math.max(0,Math.min(r,i.width-s));let n=t.clientY-i.top+12;n+a>i.height&&(n=t.clientY-i.top-a-12),n=Math.max(0,Math.min(n,i.height-a)),e.style.left=r+"px",e.style.top=n+"px"}_hideParentTooltip(){const t=this._tip();t&&this._tipOwned&&(this._tipOwned=!1,t.classList.remove("apexcharts-active"),t.style.opacity="0")}_drawnTotal(){return null==this._total&&(this._total=(this.drawn||[]).reduce(((t,e)=>
1t+this._subtreeArea(e)),0)),this._total||0}_subtreeArea(t){if(null!=t._area)return t._area;const e=t.children;if(e&&e.length){let t=0;for(let i=0;i<e.length;i++)t+=this._subtreeArea(e[i]);return t}const i=Number(t.value);return isNaN(i)?0:Math.abs(i)}_countLeaves(t){return t.children&&t.children.length?t.children.reduce(((t,e)=>t+this._countLeaves(e)),0):1}_formatValue(t){var e,i,s,a,r;const n=this.w,o=(null==(i=null==(e=n.config.tooltip)?void 0:e.y)?void 0:i.formatter)||(null==(r=null==(a=null==(s=n.config.yaxis)?void 0:s[0])?void 0:a.labels)?void 0:r.formatter);if("function"===typeof o)try{return String(o(t,{seriesIndex:0,dataPointIndex:0,w:n}))}catch(l){}return String(t)}_labelCanShow(t,e,i){if(!Number.isFinite(t)||t<=0)return!1;const s=this.w.config.plotOptions.treemap.dataLabels;return!(t<(s&&null!=s.minFontSize?Number(s.minFontSize):0))&&Math.max(e,i)>=t}_averageLabelSize(){if(null!=this._avgLabelSize)return this._avgLabelSize;return this._avgLabelSize=function t(e){let i,s=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)s+=t(e[i]);else for(i=0;i<e.length;i++)s+=e[i].length;return s}(this.labels)/function t(e){let i,s=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)s+=t(e[i]);else for(i=0;i<e.length;i++)s+=1;return s}(this.labels),this._avgLabelSize}getFontSize(t){const e=this.w,i=this._averageLabelSize();return function(t,s){const a=t*s,r=Math.pow(a,.5);return Math.min(r/i,parseInt(e.config.dataLabels.style.fontSize,10))}(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,i,s,a,r,n){const o=new D(this.w),l=o.getTextRects(i,String(e));if(l.width+this.w.config.stroke.width+5>r-s&&l.width<=n-a){const e=o.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${e.x} ${e.y}) translate(${l.height/3})`)}}truncateLabels(t,e,i,s,a,r){const n=new D(this.w),o=n.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-i&&r-s>a-i?r-s:a-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}_morphKeyed(){var t;const e=null==(t=this.ctx)?void 0:t.morphTypeChange;return!(!e||"function"!==typeof e.hasKeyedMarks||!e.hasKeyedMarks()||"function"!==typeof e.getInitialPathForKey)}_morphSourceForLeaf(t){var e;const i=null==(e=this.ctx)?void 0:e.morphTypeChange;if(!i||"function"!==typeof i.getInitialPathAt)return null;if(this._morphKeyed()){const e=i.getInitialPathForKey(ks(t._key));if(e)return e}return i.getInitialPathAt(this._morphLeafIndex++)}_tilePath(t,e,i,s){return`M ${t} ${e} L ${i} ${e} L ${i} ${s} L ${t} ${s} Z`}_morphTile(t,e,i,s,a,r){new g(this.w,this.ctx).morphSVG(t,a,r,"none",e,i,s,0)}animateTreemap(t,e,i,s,a=0){const r=new g(this.w);r.animateRect(t,e,i,s,(()=>{r.animationCompleted(t)}),a)}},unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,i=new D(e,this.ctx),s=i.group({class:"apexcharts-unit"});if(e.globals.noData||!Array.isArray(t)||0===t.length)return s;const a=e.config.plotOptions.unit,r="packed"===a.layout?"packed":"columns"===a.layout?"columns":"grid"===a.layout?"grid":"scatter"===a.layout?"scatter":"arc"===a.layout?"arc":"custom"===a.layout?"custom":"grouped",n=a.transition,o="flow"===n,l="identity"===n,h=a.unitValue>0?a.unitValue:1;let c=t.map((t=>{const e=Math.abs(Vt.parseNumber(t))/h;return e>0?Math.max(1,Math.round(e)):0}));c=this._applyMaxUnits(c,a.maxUnits);const d=c.reduce(((t,e)=>t+e),0),u="packed"===r?this._layoutPacked(c,a):"columns"===r?this._layoutColumns(c,a):"grid"===r?this._layoutGrid(c,a):"scatter"===r?this._layoutScatter(a):"arc"===r?this._layoutArc(c,a):"custom"===r?this._layoutCustom(c,a):this._layoutGrouped(c,a),p="grid"===r&&!(!a.grid||!a.grid.split);p&&this._drawGridTrack(s,i,a),"scatter"===r&&this._drawScatterAxes(s,i);const g=this._lastDotR,f=this._shouldAnimate(),m=this.ctx&&this.ctx.morphTypeChange,x=f&&!!m&&"function"===typeof m.isActive&&m.isActive()&&"function"===typeof m.getInitialCenterFor,b=x&&"function"===typeof m.getInitialSlotFor,y=x&&"function"===typeof m.usesPieceTakeover&&m.usesPieceTakeover(),w=f&&!x&&this.ctx?this.ctx._unitPrevDots:null,v=new Map,A=[],_=e.seriesData.unitData||[],S=this._bubbleStats(_,a,g);let C=0;if(u.forEach((t=>{const n=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",h=i.group({class:"apexcharts-series",seriesName:Vt.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),u=x&&!b?m.getInitialCenterFor(t.i):null,k=t.dots.length,M=_[t.i];
1if(t.dots.forEach(((e,s)=>{const r=null!=e.j?e.j:s,c=M?M[r]:void 0,d=c&&"object"===typeof c&&c.fillColor?c.fillColor:n,x=null!=e.r?e.r:S?this._radiusForValue(this._unitValueOf(c),S):g,_=this._markSpecFor(a,c,t.i,x),P=this._drawDot(i,a,x,d,t.i,r,_);let L;if(h.add(P),l){const t=c&&"object"===typeof c?null!=c.id?c.id:c.name:void 0;L=null!=t?`id:${t}`:`g:${C}`}else L=o?String(C):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(C++,v.set(L,{x:e.x,y:e.y,fill:d,r:x,spec:_}),y)this._place(P.node,_,e.x,e.y),P.node.setAttribute("opacity","0"),P.node.setAttribute("data-piece-hidden","1");else if(f){const i=w&&w.get(L),s=i||(b?m.getInitialSlotFor(t.i,r,k):u),n=a.gather&&a.gather.enter||"burst",o=p||"fade"===n||"rise"===n,l=s?s.x:o?e.x:t.cx,h=s?s.y:"rise"!==n||p?o?e.y:t.cy:e.y+14;P.node.style.opacity=s?"1":"0",this._place(P.node,_,l,h),A.push({node:P.node,spec:_,x:e.x,y:e.y,cx0:l,cy0:h,key:L,r0:i&&null!=i.r?i.r:x,r1:x,fill0:i?i.fill:d,fill1:d,delay:0,isEnter:!s})}else this._place(P.node,_,e.x,e.y)})),("grouped"===r||"columns"===r||p)&&a.clusterLabels&&a.clusterLabels.show&&c[t.i]>0){const e=p?this._gridDenom:d;this._drawClusterLabel(h,t,c[t.i],e,a,n)}s.add(h)})),this._outerLabelsOn(a)&&this._drawOuterLabels(s,u,c,d,a,f&&!w),w){const t=this._collectExits(w,v,a);if(t.length){const e=i.group({class:"apexcharts-unit-exits"});s.add(e),this._runExits(e,t,a)}}return this.ctx&&(this.ctx._unitPrevDots=v),!this.ctx||f&&!x||(this.ctx._unitSprings=null),f&&A.length?this._runGather(A):e.globals.animationEnded=!0,s}_applyMaxUnits(t,e){const i=t.reduce(((t,e)=>t+e),0);if(!e||e<=0||i<=e)return t;const s=e/i;return console.warn(`[ApexCharts] unit chart: ${i} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),t.map((t=>t>0?Math.max(1,Math.round(t*s)):0))}_layoutCustom(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=t.reduce(((t,e)=>t+e),0),n=this._resolveLayoutProvider(e);if(!n)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,s-2*o),height:a},h=Math.sqrt(l.width*l.height/Math.PI),c=this._resolveStep(e,h,r);this._lastDotR=this._dotRadiusFromStep(c,e);const d=this._lastDotR,u=this._layoutObjects(t,d);let p;try{p=n(u,l)}catch(m){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",m),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const g=new Map;p.forEach((t=>{t&&isFinite(t.x)&&isFinite(t.y)&&g.set(String(t.id),{x:t.x,y:t.y,r:"number"===typeof t.r&&t.r>0?t.r:void 0})}));const f=t.map(((t,e)=>({i:e,cx:s/2,cy:a/2,outerR:d,dots:[]})));return u.forEach((t=>{const e=g.get(t.id);e&&f[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})})),f.forEach((t=>{if(!t.dots.length)return;let e=0,i=0;t.dots.forEach((t=>{e+=t.x,i+=t.y})),t.cx=e/t.dots.length,t.cy=i/t.dots.length;let s=0;t.dots.forEach((e=>{s=Math.max(s,Math.hypot(e.x-t.cx,e.y-t.cy))})),t.outerR=s+d})),f}_layoutObjects(t,e){const i=this.w,s=i.seriesData.unitData||[],a=i.seriesData.seriesNames||[],r=[];let n=0;return t.forEach(((t,i)=>{var o;const l=s[i];for(let s=0;s<t;s++){const t=l?l[s]:void 0,h=!t||"object"!==typeof t||null==t.id&&null==t.name?`${i}:${s}`:String(null!=t.id?t.id:t.name);r.push({id:h,index:n,seriesIndex:i,dataPointIndex:s,label:a[i],value:null!=(o=this._unitValueOf(t))?o:void 0,datum:t,r:e}),n++}})),r}_resolveLayoutProvider(t){const e=t.positions;if("function"===typeof e)return e;if("string"===typeof e&&e){const t=Rs(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,n=t.map(((t,e)=>e)).filter((e=>t[e]>0)),o=Math.max(1,n.length),l=new Array(t.length).fill(-1);
1n.forEach(((t,e)=>l[t]=e));const h=s/o,c=a-r,d=Math.max(1,...t),u=.08*Math.min(h,c),p=Math.max(4,Math.min(h,c)/2-u),g=this._resolveStep(e,p,d);this._lastDotR=this._dotRadiusFromStep(g,e);const f=this._lastDotR,m=r+c/2,x=t.map((t=>g*Math.sqrt(Math.max(1,t))+f));let b=t.map(((t,e)=>(t=>l[t]>=0?h*(l[t]+.5):s/2)(e)));const y=n.map((t=>x[t]));let w=!1;for(let v=1;v<o;v++)if(b[n[v]]-b[n[v-1]]<y[v]+y[v-1]){w=!0;break}if(w){const e=Math.max(2*f,8),i=y.reduce(((t,e)=>t+2*e),0)+e*(o-1);let a;if(i<=s){let t=(s-i)/2;a=y.map((i=>{const s=t+i;return t+=2*i+e,s}))}else if(1===o)a=[s/2];else{const t=y[0],e=s-y[o-1];a=y.map(((i,s)=>t+(e-t)*s/(o-1)))}b=t.map(((t,e)=>l[e]>=0?a[l[e]]:s/2))}return t.map(((t,e)=>({i:e,cx:b[e],cy:m,outerR:x[e],dots:this._spiral(b[e],m,t,g,0)})))}_layoutPacked(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=Math.max(1,t.reduce(((t,e)=>t+e),0)),n=Math.max(4,Math.min(s,a-6)/2-.06*Math.min(s,a)),o=this._resolveStep(e,n,r);this._lastDotR=this._dotRadiusFromStep(o,e);const l=s/2,h=6+(a-6)/2,c=t.map(((t,e)=>e));!1!==e.sortByGroup&&c.sort(((e,i)=>t[e]-t[i]));const d=t.map(((t,e)=>({i:e,cx:l,cy:h,outerR:o*Math.sqrt(r)+this._lastDotR,dots:[]})));let u=0;return c.forEach((e=>{for(let i=0;i<t[e];i++){const t=o*Math.sqrt(u+.5),i=u*Os;d[e].dots.push({x:l+t*Math.cos(i),y:h+t*Math.sin(i),slot:u}),u++}})),d}_layoutArc(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=Math.max(1,t.reduce(((t,e)=>t+e),0)),n=e.arc||{},o="number"===typeof n.startAngle?n.startAngle:-90,l="number"===typeof n.endAngle?n.endAngle:90,h=o*Math.PI/180,c=l*Math.PI/180,d=c-h||Math.PI,u=Math.max(0,Math.min(.95,"number"===typeof n.innerRadiusRatio?n.innerRadiusRatio:.4)),p=t=>Math.sin(t),g=t=>-Math.cos(t),f=this._arcBounds(h,c),m=.04*Math.min(s,a),x=Math.max(1e-6,f.maxX-f.minX),b=Math.max(1e-6,f.maxY-f.minY),y=Math.max(4,Math.min((s-2*m)/x,(a-2*m)/b)),w=y*u,v=s/2-(f.minX+f.maxX)/2*y,A=a/2-(f.minY+f.maxY)/2*y,_=this._arcAllocate(r,w,y,d,e);this._lastDotR=_.dotR;const S=[];for(let P=0;P<_.R;P++){const t=_.radii[P],e=_.seatsPerRow[P];for(let i=0;i<e;i++){const s=1===e?(h+c)/2:h+d*(i+.5)/e;S.push({a:s,x:v+t*p(s),y:A+t*g(s)})}}S.sort(((t,e)=>t.a-e.a));const C=t.map(((t,e)=>({i:e,cx:v,cy:A,outerR:y,dots:[]})));let k=0,M=0;return S.forEach(((e,i)=>{for(;k<t.length&&M>=t[k];)k++,M=0;k>=t.length||(C[k].dots.push({x:e.x,y:e.y,slot:i}),M++)})),C}_arcBounds(t,e){const i=t=>Math.sin(t),s=t=>-Math.cos(t),a=Math.min(t,e),r=Math.max(t,e),n=[0,i(t),i(e)],o=[0,s(t),s(e)],l=Math.PI/2;for(let h=Math.ceil(a/l);h*l<=r;h++)n.push(i(h*l)),o.push(s(h*l));return{minX:Math.min(...n),maxX:Math.max(...n),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,i,s,a){const r=a.spacing>0?a.spacing:1.05,n=Math.abs(s)||Math.PI,o=this._fixedRadius(a),l=s=>{s=Math.max(1,Math.round(s));const a=[];for(let t=0;t<s;t++)a.push(1===s?(e+i)/2:e+t/(s-1)*(i-e));const o=a.reduce(((t,e)=>t+e),0)||1,l=a.map((e=>t*e/o)),h=l.map((t=>Math.floor(t)));let c=t-h.reduce(((t,e)=>t+e),0);for(l.map(((t,e)=>({idx:e,frac:t-Math.floor(t)}))).sort(((t,e)=>e.frac-t.frac)).forEach((t=>{c>0&&(h[t.idx]++,c--)}));c>0;)h[s-1]++,c--;const d=1===s?i-e||i:(i-e)/(s-1);let u=1/0;for(let t=0;t<s;t++){const e=h[t];if(e<=0)continue;const i=a[t]*n/e;i<u&&(u=i)}const p=Math.min(d,u);return{R:s,radii:a,seatsPerRow:h,dotR:Math.max(1,p/(2*r))}},h=a.arc&&a.arc.rows;let c;if("number"===typeof h&&h>=1)c=l(h);else if(o){c=l((i-e)/(2*o*r)+1)}else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));c=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>c.dotR&&(c=e)}}return o&&(c.dotR=o),c}_layoutColumns(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),n=r&&"bottom"===e.clusterLabels.position,o=r&&!n?30:6,l=t.map(((t,e)=>e)).filter((e=>t[e]>0)),h=Math.max(1,l.length),c=new Array(t.length).fill(-1);l.forEach(((t,e)=>c[t]=e));const d=s/h,u=.62*d,p=Math.max(8,.04*a)+(n?30:0),g=Math.max(4,a-o-p),f=Math.max(1,...t),m=e.spacing>0?e.spacing:1,x=e.columns?e.columns.size:void 0;let b;b="image"!==e.shape&&"auto"===x?null:"image"!==e.shape&&"number"===typeof x&&x>0?x:this._fixedRadius(e);let y=1,w=0;if(b){w=2*b*m,this._lastDotR=b;const t=Math.max(1,Math.floor(g/w)),e=Math.max(1,Math.floor(u/w));y=Math.max(1,Math.min(e,Math.ceil(f/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(u/4)));for(let i=1;i<=e;i++){const e=Math.ceil(f/i),s=Math.min(u/i,g/e);s>t&&(t=s,y=i)}w=t,this._lastDotR=Math.max(1,w/(2*m))}const v=this._lastDotR,A=Math.ceil(f/y),_=o+(g+Math.min(g,A*w))/2;return t.map(((t,e)=>{const i=c[e]>=0?d*(c[e]+.5):s/2,a=Math.ceil(Math.max(1,t)/y)*w,r=i-y*w/2+w/2,n=[];for(let s=0;s<t;s++){const t=Math.floor(s/y),e=s%y;n.push({x:r+e*w,y:_-v-t*w})}return{i:e,cx:i,cy:_-a/2,outerR:a/2,flat:!0,dots:n}}))}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),h=l.reduce(((t,e)=>t+e),0),c=Math.max(1,Math.ceil(Math.max(1,h)/n)),d=e.spacing>
10?e.spacing:1,u=Math.max(4,s),p=Math.max(4,a-6),g=this._fixedRadius(e);let f=0;g?(f=2*g*d,this._lastDotR=g):(f=Math.min(u/n,p/c),this._lastDotR=Math.max(1,f/(2*d)));const m=n*f,x=c*f,b=(s-m)/2+f/2,y=6+(p-x)/2,w=t=>"bottom"===o?y+x-f/2-t*f:y+f/2+t*f,v=t.map(((t,e)=>({i:e,cx:s/2,cy:6+p/2,outerR:Math.max(m,x)/2,dots:[]})));let A=0;for(let _=0;_<l.length;_++)for(let t=0;t<l[_];t++){const t=A%n,e=Math.floor(A/n);v[_].dots.push({x:b+t*f,y:w(e),slot:A}),A++}return v}_layoutGridSplit(t,e){const i=this.w,s=i.layout.gridWidth,a=i.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),h=Math.max(1,Math.ceil(l/n)),c=t.map(((t,e)=>e)).filter((e=>t[e]>0)),d=Math.max(1,c.length),u=r.max>0?r.max:Math.max(1,...t),p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(d)))),g=Math.max(1,Math.ceil(d/p)),f=!(e.clusterLabels&&!1===e.clusterLabels.show),m=f&&e.clusterLabels&&"bottom"===e.clusterLabels.position,x=f&&!m?22:4,b=f&&m?22:4,y=s/p,w=a/g,v=Math.max(4,.86*y),A=Math.max(4,w-x-b),_=e.spacing>0?e.spacing:1,S=this._fixedRadius(e);let C=0;S?(C=2*S*_,this._lastDotR=S):(C=Math.min(v/n,A/h),this._lastDotR=Math.max(1,C/(2*_)));const k=n*C,M=h*C,P=(t,e)=>"bottom"===o?t+M-C/2-e*C:t+C/2+e*C,L=[],I=[];return c.forEach(((e,i)=>{const s=i%p,a=Math.floor(i/p),r=s*y,o=r+(y-k)/2+C/2,h=a*w+x+(A-M)/2,c=t=>({x:o+t%n*C,y:P(h,Math.floor(t/n))});for(let t=0;t<l;t++)L.push(c(t));const d=Math.max(0,Math.min(l,Math.round(t[e]/u*l))),g=[];for(let t=0;t<d;t++){const e=c(t);g.push({x:e.x,y:e.y,slot:i*l+t})}I.push({i:e,cx:r+y/2,cy:h+M/2,outerR:M/2,flat:!0,split:!0,dots:g})})),this._gridDenom=u,this._gridTrack={cells:L},I}_drawGridTrack(t,e,i){const s=this._gridTrack;if(!s||!s.cells||!s.cells.length)return;const a=this._lastDotR,r=(i.grid||{}).trackColor||"rgba(128,128,128,0.14)",n=e.group({class:"apexcharts-unit-track"});s.cells.forEach((t=>{let s;if("square"===i.shape){const n=2*a;s=e.drawRect(0,0,n,n,i.borderRadius||0,r,1,0,"none"),s.node.setAttribute("fill",r),s.node.setAttribute("x",String(t.x-a)),s.node.setAttribute("y",String(t.y-a))}else s=e.drawCircle(a,{fill:r,"stroke-width":0,stroke:"none"}),s.node.setAttribute("fill",r),s.node.setAttribute("cx",String(t.x)),s.node.setAttribute("cy",String(t.y));s.node.classList.add("apexcharts-unit-track-cell"),n.add(s)})),t.add(n)}_layoutScatter(t){const e=this.w,i=t.scatter||{};if("value"===i.y)return this._layoutScatter2D(t);if("vertical"===i.orientation)return this._layoutScatterVertical(t);const s=e.layout.gridWidth,a=e.layout.gridHeight,r=e.seriesData.unitData||[],n=e.seriesData.seriesNames||[],o=t=>this._unitValueOf(t),l=this._scatterSizeStats(i,r),h=r.map((t=>Array.isArray(t)?t.map(o):[])),c=t=>null!=t&&isFinite(t),d=h.map(((t,e)=>e)).filter((t=>h[t].some(c))),u=Math.max(1,d.length);let p=1/0,g=-1/0;h.forEach((t=>t.forEach((t=>{null!=t&&isFinite(t)&&(t<p&&(p=t),t>g&&(g=t))})))),p===1/0&&(p=0,g=1);const f=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),m=this._scatterValueDomain(i,p,g,f),x=m.min,b=m.max,y=b-x||1,w=null!=i.laneLabelWidth?Math.max(0,i.laneLabelWidth):u>1?92:8,v=30+(i.xTitle?20:0),A=w,_=s-8,S=a-v,C=Math.max(4,_-A),k=Math.max(4,S-10),M=t=>A+(t-x)/y*C,P=k/u;let L=0;const I=this._fixedRadius(t);if(I)L=I;else{const t=Math.max(1,...d.map((t=>h[t].filter(c).length)));L=Math.max(2,Math.min(6,.12*P,C/(2.5*Math.sqrt(t))))}this._lastDotR=L;const E=t.spacing>0?t.spacing:1,D=Math.max(.5,L*E),F="jitter"===i.spread,R=[],z=[],T=l?l.rMax:L;d.forEach(((t,e)=>{const i=(t=>10+P*(t+.5))(e);z.push({i:t,cy:i,name:n[t]||`series-${t+1}`});const s=(r[t]||[]).map(((t,e)=>{const s=o(t),a={j:e,px:M(c(s)?s:x),y:i};return l&&(a.r=this._scatterRadius(t,l,L)),a}));if(F){const t=Math.max(T,P/2-T);s.forEach(((e,s)=>{const a=(9301*s+49297)%233280/233280;e.y=i+(2*a-1)*t}))}else this._beeswarm(s,i,L,D,T);R.push({i:t,cx:(A+_)/2,cy:i,outerR:P/2,dots:s.map((t=>({x:t.px,y:t.y,r:t.r})))})}));const X=m.ticks;return this._scatterAxis={mode:"1d",plotL:A,plotR:_,plotT:10,plotB:S,xMin:x,xMax:b,plotX:M,ticks:X,lanes:z,xTitle:i.xTitle,formatter:"function"===typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},R}_layoutScatterVertical(t){const e=this.w,i=t.scatter||{},s=e.layout.gridWidth,a=e.layout.gridHeight,r=e.seriesData.unitData||[],n=e.seriesData.seriesNames||[],o=t=>this._unitValueOf(t),l=this._scatterSizeStats(i,r),h=r.map((t=>Array.isArray(t)?t.map(o):[])),c=t=>null!=t&&isFinite(t),d=h.map(((t,e)=>e)).filter((t=>h[t].some(c))),u=Math.max(1,d.length);let p=1/0,g=-1/0;h.forEach((t=>t.forEach((t=>{null!=t&&isFinite(t)&&(t<p&&(p=t),t>g&&(g=t))})))),p===1/0&&(p=0,g=1);const f=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),m=this._scatterValueDomain(i,p,g,f),x=m.min,b=m.max,y=b-x||1,w=46+(i.xTitle?18:0),v=s-10,A=a-(u>1?26:10),_=Math.max(4,v-w),S=Math.max(4,A-10),C=t=>A-(t-x)/y*S,k=_/u;let M=0;const P=this._fixedRadius(t);if(P)M=P;else{const t=Math.max(1,...d.map((t=>h[t].filter(c).length)));M=Math.max(2,Math.min(6,.12*k,S/(2.5*Math.sqrt(t))))}this._lastDotR=M;const L=t.spacing>0?t.spacing:1,I=Math.max(.5,M*L),E="jitter"===i.spread,D=[],F=[],R=l?l.rMax:M;d.forEach(((t,e)=>{const i=(t=>w+k*(t+.5))(e);F.push({i:t,cx:i,name:n[t]||`series-${t+1}`});const s=(r[t]||[]).map(((t,e)=>{const s=o(t),a={j:e,py:C(c(s)?s:x),x:i};return l&&(a.r=this._scatterRadius(t,l,M)),a}));if(E){const t=Math.max(R,k/2-R);
1s.forEach(((e,s)=>{const a=(9301*s+49297)%233280/233280;e.x=i+(2*a-1)*t}))}else this._beeswarm(s,i,M,I,R,!0);D.push({i:t,cx:i,cy:(10+A)/2,outerR:k/2,dots:s.map((t=>({x:t.x,y:t.py,r:t.r})))})}));const z=m.ticks;return this._scatterAxis={mode:"1d",orientation:"vertical",plotL:w,plotR:v,plotT:10,plotB:A,vMin:x,vMax:b,plotY:C,ticks:z,lanes:F,valueTitle:i.xTitle,formatter:"function"===typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},D}_layoutScatter2D(t){const e=this.w,i=e.layout.gridWidth,s=e.layout.gridHeight,a=t.scatter||{},r=e.seriesData.unitData||[],n=t=>"number"===typeof t&&isFinite(t),o=t=>t&&"object"===typeof t?t.x:null,l=t=>t&&"object"===typeof t?null!=t.y?t.y:t.value:null,h=r.map(((t,e)=>e)).filter((t=>(r[t]||[]).some((t=>n(o(t))&&n(l(t))))));let c=1/0,d=-1/0,u=1/0,p=-1/0;r.forEach((t=>(t||[]).forEach((t=>{const e=o(t),i=l(t);n(e)&&n(i)&&(e<c&&(c=e),e>d&&(d=e),i<u&&(u=i),i>p&&(p=i))})))),c===1/0&&(c=0,d=1,u=0,p=1);const g=Math.max(2,Math.round(a.tickAmount>0?a.tickAmount:5)),f=Math.max(2,Math.round(a.yTickAmount>0?a.yTickAmount:5)),m=this._niceScale(null!=a.xMin?a.xMin:c,null!=a.xMax?a.xMax:d,g),x=this._niceScale(null!=a.yMin?a.yMin:u,null!=a.yMax?a.yMax:p,f),b=null!=a.xMin?a.xMin:m.min,y=null!=a.xMax?a.xMax:m.max,w=null!=a.yMin?a.yMin:x.min,v=null!=a.yMax?a.yMax:x.max,A=y-b||1,_=v-w||1,S=46+(a.yTitle?18:0),C=30+(a.xTitle?20:0),k=S,M=i-12,P=s-C,L=Math.max(4,M-k),I=Math.max(4,P-10),E=t=>k+(t-b)/A*L,D=t=>P-(t-w)/_*I,F=this._scatterSizeStats(a,r),R=this._fixedRadius(t)||5;this._lastDotR=R;const z=[];h.forEach((t=>{const e=(r[t]||[]).map((t=>{const e=o(t),i=l(t);return{x:E(n(e)?e:b),y:D(n(i)?i:w),r:F?this._scatterRadius(t,F,R):void 0}}));z.push({i:t,cx:(k+M)/2,cy:(10+P)/2,outerR:I/2,dots:e})}));const T=(t,e,i,s,a,r)=>{const n=[];if(a)for(let o=0;o<r;o++)n.push(t+i*o/(r-1));else{const a=s||i/Math.max(1,r-1);for(let i=t;i<=e+.5*a;i+=a)n.push(Math.abs(i)<1e-9*a?0:i)}return n};return this._scatterAxis={mode:"2d",plotL:k,plotR:M,plotT:10,plotB:P,plotX:E,plotY:D,xTicks:T(b,y,A,m.spacing,null!=a.xMin||null!=a.xMax,g),yTicks:T(w,v,_,x.spacing,null!=a.yMin||null!=a.yMax,f),xTitle:a.xTitle,yTitle:a.yTitle,xFormatter:"function"===typeof a.xFormatter?a.xFormatter:null,yFormatter:"function"===typeof a.yFormatter?a.yFormatter:null,gridlines:!1!==a.gridlines},z}_scatterSizeStats(t,e){const i=t&&t.sizeRange;if(!Array.isArray(i)||i.length<2)return null;const s=Math.max(.5,+i[0]),a=Math.max(s,+i[1]),r=t.sizeField||"z";let n=1/0,o=-1/0;return e.forEach((t=>(t||[]).forEach((t=>{const e=t&&"object"===typeof t?t[r]:null;"number"===typeof e&&isFinite(e)&&(e<n&&(n=e),e>o&&(o=e))})))),n===1/0?null:{zmin:n,zmax:o,rMin:s,rMax:a,field:r}}_scatterRadius(t,e,i){if(!e)return i;const s=t&&"object"===typeof t?t[e.field]:null;if("number"!==typeof s||!isFinite(s))return e.rMin;const a=e.zmax>e.zmin?(s-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,a)),n=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(n+r*(o-n))}_beeswarm(t,e,i,s,a,r=!1){const n=r?"py":"px",o=r?"x":"y",l=t.slice().sort(((t,e)=>t[n]-e[n])),h=[],c=null!=a?a:i;l.forEach((t=>{const a=null!=t.r?t.r:i;let r=0;for(let i=0;i<2e3;i++){const o=0===i?0:Math.ceil(i/2)*s*(i%2?1:-1),l=e+o;let d=!0;for(let e=h.length-1;e>=0;e--){const i=h[e],s=t[n]-i.f;if(s>a+c)break;const r=a+i.r,o=l-i.s;if(s*s+o*o<r*r){d=!1;break}}if(d){r=o;break}}t[o]=e+r,h.push({f:t[n],s:t[o],r:a})}))}_scatterValueDomain(t,e,i,s){const a=(t,e,i)=>{const s=[];for(let a=t;a<=e+.5*i;a+=i)s.push(Math.abs(a)<1e-9*i?0:a);return s};if(null!=t.xMin||null!=t.xMax){let r=null!=t.xMin?t.xMin:e,n=null!=t.xMax?t.xMax:i;n>r||(n=r+1);const o=(n-r)/Math.max(1,s-1);return e<r&&(r-=Math.ceil((r-e)/o)*o),i>n&&(n+=Math.ceil((i-n)/o)*o),{min:r,max:n,ticks:a(r,n,o)}}const r=this._niceScale(e,i,s),n=r.spacing||(r.max-r.min)/Math.max(1,s-1);return{min:r.min,max:r.max,ticks:a(r.min,r.max,n)}}_niceScale(t,e,i){const s=t;let a=e;a>s||(a=s+1);const r=this._niceNum(a-s,!1),n=this._niceNum(r/Math.max(1,i-1),!0);return{min:Math.floor(s/n)*n,max:Math.ceil(a/n)*n,spacing:n}}_niceNum(t,e){const i=t>0?t:1,s=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,s);let r;return r=e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10,r*Math.pow(10,s)}_drawScatterAxes(t,e){const i=this.w;if(!Yt.isBrowser())return;const s=this._scatterAxis;if(!s)return;const a="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}
1),n=i.config.grid&&i.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=i.config.xaxis&&i.config.xaxis.labels&&i.config.xaxis.labels.style&&i.config.xaxis.labels.style.colors,h=Array.isArray(l)?l[0]:l,c=h||"rgba(120,130,140,0.9)",d=(t,e,i,s,n)=>{const o=ut.createElementNS(a,"line");o.setAttribute("x1",String(t)),o.setAttribute("y1",String(e)),o.setAttribute("x2",String(i)),o.setAttribute("y2",String(s)),o.setAttribute("stroke",n),o.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(o)},u=(t,e,s,n,o,l,h,c)=>{const d=ut.createElementNS(a,"text");d.setAttribute("class",c),d.setAttribute("x",String(e)),d.setAttribute("y",String(s)),d.setAttribute("text-anchor",n),d.setAttribute("dominant-baseline","middle"),d.setAttribute("font-size",`${l}px`),d.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),d.setAttribute("font-weight",String(h)),d.setAttribute("fill",o),d.textContent=t,r.node.appendChild(d)};if("2d"!==s.mode){if("vertical"===s.orientation){if(s.ticks.forEach((t=>{const e=s.plotY(t);s.gridlines&&d(s.plotL,e,s.plotR,e,n);const i=s.formatter?String(s.formatter(t)):this._formatTick(t);u(i,s.plotL-8,e,"end",c,11,400,"apexcharts-unit-tick")})),d(s.plotL,s.plotT,s.plotL,s.plotB,o),s.valueTitle){const t=ut.createElementNS(a,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(s.plotT+s.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",c),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(s.valueTitle),r.node.appendChild(t)}return s.lanes.forEach((t=>{const e=h||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,t.cx,s.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")})),void t.add(r)}s.ticks.forEach(((t,e)=>{const i=s.plotX(t);s.gridlines&&d(i,s.plotT,i,s.plotB,n);const a=s.formatter?String(s.formatter(t)):this._formatTick(t),r=0===e?"start":e===s.ticks.length-1?"end":"middle";u(a,i,s.plotB+14,r,c,11,400,"apexcharts-unit-tick")})),d(s.plotL,s.plotB,s.plotR,s.plotB,o),s.xTitle&&u(String(s.xTitle),(s.plotL+s.plotR)/2,s.plotB+32,"middle",c,12,600,"apexcharts-unit-axis-title"),s.plotL>12&&s.lanes.forEach((t=>{const e=h||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";u(t.name,s.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")})),t.add(r)}else{if(s.yTicks.forEach((t=>{const e=s.plotY(t);s.gridlines&&d(s.plotL,e,s.plotR,e,n);const i=s.yFormatter?String(s.yFormatter(t)):this._formatTick(t);u(i,s.plotL-8,e,"end",c,11,400,"apexcharts-unit-tick")})),s.xTicks.forEach((t=>{const e=s.plotX(t);s.gridlines&&d(e,s.plotT,e,s.plotB,n);const i=s.xFormatter?String(s.xFormatter(t)):this._formatTick(t);u(i,e,s.plotB+14,"middle",c,11,400,"apexcharts-unit-tick")})),d(s.plotL,s.plotB,s.plotR,s.plotB,o),d(s.plotL,s.plotT,s.plotL,s.plotB,o),s.xTitle&&u(String(s.xTitle),(s.plotL+s.plotR)/2,s.plotB+32,"middle",c,12,600,"apexcharts-unit-axis-title"),s.yTitle){const t=ut.createElementNS(a,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(s.plotT+s.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",c),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(s.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t){if(!isFinite(t))return"";const e=Math.abs(t);return e>=1e6?+(t/1e6).toFixed(1)+"M":e>=1e4?+(t/1e3).toFixed(1)+"k":Number.isInteger(t)?String(t):String(+t.toFixed(2))}_largestRemainder(t,e){const i=t.reduce(((t,e)=>t+e),0);if(i<=0||e<=0)return t.map((()=>0));const s=t.map((t=>t/i*e)),a=s.map((t=>Math.floor(t))),r=a.reduce(((t,e)=>t+e),0),n=Math.max(0,e-r),o=s.map(((t,e)=>({i:e,frac:t-Math.floor(t)}))).sort(((t,e)=>e.frac-t.frac)),l=a.slice();for(let h=0;h<n&&h<o.length;h++)l[o[h].i]++;return l}_spiral(t,e,i,s,a){const r=[];for(let n=0;n<i;n++){const i=a+n,o=s*Math.sqrt(i+.5),l=i*Os;r.push({x:t+o*Math.cos(l),y:e+o*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"===typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"===typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){if("number"===typeof t)return t;if(t&&"object"===typeof t){const e=null!=t.value?t.value:t.y;return"number"===typeof e?e:null}return null}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const i=e.max>e.min?(t-e.min)/(e.max-e.min):1,s=Math.max(0,Math.min(1,i));if("linear"===e.scale)return e.minR+s*(e.maxR-e.minR);const a=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(a+s*(r-a))}_bubbleStats(t,e,i){if(!this._bubbleActive(e))return null;let s=1/0,a=-1/0;
vendor: 4,227 bytes, line 1
1if(t.forEach((t=>{t&&t.forEach((t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<s&&(s=e),e>a&&(a=e))}))})),s===1/0||a<s)return null;const r=e.sizeByValue,n=i,o=Math.max(1,Math.min(n,"number"===typeof r.minRadius?r.minRadius:.35*n));return{min:s,max:a,minR:o,maxR:n,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,i){const s=t.spacing>0?t.spacing:1,a=this._fixedRadius(t);return a?2*a*s:e/(Math.sqrt(Math.max(1,i))+.5)}_dotRadiusFromStep(t,e){const i=e.spacing>0?e.spacing:1,s=this._fixedRadius(e);return s||Math.max(1,t/(2*i))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const i=null!=e?e:this._lastDotR;return{hx:i,hy:i}}_place(t,e,i,s){const a=e;2===a.pk?t.setAttribute("transform","translate("+(i-a.ox)+","+(s-a.oy)+a.tail):1===a.pk?(t.setAttribute("x",String(i-a.hx)),t.setAttribute("y",String(s-a.hy))):(t.setAttribute("cx",String(i)),t.setAttribute("cy",String(s)))}_baseSpec(t,e){const i=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:i};const{hx:s,hy:a}=this._halfExtent(t,i);return{pk:1,hx:s,hy:a,r:i}}_resolveMark(t){if(null==t)return null;if("object"===typeof t)return Ts(t);if("string"!==typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return Ts(e);const i=Xs(e);return i||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,i){const s=Math.round(10*e)/10,a=t.name+"|"+t.path.length+"|"+s,r=this._specCache.get(a);if(r)return r;const n=t.viewBox||[0,0,100,100],o=2*s*(1-Math.max(0,Math.min(.9,i.padding||0)))*("number"===typeof i.scale&&i.scale>0?i.scale:1),l="width"===i.fit?o/n[2]:"height"===i.fit?o/n[3]:o/Math.max(n[2],n[3]),h=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(n[0]+n[2]/2)*l,oy:(n[1]+n[3]/2)*l,tail:") scale("+l+")",r:s});return this._specCache.set(a,h),h}_markSpecFor(t,e,i,s){if("pictogram"!==t.shape)return this._baseSpec(t,s);const a=t.pictogram||{},r=e&&"object"===typeof e?e.mark:void 0,n=Array.isArray(a.mark)?a.mark[i%a.mark.length]:a.mark,o=this._resolveMark(null!=r?r:n);return o?this._glyphSpec(o,s,a):this._baseSpec(u(d({},t),{shape:"square"===a.fallback?"square":"circle"}),s)}_drawDot(t,e,i,s,a,r,n){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,h=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[a]||"none",c="number"===typeof o.config.fill.opacity?o.config.fill.opacity:1;let d;if(n&&2===n.pk)d=o.dom.Paper.path(n.d),d.node.setAttribute("fill",s),"evenodd"===n.fillRule&&d.node.setAttribute("fill-rule","evenodd"),c<1&&d.node.setAttribute("fill-opacity",String(c)),d.node.setAttribute("data:r",String(n.r));else if("image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,i=e.image.height||20;d=o.dom.Paper.image(e.image.src),d.node.setAttribute("width",String(t)),d.node.setAttribute("height",String(i)),d.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&d.node.setAttribute("filter",`url(#${this._tintFilter(s)})`)}else if("square"===e.shape){const a=2*i;d=t.drawRect(0,0,a,a,e.borderRadius||0,s,1,l,h),d.node.setAttribute("fill",s),c<1&&d.node.setAttribute("fill-opacity",String(c))}else d=t.drawCircle(i,{fill:s,"stroke-width":l,stroke:h}),d.node.setAttribute("fill",s),c<1&&d.node.setAttribute("fill-opacity",String(c));return d.node.classList.add("apexcharts-unit-area"),d.node.setAttribute("i",String(a)),d.node.setAttribute("j",String(r)),d}_tintFilter(t){const e=this.w,i="http://www.w3.org/2000/svg",s=String(t).replace(/[^a-zA-Z0-9]/g,""),a=`apexcharts-unit-tint-${e.globals.chartID}-${s}`,r=e.dom.Paper.node;if(r.querySelector(`#${a}`))return a;let n=r.querySelector("defs");n||(n=ut.createElementNS(i,"defs"),r.insertBefore(n,r.firstChild));const o=ut.createElementNS(i,"filter");o.setAttribute("id",a),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=ut.createElementNS(i,"feFlood");
vendor: 3,116 bytes, line 1
1l.setAttribute("flood-color",t),l.setAttribute("result","flood");const h=ut.createElementNS(i,"feComposite");return h.setAttribute("in","flood"),h.setAttribute("in2","SourceAlpha"),h.setAttribute("operator","in"),o.appendChild(l),o.appendChild(h),n.appendChild(o),a}_placeDot(t,e,i,s,a){this._place(t,a||this._baseSpec(e),i,s)}_rgb(t){if("string"!==typeof t)return null;let e=t.trim();if("#"===e[0]){4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e.slice(1,7),16);return isNaN(t)?null:[t>>16&255,t>>8&255,255&t]}const i=e.match(/rgba?\(([^)]+)\)/);if(i){const t=i[1].split(",").map((t=>parseFloat(t)));if(t.length>=3&&t.every((t=>!isNaN(t))))return[t[0],t[1],t[2]]}return null}_shouldAnimate(){const t=this.w,e=t.config.chart.animations;return!!Yt.isBrowser()&&(!(!e||!1===e.enabled)&&(!1!==t.globals.shouldAnimate&&(!(t.globals.resized&&!t.globals.dataChanged)&&(!e.respectReducedMotion||!x()))))}_seedSprings(t,e,i){const[s,a]=Ys(e.spring,i),r=this.ctx?this.ctx._unitSprings:null,n=new Map;for(let o=0;o<t.length;o++){const e=t[o],i=r&&!e.isEnter&&null!=e.key?r.get(e.key):null,l=i?i.x:Ps(e.cx0,s,a),h=i?i.y:Ps(e.cy0,s,a);i&&(l.stiffness=s,h.stiffness=s,l.damping=a,h.damping=a,e.cx0=l.value,e.cy0=h.value,this._place(e.node,e.spec,e.cx0,e.cy0),0===l.velocity&&0===h.velocity||(e.delay=0)),e.sx=l,e.sy=h,null!=e.key&&n.set(e.key,{x:l,y:h})}this.ctx&&(this.ctx._unitSprings=n)}_runGather(t){const e=this.w,i=e.config.plotOptions.unit,s=Math.max(1,e.config.chart.animations.speed||800),a=Math.min(.6*s,450),r=t.length;for(let p=0;p<r;p++)t[p].delay=r>1?p/(r-1)*a:0;const n=i.gather||{},o=n.motion||"auto";"spring"===o||"auto"===o&&(!n.easing||"outCubic"===n.easing)?this._seedSprings(t,n,s):this.ctx&&(this.ctx._unitSprings=null);for(let p=0;p<r;p++){const e=t[p];0===e.spec.pk&&null!=e.r0&&null!=e.r1&&e.r0!==e.r1&&e.node.setAttribute("r",String(e.r0))}for(let p=0;p<r;p++){const e=t[p];e.fill0&&e.fill1&&e.fill0!==e.fill1&&(e._c0=this._rgb(e.fill0),e._c1=this._rgb(e.fill1))}const l="outBack"===n.easing?(h="number"===typeof n.overshoot?n.overshoot:1.70158,t=>1+(h+1)*Math.pow(t-1,3)+h*Math.pow(t-1,2)):"inOutCubic"===n.easing?$s:Ws;var h;null!=this.w.globals.unitGatherRAF&&(ut.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);const c=performance.now();let d=c;const u=e=>{if(this.w.globals.isDestroyed)return this.w.globals.unitGatherRAF=null,void(this.w.globals.animationEnded=!0);const i=Math.min(.25,Math.max(0,(e-d)/1e3));d=e;let a=!0;for(let n=0;n<r;n++){const r=t[n],o=e-c-r.delay,h=Math.max(0,Math.min(1,o/s)),d=Ws(h);let u,p;if(r.sx&&r.sy){o>=0&&!r.released&&(Is(r.sx,r.x),Is(r.sy,r.y),r.released=!0);const t=Ls(r.sx,i),e=Ls(r.sy,i);r.released&&t&&e||(a=!1),u=r.sx.value,p=r.sy.value}else{const t=l(h);u=r.cx0+(r.x-r.cx0)*t,p=r.cy0+(r.y-r.cy0)*t}if(this._place(r.node,r.spec,u,p),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*h))),r._c0&&r._c1){const t=Math.round(r._c0[0]+(r._c1[0]-r._c0[0])*d),e=Math.round(r._c0[1]+(r._c1[1]-r._c0[1])*d),i=Math.round(r._c0[2]+(r._c1[2]-r._c0[2])*d);r.node.setAttribute("fill",`rgb(${t},${e},${i})`)}
10===r.spec.pk&&null!=r.r0&&null!=r.r1&&r.r0!==r.r1&&r.node.setAttribute("r",String(r.r0+(r.r1-r.r0)*d)),h<1&&(a=!1)}if(a){for(let e=0;e<r;e++){const i=t[e];i.node.style.opacity="",i._c1&&i.fill1&&i.node.setAttribute("fill",i.fill1),0===i.spec.pk&&null!=i.r0&&null!=i.r1&&i.r0!==i.r1&&i.node.setAttribute("r",String(i.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=ut.requestAnimationFrame(u)};this.w.globals.unitGatherRAF=ut.requestAnimationFrame(u)}_collectExits(t,e,i){const s=Math.max(0,i.maxUnits||5e3),a=[];for(const[r,n]of t)if(!e.has(r)&&(a.push(n),a.length>=s))break;return a}_runExits(t,e,i){const s=this.w,a=new D(s,this.ctx),r=this._lastDotR,n=s.layout.gridWidth/2,o=s.layout.gridHeight/2,l="grid"===i.layout||"scatter"===i.layout||"arc"===i.layout||"custom"===i.layout?0:.35,h=[];if(e.forEach((e=>{const s=null!=e.r?e.r:r,n=e.spec||this._baseSpec(i,s),o=this._drawDot(a,i,s,e.fill,0,0,n);o.node.classList.add("apexcharts-unit-exit"),this._place(o.node,n,e.x,e.y),t.add(o),h.push({node:o.node,x0:e.x,y0:e.y,spec:n})})),!this._shouldAnimate())return void h.forEach((t=>t.node.remove()));const c=Math.max(1,s.config.chart.animations.speed||800);null!=this.w.globals.unitExitRAF&&(ut.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);const d=performance.now(),u=e=>{if(this.w.globals.isDestroyed)return void(this.w.globals.unitExitRAF=null);const i=Math.max(0,Math.min(1,(e-d)/c)),s=Ws(i);for(let t=0;t<h.length;t++){const e=h[t];if(l){const t=e.x0+(n-e.x0)*s*l,i=e.y0+(o-e.y0)*s*l;this._place(e.node,e.spec,t,i)}e.node.style.opacity=String(1-s)}i<1?this.w.globals.unitExitRAF=ut.requestAnimationFrame(u):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=ut.requestAnimationFrame(u)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,i,s){const a=this.w,r=a.seriesData.seriesNames[t]||`series-${t+1}`,n=i>0?e/i*100:0,o=s.clusterLabels,l="function"===typeof o.formatter?o.formatter(r,{seriesIndex:t,value:e,percent:n,w:a}):`${r}\n${n.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const i=this.w,s=e.clusterLabels,a=s.external.connector||{},r=t.reduce(((t,e)=>t+e),0),n=[];if(t.forEach(((t,i)=>{t>0&&n.push(...this._outerLabelLines(i,t,r,e))})),!n.length)return 0;const o=function(t,e,i={}){const s=new D(t),a=i.fontSize||"12px",r=parseFloat(a)||12;let n=0;return e.forEach((t=>{if(null==t||""===t)return;const e=`${t}`,o=s.getTextRects(e,a,i.fontFamily,"").width;n=Math.max(n,o>0?o:e.length*r*.58)})),n}(i,n,{fontSize:s.fontSize,fontFamily:s.fontFamily||i.config.chart.fontFamily}),l=o+(null!=a.gap?a.gap:8)+(null!=a.length?a.length:22)+8+Math.abs(parseFloat(s.external.offsetX)||0);return Math.min(l,.25*i.layout.gridWidth)}_drawOuterLabels(t,e,i,s,a,r){const n=this.w;if(!Yt.isBrowser())return;const o=a.clusterLabels,l=o.external,h=l.connector||{},c=null!=h.gap?h.gap:8,d=null!=h.length?h.length:22,u=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,g=n.layout.gridWidth,f=n.layout.gridHeight,m=this._lastDotR,x=e.filter((t=>t.dots.length>0));if(!x.length)return;let b=0,y=0;if(x.length>1){const t=x.map((t=>t.cx)),e=x.map((t=>t.cy));b=Math.max(...t)-Math.min(...t),y=Math.max(...e)-Math.min(...e)}const w=b>y,v=parseFloat(o.fontSize)||13,A=Math.round(1.35*v),_=[];if(x.slice().sort(((t,e)=>t.cy-e.cy)).forEach(((t,e)=>{const r=this._outerLabelLines(t.i,i[t.i],s,a);if(!r.some((t=>""!==t)))return;const n=w?t.cx>=g/2?"right":"left":e%2===0?"right":"left",o="right"===n?1:-1;let l=t.dots[0],h=-1/0;t.dots.forEach((e=>{const i=o*e.x-.75*Math.abs(e.y-t.cy);i>h&&(h=i,l=e)}));const f={x:l.x+o*(l.r||m),y:l.y},x={x:f.x+o*c,y:f.y};_.push({i:t.i,lines:r,anchor:f,elbow:x,labelX:x.x+o*d+u,idealY:f.y+p,labelY:f.y+p,side:n})})),!_.length)return;const S=_.reduce(((t,e)=>Math.max(t,e.lines.length)),1)*A,C=S/2;["left","right"].forEach((t=>{os(_.filter((e=>e.side===t)),S+2,f-C,C)}));const k=new D(n,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,n.config.chart.animations.speed||800);k.node.classList.add("apexcharts-unit-label-delay"),k.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}_.forEach((t=>{const e=n.globals.colors[t.i]||n.globals.colors[0]||"#008FFB";k.add(ns(n,{lines:t.lines,lineHeight:A,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==h.show,width:null!=h.width?h.width:1.5,color:h.color||e},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||n.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||n.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))})),t.add(k)}
1_drawClusterLabel(t,e,i,s,a,r){const n=this.w;if(!Yt.isBrowser())return;const o="http://www.w3.org/2000/svg",l=n.seriesData.seriesNames[e.i]||`series-${e.i+1}`,h=s>0?i/s*100:0,c=a.clusterLabels,d=parseFloat(c.fontSize)||13;let u;u="function"===typeof c.formatter?c.formatter(l,{seriesIndex:e.i,value:i,percent:h,w:n}):`${l} (${h.toFixed(1)}%)`;const p="string"===typeof u?u:String(u),g=ut.createElementNS(o,"text");g.setAttribute("class","apexcharts-unit-label"),g.setAttribute("text-anchor","middle"),g.setAttribute("font-size",`${d}px`),g.setAttribute("font-family",c.fontFamily||n.config.chart.fontFamily||"inherit"),g.setAttribute("font-weight",String(c.fontWeight||600)),g.setAttribute("fill",c.color||r);const f="bottom"===c.position,m=e.outerR+.6*d+3+(c.offsetY||0),x=p.length*d*.55;if(!f&&!e.flat&&!1!==c.curved&&x<=Math.PI*m*.95){const i=e.cy,s=`M ${e.cx-m} ${i} A ${m} ${m} 0 0 1 ${e.cx+m} ${i}`,a=`apexcharts-unit-label-${n.globals.chartID}-${e.i}`,r=ut.createElementNS(o,"path");r.setAttribute("id",a),r.setAttribute("d",s),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=ut.createElementNS(o,"textPath");l.setAttribute("href",`#${a}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${a}`),l.setAttribute("startOffset","50%"),l.textContent=p,g.appendChild(l),t.node.appendChild(r)}else{g.setAttribute("x",String(e.cx));const t=f?e.cy+e.outerR+d+6+(c.offsetY||0):e.cy-e.outerR-6-(c.offsetY||0);g.setAttribute("y",String(t)),g.textContent=p}t.node.appendChild(g)}},sunburst:class{constructor(t,e){this.ctx=e,this.w=t;const i=t.config;this.cfg=i.plotOptions.sunburst,this.strokeWidth=i.stroke.show?i.stroke.width:0,this.strokeColor=Array.isArray(i.stroke.colors)?i.stroke.colors[0]:i.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,i=new D(this.w);this._graphics=i;const s=i.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return s;const a=e.layout.gridWidth,r=e.layout.gridHeight;if(this.centerX=a/2+(this.cfg.offsetX||0),this.centerY=r/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(a,r)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5)return s;if(this._roots=this._buildHierarchy(),!this._roots.length)return s;this._roots.forEach((t=>this._fillValues(t))),this._validateStrict(),this._nodesAll=[];const n=e.globals.colors||[];this._roots.forEach(((t,e)=>{this._colorPass(t,t.color||n[e%n.length]||"#008FFB")})),this.total=this._roots.reduce(((t,e)=>t+Math.max(0,e.value)),0)||1,this._ringsG=i.group({class:"apexcharts-sunburst-rings"}),this._labelsG=i.group({class:"apexcharts-sunburst-labels"}),s.add(this._ringsG),s.add(this._labelsG),this._focus=null,this._relayout(this._focus);const o=e.config.chart.animations;let l="none";return o.enabled&&(e.globals.dataChanged?o.dynamicAnimation.enabled&&(l="update"):e.globals.resized||(l="intro")),this._applyLayout(l),this._renderBreadcrumb(),s}_buildHierarchy(){return function(t,e={}){const i=t.config.series,s=i&&i[0],a=s&&Array.isArray(s.data)?s.data:i;return Array.isArray(a)?a.map(((i,s)=>Ss(t,i,s,null,"",null,e))):[]}(this.w)}_fillValues(t){Cs(t)}_validateStrict(){if("strict"!==this.cfg.partition)return;let t=!1;const e=i=>{if(i.children&&i.children.length){const s=i.children.reduce(((t,e)=>t+Math.max(0,e.value||0)),0);!t&&null!=i.value&&Math.abs(s-i.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${i.name}" (${i.value}) != sum of its children (${s}). Angles are normalized to fill the wedge.`),t=!0),i.children.forEach(e)}};this._roots.forEach(e)}_colorPass(t,e){t._color=t.color||e,this._nodesAll.push(t),t.children&&t.children.forEach((e=>this._colorPass(e,e.color||this._lighten(t._color,this.cfg.tint))))}_relayout(t){if(this._nodesAll.forEach((t=>{t._show=!1})),this._focusMaxDepth=0,t)this._placeVis(t,0,this.startAngle,this.endAngle,t._parent);else{const t=this._roots.reduce(((t,e)=>t+Math.max(0,e.value)),0)||1;let e=this.startAngle;
1this._roots.forEach((i=>{const s=(this.endAngle-this.startAngle)*Math.max(0,i.value)/t;this._placeVis(i,0,e,e+s,null),e+=s}))}const e=this._parseSize(this.cfg.innerSize,this.maxRadius),i=this._focusMaxDepth+1,s=(this.maxRadius-e)/i,a=i>1?1:0;this._innerR=t=>e+t*s+(t>0?a/2:0),this._outerR=t=>e+(t+1)*s-a/2,this._nodesAll.forEach((t=>{t._show&&(t._iR=this._innerR(t._vDepth),t._oR=t._leaf&&"extend"===this.cfg.leaf&&t._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(t._vDepth))}))}_placeVis(t,e,i,s,a){if(t._show=!0,t._vDepth=e,t._a0=i,t._a1=s,t._parent=a,t._leaf=!(t.children&&t.children.length),e>this._focusMaxDepth&&(this._focusMaxDepth=e),!t._leaf){const a=t.children.reduce(((t,e)=>t+Math.max(0,e.value)),0)||1;let r=i;t.children.forEach((n=>{const o=(s-i)*Math.max(0,n.value)/a;this._placeVis(n,e+1,r,r+o,t),r+=o}))}}_applyLayout(t){var e;const i=this.w.config.chart.animations,s=i.enabled?"none"===t?0:"update"===t?i.dynamicAnimation.speed||350:i.speed||500:0,a=++this._zoomGen,r=null==(e=this.ctx)?void 0:e.morphTypeChange,n=!!r&&"function"===typeof r.isActive&&r.isActive()&&"function"===typeof r.getInitialPathAt,o=n?r.getSpeed():0;this._morphLeafIndex=0;const l="update"===t?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach((e=>{if(e._show){const i={a0:e._a0,a1:e._a1,iR:e._iR,oR:e._oR};e._el||(e._el=this._createArcEl(e));const r=n?this._morphSourceFor(e):null;if(r&&o>0)this._morphArcFrom(e,r,i,o,a);else if(("intro"===t||n)&&s>0)this._sweepArc(e,i,n?o:s,a);else{let t,r=!1;if(e._cur)t=e._cur;else if(l&&l.get(e._key))t=l.get(e._key);else{const e=(i.a0+i.a1)/2;t={a0:e,a1:e,iR:i.iR,oR:i.iR},r=!0}this._animateArc(e,t,i,s,!1,r,a)}}else if(e._el&&e._cur){const t=(e._cur.a0+e._cur.a1)/2,i={a0:t,a1:t,iR:e._cur.iR,oR:e._cur.iR};this._animateArc(e,e._cur,i,s,!0,!1,a)}}));const h=new Map;this._nodesAll.forEach((t=>{t._show&&h.set(t._key,{a0:t._a0,a1:t._a1,iR:t._iR,oR:t._oR})})),this.ctx._sunburstPrevGeoms=h,this._renderLabels(s)}_morphSourceFor(t){const e=this.ctx,i=e&&e.morphTypeChange;return i?"function"===typeof i.hasKeyedMarks&&i.hasKeyedMarks()&&"function"===typeof i.getInitialPathForKey?i.getInitialPathForKey(ks(t._key)):t.children&&t.children.length?null:i.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,i,s,a){const r=t._el,n=this._arcPath(i.iR,i.oR,i.a0,i.a1,this.cfg.borderRadius);r.node.style.display="",r.attr({d:e,opacity:1}),t._cur=i,this._zoomGen===a&&new g(this.w,this.ctx).morphSVG(r,0,null,t._color,e,n,s,0)}_sweepArc(t,e,i,s){const a=t._el,r=this.cfg.borderRadius,n=this.startAngle,o=this.endAngle;a.node.style.display="",a.attr({d:"",opacity:1}),a.animate(i).during((i=>{if(this._zoomGen!==s)return;const l=n+(o-n)*i;if(l<=e.a0+.01)return void a.attr({d:""});const h=Math.min(e.a1,l);a.attr({d:this._arcPath(e.iR,e.oR,e.a0,h,r)}),t._cur={a0:e.a0,a1:h,iR:e.iR,oR:e.oR}})).after((()=>{this._zoomGen===s&&(t._cur=e)}))}_createArcEl(t){const e=this._graphics.drawPath({d:"",fill:t._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:"apexcharts-sunburst-arc"}),i=e.node;return i.setAttribute("data:name",t.name),i.setAttribute("data:value",String(t.value)),i.setAttribute("data:key",ks(t._key)),i.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._attachTooltip(i,t),Yt.isBrowser()&&(i.addEventListener("click",(()=>this._zoomTo(t))),i.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,i,s,a,r,n){const o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),0===s)return o.attr({d:this._arcPath(i.iR,i.oR,i.a0,i.a1,l),opacity:a?0:1}),o.node.style.display=a?"none":"",void(t._cur=a?null:i);o.node.style.display="";const h=a?Number(o.attr("opacity"))||1:r?0:1,c=a?0:1;o.attr({opacity:h}),o.animate(s).during((s=>{if(this._zoomGen!==n)return;const a=Vs(e.a0,i.a0,s),r=Vs(e.a1,i.a1,s),d=Vs(e.iR,i.iR,s),u=Vs(e.oR,i.oR,s);o.attr({d:this._arcPath(d,u,a,r,l),opacity:Vs(h,c,s)}),t._cur={a0:a,a1:r,iR:d,oR:u}})).after((()=>{this._zoomGen===n&&(a?(o.node.style.display="none",t._cur=null):t._cur=i)}))}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach((t=>{t._show&&(t._a1-t._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(t))})),t>0?(e.attr({opacity:0}
vendor: 5,850 bytes, line 1
1),e.animate(250,t).attr({opacity:1})):e.attr({opacity:1}))}_renderCurvedLabel(t){if(!Yt.isBrowser())return;const e=this.cfg.dataLabels.style,i=this.w,s=(t._iR+t._oR)/2,a=(t._a0+t._a1)/2,r=a>90&&a<270,n=Math.min(s>0?4/s*Ns:0,(t._a1-t._a0)/2),o=r?t._a1-n:t._a0+n,l=r?t._a0+n:t._a1-n,h=this._ptAt(s,o),c=this._ptAt(s,l),d=Math.abs(l-o)>180?1:0,u=r?0:1,p=`apx-sb-lbl-${i.globals.cuid}-${this._lblSeq++}`,g=ut.createElementNS(Hs,"path");g.setAttribute("id",p),g.setAttribute("d",`M ${h.x} ${h.y} A ${s} ${s} 0 ${d} ${u} ${c.x} ${c.y}`),g.setAttribute("fill","none"),g.setAttribute("stroke","none");const f=e.colors,m=(Array.isArray(f)?f[0]:f)||"#fff",x=ut.createElementNS(Hs,"text");x.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&x.setAttribute("font-family",e.fontFamily),x.setAttribute("font-weight",String(e.fontWeight||400)),x.setAttribute("fill",m),x.setAttribute("dominant-baseline","central"),x.style.pointerEvents="none";const b=ut.createElementNS(Hs,"textPath");b.setAttribute("href","#"+p),b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+p),b.setAttribute("startOffset","50%"),b.setAttribute("text-anchor","middle"),b.textContent=this._truncate(t.name,s,t._a1-t._a0,e.fontSize),x.appendChild(b),this._labelsG.node.appendChild(g),this._labelsG.node.appendChild(x)}_truncate(t,e,i,s){const a=e*i*Bs-8,r=.58*(parseFloat(s)||12),n=Math.floor(a/r);return n>=t.length?t:n<=1?"":t.slice(0,Math.max(1,n-1))+"\u2026"}_zoomTo(t){if(!1===this.cfg.zoomOnClick)return;const e=t===this._focus?t._parent||null:t;e!==this._focus&&(this._focus=!e||e.children&&e.children.length?e:e._parent||null,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb())}_focusChain(){const t=[];let e=this._focus;for(;e;)t.unshift(e),e=e._parent;return t}_renderBreadcrumb(){if(!Yt.isBrowser())return;const t=this.w.dom.elWrap;if(!t)return;const e=t.querySelector(".apexcharts-breadcrumb");if(e&&e.parentNode&&e.parentNode.removeChild(e),!this._focus)return;const i=ut.createElementNS(js,"nav");i.setAttribute("class","apexcharts-breadcrumb"),i.setAttribute("aria-label","Sunburst breadcrumb"),i.style.position="absolute",i.style.top="0px",i.style.left="0px";const s=[{name:"All",node:null}].concat(this._focusChain().map((t=>({name:t.name,node:t}))));s.forEach(((t,e)=>{if(e>0){const t=ut.createElementNS(js,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.textContent=" / ",i.appendChild(t)}if(e===s.length-1){const e=ut.createElementNS(js,"span");e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.textContent=t.name,i.appendChild(e)}else{const s=ut.createElementNS(js,"button");if(s.setAttribute("type","button"),s.setAttribute("class","apexcharts-breadcrumb-item"),0===e){const t=ut.createElementNS(js,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.textContent="\u2190",s.appendChild(t)}const a=ut.createElementNS(js,"span");a.setAttribute("class","apexcharts-breadcrumb-label"),a.textContent=t.name,s.appendChild(a),s.addEventListener("click",(()=>{this._focus=t.node,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb()})),i.appendChild(s)}})),t.appendChild(i),this._avoidChromeOverlap(i)}_avoidChromeOverlap(t){Pe(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*Bs),y:this.centerY+t*Math.sin((e-90)*Bs)}}_arcPath(t,e,i,s,a){if(e<=t+.01)return"";let r=s-i;const n=this.cfg.spacing;if(n>0&&r>0&&e>0){const t=n/e*Ns,a=Math.min(t/2,Math.max(0,r/2-.25));r=(s-=a)-(i+=a)}if(r<=0)return"";const o=r*Bs,l=this.centerX,h=this.centerY;let c=a;return c=Math.min(c,o*t/2,o*e/2,(e-t)/2),c>.5?ps({cx:l,cy:h,rIn:t,rOut:e,a0:i,a1:s,r:c,spanDeg:r}):gs({cx:l,cy:h,rIn:t,rOut:e,a0:i,a1:s,spanDeg:r})}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_attachTooltip(t,e){this.w.config.tooltip.enabled&&Yt.isBrowser()&&(t.addEventListener("mouseenter",(t=>this._showTooltip(t,e))),t.addEventListener("mousemove",(t=>this._positionTooltip(t))),t.addEventListener("mouseleave",(()=>this._hideTooltip())))}_showTooltip(t,e){const i=this._tip();if(!i)return;const s=this.w,a=(e.value/this.total*100).toFixed(1),r=e._parent?e._parent.value:this.total,n=r>0?(e.value/r*100).toFixed(1):a,o=s.config.tooltip.fillSeriesColor?`background-color:${e._color};`:"";i.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${o}"><span class="apexcharts-tooltip-marker" style="background-color:${e._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${e.name}: </span><span class="apexcharts-tooltip-text-y-value">${e.value} (${n}% of parent, ${a}% of total)</span></div></div></div>`,i.classList.add("apexcharts-active"),i.style.opacity="1",this._positionTooltip(t)}_positionTooltip(t){const e=this._tip();if(!e)return;const i=this.w.dom.elWrap.getBoundingClientRect(),s=e.offsetWidth,a=e.offsetHeight;let r=t.clientX-i.left+12;r+s>i.width&&(r=t.clientX-i.left-s-12),r=Math.max(0,Math.min(r,i.width-s));let n=t.clientY-i.top+12;n+a>i.height&&(n=t.clientY-i.top-a-12),n=Math.max(0,Math.min(n,i.height-a)),e.style.left=r+"px",e.style.top=n+"px"}_hideTooltip(){const t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}_parseSize(t,e){if("number"===typeof t)return t;const i=String(t).trim();if(i.endsWith("%"))return parseFloat(i)/100*e;const s=parseFloat(i);return isNaN(s)?.15*e:s}_lighten(t,e){if("string"!==typeof t||"#"!==t[0])return t;let i=t.slice(1);if(3===i.length&&(i=i.split("").map((t=>t+t)).join("")),6!==i.length)return t;const s=parseInt(i,16);if(isNaN(s))return t;let a=s>>16&255,r=s>>8&255,n=255&s;return a=Math.round(a+(255-a)*e),r=Math.round(r+(255-r)*e),n=Math.round(n+(255-n)*e),"#"+((1<<24)+(a<<16)+(r
1<<8)+n).toString(16).slice(1)}}}),Object.defineProperty(s.ZP,"__internals",{value:Gt,enumerable:!1,writable:!1,configurable:!1})}}]); 2//# sourceMappingURL=56da58dc.3c384a16d325da1e.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.