apexcharts 7.2.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +1 -1
- package/dist/apexcharts.core.min.js +1 -1
- package/dist/apexcharts.esm.js +167 -2
- package/dist/apexcharts.js +167 -2
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +167 -2
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +1 -1
- package/dist/bar.esm.js +1 -1
- package/dist/bar.js +1 -1
- package/dist/boxPlot.common.js +1 -1
- package/dist/boxPlot.esm.js +1 -1
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +1 -1
- package/dist/candlestick.esm.js +1 -1
- package/dist/candlestick.js +1 -1
- package/dist/column.common.js +1 -1
- package/dist/column.esm.js +1 -1
- package/dist/core.common.js +1 -1
- package/dist/core.esm.js +1 -1
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +1 -1
- package/dist/dumbbell.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +167 -2
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +1 -1
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/exports.js +1 -1
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +1 -1
- package/dist/features/keyboard.esm.js +1 -1
- package/dist/features/keyboard.js +1 -1
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +1 -1
- package/dist/features/perspectives.js +1 -1
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +1 -1
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +1 -1
- package/dist/features/toolbar.esm.js +1 -1
- package/dist/features/toolbar.js +1 -1
- package/dist/features/trellis.common.js +1 -1
- package/dist/features/trellis.esm.js +1 -1
- package/dist/features/trellis.js +1 -1
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +167 -2
- package/dist/features/weave.js +2 -2
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +1 -1
- package/dist/histogram.esm.js +1 -1
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +1 -1
- package/dist/raincloud.esm.js +1 -1
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +1 -1
- package/dist/rangeBar.esm.js +1 -1
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +1 -1
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +1 -1
- package/dist/violin.esm.js +1 -1
- package/dist/violin.js +1 -1
- package/dist/waterfall.common.js +1 -1
- package/dist/waterfall.esm.js +1 -1
- package/package.json +1 -1
- package/src/modules/weave/PluginAPI.js +37 -1
- package/src/modules/weave/WeaveHost.js +148 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,a=(t,s,r)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[s]=r,l=(e,t)=>{for(var s in t||(t={}))i.call(t,s)&&a(e,s,t[s]);if(r)for(var s of r(t))n.call(t,s)&&a(e,s,t[s]);return e},o=(e,r)=>t(e,s(r));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const s in e)if("default"!==s){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}return t.default=e,Object.freeze(t)}const u=h(require("apexcharts/core")),c=u.__apex_Graphics,d=u.__apex_Utils;class f{static xRatio(e){const t=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/t}static dataXToPx(e,t){return(t-e.globals.minX)/f.xRatio(e)}static pxToDataX(e,t){return e.globals.minX+t*f.xRatio(e)}static screenXToPlotPx(e,t){const s=e.dom.baseEl,r=s&&s.querySelector(".apexcharts-svg");if(!r)return t-e.layout.translateX;const i=r.getBoundingClientRect(),n=e.globals.svgWidth?i.width/e.globals.svgWidth:1;return(t-i.left)/(n||1)-e.layout.translateX}}const p=u.__apex_Environment_Environment;const g=["wiggle","silhouette","zero","expand"],m=["inside-out","inverse","none"];function x(e,t,s){const r=s&&void 0!==s[t]?s[t]:t+1;return null==e?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:void 0!==e[0]?e[0]:r,y:e[1],rest:{}}:"object"==typeof e?{x:void 0!==e.x?e.x:r,y:e.y,rest:e}:{x:r,y:e,rest:{}}}const y="__apexcharts_series_transforms__";var b,v;globalThis[y]||(globalThis[y]={}),b="streamgraph","function"==typeof(v=function(e,t){var s,r;const i=t.config,n=t.globals;if(!Array.isArray(e))return e;n.streamgraphRawSeries||(n.streamgraphRawSeries=e.map(e=>o(l({},e),{data:Array.isArray(null==e?void 0:e.data)?e.data.slice():null==e?void 0:e.data})));const a=n.streamgraphRawSeries;if(a.some(e=>function(e){for(let t=0;t<e.length;t++){const s=e[t],r=Array.isArray(s)?s[1]:s&&"object"==typeof s?s.y:s;if(Array.isArray(r)&&2===r.length)return!0}return!1}(Array.isArray(null==e?void 0:e.data)?e.data:[])))return t.streamgraphData=null,e;const h=(null==(s=i.plotOptions)?void 0:s.streamgraph)||{},u=-1!==g.indexOf(h.offset)?h.offset:"wiggle",c=-1!==m.indexOf(h.order)?h.order:"inside-out",f=null==(r=i.xaxis)?void 0:r.categories,p=n.collapsedSeriesIndices||[],{xs:y,rows:b,grids:v}=function(e,t){var s;const r=[],i=[],n=new Map,a=[];for(let o=0;o<e.length;o++){const h=Array.isArray(null==(s=e[o])?void 0:s.data)?e[o].data:[],u=new Map;for(let e=0;e<h.length;e++){const{x:s,y:a,rest:o}=x(h[e],e,t),c=s instanceof Date?s.getTime():s;n.has(c)||(n.set(c,r.length),r.push(s),i.push(l({},o))),u.set(n.get(c),d.parseNumber(a))}a.push(u)}return{xs:r,rows:i,grids:a}}(a,f),P=function(e){const t=[];for(let s=0;s<e.length;s++){const r=e[s]instanceof Date?e[s].getTime():e[s];if("number"!=typeof r||!isFinite(r))return null;t.push(s)}const s=t.map(t=>({j:t,v:e[t]instanceof Date?e[t].getTime():e[t]}));s.sort((e,t)=>e.v-t.v);const r=s.map(e=>e.j);for(let e=0;e<r.length;e++)if(r[e]!==e)return r;return null}(y),A=P?P.map(e=>y[e]):y,w=P?P.map(e=>b[e]):b,_=A.length;let S=!1;const k=[];for(let e=0;e<a.length;e++){const t=new Array(_);for(let s=0;s<_;s++){const r=v[e].get(P?P[s]:s);let i=null==r?0:Number(r);isFinite(i)||(i=0),i<0&&(S=!0,i=0),t[s]=i}k.push(t)}S&&!n.streamgraphWarnedNegative&&(n.streamgraphWarnedNegative=!0);const F=[];for(let e=0;e<a.length;e++)-1===p.indexOf(e)&&F.push(e);let M=k;if("expand"===u){M=k.map(e=>e.slice());for(let e=0;e<_;e++){let t=0;for(let s=0;s<F.length;s++)t+=M[F[s]][e];if(t)for(let s=0;s<F.length;s++)M[F[s]][e]/=t}}const Y=function(e,t,s){if("none"===e)return t.slice();if("inverse"===e)return t.slice().reverse();const r={},i={};for(let e=0;e<t.length;e++){const n=t[e],a=s[n];let l=0,o=-1/0,h=0;for(let e=0;e<a.length;e++)l+=a[e],a[e]>o&&(o=a[e],h=e);r[n]=l,i[n]=h}const n=t.slice().sort((e,t)=>i[e]-i[t]||e-t);let a=0,l=0;const o=[],h=[];for(let e=0;e<n.length;e++){const t=n[e];a<l?(a+=r[t],o.push(t)):(l+=r[t],h.push(t))}return h.reverse().concat(o)}(c,F,M),C=function(e,t,s,r){const i=new Array(r).fill(0);if(0===r||0===t.length)return i;if("zero"===e||"expand"===e)return i;if("silhouette"===e){for(let e=0;e<r;e++){let r=0;for(let i=0;i<t.length;i++)r+=s[t[i]][e];i[e]=-r/2}return i}let n=0;for(let e=1;e<r;e++){let r=0,a=0;for(let i=0;i<t.length;i++){const n=s[t[i]],l=n[e];let o=(l-n[e-1])/2;for(let r=0;r<i;r++){const i=s[t[r]];o+=i[e]-i[e-1]}r+=l,a+=o*l}r&&(n-=a/r),i[e]=n}return i}(u,Y,M,_),I=a.map(()=>null),L=a.map(()=>null);for(let e=0;e<Y.length;e++)I[Y[e]]=new Array(_),L[Y[e]]=new Array(_);for(let e=0;e<_;e++){let t=C[e];for(let s=0;s<Y.length;s++){const r=Y[s],i=I[r],n=L[r];i[e]=t,t+=M[r][e],n[e]=t}}return t.streamgraphData={names:a.map((e,t)=>{var s;return null!=(s=null==e?void 0:e.name)?s:`Series ${t+1}`}),xs:A,values:k,lows:I,highs:L,order:Y,offset:u,hidden:a.map((e,t)=>t).filter(e=>-1!==p.indexOf(e))},a.map((e,t)=>{const s=I[t],r=L[t];if(!s||!r)return o(l({},e),{data:[]});const i=new Array(_);for(let e=0;e<_;e++)i[e]=o(l({},w[e]),{x:A[e],y:[s[e],r[e]]});return o(l({},e),{data:i})})})&&(globalThis[y][b]=v),u.default.registerFeatures({streamgraph:class{constructor(e,t){this.w=e,this.ctx=t,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(e){var t;const s=this.w,r=s.globals,i=s.layout.gridHeight,n=r.maxY-r.minY;if(!n||!isFinite(n))return i/2;const a=(e-r.minY)/n;return(null==(t=s.config.yaxis[0])?void 0:t.reversed)?a*i:i-a*i}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var e,t,s,r,i,n,a;const l=this.w;if(!this.isActive())return;const o=null==(t=null==(e=l.config.plotOptions)?void 0:e.streamgraph)?void 0:t.labels;if(!o||!1===o.show)return;const h=l.dom.elGraphical,u=l.streamgraphData;if(!h||!u)return;this.removeLabels();const d=new c(l,this.ctx),f=d.group({class:"apexcharts-streamgraph-labels"}),p=(null==(s=o.style)?void 0:s.fontSize)||"auto",g=(null==(r=o.style)?void 0:r.fontFamily)||l.config.chart.fontFamily,m=(null==(i=o.style)?void 0:i.fontWeight)||600,x=null==o.minWidth?24:o.minWidth,y=[];for(let e=0;e<u.order.length;e++){const t=u.order[e],s=this._placeLabel(t,{fontSize:p,fontFamily:g,fontWeight:m,minWidth:x,graphics:d});s&&y.push(s)}let b=0;for(const e of this._deconflict(y)){const t=e.k,s=d.drawText({x:e.x,y:e.y,text:e.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:e.fontSize,fontFamily:g,fontWeight:m,foreColor:(null==(a=null==(n=o.style)?void 0:n.colors)?void 0:a[t])||e.color,cssClass:"apexcharts-streamgraph-label"});s.node.setAttribute("data:realIndex",String(t)),f.add(s),b++}if(!b)return;const v=h.node.querySelector(".apexcharts-xaxis");v?h.node.insertBefore(f.node,v):h.add(f),this.holdUntilBandsLand(f)}_placeLabel(e,{fontSize:t,fontFamily:s,fontWeight:r,minWidth:i,graphics:n}){const a=this.w,l=a.streamgraphData,o=l.lows[e],h=l.highs[e];if(!o||!h)return null;const u=a.globals.seriesXvalues[e],c=o.length;if(!Array.isArray(u)||u.length<c||0===c)return null;const d=new Array(c);let f=0;for(let e=0;e<c;e++){const t=Math.abs(this._yPx(h[e])-this._yPx(o[e]));d[e]=t,t>f&&(f=t)}if(f<=0)return null;const p=this._resolveFontSize(t,f),g=String(l.names[e]);let m=p,x=n.getTextRects(g,`${m}px`,s,"",!0,r);if(f<x.height+6)return null;const y=this._widestRun(d,u,x.height+6,c);if(!y)return null;if(x.width>y.width&&"auto"===t){const e=Math.floor(m*(y.width/x.width));if(e<this._autoBounds().min)return null;if(m=e,x=n.getTextRects(g,`${m}px`,s,"",!0,r),f<x.height+6)return null}const b=x.height+6,v=[];for(const t of this._runs(d,b,c)){const r=Number(u[t.l]),a=Number(u[t.r]);if(!isFinite(r)||!isFinite(a))continue;let l=a-r;if(l<=0&&c>1){const e=Math.abs(Number(u[Math.min(t.r+1,c-1)])-Number(u[Math.max(t.l-1,0)]));l=isFinite(e)?e:0}if(l<i||l<.35*x.width)continue;const d=x.width<=l?g:n.getTextBasedOnMaxWidth({text:g,maxWidth:l,fontSize:`${m}px`,fontFamily:s});if(!d||"..."===d)continue;const f=d===g?x.width:x.width*(d.length/g.length),p=[r+l/2];l>2.2*f&&p.push(r+f/2+2,a-f/2-2);for(const s of p){let r=t.l,i=1/0;for(let e=t.l;e<=t.r;e++){const t=Math.abs(Number(u[e])-s);t<i&&(i=t,r=e)}v.push({x:s,y:(this._yPx(o[r])+this._yPx(h[r]))/2,text:d,color:this._contrastOn(e),fontSize:`${m}px`,width:f,height:x.height})}if(v.length>=6)break}return v.length?{k:e,weight:f,candidates:v}:null}_runs(e,t,s){const r=[];let i=0;for(;i<s;){if(e[i]<t){i++;continue}let n=i,a=e[i];for(;n+1<s&&e[n+1]>=t;)n++,e[n]>a&&(a=e[n]);r.push({l:i,r:n,maxT:a}),i=n+1}return r.sort((e,t)=>t.maxT-e.maxT)}_widestRun(e,t,s,r){let i=-1;for(const n of this._runs(e,s,r)){const e=Number(t[n.r])-Number(t[n.l]);isFinite(e)&&e>i&&(i=e)}return i>=0?{width:i}:null}_deconflict(e){const t=e.slice().sort((e,t)=>t.weight-e.weight),s=[],r=e=>!s.some(t=>e.left<t.box.right&&e.right>t.box.left&&e.top<t.box.bottom&&e.bottom>t.box.top);for(const e of t)for(const t of e.candidates){const i={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(r(i)){s.push(o(l({k:e.k},t),{box:i}));break}}return s}_autoBounds(){var e,t;const s=(null==(t=null==(e=this.w.config.plotOptions)?void 0:e.streamgraph)?void 0:t.labels)||{};return{min:null==s.minFontSize?9:s.minFontSize,max:null==s.maxFontSize?30:s.maxFontSize}}_resolveFontSize(e,t){if("auto"!==e){const t=parseFloat(e);return isFinite(t)&&t>0?t:12}const{min:s,max:r}=this._autoBounds();return Math.max(s,Math.min(r,Math.round(.36*t)))}_contrastOn(e){var t;const s=this.w,r=null==(t=s.globals.colors)?void 0:t[e],i="string"==typeof r?d.parseHex(r):null;return i?d.relativeLuminance(i)>.45?"#000000":"#ffffff":s.config.chart.foreColor}removeLabels(){const e=this.w.dom.elGraphical,t=e&&e.node.querySelector(".apexcharts-streamgraph-labels");t&&t.parentNode&&t.parentNode.removeChild(t)}bindHover(){const e=this.w;if(!p.isBrowser())return;if(!1===this._hoverCfg().show)return;const t=e.dom.baseEl&&e.dom.baseEl.querySelector(".apexcharts-svg");t&&!t.__apexStreamHover&&(t.__apexStreamHover=!0,t.addEventListener("mousemove",e=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(e))}),t.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var e,t;return(null==(t=null==(e=this.w.config.plotOptions)?void 0:e.streamgraph)?void 0:t.hover)||{}}_bandAt(e){const t=this.w,s=t.streamgraphData;if(!s||!s.order.length)return-1;const r=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");if(!r)return-1;const i=r.getBoundingClientRect(),n=t.globals.svgWidth?i.width/t.globals.svgWidth:1,a=f.screenXToPlotPx(t,e.clientX),l=(e.clientY-i.top)/(n||1)-t.layout.translateY;if(a<0||a>t.layout.gridWidth)return-1;if(l<0||l>t.layout.gridHeight)return-1;const o=t.globals.seriesXvalues[s.order[0]];if(!Array.isArray(o)||!o.length)return-1;const h=t.interact?t.interact.capturedDataPointIndex:-1;let u=-1;if(h>=0&&h<o.length)u=h;else{let e=1/0;for(let t=0;t<o.length;t++){const s=Math.abs(Number(o[t])-a);s<e&&(e=s,u=t)}}if(u<0)return-1;let c=-1,d=1/0;for(let e=0;e<s.order.length;e++){const t=s.order[e],r=this._yPx(s.highs[t][u]),i=this._yPx(s.lows[t][u]),n=Math.min(r,i),a=Math.max(r,i);if(l>=n&&l<=a)return t;const o=l<n?n-l:l-a;o<d&&(d=o,c=t)}return c}_dim(e){const t=this.w;if(e===this._hovered)return;this._hovered=e;const s=this._hoverCfg(),r=null==s.opacity?.35:s.opacity,i=t.dom.baseEl.querySelectorAll(".apexcharts-series"),n=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),a=(t,s)=>e<0||s===e;for(let e=0;e<i.length;e++){const t=i[e];t.style.transition="opacity .15s ease",t.style.opacity=a(0,Number(t.getAttribute("data:realIndex")))?"":String(r)}for(let e=0;e<n.length;e++){const s=n[e];s.style.transition="opacity .15s ease, fill .15s ease",a(0,Number(s.getAttribute("data:realIndex")))?this._restoreLabel(s):(s.getAttribute("data:fill")||s.setAttribute("data:fill",s.getAttribute("fill")||""),s.setAttribute("fill",t.config.chart.foreColor),s.style.opacity="0.65")}}_restoreLabel(e){const t=e.getAttribute("data:fill");t&&e.setAttribute("fill",t),e.style.opacity=""}clearDim(){this._hovered=-1;const e=this.w;if(!e.dom.baseEl)return;const t=e.dom.baseEl.querySelectorAll(".apexcharts-series");for(let e=0;e<t.length;e++){t[e].style.opacity=""}const s=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let e=0;e<s.length;e++)this._restoreLabel(s[e])}holdUntilBandsLand(e){const t=this.w;p.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}}});const P=u.__apex_CoreUtils,A=u.__apex_Fill,w=u.__apex_DataLabels,_=u.__apex_Markers,S=u.__apex_charts_Scatter,k=u.__apex_Series;class F{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[e]){if(new P(this.lineCtx.w).seriesHaveSameValues(e)){const s=t[e].slice();s[s.length-1]=s[s.length-1]+1e-6,t[e]=s}}return t}calculatePoints({series:e,realIndex:t,x:s,y:r,i:i,j:n,prevY:a}){const l=this.w,o=[],h=[];let u=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(u=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),0===n&&(o.push(u),h.push(d.isNumber(e[i][0])?a+l.config.markers.offsetY:null)),o.push(s+l.config.markers.offsetX),h.push(d.isNumber(e[i][n+1])?r+l.config.markers.offsetY:null),{x:o,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){const n=r.globals.previousPaths[i];("line"===n.type||"area"===n.type)&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(s,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:r,lineYPosition:i,translationsIndex:n}){var a,l,o;const h=this.w,u=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(a=this.w.config.series[t])?void 0:a.type)||"column"===(null==(l=this.w.config.series[t])?void 0:l.type));if(void 0!==(null==(o=s[e])?void 0:o[0])){if(u)if(e>0){const e=this.lineCtx.stackTopAt(t,0);i=void 0===e?this.lineCtx.zeroY:e}else i=this.lineCtx.zeroY;else i=this.lineCtx.zeroY;r=i-s[e][0]/this.lineCtx.yRatio[n]+2*(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[n]:0)}else if(u&&e>0&&void 0===s[e][0])for(let t=e-1;t>=0;t--)if(null!==s[t][0]&&void 0!==s[t][0]){r=i=this.lineCtx.prevSeriesY[t][0];break}return{prevY:r,lineYPosition:i}}}function M(e){let t=(2654435769^e)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}const Y=e=>{const t=function(e){const t=[];let s=e[0],r=e[1],i=t[0]=I(s,r),n=1;for(let a=e.length-1;n<a;n++)s=r,r=e[n+1],t[n]=.5*(i+(i=I(s,r)));return t[n]=i,t}(e),s=e.length-1,r=[];let i,n,a,l;for(let r=0;r<s;r++)a=I(e[r],e[r+1]),Math.abs(a)<1e-6?t[r]=t[r+1]=0:(i=t[r]/a,n=t[r+1]/a,l=i*i+n*n,l>9&&(l=3*a/Math.sqrt(l),t[r]=l*i,t[r+1]=l*n));for(let i=0;i<=s;i++)l=(e[Math.min(s,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([l||0,t[i]*l||0]);return r},C={points(e){const t=Y(e),s=e[1],r=e[0],i=[],n=t[1],a=t[0];i.push(r,[r[0]+a[0],r[1]+a[1],s[0]-n[0],s[1]-n[1],s[0],s[1]]);for(let s=2,r=t.length;s<r;s++){const r=e[s],n=t[s];i.push([r[0]-n[0],r[1]-n[1],r[0],r[1]])}return i},slice(e,t,s){const r=e.slice(t,s);if(t){if(s-t>1&&r[1].length<6){const e=r[0].length;r[1]=[2*r[0][e-2]-r[0][e-4],2*r[0][e-1]-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function I(e,t){return(t[1]-e[1])/(t[0]-e[0])}const L=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function j(e,t){const{ax:s,bx:r,ay:i,by:n}=t,a=[],l=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;null!==(o=l.exec(e));){const e=o[1].toUpperCase(),t=(o[2].match(L)||[]).map(parseFloat);if("Z"===e){a.push("z");continue}if("H"===e){for(const e of t)a.push(`H ${s*e+r}`);continue}if("V"===e){for(const e of t)a.push(`V ${i*e+n}`);continue}if("A"===e){for(let e=0;e+6<t.length;e+=7)a.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${s*t[e+5]+r} ${i*t[e+6]+n}`);continue}const l=[];for(let e=0;e+1<t.length;e+=2)l.push(`${s*t[e]+r} ${i*t[e+1]+n}`);l.length&&a.push(`${e} ${l.join(" ")}`)}return a.join(" ")}const X=u.__apex_BrowserAPIs_BrowserAPIs;function R(e){return-Math.cos(e*Math.PI)/2+.5}function z(e,t,s,r){e=Math.min(Math.max(e,0),1),s=Math.min(Math.max(s,0),1);const i=3*e,n=3*(s-e)-i,a=1-i-n,l=3*t,o=3*(r-t)-l,h=1-l-o,u=e=>((a*e+n)*e+i)*e;return e=>e<=0?0:e>=1?1:(e=>((h*e+o)*e+l)*e)((e=>{let t=0,s=1,r=e;if(r<t)return t;if(r>s)return s;for(;t<s;){const i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:s=r,r=(t+s)/2}return r})(e))}const N=new Map;function D(e){return"function"==typeof e?O(e):(t=e,Array.isArray(t)&&4===t.length&&t.every(e=>"number"==typeof e)?z(e[0],e[1],e[2],e[3]):"string"==typeof e&&N.has(e)?O(N.get(e)):R);var t}function O(e){return t=>{const s=e(t);return"number"==typeof s&&isFinite(s)?s:t}}N.set("linear",e=>e),N.set("easeInOutSine",R),N.set("easeInSine",e=>1-Math.cos(e*Math.PI/2)),N.set("easeOutSine",e=>Math.sin(e*Math.PI/2)),N.set("easeInQuad",e=>e*e),N.set("easeOutQuad",e=>1-(1-e)*(1-e)),N.set("easeInOutQuad",e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2),N.set("easeInCubic",e=>e*e*e),N.set("easeOutCubic",e=>1-Math.pow(1-e,3)),N.set("easeInOutCubic",e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2),N.set("easeOutBack",e=>{const t=1.70158;return 1+2.70158*Math.pow(e-1,3)+t*Math.pow(e-1,2)}),N.set("easeInOutBack",e=>{const t=2.5949095;return e<.5?Math.pow(2*e,2)*(7.189819*e-t)/2:(Math.pow(2*e-2,2)*((t+1)*(2*e-2)+t)+2)/2});const T=u.__apex_PathMorphing_parsePath,W=u.__apex_PathMorphing_arrayToPath;function $(e,t,s){if(!e||"string"!=typeof e)return null;const r=T(e);if(!r.length||"M"!==r[0][0])return null;for(let e=1;e<r.length;e++)if("M"===r[e][0])return null;let i=r,n=null;if(s){if(r.length<5)return null;if(n=r.slice(-3),i=r.slice(0,-3),"Z"!==n[2][0])return null;if("L"!==n[1][0])return null;if("L"!==n[0][0]&&"C"!==n[0][0])return null}else if("Z"===r[r.length-1][0])return null;if(i.length!==t||i.length<2)return null;const a=i[1][0];if("L"!==a&&"C"!==a)return null;for(let e=2;e<i.length;e++)if(i[e][0]!==a)return null;const l=i.map(e=>"C"===e[0]?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(const e of l)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:i,closing:n,segType:a,anchors:l}}function B(e,t,s){return[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s]}function E(e,t,s){const r=e,i=[t[1],t[2]],n=[t[3],t[4]],a=[t[5],t[6]],l=B(r,i,s),o=B(i,n,s),h=B(n,a,s),u=B(l,o,s),c=B(o,h,s),d=B(u,c,s);return{first:["C",l[0],l[1],u[0],u[1],d[0],d[1]],second:["C",c[0],c[1],h[0],h[1],a[0],a[1]],mid:d}}function H(e,t,s){const r=[t[1],t[2]],i=B(e,r,s);return{first:["L",i[0],i[1]],second:["L",r[0],r[1]],mid:i}}function q(e,t){const{body:s,closing:r,segType:i,anchors:n}=e,a=n.length,l=t.length,o=e=>"C"===i?["C",e[0],e[1],e[0],e[1],e[0],e[1]]:["L",e[0],e[1]],h=[["M",n[0][0],n[0][1]]];let u=0;for(;u<l&&0!==t[u];)u++;for(let e=1;e<=u;e++)h.push(o(n[0]));let c=u+1;for(let e=0;e<a-1;e++){let r=0;for(;c+r<l&&-1===t[c+r];)r++;const a=s[e+1];if(r){const t=r+1;let s=n[e],l=a;for(let e=0;e<r;e++){const r=1/(t-e),n="C"===i?E(s,l,r):H(s,l,r);h.push(n.first),s=n.mid,l=n.second}h.push(l)}else h.push(a.slice());c+=r+1}for(;c<l;)h.push(o(n[a-1])),c++;return r&&r.forEach(e=>h.push(e.slice())),h}function V(e,t,s,r,i,n){const a=$(e,r,n);if(!a)return null;const l=$(t,i,n);if(!l)return null;if(a.segType!==l.segType)return null;if((a.closing||l.closing)&&(!a.closing||!l.closing||a.closing[0][0]!==l.closing[0][0]))return null;const o=s.map(e=>e.oldJ),h=s.map(e=>e.newJ);return{from:W(q(a,o)),toInterp:W(q(l,h))}}function J(e){const t=new Map;return e.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),0===s?e:`${e}#${s}`})}function U(e,t,s=!1,r=!1){var i,n;if(!function(e){var t;const s=e.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const r=null!=(t=s.largeDatasetThreshold)?t:0;return!(r>0&&e.globals.dataPoints>r||!(p.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate))}(e))return null;const a=e.globals.prevStreamFrame;if(!a)return null;const l=null==(i=a.seriesY)?void 0:i[t],o=null==(n=e.seriesData.series)?void 0:n[t];if(!Array.isArray(l)||!Array.isArray(o))return null;if(!l.length||!o.length)return null;const h=J(l.map((e,s)=>function(e,t,s){var r,i;if(e.isXNumeric){const i=null==(r=e.seriesX)?void 0:r[t];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const n=null==(i=e.labels)?void 0:i[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(a,t,s))),u=J(o.map((s,r)=>function(e,t,s){var r,i,n,a;if(null==(r=e.axisFlags)?void 0:r.isXNumeric){const r=null==(n=null==(i=e.seriesData)?void 0:i.seriesX)?void 0:n[t];if(r&&r.length&&null!=r[s])return"x:"+r[s]}const l=null==(a=e.globals.labels)?void 0:a[s];return null!=l&&""!==String(l)?"c:"+(Array.isArray(l)?l.join(" "):String(l)):"j:"+s}(e,t,r))),c=function(e,t){const s=new Map;e.forEach((e,t)=>{s.has(e)||s.set(e,t)});const r=new Array(t.length),i=new Set;let n=-1,a=!0,l=e.length===t.length;t.forEach((e,t)=>{const o=s.has(e)&&!i.has(s.get(e))?s.get(e):-1;r[t]=o,-1!==o&&(i.add(o),o<n&&(a=!1),n=o),o!==t&&(l=!1)});const o=[];for(let t=0;t<e.length;t++)i.has(t)||o.push(t);return{toOld:r,exits:o,ordered:a,changed:!l}}(h,u);return(c.ordered||r)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:u}:null}function K(e,t,s,r,i){const n=performance.now(),a=l=>{if(e.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(l-n)/t));r(s(o),o),o<1?X.requestAnimationFrame(a):i&&i()};X.requestAnimationFrame(a)}function Q(e,{elPointsMain:t,realIndex:s,speed:r}){var i,n,a,l;if(!(null==t?void 0:t.node))return!1;const o=U(e,s,!0);if(!o)return!1;const h=e.globals.prevStreamFrame;if(!h)return!1;const u=null==(i=h.xPixels)?void 0:i[s],c=null==(n=h.yPixels)?void 0:n[s];if(!u||!c)return!1;const d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;const f=(null==(a=e.globals.seriesXvalues)?void 0:a[s])||[],p=(null==(l=e.globals.seriesYvalues)?void 0:l[s])||[],g=function(e){var t,s;const r=e.config.chart.animations;return D(null!=(s=null==(t=r.dynamicAnimation)?void 0:t.easing)?s:r.easing)}(e),m=Math.max(1,r||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(t=>{var r,i,n,a,l,d,x,y,b;const v=parseInt(null!=(i=null!=(r=t.getAttribute("j"))?r:t.getAttribute("rel"))?i:"",10);if(!isFinite(v)||v<0||v>=o.join.toOld.length)return;const P=o.join.toOld[v],A=null!=f[v]&&null!=p[v]?[f[v],p[v]]:null;if(-1===P||!A){const s=t.style;return s.opacity="0",void K(e,m,g,e=>{s.opacity=String(e)},()=>{s.opacity=""})}const w=(null!=(n=u[P])?n:NaN)-A[0],_=(null!=(a=c[P])?a:NaN)-A[1];if(!isFinite(w)||!isFinite(_))return;const S=null!=(x=null==(d=null==(l=h.rPixels)?void 0:l[s])?void 0:d[P])?x:NaN,k=parseFloat(null!=(b=null!=(y=t.getAttribute("r"))?y:t.getAttribute("default-marker-size"))?b:""),F=isFinite(S)&&isFinite(k)&&k>0&&Math.abs(S-k)>.25;if(!(Math.abs(w)>=.5||Math.abs(_)>=.5)&&!F)return;const M=e=>{const s=w*(1-e),r=_*(1-e);if(F){const i=(S+(k-S)*e)/k;t.setAttribute("transform",`translate(${s+A[0]*(1-i)}, ${r+A[1]*(1-i)}) scale(${i})`)}else t.setAttribute("transform",`translate(${s}, ${r})`)};M(0),K(e,m,g,M,()=>{t.removeAttribute("transform")})}),!0}function Z(e,{type:t,realIndex:s,pathFromLine:r,pathFromArea:i,linePaths:n,areaPaths:a}){var l,o;const h=U(e,s);if(!h)return null;const{join:u,oldKeys:c,newKeys:d}=h,f=e.globals.prevStreamFrame;if(!f)return null;const p=null==(l=f.seriesY)?void 0:l[s],g=null==(o=e.seriesData.series)?void 0:o[s];if(p.length<2||g.length<2)return null;if(p.some(e=>null===e)||g.some(e=>null===e))return null;const m=function(e,t){const s=new Set(e.exits),r=[];let i=0;for(let t=0;t<e.toOld.length;t++){const n=e.toOld[t];if(-1!==n){for(;i<n;)s.has(i)&&r.push({oldJ:i,newJ:-1}),i++;r.push({oldJ:n,newJ:t}),i=n+1}else r.push({oldJ:-1,newJ:t})}for(;i<t;)s.has(i)&&r.push({oldJ:i,newJ:-1}),i++;return r}(u,c.length),x={};return Array.isArray(n)&&1===n.length&&r&&(x.line=V(r,n[0],m,c.length,d.length,!1)),"area"===t&&Array.isArray(a)&&1===a.length&&i&&(x.area=V(i,a[0],m,c.length,d.length,!0)),x.line||x.area?x:null}class G{constructor(e,t,s,r){this.ctx=t,this.w=e,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||r,this.scatter=new S(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new F(this),this.markers=new _(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(e,t,s,r){var i;const n=this.w,a=new c(this.w),h=n.globals.comboCharts?t:n.config.chart.type,u=a.group({class:`apexcharts-${h}-series apexcharts-plot-series`}),d=new P(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;const f=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);const i=n.globals.comboCharts?s[t]:t,a=this.yRatio.length>1?i:0;this._initSerieVariables(e,t,i);const u=[],c=[],d=[];let p=n.globals.padHorizontal+this.categoryAxisCorrection;const g=1,m=[],x=[];k.addCollapsedClassToSeries(this.w,this.elSeries,i),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(p=(n.seriesData.seriesX[i][0]-n.globals.minX)/this.xRatio),d.push(p);const y=p;let b;const v=y;let P=this.zeroY,A=this.zeroY;const w=0;P=this.lineHelpers.determineFirstPrevY({i:t,realIndex:i,series:e,prevY:P,lineYPosition:w,translationsIndex:a}).prevY,"monotoneCubic"===n.config.stroke.curve&&null===e[t][0]?u.push(null):u.push(P);const _=P;let S;"rangeArea"===h&&(S=this.lineHelpers.determineFirstPrevY({i:t,realIndex:i,series:r,prevY:A,lineYPosition:w,translationsIndex:a}),A=S.prevY,b=A,c.push(null!==u[0]?A:null));const F=this._calculatePathsFrom({type:h,series:e,i:t,realIndex:i,translationsIndex:a,prevX:v,prevY:P,prevY2:A}),M=[u[0]],Y=[c[0]],C={type:h,series:e,realIndex:i,translationsIndex:a,i:t,x:p,y:g,pX:y,pY:_,pathsFrom:F,linePaths:m,areaPaths:x,seriesIndex:s,lineYPosition:w,xArrj:d,yArrj:u,y2Arrj:c,seriesRangeEnd:r},I=this._iterateOverDataPoints(o(l({},C),{iterations:"rangeArea"===h?e[t].length-1:void 0,isRangeStart:!0}));if("rangeArea"===h){const e=this._calculatePathsFrom({series:r,i:t,realIndex:i,prevX:v,prevY:A}),s=this._iterateOverDataPoints(o(l({},C),{series:r,xArrj:[p],yArrj:M,y2Arrj:Y,pY:b,areaPaths:I.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),n=I.linePaths.length/2;for(let e=0;e<n;e++)I.linePaths[e]=s.linePaths[e+n]+I.linePaths[e];I.linePaths.splice(n),I.pathFromLine=s.pathFromLine+I.pathFromLine}else/z\s*$/i.test(I.pathFromArea)||(I.pathFromArea+="z");this._handlePaths({type:h,realIndex:i,i:t,paths:I}),this.markers.flushBatch(this.elPointsMain,i),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),f.push(this.elSeries)}if(void 0!==(null==(i=n.config.series[0])?void 0:i.zIndex)&&f.sort((e,t)=>Number(e.node.getAttribute("zIndex"))-Number(t.node.getAttribute("zIndex"))),n.config.chart.stacked)for(let e=f.length-1;e>=0;e--)u.add(f[e]);else for(let e=0;e<f.length;e++)u.add(f[e]);return u}_initSerieVariables(e,t,s){const r=this.w,i=new c(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-("on"===r.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[s]:r.config.stroke.width;let n=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[s],n=s),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[n]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[n]:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||"end"===r.config.plotOptions.area.fillTo)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const a=r.config.series[s];if(this.elSeries=i.group({class:"apexcharts-series",zIndex:void 0!==a.zIndex?a.zIndex:s,seriesName:d.escapeString(r.seriesData.seriesNames[s])}),this.elPointsMain=i.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,r.globals.hasNullValues){const e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==e&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:"apexcharts-datalabels","data:realIndex":s});const l=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:r,translationsIndex:i,prevX:n,prevY:a,prevY2:l}){const o=this.w,h=new c(this.w);let u,d,f,p;if(null===t[s][0]){for(let e=0;e<t[s].length;e++)if(null!==t[s][e]){n=this.xDivision*e,a=this.zeroY-t[s][e]/this.yRatio[i],u=h.move(n,a),d=h.move(n,this.areaBottomY);break}}else u=h.move(n,a),"rangeArea"===e&&(u=h.move(n,l)+h.line(n,a)),d=h.move(n,this.areaBottomY)+h.line(n,a);if(f=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),p=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),o.globals.previousPaths.length>0){const e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:n,prevY:a,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;const s=this.w.seriesData.seriesX[e];return s?s[t]:void 0}stackTopAt(e,t){const s=this._stackKey(e,t);if(null!=s)return this.prevSeriesYByX.get(s)}_recordStackTops(e,t){const s=this.w;if(Array.isArray(t)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e))for(let s=0;s<t.length;s++){const r=this._stackKey(e,s);if(null==r)continue;const i=t[s];d.isNumber(i)&&this.prevSeriesYByX.set(r,i)}}_handlePaths({type:e,realIndex:t,i:s,paths:r}){var i,n,a,h,u,d,f;const p=this.w,g=new c(this.w),m=function(e,t){const s=e&&e.renderer;return s&&s.kind&&"svg"!==s.kind?s:t}(this.ctx,g),x=new A(this.w);this.prevSeriesY.push(r.yArrj),this._recordStackTops(t,r.yArrj);let y=null;"line"!==e&&"area"!==e||!p.globals.dataChanged||(y=function(e,t,s,r){var i;const n=e.globals,a=n.prevStreamFrame;if(!a||!n.dataChanged||!(null==(i=e.axisFlags)?void 0:i.isXNumeric))return null;const l=a.seriesX[t],o=a.seriesY[t],h=e.seriesData.seriesX[t],u=e.seriesData.series[t];if(!(l&&o&&h&&u))return null;if(l.length<3||h.length<3)return null;let c=-1;for(let e=0;e<l.length;e++)if(l[e]===h[0]){c=e;break}if(-1===c)return null;const d=Math.min(l.length-c,h.length);if(d<2)return null;const f=h.length-d;if(0===c&&0===f)return null;for(let e=0;e<d;e++){if(l[c+e]!==h[e])return null;const t=o[c+e],s=u[e];if(t!==s&&(null!=t||null!=s))return null}const p=a.xPixels[t],g=a.yPixels[t];if(!p||!g)return null;let m=-1,x=-1;for(let e=0;e<d;e++)null!=p[c+e]&&null!=g[c+e]&&null!=s[e]&&null!=r[e]&&(-1===m&&(m=e),x=e);if(-1===m||x<=m)return null;const y=s[m],b=s[x],v=p[c+m],P=p[c+x];if(Math.abs(b-y)<1e-6)return null;const A=(P-v)/(b-y),w=v-A*y;if(!isFinite(A)||!isFinite(w))return null;if(Math.abs(A-1)>.02)return null;if(Math.abs(w)<.5)return null;let _=m,S=m;for(let e=m;e<=x;e++){const t=r[e];null!=t&&null!=g[c+e]&&(t<r[_]&&(_=e),t>r[S]&&(S=e))}let k=1,F=0;const M=r[_],Y=r[S];if(Math.abs(Y-M)>1e-6?(k=(g[c+S]-g[c+_])/(Y-M),F=g[c+_]-k*M):F=g[c+_]-M,!isFinite(k)||!isFinite(F)||k<.2||k>5)return null;const C=Math.floor((m+x)/2);if(C!==m&&C!==x&&null!=s[C]&&null!=p[c+C]){const e=A*s[C]+w;if(Math.abs(e-p[c+C])>1.5)return null;if(null!=r[C]&&null!=g[c+C]){const e=k*r[C]+F;if(Math.abs(e-g[c+C])>1.5)return null}}return n.streamScrolled=!0,{ax:A,bx:w,ay:k,by:F}}(p,t,r.xArrj,r.yArrj));let b=null;y||"line"!==e&&"area"!==e||(b=Z(p,{type:e,realIndex:t,pathFromLine:r.pathFromLine,pathFromArea:r.pathFromArea,linePaths:r.linePaths,areaPaths:r.areaPaths})),p.globals.seriesXvalues[t]=r.xArrj,p.globals.seriesYvalues[t]=r.yArrj;const v=p.config.forecastDataPoints;if(v.count>0&&"rangeArea"!==e){const e=p.globals.seriesXvalues[t][p.globals.seriesXvalues[t].length-v.count-1],s=g.drawRect(e,0,p.layout.gridWidth,p.layout.gridHeight,0);p.dom.elForecastMask.appendChild(s.node);const r=g.drawRect(0,0,e,p.layout.gridHeight,0);p.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart?Q(p,{elPointsMain:this.elPointsMain,realIndex:t,speed:p.config.chart.animations.dynamicAnimation.speed}):(p.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),Q(p,{elPointsMain:this.elPointsMain,realIndex:t,speed:p.config.chart.animations.dynamicAnimation.speed}),U(p,t)&&(null==(i=this.elDataLabelsWrap)?void 0:i.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),p.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const P={i:s,realIndex:t,animationDelay:s,initialSpeed:p.config.chart.animations.speed,dataChangeSpeed:p.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},w=r.numericXY,_="line"===e||"area"===e,S=_&&r.linePaths.length>1?[r.linePaths.join(" ")]:r.linePaths,k=_&&r.areaPaths.length>1?[r.areaPaths.join(" ")]:r.areaPaths;if("area"===e){const e=x.fillPath({seriesNumber:t});for(let t=0;t<k.length;t++){const s=m.renderPaths(o(l({},P),{pathFrom:y?j(r.areaPaths[t],y):null!=(a=null==(n=null==b?void 0:b.area)?void 0:n.from)?a:r.pathFromArea,pathTo:k[t],pathToNumeric:w?{xs:w.xs,ys:w.ys,closeY:w.areaCloseY}:void 0,pathToInterp:null==(h=null==b?void 0:b.area)?void 0:h.toInterp,scrollMorph:!!y,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(s)}}if(p.config.stroke.show&&!this.pointsChart){let i=null;if("line"===e)i=x.fillPath({seriesNumber:t,i:s});else if("solid"===p.config.stroke.fill.type)i=p.globals.stroke.colors[t];else{const e=p.config.fill;p.config.fill=p.config.stroke.fill,i=x.fillPath({seriesNumber:t,i:s}),p.config.fill=e}for(let s=0;s<S.length;s++){let n=i;"rangeArea"===e&&(n=x.fillPath({seriesNumber:t}));const a=o(l({},P),{pathFrom:y?j(r.linePaths[s],y):null!=(d=null==(u=null==b?void 0:b.line)?void 0:u.from)?d:r.pathFromLine,pathTo:S[s],pathToNumeric:w?{xs:w.xs,ys:w.ys}:void 0,pathToInterp:null==(f=null==b?void 0:b.line)?void 0:f.toInterp,scrollMorph:!!y,stroke:i,strokeWidth:this.strokeWidth,strokeLineCap:p.config.stroke.lineCap,fill:"rangeArea"===e?n:"none"}),h=m.renderPaths(a);if(this.elSeries.add(h),h.attr("fill-rule","evenodd"),v.count>0&&"rangeArea"!==e){const e=m.renderPaths(a);e.node.setAttribute("stroke-dasharray",v.dashArray),v.strokeWidth&&e.node.setAttribute("stroke-width",v.strokeWidth),this.elSeries.add(e),e.attr("clip-path",`url(#forecastMask${p.globals.cuid})`),h.attr("clip-path",`url(#nonForecastMask${p.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:r,translationsIndex:i,i:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:f,areaPaths:p,seriesIndex:g,lineYPosition:m,xArrj:x,yArrj:y,y2Arrj:b,isRangeStart:v,seriesRangeEnd:P}){var A,w;const _=this.w,S=new c(this.w),k=this.yRatio;let{prevY:F,linePath:Y,areaPath:C,pathFromLine:I,pathFromArea:L}=u;const j=d.isNumber(_.globals.minYArr[r])?_.globals.minYArr[r]:_.globals.minY;s||(s=_.globals.dataPoints>1?_.globals.dataPoints-1:_.globals.dataPoints);const X=(e,t)=>t-e/k[i]+2*(this.isReversed?e/k[i]:0);let R=l;const z=_.config.chart.stacked&&!_.globals.comboCharts||_.config.chart.stacked&&_.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(A=this.w.config.series[r])?void 0:A.type)||"column"===(null==(w=this.w.config.series[r])?void 0:w.type));let N=_.config.stroke.curve;Array.isArray(N)&&(N=Array.isArray(g)?N[g[n]]:N[n]);let D,O=0;const T=this.pointsChart?this._scatterJitterPx(r):null;if("straight"===N&&!this.pointsChart){const c=this._fastStraightPath({type:e,series:t,i:n,realIndex:r,translationsIndex:i,iterations:s,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:f,areaPaths:p,xArrj:x,yArrj:y,y2Arrj:b,stackSeries:z});if(c)return c}for(let i=0;i<s&&0!==t[n].length;i++){const u=void 0===t[n][i+1]||null===t[n][i+1];if(_.axisFlags.isXNumeric){let e=_.seriesData.seriesX[r][i+1];void 0===_.seriesData.seriesX[r][i+1]&&(e=_.seriesData.seriesX[r][s-1]),a=(e-_.globals.minX)/this.xRatio}else a+=this.xDivision;if(z)if(n>0&&_.globals.collapsedSeries.length<_.config.series.length-1){if((e=>{var t;for(let s=e;s>=0;s--){const e=null!=(t=null==g?void 0:g[s])?t:s;if(-1===_.globals.collapsedSeriesIndices.indexOf(e)&&-1===_.globals.ancillaryCollapsedSeriesIndices.indexOf(e))return s}return-1})(n-1)<0)m=this.zeroY;else{const e=this.stackTopAt(r,i+1);m=void 0===e?this.zeroY:e}}else m=this.zeroY;else m=this.zeroY;u?l=X(j,m):(l=X(t[n][i+1],m),"rangeArea"===e&&(R=X(P[n][i+1],m)));let c=a,d=l;if(T){const e=100003*r+(i+1);T.x&&(c=a+2*(M(7919*e+13)-.5)*T.x),T.y&&(d=l+2*(M(6271*e+97)-.5)*T.y)}x.push(null===t[n][i+1]?null:c),!u||"smooth"!==_.config.stroke.curve&&"monotoneCubic"!==_.config.stroke.curve?(y.push(d),b.push(R)):(y.push(null),b.push(null));const A=this.lineHelpers.calculatePoints({series:t,x:c,y:d,realIndex:r,i:n,j:i,prevY:F}),w=this._createPaths({type:e,series:t,i:n,j:i,x:a,y:l,y2:R,xArrj:x,yArrj:y,y2Arrj:b,pX:o,pY:h,pathState:O,segmentStartX:D,linePath:Y,areaPath:C,linePaths:f,areaPaths:p,curve:N,isRangeStart:v});p=w.areaPaths,f=w.linePaths,o=w.pX,h=w.pY,O=w.pathState,D=w.segmentStartX,C=w.areaPath,Y=w.linePath,!this.appendPathFrom||_.globals.hasNullValues||"monotoneCubic"===N&&"rangeArea"===e||(I+=S.line(a,this.areaBottomY),L+=S.line(a,this.areaBottomY)),this.handleNullDataPoints(t,A,n,i,r),this._handleMarkersAndLabels({type:e,pointsPos:A,i:n,j:i,realIndex:r,isRangeStart:v})}return{yArrj:y,xArrj:x,pathFromArea:L,areaPaths:p,pathFromLine:I,linePaths:f,linePath:Y,areaPath:C}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:r,j:i,realIndex:n}){const a=this.w,l=new w(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:n,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!a.globals.dataChanged&&!a.globals.resized&&!a.globals.markers.batched)&&a.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:n,j:i+1});null!==e&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}const o=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:n,j:i+1});null!==o&&this.elDataLabelsWrap.add(o)}_scatterJitterPx(e){var t;const s=this.w,r=null==(t=s.config.plotOptions.scatter)?void 0:t.jitter;if(!r||!r.enabled||!r.x&&!r.y)return null;const i=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,n=this.yRatio.length>1?e:0,a=this.yRatio[n]?1/this.yRatio[n]:0;return{x:(r.x||0)*i,y:(r.y||0)*a}}_fastStraightPath({type:e,series:t,i:s,realIndex:r,translationsIndex:i,iterations:n,x:a,y:l,pX:o,pY:h,pathsFrom:u,linePaths:c,areaPaths:d,xArrj:f,yArrj:p,y2Arrj:g,stackSeries:m}){const x=this.w;if("line"!==e&&"area"!==e)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[r]>0)return null;const y=t[s],b=y.length;if(!n||b<2||b-1!==n)return null;for(let e=0;e<=n;e++){const t=y[e];if(null==t)return null}const v=x.axisFlags.isXNumeric,P=v?x.seriesData.seriesX[r]:null;if(v&&(!P||P.length<b))return null;const A=this.yRatio[i],w=this.isReversed,_=this.zeroY,S=this.areaBottomY,k=this.xRatio,F=x.globals.minX,M=this.xDivision,Y=x.config.markers.offsetX,C=x.config.markers.offsetY,I=this.appendPathFrom&&!x.globals.hasNullValues;let{pathFromLine:L,pathFromArea:j}=u;const X=this.ctx&&this.ctx.renderer,R=!(!X||!X.kind||"svg"===X.kind),z=!R||x.globals.dataChanged&&!!x.globals.prevStreamFrame,N=R?new Float64Array(b):null,D=R?new Float64Array(b):null;N&&D&&(N[0]=o,D[0]=h),void 0===x.globals.pointsArray[r]&&(x.globals.pointsArray[r]=[]);const O=x.globals.pointsArray[r],T=P?(P[0]-F)/k+Y:this.categoryAxisCorrection+Y;O.push([T,u.prevY+C]);const W=z?new Array(n+1):[];z&&(W[0]="M "+o+" "+h);const $=z&&I?new Array(n):null;let B=a,E=o,H=h;for(let e=0;e<n;e++){P?E=(P[e+1]-F)/k:(B+=M,E=B);const t=y[e+1];H=_-t/A+2*(w?t/A:0),f.push(E),p.push(H),g.push(l),O.push([E+Y,H+C]),z&&(W[e+1]=" L "+E+" "+H,$&&($[e]=" L "+E+" "+S)),N&&D&&(N[e+1]=E,D[e+1]=H)}let q="",V="";if(z&&(q=W.join(""),V=q+" L "+E+" "+S+" L "+o+" "+S+"z"),$){const e=$.join("");L+=e,j+=e}else!z&&I&&(L+=" L "+E+" "+S,j+=" L "+E+" "+S);return c.push(q),d.push(V),{yArrj:p,xArrj:f,pathFromArea:j,areaPaths:d,pathFromLine:L,linePaths:c,linePath:q,areaPath:V,numericXY:N?{xs:N,ys:D,areaCloseY:S}:void 0}}_createPaths({type:e,series:t,i:s,j:r,x:i,y:n,xArrj:a,yArrj:l,y2:o,y2Arrj:h,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:m,linePaths:x,areaPaths:y,curve:b,isRangeStart:v}){const P=new c(this.w),A=this.areaBottomY,w="rangeArea"===e,_="rangeArea"===e&&v;switch(b){case"monotoneCubic":{const e=v?l:h,i=(e,t)=>e.map((e,s)=>[e,t[s]]).filter(e=>null!==e[1]),n=e=>{const t=[];let s=0;return e.forEach(e=>{null!==e?s++:s>0&&(t.push(s),s=0)}),s>0&&t.push(s),t},o=(e,t)=>{const s=n(e),r=[];for(let e=0,i=0;e<s.length;i+=s[e++])r[e]=C.slice(t,i,i+s[e]);return r};switch(f){case 0:if(null===e[r+1])break;f=1;case 1:if(!(w?a.length===t[s].length:r===t[s].length-2))break;case 2:{const t=v?a:a.slice().reverse(),s=v?e:e.slice().reverse(),r=i(t,s),n=r.length>1?C.points(r):r;let l=[];w&&(_?y=r:l=y.reverse());let h=0,u=0;if(o(s,n).forEach(e=>{h++;const t=(e=>{let t="";for(let s=0;s<e.length;s++){const r=e[s],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t})(e),s=u;u+=e.length;const i=u-1;_?g=P.move(r[s][0],r[s][1])+t:w?g=P.move(l[s][0],l[s][1])+P.line(r[s][0],r[s][1])+t+P.line(l[i][0],l[i][1]):(g=P.move(r[s][0],r[s][1])+t,m=g+P.line(r[i][0],A)+P.line(r[s][0],A)+"z",y.push(m)),x.push(g)}),w&&h>1&&!_){const e=x.slice(h).reverse();x.splice(h),e.forEach(e=>x.push(e))}f=0;break}}break}case"smooth":{const e=.35*(i-u);if(null===t[s][r])f=0;else switch(f){case 0:if(p=u,g=_?P.move(u,h[r])+P.line(u,d):P.move(u,d),m=P.move(u,d),null===t[s][r+1]||void 0===t[s][r+1]){x.push(g),y.push(m);break}if(f=1,r<t[s].length-2){const t=P.curve(u+e,d,i-e,n,i,n);g+=t,m+=t;break}case 1:if(null===t[s][r+1])g+=_?P.line(u,o):P.move(u,d),m+=P.line(u,A)+P.line(p,A)+"z",x.push(g),y.push(m),f=-1;else{const a=P.curve(u+e,d,i-e,n,i,n);g+=a,m+=a,r>=t[s].length-2&&(_&&(g+=P.curve(i,n,i,n,i,o)+P.move(i,o)),m+=P.curve(i,n,i,n,i,A)+P.line(p,A)+"z",x.push(g),y.push(m),f=-1)}}u=i,d=n;break}default:{const e=(e,t,s)=>{let r="";switch(e){case"stepline":r=P.line(t,null,"H")+P.line(null,s,"V");break;case"linestep":r=P.line(null,s,"V")+P.line(t,null,"H");break;case"straight":r=P.line(t,s)}return r};if(null===t[s][r])f=0;else switch(f){case 0:if(p=u,g=_?P.move(u,h[r])+P.line(u,d):P.move(u,d),m=P.move(u,d),null===t[s][r+1]||void 0===t[s][r+1]){x.push(g),y.push(m);break}if(f=1,r<t[s].length-2){const t=e(b,i,n);g+=t,m+=t;break}case 1:if(null===t[s][r+1])g+=_?P.line(u,o):P.move(u,d),m+=P.line(u,A)+P.line(p,A)+"z",x.push(g),y.push(m),f=-1;else{const a=e(b,i,n);g+=a,m+=a,r>=t[s].length-2&&(_&&(g+=P.line(i,o)),m+=P.line(i,A)+P.line(p,A)+"z",x.push(g),y.push(m),f=-1)}}u=i,d=n;break}}return{linePaths:x,areaPaths:y,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:m}}handleNullDataPoints(e,t,s,r,i){const n=this.w;if(null===e[s][r]&&n.config.markers.showNullDataPoints||1===e[s].length){let e=this.strokeWidth-n.config.markers.strokeWidth/2;e>0||(e=0);const s=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}u.default.use({line:G,area:G,scatter:G,bubble:G,rangeArea:G}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.default});
|
package/dist/streamgraph.esm.js
CHANGED
package/dist/sunburst.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function t(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const e=t(require("apexcharts/core")),s=e.__apex_Graphics,i=e.__apex_BrowserAPIs_BrowserAPIs,r=e.__apex_Environment_Environment,a=Math.PI/180,o=180/Math.PI;function n(t,e,s,i){return{x:t+s*Math.cos((i-90)*a),y:e+s*Math.sin((i-90)*a)}}const l=t=>`${t.x} ${t.y}`;const c=e.__apex_Animations;function h(t,e,s,i,r,a=null,o={}){var n,l,c;const u=e&&"object"==typeof e,d=u&&null!=(l=null!=(n=e.x)?n:e.name)?l:"",_=Number(u?null!=(c=e.y)?c:e.value:e),p={name:String(d),value:isNaN(_)?null:_,color:u&&e.color?e.color:void 0,_key:`${r}/${s}:${d}`};if(i&&!p.color&&(p.color=i[s%i.length]),o.keepDatum&&(p._datum=e),u&&Array.isArray(e.children)&&e.children.length)p.children=e.children.map((e,s)=>h(t,e,s,null,p._key,a,o));else if(u&&null!=e.drilldown&&!1!==o.expandDrilldown){const s=a||new Set;if(!s.has(e.drilldown)){const i=function(t,e){const s=t.config.drilldown;return(s&&Array.isArray(s.series)?s.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(i&&Array.isArray(i.data)&&i.data.length){const r=new Set(s);r.add(e.drilldown);const a=Array.isArray(i.colors)?i.colors:null;p.children=i.data.map((e,s)=>h(t,e,s,a,p._key,r,o))}}}return p}function u(t){t.children&&t.children.length&&(t.children.forEach(t=>u(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 d(t){if("string"!=typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}const _=Math.PI/180,p=180/Math.PI,f="http://www.w3.org/2000/svg",m="http://www.w3.org/1999/xhtml",g=(t,e,s)=>t+(e-t)*s;e.default.use({sunburst:class{constructor(t,e){this.ctx=e,this.w=t;const s=t.config;this.cfg=s.plotOptions.sunburst,this.strokeWidth=s.stroke.show?s.stroke.width:0,this.strokeColor=Array.isArray(s.stroke.colors)?s.stroke.colors[0]:s.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,i=new s(this.w);this._graphics=i;const r=i.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return r;const a=e.layout.gridWidth,o=e.layout.gridHeight;if(this.centerX=a/2+(this.cfg.offsetX||0),this.centerY=o/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(a,o)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5)return r;if(this._roots=this._buildHierarchy(),!this._roots.length)return r;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"}),r.add(this._ringsG),r.add(this._labelsG),this._focus=null,this._relayout(this._focus);const l=e.config.chart.animations;let c="none";return l.enabled&&(e.globals.dataChanged?l.dynamicAnimation.enabled&&(c="update"):e.globals.resized||(c="intro")),this._applyLayout(c),this._renderBreadcrumb(),r}_buildHierarchy(){return function(t,e={}){const s=t.config.series,i=s&&s[0],r=i&&Array.isArray(i.data)?i.data:s;return Array.isArray(r)?r.map((s,i)=>h(t,s,i,null,"",null,e)):[]}(this.w)}_fillValues(t){u(t)}_validateStrict(){if("strict"!==this.cfg.partition)return;let t=!1;const e=s=>{if(s.children&&s.children.length){const i=s.children.reduce((t,e)=>t+Math.max(0,e.value||0),0);!t&&null!=s.value&&Math.abs(i-s.value)>.5&&(t=!0),s.children.forEach(e)}};this._roots.forEach(e)}_colorPass(t,e){t._color=t.color||e,this._nodesAll.push(t),t.children&&t.children.forEach(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;this._roots.forEach(s=>{const i=(this.endAngle-this.startAngle)*Math.max(0,s.value)/t;this._placeVis(s,0,e,e+i,null),e+=i})}const e=this._parseSize(this.cfg.innerSize,this.maxRadius),s=this._focusMaxDepth+1,i=(this.maxRadius-e)/s,r=s>1?1:0;this._innerR=t=>e+t*i+(t>0?r/2:0),this._outerR=t=>e+(t+1)*i-r/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,s,i,r){if(t._show=!0,t._vDepth=e,t._a0=s,t._a1=i,t._parent=r,t._leaf=!(t.children&&t.children.length),e>this._focusMaxDepth&&(this._focusMaxDepth=e),!t._leaf){const r=t.children.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let a=s;t.children.forEach(o=>{const n=(i-s)*Math.max(0,o.value)/r;this._placeVis(o,e+1,a,a+n,t),a+=n})}}_applyLayout(t){var e;const s=this.w.config.chart.animations,i=s.enabled?"none"===t?0:"update"===t?s.dynamicAnimation.speed||350:s.speed||500:0,r=++this._zoomGen,a=null==(e=this.ctx)?void 0:e.morphTypeChange,o=!!a&&"function"==typeof a.isActive&&a.isActive()&&"function"==typeof a.getInitialPathAt,n=o?a.getSpeed():0;this._morphLeafIndex=0;const l="update"===t?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(e=>{if(e._show){const s={a0:e._a0,a1:e._a1,iR:e._iR,oR:e._oR};e._el||(e._el=this._createArcEl(e));const a=o?this._morphSourceFor(e):null;if(a&&n>0)this._morphArcFrom(e,a,s,n,r);else if(("intro"===t||o)&&i>0)this._sweepArc(e,s,o?n:i,r);else{let t,a=!1;if(e._cur)t=e._cur;else if(l&&l.get(e._key))t=l.get(e._key);else{const e=(s.a0+s.a1)/2;t={a0:e,a1:e,iR:s.iR,oR:s.iR},a=!0}this._animateArc(e,t,s,i,!1,a,r)}}else if(e._el&&e._cur){const t=(e._cur.a0+e._cur.a1)/2,s={a0:t,a1:t,iR:e._cur.iR,oR:e._cur.iR};this._animateArc(e,e._cur,s,i,!0,!1,r)}});const c=new Map;this._nodesAll.forEach(t=>{t._show&&c.set(t._key,{a0:t._a0,a1:t._a1,iR:t._iR,oR:t._oR})}),this.ctx._sunburstPrevGeoms=c,this._renderLabels(i)}_morphSourceFor(t){const e=this.ctx,s=e&&e.morphTypeChange;return s?"function"==typeof s.hasKeyedMarks&&s.hasKeyedMarks()&&"function"==typeof s.getInitialPathForKey?s.getInitialPathForKey(d(t._key)):t.children&&t.children.length?null:s.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,s,i,r){const a=t._el,o=this._arcPath(s.iR,s.oR,s.a0,s.a1,this.cfg.borderRadius);a.node.style.display="",a.attr({d:e,opacity:1}),t._cur=s,this._zoomGen===r&&new c(this.w,this.ctx).morphSVG(a,0,null,t._color,e,o,i,0)}_sweepArc(t,e,s,i){const r=t._el,a=this.cfg.borderRadius,o=this.startAngle,n=this.endAngle;r.node.style.display="",r.attr({d:"",opacity:1}),r.animate(s).during(s=>{if(this._zoomGen!==i)return;const l=o+(n-o)*s;if(l<=e.a0+.01)return void r.attr({d:""});const c=Math.min(e.a1,l);r.attr({d:this._arcPath(e.iR,e.oR,e.a0,c,a)}),t._cur={a0:e.a0,a1:c,iR:e.iR,oR:e.oR}}).after(()=>{this._zoomGen===i&&(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"}),s=e.node;return s.setAttribute("data:name",t.name),s.setAttribute("data:value",String(t.value)),s.setAttribute("data:key",d(t._key)),s.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._attachTooltip(s,t),r.isBrowser()&&(s.addEventListener("click",()=>this._zoomTo(t)),s.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,s,i,r,a,o){const n=t._el,l=this.cfg.borderRadius;if(n.attr({fill:t._color}),0===i)return n.attr({d:this._arcPath(s.iR,s.oR,s.a0,s.a1,l),opacity:r?0:1}),n.node.style.display=r?"none":"",void(t._cur=r?null:s);n.node.style.display="";const c=r?Number(n.attr("opacity"))||1:a?0:1,h=r?0:1;n.attr({opacity:c}),n.animate(i).during(i=>{if(this._zoomGen!==o)return;const r=g(e.a0,s.a0,i),a=g(e.a1,s.a1,i),u=g(e.iR,s.iR,i),d=g(e.oR,s.oR,i);n.attr({d:this._arcPath(u,d,r,a,l),opacity:g(c,h,i)}),t._cur={a0:r,a1:a,iR:u,oR:d}}).after(()=>{this._zoomGen===o&&(r?(n.node.style.display="none",t._cur=null):t._cur=s)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(t=>{t._show&&(t._a1-t._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(t))}),t>0?(e.attr({opacity:0}),e.animate(250,t).attr({opacity:1})):e.attr({opacity:1}))}_renderCurvedLabel(t){if(!r.isBrowser())return;const e=this.cfg.dataLabels.style,s=this.w,a=(t._iR+t._oR)/2,o=(t._a0+t._a1)/2,n=o>90&&o<270,l=Math.min(a>0?4/a*p:0,(t._a1-t._a0)/2),c=n?t._a1-l:t._a0+l,h=n?t._a0+l:t._a1-l,u=this._ptAt(a,c),d=this._ptAt(a,h),_=Math.abs(h-c)>180?1:0,m=n?0:1,g=`apx-sb-lbl-${s.globals.cuid}-${this._lblSeq++}`,b=i.createElementNS(f,"path");b.setAttribute("id",g),b.setAttribute("d",`M ${u.x} ${u.y} A ${a} ${a} 0 ${_} ${m} ${d.x} ${d.y}`),b.setAttribute("fill","none"),b.setAttribute("stroke","none");const y=e.colors,x=(Array.isArray(y)?y[0]:y)||"#fff",A=i.createElementNS(f,"text");A.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&A.setAttribute("font-family",e.fontFamily),A.setAttribute("font-weight",String(e.fontWeight||400)),A.setAttribute("fill",x),A.setAttribute("dominant-baseline","central"),A.style.pointerEvents="none";const v=i.createElementNS(f,"textPath");v.setAttribute("href","#"+g),v.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+g),v.setAttribute("startOffset","50%"),v.setAttribute("text-anchor","middle"),v.textContent=this._truncate(t.name,a,t._a1-t._a0,e.fontSize),A.appendChild(v),this._labelsG.node.appendChild(b),this._labelsG.node.appendChild(A)}_truncate(t,e,s,i){const r=e*s*_-8,a=.58*(parseFloat(i)||12),o=Math.floor(r/a);return o>=t.length?t:o<=1?"":t.slice(0,Math.max(1,o-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(!r.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 s=i.createElementNS(m,"nav");s.setAttribute("class","apexcharts-breadcrumb"),s.setAttribute("aria-label","Sunburst breadcrumb"),s.style.position="absolute",s.style.top="0px",s.style.left="0px";const a=[{name:"All",node:null}].concat(this._focusChain().map(t=>({name:t.name,node:t})));a.forEach((t,e)=>{if(e>0){const t=i.createElementNS(m,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.textContent=" / ",s.appendChild(t)}if(e===a.length-1){const e=i.createElementNS(m,"span");e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.textContent=t.name,s.appendChild(e)}else{const r=i.createElementNS(m,"button");if(r.setAttribute("type","button"),r.setAttribute("class","apexcharts-breadcrumb-item"),0===e){const t=i.createElementNS(m,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.textContent="\u2190",r.appendChild(t)}const a=i.createElementNS(m,"span");a.setAttribute("class","apexcharts-breadcrumb-label"),a.textContent=t.name,r.appendChild(a),r.addEventListener("click",()=>{this._focus=t.node,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb()}),s.appendChild(r)}}),t.appendChild(s),this._avoidChromeOverlap(s)}_avoidChromeOverlap(t){!function(t,e){const s=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!s.length)return;const i=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<s.length+1;t++){const t=e.getBoundingClientRect(),r=s.find(e=>{const s=e.getBoundingClientRect();return t.left<s.right&&t.right>s.left&&t.top<s.bottom&&t.bottom>s.top});if(!r)break;e.style.top=r.getBoundingClientRect().bottom-i+4+"px"}}(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*_),y:this.centerY+t*Math.sin((e-90)*_)}}_arcPath(t,e,s,i,r){if(e<=t+.01)return"";let a=i-s;const c=this.cfg.spacing;if(c>0&&a>0&&e>0){const t=c/e*p,r=Math.min(t/2,Math.max(0,a/2-.25));a=(i-=r)-(s+=r)}if(a<=0)return"";const h=a*_,u=this.centerX,d=this.centerY;let f=r;return f=Math.min(f,h*t/2,h*e/2,(e-t)/2),f>.5?function({cx:t,cy:e,rIn:s,rOut:i,a0:r,a1:a,r:c,spanDeg:h}){const u=(s,i)=>n(t,e,s,i),d=c/i*o,_=c/s*o,p=u(i,r+d),f=u(i,a-d),m=h-2*d>180?1:0,g=u(i,a),b=u(i-c,a),y=u(i,r),x=u(i-c,r),A=u(s,a-_),v=u(s,r+_),w=h-2*_>180?1:0,R=u(s,a),M=u(s+c,a),S=u(s,r),E=u(s+c,r);return["M",l(p),"A",i,i,0,m,1,l(f),"Q",l(g),l(b),"L",l(M),"Q",l(R),l(A),"A",s,s,0,w,0,l(v),"Q",l(S),l(E),"L",l(x),"Q",l(y),l(p),"Z"].join(" ")}({cx:u,cy:d,rIn:t,rOut:e,a0:s,a1:i,r:f,spanDeg:a}):function({cx:t,cy:e,rIn:s,rOut:i,a0:r,a1:a,spanDeg:o}){const c=(s,i)=>n(t,e,s,i),h=o>180?1:0,u=c(i,r),d=c(i,a),_=c(s,a),p=c(s,r);return["M",l(u),"A",i,i,0,h,1,l(d),"L",l(_),"A",s,s,0,h,0,l(p),"Z"].join(" ")}({cx:u,cy:d,rIn:t,rOut:e,a0:s,a1:i,spanDeg:a})}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_attachTooltip(t,e){this.w.config.tooltip.enabled&&r.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 s=this._tip();if(!s)return;const i=this.w,r=(e.value/this.total*100).toFixed(1),a=e._parent?e._parent.value:this.total,o=a>0?(e.value/a*100).toFixed(1):r,n=i.config.tooltip.fillSeriesColor?`background-color:${e._color};`:"";s.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${n}"><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} (${o}% of parent, ${r}% of total)</span></div></div></div>`,s.classList.add("apexcharts-active"),s.style.opacity="1",this._positionTooltip(t)}_positionTooltip(t){const e=this._tip();if(!e)return;const s=this.w.dom.elWrap.getBoundingClientRect(),i=e.offsetWidth,r=e.offsetHeight;let a=t.clientX-s.left+12;a+i>s.width&&(a=t.clientX-s.left-i-12),a=Math.max(0,Math.min(a,s.width-i));let o=t.clientY-s.top+12;o+r>s.height&&(o=t.clientY-s.top-r-12),o=Math.max(0,Math.min(o,s.height-r)),e.style.left=a+"px",e.style.top=o+"px"}_hideTooltip(){const t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}_parseSize(t,e){if("number"==typeof t)return t;const s=String(t).trim();if(s.endsWith("%"))return parseFloat(s)/100*e;const i=parseFloat(s);return isNaN(i)?.15*e:i}_lighten(t,e){if("string"!=typeof t||"#"!==t[0])return t;let s=t.slice(1);if(3===s.length&&(s=s.split("").map(t=>t+t).join("")),6!==s.length)return t;const i=parseInt(s,16);if(isNaN(i))return t;let r=i>>16&255,a=i>>8&255,o=255&i;return r=Math.round(r+(255-r)*e),a=Math.round(a+(255-a)*e),o=Math.round(o+(255-o)*e),"#"+((1<<24)+(r<<16)+(a<<8)+o).toString(16).slice(1)}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>e.default});
|
package/dist/sunburst.esm.js
CHANGED
package/dist/sunburst.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexSunburst={})}(this,function(t){"use strict";const e=globalThis.ApexCharts,s=globalThis.ApexCharts.__internals.__apex_Graphics,i=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,a=globalThis.ApexCharts.__internals.__apex_Environment_Environment,r=Math.PI/180,n=180/Math.PI;function o(t,e,s,i){return{x:t+s*Math.cos((i-90)*r),y:e+s*Math.sin((i-90)*r)}}const l=t=>`${t.x} ${t.y}`;const h=globalThis.ApexCharts.__internals,c=h.__apex_Animations;function u(t,e,s,i,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:"",_=Number(c?null!=(h=e.y)?h:e.value:e),p={name:String(d),value:isNaN(_)?null:_,color:c&&e.color?e.color:void 0,_key:`${a}/${s}:${d}`};if(i&&!p.color&&(p.color=i[s%i.length]),n.keepDatum&&(p._datum=e),c&&Array.isArray(e.children)&&e.children.length)p.children=e.children.map((e,s)=>u(t,e,s,null,p._key,r,n));else if(c&&null!=e.drilldown&&!1!==n.expandDrilldown){const s=r||new Set;if(!s.has(e.drilldown)){const i=function(t,e){const s=t.config.drilldown;return(s&&Array.isArray(s.series)?s.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(i&&Array.isArray(i.data)&&i.data.length){const a=new Set(s);a.add(e.drilldown);const r=Array.isArray(i.colors)?i.colors:null;p.children=i.data.map((e,s)=>u(t,e,s,r,p._key,a,n))}}}return p}function d(t){t.children&&t.children.length&&(t.children.forEach(t=>d(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 _(t){if("string"!=typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}h.__apex_Animations_computeStagger,h.__apex_Animations_applyAnimationPolicy,h.__apex_Animations_prefersReducedMotion,h.__apex_Animations_applyProgressiveReveal;const p=Math.PI/180,f=180/Math.PI,m="http://www.w3.org/2000/svg",g="http://www.w3.org/1999/xhtml",b=(t,e,s)=>t+(e-t)*s;e.use({sunburst:class{constructor(t,e){this.ctx=e,this.w=t;const s=t.config;this.cfg=s.plotOptions.sunburst,this.strokeWidth=s.stroke.show?s.stroke.width:0,this.strokeColor=Array.isArray(s.stroke.colors)?s.stroke.colors[0]:s.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,i=new s(this.w);this._graphics=i;const a=i.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return a;const r=e.layout.gridWidth,n=e.layout.gridHeight;if(this.centerX=r/2+(this.cfg.offsetX||0),this.centerY=n/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(r,n)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5)return a;if(this._roots=this._buildHierarchy(),!this._roots.length)return a;this._roots.forEach(t=>this._fillValues(t)),this._validateStrict(),this._nodesAll=[];const o=e.globals.colors||[];this._roots.forEach((t,e)=>{this._colorPass(t,t.color||o[e%o.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"}),a.add(this._ringsG),a.add(this._labelsG),this._focus=null,this._relayout(this._focus);const l=e.config.chart.animations;let h="none";return l.enabled&&(e.globals.dataChanged?l.dynamicAnimation.enabled&&(h="update"):e.globals.resized||(h="intro")),this._applyLayout(h),this._renderBreadcrumb(),a}_buildHierarchy(){return function(t,e={}){const s=t.config.series,i=s&&s[0],a=i&&Array.isArray(i.data)?i.data:s;return Array.isArray(a)?a.map((s,i)=>u(t,s,i,null,"",null,e)):[]}(this.w)}_fillValues(t){d(t)}_validateStrict(){if("strict"!==this.cfg.partition)return;let t=!1;const e=s=>{if(s.children&&s.children.length){const i=s.children.reduce((t,e)=>t+Math.max(0,e.value||0),0);!t&&null!=s.value&&Math.abs(i-s.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${s.name}" (${s.value}) != sum of its children (${i}). Angles are normalized to fill the wedge.`),t=!0),s.children.forEach(e)}};this._roots.forEach(e)}_colorPass(t,e){t._color=t.color||e,this._nodesAll.push(t),t.children&&t.children.forEach(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;this._roots.forEach(s=>{const i=(this.endAngle-this.startAngle)*Math.max(0,s.value)/t;this._placeVis(s,0,e,e+i,null),e+=i})}const e=this._parseSize(this.cfg.innerSize,this.maxRadius),s=this._focusMaxDepth+1,i=(this.maxRadius-e)/s,a=s>1?1:0;this._innerR=t=>e+t*i+(t>0?a/2:0),this._outerR=t=>e+(t+1)*i-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,s,i,a){if(t._show=!0,t._vDepth=e,t._a0=s,t._a1=i,t._parent=a,t._leaf=!(t.children&&t.children.length),e>this._focusMaxDepth&&(this._focusMaxDepth=e),!t._leaf){const a=t.children.reduce((t,e)=>t+Math.max(0,e.value),0)||1;let r=s;t.children.forEach(n=>{const o=(i-s)*Math.max(0,n.value)/a;this._placeVis(n,e+1,r,r+o,t),r+=o})}}_applyLayout(t){var e;const s=this.w.config.chart.animations,i=s.enabled?"none"===t?0:"update"===t?s.dynamicAnimation.speed||350:s.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 s={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,s,o,a);else if(("intro"===t||n)&&i>0)this._sweepArc(e,s,n?o:i,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=(s.a0+s.a1)/2;t={a0:e,a1:e,iR:s.iR,oR:s.iR},r=!0}this._animateArc(e,t,s,i,!1,r,a)}}else if(e._el&&e._cur){const t=(e._cur.a0+e._cur.a1)/2,s={a0:t,a1:t,iR:e._cur.iR,oR:e._cur.iR};this._animateArc(e,e._cur,s,i,!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(i)}_morphSourceFor(t){const e=this.ctx,s=e&&e.morphTypeChange;return s?"function"==typeof s.hasKeyedMarks&&s.hasKeyedMarks()&&"function"==typeof s.getInitialPathForKey?s.getInitialPathForKey(_(t._key)):t.children&&t.children.length?null:s.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(t,e,s,i,a){const r=t._el,n=this._arcPath(s.iR,s.oR,s.a0,s.a1,this.cfg.borderRadius);r.node.style.display="",r.attr({d:e,opacity:1}),t._cur=s,this._zoomGen===a&&new c(this.w,this.ctx).morphSVG(r,0,null,t._color,e,n,i,0)}_sweepArc(t,e,s,i){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(s).during(s=>{if(this._zoomGen!==i)return;const l=n+(o-n)*s;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===i&&(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"}),s=e.node;return s.setAttribute("data:name",t.name),s.setAttribute("data:value",String(t.value)),s.setAttribute("data:key",_(t._key)),s.setAttribute("data:leaf",String(!(t.children&&t.children.length))),this._attachTooltip(s,t),a.isBrowser()&&(s.addEventListener("click",()=>this._zoomTo(t)),s.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,s,i,a,r,n){const o=t._el,l=this.cfg.borderRadius;if(o.attr({fill:t._color}),0===i)return o.attr({d:this._arcPath(s.iR,s.oR,s.a0,s.a1,l),opacity:a?0:1}),o.node.style.display=a?"none":"",void(t._cur=a?null:s);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(i).during(i=>{if(this._zoomGen!==n)return;const a=b(e.a0,s.a0,i),r=b(e.a1,s.a1,i),u=b(e.iR,s.iR,i),d=b(e.oR,s.oR,i);o.attr({d:this._arcPath(u,d,a,r,l),opacity:b(h,c,i)}),t._cur={a0:a,a1:r,iR:u,oR:d}}).after(()=>{this._zoomGen===n&&(a?(o.node.style.display="none",t._cur=null):t._cur=s)})}_renderLabels(t){const e=this._labelsG;for(;e.node.firstChild;)e.node.removeChild(e.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(t=>{t._show&&(t._a1-t._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(t))}),t>0?(e.attr({opacity:0}),e.animate(250,t).attr({opacity:1})):e.attr({opacity:1}))}_renderCurvedLabel(t){if(!a.isBrowser())return;const e=this.cfg.dataLabels.style,s=this.w,r=(t._iR+t._oR)/2,n=(t._a0+t._a1)/2,o=n>90&&n<270,l=Math.min(r>0?4/r*f:0,(t._a1-t._a0)/2),h=o?t._a1-l:t._a0+l,c=o?t._a0+l:t._a1-l,u=this._ptAt(r,h),d=this._ptAt(r,c),_=Math.abs(c-h)>180?1:0,p=o?0:1,g=`apx-sb-lbl-${s.globals.cuid}-${this._lblSeq++}`,b=i.createElementNS(m,"path");b.setAttribute("id",g),b.setAttribute("d",`M ${u.x} ${u.y} A ${r} ${r} 0 ${_} ${p} ${d.x} ${d.y}`),b.setAttribute("fill","none"),b.setAttribute("stroke","none");const y=e.colors,x=(Array.isArray(y)?y[0]:y)||"#fff",A=i.createElementNS(m,"text");A.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&A.setAttribute("font-family",e.fontFamily),A.setAttribute("font-weight",String(e.fontWeight||400)),A.setAttribute("fill",x),A.setAttribute("dominant-baseline","central"),A.style.pointerEvents="none";const v=i.createElementNS(m,"textPath");v.setAttribute("href","#"+g),v.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+g),v.setAttribute("startOffset","50%"),v.setAttribute("text-anchor","middle"),v.textContent=this._truncate(t.name,r,t._a1-t._a0,e.fontSize),A.appendChild(v),this._labelsG.node.appendChild(b),this._labelsG.node.appendChild(A)}_truncate(t,e,s,i){const a=e*s*p-8,r=.58*(parseFloat(i)||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(!a.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 s=i.createElementNS(g,"nav");s.setAttribute("class","apexcharts-breadcrumb"),s.setAttribute("aria-label","Sunburst breadcrumb"),s.style.position="absolute",s.style.top="0px",s.style.left="0px";const r=[{name:"All",node:null}].concat(this._focusChain().map(t=>({name:t.name,node:t})));r.forEach((t,e)=>{if(e>0){const t=i.createElementNS(g,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.textContent=" / ",s.appendChild(t)}if(e===r.length-1){const e=i.createElementNS(g,"span");e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.textContent=t.name,s.appendChild(e)}else{const a=i.createElementNS(g,"button");if(a.setAttribute("type","button"),a.setAttribute("class","apexcharts-breadcrumb-item"),0===e){const t=i.createElementNS(g,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.textContent="\u2190",a.appendChild(t)}const r=i.createElementNS(g,"span");r.setAttribute("class","apexcharts-breadcrumb-label"),r.textContent=t.name,a.appendChild(r),a.addEventListener("click",()=>{this._focus=t.node,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb()}),s.appendChild(a)}}),t.appendChild(s),this._avoidChromeOverlap(s)}_avoidChromeOverlap(t){!function(t,e){const s=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!s.length)return;const i=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<s.length+1;t++){const t=e.getBoundingClientRect(),a=s.find(e=>{const s=e.getBoundingClientRect();return t.left<s.right&&t.right>s.left&&t.top<s.bottom&&t.bottom>s.top});if(!a)break;e.style.top=a.getBoundingClientRect().bottom-i+4+"px"}}(this.w,t)}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*p),y:this.centerY+t*Math.sin((e-90)*p)}}_arcPath(t,e,s,i,a){if(e<=t+.01)return"";let r=i-s;const h=this.cfg.spacing;if(h>0&&r>0&&e>0){const t=h/e*f,a=Math.min(t/2,Math.max(0,r/2-.25));r=(i-=a)-(s+=a)}if(r<=0)return"";const c=r*p,u=this.centerX,d=this.centerY;let _=a;return _=Math.min(_,c*t/2,c*e/2,(e-t)/2),_>.5?function({cx:t,cy:e,rIn:s,rOut:i,a0:a,a1:r,r:h,spanDeg:c}){const u=(s,i)=>o(t,e,s,i),d=h/i*n,_=h/s*n,p=u(i,a+d),f=u(i,r-d),m=c-2*d>180?1:0,g=u(i,r),b=u(i-h,r),y=u(i,a),x=u(i-h,a),A=u(s,r-_),v=u(s,a+_),w=c-2*_>180?1:0,R=u(s,r),M=u(s+h,r),C=u(s,a),S=u(s+h,a);return["M",l(p),"A",i,i,0,m,1,l(f),"Q",l(g),l(b),"L",l(M),"Q",l(R),l(A),"A",s,s,0,w,0,l(v),"Q",l(C),l(S),"L",l(x),"Q",l(y),l(p),"Z"].join(" ")}({cx:u,cy:d,rIn:t,rOut:e,a0:s,a1:i,r:_,spanDeg:r}):function({cx:t,cy:e,rIn:s,rOut:i,a0:a,a1:r,spanDeg:n}){const h=(s,i)=>o(t,e,s,i),c=n>180?1:0,u=h(i,a),d=h(i,r),_=h(s,r),p=h(s,a);return["M",l(u),"A",i,i,0,c,1,l(d),"L",l(_),"A",s,s,0,c,0,l(p),"Z"].join(" ")}({cx:u,cy:d,rIn:t,rOut:e,a0:s,a1:i,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&&a.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 s=this._tip();if(!s)return;const i=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=i.config.tooltip.fillSeriesColor?`background-color:${e._color};`:"";s.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${o}"><span class="apexcharts-tooltip-marker" style="background-color:${e._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${e.name}: </span><span class="apexcharts-tooltip-text-y-value">${e.value} (${n}% of parent, ${a}% of total)</span></div></div></div>`,s.classList.add("apexcharts-active"),s.style.opacity="1",this._positionTooltip(t)}_positionTooltip(t){const e=this._tip();if(!e)return;const s=this.w.dom.elWrap.getBoundingClientRect(),i=e.offsetWidth,a=e.offsetHeight;let r=t.clientX-s.left+12;r+i>s.width&&(r=t.clientX-s.left-i-12),r=Math.max(0,Math.min(r,s.width-i));let n=t.clientY-s.top+12;n+a>s.height&&(n=t.clientY-s.top-a-12),n=Math.max(0,Math.min(n,s.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 s=String(t).trim();if(s.endsWith("%"))return parseFloat(s)/100*e;const i=parseFloat(s);return isNaN(i)?.15*e:i}_lighten(t,e){if("string"!=typeof t||"#"!==t[0])return t;let s=t.slice(1);if(3===s.length&&(s=s.split("").map(t=>t+t).join("")),6!==s.length)return t;const i=parseInt(s,16);if(isNaN(i))return t;let a=i>>16&255,r=i>>8&255,n=255&i;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<<8)+n).toString(16).slice(1)}}}),t.default=e,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/treemap.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(e,r,o)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,s=(t,e)=>{for(var r in e||(e={}))n.call(e,r)&&i(t,r,e[r]);if(o)for(var r of o(e))a.call(e,r)&&i(t,r,e[r]);return t},l=(t,o)=>e(t,r(o));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const h=c(require("apexcharts/core"));function d(t,e){let r=0;for(let e=0;e<t.length;e++)r+=t[e];const o=e/r,n=new Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e]*o;return n}function u(t,e,r,o){const n=o*o,a=r*r;return Math.max(n*e/a,a/(n*t))}function f(t,e,r,o,n,a){if(0===t)return!0;return u(e,r,o,a)>=u(Math.min(e,n),Math.max(r,n),o+n,a)}function p(t,e,r,o,n,a,i,s){if(i>=s){const i=o/s;let l=a;for(let o=0;o<r;o++){const r=e[o]/i;t.push([n,l,n+i,l+r]),l+=r}}else{const s=o/i;let l=n;for(let o=0;o<r;o++){const r=e[o]/s;t.push([l,a,l+r,a+s]),l+=r}}}function g(t,e,r,o,n){const a=[],i=t.length;if(0===i)return a;const s=new Array(i);let l=0,c=0,h=1/0,d=-1/0,u=0;for(;u<i;){const i=Math.min(o,n),g=t[u];if(f(l,h,d,c,g,i))s[l]=g,l++,c+=g,g<h&&(h=g),g>d&&(d=g),u++;else{if(p(a,s,l,c,e,r,o,n),o>=n){const t=c/n;e+=t,o-=t}else{const t=c/o;r+=t,n-=t}l=0,c=0,h=1/0,d=-1/0}}return l>0&&p(a,s,l,c,e,r,o,n),a}function m(t){const e=t.children;if(e&&e.length){let r=0;for(let t=0;t<e.length;t++)r+=m(e[t]);return t._area=r,r}const r=Number(t.value),o=isNaN(r)?0:Math.abs(r);return t._area=o,o}function b(t,e,r,o,n,a,i,s){const l=t.length;if(0===l||o<=0||n<=0)return;const c=new Array(l);let h=0;for(let e=0;e<l;e++)c[e]=t[e]._area,h+=c[e];if(h<=0)return;const u=g(d(c,o*n),e,r,o,n);for(let e=0;e<l;e++){const r=t[e],o=u[e];if(!o)continue;r.rect=o,r.depth=a;const n=r.children;if(!n||!n.length)continue;const l=o[2]-o[0],c=o[3]-o[1];let h=Math.max(0,i(r,a,l,c)||0);(2*h>=l||2*h>=c)&&(h=0);let d=Math.max(0,s(r,a,l,c)||0);d>0&&c-2*h-d<d&&(d=0),r.headerHeight=d,b(n,o[0]+h,o[1]+d+h,l-2*h,c-d-2*h,a+1,i,s)}}const y={generate:function(t,e,r){const o=t.length,n=new Array(o);for(let e=0;e<o;e++){let r=0;const o=t[e];for(let t=0;t<o.length;t++)r+=o[t];n[e]=r}const a=g(d(n,e*r),0,0,e,r),i=new Array(o);for(let e=0;e<o;e++){const r=a[e],o=r[0],n=r[1],s=r[2]-o,l=r[3]-n;i[e]=g(d(t[e],s*l),o,n,s,l)}return i},generateNested:function(t,e,r,o={}){if(!Array.isArray(t)||0===t.length)return t||[];const n=o.padding||(()=>0),a=o.header||(()=>0);for(let e=0;e<t.length;e++)m(t[e]);return b(t,0,0,e,r,0,n,a),t}},x=h.__apex_Graphics,_=h.__apex_Animations,v=h.__apex_Fill,w=h.__apex_Utils,S=h.__apex_DataLabels,C=(t,e,r,o)=>{if("function"!=typeof t)return t;const n=t({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e});return Number.isFinite(n)?n:0};class A{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const r=t.config.plotOptions[t.config.chart.type];return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(t=>{t.from<=0&&(e=!0)}),e}getShadeColor(t,e,r,o){const n=this.w;let a=1;const i=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||o?a=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*i):(1-s.percent/100)*(1.25*i):s.percent<=0?1-(1+s.percent/100)*i:(1-s.percent/100)*i:(a=1-s.percent/100,"treemap"===t&&(a=(1-s.percent/100)*(1.25*i)));let l=s.color;const c=new w;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){const t=c.shadeColor(-1*a,s.color);l=w.hexToRgba(w.isColorHex(t)?t:w.rgb2hex(t),n.config.fill.opacity)}else{const t=c.shadeColor(a,s.color);l=w.hexToRgba(w.isColorHex(t)?t:w.rgb2hex(t),n.config.fill.opacity)}return{color:l,colorProps:s}}determineColor(t,e,r){const o=this.w,n=o.seriesData.series[e][r],a=o.config.plotOptions[t];let i=a.colorScale.inverse?r:e;a.distributed&&"treemap"===o.config.chart.type&&(i=r);let s,l,c=o.globals.colors[i],h=null;if(a.distributed||"heatmap"!==t){const t=o.seriesData.series[e];s=t.length?t[0]:0,l=s;for(let e=1;e<t.length;e++)t[e]<s&&(s=t[e]),t[e]>l&&(l=t[e])}else s=o.globals.minY,l=o.globals.maxY;const d=a.colorScale.min,u=a.colorScale.max;void 0!==d&&void 0!==u&&u>d?(s=d,l=u):void 0!==d&&(s=d<o.globals.minY?d:o.globals.minY,l=u>o.globals.maxY?u:o.globals.maxY);const f=Math.abs(l)+Math.abs(s),p=Math.min(Math.max(n,s),l);let g=0===f?0:100*p/f;if(a.colorScale.ranges.length>0){a.colorScale.ranges.map(t=>{if(n>=t.from&&n<=t.to){c=t.color,h=t.foreColor?t.foreColor:null,s=t.from,l=t.to;const e=Math.abs(l)+Math.abs(s);g=0===e?0:100*n/e}})}return{color:c,foreColor:h,percent:g}}calculateDataLabels({text:t,x:e,y:r,i:o,j:n,colorProps:a,fontSize:i}){const s=this.w,l=s.config.dataLabels,c=new x(this.w),h=new S(this.w,this.ctx);let d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});const u=C(l.offsetX,s,o,n),f=C(l.offsetY,s,o,n),p=e+u,g=r+parseFloat(l.style.fontSize)/3+f;h.plotDataLabelsText({x:p,y:g,text:t,i:o,j:n,color:a.foreColor,parent:d,fontSize:i,dataLabelsConfig:l})}return d}}const M=h.__apex_Filters,L=h.__apex_Environment_Environment;function P(t,e,r,o,n,a=null,i={}){var s,l,c;const h=e&&"object"==typeof e,d=h&&null!=(l=null!=(s=e.x)?s:e.name)?l:"",u=Number(h?null!=(c=e.y)?c:e.value:e),f={name:String(d),value:isNaN(u)?null:u,color:h&&e.color?e.color:void 0,_key:`${n}/${r}:${d}`};if(o&&!f.color&&(f.color=o[r%o.length]),i.keepDatum&&(f._datum=e),h&&Array.isArray(e.children)&&e.children.length)f.children=e.children.map((e,r)=>P(t,e,r,null,f._key,a,i));else if(h&&null!=e.drilldown&&!1!==i.expandDrilldown){const r=a||new Set;if(!r.has(e.drilldown)){const o=function(t,e){const r=t.config.drilldown;return(r&&Array.isArray(r.series)?r.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(o&&Array.isArray(o.data)&&o.data.length){const n=new Set(r);n.add(e.drilldown);const a=Array.isArray(o.colors)?o.colors:null;f.children=o.data.map((e,r)=>P(t,e,r,a,f._key,n,i))}}}return f}function N(t){t.children&&t.children.length&&(t.children.forEach(t=>N(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 k(t){if("string"!=typeof t)return"";const e=t.indexOf("/");return-1===e?"":t.slice(e)}function E(t){const e=t.globals.treemapRoots;if(e&&e.length)return{roots:e,maxDepth:t.globals.treemapMaxDepth||1,nested:!0};const r=function(t,e,r={}){const o=e||t.config.series;return Array.isArray(o)?o.map((e,o)=>{var n,a;const i=e&&Array.isArray(e.data)?e.data:[],s=`${o}:${null!=(n=null==e?void 0:e.name)?n:""}`;return{name:String(null!=(a=null==e?void 0:e.name)?a:""),value:null,color:(null==e?void 0:e.color)||void 0,_key:s,_seriesIndex:o,children:i.map((e,o)=>P(t,e,o,null,s,null,r))}}):[]}(t,t.config.series,{keepDatum:!0,expandDrilldown:!1});r.forEach(N);const{maxDepth:o}=function(t){const e=[];let r=0;return t.forEach((t,o)=>{const n=[],a=(t,e,i)=>{t._parent=i,t._depth=e,t._si=o,t._leaf=!(t.children&&t.children.length),e>r&&(r=e),t._leaf?(t._di=n.length,n.push(t)):(t._di=-1,t.children.forEach(r=>a(r,e+1,t)))};a(t,0,null),e.push(n)}),{leaves:e,maxDepth:r}}(r);return{roots:r,maxDepth:o,nested:!1}}const F=["#cf4d3f","#8f9499","#26a75b"],O=(t,e,r)=>t+(e-t)*r;function T(t){return Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")}function $(t,e,r){const o=w.parseHex(z(t)),n=w.parseHex(z(e));return o&&n?"#"+T(O(o[0],n[0],r))+T(O(o[1],n[1],r))+T(O(o[2],n[2],r)):t}function z(t){if("string"!=typeof t)return"#000000";if(w.isColorHex(t))return t;return w.rgb2hex(t)||"#000000"}function W(t,e,r,o){var n,a,i;if(!e||"object"!=typeof e)return null;const s=null==(i=null==(a=null==(n=t.config.plotOptions)?void 0:n.treemap)?void 0:a.colorScale)?void 0:i.colorValue;let l;if(l="function"==typeof s?s(e,{seriesIndex:r,dataPointIndex:o,w:t}):"string"==typeof s?e[s]:e.colorValue,null==l)return null;const c=Number(l);return Number.isFinite(c)?c:null}function R(t){var e,r,o;const n=null==(o=null==(r=null==(e=t.config)?void 0:e.plotOptions)?void 0:r.treemap)?void 0:o.colorScale,a=n&&n.gradient;if(!a)return null;if(!1===a.enabled)return null;const i=t.config.series||[];let s=1/0,l=-1/0,c=!1;for(let e=0;e<i.length;e++){const r=i[e]&&i[e].data;if(Array.isArray(r))for(let o=0;o<r.length;o++){const n=W(t,r[o],e,o);null!=n&&(c=!0,n<s&&(s=n),n>l&&(l=n))}}if(!c&&!0!==a.enabled)return null;Number.isFinite(s)||(s=0,l=0);let h=Number.isFinite(Number(a.min))?Number(a.min):s,d=Number.isFinite(Number(a.max))?Number(a.max):l,u=null;if(null===a.midpoint?u=null:Number.isFinite(Number(a.midpoint))?u=Number(a.midpoint):h<0&&d>0&&(u=0),null!=u&&!1!==a.symmetric&&!Number.isFinite(Number(a.min))&&!Number.isFinite(Number(a.max))){const t=Math.max(Math.abs(h-u),Math.abs(d-u));h=u-t,d=u+t}d===h&&(h-=.5,d+=.5);const f=function(t,e,r,o){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:z(t.color)})).sort((t,e)=>t.value-e.value);const n=(Array.isArray(t.colors)&&t.colors.length>=2?t.colors:F).map(z),a=n.length;if(null!=o&&a>=3){const t=Math.floor((a-1)/2),i=[];for(let r=0;r<=t;r++)i.push({value:O(e,o,r/t),color:n[r]});for(let e=t+1;e<a;e++)i.push({value:O(o,r,(e-t)/(a-1-t)),color:n[e]});return i}return n.map((t,o)=>({value:O(e,r,o/(a-1)),color:t}))}(a,h,d,u);if(f.length<2)return null;const p=d-h,g=f.map(t=>({percent:0===p?0:(t.value-h)/p,color:t.color}));return{min:h,max:d,midpoint:u,stops:f,at:t=>{if(!Number.isFinite(t))return f[Math.floor(f.length/2)].color;if(t<=f[0].value)return f[0].color;const e=f[f.length-1];if(t>=e.value)return e.color;for(let e=1;e<f.length;e++){const r=f[e];if(t<=r.value){const o=f[e-1],n=r.value-o.value,a=0===n?0:(t-o.value)/n;return $(o.color,r.color,a)}}return e.color},legendStops:g}}function B(t){const e=z(t);return w.getContrastRatio(e,"#ffffff")>=w.getContrastRatio(e,"#000000")?"#ffffff":"#000000"}const I=h.__apex_BrowserAPIs_BrowserAPIs,D="http://www.w3.org/1999/xhtml";function j(t,e){const r=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return s(s({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},r),e||{})}function Y(t){const e=t.dom.elWrap;if(!e)return;const r=e.querySelector(".apexcharts-breadcrumb");r&&r.parentNode&&r.parentNode.removeChild(r)}h.default.use({treemap:class{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new A(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 r=this.w,o=new x(this.w,this.ctx),n=new v(this.w),a=o.group({class:"apexcharts-treemap"});if(r.globals.noData)return a;t.forEach(t=>{t.map(t=>Math.abs(t))}),this.negRange=this.helpers.checkColorRange(),r.config.series.forEach((t,e)=>{t.data.forEach(t=>{Array.isArray(this.labels[e])||(this.labels[e]=[]),this.labels[e].push(t.x)})});const i=E(r);this.nested=i.nested,this.roots=i.roots,this.scale=R(r);const s=1===i.roots.length?i.roots[0].children||[]:i.roots;this.drawn=s;const l=r.config.plotOptions.treemap.parents;this.showParents=!0===l.show||!1!==l.show&&this.nested;const c=this._resolveFocus(s),h=c?[c]:s;y.generateNested(h,r.layout.gridWidth,r.layout.gridHeight,{padding:(t,e,r,o)=>this.showParents?this._levelPadding(e,r,o):0,header:(t,e,r,o)=>this.showParents?this._levelHeader(t,e,r,o):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 f=this._leavesBySeries(h,r.config.series.length),p=this.showParents?this._parentsBySeries(h,r.config.series.length):[];return f.forEach((e,i)=>{var s;const l=o.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:w.escapeString(r.seriesData.seriesNames[i]),rel:i+1,"data:realIndex":i});if(o.setupEventDelegation(l,".apexcharts-treemap-rect"),r.config.chart.dropShadow.enabled){const t=r.config.chart.dropShadow;new M(this.w).dropShadow(a,t,i)}const c=o.group({class:"apexcharts-data-labels"}),h={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(p[i]||[]).forEach(t=>{this._drawParent(l,t,i)});const d=r.config.chart.animations,f=d.animateGradually,g=f&&!1!==f.enabled,m=new Array(e.length).fill(0);if(g){const t=e.length||1,r=Math.min(f.delay||0,.5*d.speed/t);e.map((t,e)=>{return{j:e,area:t.rect?(r=t.rect,(r[2]-r[0])*(r[3]-r[1])):0};var r}).sort((t,e)=>e.area-t.area).forEach((t,e)=>{m[t.j]=e*r})}e.forEach((e,a)=>{const s=e.rect;if(!s)return;const c=e._di,d=s[0],f=s[1],p=s[2],g=s[3];h.xMin=Math.min(h.xMin,d),h.yMin=Math.min(h.yMin,f),h.xMax=Math.max(h.xMax,p),h.yMax=Math.max(h.yMax,g);const b=this._leafColor(i,c),y=b.color,x=n.fillPath({color:y,seriesNumber:i,dataPointIndex:c}),_=u?this._morphSourceForLeaf(e):null,v=_?o.drawPath({d:this._tilePath(d,f,p,g),fill:"#fff",stroke:r.config.plotOptions.treemap.useFillColorAsStroke?y:r.globals.stroke.colors[i],strokeWidth:this.strokeWidth,fillOpacity:1}):o.drawRect(d,f,p-d,g-f,r.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,r.config.plotOptions.treemap.useFillColorAsStroke?y:r.globals.stroke.colors[i]);v.attr({cx:d,cy:f,index:i,i:i,j:c,width:p-d,height:g-f,fill:x}),v.node.classList.add("apexcharts-treemap-rect"),v.node.setAttribute("data:key",k(e._key));let w={x:d+(p-d)/2,y:f+(g-f)/2,width:0,height:0};const S={x:d,y:f,width:p-d,height:g-f};if(_)this._morphTile(v,_,this._tilePath(d,f,p,g),this.ctx.morphTypeChange.getSpeed(),i,c);else if(r.config.chart.animations.enabled&&!r.globals.dataChanged){let t=1;r.globals.resized||(t=r.config.chart.animations.speed),this.animateTreemap(v,w,S,t,m[a]||0)}if(r.globals.dataChanged){let t=1;this.dynamicAnim.enabled&&r.globals.shouldAnimate&&(t=this.dynamicAnim.speed,r.globals.previousPaths[i]&&r.globals.previousPaths[i][c]&&r.globals.previousPaths[i][c].rect&&(w=r.globals.previousPaths[i][c].rect),this.animateTreemap(v,w,S,t))}let C=this.getFontSize(s);"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(C=parseInt(String(r.config.dataLabels.style.fontSize),10));let A=null;if(r.config.dataLabels.enabled&&this._labelCanShow(C,p-d,g-f)){let e=r.config.dataLabels.formatter(this.labels[i][c],{value:r.seriesData.series[i][c],seriesIndex:i,dataPointIndex:c,w:r});"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(e=this.truncateLabels(String(e),C,d,f,p,g)),r.seriesData.series[i][c]&&(A=this.helpers.calculateDataLabels({text:e,x:(d+p)/2,y:(f+g)/2+this.strokeWidth/2+C/3,i:i,j:c,colorProps:b,fontSize:C,series:t})),r.config.dataLabels.enabled&&A&&this.rotateToFitLabel(A,C,e,d,f,p,g)}l.add(v),null!==A&&l.add(A)});const b=r.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&r.config.series.length>1&&b&&b.show){const t=r.config.series[i].name||"";if(t&&h.xMin<1/0&&h.yMin<1/0){const{offsetX:e,offsetY:n,borderColor:a,borderWidth:i,borderRadius:c,style:d}=b,u=d.color||r.config.chart.foreColor,f={left:d.padding.left,right:d.padding.right,top:d.padding.top,bottom:d.padding.bottom},p=o.getTextRects(t,d.fontSize,d.fontFamily),g=p.width+f.left+f.right,m=p.height+f.top+f.bottom,y=h.xMin+(e||0),x=h.yMin+(n||0),_=o.drawRect(y,x,g,m,c,d.background,1,i,a),v=o.drawText({x:y+f.left,y:x+f.top+.75*(null!=(s=null==p?void 0:p.height)?s:0),text:t,fontSize:d.fontSize,fontFamily:d.fontFamily,fontWeight:d.fontWeight,foreColor:u,cssClass:d.cssClass||""});l.add(_),l.add(v)}}l.add(c),a.add(l)}),this._renderBreadcrumb(),a}_levelCfg(t){if(this._levelCache||(this._levelCache=[]),this._levelCache[t])return this._levelCache[t];const e=this.w.config.plotOptions.treemap,r=e.parents||{},o=(e.levels||[])[t]||{},n=l(s(s({},r),o),{header:l(s(s({},r.header||{}),o.header||{}),{style:s(s({},(r.header||{}).style||{}),(o.header||{}).style||{})}),hover:s(s({},r.hover||{}),o.hover||{})});return this._levelCache[t]=n,n}_levelPadding(t,e,r){const o=this._levelCfg(t);return Number(o.padding)||0}_levelHeader(t,e,r,o){const n=this._levelCfg(e).header||{};if(!1===n.show)return 0;const a=Number(n.height);if(!Number.isFinite(a)||a<=0)return 0;return r<(Number(n.minWidth)||40)||o<2*a?0:a}_leavesBySeries(t,e){const r=new Array(Math.max(1,e));for(let t=0;t<r.length;t++)r[t]=[];const o=t=>{if(t.children&&t.children.length)t.children.forEach(o);else{const e=t._si||0;r[e]&&r[e].push(t)}};return t.forEach(o),r}_parentsBySeries(t,e){const r=new Array(Math.max(1,e));for(let t=0;t<r.length;t++)r[t]=[];const o=t=>{if(!t.children||!t.children.length)return;const e=t._si||0;r[e]&&r[e].push(t),t.children.forEach(o)};return t.forEach(o),r.forEach(t=>t.sort((t,e)=>(t.depth||0)-(e.depth||0))),r}_leafColor(t,e){const r=this.w;if(this.scale){const o=function(t,e,r){const o=t.config.series[e];return W(t,o&&Array.isArray(o.data)?o.data[r]:null,e,r)}(r,t,e);if(null!=o){const t=this.scale.at(o);return{color:t,foreColor:B(t),colorProps:{color:t,foreColor:B(t),percent:0}}}}return this.helpers.getShadeColor(r.config.chart.type,t,e,this.negRange)}_parentChrome(t){const e=this.w,r=this._levelCfg(t),o="dark"===e.config.theme.mode,n=(r.header||{}).style||{},a=Math.min(t,3),i=o?255:0,s=`${i},${i},${i}`;return{fill:r.fill||`rgba(${s},${(o?.04:.03)+.02*a})`,fillOpacity:null==r.fillOpacity?1:r.fillOpacity,borderColor:r.borderColor||`rgba(${s},${o?.18:.14})`,borderWidth:null==r.borderWidth?1:r.borderWidth,borderRadius:null==r.borderRadius?e.config.plotOptions.treemap.borderRadius:r.borderRadius,headerBg:n.background||`rgba(${s},${o?.1:.07})`,headerColor:n.color||(o?"#e8e8e8":e.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||e.config.chart.fontFamily,headerFontWeight:null==n.fontWeight?600:n.fontWeight,hoverColor:r.hover&&r.hover.color||(o?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:r.hover&&r.hover.width||2,hoverShow:!(r.hover&&!1===r.hover.show)}}_drawParent(t,e,r){var o;const n=e.rect;if(!n)return;const a=this.w,i=new x(this.w,this.ctx),s=e.depth||0,l=this._levelCfg(s),c=this._parentChrome(s),h=n[0],d=n[1],u=n[2]-n[0],f=n[3]-n[1];if(u<=0||f<=0)return;const p=i.group({class:"apexcharts-treemap-parent","data:depth":s,"data:name":w.escapeString(e.name)}),g=k(e._key),m=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(g):null,b=m?i.drawPath({d:this._tilePath(h,d,h+u,d+f),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):i.drawRect(h,d,u,f,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);b.node.classList.add("apexcharts-treemap-parent-rect"),b.node.setAttribute("data:key",g),b.node.setAttribute("data:depth",String(s)),m&&this._morphTile(b,m,this._tilePath(h,d,h+u,d+f),this.ctx.morphTypeChange.getSpeed(),r,s),p.add(b);const y=e.headerHeight||0;let _="";if(y>0){const t=l.header||{},n=i.drawRect(h,d,u,y,0,c.headerBg,1,0,"transparent");n.node.classList.add("apexcharts-treemap-parent-header"),p.add(n);let f=String(null!=(o=e.name)?o:"");"function"==typeof t.formatter?f=String(t.formatter(e.name,{value:e.value,depth:s,seriesIndex:r,node:e,w:a})):t.showValue&&(f=`${f} ${this._formatValue(e.value)}`),_=f;const g=Number(t.offsetX)||0,m=t.align||"left",x=6,v=Math.max(0,u-2*x-Math.abs(g)),w=parseFloat(String(c.headerFontSize))||12,S=i.getTextBasedOnMaxWidth({text:f,maxWidth:v,fontSize:w});if(S){let e=h+x+g,r="start";"center"===m?(e=h+u/2+g,r="middle"):"right"===m&&(e=h+u-x+g,r="end");const o=i.drawText({x:e,y:d+y/2+w/3+(Number(t.offsetY)||0),text:S,textAnchor:r,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${t.style&&t.style.cssClass||""}`});o.node.setAttribute("pointer-events","none"),p.add(o)}this._attachParentEvents(n.node,e,c,b),this._makeParentAccessible(n.node,e,c,b,_)}this._attachParentEvents(b.node,e,c,b),p.node.setAttribute("role","group"),p.node.setAttribute("aria-label",this._parentLabel(e,_)),t.add(p)}_parentLabel(t,e){const r=this._drawnTotal(),o=r>0?(t._area/r*100).toFixed(1):"0",n=this._countLeaves(t);return`${e&&String(e).trim()?String(e).replace(/\s+/g," ").trim():`${t.name}, ${this._formatValue(t._area)}`}, ${n} ${1===n?"item":"items"}, ${o}% of total`}_makeParentAccessible(t,e,r,o,n){t&&t.setAttribute&&this._zoomEnabled()&&(t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`${this._parentLabel(e,n)}. Zoom in`),t.setAttribute("aria-expanded","false"),L.isBrowser()&&t.addEventListener&&(t.addEventListener("focus",()=>{o.node.setAttribute("stroke",r.hoverColor),o.node.setAttribute("stroke-width",String(r.hoverWidth+1))}),t.addEventListener("blur",()=>{o.node.setAttribute("stroke",r.borderColor),o.node.setAttribute("stroke-width",String(r.borderWidth))}),t.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),this._zoomTo(e,!0))})))}_attachParentEvents(t,e,r,o){if(!L.isBrowser()||!t||!t.addEventListener)return;const n=this.w;r.hoverShow&&(t.addEventListener("mouseenter",()=>{o.node.setAttribute("stroke",r.hoverColor),o.node.setAttribute("stroke-width",String(r.hoverWidth))}),t.addEventListener("mouseleave",()=>{o.node.setAttribute("stroke",r.borderColor),o.node.setAttribute("stroke-width",String(r.borderWidth))})),n.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 r=t.config.drilldown;return!(r&&r.enabled&&Array.isArray(r.series)&&r.series.length)||(this._warnedZoomConflict||(this._warnedZoomConflict=!0),!1)}_resolveFocus(t){const e=this.w.globals.treemapFocusKey;if(!e||!this._zoomEnabled())return null;let r=null;const o=t=>{r||(t._key!==e?t.children&&t.children.forEach(o):r=t)};return t.forEach(o),r&&r.children&&r.children.length?r:null}_zoomTo(t,e=!1){const r=this.w;if(!t||!t.children||!t.children.length)return;const o=r.globals.treemapFocusKey===t._key?null:t._key;r.globals.treemapFocusKey=o,this._hideParentTooltip();const n=this.ctx.update();e&&n&&"function"==typeof n.then&&n.then(()=>{if(!L.isBrowser())return;const t=r.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(t&&t.focus)return void t.focus();const e=r.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");e&&e.focus&&e.focus()})}_focusChain(){const t=[],e=new Set(this.drawn||[]);let r=this._resolveFocus(this.drawn||[]);for(;r&&(t.unshift(r),!e.has(r));)r=r._parent;return t}_breadcrumbCfg(){const t=this.w.config.plotOptions.treemap.zoom;return j(this.w,t&&t.breadcrumb)}_renderBreadcrumb(){if(!L.isBrowser())return;const t=this.w;if(!t.dom.elWrap)return;if(Y(t),!this._zoomEnabled())return;const e=this._focusChain();if(!e.length)return;const r=function(t,e){if(!L.isBrowser())return null;const r=t.dom.elWrap;if(!r)return null;Y(t);const o=e.config||j(t);if(!1===o.show)return null;const n=e.crumbs||[];if(n.length<2)return null;const a=I.createElementNS(D,"nav");a.setAttribute("class","apexcharts-breadcrumb"),a.setAttribute("aria-label",e.ariaLabel||"Breadcrumb"),function(t,e){const r=e.offsetX||0,o=e.offsetY||0;t.style.position="absolute",t.style.top=o+"px","top-right"===e.position?t.style.right=3-r+"px":t.style.left=r+"px"}(a,o),e.compact&&(a.style.fontSize="11px",a.style.padding="0 2px");const i=null!=o.separator?o.separator:" / ";return n.forEach((t,r)=>{var s;if(r>0){const t=I.createElementNS(D,"span");t.setAttribute("class","apexcharts-breadcrumb-separator"),t.setAttribute("aria-hidden","true"),t.textContent=i,a.appendChild(t)}let l=0===r?null!=(s=o.rootLabel)?s:"All":t.label;if("function"==typeof o.formatter&&(l=o.formatter(l,{index:r,depth:n.length-1,data:t.data})),r===n.length-1){const t=I.createElementNS(D,"span");return t.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),t.setAttribute("aria-current","page"),t.textContent=String(l),void a.appendChild(t)}const c=I.createElementNS(D,"button");if(c.setAttribute("type","button"),c.setAttribute("class","apexcharts-breadcrumb-item"),0===r){const t=I.createElementNS(D,"span");t.setAttribute("class","apexcharts-breadcrumb-arrow"),t.setAttribute("aria-hidden","true"),t.textContent="\u2190",c.appendChild(t)}const h=I.createElementNS(D,"span");h.setAttribute("class","apexcharts-breadcrumb-label"),h.textContent=String(l),c.appendChild(h),c.addEventListener("click",()=>e.onNavigate(r,t)),a.appendChild(c)}),r.appendChild(a),a}(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,r)=>{t.globals.treemapFocusKey=r.data?r.data._key:null,this._hideParentTooltip(),this.ctx.update()}});r&&(this._placeBreadcrumb(r),function(t,e){const r=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!r.length)return;const o=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<r.length+1;t++){const t=e.getBoundingClientRect(),n=r.find(e=>{const r=e.getBoundingClientRect();return t.left<r.right&&t.right>r.left&&t.top<r.bottom&&t.bottom>r.top});if(!n)break;e.style.top=n.getBoundingClientRect().bottom-o+4+"px"}}(t,r))}_placeBreadcrumb(t){var e,r;const o=this.w,n=o.layout.translateY||0,a=null==(r=null==(e=this.ctx)?void 0:e.dimensions)?void 0:r.dimHelpers,i=a?a.getTitleSubtitleCoords("title").height+a.getTitleSubtitleCoords("subtitle").height:0,s=t.getBoundingClientRect().height||18;if(n-i>=s+1)return void(t.style.top=n-s-1+"px");t.style.top=`${i}px`;const l="dark"===o.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 r=this.w,o=this._tip();if(!o)return;const n=this._drawnTotal(),a=e._parent?e._parent._area:n,i=n>0?(e._area/n*100).toFixed(1):"0.0",s=a>0?(e._area/a*100).toFixed(1):i,l=this.w.config.plotOptions.treemap.parents,c=l&&l.tooltip&&l.tooltip.formatter,h=this._countLeaves(e);let d;if("function"==typeof c)d=c({name:e.name,value:e._area,depth:e.depth||0,leafCount:h,percentOfParent:Number(s),percentOfTotal:Number(i),node:e,w:r});else{const t=this._parentChrome(e.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${t};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${w.escapeString(e.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(e._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${h} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${i}% of total</span></div></div></div>`}o.innerHTML=d,o.classList.add("apexcharts-active"),o.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 r=this.w.dom.elWrap.getBoundingClientRect(),o=e.offsetWidth,n=e.offsetHeight;let a=t.clientX-r.left+12;a+o>r.width&&(a=t.clientX-r.left-o-12),a=Math.max(0,Math.min(a,r.width-o));let i=t.clientY-r.top+12;i+n>r.height&&(i=t.clientY-r.top-n-12),i=Math.max(0,Math.min(i,r.height-n)),e.style.left=a+"px",e.style.top=i+"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)=>t+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 r=0;r<e.length;r++)t+=this._subtreeArea(e[r]);return t}const r=Number(t.value);return isNaN(r)?0:Math.abs(r)}_countLeaves(t){return t.children&&t.children.length?t.children.reduce((t,e)=>t+this._countLeaves(e),0):1}_formatValue(t){var e,r,o,n,a;const i=this.w,s=(null==(r=null==(e=i.config.tooltip)?void 0:e.y)?void 0:r.formatter)||(null==(a=null==(n=null==(o=i.config.yaxis)?void 0:o[0])?void 0:n.labels)?void 0:a.formatter);if("function"==typeof s)try{return String(s(t,{seriesIndex:0,dataPointIndex:0,w:i}))}catch(t){}return String(t)}_labelCanShow(t,e,r){if(!Number.isFinite(t)||t<=0)return!1;const o=this.w.config.plotOptions.treemap.dataLabels;return!(t<(o&&null!=o.minFontSize?Number(o.minFontSize):0))&&Math.max(e,r)>=t}_averageLabelSize(){if(null!=this._avgLabelSize)return this._avgLabelSize;return this._avgLabelSize=function t(e){let r,o=0;if(Array.isArray(e[0]))for(r=0;r<e.length;r++)o+=t(e[r]);else for(r=0;r<e.length;r++)o+=e[r].length;return o}(this.labels)/function t(e){let r,o=0;if(Array.isArray(e[0]))for(r=0;r<e.length;r++)o+=t(e[r]);else for(r=0;r<e.length;r++)o+=1;return o}(this.labels),this._avgLabelSize}getFontSize(t){const e=this.w,r=this._averageLabelSize();return function(t,o){const n=t*o,a=Math.pow(n,.5);return Math.min(a/r,parseInt(e.config.dataLabels.style.fontSize,10))}(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,r,o,n,a,i){const s=new x(this.w),l=s.getTextRects(r,String(e));if(l.width+this.w.config.stroke.width+5>a-o&&l.width<=i-n){const e=s.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${e.x} ${e.y}) translate(${l.height/3})`)}}truncateLabels(t,e,r,o,n,a){const i=new x(this.w),s=i.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>n-r&&a-o>n-r?a-o:n-r,l=i.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/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 r=null==(e=this.ctx)?void 0:e.morphTypeChange;if(!r||"function"!=typeof r.getInitialPathAt)return null;if(this._morphKeyed()){const e=r.getInitialPathForKey(k(t._key));if(e)return e}return r.getInitialPathAt(this._morphLeafIndex++)}_tilePath(t,e,r,o){return`M ${t} ${e} L ${r} ${e} L ${r} ${o} L ${t} ${o} Z`}_morphTile(t,e,r,o,n,a){new _(this.w,this.ctx).morphSVG(t,n,a,"none",e,r,o,0)}animateTreemap(t,e,r,o,n=0){const a=new _(this.w);a.animateRect(t,e,r,o,()=>{a.animationCompleted(t)},n)}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>h.default});
|
package/dist/treemap.esm.js
CHANGED
package/dist/treemap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexTreemap={})}(this,function(e){"use strict";var t=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(e,r,o)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,l=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&s(e,r,t[r]);if(n)for(var r of n(t))i.call(t,r)&&s(e,r,t[r]);return e},h=(e,t)=>r(e,o(t));const c=globalThis.ApexCharts;function d(e,t){let r=0;for(let t=0;t<e.length;t++)r+=e[t];const o=t/r,n=new Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]*o;return n}function u(e,t,r,o){const n=o*o,a=r*r;return Math.max(n*t/a,a/(n*e))}function p(e,t,r,o,n,a){if(0===e)return!0;return u(t,r,o,a)>=u(Math.min(t,n),Math.max(r,n),o+n,a)}function f(e,t,r,o,n,a,i,s){if(i>=s){const i=o/s;let l=a;for(let o=0;o<r;o++){const r=t[o]/i;e.push([n,l,n+i,l+r]),l+=r}}else{const s=o/i;let l=n;for(let o=0;o<r;o++){const r=t[o]/s;e.push([l,a,l+r,a+s]),l+=r}}}function g(e,t,r,o,n){const a=[],i=e.length;if(0===i)return a;const s=new Array(i);let l=0,h=0,c=1/0,d=-1/0,u=0;for(;u<i;){const i=Math.min(o,n),g=e[u];if(p(l,c,d,h,g,i))s[l]=g,l++,h+=g,g<c&&(c=g),g>d&&(d=g),u++;else{if(f(a,s,l,h,t,r,o,n),o>=n){const e=h/n;t+=e,o-=e}else{const e=h/o;r+=e,n-=e}l=0,h=0,c=1/0,d=-1/0}}return l>0&&f(a,s,l,h,t,r,o,n),a}function m(e){const t=e.children;if(t&&t.length){let r=0;for(let e=0;e<t.length;e++)r+=m(t[e]);return e._area=r,r}const r=Number(e.value),o=isNaN(r)?0:Math.abs(r);return e._area=o,o}function b(e,t,r,o,n,a,i,s){const l=e.length;if(0===l||o<=0||n<=0)return;const h=new Array(l);let c=0;for(let t=0;t<l;t++)h[t]=e[t]._area,c+=h[t];if(c<=0)return;const u=g(d(h,o*n),t,r,o,n);for(let t=0;t<l;t++){const r=e[t],o=u[t];if(!o)continue;r.rect=o,r.depth=a;const n=r.children;if(!n||!n.length)continue;const l=o[2]-o[0],h=o[3]-o[1];let c=Math.max(0,i(r,a,l,h)||0);(2*c>=l||2*c>=h)&&(c=0);let d=Math.max(0,s(r,a,l,h)||0);d>0&&h-2*c-d<d&&(d=0),r.headerHeight=d,b(n,o[0]+c,o[1]+d+c,l-2*c,h-d-2*c,a+1,i,s)}}const _={generate:function(e,t,r){const o=e.length,n=new Array(o);for(let t=0;t<o;t++){let r=0;const o=e[t];for(let e=0;e<o.length;e++)r+=o[e];n[t]=r}const a=g(d(n,t*r),0,0,t,r),i=new Array(o);for(let t=0;t<o;t++){const r=a[t],o=r[0],n=r[1],s=r[2]-o,l=r[3]-n;i[t]=g(d(e[t],s*l),o,n,s,l)}return i},generateNested:function(e,t,r,o={}){if(!Array.isArray(e)||0===e.length)return e||[];const n=o.padding||(()=>0),a=o.header||(()=>0);for(let t=0;t<e.length;t++)m(e[t]);return b(e,0,0,t,r,0,n,a),e}},x=globalThis.ApexCharts.__internals.__apex_Graphics,y=globalThis.ApexCharts.__internals,v=y.__apex_Animations;y.__apex_Animations_computeStagger,y.__apex_Animations_applyAnimationPolicy,y.__apex_Animations_prefersReducedMotion,y.__apex_Animations_applyProgressiveReveal;const w=globalThis.ApexCharts.__internals.__apex_Fill,A=globalThis.ApexCharts.__internals.__apex_Utils,C=globalThis.ApexCharts.__internals.__apex_DataLabels,S=(e,t,r,o)=>{if("function"!=typeof e)return e;const n=e({series:t.seriesData.series,seriesIndex:r,dataPointIndex:o,w:t});return Number.isFinite(n)?n:0};class M{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const r=e.config.plotOptions[e.config.chart.type];return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,r,o){const n=this.w;let a=1;const i=n.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,r);n.globals.hasNegs||o?a=n.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*i):(1-s.percent/100)*(1.25*i):s.percent<=0?1-(1+s.percent/100)*i:(1-s.percent/100)*i:(a=1-s.percent/100,"treemap"===e&&(a=(1-s.percent/100)*(1.25*i)));let l=s.color;const h=new A;if(n.config.plotOptions[e].enableShades)if("dark"===this.w.config.theme.mode){const e=h.shadeColor(-1*a,s.color);l=A.hexToRgba(A.isColorHex(e)?e:A.rgb2hex(e),n.config.fill.opacity)}else{const e=h.shadeColor(a,s.color);l=A.hexToRgba(A.isColorHex(e)?e:A.rgb2hex(e),n.config.fill.opacity)}return{color:l,colorProps:s}}determineColor(e,t,r){const o=this.w,n=o.seriesData.series[t][r],a=o.config.plotOptions[e];let i=a.colorScale.inverse?r:t;a.distributed&&"treemap"===o.config.chart.type&&(i=r);let s,l,h=o.globals.colors[i],c=null;if(a.distributed||"heatmap"!==e){const e=o.seriesData.series[t];s=e.length?e[0]:0,l=s;for(let t=1;t<e.length;t++)e[t]<s&&(s=e[t]),e[t]>l&&(l=e[t])}else s=o.globals.minY,l=o.globals.maxY;const d=a.colorScale.min,u=a.colorScale.max;void 0!==d&&void 0!==u&&u>d?(s=d,l=u):void 0!==d&&(s=d<o.globals.minY?d:o.globals.minY,l=u>o.globals.maxY?u:o.globals.maxY);const p=Math.abs(l)+Math.abs(s),f=Math.min(Math.max(n,s),l);let g=0===p?0:100*f/p;if(a.colorScale.ranges.length>0){a.colorScale.ranges.map(e=>{if(n>=e.from&&n<=e.to){h=e.color,c=e.foreColor?e.foreColor:null,s=e.from,l=e.to;const t=Math.abs(l)+Math.abs(s);g=0===t?0:100*n/t}})}return{color:h,foreColor:c,percent:g}}calculateDataLabels({text:e,x:t,y:r,i:o,j:n,colorProps:a,fontSize:i}){const s=this.w,l=s.config.dataLabels,h=new x(this.w),c=new C(this.w,this.ctx);let d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});const u=S(l.offsetX,s,o,n),p=S(l.offsetY,s,o,n),f=t+u,g=r+parseFloat(l.style.fontSize)/3+p;c.plotDataLabelsText({x:f,y:g,text:e,i:o,j:n,color:a.foreColor,parent:d,fontSize:i,dataLabelsConfig:l})}return d}}const L=globalThis.ApexCharts.__internals.__apex_Filters,N=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function P(e,t,r,o,n,a=null,i={}){var s,l,h;const c=t&&"object"==typeof t,d=c&&null!=(l=null!=(s=t.x)?s:t.name)?l:"",u=Number(c?null!=(h=t.y)?h:t.value:t),p={name:String(d),value:isNaN(u)?null:u,color:c&&t.color?t.color:void 0,_key:`${n}/${r}:${d}`};if(o&&!p.color&&(p.color=o[r%o.length]),i.keepDatum&&(p._datum=t),c&&Array.isArray(t.children)&&t.children.length)p.children=t.children.map((t,r)=>P(e,t,r,null,p._key,a,i));else if(c&&null!=t.drilldown&&!1!==i.expandDrilldown){const r=a||new Set;if(!r.has(t.drilldown)){const o=function(e,t){const r=e.config.drilldown;return(r&&Array.isArray(r.series)?r.series:[]).find(e=>e&&e.id===t)}(e,t.drilldown);if(o&&Array.isArray(o.data)&&o.data.length){const n=new Set(r);n.add(t.drilldown);const a=Array.isArray(o.colors)?o.colors:null;p.children=o.data.map((t,r)=>P(e,t,r,a,p._key,n,i))}}}return p}function k(e){e.children&&e.children.length&&(e.children.forEach(e=>k(e)),(null==e.value||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(null==e.value||isNaN(e.value))&&(e.value=0)}function E(e){if("string"!=typeof e)return"";const t=e.indexOf("/");return-1===t?"":e.slice(t)}function T(e){const t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};const r=function(e,t,r={}){const o=t||e.config.series;return Array.isArray(o)?o.map((t,o)=>{var n,a;const i=t&&Array.isArray(t.data)?t.data:[],s=`${o}:${null!=(n=null==t?void 0:t.name)?n:""}`;return{name:String(null!=(a=null==t?void 0:t.name)?a:""),value:null,color:(null==t?void 0:t.color)||void 0,_key:s,_seriesIndex:o,children:i.map((t,o)=>P(e,t,o,null,s,null,r))}}):[]}(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});r.forEach(k);const{maxDepth:o}=function(e){const t=[];let r=0;return e.forEach((e,o)=>{const n=[],a=(e,t,i)=>{e._parent=i,e._depth=t,e._si=o,e._leaf=!(e.children&&e.children.length),t>r&&(r=t),e._leaf?(e._di=n.length,n.push(e)):(e._di=-1,e.children.forEach(r=>a(r,t+1,e)))};a(e,0,null),t.push(n)}),{leaves:t,maxDepth:r}}(r);return{roots:r,maxDepth:o,nested:!1}}const F=["#cf4d3f","#8f9499","#26a75b"],O=(e,t,r)=>e+(t-e)*r;function $(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0")}function z(e,t,r){const o=A.parseHex(W(e)),n=A.parseHex(W(t));return o&&n?"#"+$(O(o[0],n[0],r))+$(O(o[1],n[1],r))+$(O(o[2],n[2],r)):e}function W(e){if("string"!=typeof e)return"#000000";if(A.isColorHex(e))return e;return A.rgb2hex(e)||"#000000"}function R(e,t,r,o){var n,a,i;if(!t||"object"!=typeof t)return null;const s=null==(i=null==(a=null==(n=e.config.plotOptions)?void 0:n.treemap)?void 0:a.colorScale)?void 0:i.colorValue;let l;if(l="function"==typeof s?s(t,{seriesIndex:r,dataPointIndex:o,w:e}):"string"==typeof s?t[s]:t.colorValue,null==l)return null;const h=Number(l);return Number.isFinite(h)?h:null}function B(e){var t,r,o;const n=null==(o=null==(r=null==(t=e.config)?void 0:t.plotOptions)?void 0:r.treemap)?void 0:o.colorScale,a=n&&n.gradient;if(!a)return null;if(!1===a.enabled)return null;const i=e.config.series||[];let s=1/0,l=-1/0,h=!1;for(let t=0;t<i.length;t++){const r=i[t]&&i[t].data;if(Array.isArray(r))for(let o=0;o<r.length;o++){const n=R(e,r[o],t,o);null!=n&&(h=!0,n<s&&(s=n),n>l&&(l=n))}}if(!h&&!0!==a.enabled)return null;Number.isFinite(s)||(s=0,l=0);let c=Number.isFinite(Number(a.min))?Number(a.min):s,d=Number.isFinite(Number(a.max))?Number(a.max):l,u=null;if(null===a.midpoint?u=null:Number.isFinite(Number(a.midpoint))?u=Number(a.midpoint):c<0&&d>0&&(u=0),null!=u&&!1!==a.symmetric&&!Number.isFinite(Number(a.min))&&!Number.isFinite(Number(a.max))){const e=Math.max(Math.abs(c-u),Math.abs(d-u));c=u-e,d=u+e}d===c&&(c-=.5,d+=.5);const p=function(e,t,r,o){if(Array.isArray(e.stops)&&e.stops.length>=2)return e.stops.filter(e=>e&&Number.isFinite(Number(e.value))).map(e=>({value:Number(e.value),color:W(e.color)})).sort((e,t)=>e.value-t.value);const n=(Array.isArray(e.colors)&&e.colors.length>=2?e.colors:F).map(W),a=n.length;if(null!=o&&a>=3){const e=Math.floor((a-1)/2),i=[];for(let r=0;r<=e;r++)i.push({value:O(t,o,r/e),color:n[r]});for(let t=e+1;t<a;t++)i.push({value:O(o,r,(t-e)/(a-1-e)),color:n[t]});return i}return n.map((e,o)=>({value:O(t,r,o/(a-1)),color:e}))}(a,c,d,u);if(p.length<2)return null;const f=d-c,g=p.map(e=>({percent:0===f?0:(e.value-c)/f,color:e.color}));return{min:c,max:d,midpoint:u,stops:p,at:e=>{if(!Number.isFinite(e))return p[Math.floor(p.length/2)].color;if(e<=p[0].value)return p[0].color;const t=p[p.length-1];if(e>=t.value)return t.color;for(let t=1;t<p.length;t++){const r=p[t];if(e<=r.value){const o=p[t-1],n=r.value-o.value,a=0===n?0:(e-o.value)/n;return z(o.color,r.color,a)}}return t.color},legendStops:g}}function I(e){const t=W(e);return A.getContrastRatio(t,"#ffffff")>=A.getContrastRatio(t,"#000000")?"#ffffff":"#000000"}const D=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,j="http://www.w3.org/1999/xhtml";function Y(e,t){const r=e.config.drilldown&&e.config.drilldown.breadcrumb||{};return l(l({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},r),t||{})}function H(e){const t=e.dom.elWrap;if(!t)return;const r=t.querySelector(".apexcharts-breadcrumb");r&&r.parentNode&&r.parentNode.removeChild(r)}c.use({treemap:class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new M(e,t),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(e){var t;const r=this.w,o=new x(this.w,this.ctx),n=new w(this.w),a=o.group({class:"apexcharts-treemap"});if(r.globals.noData)return a;e.forEach(e=>{e.map(e=>Math.abs(e))}),this.negRange=this.helpers.checkColorRange(),r.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})});const i=T(r);this.nested=i.nested,this.roots=i.roots,this.scale=B(r);const s=1===i.roots.length?i.roots[0].children||[]:i.roots;this.drawn=s;const l=r.config.plotOptions.treemap.parents;this.showParents=!0===l.show||!1!==l.show&&this.nested;const h=this._resolveFocus(s),c=h?[h]:s;_.generateNested(c,r.layout.gridWidth,r.layout.gridHeight,{padding:(e,t,r,o)=>this.showParents?this._levelPadding(t,r,o):0,header:(e,t,r,o)=>this.showParents?this._levelHeader(e,t,r,o):0});const d=null==(t=this.ctx)?void 0:t.morphTypeChange,u=!!d&&"function"==typeof d.isActive&&d.isActive()&&"function"==typeof d.getInitialPathAt;this._morphLeafIndex=0;const p=this._leavesBySeries(c,r.config.series.length),f=this.showParents?this._parentsBySeries(c,r.config.series.length):[];return p.forEach((t,i)=>{var s;const l=o.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:A.escapeString(r.seriesData.seriesNames[i]),rel:i+1,"data:realIndex":i});if(o.setupEventDelegation(l,".apexcharts-treemap-rect"),r.config.chart.dropShadow.enabled){const e=r.config.chart.dropShadow;new L(this.w).dropShadow(a,e,i)}const h=o.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(f[i]||[]).forEach(e=>{this._drawParent(l,e,i)});const d=r.config.chart.animations,p=d.animateGradually,g=p&&!1!==p.enabled,m=new Array(t.length).fill(0);if(g){const e=t.length||1,r=Math.min(p.delay||0,.5*d.speed/e);t.map((e,t)=>{return{j:t,area:e.rect?(r=e.rect,(r[2]-r[0])*(r[3]-r[1])):0};var r}).sort((e,t)=>t.area-e.area).forEach((e,t)=>{m[e.j]=t*r})}t.forEach((t,a)=>{const s=t.rect;if(!s)return;const h=t._di,d=s[0],p=s[1],f=s[2],g=s[3];c.xMin=Math.min(c.xMin,d),c.yMin=Math.min(c.yMin,p),c.xMax=Math.max(c.xMax,f),c.yMax=Math.max(c.yMax,g);const b=this._leafColor(i,h),_=b.color,x=n.fillPath({color:_,seriesNumber:i,dataPointIndex:h}),y=u?this._morphSourceForLeaf(t):null,v=y?o.drawPath({d:this._tilePath(d,p,f,g),fill:"#fff",stroke:r.config.plotOptions.treemap.useFillColorAsStroke?_:r.globals.stroke.colors[i],strokeWidth:this.strokeWidth,fillOpacity:1}):o.drawRect(d,p,f-d,g-p,r.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,r.config.plotOptions.treemap.useFillColorAsStroke?_:r.globals.stroke.colors[i]);v.attr({cx:d,cy:p,index:i,i:i,j:h,width:f-d,height:g-p,fill:x}),v.node.classList.add("apexcharts-treemap-rect"),v.node.setAttribute("data:key",E(t._key));let w={x:d+(f-d)/2,y:p+(g-p)/2,width:0,height:0};const A={x:d,y:p,width:f-d,height:g-p};if(y)this._morphTile(v,y,this._tilePath(d,p,f,g),this.ctx.morphTypeChange.getSpeed(),i,h);else if(r.config.chart.animations.enabled&&!r.globals.dataChanged){let e=1;r.globals.resized||(e=r.config.chart.animations.speed),this.animateTreemap(v,w,A,e,m[a]||0)}if(r.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&r.globals.shouldAnimate&&(e=this.dynamicAnim.speed,r.globals.previousPaths[i]&&r.globals.previousPaths[i][h]&&r.globals.previousPaths[i][h].rect&&(w=r.globals.previousPaths[i][h].rect),this.animateTreemap(v,w,A,e))}let C=this.getFontSize(s);"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(C=parseInt(String(r.config.dataLabels.style.fontSize),10));let S=null;if(r.config.dataLabels.enabled&&this._labelCanShow(C,f-d,g-p)){let t=r.config.dataLabels.formatter(this.labels[i][h],{value:r.seriesData.series[i][h],seriesIndex:i,dataPointIndex:h,w:r});"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(t=this.truncateLabels(String(t),C,d,p,f,g)),r.seriesData.series[i][h]&&(S=this.helpers.calculateDataLabels({text:t,x:(d+f)/2,y:(p+g)/2+this.strokeWidth/2+C/3,i:i,j:h,colorProps:b,fontSize:C,series:e})),r.config.dataLabels.enabled&&S&&this.rotateToFitLabel(S,C,t,d,p,f,g)}l.add(v),null!==S&&l.add(S)});const b=r.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&r.config.series.length>1&&b&&b.show){const e=r.config.series[i].name||"";if(e&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:t,offsetY:n,borderColor:a,borderWidth:i,borderRadius:h,style:d}=b,u=d.color||r.config.chart.foreColor,p={left:d.padding.left,right:d.padding.right,top:d.padding.top,bottom:d.padding.bottom},f=o.getTextRects(e,d.fontSize,d.fontFamily),g=f.width+p.left+p.right,m=f.height+p.top+p.bottom,_=c.xMin+(t||0),x=c.yMin+(n||0),y=o.drawRect(_,x,g,m,h,d.background,1,i,a),v=o.drawText({x:_+p.left,y:x+p.top+.75*(null!=(s=null==f?void 0:f.height)?s:0),text:e,fontSize:d.fontSize,fontFamily:d.fontFamily,fontWeight:d.fontWeight,foreColor:u,cssClass:d.cssClass||""});l.add(y),l.add(v)}}l.add(h),a.add(l)}),this._renderBreadcrumb(),a}_levelCfg(e){if(this._levelCache||(this._levelCache=[]),this._levelCache[e])return this._levelCache[e];const t=this.w.config.plotOptions.treemap,r=t.parents||{},o=(t.levels||[])[e]||{},n=h(l(l({},r),o),{header:h(l(l({},r.header||{}),o.header||{}),{style:l(l({},(r.header||{}).style||{}),(o.header||{}).style||{})}),hover:l(l({},r.hover||{}),o.hover||{})});return this._levelCache[e]=n,n}_levelPadding(e,t,r){const o=this._levelCfg(e);return Number(o.padding)||0}_levelHeader(e,t,r,o){const n=this._levelCfg(t).header||{};if(!1===n.show)return 0;const a=Number(n.height);if(!Number.isFinite(a)||a<=0)return 0;return r<(Number(n.minWidth)||40)||o<2*a?0:a}_leavesBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const o=e=>{if(e.children&&e.children.length)e.children.forEach(o);else{const t=e._si||0;r[t]&&r[t].push(e)}};return e.forEach(o),r}_parentsBySeries(e,t){const r=new Array(Math.max(1,t));for(let e=0;e<r.length;e++)r[e]=[];const o=e=>{if(!e.children||!e.children.length)return;const t=e._si||0;r[t]&&r[t].push(e),e.children.forEach(o)};return e.forEach(o),r.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),r}_leafColor(e,t){const r=this.w;if(this.scale){const o=function(e,t,r){const o=e.config.series[t];return R(e,o&&Array.isArray(o.data)?o.data[r]:null,t,r)}(r,e,t);if(null!=o){const e=this.scale.at(o);return{color:e,foreColor:I(e),colorProps:{color:e,foreColor:I(e),percent:0}}}}return this.helpers.getShadeColor(r.config.chart.type,e,t,this.negRange)}_parentChrome(e){const t=this.w,r=this._levelCfg(e),o="dark"===t.config.theme.mode,n=(r.header||{}).style||{},a=Math.min(e,3),i=o?255:0,s=`${i},${i},${i}`;return{fill:r.fill||`rgba(${s},${(o?.04:.03)+.02*a})`,fillOpacity:null==r.fillOpacity?1:r.fillOpacity,borderColor:r.borderColor||`rgba(${s},${o?.18:.14})`,borderWidth:null==r.borderWidth?1:r.borderWidth,borderRadius:null==r.borderRadius?t.config.plotOptions.treemap.borderRadius:r.borderRadius,headerBg:n.background||`rgba(${s},${o?.1:.07})`,headerColor:n.color||(o?"#e8e8e8":t.config.chart.foreColor),headerFontSize:n.fontSize||"12px",headerFontFamily:n.fontFamily||t.config.chart.fontFamily,headerFontWeight:null==n.fontWeight?600:n.fontWeight,hoverColor:r.hover&&r.hover.color||(o?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.7)"),hoverWidth:r.hover&&r.hover.width||2,hoverShow:!(r.hover&&!1===r.hover.show)}}_drawParent(e,t,r){var o;const n=t.rect;if(!n)return;const a=this.w,i=new x(this.w,this.ctx),s=t.depth||0,l=this._levelCfg(s),h=this._parentChrome(s),c=n[0],d=n[1],u=n[2]-n[0],p=n[3]-n[1];if(u<=0||p<=0)return;const f=i.group({class:"apexcharts-treemap-parent","data:depth":s,"data:name":A.escapeString(t.name)}),g=E(t._key),m=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(g):null,b=m?i.drawPath({d:this._tilePath(c,d,c+u,d+p),fill:h.fill,stroke:h.borderColor,strokeWidth:h.borderWidth,fillOpacity:h.fillOpacity}):i.drawRect(c,d,u,p,h.borderRadius,h.fill,h.fillOpacity,h.borderWidth,h.borderColor);b.node.classList.add("apexcharts-treemap-parent-rect"),b.node.setAttribute("data:key",g),b.node.setAttribute("data:depth",String(s)),m&&this._morphTile(b,m,this._tilePath(c,d,c+u,d+p),this.ctx.morphTypeChange.getSpeed(),r,s),f.add(b);const _=t.headerHeight||0;let y="";if(_>0){const e=l.header||{},n=i.drawRect(c,d,u,_,0,h.headerBg,1,0,"transparent");n.node.classList.add("apexcharts-treemap-parent-header"),f.add(n);let p=String(null!=(o=t.name)?o:"");"function"==typeof e.formatter?p=String(e.formatter(t.name,{value:t.value,depth:s,seriesIndex:r,node:t,w:a})):e.showValue&&(p=`${p} ${this._formatValue(t.value)}`),y=p;const g=Number(e.offsetX)||0,m=e.align||"left",x=6,v=Math.max(0,u-2*x-Math.abs(g)),w=parseFloat(String(h.headerFontSize))||12,A=i.getTextBasedOnMaxWidth({text:p,maxWidth:v,fontSize:w});if(A){let t=c+x+g,r="start";"center"===m?(t=c+u/2+g,r="middle"):"right"===m&&(t=c+u-x+g,r="end");const o=i.drawText({x:t,y:d+_/2+w/3+(Number(e.offsetY)||0),text:A,textAnchor:r,fontSize:h.headerFontSize,fontFamily:h.headerFontFamily,fontWeight:h.headerFontWeight,foreColor:h.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||""}`});o.node.setAttribute("pointer-events","none"),f.add(o)}this._attachParentEvents(n.node,t,h,b),this._makeParentAccessible(n.node,t,h,b,y)}this._attachParentEvents(b.node,t,h,b),f.node.setAttribute("role","group"),f.node.setAttribute("aria-label",this._parentLabel(t,y)),e.add(f)}_parentLabel(e,t){const r=this._drawnTotal(),o=r>0?(e._area/r*100).toFixed(1):"0",n=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g," ").trim():`${e.name}, ${this._formatValue(e._area)}`}, ${n} ${1===n?"item":"items"}, ${o}% of total`}_makeParentAccessible(e,t,r,o,n){e&&e.setAttribute&&this._zoomEnabled()&&(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`${this._parentLabel(t,n)}. Zoom in`),e.setAttribute("aria-expanded","false"),N.isBrowser()&&e.addEventListener&&(e.addEventListener("focus",()=>{o.node.setAttribute("stroke",r.hoverColor),o.node.setAttribute("stroke-width",String(r.hoverWidth+1))}),e.addEventListener("blur",()=>{o.node.setAttribute("stroke",r.borderColor),o.node.setAttribute("stroke-width",String(r.borderWidth))}),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),this._zoomTo(t,!0))})))}_attachParentEvents(e,t,r,o){if(!N.isBrowser()||!e||!e.addEventListener)return;const n=this.w;r.hoverShow&&(e.addEventListener("mouseenter",()=>{o.node.setAttribute("stroke",r.hoverColor),o.node.setAttribute("stroke-width",String(r.hoverWidth))}),e.addEventListener("mouseleave",()=>{o.node.setAttribute("stroke",r.borderColor),o.node.setAttribute("stroke-width",String(r.borderWidth))})),n.config.tooltip.enabled&&(e.addEventListener("mouseenter",e=>this._showParentTooltip(e,t)),e.addEventListener("mousemove",e=>this._positionTooltip(e)),e.addEventListener("mouseleave",()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor="pointer",e.addEventListener("click",()=>this._zoomTo(t)))}_zoomEnabled(){const e=this.w,t=e.config.plotOptions.treemap.zoom;if(!t||!t.enabled||!this.showParents)return!1;const r=e.config.drilldown;return!(r&&r.enabled&&Array.isArray(r.series)&&r.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(e){const t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let r=null;const o=e=>{r||(e._key!==t?e.children&&e.children.forEach(o):r=e)};return e.forEach(o),r&&r.children&&r.children.length?r:null}_zoomTo(e,t=!1){const r=this.w;if(!e||!e.children||!e.children.length)return;const o=r.globals.treemapFocusKey===e._key?null:e._key;r.globals.treemapFocusKey=o,this._hideParentTooltip();const n=this.ctx.update();t&&n&&"function"==typeof n.then&&n.then(()=>{if(!N.isBrowser())return;const e=r.dom.baseEl.querySelector(".apexcharts-breadcrumb .apexcharts-breadcrumb-item");if(e&&e.focus)return void e.focus();const t=r.dom.baseEl.querySelector(".apexcharts-treemap-parent-header[tabindex]");t&&t.focus&&t.focus()})}_focusChain(){const e=[],t=new Set(this.drawn||[]);let r=this._resolveFocus(this.drawn||[]);for(;r&&(e.unshift(r),!t.has(r));)r=r._parent;return e}_breadcrumbCfg(){const e=this.w.config.plotOptions.treemap.zoom;return Y(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!N.isBrowser())return;const e=this.w;if(!e.dom.elWrap)return;if(H(e),!this._zoomEnabled())return;const t=this._focusChain();if(!t.length)return;const r=function(e,t){if(!N.isBrowser())return null;const r=e.dom.elWrap;if(!r)return null;H(e);const o=t.config||Y(e);if(!1===o.show)return null;const n=t.crumbs||[];if(n.length<2)return null;const a=D.createElementNS(j,"nav");a.setAttribute("class","apexcharts-breadcrumb"),a.setAttribute("aria-label",t.ariaLabel||"Breadcrumb"),function(e,t){const r=t.offsetX||0,o=t.offsetY||0;e.style.position="absolute",e.style.top=o+"px","top-right"===t.position?e.style.right=3-r+"px":e.style.left=r+"px"}(a,o),t.compact&&(a.style.fontSize="11px",a.style.padding="0 2px");const i=null!=o.separator?o.separator:" / ";return n.forEach((e,r)=>{var s;if(r>0){const e=D.createElementNS(j,"span");e.setAttribute("class","apexcharts-breadcrumb-separator"),e.setAttribute("aria-hidden","true"),e.textContent=i,a.appendChild(e)}let l=0===r?null!=(s=o.rootLabel)?s:"All":e.label;if("function"==typeof o.formatter&&(l=o.formatter(l,{index:r,depth:n.length-1,data:e.data})),r===n.length-1){const e=D.createElementNS(j,"span");return e.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),e.setAttribute("aria-current","page"),e.textContent=String(l),void a.appendChild(e)}const h=D.createElementNS(j,"button");if(h.setAttribute("type","button"),h.setAttribute("class","apexcharts-breadcrumb-item"),0===r){const e=D.createElementNS(j,"span");e.setAttribute("class","apexcharts-breadcrumb-arrow"),e.setAttribute("aria-hidden","true"),e.textContent="\u2190",h.appendChild(e)}const c=D.createElementNS(j,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=String(l),h.appendChild(c),h.addEventListener("click",()=>t.onNavigate(r,e)),a.appendChild(h)}),r.appendChild(a),a}(e,{ariaLabel:"Treemap breadcrumb",config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:"All",data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(t,r)=>{e.globals.treemapFocusKey=r.data?r.data._key:null,this._hideParentTooltip(),this.ctx.update()}});r&&(this._placeBreadcrumb(r),function(e,t){const r=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>null!==e);if(!r.length)return;const o=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<r.length+1;e++){const e=t.getBoundingClientRect(),n=r.find(t=>{const r=t.getBoundingClientRect();return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top});if(!n)break;t.style.top=n.getBoundingClientRect().bottom-o+4+"px"}}(e,r))}_placeBreadcrumb(e){var t,r;const o=this.w,n=o.layout.translateY||0,a=null==(r=null==(t=this.ctx)?void 0:t.dimensions)?void 0:r.dimHelpers,i=a?a.getTitleSubtitleCoords("title").height+a.getTitleSubtitleCoords("subtitle").height:0,s=e.getBoundingClientRect().height||18;if(n-i>=s+1)return void(e.style.top=n-s-1+"px");e.style.top=`${i}px`;const l="dark"===o.config.theme.mode;e.style.background=l?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",e.style.borderRadius="4px"}_showParentTooltip(e,t){const r=this.w,o=this._tip();if(!o)return;const n=this._drawnTotal(),a=t._parent?t._parent._area:n,i=n>0?(t._area/n*100).toFixed(1):"0.0",s=a>0?(t._area/a*100).toFixed(1):i,l=this.w.config.plotOptions.treemap.parents,h=l&&l.tooltip&&l.tooltip.formatter,c=this._countLeaves(t);let d;if("function"==typeof h)d=h({name:t.name,value:t._area,depth:t.depth||0,leafCount:c,percentOfParent:Number(s),percentOfTotal:Number(i),node:t,w:r});else{const e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${e};`:""}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${A.escapeString(t.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._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">${s}% of parent, ${i}% of total</span></div></div></div>`}o.innerHTML=d,o.classList.add("apexcharts-active"),o.style.opacity="1",this._tipOwned=!0,this._positionTooltip(e)}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_positionTooltip(e){const t=this._tip();if(!t||!this._tipOwned)return;const r=this.w.dom.elWrap.getBoundingClientRect(),o=t.offsetWidth,n=t.offsetHeight;let a=e.clientX-r.left+12;a+o>r.width&&(a=e.clientX-r.left-o-12),a=Math.max(0,Math.min(a,r.width-o));let i=e.clientY-r.top+12;i+n>r.height&&(i=e.clientY-r.top-n-12),i=Math.max(0,Math.min(i,r.height-n)),t.style.left=a+"px",t.style.top=i+"px"}_hideParentTooltip(){const e=this._tip();e&&this._tipOwned&&(this._tipOwned=!1,e.classList.remove("apexcharts-active"),e.style.opacity="0")}_drawnTotal(){return null==this._total&&(this._total=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0)),this._total||0}_subtreeArea(e){if(null!=e._area)return e._area;const t=e.children;if(t&&t.length){let e=0;for(let r=0;r<t.length;r++)e+=this._subtreeArea(t[r]);return e}const r=Number(e.value);return isNaN(r)?0:Math.abs(r)}_countLeaves(e){return e.children&&e.children.length?e.children.reduce((e,t)=>e+this._countLeaves(t),0):1}_formatValue(e){var t,r,o,n,a;const i=this.w,s=(null==(r=null==(t=i.config.tooltip)?void 0:t.y)?void 0:r.formatter)||(null==(a=null==(n=null==(o=i.config.yaxis)?void 0:o[0])?void 0:n.labels)?void 0:a.formatter);if("function"==typeof s)try{return String(s(e,{seriesIndex:0,dataPointIndex:0,w:i}))}catch(e){}return String(e)}_labelCanShow(e,t,r){if(!Number.isFinite(e)||e<=0)return!1;const o=this.w.config.plotOptions.treemap.dataLabels;return!(e<(o&&null!=o.minFontSize?Number(o.minFontSize):0))&&Math.max(t,r)>=e}_averageLabelSize(){if(null!=this._avgLabelSize)return this._avgLabelSize;return this._avgLabelSize=function e(t){let r,o=0;if(Array.isArray(t[0]))for(r=0;r<t.length;r++)o+=e(t[r]);else for(r=0;r<t.length;r++)o+=t[r].length;return o}(this.labels)/function e(t){let r,o=0;if(Array.isArray(t[0]))for(r=0;r<t.length;r++)o+=e(t[r]);else for(r=0;r<t.length;r++)o+=1;return o}(this.labels),this._avgLabelSize}getFontSize(e){const t=this.w,r=this._averageLabelSize();return function(e,o){const n=e*o,a=Math.pow(n,.5);return Math.min(a/r,parseInt(t.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,r,o,n,a,i){const s=new x(this.w),l=s.getTextRects(r,String(t));if(l.width+this.w.config.stroke.width+5>a-o&&l.width<=i-n){const t=s.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(-90 ${t.x} ${t.y}) translate(${l.height/3})`)}}truncateLabels(e,t,r,o,n,a){const i=new x(this.w),s=i.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>n-r&&a-o>n-r?a-o:n-r,l=i.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==l.length&&s/t<5?"":l}_morphKeyed(){var e;const t=null==(e=this.ctx)?void 0:e.morphTypeChange;return!(!t||"function"!=typeof t.hasKeyedMarks||!t.hasKeyedMarks()||"function"!=typeof t.getInitialPathForKey)}_morphSourceForLeaf(e){var t;const r=null==(t=this.ctx)?void 0:t.morphTypeChange;if(!r||"function"!=typeof r.getInitialPathAt)return null;if(this._morphKeyed()){const t=r.getInitialPathForKey(E(e._key));if(t)return t}return r.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,r,o){return`M ${e} ${t} L ${r} ${t} L ${r} ${o} L ${e} ${o} Z`}_morphTile(e,t,r,o,n,a){new v(this.w,this.ctx).morphSVG(e,n,a,"none",t,r,o,0)}animateTreemap(e,t,r,o,n=0){const a=new v(this.w);a.animateRect(e,t,r,o,()=>{a.animationCompleted(e)},n)}}}),e.default=c,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,n=Object.defineProperties,e=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(n,e,o)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,i=(t,n)=>{for(var e in n||(n={}))r.call(n,e)&&s(t,e,n[e]);if(o)for(var e of o(n))a.call(n,e)&&s(t,e,n[e]);return t},c=(t,o)=>n(t,e(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=/[MmLlHhVvCcSsQqTtAaZz]/;function h(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,h=0,L=0,u=0,p=0,f=0,g="";const x=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function m(){for(;a<r&&x(t[a]);)a++}function M(){m();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function y(){m();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=L=t,h=u=n,i=[{x:t,y:n}]}function C(t,n){i.push({x:t,y:n}),c=t,h=n}function w(t,n,e,r,a,s){const l=Math.hypot(t-c,n-h)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),L=Math.max(2,Math.min(160,Math.ceil(l/o))),u=c,g=h;for(let o=1;o<=L;o++){const c=o/L,l=1-c,h=l*l*l,p=3*l*l*c,f=3*l*c*c,x=c*c*c;i.push({x:h*u+p*t+f*e+x*a,y:h*g+p*n+f*r+x*s})}p=e,f=r,c=a,h=s}function Z(t,n,e,o){const r=t,a=n;w(c+2/3*(t-c),h+2/3*(n-h),e+2/3*(t-e),o+2/3*(n-o),e,o),p=r,f=a}function A(t,n,e,r,a,s,l){if(!t||!n)return void C(s,l);const L=c,u=h;t=Math.abs(t),n=Math.abs(n);const g=e*Math.PI/180,x=Math.cos(g),m=Math.sin(g),M=(L-s)/2,y=(u-l)/2,d=x*M+m*y,b=-m*M+x*y,w=d*d/(t*t)+b*b/(n*n);if(w>1){const e=Math.sqrt(w);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=x*$-m*k+(L+s)/2,q=m*$+x*k+(u+l)/2,O=(d-$)/t,E=(b-k)/n,P=(-d-$)/t,j=(-b-k)/n,Y=Math.atan2(E,O);let I=Math.atan2(j,P)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*x-n*a*m,y:q+t*r*m+n*a*x})}p=s,f=l,c=s,h=l}for(;a<r&&(m(),!(a>=r));){let n=t[a];if(l.test(n))a++;else{if(!g)break;n="M"===g?"L":"m"===g?"l":g}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:L,y:u}),d(),c=L,h=u,g=n;continue}const r=t=>null==t?NaN:t,x=r(M());if(isNaN(x))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+x:x,e?h+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;C(e?c+x:x,e?h+t:t);break}case"H":C(e?c+x:x,h);break;case"V":C(c,e?h+x:x);break;case"C":{const t=[x,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;w(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3],e?c+n[4]:n[4],e?h+n[5]:n[5]);break}case"S":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=g&&"CcSs".indexOf(g)>=0;w(o?2*c-p:c,o?2*h-f:h,e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"Q":{const t=[x,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?h+n[1]:n[1],e?c+n[2]:n[2],e?h+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=g&&"QqTt".indexOf(g)>=0;Z(n?2*c-p:c,n?2*h-f:h,e?c+x:x,e?h+t:t);break}case"A":{const t=x,n=M(),o=M(),r=y(),a=y(),i=M(),l=M();if(null==n||null==o||null==r||null==a||null==i||null==l)return s;A(t,n,o,r,a,e?c+i:i,e?h+l:l);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(p=c,f=h),g=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const u=128;function p(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function f(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function g(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function x(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;f(t,a,a*e).capacity>=n?o=a:r=a}return o}function m(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const M={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function y(t,n,e,o){const r=void 0!==M[e]?M[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function d(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const b=new Set;function C(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!b.has(t.name)){b.add(t.name);t.kind}return e(n,r)};return r.shape=Object.freeze(i({},t)),r.with=e=>C(i(i({},t),e),n),r}const w=new Map;function Z(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=w.get(e);if(!o){const r=h(t,n);o={polys:r,bounds:L(r)},w.set(e,o)}return o}(n,s);if(!c.length)return[];const M=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,L=n.offY+o.y*n.scale,u=n.offX+l.x*n.scale,p=n.offY+l.y*n.scale;h<i&&(i=h),u<i&&(i=u),h>c&&(c=h),u>c&&(c=u),L<a&&(a=L),p<a&&(a=p),L>s&&(s=L),p>s&&(s=p),L!==p&&r.push({x0:h,y0:L,x1:u,y1:p})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*u),r=Math.floor((e-a)/l*u);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,p(l,i,o),{evenOdd:a}),b=x(M,t.length,r),C=f(M,b,b*r);if(!C.cells.length)return[];const Z=g(C.cells.map(t=>t.cap),t.length),A=m(t[0].r>0?t[0].r:3,b),U=[];return C.cells.forEach((t,n)=>{d(t,Z[n],b,C.inset,A,U)}),y(t,U,e,b)}}function A(t){return C(c(i({},t),{kind:"silhouette"}),Z)}const U=A({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),$=A({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),k=A({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),v=A({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),q=A({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),O=A({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),E=A({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),P=A({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),j=t=>t.reduce((t,n)=>t+n,0);function Y(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&j(l(h))<a;)h++;const L=s/h,u=g(l(h),a),p=m(t[0].r>0?t[0].r:3,L),f=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*L,a=u[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;f.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:p,row:t})}}return y(t,f,"rows",L)}}function I(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),L=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},u=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,u=[];let p=0;const f=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const g=s<=-1?Math.PI:Math.acos(s),x=g>=Math.PI-1e-9,m=[],M=[0];for(let t=0;t<=40;t++){const n=L(a,r,2*g*t/40-g);if(m.push(n),t>0){const e=m[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const y=M[M.length-1],d=x?0:Math.min(.42*t,y/2),b=y-2*d;let C;if(C=x?Math.max(1,Math.round(y/t)):b>0?Math.floor(b/t)+1:y>=.45*t?1:0,!C)continue;const w=x?y/C:C>1?b/(C-1):0,Z=[];let A=0;for(let t=0;t<C;t++){const n=x?t*w:C>1?d+t*w:y/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=m[A],s=m[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};f(l)&&Z.push(l)}Z.length&&(u.push(Z),p+=Z.length)}return{rows:u,total:p}};let p=1,f=2*s;for(let t=0;t<30;t++){const t=(p+f)/2;u(t).total>=a?p=t:f=t}const x=p,{rows:M}=u(x),d=g(M.map(t=>t.length),a),b=m(t[0].r>0?t[0].r:3,x),C=[];return M.forEach((t,n)=>{const e=d[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];C.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),C.sort((t,n)=>t.y-n.y||t.x-n.x),y(t,C,o,x)}}function S(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=g(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),L=h*e,u=r.x+r.width/2,p=r.y+(r.height-s*L)/2,f=m(t[0].r>0?t[0].r:3,h),x=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)x.push({x:u+(n-(c[t]-1)/2)*h,y:p+(t+.5)*L,r:f,row:t});return y(t,x,o,h)}}function X(t){return C(c(i({},t),{kind:"rings"}),Y)}function F(t){return C(c(i({},t),{kind:"globe"}),I)}function N(t){return C(c(i({},t),{kind:"tiers"}),S)}const R=X({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),T=F({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),_=N({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),D=A({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),Q=A({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),z=A({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),B=A({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),H=A({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),V=A({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),G=A({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),J=A({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),K=A({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),W=A({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),tt=A({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),nt=A({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),et=A({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),ot=A({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),rt=A({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),at=A({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),st=A({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),it=A({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),ct=A({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),lt=A({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),ht=A({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),Lt=new Map;function ut(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=h(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const M=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,L=n.offX+t[e+1].x*n.scale,u=n.offY+t[e+1].y*n.scale,p=Math.hypot(L-l,u-h),f=p>1e-9?-(u-h)/p*o:o,g=p>1e-9?(L-l)/p*o:0;r.push({ax:l,ay:h,bx:L,by:u,nx:f,ny:g}),Math.min(l,L)-o<i&&(i=Math.min(l,L)-o),Math.max(l,L)+o>c&&(c=Math.max(l,L)+o),Math.min(h,u)-o<a&&(a=Math.min(h,u)-o),Math.max(h,u)+o>s&&(s=Math.max(h,u)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<u;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*u),s=Math.floor((e-a)/l*u);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const L=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*u);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const L=a[n]+(t-o)/(r-o)*(a[e]-a[n]);L<i&&(i=L),L>c&&(c=L)}c>i&&o.push({x0:i,x1:c});const l=L(r.ax,r.ay,t);l&&o.push(l);const h=L(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,p({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),b=x(M,t.length,r),C=f(M,b,b*r);if(!C.cells.length)return[];const w=g(C.cells.map(t=>t.cap),t.length),Z=m(t[0].r>0?t[0].r:3,b),A=[];return C.cells.forEach((t,n)=>{d(t,w[n],b,C.inset,Z,A)}),y(t,A,e,b)}}function pt(t){return C(c(i({},t),{kind:"stroke"}),ut)}const ft=pt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),gt=pt({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),xt=pt({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),mt=pt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),Mt=pt({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),yt=pt({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),dt=pt({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"}),bt=[U,$,k,v,q,O,E,P,R,T,_,D,Q,z,B,H,V,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ft,gt,xt,mt,Mt,yt,dt],Ct="__apexcharts_unit_layouts__";function wt(){const t=globalThis;return t[Ct]||(t[Ct]={}),t[Ct]}const Zt=46,At=48,Ut=88,$t={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,Ut,38,Ut],e:[6,51,6,85],f:[6,11,6,45],g:[8,At,38,At]},kt={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},vt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},qt={1:23,".":19.32,",":19.32,":":19.32," ":23};function Ot(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=qt[" "]+n;continue}const t=vt[r];if(t){e+=t(o),o+=(qt[r]||Zt)+n;continue}const a=kt[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=$t[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(qt[r]||Zt)+n}return e.trim()}const Et=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Pt(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function jt(t){return Math.round(10*t)/10}exports.arrow=V,exports.battery=O,exports.bolt=K,exports.bulb=W,exports.car=nt,exports.catalog=bt,exports.check=ft,exports.cross=J,exports.crown=G,exports.digitsPath=Ot,exports.droplet=$,exports.fish=B,exports.flame=z,exports.flask=tt,exports.funnel=st,exports.gear=it,exports.globe=T,exports.glyphs=function(t,n={}){const e=String(t),s=n,{gap:l}=s,h=((t,n)=>{var e={};for(var s in t)r.call(t,s)&&n.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&o)for(var s of o(t))n.indexOf(s)<0&&a.call(t,s)&&(e[s]=t[s]);return e})(s,["gap"]);return pt(c(i({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:Ot(e,l)}))},exports.group=ot,exports.heart=U,exports.house=q,exports.human=k,exports.leaf=D,exports.moneybag=at,exports.mountain=ht,exports.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return pt(c(i({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},exports.percent=Mt,exports.pin=lt,exports.plane=et,exports.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?Et:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=g(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],L=[],u=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Pt(l,t):0;L.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:u})}const p=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),f=new Map;p.forEach((t,n)=>{const e=l?L[n]%c.length:Math.floor(n/p.length*c.length),o=c[e]||c[0],r=`<circle cx="${jt(t.x)}" cy="${jt(t.y)}" r="${jt(t.r||3)}"/>`,a=f.get(o);a?a.push(r):f.set(o,[r])});let x="";return f.forEach((t,n)=>{x+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?x:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${p.length} dots">${x}</svg>`},exports.pulse=xt,exports.pyramid=_,exports.question=yt,exports.registerShapes=function(t){const n=wt(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e},exports.registeredShapeNames=function(){return Object.keys(wt())},exports.rings=X,exports.robot=ct,exports.rocket=P,exports.shapeFrom=function(t,n={}){return A(c(i({name:"custom"},n),{path:t}))},exports.shield=E,exports.silhouette=A,exports.sphere=F,exports.spiral=dt,exports.star=H,exports.stroke=pt,exports.strokeFrom=function(t,n={}){return pt(c(i({name:"custom-stroke"},n),{path:t}))},exports.sun=Q,exports.target=R,exports.tiers=N,exports.tree=v,exports.trophy=rt,exports.unregisterShapes=function(t){const n=wt();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},exports.wifi=gt,exports.xmark=mt;
|
package/dist/unit-shapes.esm.js
CHANGED
package/dist/unit-shapes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).ApexUnitShapes={})}(this,function(t){"use strict";var n=Object.defineProperty,e=Object.defineProperties,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(t,e,o)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,c=(t,n)=>{for(var e in n||(n={}))a.call(n,e)&&i(t,e,n[e]);if(r)for(var e of r(n))s.call(n,e)&&i(t,e,n[e]);return t},l=(t,n)=>e(t,o(n));const h=/[MmLlHhVvCcSsQqTtAaZz]/;function u(t,n=.6,e=!1){const o=n>0?n:.6,r=t.length;let a=0;const s=[];let i=[],c=0,l=0,u=0,L=0,f=0,g=0,m="";const p=t=>" "===t||","===t||"\t"===t||"\n"===t||"\r"===t;function y(){for(;a<r&&p(t[a]);)a++}function M(){y();const n=a;for("+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("."===t[a])for(a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if("e"===t[a]||"E"===t[a])for(a++,"+"!==t[a]&&"-"!==t[a]||a++;a<r&&t[a]>="0"&&t[a]<="9";)a++;if(a===n)return null;const e=parseFloat(t.slice(n,a));return isFinite(e)?e:null}function x(){y();const n=t[a];return"0"===n||"1"===n?(a++,"1"===n):null}function d(){i.length>(e?1:2)&&s.push(i),i=[]}function b(t,n){d(),c=u=t,l=L=n,i=[{x:t,y:n}]}function w(t,n){i.push({x:t,y:n}),c=t,l=n}function C(t,n,e,r,a,s){const h=Math.hypot(t-c,n-l)+Math.hypot(e-t,r-n)+Math.hypot(a-e,s-r),u=Math.max(2,Math.min(160,Math.ceil(h/o))),L=c,m=l;for(let o=1;o<=u;o++){const c=o/u,l=1-c,h=l*l*l,f=3*l*l*c,g=3*l*c*c,p=c*c*c;i.push({x:h*L+f*t+g*e+p*a,y:h*m+f*n+g*r+p*s})}f=e,g=r,c=a,l=s}function Z(t,n,e,o){const r=t,a=n;C(c+2/3*(t-c),l+2/3*(n-l),e+2/3*(t-e),o+2/3*(n-o),e,o),f=r,g=a}function A(t,n,e,r,a,s,h){if(!t||!n)return void w(s,h);const u=c,L=l;t=Math.abs(t),n=Math.abs(n);const m=e*Math.PI/180,p=Math.cos(m),y=Math.sin(m),M=(u-s)/2,x=(L-h)/2,d=p*M+y*x,b=-y*M+p*x,C=d*d/(t*t)+b*b/(n*n);if(C>1){const e=Math.sqrt(C);t*=e,n*=e}const Z=t*t*n*n-t*t*b*b-n*n*d*d,A=t*t*b*b+n*n*d*d,U=(r===a?-1:1)*Math.sqrt(Math.max(0,Z/(A||1))),$=U*t*b/n,k=-U*n*d/t,v=p*$-y*k+(u+s)/2,O=y*$+p*k+(L+h)/2,q=(d-$)/t,j=(b-k)/n,E=(-d-$)/t,P=(-b-k)/n,Y=Math.atan2(j,q);let I=Math.atan2(P,E)-Y;!a&&I>0&&(I-=2*Math.PI),a&&I<0&&(I+=2*Math.PI);const S=Math.max(2,Math.min(320,Math.ceil(Math.abs(I)*Math.max(t,n)/o)));for(let e=1;e<=S;e++){const o=Y+I*e/S,r=Math.cos(o),a=Math.sin(o);i.push({x:v+t*r*p-n*a*y,y:O+t*r*y+n*a*p})}f=s,g=h,c=s,l=h}for(;a<r&&(y(),!(a>=r));){let n=t[a];if(h.test(n))a++;else{if(!m)break;n="M"===m?"L":"m"===m?"l":m}const e=n>="a"&&n<="z",o=n.toUpperCase();if("Z"===o){i.length&&i.push({x:u,y:L}),d(),c=u,l=L,m=n;continue}const r=t=>null==t?NaN:t,p=r(M());if(isNaN(p))break;switch(o){case"M":{const t=r(M());if(isNaN(t))return s;b(e?c+p:p,e?l+t:t);break}case"L":{const t=r(M());if(isNaN(t))return s;w(e?c+p:p,e?l+t:t);break}case"H":w(e?c+p:p,l);break;case"V":w(c,e?l+p:p);break;case"C":{const t=[p,M(),M(),M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;C(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3],e?c+n[4]:n[4],e?l+n[5]:n[5]);break}case"S":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t,o=m&&"CcSs".indexOf(m)>=0;C(o?2*c-f:c,o?2*l-g:l,e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"Q":{const t=[p,M(),M(),M()];if(t.some(t=>null==t))return s;const n=t;Z(e?c+n[0]:n[0],e?l+n[1]:n[1],e?c+n[2]:n[2],e?l+n[3]:n[3]);break}case"T":{const t=r(M());if(isNaN(t))return s;const n=m&&"QqTt".indexOf(m)>=0;Z(n?2*c-f:c,n?2*l-g:l,e?c+p:p,e?l+t:t);break}case"A":{const t=p,n=M(),o=M(),r=x(),a=x(),i=M(),h=M();if(null==n||null==o||null==r||null==a||null==i||null==h)return s;A(t,n,o,r,a,e?c+i:i,e?l+h:h);break}default:return s}"C"!==o&&"S"!==o&&"Q"!==o&&"T"!==o&&(f=c,g=l),m=n}return d(),s}function L(t){const n={x0:1/0,y0:1/0,x1:-1/0,y1:-1/0};return t.forEach(t=>{t.forEach(t=>{t.x<n.x0&&(n.x0=t.x),t.y<n.y0&&(n.y0=t.y),t.x>n.x1&&(n.x1=t.x),t.y>n.y1&&(n.y1=t.y)})}),n}const f=128;function g(t,n,e){const o=Math.max(1e-6,t.x1-t.x0),r=Math.max(1e-6,t.y1-t.y0),a=Math.min(n.width*e/o,n.height*e/r);return{scale:a,offX:n.x+n.width/2-(t.x0+o/2)*a,offY:n.y+n.height/2-(t.y0+r/2)*a}}function m(t,n,e){const o=.42*n,r=.45*n,a=t.maxY-t.minY,s=Math.max(1,Math.floor(a/e)),i=t.minY+(a-s*e)/2,c=[];let l=0;for(let a=0;a<s;a++){const s=i+(a+.5)*e,h=t.spansAt(s);for(let t=0;t<h.length;t++){const e=h[t].x1-h[t].x0;let i;i=e>=2*o?Math.floor((e-2*o)/n)+1:e>=r?1:0,i&&(c.push({y:s,x0:h[t].x0,x1:h[t].x1,cap:i,row:a}),l+=i)}}return{cells:c,capacity:l,inset:o}}function p(t,n){const e=new Array(t.length).fill(0);let o=0;for(let n=0;n<t.length;n++)o+=t[n];if(!o||n<=0)return e;let r=0;const a=[];for(let s=0;s<t.length;s++){const i=n*t[s]/o;e[s]=Math.floor(i),r+=e[s],a.push({i:s,frac:i-e[s]})}a.sort((t,n)=>n.frac-t.frac);for(let t=0;r<n;t++,r++)e[a[t%a.length].i]++;return e}function y(t,n,e){let o=1,r=Math.max(t.maxY-t.minY,8);for(let a=0;a<34;a++){const a=(o+r)/2;m(t,a,a*e).capacity>=n?o=a:r=a}return o}function M(t,n){return Math.min(Math.max(t,n/3.2),n/2.3)}const x={rows:null,rowsUp:(t,n)=>n.y-t.y||t.x-n.x,cols:(t,n)=>(t.qx||0)-(n.qx||0)||t.y-n.y,colsRev:(t,n)=>(n.qx||0)-(t.qx||0)||t.y-n.y,centerOut:(t,n)=>(t.qd||0)-(n.qd||0)||t.y-n.y,centerIn:(t,n)=>(n.qd||0)-(t.qd||0)||t.y-n.y};function d(t,n,e,o){const r=void 0!==x[e]?x[e]:null;let a=n;if(r){let t=0,e=0;n.forEach(n=>{t+=n.x,e+=n.y}),t/=n.length||1,e/=n.length||1;const s=o>0?o:1;n.forEach(n=>{n.qx=Math.round(n.x/s),n.qd=Math.round(Math.hypot(n.x-t,n.y-e)/s)}),a=n.slice().sort(r)}const s=[];for(let n=0;n<t.length&&n<a.length;n++)s.push({id:t[n].id,x:a[n].x,y:a[n].y,r:a[n].r});return s}function b(t,n,e,o,r,a){if(n<=0)return;if(1===n)return void a.push({x:(t.x0+t.x1)/2,y:t.y,r:r,row:t.row});let s=t.x0+o;let i=(t.x1-o-s)/(n-1);i>1.5*e&&(i=e,s=(t.x0+t.x1)/2-i*(n-1)/2);for(let e=0;e<n;e++)a.push({x:s+e*i,y:t.y,r:r,row:t.row})}const w=new Set;function C(t,n){const e=n(t),o=t.minUnits||0,r=(n,r)=>{if(o&&n.length&&n.length<o&&!w.has(t.name)){w.add(t.name);const e="stroke"===t.kind?"A stroke thins to a dotted line below that, which may well be fine.":"Fine detail closes up below that.";console.warn(`[ApexCharts] unit shape "${t.name}" reads best from about ${o} units; this chart has ${n.length}. ${e} Lower plotOptions.unit.unitValue to draw more dots, or pick a simpler shape.`)}return e(n,r)};return r.shape=Object.freeze(c({},t)),r.with=e=>C(c(c({},t),e),n),r}const Z=new Map;function A(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a="evenodd"===t.fillRule,s=null==t.sampling?.6:t.sampling;return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Z.get(e);if(!o){const r=u(t,n);o={polys:r,bounds:L(r)},Z.set(e,o)}return o}(n,s);if(!c.length)return[];const h=function(t,n,e={}){const o=!!e.evenOdd,r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e<t.length;e++){const o=t[e],l=t[(e+1)%t.length],h=n.offX+o.x*n.scale,u=n.offY+o.y*n.scale,L=n.offX+l.x*n.scale,f=n.offY+l.y*n.scale;h<i&&(i=h),L<i&&(i=L),h>c&&(c=h),L>c&&(c=L),u<a&&(a=u),f<a&&(a=f),u>s&&(s=u),f>s&&(s=f),u!==f&&r.push({x0:h,y0:u,x1:L,y1:f})}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);return r.forEach(t=>{const n=Math.min(t.y0,t.y1),e=Math.max(t.y0,t.y1);let o=Math.floor((n-a)/l*f),r=Math.floor((e-a)/l*f);o=Math.max(0,Math.min(127,o)),r=Math.max(0,Math.min(127,r));for(let n=o;n<=r;n++)h[n].push(t)}),{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],r=[];for(let n=0;n<e.length;n++){const o=e[n],a=o.y1>o.y0,s=a?o.y0:o.y1,i=a?o.y1:o.y0;t<s||t>=i||r.push({x:o.x0+(t-o.y0)/(o.y1-o.y0)*(o.x1-o.x0),dir:a?1:-1})}if(r.length<2)return[];r.sort((t,n)=>t.x-n.x);const s=[];if(o){for(let t=0;t+1<r.length;t+=2)s.push({x0:r[t].x,x1:r[t+1].x});return s}let i=0,c=0;for(let t=0;t<r.length;t++){const n=i;i+=r[t].dir,0===n&&0!==i?c=r[t].x:0!==n&&0===i&&s.push({x0:c,x1:r[t].x})}return s}}}(c,g(l,i,o),{evenOdd:a}),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),A=M(t[0].r>0?t[0].r:3,x),U=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,A,U)}),d(t,U,e,x)}}function U(t){return C(l(c({},t),{kind:"silhouette"}),A)}const $=U({name:"heart",category:"symbols",minUnits:40,source:"original",path:"M 50 93 C 20 71 5 53 5 34 C 5 17 18 6 32 6 C 41 6 47 11 50 19 C 53 11 59 6 68 6 C 82 6 95 17 95 34 C 95 53 80 71 50 93 Z"}),k=U({name:"droplet",category:"nature",minUnits:40,source:"original",path:"M 50 3 C 50 3 13 46 13 66 A 37 37 0 0 0 87 66 C 87 46 50 3 50 3 Z"}),v=U({name:"human",category:"people",minUnits:80,source:"original",path:"M 39 13 A 11 11 0 0 1 61 13 A 11 11 0 0 1 39 13 Z M 38 30 C 33 31 29 34 27 40 L 19 64 L 26 67 L 33 48 L 34 58 L 31 96 L 44 96 L 46 64 L 54 64 L 56 96 L 69 96 L 66 58 L 67 48 L 74 67 L 81 64 L 73 40 C 71 34 67 31 62 30 Z"}),O=U({name:"tree",category:"nature",minUnits:80,source:"original",path:"M 50 3 C 62 3 70 11 70 19 C 81 16 91 24 91 34 C 97 39 97 51 89 56 C 87 62 77 66 67 63 C 63 68 55 70 50 68 C 45 70 37 68 33 63 C 23 66 13 62 11 56 C 3 51 3 39 9 34 C 9 24 19 16 30 19 C 30 11 38 3 50 3 Z M 41 58 L 59 58 L 60 88 C 61 92 63 94 67 96 L 33 96 C 37 94 39 92 40 88 Z"}),q=U({name:"house",category:"objects",minUnits:120,order:"rows",source:"original",path:"M 50 4 L 97 44 L 97 50 L 84 50 L 84 95 L 16 95 L 16 50 L 3 50 L 3 44 Z M 44 95 L 56 95 L 56 70 L 44 70 Z M 25 58 L 25 69 L 37 69 L 37 58 Z M 63 58 L 63 69 L 75 69 L 75 58 Z"}),j=U({name:"battery",category:"objects",minUnits:40,order:"cols",source:"original",path:"M 14 22 L 72 22 C 78 22 82 26 82 32 L 82 38 L 93 38 L 93 62 L 82 62 L 82 68 C 82 74 78 78 72 78 L 14 78 C 8 78 4 74 4 68 L 4 32 C 4 26 8 22 14 22 Z"}),E=U({name:"shield",category:"technology",minUnits:40,source:"original",path:"M 6 8 L 94 8 L 94 38 C 94 60 82 81 50 97 C 18 81 6 60 6 38 Z"}),P=U({name:"rocket",category:"objects",minUnits:120,source:"original",path:"M 50 2 C 59 13 65 28 66 45 L 66 76 L 58 88 L 42 88 L 34 76 L 34 45 C 35 28 41 13 50 2 Z M 65 56 L 85 86 L 85 95 L 65 82 Z M 35 56 L 15 86 L 15 95 L 35 82 Z M 43.5 34 A 6.5 6.5 0 0 0 56.5 34 A 6.5 6.5 0 0 0 43.5 34 Z"}),Y=t=>t.reduce((t,n)=>t+n,0);function I(t){const n=null==t.padding?.94:t.padding,e="centerIn"===t.order,o=null==t.twist?2.399963:t.twist;return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=t=>{const n=[];for(let e=0;e<t;e++)n.push(Math.max(1,Math.round(2*Math.PI*(e+.5))));return n};let h=1;for(;h<400&&Y(l(h))<a;)h++;const u=s/h,L=p(l(h),a),f=M(t[0].r>0?t[0].r:3,u),g=[];for(let t=0;t<h;t++){const n=e?h-1-t:t,r=(n+.5)*u,a=L[n],s=o*n;for(let n=0;n<a;n++){const e=s+n/a*2*Math.PI;g.push({x:i+r*Math.cos(e),y:c+r*Math.sin(e),r:f,row:t})}}return d(t,g,"rows",u)}}function S(t){const n=null==t.padding?.94:t.padding,e=(null==t.tilt?15:t.tilt)*Math.PI/180,o=t.order||"rows";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.min(r.width,r.height)/2*n,i=r.x+r.width/2,c=r.y+r.height/2,l=Math.cos(e),h=Math.sin(e),u=(t,n,e)=>{const o=n*Math.cos(e);return{x:s*n*Math.sin(e),y:s*(t*l+o*h),depth:o*l-t*h}},L=t=>{const n=Math.max(3,Math.ceil(Math.PI*s/t)),e=Math.PI/n,o=.95*t,r=o,a=new Map,L=[];let f=0;const g=t=>{const n=Math.floor(t.x/r),e=Math.floor(t.y/r);for(let r=-1;r<=1;r++)for(let s=-1;s<=1;s++){const i=a.get(`${n+r},${e+s}`);if(i)for(let n=0;n<i.length;n++)if(Math.hypot(i[n].x-t.x,i[n].y-t.y)<o)return!1}const s=`${n},${e}`,i=a.get(s);return i?i.push(t):a.set(s,[t]),!0};for(let o=0;o<n;o++){const n=-Math.PI/2+(o+.5)*e,r=Math.cos(n),a=Math.sin(n),s=a*h/(r*l||1e-9);if(s>=1)continue;const m=s<=-1?Math.PI:Math.acos(s),p=m>=Math.PI-1e-9,y=[],M=[0];for(let t=0;t<=40;t++){const n=u(a,r,2*m*t/40-m);if(y.push(n),t>0){const e=y[t-1];M.push(M[t-1]+Math.hypot(n.x-e.x,n.y-e.y))}}const x=M[M.length-1],d=p?0:Math.min(.42*t,x/2),b=x-2*d;let w;if(w=p?Math.max(1,Math.round(x/t)):b>0?Math.floor(b/t)+1:x>=.45*t?1:0,!w)continue;const C=p?x/w:w>1?b/(w-1):0,Z=[];let A=0;for(let t=0;t<w;t++){const n=p?t*C:w>1?d+t*C:x/2;for(;A<M.length-2&&M[A+1]<n;)A++;const e=M[A],o=M[A+1],r=o>e?(n-e)/(o-e):0,a=y[A],s=y[A+1],l={x:i+a.x+(s.x-a.x)*r,y:c+a.y+(s.y-a.y)*r,depth:a.depth+(s.depth-a.depth)*r};g(l)&&Z.push(l)}Z.length&&(L.push(Z),f+=Z.length)}return{rows:L,total:f}};let f=1,g=2*s;for(let t=0;t<30;t++){const t=(f+g)/2;L(t).total>=a?f=t:g=t}const m=f,{rows:y}=L(m),x=p(y.map(t=>t.length),a),b=M(t[0].r>0?t[0].r:3,m),w=[];return y.forEach((t,n)=>{const e=x[n];if(e)for(let o=0;o<e;o++){const r=t[Math.min(t.length-1,Math.floor(o*t.length/e))];w.push({x:r.x,y:r.y,r:b*(.62+.38*Math.sqrt(Math.max(0,r.depth))),row:n})}}),w.sort((t,n)=>t.y-n.y||t.x-n.x),d(t,w,o,m)}}function X(t){const n=null==t.padding?.94:t.padding,e=null==t.rowRatio?.9:t.rowRatio,o=t.order||"rowsUp";return(t,r)=>{const a=t.length;if(!a)return[];const s=Math.max(1,Math.round((Math.sqrt(8*a+1)-1)/2)),i=[];for(let t=0;t<s;t++)i.push(t+1);const c=p(i,a),l=Math.max(...c),h=Math.min(r.width*n/Math.max(1,l-1+1.6),r.height*n/(s*e)),u=h*e,L=r.x+r.width/2,f=r.y+(r.height-s*u)/2,g=M(t[0].r>0?t[0].r:3,h),m=[];for(let t=0;t<s;t++)for(let n=0;n<c[t];n++)m.push({x:L+(n-(c[t]-1)/2)*h,y:f+(t+.5)*u,r:g,row:t});return d(t,m,o,h)}}function F(t){return C(l(c({},t),{kind:"rings"}),I)}function N(t){return C(l(c({},t),{kind:"globe"}),S)}function T(t){return C(l(c({},t),{kind:"tiers"}),X)}const R=F({name:"target",category:"business",minUnits:40,order:"centerIn",source:"generated"}),_=N({name:"globe",category:"geography",minUnits:60,tilt:15,source:"generated"}),D=T({name:"pyramid",category:"symbols",minUnits:20,order:"rowsUp",source:"generated"}),Q=U({name:"leaf",category:"nature",minUnits:60,source:"original",path:"M 27.5 7.6 C 22.6 28.3 17.8 49 26.2 64.9 C 35.6 82.6 55.5 90.1 71.6 90.6 C 80.2 77 85.1 56.3 75.7 38.6 C 67.2 22.7 47.3 15.2 27.5 7.6 Z M 67.1 88.5 L 71.9 101.8 L 80.7 97.1 L 72.4 85.7 Z"}),z=U({name:"sun",category:"nature",minUnits:140,source:"original",path:"M 75.5 41.2 L 98 50 L 75.5 58.8 L 74.3 61.8 L 83.9 83.9 L 61.8 74.3 L 58.8 75.5 L 50 98 L 41.2 75.5 L 38.2 74.3 L 16.1 83.9 L 25.7 61.8 L 24.5 58.8 L 2 50 L 24.5 41.2 L 25.7 38.2 L 16.1 16.1 L 38.2 25.7 L 41.2 24.5 L 50 2 L 58.8 24.5 L 61.8 25.7 L 83.9 16.1 L 74.3 38.2 Z"}),B=U({name:"flame",category:"nature",minUnits:60,source:"original",path:"M 56 2 C 52 24 34 30 30 50 C 27 64 33 70 34 78 C 24 72 20 60 21 50 C 12 62 10 76 16 86 C 24 95 38 98 52 98 C 72 98 84 84 82 64 C 80 46 68 40 66 26 C 64 38 60 42 58 44 C 62 30 60 14 56 2 Z"}),V=U({name:"fish",category:"nature",minUnits:80,source:"original",path:"M 20 50 C 34 26 58 20 76 30 C 86 36 92 44 94 50 C 92 56 86 64 76 70 C 58 80 34 74 20 50 Z M 26 50 L 4 74 L 12 50 L 4 26 Z"}),H=U({name:"star",category:"symbols",minUnits:80,source:"original",path:"M 50 2 L 61.8 33.8 L 95.7 35.2 L 69 56.2 L 78.2 88.8 L 50 70 L 21.8 88.8 L 31 56.2 L 4.3 35.2 L 38.2 33.8 Z"}),G=U({name:"arrow",category:"symbols",minUnits:60,source:"original",path:"M 50 4 L 92 46 L 70 46 L 70 96 L 30 96 L 30 46 L 8 46 Z"}),J=U({name:"crown",category:"symbols",minUnits:90,source:"original",path:"M 8 84 L 14 26 L 32 52 L 50 16 L 68 52 L 86 26 L 92 84 Z"}),K=U({name:"cross",category:"symbols",minUnits:40,source:"original",path:"M 36 6 L 64 6 L 64 36 L 94 36 L 94 64 L 64 64 L 64 94 L 36 94 L 36 64 L 6 64 L 6 36 L 36 36 Z"}),W=U({name:"bolt",category:"symbols",minUnits:70,source:"original",path:"M 62 3 L 20 56 L 44 56 L 38 97 L 80 40 L 54 40 Z"}),tt=U({name:"bulb",category:"objects",minUnits:90,source:"original",path:"M 50 4 C 29 4 14 21 14 39 C 14 54 25 62 30 72 L 70 72 C 75 62 86 54 86 39 C 86 21 71 4 50 4 Z M 34 74 L 36 96 L 64 96 L 66 74 Z"}),nt=U({name:"flask",category:"objects",minUnits:60,source:"original",path:"M 40 4 L 60 4 L 60 36 L 92 92 L 8 92 L 40 36 Z"}),et=U({name:"car",category:"objects",minUnits:120,source:"original",path:"M 4 78 L 4 56 L 20 52 L 32 30 L 68 30 L 82 52 L 96 56 L 96 78 Z M 13 78 A 13 13 0 0 1 39 78 A 13 13 0 0 1 13 78 Z M 61 78 A 13 13 0 0 1 87 78 A 13 13 0 0 1 61 78 Z"}),ot=U({name:"plane",category:"objects",minUnits:160,source:"original",path:"M 50 2 C 54 2 57 9 58 19 L 58 35 L 95 57 L 95 67 L 58 57 L 58 76 L 70 86 L 70 95 L 50 89 L 30 95 L 30 86 L 42 76 L 42 57 L 5 67 L 5 57 L 42 35 L 42 19 C 43 9 46 2 50 2 Z"}),rt=U({name:"group",category:"people",minUnits:160,source:"original",path:"M 8 94 L 8 57 C 8 48 14.6 48 14.6 48 L 23.4 48 C 23.4 48 30 48 30 57 L 30 94 Z M 9.5 34 A 9.5 9.5 0 0 1 28.5 34 A 9.5 9.5 0 0 1 9.5 34 Z M 36 94 L 36 47 C 36 38 44.4 38 44.4 38 L 55.6 38 C 55.6 38 64 38 64 47 L 64 94 Z M 38.5 23 A 11.5 11.5 0 0 1 61.5 23 A 11.5 11.5 0 0 1 38.5 23 Z M 70 94 L 70 57 C 70 48 76.6 48 76.6 48 L 85.4 48 C 85.4 48 92 48 92 57 L 92 94 Z M 71.5 34 A 9.5 9.5 0 0 1 90.5 34 A 9.5 9.5 0 0 1 71.5 34 Z"}),at=U({name:"trophy",category:"business",minUnits:110,source:"original",path:"M 30 8 L 70 8 L 68 40 C 68 54 58 62 50 62 C 42 62 32 54 32 40 Z M 45 60 L 55 60 L 55 78 L 45 78 Z M 30 78 L 70 78 L 74 92 L 26 92 Z"}),st=U({name:"moneybag",category:"business",minUnits:80,source:"original",path:"M 36 8 L 64 8 L 59 24 C 80 32 90 48 90 65 C 90 83 73 94 50 94 C 27 94 10 83 10 65 C 10 48 20 32 41 24 Z"}),it=U({name:"funnel",category:"business",minUnits:80,source:"original",path:"M 6 10 L 94 10 L 58 56 L 58 92 L 42 92 L 42 56 Z"}),ct=U({name:"gear",category:"technology",minUnits:260,source:"original",path:"M 82 50.9 L 96.8 54.3 L 93.2 68.5 L 78.6 64.4 L 73.9 71.2 L 83.1 83.3 L 71.2 92 L 62.6 79.4 L 54.7 81.7 L 53.9 96.8 L 39.3 95.8 L 40.8 80.6 L 33.2 77.3 L 22.9 88.4 L 12.4 78.2 L 23.2 67.5 L 19.6 60.1 L 4.6 62 L 3.1 47.4 L 18.2 46.2 L 20.2 38.2 L 7.5 30 L 15.7 17.8 L 28.1 26.7 L 34.8 21.9 L 30.3 7.3 L 44.4 3.3 L 48.2 18 L 56.4 18.7 L 62.3 4.6 L 75.7 10.7 L 69.2 24.4 L 75.1 30.1 L 88.6 23.2 L 95 36.4 L 81.2 42.7 Z M 37 50 A 13 13 0 0 0 63 50 A 13 13 0 0 0 37 50 Z"}),lt=U({name:"robot",category:"technology",minUnits:220,source:"original",path:"M 18 40 C 18 30 26 26 36 26 L 64 26 C 74 26 82 30 82 40 L 82 72 C 82 82 74 86 64 86 L 36 86 C 26 86 18 82 18 72 Z M 46 14 L 54 14 L 54 28 L 46 28 Z M 44 12 A 6 6 0 0 1 56 12 A 6 6 0 0 1 44 12 Z M 29 50 A 7 7 0 0 0 43 50 A 7 7 0 0 0 29 50 Z M 57 50 A 7 7 0 0 0 71 50 A 7 7 0 0 0 57 50 Z"}),ht=U({name:"pin",category:"geography",minUnits:120,source:"original",path:"M 50 96 C 50 96 16 56 16 38 C 16 20 31 6 50 6 C 69 6 84 20 84 38 C 84 56 50 96 50 96 Z M 39 37 A 11 11 0 0 0 61 37 A 11 11 0 0 0 39 37 Z"}),ut=U({name:"mountain",category:"geography",minUnits:60,source:"original",path:"M 2 90 L 34 26 L 50 56 L 64 18 L 98 90 Z"}),Lt=new Map;function ft(t){const n=t.path||"",e=t.order||"rows",o=null==t.padding?.94:t.padding,r=null==t.rowRatio?.88:t.rowRatio,a=null==t.sampling?.6:t.sampling,s=Math.max(.5,(null==t.width?16:t.width)/2);return(t,i)=>{if(!t.length||!n)return[];const{polys:c,bounds:l}=function(t,n){const e=`${n}|${t}`;let o=Lt.get(e);if(!o){const r=u(t,n,!0);o={polys:r,bounds:L(r)},Lt.set(e,o)}return o}(n,a);if(!c.length)return[];const h=function(t,n,e){const o=Math.max(1e-6,e*n.scale),r=[];let a=1/0,s=-1/0,i=1/0,c=-1/0;if(t.forEach(t=>{for(let e=0;e+1<t.length;e++){const l=n.offX+t[e].x*n.scale,h=n.offY+t[e].y*n.scale,u=n.offX+t[e+1].x*n.scale,L=n.offY+t[e+1].y*n.scale,f=Math.hypot(u-l,L-h),g=f>1e-9?-(L-h)/f*o:o,m=f>1e-9?(u-l)/f*o:0;r.push({ax:l,ay:h,bx:u,by:L,nx:g,ny:m}),Math.min(l,u)-o<i&&(i=Math.min(l,u)-o),Math.max(l,u)+o>c&&(c=Math.max(l,u)+o),Math.min(h,L)-o<a&&(a=Math.min(h,L)-o),Math.max(h,L)+o>s&&(s=Math.max(h,L)+o)}}),!r.length)return{minY:0,maxY:0,minX:0,maxX:0,spansAt:()=>[]};const l=Math.max(1e-6,s-a),h=[];for(let t=0;t<f;t++)h.push([]);r.forEach(t=>{const n=Math.min(t.ay,t.by)-o,e=Math.max(t.ay,t.by)+o;let r=Math.floor((n-a)/l*f),s=Math.floor((e-a)/l*f);r=Math.max(0,Math.min(127,r)),s=Math.max(0,Math.min(127,s));for(let n=r;n<=s;n++)h[n].push(t)});const u=(t,n,e)=>{const r=e-n;if(r<=-o||r>=o)return null;const a=Math.sqrt(o*o-r*r);return{x0:t-a,x1:t+a}};return{minY:a,maxY:s,minX:i,maxX:c,spansAt:t=>{const n=Math.floor((t-a)/l*f);if(n<0||n>127)return[];const e=h[n],o=[];for(let n=0;n<e.length;n++){const r=e[n],a=[r.ax+r.nx,r.bx+r.nx,r.bx-r.nx,r.ax-r.nx],s=[r.ay+r.ny,r.by+r.ny,r.by-r.ny,r.ay-r.ny];let i=1/0,c=-1/0;for(let n=0;n<4;n++){const e=(n+1)%4,o=s[n],r=s[e];if(o===r)continue;const l=Math.min(o,r),h=Math.max(o,r);if(t<l||t>=h)continue;const u=a[n]+(t-o)/(r-o)*(a[e]-a[n]);u<i&&(i=u),u>c&&(c=u)}c>i&&o.push({x0:i,x1:c});const l=u(r.ax,r.ay,t);l&&o.push(l);const h=u(r.bx,r.by,t);h&&o.push(h)}if(!o.length)return[];o.sort((t,n)=>t.x0-n.x0);const r=[o[0]];for(let t=1;t<o.length;t++){const n=r[r.length-1];o[t].x0<=n.x1?o[t].x1>n.x1&&(n.x1=o[t].x1):r.push(o[t])}return r}}}(c,g({x0:l.x0-s,y0:l.y0-s,x1:l.x1+s,y1:l.y1+s},i,o),s),x=y(h,t.length,r),w=m(h,x,x*r);if(!w.cells.length)return[];const C=p(w.cells.map(t=>t.cap),t.length),Z=M(t[0].r>0?t[0].r:3,x),A=[];return w.cells.forEach((t,n)=>{b(t,C[n],x,w.inset,Z,A)}),d(t,A,e,x)}}function gt(t){return C(l(c({},t),{kind:"stroke"}),ft)}const mt=gt({name:"check",category:"symbols",minUnits:40,width:19,source:"original",path:"M 13 55 L 37 79 L 87 22"}),pt=gt({name:"wifi",category:"technology",minUnits:120,width:8,source:"original",path:"M 11.9 62 A 44 44 0 0 1 88.1 62 M 24 69 A 30 30 0 0 1 76 69 M 36.1 76 A 16 16 0 0 1 63.9 76 M 50 86 L 50 86"}),yt=gt({name:"pulse",category:"technology",minUnits:60,width:11,source:"original",path:"M 4 58 L 26 58 L 35 30 L 47 84 L 59 44 L 68 58 L 96 58"}),Mt=gt({name:"xmark",category:"symbols",minUnits:40,width:18,source:"original",path:"M 18 18 L 82 82 M 82 18 L 18 82"}),xt=gt({name:"percent",category:"symbols",minUnits:150,width:9,source:"original",path:"M 12 24 A 12 12 0 0 1 36 24 A 12 12 0 0 1 12 24 Z M 64 76 A 12 12 0 0 1 88 76 A 12 12 0 0 1 64 76 Z M 80 14 L 20 86"}),dt=gt({name:"question",category:"symbols",minUnits:90,width:14,source:"original",path:"M 25 32 C 25 8 76 8 76 33 C 76 52 50 54 50 70 M 50 90 L 50 90"}),bt=gt({name:"spiral",category:"symbols",minUnits:140,width:9,source:"generated",path:"M 56.0 50.0 L 56.4 51.4 L 56.5 52.9 L 56.2 54.5 L 55.5 56.1 L 54.3 57.5 L 52.9 58.8 L 51.0 59.7 L 48.9 60.3 L 46.6 60.3 L 44.3 59.9 L 42.0 58.9 L 39.9 57.3 L 38.1 55.3 L 36.8 52.8 L 35.9 50.0 L 35.7 47.0 L 36.2 43.8 L 37.3 40.8 L 39.1 37.9 L 41.6 35.5 L 44.7 33.5 L 48.1 32.3 L 51.9 31.7 L 55.8 32.0 L 59.7 33.1 L 63.4 35.1 L 66.6 37.9 L 69.3 41.4 L 71.1 45.5 L 72.2 50.0 L 72.2 54.7 L 71.2 59.4 L 69.2 64.0 L 66.3 68.1 L 62.4 71.5 L 57.8 74.1 L 52.7 75.8 L 47.2 76.3 L 41.7 75.7 L 36.2 73.8 L 31.2 70.9 L 26.8 66.8 L 23.4 61.9 L 21.0 56.2 L 19.8 50.0 L 19.9 43.6 L 21.4 37.3 L 24.2 31.3 L 28.3 25.9 L 33.5 21.5 L 39.7 18.2 L 46.4 16.2 L 53.6 15.7 L 60.8 16.6 L 67.8 19.2 L 74.2 23.1 L 79.7 28.4 L 84.0 34.9 L 86.9 42.1 L 88.3 50.0 L 88.0 58.1 L 86.0 66.0 L 82.3 73.5 L 77.1 80.1 L 70.5 85.5 L 62.8 89.5 L 54.4 91.8 L 45.5 92.4 L 36.7 91.0 L 28.2 87.8 L 20.4 82.9 L 13.8 76.3 L 8.6 68.4 L 5.2 59.5 L 3.6 50.0 L 4.1 40.2 L 6.6 30.7 L 11.2 21.8"}),wt=[$,k,v,O,q,j,E,P,R,_,D,Q,z,B,V,H,G,J,K,W,tt,nt,et,ot,rt,at,st,it,ct,lt,ht,ut,mt,pt,yt,Mt,xt,dt,bt],Ct="__apexcharts_unit_layouts__";function Zt(){const t=globalThis;return t[Ct]||(t[Ct]={}),t[Ct]}function At(t){const n=Zt(),e=[];return(Array.isArray(t)?t.map(t=>[t.shape?t.shape.name:"",t]):Object.entries(t)).forEach(([t,o])=>{const r=String(t),a=o;r&&"function"==typeof a&&(n[r]=a,e.push(r))}),e}const Ut=46,$t=48,kt=88,vt={a:[8,8,38,8],b:[40,11,40,45],c:[40,51,40,85],d:[8,kt,38,kt],e:[6,51,6,85],f:[6,11,6,45],g:[8,$t,38,$t]},Ot={0:"abcdef",2:"abdeg",3:"abcdg",4:"bcfg",5:"acdfg",6:"acdefg",7:"abc",8:"abcdefg",9:"abcdfg","-":"g"},qt={1:t=>`M ${t+17} 11 L ${t+17} 45 M ${t+17} 51 L ${t+17} 85 `,".":t=>`M ${t+20} 88 L ${t+20} 88 `,",":t=>`M ${t+21} 86 L ${t+15} 98 `,":":t=>`M ${t+20} 34 L ${t+20} 34 M ${t+20} 62 L ${t+20} 62 `},jt={1:23,".":19.32,",":19.32,":":19.32," ":23};function Et(t,n=10){let e="",o=0;for(const r of String(t)){if(" "===r){o+=jt[" "]+n;continue}const t=qt[r];if(t){e+=t(o),o+=(jt[r]||Ut)+n;continue}const a=Ot[r];if(!a)throw new Error(`[ApexCharts] glyphs(): no seven-segment form for "${r}". Digits, "-", ".", "," and ":" are available.`);for(const t of a){const n=vt[t];e+=`M ${o+n[0]} ${n[1]} L ${o+n[2]} ${n[3]} `}o+=(jt[r]||Ut)+n}return e.trim()}const Pt=["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"];function Yt(t,n){let e=0;for(let o=0;o<t.length;o++)if(e+=t[o],n<e)return o;return t.length-1}function It(t){return Math.round(10*t)/10}At(wt);const St=globalThis;St.ApexCharts&&(St.ApexCharts.unitShapes=wt),t.arrow=G,t.battery=j,t.bolt=W,t.bulb=tt,t.car=et,t.catalog=wt,t.check=mt,t.cross=K,t.crown=J,t.digitsPath=Et,t.droplet=k,t.fish=V,t.flame=B,t.flask=nt,t.funnel=it,t.gear=ct,t.globe=_,t.glyphs=function(t,n={}){const e=String(t),o=n,{gap:i}=o,h=((t,n)=>{var e={};for(var o in t)a.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&r)for(var o of r(t))n.indexOf(o)<0&&s.call(t,o)&&(e[o]=t[o]);return e})(o,["gap"]);return gt(l(c({name:`glyphs-${e}`,category:"symbols",minUnits:Math.max(60,180*e.replace(/[^0-9]/g,"").length),source:"generated",width:13},h),{path:Et(e,i)}))},t.group=rt,t.heart=$,t.house=q,t.human=v,t.leaf=Q,t.moneybag=st,t.mountain=ut,t.outlined=function(t,n=14){const e=t.shape;if(!e.path)throw new Error(`[ApexCharts] outlined(): "${e.name}" has no outline to trace. The generated shapes (rings, globe, tiers) compute positions directly, so there is no path to stroke.`);return gt(l(c({},e),{name:`${e.name}-outline`,width:n,minUnits:Math.max(e.minUnits||0,120)}))},t.percent=xt,t.pin=ht,t.plane=ot,t.preview=function(t,n={}){const e=n.series&&n.series.length?n.series:null,o=e?e.reduce((t,n)=>t+Math.max(0,n),0):0,r=Math.max(1,Math.round(n.count||o||t.shape.minUnits||220)),a=n.width||300,s=n.height||a,i=n.padding||0,c=(Array.isArray(n.fill)?n.fill:n.fill?[n.fill]:null)||(e?Pt:["#008FFB"]),l=e?function(t,n){const e=t.map(t=>Math.max(0,t)),o=p(e,n);for(let t=0;t<o.length;t++){if(o[t]||!e[t])continue;let n=0;for(let t=1;t<o.length;t++)o[t]>o[n]&&(n=t);o[n]>1&&(o[n]--,o[t]=1)}return o}(e,r):null,h=[],u=[],L=n.r||Math.max(1.2,Math.sqrt(a*s/r)/2.6);for(let t=0;t<r;t++){const n=l?Yt(l,t):0;u.push(n),h.push({id:`p:${t}`,index:t,seriesIndex:n,dataPointIndex:t,label:l?`series-${n+1}`:"preview",value:1,datum:void 0,r:L})}const f=t(h,{x:i,y:i,width:Math.max(1,a-2*i),height:Math.max(1,s-2*i)}),g=new Map;f.forEach((t,n)=>{const e=l?u[n]%c.length:Math.floor(n/f.length*c.length),o=c[e]||c[0],r=`<circle cx="${It(t.x)}" cy="${It(t.y)}" r="${It(t.r||3)}"/>`,a=g.get(o);a?a.push(r):g.set(o,[r])});let m="";return g.forEach((t,n)=>{m+=`<g fill="${n}">${t.join("")}</g>`}),!1===n.svg?m:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${a} ${s}" width="${a}" height="${s}" role="img" aria-label="${t.shape.name} drawn with ${f.length} dots">${m}</svg>`},t.pulse=yt,t.pyramid=D,t.question=dt,t.registerShapes=At,t.registeredShapeNames=function(){return Object.keys(Zt())},t.rings=F,t.robot=lt,t.rocket=P,t.shapeFrom=function(t,n={}){return U(l(c({name:"custom"},n),{path:t}))},t.shield=E,t.silhouette=U,t.sphere=N,t.spiral=bt,t.star=H,t.stroke=gt,t.strokeFrom=function(t,n={}){return gt(l(c({name:"custom-stroke"},n),{path:t}))},t.sun=z,t.target=R,t.tiers=T,t.tree=O,t.trophy=at,t.unregisterShapes=function(t){const n=Zt();(Array.isArray(t)?t:[t]).forEach(t=>{delete n[t]})},t.wifi=pt,t.xmark=Mt,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|