apexcharts 7.2.0 → 7.4.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/LICENSE +30 -11
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +545 -463
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.esm.js +1149 -801
- package/dist/apexcharts.js +684 -254
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +684 -254
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +20 -10
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +20 -10
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +20 -10
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +20 -10
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +545 -463
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +20 -10
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +364 -26
- 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 +2 -2
- package/dist/features/exports.esm.js +12 -14
- package/dist/features/exports.js +2 -2
- 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 +2 -2
- package/dist/features/keyboard.esm.js +14 -1
- package/dist/features/keyboard.js +2 -2
- 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 +38 -38
- 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 +11 -11
- 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 +11 -11
- 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 +2 -2
- package/dist/features/toolbar.esm.js +172 -25
- package/dist/features/toolbar.js +2 -2
- 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 +180 -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 +2 -2
- package/dist/histogram.esm.js +20 -10
- 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 +2 -2
- package/dist/raincloud.esm.js +20 -10
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +20 -10
- 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 +79 -79
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +20 -10
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +20 -10
- package/package.json +2 -2
- package/src/apexcharts.js +39 -15
- package/src/charts/common/bar/Helpers.js +31 -12
- package/src/modules/Data.js +8 -2
- package/src/modules/Exports.js +14 -12
- package/src/modules/Formatters.js +24 -1
- package/src/modules/Range.js +28 -1
- package/src/modules/Toolbar.js +112 -2
- package/src/modules/ZoomPanSelection.js +85 -7
- package/src/modules/accessibility/KeyboardNavigation.js +14 -0
- package/src/modules/axes/YAxis.js +12 -15
- package/src/modules/helpers/UpdateHelpers.js +25 -8
- package/src/modules/settings/Globals.js +5 -10
- package/src/modules/settings/Options.js +15 -0
- package/src/modules/weave/PluginAPI.js +57 -1
- package/src/modules/weave/WeaveHost.js +148 -0
- package/src/ssr/DOMShim.js +50 -0
- package/src/types/internal.d.ts +1 -1
- package/src/utils/Utils.js +6 -9
- package/types/apexcharts.d.ts +17 -0
package/dist/unit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.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).ApexUnit={})}(this,function(t){"use strict";var e=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(t,i,a)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[i]=a,l=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&o(t,i,e[i]);if(s)for(var i of s(e))n.call(e,i)&&o(t,i,e[i]);return t},c=(t,e)=>i(t,a(e));const h=globalThis.ApexCharts,u=1/45;function d(t,e,i,a){return{value:t,velocity:0,target:t,stiffness:e,damping:i}}function p(t,e){if(e<=0)return f(t);let i=e;for(;i>0;){const e=Math.min(i,u),a=-t.stiffness*(t.value-t.target)-t.damping*t.velocity;t.velocity+=a*e,t.value+=t.velocity*e,i-=e}return!!f(t)&&(t.value=t.target,t.velocity=0,!0)}function m(t,e){t.target=e}function f(t){var e,i;const a=null!=(e=t.restVelocity)?e:.05,s=null!=(i=t.restDisplacement)?i:.05;return Math.abs(t.velocity)<a&&Math.abs(t.value-t.target)<s}const x={crisp:[210,26],gentle:[120,20],snappy:[320,30]};const g=globalThis.ApexCharts.__internals.__apex_Graphics,y="__apexcharts_unit_layouts__";function b(t){return t&&globalThis[y][t]||null}globalThis[y]||(globalThis[y]={});const M="__apexcharts_unit_marks__";function _(t,e){if("string"==typeof t){const e=t.trim();return e?Object.freeze({name:"anonymous",path:e,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(c(l({},t),{name:t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}function A(t){return t&&globalThis[M][t]||null}globalThis[M]||(globalThis[M]={});const w=globalThis.ApexCharts.__internals.__apex_Utils,S=globalThis.ApexCharts.__internals.__apex_Environment_Environment,R=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,k=globalThis.ApexCharts.__internals;k.__apex_Animations,k.__apex_Animations_computeStagger,k.__apex_Animations_applyAnimationPolicy;const v=k.__apex_Animations_prefersReducedMotion;k.__apex_Animations_applyProgressiveReveal;const F=Math.PI*(3-Math.sqrt(5));function E(t){return 1-Math.pow(1-t,3)}function C(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function T(t,e){const[i,a]=null!=(r=x[null!=(s=t)?s:"crisp"])?r:x.crisp;var s,r;const n=800/Math.max(1,e);return[i*n*n,a*n]}h.use({unit:class{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(t){const e=this.w,i=new g(e,this.ctx),a=i.group({class:"apexcharts-unit"});if(e.globals.noData||!Array.isArray(t)||0===t.length)return a;const s=e.config.plotOptions.unit,r="packed"===s.layout?"packed":"columns"===s.layout?"columns":"grid"===s.layout?"grid":"scatter"===s.layout?"scatter":"arc"===s.layout?"arc":"custom"===s.layout?"custom":"grouped",n=s.transition,o="flow"===n,l="identity"===n,c=s.unitValue>0?s.unitValue:1;let h=t.map(t=>{const e=Math.abs(w.parseNumber(t))/c;return e>0?Math.max(1,Math.round(e)):0});h=this._applyMaxUnits(h,s.maxUnits);const u=h.reduce((t,e)=>t+e,0),d="packed"===r?this._layoutPacked(h,s):"columns"===r?this._layoutColumns(h,s):"grid"===r?this._layoutGrid(h,s):"scatter"===r?this._layoutScatter(s):"arc"===r?this._layoutArc(h,s):"custom"===r?this._layoutCustom(h,s):this._layoutGrouped(h,s),p="grid"===r&&!(!s.grid||!s.grid.split);p&&this._drawGridTrack(a,i,s),"scatter"===r&&this._drawScatterAxes(a,i);const m=this._lastDotR,f=this._shouldAnimate(),x=this.ctx&&this.ctx.morphTypeChange,y=f&&!!x&&"function"==typeof x.isActive&&x.isActive()&&"function"==typeof x.getInitialCenterFor,b=y&&"function"==typeof x.getInitialSlotFor,M=y&&"function"==typeof x.usesPieceTakeover&&x.usesPieceTakeover(),_=f&&!y&&this.ctx?this.ctx._unitPrevDots:null,A=new Map,S=[],R=e.seriesData.unitData||[],k=this._bubbleStats(R,s,m);let v=0;if(d.forEach(t=>{const n=e.globals.colors[t.i]||e.globals.colors[0]||"#008FFB",c=i.group({class:"apexcharts-series",seriesName:w.escapeString(e.seriesData.seriesNames[t.i]||`series-${t.i+1}`),rel:t.i+1,"data:realIndex":t.i}),d=y&&!b?x.getInitialCenterFor(t.i):null,g=t.dots.length,F=R[t.i];if(t.dots.forEach((e,a)=>{const r=null!=e.j?e.j:a,h=F?F[r]:void 0,u=h&&"object"==typeof h&&h.fillColor?h.fillColor:n,y=null!=e.r?e.r:k?this._radiusForValue(this._unitValueOf(h),k):m,w=this._markSpecFor(s,h,t.i,y),R=this._drawDot(i,s,y,u,t.i,r,w);let E;if(c.add(R),l){const t=h&&"object"==typeof h?null!=h.id?h.id:h.name:void 0;E=null!=t?`id:${t}`:`g:${v}`}else E=o?String(v):null!=e.slot?`slot:${e.slot}`:`${t.i}:${r}`;if(v++,A.set(E,{x:e.x,y:e.y,fill:u,r:y,spec:w}),M)this._place(R.node,w,e.x,e.y),R.node.setAttribute("opacity","0"),R.node.setAttribute("data-piece-hidden","1");else if(f){const i=_&&_.get(E),a=i||(b?x.getInitialSlotFor(t.i,r,g):d),n=s.gather&&s.gather.enter||"burst",o=p||"fade"===n||"rise"===n,l=a?a.x:o?e.x:t.cx,c=a?a.y:"rise"!==n||p?o?e.y:t.cy:e.y+14;R.node.style.opacity=a?"1":"0",this._place(R.node,w,l,c),S.push({node:R.node,spec:w,x:e.x,y:e.y,cx0:l,cy0:c,key:E,r0:i&&null!=i.r?i.r:y,r1:y,fill0:i?i.fill:u,fill1:u,delay:0,isEnter:!a})}else this._place(R.node,w,e.x,e.y)}),("grouped"===r||"columns"===r||p)&&s.clusterLabels&&s.clusterLabels.show&&h[t.i]>0){const e=p?this._gridDenom:u;this._drawClusterLabel(c,t,h[t.i],e,s,n)}a.add(c)}),this._outerLabelsOn(s)&&this._drawOuterLabels(a,d,h,u,s,f&&!_),_){const t=this._collectExits(_,A,s);if(t.length){const e=i.group({class:"apexcharts-unit-exits"});a.add(e),this._runExits(e,t,s)}}return this.ctx&&(this.ctx._unitPrevDots=A),!this.ctx||f&&!y||(this.ctx._unitSprings=null),f&&S.length?this._runGather(S):e.globals.animationEnded=!0,a}_applyMaxUnits(t,e){const i=t.reduce((t,e)=>t+e,0);if(!e||e<=0||i<=e)return t;const a=e/i;return console.warn(`[ApexCharts] unit chart: ${i} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),t.map(t=>t>0?Math.max(1,Math.round(t*a)):0)}_layoutCustom(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=t.reduce((t,e)=>t+e,0),n=this._resolveLayoutProvider(e);if(!n)return console.warn("[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'."),this._layoutGrouped(t,e);const o=this._outerLabelsOn(e)?this._outerLabelGutter(t,e):0;this._lastOuterGutter=o;const l={x:o,y:0,width:Math.max(1,a-2*o),height:s},c=Math.sqrt(l.width*l.height/Math.PI),h=this._resolveStep(e,c,r);this._lastDotR=this._dotRadiusFromStep(h,e);const u=this._lastDotR,d=this._layoutObjects(t,u);let p;try{p=n(d,l)}catch(i){return console.warn("[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.",i),this._layoutGrouped(t,e)}if(!Array.isArray(p))return console.warn("[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'."),this._layoutGrouped(t,e);const m=new Map;p.forEach(t=>{t&&isFinite(t.x)&&isFinite(t.y)&&m.set(String(t.id),{x:t.x,y:t.y,r:"number"==typeof t.r&&t.r>0?t.r:void 0})});const f=t.map((t,e)=>({i:e,cx:a/2,cy:s/2,outerR:u,dots:[]}));return d.forEach(t=>{const e=m.get(t.id);e&&f[t.seriesIndex].dots.push({x:e.x,y:e.y,r:e.r,j:t.dataPointIndex})}),f.forEach(t=>{if(!t.dots.length)return;let e=0,i=0;t.dots.forEach(t=>{e+=t.x,i+=t.y}),t.cx=e/t.dots.length,t.cy=i/t.dots.length;let a=0;t.dots.forEach(e=>{a=Math.max(a,Math.hypot(e.x-t.cx,e.y-t.cy))}),t.outerR=a+u}),f}_layoutObjects(t,e){const i=this.w,a=i.seriesData.unitData||[],s=i.seriesData.seriesNames||[],r=[];let n=0;return t.forEach((t,i)=>{var o;const l=a[i];for(let a=0;a<t;a++){const t=l?l[a]:void 0,c=!t||"object"!=typeof t||null==t.id&&null==t.name?`${i}:${a}`:String(null!=t.id?t.id:t.name);r.push({id:c,index:n,seriesIndex:i,dataPointIndex:a,label:s[i],value:null!=(o=this._unitValueOf(t))?o:void 0,datum:t,r:e}),n++}}),r}_resolveLayoutProvider(t){const e=t.positions;if("function"==typeof e)return e;if("string"==typeof e&&e){const t=b(e);if(t)return t;console.warn(`[ApexCharts] unit chart: no layout named "${e}" is registered. Register one with ApexCharts.registerUnitLayout("${e}", fn).`)}return null}_layoutGrouped(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.clusterLabels&&e.clusterLabels.show?30:6,n=t.map((t,e)=>e).filter(e=>t[e]>0),o=Math.max(1,n.length),l=new Array(t.length).fill(-1);n.forEach((t,e)=>l[t]=e);const c=a/o,h=s-r,u=Math.max(1,...t),d=.08*Math.min(c,h),p=Math.max(4,Math.min(c,h)/2-d),m=this._resolveStep(e,p,u);this._lastDotR=this._dotRadiusFromStep(m,e);const f=this._lastDotR,x=r+h/2,g=t.map(t=>m*Math.sqrt(Math.max(1,t))+f);let y=t.map((t,e)=>(t=>l[t]>=0?c*(l[t]+.5):a/2)(e));const b=n.map(t=>g[t]);let M=!1;for(let t=1;t<o;t++)if(y[n[t]]-y[n[t-1]]<b[t]+b[t-1]){M=!0;break}if(M){const e=Math.max(2*f,8),i=b.reduce((t,e)=>t+2*e,0)+e*(o-1);let s;if(i<=a){let t=(a-i)/2;s=b.map(i=>{const a=t+i;return t+=2*i+e,a})}else if(1===o)s=[a/2];else{const t=b[0],e=a-b[o-1];s=b.map((i,a)=>t+(e-t)*a/(o-1))}y=t.map((t,e)=>l[e]>=0?s[l[e]]:a/2)}return t.map((t,e)=>({i:e,cx:y[e],cy:x,outerR:g[e],dots:this._spiral(y[e],x,t,m,0)}))}_layoutPacked(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),n=Math.max(4,Math.min(a,s-6)/2-.06*Math.min(a,s)),o=this._resolveStep(e,n,r);this._lastDotR=this._dotRadiusFromStep(o,e);const l=a/2,c=6+(s-6)/2,h=t.map((t,e)=>e);!1!==e.sortByGroup&&h.sort((e,i)=>t[e]-t[i]);const u=t.map((t,e)=>({i:e,cx:l,cy:c,outerR:o*Math.sqrt(r)+this._lastDotR,dots:[]}));let d=0;return h.forEach(e=>{for(let i=0;i<t[e];i++){const t=o*Math.sqrt(d+.5),i=d*F;u[e].dots.push({x:l+t*Math.cos(i),y:c+t*Math.sin(i),slot:d}),d++}}),u}_layoutArc(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=Math.max(1,t.reduce((t,e)=>t+e,0)),n=e.arc||{},o="number"==typeof n.startAngle?n.startAngle:-90,l="number"==typeof n.endAngle?n.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,u=h-c||Math.PI,d=Math.max(0,Math.min(.95,"number"==typeof n.innerRadiusRatio?n.innerRadiusRatio:.4)),p=t=>Math.sin(t),m=t=>-Math.cos(t),f=this._arcBounds(c,h),x=.04*Math.min(a,s),g=Math.max(1e-6,f.maxX-f.minX),y=Math.max(1e-6,f.maxY-f.minY),b=Math.max(4,Math.min((a-2*x)/g,(s-2*x)/y)),M=b*d,_=a/2-(f.minX+f.maxX)/2*b,A=s/2-(f.minY+f.maxY)/2*b,w=this._arcAllocate(r,M,b,u,e);this._lastDotR=w.dotR;const S=[];for(let t=0;t<w.R;t++){const e=w.radii[t],i=w.seatsPerRow[t];for(let t=0;t<i;t++){const a=1===i?(c+h)/2:c+u*(t+.5)/i;S.push({a:a,x:_+e*p(a),y:A+e*m(a)})}}S.sort((t,e)=>t.a-e.a);const R=t.map((t,e)=>({i:e,cx:_,cy:A,outerR:b,dots:[]}));let k=0,v=0;return S.forEach((e,i)=>{for(;k<t.length&&v>=t[k];)k++,v=0;k>=t.length||(R[k].dots.push({x:e.x,y:e.y,slot:i}),v++)}),R}_arcBounds(t,e){const i=t=>Math.sin(t),a=t=>-Math.cos(t),s=Math.min(t,e),r=Math.max(t,e),n=[0,i(t),i(e)],o=[0,a(t),a(e)],l=Math.PI/2;for(let t=Math.ceil(s/l);t*l<=r;t++)n.push(i(t*l)),o.push(a(t*l));return{minX:Math.min(...n),maxX:Math.max(...n),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,i,a,s){const r=s.spacing>0?s.spacing:1.05,n=Math.abs(a)||Math.PI,o=this._fixedRadius(s),l=a=>{a=Math.max(1,Math.round(a));const s=[];for(let t=0;t<a;t++)s.push(1===a?(e+i)/2:e+t/(a-1)*(i-e));const o=s.reduce((t,e)=>t+e,0)||1,l=s.map(e=>t*e/o),c=l.map(t=>Math.floor(t));let h=t-c.reduce((t,e)=>t+e,0);for(l.map((t,e)=>({idx:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac).forEach(t=>{h>0&&(c[t.idx]++,h--)});h>0;)c[a-1]++,h--;const u=1===a?i-e||i:(i-e)/(a-1);let d=1/0;for(let t=0;t<a;t++){const e=c[t];if(e<=0)continue;const i=s[t]*n/e;i<d&&(d=i)}const p=Math.min(u,d);return{R:a,radii:s,seatsPerRow:c,dotR:Math.max(1,p/(2*r))}},c=s.arc&&s.arc.rows;let h;if("number"==typeof c&&c>=1)h=l(c);else if(o){h=l((i-e)/(2*o*r)+1)}else{const e=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let t=2;t<=e;t++){const e=l(t);e.dotR>h.dotR&&(h=e)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=!(!e.clusterLabels||!e.clusterLabels.show),n=r&&"bottom"===e.clusterLabels.position,o=r&&!n?30:6,l=t.map((t,e)=>e).filter(e=>t[e]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((t,e)=>h[t]=e);const u=a/c,d=.62*u,p=Math.max(8,.04*s)+(n?30:0),m=Math.max(4,s-o-p),f=Math.max(1,...t),x=e.spacing>0?e.spacing:1,g=e.columns?e.columns.size:void 0;let y;y="image"!==e.shape&&"auto"===g?null:"image"!==e.shape&&"number"==typeof g&&g>0?g:this._fixedRadius(e);let b=1,M=0;if(y){M=2*y*x,this._lastDotR=y;const t=Math.max(1,Math.floor(m/M)),e=Math.max(1,Math.floor(d/M));b=Math.max(1,Math.min(e,Math.ceil(f/t)))}else{let t=0;const e=Math.max(1,Math.min(40,Math.round(d/4)));for(let i=1;i<=e;i++){const e=Math.ceil(f/i),a=Math.min(d/i,m/e);a>t&&(t=a,b=i)}M=t,this._lastDotR=Math.max(1,M/(2*x))}const _=this._lastDotR,A=Math.ceil(f/b),w=o+(m+Math.min(m,A*M))/2;return t.map((t,e)=>{const i=h[e]>=0?u*(h[e]+.5):a/2,s=Math.ceil(Math.max(1,t)/b)*M,r=i-b*M/2+M/2,n=[];for(let e=0;e<t;e++){const t=Math.floor(e/b),i=e%b;n.push({x:r+i*M,y:w-_-t*M})}return{i:e,cx:i,cy:w-s/2,outerR:s/2,flat:!0,dots:n}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=r.total>0?this._largestRemainder(t,Math.round(r.total)):t.slice(),c=l.reduce((t,e)=>t+e,0),h=Math.max(1,Math.ceil(Math.max(1,c)/n)),u=e.spacing>0?e.spacing:1,d=Math.max(4,a),p=Math.max(4,s-6),m=this._fixedRadius(e);let f=0;m?(f=2*m*u,this._lastDotR=m):(f=Math.min(d/n,p/h),this._lastDotR=Math.max(1,f/(2*u)));const x=n*f,g=h*f,y=(a-x)/2+f/2,b=6+(p-g)/2,M=t=>"bottom"===o?b+g-f/2-t*f:b+f/2+t*f,_=t.map((t,e)=>({i:e,cx:a/2,cy:6+p/2,outerR:Math.max(x,g)/2,dots:[]}));let A=0;for(let t=0;t<l.length;t++)for(let e=0;e<l[t];e++){const e=A%n,i=Math.floor(A/n);_[t].dots.push({x:y+e*f,y:M(i),slot:A}),A++}return _}_layoutGridSplit(t,e){const i=this.w,a=i.layout.gridWidth,s=i.layout.gridHeight,r=e.grid||{},n=Math.max(1,Math.round(r.columns>0?r.columns:10)),o="top"===r.fillFrom?"top":"bottom",l=Math.max(1,Math.round(r.total>0?r.total:100)),c=Math.max(1,Math.ceil(l/n)),h=t.map((t,e)=>e).filter(e=>t[e]>0),u=Math.max(1,h.length),d=r.max>0?r.max:Math.max(1,...t),p=Math.max(1,Math.round(r.tileColumns>0?r.tileColumns:Math.ceil(Math.sqrt(u)))),m=Math.max(1,Math.ceil(u/p)),f=!(e.clusterLabels&&!1===e.clusterLabels.show),x=f&&e.clusterLabels&&"bottom"===e.clusterLabels.position,g=f&&!x?22:4,y=f&&x?22:4,b=a/p,M=s/m,_=Math.max(4,.86*b),A=Math.max(4,M-g-y),w=e.spacing>0?e.spacing:1,S=this._fixedRadius(e);let R=0;S?(R=2*S*w,this._lastDotR=S):(R=Math.min(_/n,A/c),this._lastDotR=Math.max(1,R/(2*w)));const k=n*R,v=c*R,F=(t,e)=>"bottom"===o?t+v-R/2-e*R:t+R/2+e*R,E=[],C=[];return h.forEach((e,i)=>{const a=i%p,s=Math.floor(i/p),r=a*b,o=r+(b-k)/2+R/2,c=s*M+g+(A-v)/2,h=t=>({x:o+t%n*R,y:F(c,Math.floor(t/n))});for(let t=0;t<l;t++)E.push(h(t));const u=Math.max(0,Math.min(l,Math.round(t[e]/d*l))),m=[];for(let t=0;t<u;t++){const e=h(t);m.push({x:e.x,y:e.y,slot:i*l+t})}C.push({i:e,cx:r+b/2,cy:c+v/2,outerR:v/2,flat:!0,split:!0,dots:m})}),this._gridDenom=d,this._gridTrack={cells:E},C}_drawGridTrack(t,e,i){const a=this._gridTrack;if(!a||!a.cells||!a.cells.length)return;const s=this._lastDotR,r=(i.grid||{}).trackColor||"rgba(128,128,128,0.14)",n=e.group({class:"apexcharts-unit-track"});a.cells.forEach(t=>{let a;if("square"===i.shape){const n=2*s;a=e.drawRect(0,0,n,n,i.borderRadius||0,r,1,0,"none"),a.node.setAttribute("fill",r),a.node.setAttribute("x",String(t.x-s)),a.node.setAttribute("y",String(t.y-s))}else a=e.drawCircle(s,{fill:r,"stroke-width":0,stroke:"none"}),a.node.setAttribute("fill",r),a.node.setAttribute("cx",String(t.x)),a.node.setAttribute("cy",String(t.y));a.node.classList.add("apexcharts-unit-track-cell"),n.add(a)}),t.add(n)}_layoutScatter(t){const e=this.w,i=t.scatter||{};if("value"===i.y)return this._layoutScatter2D(t);if("vertical"===i.orientation)return this._layoutScatterVertical(t);const a=e.layout.gridWidth,s=e.layout.gridHeight,r=e.seriesData.unitData||[],n=e.seriesData.seriesNames||[],o=t=>this._unitValueOf(t),l=this._scatterSizeStats(i,r),c=r.map(t=>Array.isArray(t)?t.map(o):[]),h=t=>null!=t&&isFinite(t),u=c.map((t,e)=>e).filter(t=>c[t].some(h)),d=Math.max(1,u.length);let p=1/0,m=-1/0;c.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<p&&(p=t),t>m&&(m=t))})),p===1/0&&(p=0,m=1);const f=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),x=this._scatterValueDomain(i,p,m,f),g=x.min,y=x.max,b=y-g||1,M=null!=i.laneLabelWidth?Math.max(0,i.laneLabelWidth):d>1?92:8,_=30+(i.xTitle?20:0),A=M,w=a-8,S=s-_,R=Math.max(4,w-A),k=Math.max(4,S-10),v=t=>A+(t-g)/b*R,F=k/d;let E=0;const C=this._fixedRadius(t);if(C)E=C;else{const t=Math.max(1,...u.map(t=>c[t].filter(h).length));E=Math.max(2,Math.min(6,.12*F,R/(2.5*Math.sqrt(t))))}this._lastDotR=E;const T=t.spacing>0?t.spacing:1,D=Math.max(.5,E*T),L="jitter"===i.spread,$=[],B=[],z=l?l.rMax:E;u.forEach((t,e)=>{const i=(t=>10+F*(t+.5))(e);B.push({i:t,cy:i,name:n[t]||`series-${t+1}`});const a=(r[t]||[]).map((t,e)=>{const a=o(t),s={j:e,px:v(h(a)?a:g),y:i};return l&&(s.r=this._scatterRadius(t,l,E)),s});if(L){const t=Math.max(z,F/2-z);a.forEach((e,a)=>{const s=(9301*a+49297)%233280/233280;e.y=i+(2*s-1)*t})}else this._beeswarm(a,i,E,D,z);$.push({i:t,cx:(A+w)/2,cy:i,outerR:F/2,dots:a.map(t=>({x:t.px,y:t.y,r:t.r}))})});const Y=x.ticks;return this._scatterAxis={mode:"1d",plotL:A,plotR:w,plotT:10,plotB:S,xMin:g,xMax:y,plotX:v,ticks:Y,lanes:B,xTitle:i.xTitle,formatter:"function"==typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},$}_layoutScatterVertical(t){const e=this.w,i=t.scatter||{},a=e.layout.gridWidth,s=e.layout.gridHeight,r=e.seriesData.unitData||[],n=e.seriesData.seriesNames||[],o=t=>this._unitValueOf(t),l=this._scatterSizeStats(i,r),c=r.map(t=>Array.isArray(t)?t.map(o):[]),h=t=>null!=t&&isFinite(t),u=c.map((t,e)=>e).filter(t=>c[t].some(h)),d=Math.max(1,u.length);let p=1/0,m=-1/0;c.forEach(t=>t.forEach(t=>{null!=t&&isFinite(t)&&(t<p&&(p=t),t>m&&(m=t))})),p===1/0&&(p=0,m=1);const f=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),x=this._scatterValueDomain(i,p,m,f),g=x.min,y=x.max,b=y-g||1,M=46+(i.xTitle?18:0),_=a-10,A=s-(d>1?26:10),w=Math.max(4,_-M),S=Math.max(4,A-10),R=t=>A-(t-g)/b*S,k=w/d;let v=0;const F=this._fixedRadius(t);if(F)v=F;else{const t=Math.max(1,...u.map(t=>c[t].filter(h).length));v=Math.max(2,Math.min(6,.12*k,S/(2.5*Math.sqrt(t))))}this._lastDotR=v;const E=t.spacing>0?t.spacing:1,C=Math.max(.5,v*E),T="jitter"===i.spread,D=[],L=[],$=l?l.rMax:v;u.forEach((t,e)=>{const i=(t=>M+k*(t+.5))(e);L.push({i:t,cx:i,name:n[t]||`series-${t+1}`});const a=(r[t]||[]).map((t,e)=>{const a=o(t),s={j:e,py:R(h(a)?a:g),x:i};return l&&(s.r=this._scatterRadius(t,l,v)),s});if(T){const t=Math.max($,k/2-$);a.forEach((e,a)=>{const s=(9301*a+49297)%233280/233280;e.x=i+(2*s-1)*t})}else this._beeswarm(a,i,v,C,$,!0);D.push({i:t,cx:i,cy:(10+A)/2,outerR:k/2,dots:a.map(t=>({x:t.x,y:t.py,r:t.r}))})});const B=x.ticks;return this._scatterAxis={mode:"1d",orientation:"vertical",plotL:M,plotR:_,plotT:10,plotB:A,vMin:g,vMax:y,plotY:R,ticks:B,lanes:L,valueTitle:i.xTitle,formatter:"function"==typeof i.xFormatter?i.xFormatter:null,gridlines:!1!==i.gridlines},D}_layoutScatter2D(t){const e=this.w,i=e.layout.gridWidth,a=e.layout.gridHeight,s=t.scatter||{},r=e.seriesData.unitData||[],n=t=>"number"==typeof t&&isFinite(t),o=t=>t&&"object"==typeof t?t.x:null,l=t=>t&&"object"==typeof t?null!=t.y?t.y:t.value:null,c=r.map((t,e)=>e).filter(t=>(r[t]||[]).some(t=>n(o(t))&&n(l(t))));let h=1/0,u=-1/0,d=1/0,p=-1/0;r.forEach(t=>(t||[]).forEach(t=>{const e=o(t),i=l(t);n(e)&&n(i)&&(e<h&&(h=e),e>u&&(u=e),i<d&&(d=i),i>p&&(p=i))})),h===1/0&&(h=0,u=1,d=0,p=1);const m=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),f=Math.max(2,Math.round(s.yTickAmount>0?s.yTickAmount:5)),x=this._niceScale(null!=s.xMin?s.xMin:h,null!=s.xMax?s.xMax:u,m),g=this._niceScale(null!=s.yMin?s.yMin:d,null!=s.yMax?s.yMax:p,f),y=null!=s.xMin?s.xMin:x.min,b=null!=s.xMax?s.xMax:x.max,M=null!=s.yMin?s.yMin:g.min,_=null!=s.yMax?s.yMax:g.max,A=b-y||1,w=_-M||1,S=46+(s.yTitle?18:0),R=30+(s.xTitle?20:0),k=S,v=i-12,F=a-R,E=Math.max(4,v-k),C=Math.max(4,F-10),T=t=>k+(t-y)/A*E,D=t=>F-(t-M)/w*C,L=this._scatterSizeStats(s,r),$=this._fixedRadius(t)||5;this._lastDotR=$;const B=[];c.forEach(t=>{const e=(r[t]||[]).map(t=>{const e=o(t),i=l(t);return{x:T(n(e)?e:y),y:D(n(i)?i:M),r:L?this._scatterRadius(t,L,$):void 0}});B.push({i:t,cx:(k+v)/2,cy:(10+F)/2,outerR:C/2,dots:e})});const z=(t,e,i,a,s,r)=>{const n=[];if(s)for(let e=0;e<r;e++)n.push(t+i*e/(r-1));else{const s=a||i/Math.max(1,r-1);for(let i=t;i<=e+.5*s;i+=s)n.push(Math.abs(i)<1e-9*s?0:i)}return n};return this._scatterAxis={mode:"2d",plotL:k,plotR:v,plotT:10,plotB:F,plotX:T,plotY:D,xTicks:z(y,b,A,x.spacing,null!=s.xMin||null!=s.xMax,m),yTicks:z(M,_,w,g.spacing,null!=s.yMin||null!=s.yMax,f),xTitle:s.xTitle,yTitle:s.yTitle,xFormatter:"function"==typeof s.xFormatter?s.xFormatter:null,yFormatter:"function"==typeof s.yFormatter?s.yFormatter:null,gridlines:!1!==s.gridlines},B}_scatterSizeStats(t,e){const i=t&&t.sizeRange;if(!Array.isArray(i)||i.length<2)return null;const a=Math.max(.5,+i[0]),s=Math.max(a,+i[1]),r=t.sizeField||"z";let n=1/0,o=-1/0;return e.forEach(t=>(t||[]).forEach(t=>{const e=t&&"object"==typeof t?t[r]:null;"number"==typeof e&&isFinite(e)&&(e<n&&(n=e),e>o&&(o=e))})),n===1/0?null:{zmin:n,zmax:o,rMin:a,rMax:s,field:r}}_scatterRadius(t,e,i){if(!e)return i;const a=t&&"object"==typeof t?t[e.field]:null;if("number"!=typeof a||!isFinite(a))return e.rMin;const s=e.zmax>e.zmin?(a-e.zmin)/(e.zmax-e.zmin):1,r=Math.max(0,Math.min(1,s)),n=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(n+r*(o-n))}_beeswarm(t,e,i,a,s,r=!1){const n=r?"py":"px",o=r?"x":"y",l=t.slice().sort((t,e)=>t[n]-e[n]),c=[],h=null!=s?s:i;l.forEach(t=>{const s=null!=t.r?t.r:i;let r=0;for(let i=0;i<2e3;i++){const o=0===i?0:Math.ceil(i/2)*a*(i%2?1:-1),l=e+o;let u=!0;for(let e=c.length-1;e>=0;e--){const i=c[e],a=t[n]-i.f;if(a>s+h)break;const r=s+i.r,o=l-i.s;if(a*a+o*o<r*r){u=!1;break}}if(u){r=o;break}}t[o]=e+r,c.push({f:t[n],s:t[o],r:s})})}_scatterValueDomain(t,e,i,a){const s=(t,e,i)=>{const a=[];for(let s=t;s<=e+.5*i;s+=i)a.push(Math.abs(s)<1e-9*i?0:s);return a};if(null!=t.xMin||null!=t.xMax){let r=null!=t.xMin?t.xMin:e,n=null!=t.xMax?t.xMax:i;n>r||(n=r+1);const o=(n-r)/Math.max(1,a-1);return e<r&&(r-=Math.ceil((r-e)/o)*o),i>n&&(n+=Math.ceil((i-n)/o)*o),{min:r,max:n,ticks:s(r,n,o)}}const r=this._niceScale(e,i,a),n=r.spacing||(r.max-r.min)/Math.max(1,a-1);return{min:r.min,max:r.max,ticks:s(r.min,r.max,n)}}_niceScale(t,e,i){const a=t;let s=e;s>a||(s=a+1);const r=this._niceNum(s-a,!1),n=this._niceNum(r/Math.max(1,i-1),!0);return{min:Math.floor(a/n)*n,max:Math.ceil(s/n)*n,spacing:n}}_niceNum(t,e){const i=t>0?t:1,a=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,a);let r;return r=e?s<1.5?1:s<3?2:s<7?5:10:s<=1?1:s<=2?2:s<=5?5:10,r*Math.pow(10,a)}_drawScatterAxes(t,e){const i=this.w;if(!S.isBrowser())return;const a=this._scatterAxis;if(!a)return;const s="http://www.w3.org/2000/svg",r=e.group({class:"apexcharts-unit-axis"}),n=i.config.grid&&i.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=i.config.xaxis&&i.config.xaxis.labels&&i.config.xaxis.labels.style&&i.config.xaxis.labels.style.colors,c=Array.isArray(l)?l[0]:l,h=c||"rgba(120,130,140,0.9)",u=(t,e,i,a,n)=>{const o=R.createElementNS(s,"line");o.setAttribute("x1",String(t)),o.setAttribute("y1",String(e)),o.setAttribute("x2",String(i)),o.setAttribute("y2",String(a)),o.setAttribute("stroke",n),o.setAttribute("shape-rendering","crispEdges"),r.node.appendChild(o)},d=(t,e,a,n,o,l,c,h)=>{const u=R.createElementNS(s,"text");u.setAttribute("class",h),u.setAttribute("x",String(e)),u.setAttribute("y",String(a)),u.setAttribute("text-anchor",n),u.setAttribute("dominant-baseline","middle"),u.setAttribute("font-size",`${l}px`),u.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),u.setAttribute("font-weight",String(c)),u.setAttribute("fill",o),u.textContent=t,r.node.appendChild(u)};if("2d"!==a.mode){if("vertical"===a.orientation){if(a.ticks.forEach(t=>{const e=a.plotY(t);a.gridlines&&u(a.plotL,e,a.plotR,e,n);const i=a.formatter?String(a.formatter(t)):this._formatTick(t);d(i,a.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotT,a.plotL,a.plotB,o),a.valueTitle){const t=R.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(a.plotT+a.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(a.valueTitle),r.node.appendChild(t)}return a.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";d(t.name,t.cx,a.plotB+16,"middle",e,12,600,"apexcharts-unit-lane-label")}),void t.add(r)}a.ticks.forEach((t,e)=>{const i=a.plotX(t);a.gridlines&&u(i,a.plotT,i,a.plotB,n);const s=a.formatter?String(a.formatter(t)):this._formatTick(t),r=0===e?"start":e===a.ticks.length-1?"end":"middle";d(s,i,a.plotB+14,r,h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotB,a.plotR,a.plotB,o),a.xTitle&&d(String(a.xTitle),(a.plotL+a.plotR)/2,a.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),a.plotL>12&&a.lanes.forEach(t=>{const e=c||i.globals.colors[t.i]||i.globals.colors[0]||"#008FFB";d(t.name,a.plotL-8,t.cy,"end",e,12,600,"apexcharts-unit-lane-label")}),t.add(r)}else{if(a.yTicks.forEach(t=>{const e=a.plotY(t);a.gridlines&&u(a.plotL,e,a.plotR,e,n);const i=a.yFormatter?String(a.yFormatter(t)):this._formatTick(t);d(i,a.plotL-8,e,"end",h,11,400,"apexcharts-unit-tick")}),a.xTicks.forEach(t=>{const e=a.plotX(t);a.gridlines&&u(e,a.plotT,e,a.plotB,n);const i=a.xFormatter?String(a.xFormatter(t)):this._formatTick(t);d(i,e,a.plotB+14,"middle",h,11,400,"apexcharts-unit-tick")}),u(a.plotL,a.plotB,a.plotR,a.plotB,o),u(a.plotL,a.plotT,a.plotL,a.plotB,o),a.xTitle&&d(String(a.xTitle),(a.plotL+a.plotR)/2,a.plotB+32,"middle",h,12,600,"apexcharts-unit-axis-title"),a.yTitle){const t=R.createElementNS(s,"text");t.setAttribute("class","apexcharts-unit-axis-title");const e=14,n=(a.plotT+a.plotB)/2;t.setAttribute("x",String(e)),t.setAttribute("y",String(n)),t.setAttribute("text-anchor","middle"),t.setAttribute("font-size","12px"),t.setAttribute("font-family",i.config.chart.fontFamily||"inherit"),t.setAttribute("font-weight","600"),t.setAttribute("fill",h),t.setAttribute("transform",`rotate(-90 ${e} ${n})`),t.textContent=String(a.yTitle),r.node.appendChild(t)}t.add(r)}}_formatTick(t){if(!isFinite(t))return"";const e=Math.abs(t);return e>=1e6?+(t/1e6).toFixed(1)+"M":e>=1e4?+(t/1e3).toFixed(1)+"k":Number.isInteger(t)?String(t):String(+t.toFixed(2))}_largestRemainder(t,e){const i=t.reduce((t,e)=>t+e,0);if(i<=0||e<=0)return t.map(()=>0);const a=t.map(t=>t/i*e),s=a.map(t=>Math.floor(t)),r=s.reduce((t,e)=>t+e,0),n=Math.max(0,e-r),o=a.map((t,e)=>({i:e,frac:t-Math.floor(t)})).sort((t,e)=>e.frac-t.frac),l=s.slice();for(let t=0;t<n&&t<o.length;t++)l[o[t].i]++;return l}_spiral(t,e,i,a,s){const r=[];for(let n=0;n<i;n++){const i=s+n,o=a*Math.sqrt(i+.5),l=i*F;r.push({x:t+o*Math.cos(l),y:e+o*Math.sin(l)})}return r}_fixedRadius(t){return"image"===t.shape&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&"number"==typeof t.sizeByValue.maxRadius?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:"number"==typeof t.size&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!(!e||!e.enabled||"image"===t.shape||"square"===t.shape)}_unitValueOf(t){if("number"==typeof t)return t;if(t&&"object"==typeof t){const e=null!=t.value?t.value:t.y;return"number"==typeof e?e:null}return null}_radiusForValue(t,e){if(null==t||!isFinite(t))return e.minR;const i=e.max>e.min?(t-e.min)/(e.max-e.min):1,a=Math.max(0,Math.min(1,i));if("linear"===e.scale)return e.minR+a*(e.maxR-e.minR);const s=e.minR*e.minR,r=e.maxR*e.maxR;return Math.sqrt(s+a*(r-s))}_bubbleStats(t,e,i){if(!this._bubbleActive(e))return null;let a=1/0,s=-1/0;if(t.forEach(t=>{t&&t.forEach(t=>{const e=this._unitValueOf(t);null!=e&&isFinite(e)&&(e<a&&(a=e),e>s&&(s=e))})}),a===1/0||s<a)return null;const r=e.sizeByValue,n=i,o=Math.max(1,Math.min(n,"number"==typeof r.minRadius?r.minRadius:.35*n));return{min:a,max:s,minR:o,maxR:n,scale:"linear"===r.scale?"linear":"area"}}_resolveStep(t,e,i){const a=t.spacing>0?t.spacing:1,s=this._fixedRadius(t);return s?2*s*a:e/(Math.sqrt(Math.max(1,i))+.5)}_dotRadiusFromStep(t,e){const i=e.spacing>0?e.spacing:1,a=this._fixedRadius(e);return a||Math.max(1,t/(2*i))}_isCorner(t){return"square"===t.shape||"image"===t.shape}_halfExtent(t,e){if("image"===t.shape&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const i=null!=e?e:this._lastDotR;return{hx:i,hy:i}}_place(t,e,i,a){const s=e;2===s.pk?t.setAttribute("transform","translate("+(i-s.ox)+","+(a-s.oy)+s.tail):1===s.pk?(t.setAttribute("x",String(i-s.hx)),t.setAttribute("y",String(a-s.hy))):(t.setAttribute("cx",String(i)),t.setAttribute("cy",String(a)))}_baseSpec(t,e){const i=null!=e?e:this._lastDotR;if(!this._isCorner(t))return{pk:0,r:i};const{hx:a,hy:s}=this._halfExtent(t,i);return{pk:1,hx:a,hy:s,r:i}}_resolveMark(t){if(null==t)return null;if("object"==typeof t)return _(t);if("string"!=typeof t||!t)return null;const e=t.trim();if("M"===e[0]||"m"===e[0])return _(e);const i=A(e);return i||(this._markWarned||(this._markWarned=new Set),this._markWarned.has(e)||(this._markWarned.add(e),console.warn(`[ApexCharts] unit chart: no mark named "${e}" is registered. Register one with ApexCharts.registerUnitMark("${e}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(t,e,i){const a=Math.round(10*e)/10,s=t.name+"|"+t.path.length+"|"+a,r=this._specCache.get(s);if(r)return r;const n=t.viewBox||[0,0,100,100],o=2*a*(1-Math.max(0,Math.min(.9,i.padding||0)))*("number"==typeof i.scale&&i.scale>0?i.scale:1),l="width"===i.fit?o/n[2]:"height"===i.fit?o/n[3]:o/Math.max(n[2],n[3]),c=Object.freeze({pk:2,mark:t,d:t.path,fillRule:t.fillRule,s:l,ox:(n[0]+n[2]/2)*l,oy:(n[1]+n[3]/2)*l,tail:") scale("+l+")",r:a});return this._specCache.set(s,c),c}_markSpecFor(t,e,i,a){if("pictogram"!==t.shape)return this._baseSpec(t,a);const s=t.pictogram||{},r=e&&"object"==typeof e?e.mark:void 0,n=Array.isArray(s.mark)?s.mark[i%s.mark.length]:s.mark,o=this._resolveMark(null!=r?r:n);return o?this._glyphSpec(o,a,s):this._baseSpec(c(l({},t),{shape:"square"===s.fallback?"square":"circle"}),a)}_drawDot(t,e,i,a,s,r,n){const o=this.w,l=o.config.stroke.show?o.config.stroke.width:0,c=Array.isArray(o.globals.stroke.colors)&&o.globals.stroke.colors[s]||"none",h="number"==typeof o.config.fill.opacity?o.config.fill.opacity:1;let u;if(n&&2===n.pk)u=o.dom.Paper.path(n.d),u.node.setAttribute("fill",a),"evenodd"===n.fillRule&&u.node.setAttribute("fill-rule","evenodd"),h<1&&u.node.setAttribute("fill-opacity",String(h)),u.node.setAttribute("data:r",String(n.r));else if("image"===e.shape&&e.image&&e.image.src){const t=e.image.width||20,i=e.image.height||20;u=o.dom.Paper.image(e.image.src),u.node.setAttribute("width",String(t)),u.node.setAttribute("height",String(i)),u.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&u.node.setAttribute("filter",`url(#${this._tintFilter(a)})`)}else if("square"===e.shape){const s=2*i;u=t.drawRect(0,0,s,s,e.borderRadius||0,a,1,l,c),u.node.setAttribute("fill",a),h<1&&u.node.setAttribute("fill-opacity",String(h))}else u=t.drawCircle(i,{fill:a,"stroke-width":l,stroke:c}),u.node.setAttribute("fill",a),h<1&&u.node.setAttribute("fill-opacity",String(h));return u.node.classList.add("apexcharts-unit-area"),u.node.setAttribute("i",String(s)),u.node.setAttribute("j",String(r)),u}_tintFilter(t){const e=this.w,i="http://www.w3.org/2000/svg",a=String(t).replace(/[^a-zA-Z0-9]/g,""),s=`apexcharts-unit-tint-${e.globals.chartID}-${a}`,r=e.dom.Paper.node;if(r.querySelector(`#${s}`))return s;let n=r.querySelector("defs");n||(n=R.createElementNS(i,"defs"),r.insertBefore(n,r.firstChild));const o=R.createElementNS(i,"filter");o.setAttribute("id",s),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=R.createElementNS(i,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=R.createElementNS(i,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),n.appendChild(o),s}_placeDot(t,e,i,a,s){this._place(t,s||this._baseSpec(e),i,a)}_rgb(t){if("string"!=typeof t)return null;let e=t.trim();if("#"===e[0]){4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e.slice(1,7),16);return isNaN(t)?null:[t>>16&255,t>>8&255,255&t]}const i=e.match(/rgba?\(([^)]+)\)/);if(i){const t=i[1].split(",").map(t=>parseFloat(t));if(t.length>=3&&t.every(t=>!isNaN(t)))return[t[0],t[1],t[2]]}return null}_shouldAnimate(){const t=this.w,e=t.config.chart.animations;return!!S.isBrowser()&&(!(!e||!1===e.enabled)&&(!1!==t.globals.shouldAnimate&&(!(t.globals.resized&&!t.globals.dataChanged)&&(!e.respectReducedMotion||!v()))))}_seedSprings(t,e,i){const[a,s]=T(e.spring,i),r=this.ctx?this.ctx._unitSprings:null,n=new Map;for(let e=0;e<t.length;e++){const i=t[e],o=r&&!i.isEnter&&null!=i.key?r.get(i.key):null,l=o?o.x:d(i.cx0,a,s),c=o?o.y:d(i.cy0,a,s);o&&(l.stiffness=a,c.stiffness=a,l.damping=s,c.damping=s,i.cx0=l.value,i.cy0=c.value,this._place(i.node,i.spec,i.cx0,i.cy0),0===l.velocity&&0===c.velocity||(i.delay=0)),i.sx=l,i.sy=c,null!=i.key&&n.set(i.key,{x:l,y:c})}this.ctx&&(this.ctx._unitSprings=n)}_runGather(t){const e=this.w,i=e.config.plotOptions.unit,a=Math.max(1,e.config.chart.animations.speed||800),s=Math.min(.6*a,450),r=t.length;for(let e=0;e<r;e++)t[e].delay=r>1?e/(r-1)*s:0;const n=i.gather||{},o=n.motion||"auto";"spring"===o||"auto"===o&&(!n.easing||"outCubic"===n.easing)?this._seedSprings(t,n,a):this.ctx&&(this.ctx._unitSprings=null);for(let e=0;e<r;e++){const i=t[e];0===i.spec.pk&&null!=i.r0&&null!=i.r1&&i.r0!==i.r1&&i.node.setAttribute("r",String(i.r0))}for(let e=0;e<r;e++){const i=t[e];i.fill0&&i.fill1&&i.fill0!==i.fill1&&(i._c0=this._rgb(i.fill0),i._c1=this._rgb(i.fill1))}const l="outBack"===n.easing?(c="number"==typeof n.overshoot?n.overshoot:1.70158,t=>1+(c+1)*Math.pow(t-1,3)+c*Math.pow(t-1,2)):"inOutCubic"===n.easing?C:E;var c;null!=this.w.globals.unitGatherRAF&&(R.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);const h=performance.now();let u=h;const d=e=>{if(this.w.globals.isDestroyed)return this.w.globals.unitGatherRAF=null,void(this.w.globals.animationEnded=!0);const i=Math.min(.25,Math.max(0,(e-u)/1e3));u=e;let s=!0;for(let n=0;n<r;n++){const r=t[n],o=e-h-r.delay,c=Math.max(0,Math.min(1,o/a)),u=E(c);let d,f;if(r.sx&&r.sy){o>=0&&!r.released&&(m(r.sx,r.x),m(r.sy,r.y),r.released=!0);const t=p(r.sx,i),e=p(r.sy,i);r.released&&t&&e||(s=!1),d=r.sx.value,f=r.sy.value}else{const t=l(c);d=r.cx0+(r.x-r.cx0)*t,f=r.cy0+(r.y-r.cy0)*t}if(this._place(r.node,r.spec,d,f),r.isEnter&&(r.node.style.opacity=String(Math.min(1,2.5*c))),r._c0&&r._c1){const t=Math.round(r._c0[0]+(r._c1[0]-r._c0[0])*u),e=Math.round(r._c0[1]+(r._c1[1]-r._c0[1])*u),i=Math.round(r._c0[2]+(r._c1[2]-r._c0[2])*u);r.node.setAttribute("fill",`rgb(${t},${e},${i})`)}0===r.spec.pk&&null!=r.r0&&null!=r.r1&&r.r0!==r.r1&&r.node.setAttribute("r",String(r.r0+(r.r1-r.r0)*u)),c<1&&(s=!1)}if(s){for(let e=0;e<r;e++){const i=t[e];i.node.style.opacity="",i._c1&&i.fill1&&i.node.setAttribute("fill",i.fill1),0===i.spec.pk&&null!=i.r0&&null!=i.r1&&i.r0!==i.r1&&i.node.setAttribute("r",String(i.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=R.requestAnimationFrame(d)};this.w.globals.unitGatherRAF=R.requestAnimationFrame(d)}_collectExits(t,e,i){const a=Math.max(0,i.maxUnits||5e3),s=[];for(const[i,r]of t)if(!e.has(i)&&(s.push(r),s.length>=a))break;return s}_runExits(t,e,i){const a=this.w,s=new g(a,this.ctx),r=this._lastDotR,n=a.layout.gridWidth/2,o=a.layout.gridHeight/2,l="grid"===i.layout||"scatter"===i.layout||"arc"===i.layout||"custom"===i.layout?0:.35,c=[];if(e.forEach(e=>{const a=null!=e.r?e.r:r,n=e.spec||this._baseSpec(i,a),o=this._drawDot(s,i,a,e.fill,0,0,n);o.node.classList.add("apexcharts-unit-exit"),this._place(o.node,n,e.x,e.y),t.add(o),c.push({node:o.node,x0:e.x,y0:e.y,spec:n})}),!this._shouldAnimate())return void c.forEach(t=>t.node.remove());const h=Math.max(1,a.config.chart.animations.speed||800);null!=this.w.globals.unitExitRAF&&(R.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);const u=performance.now(),d=e=>{if(this.w.globals.isDestroyed)return void(this.w.globals.unitExitRAF=null);const i=Math.max(0,Math.min(1,(e-u)/h)),a=E(i);for(let t=0;t<c.length;t++){const e=c[t];if(l){const t=e.x0+(n-e.x0)*a*l,i=e.y0+(o-e.y0)*a*l;this._place(e.node,e.spec,t,i)}e.node.style.opacity=String(1-a)}i<1?this.w.globals.unitExitRAF=R.requestAnimationFrame(d):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=R.requestAnimationFrame(d)}_outerLabelsOn(t){const e=t.clusterLabels;return!!("custom"===t.layout&&e&&!1!==e.show&&e.external&&e.external.show)}_outerLabelLines(t,e,i,a){const s=this.w,r=s.seriesData.seriesNames[t]||`series-${t+1}`,n=i>0?e/i*100:0,o=a.clusterLabels,l="function"==typeof o.formatter?o.formatter(r,{seriesIndex:t,value:e,percent:n,w:s}):`${r}\n${n.toFixed(1)}%`;return String(l).split("\n")}_outerLabelGutter(t,e){const i=this.w,a=e.clusterLabels,s=a.external.connector||{},r=t.reduce((t,e)=>t+e,0),n=[];if(t.forEach((t,i)=>{t>0&&n.push(...this._outerLabelLines(i,t,r,e))}),!n.length)return 0;const o=function(t,e,i={}){const a=new g(t),s=i.fontSize||"12px",r=parseFloat(s)||12;let n=0;return e.forEach(t=>{if(null==t||""===t)return;const e=`${t}`,o=a.getTextRects(e,s,i.fontFamily,"").width;n=Math.max(n,o>0?o:e.length*r*.58)}),n}(i,n,{fontSize:a.fontSize,fontFamily:a.fontFamily||i.config.chart.fontFamily}),l=o+(null!=s.gap?s.gap:8)+(null!=s.length?s.length:22)+8+Math.abs(parseFloat(a.external.offsetX)||0);return Math.min(l,.25*i.layout.gridWidth)}_drawOuterLabels(t,e,i,a,s,r){const n=this.w;if(!S.isBrowser())return;const o=s.clusterLabels,l=o.external,c=l.connector||{},h=null!=c.gap?c.gap:8,u=null!=c.length?c.length:22,d=parseFloat(l.offsetX)||0,p=parseFloat(l.offsetY)||0,m=n.layout.gridWidth,f=n.layout.gridHeight,x=this._lastDotR,y=e.filter(t=>t.dots.length>0);if(!y.length)return;let b=0,M=0;if(y.length>1){const t=y.map(t=>t.cx),e=y.map(t=>t.cy);b=Math.max(...t)-Math.min(...t),M=Math.max(...e)-Math.min(...e)}const _=b>M,A=parseFloat(o.fontSize)||13,w=Math.round(1.35*A),R=[];if(y.slice().sort((t,e)=>t.cy-e.cy).forEach((t,e)=>{const r=this._outerLabelLines(t.i,i[t.i],a,s);if(!r.some(t=>""!==t))return;const n=_?t.cx>=m/2?"right":"left":e%2==0?"right":"left",o="right"===n?1:-1;let l=t.dots[0],c=-1/0;t.dots.forEach(e=>{const i=o*e.x-.75*Math.abs(e.y-t.cy);i>c&&(c=i,l=e)});const f={x:l.x+o*(l.r||x),y:l.y},g={x:f.x+o*h,y:f.y};R.push({i:t.i,lines:r,anchor:f,elbow:g,labelX:g.x+o*u+d,idealY:f.y+p,labelY:f.y+p,side:n})}),!R.length)return;const k=R.reduce((t,e)=>Math.max(t,e.lines.length),1)*w,v=k/2;["left","right"].forEach(t=>{!function(t,e,i,a){const s=t.slice().sort((t,e)=>t.idealY-e.idealY);s.forEach(t=>{t.labelY=t.idealY});for(let t=1;t<s.length;t++)s[t].labelY-s[t-1].labelY<e&&(s[t].labelY=s[t-1].labelY+e);const r=s[s.length-1],n=r?r.labelY-i:0;if(n>0)for(let t=s.length-1;t>=0;t--)s[t].labelY-=n,t<s.length-1&&s[t+1].labelY-s[t].labelY<e&&(s[t].labelY=s[t+1].labelY-e);if(null!=a&&s.length&&s[0].labelY<a){const t=a-s[0].labelY;for(let e=0;e<s.length;e++)s[e].labelY+=t}}(R.filter(e=>e.side===t),k+2,f-v,v)});const F=new g(n,this.ctx).group({class:"apexcharts-unit-outer-labels"});if(r){const t=Math.max(1,n.config.chart.animations.speed||800);F.node.classList.add("apexcharts-unit-label-delay"),F.node.style.animationDelay=Math.min(.45*t,600)/1e3+"s"}R.forEach(t=>{const e=n.globals.colors[t.i]||n.globals.colors[0]||"#008FFB";F.add(function(t,e){const{lines:i,lineHeight:a,anchor:s,elbow:r,labelX:n,labelY:o,side:l,connector:c,style:h,foreColor:u}=e,d=new g(t),p=d.group({class:e.groupClass||"apexcharts-outer-label-group"});if(c.show){const t=`M ${s.x} ${s.y} L ${r.x} ${r.y} L ${n} ${o}`,i=d.drawPath({d:t,stroke:c.color,strokeWidth:c.width,fill:"none",strokeLinecap:"round"});i.node.classList.add(e.connectorClass||"apexcharts-outer-label-connector"),p.add(i)}const m="right"===l?n+4:n-4,f=i.length,x=o-(f-1)*a/2,y=d.drawText({x:m,y:x,text:1===f?i[0]:i,textAnchor:"right"===l?"start":"end",fontSize:h.fontSize,fontFamily:h.fontFamily,fontWeight:h.fontWeight,foreColor:u,dominantBaseline:"central",cssClass:e.textClass||"apexcharts-outer-label"});if(f>1){const t=y.node.getElementsByTagName("tspan");for(let e=0;e<t.length;e++)t[e].setAttribute("x",`${m}`),t[e].setAttribute("dy",0===e?"0":`${a}`)}return p.add(y),p}(n,{lines:t.lines,lineHeight:w,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:!1!==c.show,width:null!=c.width?c.width:1.5,color:c.color||e},style:{fontSize:o.fontSize,fontFamily:o.fontFamily||n.config.chart.fontFamily,fontWeight:o.fontWeight},foreColor:o.color||n.config.chart.foreColor,groupClass:"apexcharts-unit-outer-label-group",textClass:"apexcharts-unit-outer-label",connectorClass:"apexcharts-unit-label-connector"}))}),t.add(F)}_drawClusterLabel(t,e,i,a,s,r){const n=this.w;if(!S.isBrowser())return;const o="http://www.w3.org/2000/svg",l=n.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=a>0?i/a*100:0,h=s.clusterLabels,u=parseFloat(h.fontSize)||13;let d;d="function"==typeof h.formatter?h.formatter(l,{seriesIndex:e.i,value:i,percent:c,w:n}):`${l} (${c.toFixed(1)}%)`;const p="string"==typeof d?d:String(d),m=R.createElementNS(o,"text");m.setAttribute("class","apexcharts-unit-label"),m.setAttribute("text-anchor","middle"),m.setAttribute("font-size",`${u}px`),m.setAttribute("font-family",h.fontFamily||n.config.chart.fontFamily||"inherit"),m.setAttribute("font-weight",String(h.fontWeight||600)),m.setAttribute("fill",h.color||r);const f="bottom"===h.position,x=e.outerR+.6*u+3+(h.offsetY||0),g=p.length*u*.55;if(!f&&!e.flat&&!1!==h.curved&&g<=Math.PI*x*.95){const i=e.cy,a=`M ${e.cx-x} ${i} A ${x} ${x} 0 0 1 ${e.cx+x} ${i}`,s=`apexcharts-unit-label-${n.globals.chartID}-${e.i}`,r=R.createElementNS(o,"path");r.setAttribute("id",s),r.setAttribute("d",a),r.setAttribute("fill","none"),r.setAttribute("stroke","none");const l=R.createElementNS(o,"textPath");l.setAttribute("href",`#${s}`),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${s}`),l.setAttribute("startOffset","50%"),l.textContent=p,m.appendChild(l),t.node.appendChild(r)}else{m.setAttribute("x",String(e.cx));const t=f?e.cy+e.outerR+u+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);m.setAttribute("y",String(t)),m.textContent=p}t.node.appendChild(m)}}}),t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/violin.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,a,s)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,n=(t,e)=>{for(var a in e||(e={}))i.call(e,a)&&o(t,a,e[a]);if(s)for(var a of s(e))r.call(e,a)&&o(t,a,e[a]);return t},l=(t,s)=>e(t,a(s));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const a in t)if("default"!==a){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_CoreUtils,u=d.__apex_Graphics,b=d.__apex_DataLabels,g=(t,e,a,s)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:a,dataPointIndex:s,w:e});return Number.isFinite(i)?i:0},p=d.__apex_BrowserAPIs_BrowserAPIs,x=d.__apex_Environment_Environment;function f(t){var e;const a=t.config.chart.animations;if(!a||!1===a.enabled)return!1;if(!a.dynamicAnimation||!1===a.dynamicAnimation.enabled)return!1;const s=null!=(e=a.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(x.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function m(t,e,a){var s,i,r,o;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[a])return"x:"+s[a]}const n=null==(o=t.globals.labels)?void 0:o[a];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+a}function y(t){const e=new Map;return t.map(t=>{const a=e.get(t)||0;return e.set(t,a+1),0===a?t:`${t}#${a}`})}function v(t,e,a=!1,s=!1){var i,r;if(!f(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=y(n.map((t,a)=>function(t,e,a){var s,i;if(t.isXNumeric){const i=null==(s=t.seriesX)?void 0:s[e];if(i&&i.length&&null!=i[a])return"x:"+i[a]}const r=null==(i=t.labels)?void 0:i[a];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+a}(o,e,a))),d=y(l.map((a,s)=>m(t,e,s))),c=function(t,e){const a=new Map;t.forEach((t,e)=>{a.has(t)||a.set(t,e)});const s=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=a.has(t)&&!i.has(a.get(t))?a.get(t):-1;s[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:s,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||s)&&(c.changed||a)?{join:c,oldKeys:h,newKeys:d}:null}function C({w:t,elSeries:e,record:a,newKeys:s,isHorizontal:i,speed:r}){var o;if(!f(t))return;if(!a||!Array.isArray(a.paths)||!(null==e?void 0:e.node))return;const n=new Set(s),l=a.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new u(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(a.realIndex),10)];l.forEach(a=>{let s=a.fill||d||"#c8c8c8";0===String(s).indexOf("url(")&&(s=d||"#c8c8c8");const o=h.drawPath({d:a.d,stroke:"none",strokeWidth:0,fill:s,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const a=parseFloat(e[1]),s=parseFloat(e[2]);return isFinite(a)&&isFinite(s)?{x:a,y:s}:null}(a.d);let c=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=i?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const u=n.style;u.transformBox="fill-box",u.transformOrigin=c;const b=Math.max(1,r||1),g=performance.now(),x=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const a=Math.max(0,Math.min(1,(e-g)/b)),s=1-Math.pow(1-a,3),r=1-s;u.transform=i?`scaleX(${r})`:`scaleY(${r})`,u.opacity=String(1-s),a<1?p.requestAnimationFrame(x):n.parentNode.removeChild(n)};p.requestAnimationFrame(x)})}class w{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,a;const{x:s,y:i,y1:r,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:b,barHeight:p,barWidth:x,barXPosition:f,barYPosition:m,visibleSeries:y}=t,v=this.w,C=new u(this.barCtx.w),w=v.waterfallData&&v.waterfallData.values,P=w&&w[c]&&null!=w[c][d]?w[c][d]:null,S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let I,L;v.axisFlags.isXNumeric&&!v.globals.isBarHorizontal?(I=s+x*(y+1),L=i+p*(y+1)-S):(I=s+x*y,L=i+p*y);let k=null,H=null,W=s,F=i,D={};const O=v.config.dataLabels,A=this.barCtx.barOptions.dataLabels,M=this.barCtx.barOptions.dataLabels.total;void 0!==m&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(L=m,F=m),void 0!==f&&this.barCtx.isVerticalGroupedRangeBar&&(I=f,W=f);const R=g(O.offsetX,v,c,d),X=g(O.offsetY,v,c,d);let B={width:0,height:0};if(v.config.dataLabels.enabled){const t=null!==P?P:v.seriesData.series[c][d];B=C.getTextRects(v.config.dataLabels.formatter?v.config.dataLabels.formatter(t,l(n({},v),{seriesIndex:c,dataPointIndex:d,w:v})):v.formatters.yLabelFormatters[0](t),parseFloat(O.style.fontSize).toString(),O.style.fontFamily,void 0,!0,O.style.fontWeight)}const T={x:s,y:i,i:h,j:d,realIndex:c,columnGroupIndex:b,bcx:I,bcy:L,barHeight:p,barWidth:x,textRects:B,strokeWidth:S,dataLabelsX:W,dataLabelsY:F,dataLabelsConfig:O,barDataLabelsConfig:A,barTotalDataLabelsConfig:M,offX:R,offY:X};if(D=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==P&&this.barCtx.isHorizontal&&"center"===A.position){const t=null==(a=null==(e=v.waterfallData.geometry)?void 0:e[c])?void 0:a[d];t&&t.horizontal&&(D.dataLabelsX=(t.levelStart+t.levelEnd)/2+R)}return k=this.drawCalculatedDataLabels({x:D.dataLabelsX,y:D.dataLabelsY,val:null!==P?P:this.barCtx.isRangeBar?[r,o]:"100%"===v.config.chart.stackType?v.globals.seriesPercent[c][d]:v.seriesData.series[c][d],i:c,j:d,barWidth:x,barHeight:p,textRects:B,dataLabelsConfig:O}),v.config.chart.stacked&&M.enabled&&(H=this.drawTotalDataLabels({x:D.totalDataLabelsX,y:D.totalDataLabelsY,barWidth:x,barHeight:p,realIndex:c,j:d,textAnchor:D.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:O,barTotalDataLabelsConfig:M})),{dataLabelsPos:D,dataLabels:k,totalDataLabels:H}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,a=this.getTotalGroupContext(t);return a&&e&&e.length>a.groupIndex?e[a.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const a=this.w,s=this.getTotalGroupContext(t),i=a.seriesData.stackedSeriesTotalsByGroups;return s&&i&&i[s.groupIndex]?i[s.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const a=this.w;let s=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(s=this.totalFormatter(s,l(n({},a),{seriesIndex:t,dataPointIndex:e,w:a}))),s}calculateColumnsDataLabelsPosition(t){const e=this.w;let a,s,{i:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:b,dataLabelsY:g,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:m,offX:y,offY:v}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:P}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=m/2;const S=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?b+=h/2:(b=e.axisFlags.isXNumeric?l-h/2+y:l-S+h/2+y,!e.config.chart.stacked&&P>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b-=h*P)),w){const t=2;b=b+c.height/2-m/2-t}const I=e.seriesData.series[i][r]<0;let L=n;switch(this.barCtx.isReversed&&(L=n+(I?d:-d)),x.position){case"center":g=w?I?L-d/2+v:L+d/2-v:I?L-d/2+c.height/2+v:L+d/2+c.height/2-v;break;case"bottom":g=w?I?L-d+v:L+d-v:I?L-d+c.height+m+v:L+d-c.height/2+m-v;break;case"top":g=w?I?L+v:L-v:I?L-c.height/2-v:L+c.height+v}let k=L;const H=this.getTotalGroupContext(o);if((H?[H.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{k=I?Math.max(t[r],k):Math.min(t[r],k)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new u(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);a=I?k-i.height/2-v-f.offsetY+t:k+i.height+v+f.offsetY-t;const n=S;s=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(g<0?g=0+m:g+c.height/3>e.layout.gridHeight&&(g=e.layout.gridHeight-m)),{bcx:l,bcy:n,dataLabelsX:b,dataLabelsY:g,totalDataLabelsX:s,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const a=this.w;let{x:s,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:b,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:m}=t;const y=a.layout.gridHeight/a.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,P;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+m-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+m-3;!a.config.chart.stacked&&v>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*v);let S="start";const I=a.seriesData.series[i][r]<0;let L=s;if(this.barCtx.isReversed&&(L=s+(I?-h:h),S=I?"start":"end"),this.barCtx.isPyramid)c=a.layout.gridWidth/2+f;else switch(p.position){case"center":c=I?L+h/2-f:Math.max(d.width/2,L-h/2)+f;break;case"bottom":c=I?L+h-b-f:L-h+b+f;break;case"top":c=I?L-b-f:L-b+f}let k=L;const H=this.getTotalGroupContext(o);if((H?[H.group]:a.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{k=I?Math.min(t[r],k):Math.max(t[r],k)})}),this.drawsStackedTotal(o)&&x.enabled){const t=new u(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);I?(w=k-b-f-x.offsetX,S="end"):w=k+f+x.offsetX+(this.barCtx.isReversed?-(h+b):b),P=C-d.height/2+t.height/2+x.offsetY+b,a.globals.barGroups.length>1&&!H&&(P-=a.globals.barGroups.length/2*(l/2))}if(!a.config.chart.stacked){const t=I&&"middle"!==g.textAnchor?"start"===g.textAnchor?"end":"start":g.textAnchor;let e;e="vertical"===p.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const s=("vertical"===p.orientation?d.height:d.width)-e;c+s>a.layout.gridWidth-b&&(c=a.layout.gridWidth-s-b),c-e<b&&(c=e+b)}return{bcx:s,bcy:n,dataLabelsX:c,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:P,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:t,y:e,val:a,i:s,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,g,p;const x=this.w;let f="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(f=`rotate(-90, ${t}, ${e})`);const y=new b(this.barCtx.w,this.barCtx.ctx),v=new u(this.barCtx.w),C=d.formatter;let w=null;const P=x.globals.collapsedSeriesIndices.indexOf(s)>-1,S=(x.globals.collapsingSeriesIndices||[]).indexOf(s)>-1;if(S){const t=null==(c=x.globals.prevDataLabels)?void 0:c.get(`${s}::${m(x,s,i)}`);t&&isFinite(t.val)&&(a=t.val)}if(d.enabled&&(!P||S)){w=v.group({class:"apexcharts-data-labels",transform:f});const c=x.config.dataLabels;((null==(g=c.animate)?void 0:g.enabled)||(null==(p=c.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",`${s}::${m(x,s,i)}`),w.node.setAttribute("data:dlJ",String(i)),"number"==typeof a&&isFinite(a)&&w.node.setAttribute("data:dlVal",String(a)));let u="";void 0!==a&&(u=C(a,l(n({},x),{seriesIndex:s,dataPointIndex:i,w:x}))),!a&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u="");const b=x.seriesData.series[s][i]<0,P=x.config.plotOptions.bar.dataLabels.position;if("vertical"===x.config.plotOptions.bar.dataLabels.orientation&&("top"===P&&(d.textAnchor=b?"end":"start"),"center"===P&&(d.textAnchor="middle"),"bottom"===P&&(d.textAnchor=b?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<v.getTextRects(u,parseFloat(d.style.fontSize).toString()).width&&(u="")}x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!S&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(u=""):r.height/1.6>Math.abs(o)&&(u=""));const I=n({},d);this.barCtx.isHorizontal&&a<0&&("start"===d.textAnchor?I.textAnchor="end":"end"===d.textAnchor&&(I.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:u,i:s,j:i,parent:w,dataLabelsConfig:I,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:a,rawVal:s,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new u(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:a,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);c.node.setAttribute("data:dlTotalKey",`${t}::${m(this.w,i,r)}`),c.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof s&&isFinite(s)&&c.node.setAttribute("data:dlTotalVal",String(s))}}return c}}const P=d.__apex_Series,S=d.__apex_Fill,I=d.__apex_Utils;function L(t){var e,a,s,i,r,o,n;return"histogram"===(null==(a=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:a.requestedType)&&(!1!==(null==(i=null==(s=t.config.plotOptions)?void 0:s.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class k{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let a=0;a<t.length;a++)if(t[a].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[a].length),e.axisFlags.isXNumeric)for(let s=0;s<t[a].length;s++)e.seriesData.seriesX[a][s]>e.globals.minX&&e.seriesData.seriesX[a][s]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),I.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const a=t.globals.maxX-t.globals.minX;e=a>0?a/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const a=t.globals.minXDiff;e=a>0&&isFinite(a)&&.5!==a?a:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let a=0;a<t.length;a++){const s=t[a];Array.isArray(s)&&s.length>0&&e.push(s)}if(!e.length)return 0;const a=new Array(e.length).fill(0);let s=NaN,i=1/0;for(;;){let t=1/0,r=-1;for(let s=0;s<e.length;s++){const i=e[s];for(;a[s]<i.length&&"number"!=typeof i[a[s]];)a[s]++;if(a[s]>=i.length)continue;const o=i[a[s]];o==o?o<t&&(t=o,r=s):(a[s]++,s--)}if(-1===r)break;if(a[r]++,s==s){const e=t-s;e>0&&e<i&&(i=e)}s=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let a,s,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let c=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||L(e))&&(c=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/c,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),s=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){a=this.barCtx.getBarXForNumericXAxis({x:a,j:0,realIndex:t,barWidth:n}).x}else a=e.globals.padHorizontal+I.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:a,y:s,yDivision:i,xDivision:r,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,a,s){var i;const r=this.w,o=new S(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?a:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(s=>{t[e][a]>=s.from&&t[e][a]<=s.to&&(n=s.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,a)||(null==(i=r.config.series[e].data[a])?void 0:i.fill),c=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:s,dataPointIndex:a,color:n,opacity:u,value:t[e][a],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[s]:r.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const a=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const s=a.dumbbellData;if(!s||"series"!==s.form)return null;const i=a.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=s.order[e];if(!r)return null;const o=a.globals.colors[r[0]],n=a.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,a){let s=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),s}getStackedSeriesIndices(t){const e=this.w,a=e.labelData.seriesGroups,s=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,i=t=>!s||s.has(t);if(!a||a.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:a.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const a=this.w,s=!this.w.config.chart.stacked||a.config.plotOptions.bar.borderRadius<=0,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(s?"top":"none"));if(s)return o;const n="bar"===this.w.config.chart.type&&1===r,l=n?"top":"both",h=n?"top":"bottom";for(const e of this.getStackedSeriesIndices(i))for(let a=0;a<r;a++){const s=[],i=[];for(const r of e){const e=t[r][a];e>0?s.push(r):e<0&&i.push(r)}if(s.length>0&&0===i.length)if(1===s.length)o[s[0]][a]=l;else{const t=s[0],e=s[s.length-1];for(const i of s)o[i][a]=i===t?h:i===e?"top":"none"}else if(i.length>0&&0===s.length)if(1===i.length)o[i[0]][a]="both";else{const t=Math.max(...i),e=Math.min(...i);for(const s of i)o[s][a]=s===t?"bottom":s===e?"top":"none"}else if(s.length>0&&i.length>0){const t=s[s.length-1];for(const e of s)o[e][a]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][a]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:a,x2:s,y1:i,y2:r,elSeries:o}){const n=this.w,l=new u(this.barCtx.w),h=new P(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==a?a:0,void 0!==i?i:0,void 0!==s?s:n.layout.gridWidth,void 0!==r?r:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:a,y2:s,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,g,p;const x=new u(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.columnWidthOffset)&&(m=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const y=i/2,v=m+y,C=m+f-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);a+=.001-y*w,s+=.001+y*w;const P=x.line(C,a),S="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",I=x.move(v,a)+x.line(v,s)+x.line(C,s)+P+S;let L=I;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let k=null;const H=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(H?k=H:c.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(l,d,L,I)),null==k&&(k=x.move(v,a)+x.line(v,a)+P+P+P+P+P+x.line(v,a)+S),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(s-y*w),t.yArrjF.push(Math.abs(a-s+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:k,drawnBox:{x1:v,x2:C,y1:a,y2:s}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:a,i:s,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new u(this.barCtx.w),c=n.layout.gridWidth/2,b=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,g=b(a[s][i]),p=i===a[s].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:g:b(a[s][i+1]);const m=o/2,y=t+m,v=t+e-m,C=c-g,w=c+g,P=c-f,S=c+f,I=d.move(C,y)+d.line(w,y)+d.line(S,v)+d.line(P,v)+" Z";let L=null;const k=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return k?L=k:n.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(r,i,I)),null==L&&(L=d.move(c,y)+d.line(c,y)+d.line(c,v)+d.line(c,v)+" Z"),{pathTo:I,pathFrom:L,x:w,x1:C,barXPosition:c}}computePyramidLayout(t){const e=this.w,a=e.layout.gridHeight,s=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||a<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=s/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const s=n/r,h=e*a,d=s*a;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:s*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:a,bottomHalf:s,realIndex:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new u(this.barCtx.w),c=n.layout.gridWidth/2,b=o/2,g=t+b,p=t+e-b,x=c-a,f=c+a,m=c-s,y=c+s,v=d.move(x,g)+d.line(f,g)+d.line(y,p)+d.line(m,p)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,v)),null==C&&(C=d.move(c,g)+d.line(c,g)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:v,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:a,x2:s,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,g,p;const x=new u(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,m=e+c.config.series[l].data[d].barHeightOffset);const y=i/2,v=f+y,C=f+m-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);a+=.001+y*w,s+=.001-y*w;const P=this.barCtx.isFunnel,S=P?(a+s)/2:a,I=x.line(a,C),L="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",k=x.move(a,v)+x.line(s,v)+x.line(s,C)+I+L;let H=k;"none"!==this.arrBorderRadius[l][d]&&(H=x.roundPathCorners(H,c.config.plotOptions.bar.borderRadius));let W=null;const F=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(F?W=F:c.globals.previousPaths.length>0&&(W=this.barCtx.getPreviousPath(l,d,H,k)),null==W){const t=P?x.line(S,C):I;W=x.move(S,v)+x.line(S,v)+t+t+t+t+t+x.line(S,v)+L}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(s+y*w),t.xArrjF.push(Math.abs(a-s-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:H,pathFrom:W,drawnBox:{x1:a,x2:s,y1:v,y2:C}}}getXForValue(t,e,a=!0){let s=a?e:null;return null!=t&&(s=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),s}getYForValue(t,e,a,s=!0){let i=s?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[a]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[a]:0)),i}getGoalValues(t,e,a,s,i,r){const o=this.w,h=[],d=(s,i)=>{h.push({[t]:"x"===t?this.getXForValue(s,e,!1):this.getYForValue(s,a,r,!1),attrs:i})};if(o.seriesData.seriesGoals[s]&&o.seriesData.seriesGoals[s][i]&&Array.isArray(o.seriesData.seriesGoals[s][i])&&o.seriesData.seriesGoals[s][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(s,i);if(e.length){const a={strokeHeight:"x"===t?0:o.globals.markers.size[s],strokeWidth:"x"===t?o.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round"};let r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},a),{strokeColor:t.color});!c.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,s,i,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const a=this.w,s=[],i=a.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&s.push({value:r,color:a.globals.colors[e],index:e})}return s}if(!a.rangeData.seriesRange.length)return s;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:a.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[t];return[{value:a.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:a.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,a,s){const i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:a,endpointIndex:s,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,a,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:a,goalY:s,barWidth:i,barHeight:r}){if(!(Array.isArray(a)&&a.length>0||Array.isArray(s)&&s.length>0))return null;const o=new u(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const a=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,s=e+a+r/2;l=o.drawLine(t.x,s-2*a,t.x,s,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:s-a,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(s)&&s.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const a=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,s=t+a+i/2;l=o.drawLine(s-2*a,e.y,s,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:s-a,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const a=this.w,s=new u(a),i=a.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return s.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:a,realIndex:s,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,b=l+e.barHeight,g=new u(this.barCtx.w),p=new I,x=g.move(n,b)+g.line(o,b)+g.line(h,c)+g.line(d,c)+g.line(n,b)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[s][i]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,I.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var a;const s=this.w;let i=0,r=0;return(s.config.plotOptions.bar.horizontal?s.seriesData.series.map((t,e)=>e):(null==(a=s.globals.columnSeries)?void 0:a.i.map(t=>t))||[]).forEach(a=>{const o=s.globals.seriesPercent[a][e];o&&i++,a<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(a=>a.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,a=e.labelData.seriesGroups.findIndex(a=>a.indexOf(e.seriesData.seriesNames[t])>-1),s=this.barCtx.columnGroupIndices;let i=s.indexOf(a);return i<0&&(s.push(a),i=s.length-1),{groupIndex:a,columnGroupIndex:i}}}const H=d.__apex_Filters,W=d.__apex_Animations_computeStagger;class F{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/F.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*F.xRatio(t)}static screenXToPlotPx(t,e){const a=t.dom.baseEl,s=a&&a.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const i=s.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class D{constructor(t,e,a){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=a,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const s=new P(this.w);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=s.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=s.getBarSeriesIndices(),r=new c(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new k(this)}draw(t,e){var a,s,i;const r=this.w,o=new u(this.w),h=new c(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,c=0;h<t.length;h++,c++){let u,b;const g=[],p=[],x=r.globals.comboCharts?e[h]:h,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),y=o.group({class:"apexcharts-series",rel:h+1,seriesName:I.escapeString(r.seriesData.seriesNames[x]),"data:realIndex":x});P.addCollapsedClassToSeries(this.w,y,x),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const v=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const w=this.barHelpers.initialPositions(x),{y:S,yDivision:L,zeroW:k,x:W,xDivision:F,zeroH:D}=w;let O=w.barHeight,A=w.barWidth;b=S,u=W,this.isHorizontal||p.push(u+(null!=A?A:0)/2);const M=o.group({class:"apexcharts-datalabels","data:realIndex":x});r.globals.delayedElements.push({el:M.node,holdUntilComplete:!(null==(a=r.config.dataLabels.animate)?void 0:a.enabled)&&this.isLengthTransition(x)}),M.node.classList.add("apexcharts-element-hidden");const R=o.group({class:"apexcharts-bar-goals-markers"}),X=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:X.node}),X.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const a=this.barHelpers.getStrokeWidth(h,e,x);let o=null;const d={indexes:{i:h,j:e,realIndex:x,translationsIndex:v,bc:c},x:u,y:b,strokeWidth:a,elSeries:y};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:O,zeroW:k,yDivision:L})),A=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:F,barWidth:A,zeroH:D})),O=this.series[h][e]/this.yRatio[v]);const m=this.barHelpers.getPathFillColor(t,h,e,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(s=r.config.plotOptions.funnel)?void 0:s.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof m.color&&-1===(null==(i=m.color)?void 0:i.indexOf("url"))?m.color:I.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:x,j:e});if(X.add(t),r.config.chart.dropShadow.enabled){new H(this.w).dropShadow(t,r.config.chart.dropShadow,x)}}this.pathArr.push(o);const C=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:O,barWidth:A});C&&R.add(C),b=o.y,u=o.x,e>0&&p.push(u+(null!=A?A:0)/2),g.push(b),this.renderSeries(l(n({realIndex:x,pathFill:m.color},m.useRangeColor?{lineFill:m.color}:{}),{j:e,i:h,columnGroupIndex:f,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:a,elSeries:y,x:u,y:b,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:O),barWidth:Math.abs(o.barWidth?o.barWidth:A),elDataLabelsWrap:M,elGoalsMarkers:R,elBarShadows:X,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=g,r.globals.previousPaths.length>0){const e=[];for(let a=0;a<t[h].length;a++)e.push(m(r,x,a));C({w:r,elSeries:y,record:this._prevRecord(x),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(y)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:a,j:s,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:b,y2:g,series:p,barHeight:x,barWidth:f,barXPosition:y,barYPosition:v,elDataLabelsWrap:C,elGoalsMarkers:P,elBarShadows:S,visibleSeries:I,type:L,classes:k}){var F,D,O,A,M,R,X;const B=this.w,T=new u(this.w,this.ctx),j=function(t,e){const a=t&&t.renderer;return a&&a.kind&&"svg"!==a.kind?a:e}(this.ctx,T);let z=!1;const _=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,T.setupEventDelegation(h,`.apexcharts-${L}-area`)),!a){let e=function(t){const e=B.config.stroke.colors;let a;return Array.isArray(e)&&e.length>0&&(a=e[t],a||(a=""),"function"==typeof a)?a({value:B.seriesData.series[t][s],dataPointIndex:s,w:B}):a};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];a=this.barOptions.distributed?B.globals.stroke.colors[s]:i}const Y=B.config.chart.animations,$=Y.animateGradually;let G=0,E=0;if($&&!1!==$.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=$.delay||0,a=Math.min(e,.5*Y.speed/Math.max(1,t));E=W({style:"sequential",index:s,baseDelay:a}),B.config.chart.stacked&&!B.globals.dataChanged&&(E+=i*a*.5);G=E/(e||1)}const V=new w(this).handleBarDataLabels({x:d,y:c,y1:b,y2:g,i:i,j:s,series:p,realIndex:t,columnGroupIndex:r,barHeight:x,barWidth:f,barXPosition:y,barYPosition:v,visibleSeries:I});if(E>0){const t=B.config.dataLabels;if((null==(F=t.animate)?void 0:F.enabled)||(null==(D=t.countUp)?void 0:D.enabled)){const t=String(Math.round(E));null==(A=null==(O=V.dataLabels)?void 0:O.node)||A.setAttribute("data:dlDelay",t),null==(R=null==(M=V.totalDataLabels)?void 0:M.node)||R.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(V.dataLabelsPos.dataLabelsX+Math.max(f,B.globals.barPadForNumericAxis)<0||V.dataLabelsPos.dataLabelsX-Math.max(f,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[s]&&B.config.series[i].data[s].strokeColor&&(a=B.config.series[i].data[s].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(X=this.ctx.morphTypeChange)?void 0:X.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,c=r&&this.ctx.morphTypeChange.claimsTargetMark(t,s);c&&(o=n,G=0);const u=j.renderPaths({i:i,j:s,realIndex:t,pathFrom:o,pathTo:n,stroke:a,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:_,animationDelay:G,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${L}-area${k?` ${k}`:""}`,chartType:L,bindEventsOnPaths:!1});u.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),c&&(u.node.setAttribute("opacity","0"),u.node.setAttribute("data-piece-hidden","1"));const p=B.config.forecastDataPoints;p.count>0&&s>=B.globals.dataPoints-p.count&&(u.node.setAttribute("stroke-dasharray",p.dashArray),u.node.setAttribute("stroke-width",p.strokeWidth),u.node.setAttribute("fill-opacity",p.fillOpacity)),void 0!==b&&void 0!==g&&(u.attr("data-range-y1",b),u.attr("data-range-y2",g));new H(this.w).setSelectionFilter(u,t,s),h.add(u),u.attr({cy:V.dataLabelsPos.bcy,cx:V.dataLabelsPos.bcx,j:s,val:B.seriesData.series[i][s],barHeight:x,barWidth:f,"data:pathKey":m(B,t,s)}),"canvas"===j.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][s]={cx:V.dataLabelsPos.bcx,cy:V.dataLabelsPos.bcy,barWidth:f}),null!==V.dataLabels&&C.add(V.dataLabels),V.totalDataLabels&&C.add(V.totalDataLabels),h.add(C),P&&h.add(P),S&&h.add(S)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:a,zeroW:s,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.axisFlags.isXNumeric)c=(r=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),c=r+e*this.visibleI,c-=e*a}else c=r+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=s?s:0;s=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=s?s:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:a,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:a,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(s=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:s,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",s,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:a,xDivision:s,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:c,j:u});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*a}else g=e+i*this.visibleI;a=this.barHelpers.getYForValue(this.series[c][u],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=s),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:a,goalY:this.barHelpers.getGoalValues("y",null,r,h,u,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:a,j:s}){const i=this.w;let r=a;return i.seriesData.seriesX[a].length||(r=i.globals.maxValsInArrayIndex),I.isNumber(i.seriesData.seriesX[r][s])&&(t=F.dataXToPx(i,i.seriesData.seriesX[r][s])-e*this.seriesLen/2),{barXPosition:t+(L(i)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let a=null;for(let s=0;s<e.globals.previousPaths.length;s++){const i=e.globals.previousPaths[s];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(a=i)}return a}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let a=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),a=t}return this._prevKeyed[t]=a,a}isLengthTransition(t){var e,a;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const s=this.w;let i=!1;if(f(s)&&s.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(a=null==(e=s.seriesData.series[t])?void 0:e.length)?a:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let a=0;a<o;a++)if(!e.has(m(s,t,a))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=v(this.w,t,!0,!0),a=!(!e||!e.join.changed);return this._layoutShiftCache[t]=a,a}getPreviousPath(t,e,a,s){const i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return f(i)?null:a;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const a=l.get(m(i,t,e));a?o=a.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=D.pathCommandCount(o),e=D.pathCommandCount(a);if(t===e)return o;const r=new u(i),n=t=>{const e=D.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(a)>1;if(t<e){const t=r.roundPathCorners(o,0);if(D.pathCommandCount(t)===e){if(l&&s){const t=r.roundPathCorners(s,0);D.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(a,0);if(D.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=D.squareLike(o),a=e?r.roundPathCorners(e,0):null;if(a&&D.pathCommandCount(a)===t)return a}return o}}}return n&&f(i)?null:a}static pathBox(t){if(!t)return null;const e=[],a=/([MLC])([^MLCZz]*)/g;let s;for(;null!==(s=a.exec(t));){const t=s[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=D.pathBox(t);if(!e)return null;const{minX:a,maxX:s,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,a)=>Math.abs(t-e)<=Math.abs(t-a)?[e,a]:[a,e];let h,d,c,u;n?(h=Math.abs(o[0]-a)<=Math.abs(o[0]-s)?a:s,d=h===a?s:a,[c,u]=l(o[1],i,r)):(c=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,u=c===i?r:i,[h,d]=l(o[0],a,s));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const a=this.w,s=this._prevRecord(t);if(!s)return null;const i=this._prevKeyedPaths(t),r=i?i.get(m(a,t,e)):s.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}const O=t=>{const e=function(t){const e=[];let a=t[0],s=t[1],i=e[0]=M(a,s),r=1;for(let o=t.length-1;r<o;r++)a=s,s=t[r+1],e[r]=.5*(i+(i=M(a,s)));return e[r]=i,e}(t),a=t.length-1,s=[];let i,r,o,n;for(let s=0;s<a;s++)o=M(t[s],t[s+1]),Math.abs(o)<1e-6?e[s]=e[s+1]=0:(i=e[s]/o,r=e[s+1]/o,n=i*i+r*r,n>9&&(n=3*o/Math.sqrt(n),e[s]=n*i,e[s+1]=n*r));for(let i=0;i<=a;i++)n=(t[Math.min(a,i+1)][0]-t[Math.max(0,i-1)][0])/(6*(1+e[i]*e[i])),s.push([n||0,e[i]*n||0]);return s},A={points(t){const e=O(t),a=t[1],s=t[0],i=[],r=e[1],o=e[0];i.push(s,[s[0]+o[0],s[1]+o[1],a[0]-r[0],a[1]-r[1],a[0],a[1]]);for(let a=2,s=e.length;a<s;a++){const s=t[a],r=e[a];i.push([s[0]-r[0],s[1]-r[1],s[0],s[1]])}return i},slice(t,e,a){const s=t.slice(e,a);if(e){if(a-e>1&&s[1].length<6){const t=s[0].length;s[1]=[2*s[0][t-2]-s[0][t-4],2*s[0][t-1]-s[0][t-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function M(t,e){return(e[1]-t[1])/(e[0]-t[0])}function R({graphics:t,w:e,elSeries:a,pointsByCat:s,options:i,distributed:r,realIndex:o,wrapClass:n,pointClass:l}){if(!i||!1===i.show||!s.length)return;const h=null!=i.opacity?i.opacity:.9,d=null!=i.strokeColor?i.strokeColor:"#fff",c=null!=i.strokeWidth?i.strokeWidth:1,u=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,b=t.group({class:u?`${n} apexcharts-element-hidden`:n});u&&e.globals.delayedElements.push({el:b.node}),s.forEach(({groups:a,j:s})=>{const n=r?e.globals.colors[s]:e.globals.colors[o],u=i.fillColor,g="series"===u?n:"series-dark"===u?X(n,.45):u||X(n,.45);a.forEach(a=>{const i=t.drawPath({d:a.d,fill:null!=a.fill?a.fill:g,stroke:c>0?d:"none",strokeWidth:c,fillOpacity:h,classes:l});i.attr("data:realIndex",o),i.attr("j",s),i.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),i.node.style.pointerEvents="none",b.add(i)})}),a.add(b)}function X(t,e){const a=I.parseHex(t);if(!a)return t;const s=Math.max(0,1-e);return`rgb(${Math.round(a[0]*s)},${Math.round(a[1]*s)},${Math.round(a[2]*s)})`}function B(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const a=Math.max(0,Math.min(1,e))*(t.length-1),s=Math.floor(a),i=a-s,r=I.parseHex(t[s])||[0,0,0],o=I.parseHex(t[Math.min(s+1,t.length-1)])||r,n=(t,e)=>Math.round(t+(e-t)*i);return`rgb(${n(r[0],o[0])},${n(r[1],o[1])},${n(r[2],o[2])})`}function T(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function j(t,e,a){return`M ${t-a} ${e} a ${a} ${a} 0 1 0 ${2*a} 0 a ${a} ${a} 0 1 0 ${-2*a} 0 `}function z(t,e,a){return`M ${t-a} ${e-a} h ${2*a} v ${2*a} h ${-2*a} z `}function _(t){const e=[];for(let a=0;a<t.length;a+=2)e.push(t[a+1],t[a]);return e}function Y(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function $(t,e){let a=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(a=e/100)}else"number"==typeof t&&isFinite(t)&&(a=t);return Math.min(.5,Math.max(0,a))}function G({halfExtent:t,cloudSign:e,rainSign:a,boxFrac:s,rainFrac:i}){const r=s*t,o=0===a?t:i*t,n=0===a?0:a*(t-o);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:n,rainHalfPx:o};const l=0===a?0:i,h=2*Math.max(0,1-l-s)*t,d=e*(t-h);return{cloudBaseOff:d,cloudMaxPx:h,boxCenterOff:d-e*r,boxHalfPx:r,rainCenterOff:n,rainHalfPx:o}}d.default.use({violin:class extends D{draw(t,e,a){var s;const i=this.w,r=new u(this.w),o=new S(this.w);this.violinOptions=i.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Y(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:Y(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?$(this.boxOptions.width,.15):0,this.rainFrac=$(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=i.config.plotOptions.bar.distributed,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.coreUtils=new c(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const n=r.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let l,h;const d=[],c=[],u=i.globals.comboCharts?a[e]:e,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(u),g=r.group({class:"apexcharts-series",seriesName:I.escapeString(i.seriesData.seriesNames[u]),rel:e+1,"data:realIndex":u});P.addCollapsedClassToSeries(this.w,g,u),t[e].length>0&&(this.visibleI=this.visibleI+1);let p=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[u][0],p=u);const x=this.barHelpers.initialPositions(u),{y:f,barHeight:m,yDivision:y,zeroW:v,x:C,barWidth:w,xDivision:S,zeroH:L}=x;h=f,l=C,c.push(l+(null!=w?w:0)/2);const k=r.group({class:"apexcharts-datalabels","data:realIndex":u});if(this.seriesMaxWeight=0,"group"===this.normalize){(i.violinData.seriesViolinDensity[u]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const H=[];for(let a=0;a<i.globals.dataPoints;a++){const r=this.barHelpers.getStrokeWidth(e,a,u),n=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:a,realIndex:u,translationsIndex:p},y:h,yDivision:y,barHeight:m,zeroW:v}):this.drawVerticalViolin({indexes:{i:e,j:a,realIndex:u,translationsIndex:p},x:l,xDivision:S,barWidth:w,zeroH:L});l=n.x,h=n.y,a>0&&c.push(n.center),d.push(n.alongRepresentative);const x=this.buildPointsSubPath({realIndex:u,j:a,center:n.center,halfExtent:n.halfExtent,alongFn:n.alongFn,density:n.density,maxWeight:n.maxWeight,cloudBase:n.cloudBase,cloudMaxPx:n.cloudMaxPx,rainCenter:n.rainCenter,rainHalfPx:n.rainHalfPx});x.length&&H.push({groups:x,j:a});const f=o.fillPath({seriesNumber:this.distributed?a:u,dataPointIndex:a,color:this.distributed?i.globals.colors[a]:void 0,value:t[e][a]});this.renderSeries({realIndex:u,pathFill:f,lineFill:i.globals.stroke.colors[u],j:a,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:r,elSeries:g,x:l,y:h,series:t,columnGroupIndex:b,barHeight:m,barWidth:w,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin"});const C=g.node.querySelector(`path.apexcharts-violin-area[j='${a}']`);if(C&&isFinite(n.alongRepresentative)&&C.setAttribute(this.isHorizontal?"cx":"cy",`${n.alongRepresentative}`),n.boxPaths){const r=null!=(s=this.boxOptions.strokeWidth)?s:1;n.boxPaths.forEach(s=>{this.renderSeries({realIndex:u,pathFill:s.filled?this.boxOptions.fillColor||f:"none",lineFill:i.globals.stroke.colors[u],j:a,i:e,pathFrom:s.pathFrom,pathTo:s.pathTo,strokeWidth:r,elSeries:g,x:l,y:h,series:t,columnGroupIndex:b,barHeight:m,barWidth:w,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box"})})}}R({graphics:r,w:i,elSeries:g,pointsByCat:H,options:this.pointsOptions,distributed:this.distributed,realIndex:u,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),i.globals.seriesXvalues[u]=c,i.globals.seriesYvalues[u]=d,n.add(g)}return n}drawVerticalViolin({indexes:t,x:e,xDivision:a,barWidth:s,zeroH:i}){var r,o,n,l,h,d,c;const u=this.w,{realIndex:b,j:g,translationsIndex:p}=t,x=this.yRatio[p];u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[b][g]-u.globals.minX)/this.xRatio-s/2);const f=e+s*this.visibleI+s/2,m=s/2,y=this.getDensity(b,g),v=this.effectiveMaxWeight(y),C=t=>i-this.logVal(t,b)/x,w=G({halfExtent:m,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(n=this.boxFrac)?n:0,rainFrac:null!=(l=this.rainFrac)?l:0}),P=f+w.cloudBaseOff,S=this.buildBodyPath({nodes:y.nodes,center:P,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:C,collapsed:!1,sideSign:this.cloudSign});let I=null;const L=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(b,g);return L?I=L:u.globals.previousPaths.length>0&&(I=this.getPreviousPath(b,g,S)),null==I&&(I=this.buildBodyPath({nodes:y.nodes,center:P,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:C,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=a),{pathTo:S,pathFrom:I,x:e,y:i,center:f,halfExtent:m,alongFn:C,density:y,maxWeight:v,cloudBase:P,cloudMaxPx:w.cloudMaxPx,rainCenter:f+w.rainCenterOff,rainHalfPx:w.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:b,j:g,boxCenter:f+w.boxCenterOff,boxHalfPx:w.boxHalfPx,alongFn:C,vertical:!0}),alongRepresentative:C(null!=(c=this.series[t.i][g])?c:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:a,barHeight:s,zeroW:i}){var r,o,n,l,h,d,c;const u=this.w,{realIndex:b,j:g}=t,p=this.invertedYRatio;u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[b][g]-u.globals.minX)/this.invertedXRatio-s/2);const x=e+s*this.visibleI+s/2,f=s/2,m=this.getDensity(b,g),y=this.effectiveMaxWeight(m),v=t=>i+this.logVal(t,b)/p,C=G({halfExtent:f,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(n=this.boxFrac)?n:0,rainFrac:null!=(l=this.rainFrac)?l:0}),w=x+C.cloudBaseOff,P=this.buildBodyPath({nodes:m.nodes,center:w,halfExtent:C.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:v,collapsed:!1,sideSign:this.cloudSign});let S=null;const I=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(b,g);return I?S=I:u.globals.previousPaths.length>0&&(S=this.getPreviousPath(b,g,P)),null==S&&(S=this.buildBodyPath({nodes:m.nodes,center:w,halfExtent:C.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:v,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=a),{pathTo:P,pathFrom:S,x:i,y:e,center:x,halfExtent:f,alongFn:v,maxWeight:y,density:m,cloudBase:w,cloudMaxPx:C.cloudMaxPx,rainCenter:x+C.rainCenterOff,rainHalfPx:C.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:b,j:g,boxCenter:x+C.boxCenterOff,boxHalfPx:C.boxHalfPx,alongFn:v,vertical:!1}),alongRepresentative:v(null!=(c=this.series[t.i][g])?c:0)}}getDensity(t,e){var a;const s=null==(a=this.w.violinData.seriesViolinDensity[t])?void 0:a[e];if(!s||!s.values.length)return{nodes:[],maxWeight:0};const i=s.values.map((t,e)=>e);i.sort((t,e)=>s.values[t]-s.values[e]);const r=[];let o=null;for(const t of i){const e=s.values[t];null!==o&&e===o||(r.push({v:e,w:s.weights[t]}),o=e)}return{nodes:r,maxWeight:s.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:a,maxWeight:s,vertical:i,alongFn:r,collapsed:o,sideSign:n=0}){const l=new u(this.w);if(0===t.length){const t=r(0);return i?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const h=t=>{if(o||s<=0)return 0;const e=t/s*a*this.bandwidthScale;return Math.min(a,Math.max(0,e))},d=[],c=[];for(let a=0;a<t.length;a++){const s=r(t[a].v),o=h(t[a].w),l=0===n?e+o:e+n*o,u=0===n?e-o:e;i?(d.push([l,s]),c.push([u,s])):(d.push([s,l]),c.push([s,u]))}return c.reverse(),this.smoothSegment(d,i,!1)+this.smoothSegment(c,i,!0)+"z"}buildBoxSubPaths({realIndex:t,j:e,boxCenter:a,boxHalfPx:s,alongFn:i,vertical:r}){var o,n;const l=this.w;if(!this.boxShown||s<=0)return null;const h=null==(o=l.violinData.seriesViolinSummary[t])?void 0:o[e];if(!h)return null;const d=s*Math.min(1,Math.max(0,null!=(n=this.boxOptions.capWidth)?n:.5)),[c,b,g,p,x]=h.map(t=>i(t)),f=(t,e)=>{const s=new u(this.w),i=(t,e)=>r?[t,e]:[e,t],o=t=>t.map(([t,e],a)=>0===a?s.move(t,e):s.line(t,e)).join(""),n=a;return{whiskers:o([i(n,c),i(n,b)])+o([i(n,p),i(n,x)])+o([i(n-t,c),i(n+t,c)])+o([i(n-t,x),i(n+t,x)]),box:o([i(n-e,b),i(n+e,b),i(n+e,p),i(n-e,p)])+"z"+o([i(n-e,g),i(n+e,g)])}},m=f(d,s),y=f(0,0),v=(a,s)=>{let i=null;return l.globals.previousPaths.length>0&&(i=this.getPreviousPath(t,e,a)),null==i?s:i};return[{pathTo:m.whiskers,pathFrom:v(m.whiskers,y.whiskers),filled:!1},{pathTo:m.box,pathFrom:v(m.box,y.box),filled:!0}]}smoothSegment(t,e,a){const s=new u(this.w),i=t[0];let r=a?s.line(i[0],i[1]):s.move(i[0],i[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=s.line(t[e][0],t[e][1]);return r}const o=t.map(([t,a])=>e?[a,t]:[t,a]),n=A.points(o);return r+=(t=>{let e="";for(let a=0;a<t.length;a++){const s=t[a],i=s.length;i>4?(e+=`C${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`,e+=`, ${s[4]}, ${s[5]}`):i>2&&(e+=`S${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`)}return e})(e?n.map(_):n),r}strictlyMonotonic(t,e){const a=e?1:0;for(let e=1;e<t.length;e++)if(t[e][a]===t[e-1][a])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:a,halfExtent:s,alongFn:i,density:r,maxWeight:o,cloudBase:n,cloudMaxPx:l,rainCenter:h,rainHalfPx:d}){var c;const u=0!==this.rainSign,b=u?h:0!==this.cloudSign?n:a,g=u?d:0!==this.cloudSign?l:s;return function({w:t,points:e,seedA:a,seedB:s,center:i,halfExtent:r,alongFn:o,isHorizontal:n,options:l,clampAt:h,sideSign:d}){const c=l;if(!c||!1===c.show)return[];if(!e||!e.length)return[];const u=c.maxPoints||3e3,b=e.length>u?Math.ceil(e.length/u):1,g=null!=c.size?c.size:2.5,p=r*(null!=c.jitter?c.jitter:.5),x=!1!==c.constrainToViolin&&"function"==typeof h,f="square"===c.shape,m=c.colorScale,y=m&&Array.isArray(m.colors)&&m.colors.length>0,v=y?Math.max(2,m.steps||24):1,C=y&&null!=m.min?m.min:t.globals.minY,w=(y&&null!=m.max?m.max:t.globals.maxY)-C||1,P=y?new Array(v).fill(""):[""];for(let t=0;t<e.length;t+=b){const r=e[t],l=o(r);let c=2*(T(7919*a+100003*s+t)-.5)*p;if(x){const t=h(r);c>t&&(c=t),c<-t&&(c=-t)}d&&(c=Math.abs(c)*d);const u=n?l:i+c,b=n?i+c:l,m=f?z(u,b,g):j(u,b,g);if(y){let t=(r-C)/w;t<0&&(t=0),t>1&&(t=1),P[Math.round(t*(v-1))]+=m}else P[0]+=m}if(!y)return P[0]?[{fill:null,d:P[0]}]:[];const S=[];for(let t=0;t<v;t++)P[t]&&S.push({fill:B(m.colors,t/(v-1)),d:P[t]});return S}({w:this.w,points:null==(c=this.w.violinData.seriesViolinPoints[t])?void 0:c[e],seedA:t,seedB:e,center:b,halfExtent:g,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:t=>this.halfWidthAtValue(t,r,g,o),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,a,s){const{nodes:i}=e,r=null!=s?s:e.maxWeight;if(!i.length||r<=0)return 0;const o=t=>Math.min(a,t/r*a*this.bandwidthScale);if(t<=i[0].v)return o(i[0].w);if(t>=i[i.length-1].v)return o(i[i.length-1].w);for(let e=1;e<i.length;e++)if(t<=i[e].v){const a=i[e-1],s=i[e],r=s.v===a.v?0:(t-a.v)/(s.v-a.v);return o(a.w+(s.w-a.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,a,s)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,n=(t,e)=>{for(var a in e||(e={}))i.call(e,a)&&o(t,a,e[a]);if(s)for(var a of s(e))r.call(e,a)&&o(t,a,e[a]);return t},l=(t,s)=>e(t,a(s));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const a in t)if("default"!==a){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),c=d.__apex_CoreUtils,u=d.__apex_Graphics,b=d.__apex_DataLabels,g=(t,e,a,s)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:a,dataPointIndex:s,w:e});return Number.isFinite(i)?i:0},p=d.__apex_BrowserAPIs_BrowserAPIs,x=d.__apex_Environment_Environment;function f(t){var e;const a=t.config.chart.animations;if(!a||!1===a.enabled)return!1;if(!a.dynamicAnimation||!1===a.dynamicAnimation.enabled)return!1;const s=null!=(e=a.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(x.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function m(t,e,a){var s,i,r,o;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[a])return"x:"+s[a]}const n=null==(o=t.globals.labels)?void 0:o[a];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+a}function y(t){const e=new Map;return t.map(t=>{const a=e.get(t)||0;return e.set(t,a+1),0===a?t:`${t}#${a}`})}function v(t,e,a=!1,s=!1){var i,r;if(!f(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=y(n.map((t,a)=>function(t,e,a){var s,i;if(t.isXNumeric){const i=null==(s=t.seriesX)?void 0:s[e];if(i&&i.length&&null!=i[a])return"x:"+i[a]}const r=null==(i=t.labels)?void 0:i[a];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+a}(o,e,a))),d=y(l.map((a,s)=>m(t,e,s))),c=function(t,e){const a=new Map;t.forEach((t,e)=>{a.has(t)||a.set(t,e)});const s=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=a.has(t)&&!i.has(a.get(t))?a.get(t):-1;s[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:s,exits:l,ordered:o,changed:!n}}(h,d);return(c.ordered||s)&&(c.changed||a)?{join:c,oldKeys:h,newKeys:d}:null}function C({w:t,elSeries:e,record:a,newKeys:s,isHorizontal:i,speed:r}){var o;if(!f(t))return;if(!a||!Array.isArray(a.paths)||!(null==e?void 0:e.node))return;const n=new Set(s),l=a.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new u(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(a.realIndex),10)];l.forEach(a=>{let s=a.fill||d||"#c8c8c8";0===String(s).indexOf("url(")&&(s=d||"#c8c8c8");const o=h.drawPath({d:a.d,stroke:"none",strokeWidth:0,fill:s,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const a=parseFloat(e[1]),s=parseFloat(e[2]);return isFinite(a)&&isFinite(s)?{x:a,y:s}:null}(a.d);let c=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=i?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const u=n.style;u.transformBox="fill-box",u.transformOrigin=c;const b=Math.max(1,r||1),g=performance.now(),x=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const a=Math.max(0,Math.min(1,(e-g)/b)),s=1-Math.pow(1-a,3),r=1-s;u.transform=i?`scaleX(${r})`:`scaleY(${r})`,u.opacity=String(1-s),a<1?p.requestAnimationFrame(x):n.parentNode.removeChild(n)};p.requestAnimationFrame(x)})}class w{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,a;const{x:s,y:i,y1:r,y2:o,i:h,j:d,realIndex:c,columnGroupIndex:b,barHeight:p,barWidth:x,barXPosition:f,barYPosition:m,visibleSeries:y}=t,v=this.w,C=new u(this.barCtx.w),w=v.waterfallData&&v.waterfallData.values,P=w&&w[c]&&null!=w[c][d]?w[c][d]:null,S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;let I,L;v.axisFlags.isXNumeric&&!v.globals.isBarHorizontal?(I=s+x*(y+1),L=i+p*(y+1)-S):(I=s+x*y,L=i+p*y);let k=null,W=null,H=s,F=i,D={};const O=v.config.dataLabels,A=this.barCtx.barOptions.dataLabels,M=this.barCtx.barOptions.dataLabels.total;void 0!==m&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(L=m,F=m),void 0!==f&&this.barCtx.isVerticalGroupedRangeBar&&(I=f,H=f);const R=g(O.offsetX,v,c,d),X=g(O.offsetY,v,c,d);let B={width:0,height:0};if(v.config.dataLabels.enabled){const t=null!==P?P:v.seriesData.series[c][d];B=C.getTextRects(v.config.dataLabels.formatter?v.config.dataLabels.formatter(t,l(n({},v),{seriesIndex:c,dataPointIndex:d,w:v})):v.formatters.yLabelFormatters[0](t),parseFloat(O.style.fontSize).toString(),O.style.fontFamily,void 0,!0,O.style.fontWeight)}const T={x:s,y:i,i:h,j:d,realIndex:c,columnGroupIndex:b,bcx:I,bcy:L,barHeight:p,barWidth:x,textRects:B,strokeWidth:S,dataLabelsX:H,dataLabelsY:F,dataLabelsConfig:O,barDataLabelsConfig:A,barTotalDataLabelsConfig:M,offX:R,offY:X};if(D=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==P&&this.barCtx.isHorizontal&&"center"===A.position){const t=null==(a=null==(e=v.waterfallData.geometry)?void 0:e[c])?void 0:a[d];t&&t.horizontal&&(D.dataLabelsX=(t.levelStart+t.levelEnd)/2+R)}return k=this.drawCalculatedDataLabels({x:D.dataLabelsX,y:D.dataLabelsY,val:null!==P?P:this.barCtx.isRangeBar?[r,o]:"100%"===v.config.chart.stackType?v.globals.seriesPercent[c][d]:v.seriesData.series[c][d],i:c,j:d,barWidth:x,barHeight:p,textRects:B,dataLabelsConfig:O}),v.config.chart.stacked&&M.enabled&&(W=this.drawTotalDataLabels({x:D.totalDataLabelsX,y:D.totalDataLabelsY,barWidth:x,barHeight:p,realIndex:c,j:d,textAnchor:D.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:d}),rawVal:this.getStackedTotalValue({realIndex:c,j:d}),dataLabelsConfig:O,barTotalDataLabelsConfig:M})),{dataLabelsPos:D,dataLabels:k,totalDataLabels:W}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,a=this.getTotalGroupContext(t);return a&&e&&e.length>a.groupIndex?e[a.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const a=this.w,s=this.getTotalGroupContext(t),i=a.seriesData.stackedSeriesTotalsByGroups;return s&&i&&i[s.groupIndex]?i[s.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const a=this.w;let s=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(s=this.totalFormatter(s,l(n({},a),{seriesIndex:t,dataPointIndex:e,w:a}))),s}calculateColumnsDataLabelsPosition(t){const e=this.w;let a,s,{i:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:c,dataLabelsX:b,dataLabelsY:g,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:m,offX:y,offY:v}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:P}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=m/2;const S=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?b+=h/2:(b=e.axisFlags.isXNumeric?l-h/2+y:l-S+h/2+y,!e.config.chart.stacked&&P>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b-=h*P)),w){const t=2;b=b+c.height/2-m/2-t}const I=e.seriesData.series[i][r]<0;let L=n;switch(this.barCtx.isReversed&&(L=n+(I?d:-d)),x.position){case"center":g=w?I?L-d/2+v:L+d/2-v:I?L-d/2+c.height/2+v:L+d/2+c.height/2-v;break;case"bottom":g=w?I?L-d+v:L+d-v:I?L-d+c.height+m+v:L+d-c.height/2+m-v;break;case"top":g=w?I?L+v:L-v:I?L-c.height/2-v:L+c.height+v}let k=L;const W=this.getTotalGroupContext(o);if((W?[W.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{k=I?Math.max(t[r],k):Math.min(t[r],k)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new u(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);a=I?k-i.height/2-v-f.offsetY+t:k+i.height+v+f.offsetY-t;const n=S;s=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(g<0?g=0+m:g+c.height/3>e.layout.gridHeight&&(g=e.layout.gridHeight-m)),{bcx:l,bcy:n,dataLabelsX:b,dataLabelsY:g,totalDataLabelsX:s,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const a=this.w;let{x:s,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:c,strokeWidth:b,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:m}=t;const y=a.layout.gridHeight/a.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,P;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+m-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+m-3;!a.config.chart.stacked&&v>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*v);let S="start";const I=a.seriesData.series[i][r]<0;let L=s;if(this.barCtx.isReversed&&(L=s+(I?-h:h),S=I?"start":"end"),this.barCtx.isPyramid)c=a.layout.gridWidth/2+f;else switch(p.position){case"center":c=I?L+h/2-f:Math.max(d.width/2,L-h/2)+f;break;case"bottom":c=I?L+h-b-f:L-h+b+f;break;case"top":c=I?L-b-f:L-b+f}let k=L;const W=this.getTotalGroupContext(o);if((W?[W.group]:a.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{k=I?Math.min(t[r],k):Math.max(t[r],k)})}),this.drawsStackedTotal(o)&&x.enabled){const t=new u(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);I?(w=k-b-f-x.offsetX,S="end"):w=k+f+x.offsetX+(this.barCtx.isReversed?-(h+b):b),P=C-d.height/2+t.height/2+x.offsetY+b,a.globals.barGroups.length>1&&!W&&(P-=a.globals.barGroups.length/2*(l/2))}if(!a.config.chart.stacked){const t=I&&"middle"!==g.textAnchor?"start"===g.textAnchor?"end":"start":g.textAnchor;let e;e="vertical"===p.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const s=("vertical"===p.orientation?d.height:d.width)-e;c+s>a.layout.gridWidth-b&&(c=a.layout.gridWidth-s-b),c-e<b&&(c=e+b)}return{bcx:s,bcy:n,dataLabelsX:c,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:P,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:t,y:e,val:a,i:s,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,g,p;const x=this.w;let f="rotate(0)";"vertical"===x.config.plotOptions.bar.dataLabels.orientation&&(f=`rotate(-90, ${t}, ${e})`);const y=new b(this.barCtx.w,this.barCtx.ctx),v=new u(this.barCtx.w),C=d.formatter;let w=null;const P=x.globals.collapsedSeriesIndices.indexOf(s)>-1,S=(x.globals.collapsingSeriesIndices||[]).indexOf(s)>-1;if(S){const t=null==(c=x.globals.prevDataLabels)?void 0:c.get(`${s}::${m(x,s,i)}`);t&&isFinite(t.val)&&(a=t.val)}if(d.enabled&&(!P||S)){w=v.group({class:"apexcharts-data-labels",transform:f});const c=x.config.dataLabels;((null==(g=c.animate)?void 0:g.enabled)||(null==(p=c.countUp)?void 0:p.enabled))&&(w.node.setAttribute("data:dlKey",`${s}::${m(x,s,i)}`),w.node.setAttribute("data:dlJ",String(i)),"number"==typeof a&&isFinite(a)&&w.node.setAttribute("data:dlVal",String(a)));let u="";void 0!==a&&(u=C(a,l(n({},x),{seriesIndex:s,dataPointIndex:i,w:x}))),!a&&x.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u="");const b=x.seriesData.series[s][i]<0,P=x.config.plotOptions.bar.dataLabels.position;if("vertical"===x.config.plotOptions.bar.dataLabels.orientation&&("top"===P&&(d.textAnchor=b?"end":"start"),"center"===P&&(d.textAnchor="middle"),"bottom"===P&&(d.textAnchor=b?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<v.getTextRects(u,parseFloat(d.style.fontSize).toString()).width&&(u="")}x.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!S&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(u=""):r.height/1.6>Math.abs(o)&&(u=""));const I=n({},d);this.barCtx.isHorizontal&&a<0&&("start"===d.textAnchor?I.textAnchor="end":"end"===d.textAnchor&&(I.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:u,i:s,j:i,parent:w,dataLabelsConfig:I,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}drawTotalDataLabels({x:t,y:e,val:a,rawVal:s,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new u(this.barCtx.w);let c;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){c=d.drawText({x:t,y:e,foreColor:n.style.color,text:a,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),c.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const u=this.w.config.dataLabels;if((null==(l=u.animate)?void 0:l.enabled)||(null==(h=u.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);c.node.setAttribute("data:dlTotalKey",`${t}::${m(this.w,i,r)}`),c.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof s&&isFinite(s)&&c.node.setAttribute("data:dlTotalVal",String(s))}}return c}}const P=d.__apex_Series,S=d.__apex_Fill,I=d.__apex_Utils;function L(t){var e,a,s,i,r,o,n;return"histogram"===(null==(a=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:a.requestedType)&&(!1!==(null==(i=null==(s=t.config.plotOptions)?void 0:s.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class k{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let a=0;a<t.length;a++)if(t[a].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[a].length),e.axisFlags.isXNumeric)for(let s=0;s<t[a].length;s++)e.seriesData.seriesX[a][s]>e.globals.minX&&e.seriesData.seriesX[a][s]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),I.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const a=t.globals.maxX-t.globals.minX;e=a>0?a/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const a=t.globals.minXDiff;e=a>0&&isFinite(a)&&.5!==a?a:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let a=0;a<t.length;a++){const s=t[a];Array.isArray(s)&&s.length>0&&e.push(s)}if(!e.length)return 0;const a=new Array(e.length).fill(0);let s=NaN,i=1/0;for(;;){let t=1/0,r=-1;for(let s=0;s<e.length;s++){const i=e[s];for(;a[s]<i.length&&"number"!=typeof i[a[s]];)a[s]++;if(a[s]>=i.length)continue;const o=i[a[s]];o==o?o<t&&(t=o,r=s):(a[s]++,s--)}if(-1===r)break;if(a[r]++,s==s){const e=t-s;e>0&&e<i&&(i=e)}s=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let a,s,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let c=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||L(e))&&(c=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/c,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),s=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){a=this.barCtx.getBarXForNumericXAxis({x:a,j:0,realIndex:t,barWidth:n}).x}else a=e.globals.padHorizontal+I.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:a,y:s,yDivision:i,xDivision:r,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,a,s){var i;const r=this.w,o=new S(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?a:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(s=>{t[e][a]>=s.from&&t[e][a]<=s.to&&(n=s.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,a)||(null==(i=r.config.series[e].data[a])?void 0:i.fill),c=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let u;c&&c.color&&(n=c.color,u=c.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:s,dataPointIndex:a,color:n,opacity:u,value:t[e][a],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[s]:r.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const a=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const s=a.dumbbellData;if(!s||"series"!==s.form)return null;const i=a.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=s.order[e];if(!r)return null;const o=a.globals.colors[r[0]],n=a.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,a){let s=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),s}getStackedSeriesIndices(t){const e=this.w,a=e.labelData.seriesGroups,s=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,i=t=>!s||s.has(t);if(!a||a.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:a.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const a=this.w,s=!this.w.config.chart.stacked||a.config.plotOptions.bar.borderRadius<=0,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(s?"top":"none"));if(s)return o;const n="last"===a.config.plotOptions.bar.borderRadiusWhenStacked,l=n?"top":"both",h=n?"bottom":"both",d=n?"none":"bottom",c=n?"none":"top";for(const e of this.getStackedSeriesIndices(i))for(let a=0;a<r;a++){const s=[],i=[];for(const r of e){const e=t[r][a];e>0?s.push(r):e<0&&i.push(r)}if(s.length>0&&0===i.length)if(1===s.length)o[s[0]][a]=l;else{const t=s[0],e=s[s.length-1];for(const i of s)o[i][a]=i===t?d:i===e?"top":"none"}else if(i.length>0&&0===s.length)if(1===i.length)o[i[0]][a]=h;else{const t=Math.min(...i),e=Math.max(...i);for(const s of i)o[s][a]=s===t?c:s===e?"bottom":"none"}else if(s.length>0&&i.length>0){const t=s[s.length-1];for(const e of s)o[e][a]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][a]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:a,x2:s,y1:i,y2:r,elSeries:o}){const n=this.w,l=new u(this.barCtx.w),h=new P(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==a?a:0,void 0!==i?i:0,void 0!==s?s:n.layout.gridWidth,void 0!==r?r:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:a,y2:s,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,g,p;const x=new u(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.columnWidthOffset)&&(m=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const y=i/2,v=m+y,C=m+f-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);a+=.001-y*w,s+=.001+y*w;const P=x.line(C,a),S="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",I=x.move(v,a)+x.line(v,s)+x.line(C,s)+P+S;let L=I;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let k=null;const W=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(W?k=W:c.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(l,d,L,I)),null==k&&(k=x.move(v,a)+x.line(v,a)+P+P+P+P+P+x.line(v,a)+S),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(s-y*w),t.yArrjF.push(Math.abs(a-s+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:k,drawnBox:{x1:v,x2:C,y1:a,y2:s}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:a,i:s,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new u(this.barCtx.w),c=n.layout.gridWidth/2,b=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,g=b(a[s][i]),p=i===a[s].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:g:b(a[s][i+1]);const m=o/2,y=t+m,v=t+e-m,C=c-g,w=c+g,P=c-f,S=c+f,I=d.move(C,y)+d.line(w,y)+d.line(S,v)+d.line(P,v)+" Z";let L=null;const k=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return k?L=k:n.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(r,i,I)),null==L&&(L=d.move(c,y)+d.line(c,y)+d.line(c,v)+d.line(c,v)+" Z"),{pathTo:I,pathFrom:L,x:w,x1:C,barXPosition:c}}computePyramidLayout(t){const e=this.w,a=e.layout.gridHeight,s=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||a<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=s/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const s=n/r,h=e*a,d=s*a;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:s*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:a,bottomHalf:s,realIndex:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new u(this.barCtx.w),c=n.layout.gridWidth/2,b=o/2,g=t+b,p=t+e-b,x=c-a,f=c+a,m=c-s,y=c+s,v=d.move(x,g)+d.line(f,g)+d.line(y,p)+d.line(m,p)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,v)),null==C&&(C=d.move(c,g)+d.line(c,g)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:v,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:a,x2:s,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,g,p;const x=new u(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,m=e+c.config.series[l].data[d].barHeightOffset);const y=i/2,v=f+y,C=f+m-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);a+=.001+y*w,s+=.001-y*w;const P=this.barCtx.isFunnel,S=P?(a+s)/2:a,I=x.line(a,C),L="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",k=x.move(a,v)+x.line(s,v)+x.line(s,C)+I+L;let W=k;"none"!==this.arrBorderRadius[l][d]&&(W=x.roundPathCorners(W,c.config.plotOptions.bar.borderRadius));let H=null;const F=null==(p=null==(g=this.barCtx.ctx)?void 0:g.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(F?H=F:c.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(l,d,W,k)),null==H){const t=P?x.line(S,C):I;H=x.move(S,v)+x.line(S,v)+t+t+t+t+t+x.line(S,v)+L}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(s+y*w),t.xArrjF.push(Math.abs(a-s-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:W,pathFrom:H,drawnBox:{x1:a,x2:s,y1:v,y2:C}}}getXForValue(t,e,a=!0){let s=a?e:null;return null!=t&&(s=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),s}getYForValue(t,e,a,s=!0){let i=s?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[a]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[a]:0)),i}getGoalValues(t,e,a,s,i,r){const o=this.w,h=[],d=(s,i)=>{h.push({[t]:"x"===t?this.getXForValue(s,e,!1):this.getYForValue(s,a,r,!1),attrs:i})};if(o.seriesData.seriesGoals[s]&&o.seriesData.seriesGoals[s][i]&&Array.isArray(o.seriesData.seriesGoals[s][i])&&o.seriesData.seriesGoals[s][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(s,i);if(e.length){const a={strokeHeight:"x"===t?0:o.globals.markers.size[s],strokeWidth:"x"===t?o.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round"};let r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const c=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},a),{strokeColor:t.color});!c.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,s,i,t.index),color:c.colorFromMarker?t.color:Array.isArray(c.style.colors)?c.style.colors[t.index]||c.style.colors[0]:c.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const a=this.w,s=[],i=a.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&s.push({value:r,color:a.globals.colors[e],index:e})}return s}if(!a.rangeData.seriesRange.length)return s;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:a.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[t];return[{value:a.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:a.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,a,s){const i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:a,endpointIndex:s,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,a,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:a,goalY:s,barWidth:i,barHeight:r}){if(!(Array.isArray(a)&&a.length>0||Array.isArray(s)&&s.length>0))return null;const o=new u(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const a=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,s=e+a+r/2;l=o.drawLine(t.x,s-2*a,t.x,s,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:s-a,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(s)&&s.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const a=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,s=t+a+i/2;l=o.drawLine(s-2*a,e.y,s,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:s-a,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const a=this.w,s=new u(a),i=a.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return s.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:a,realIndex:s,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,b=l+e.barHeight,g=new u(this.barCtx.w),p=new I,x=g.move(n,b)+g.line(o,b)+g.line(h,c)+g.line(d,c)+g.line(n,b)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[s][i]?" Z":" z");return g.drawPath({d:x,fill:p.shadeColor(.5,I.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var a;const s=this.w;let i=0,r=0;return(s.config.plotOptions.bar.horizontal?s.seriesData.series.map((t,e)=>e):(null==(a=s.globals.columnSeries)?void 0:a.i.map(t=>t))||[]).forEach(a=>{const o=s.globals.seriesPercent[a][e];o&&i++,a<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(a=>a.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,a=e.labelData.seriesGroups.findIndex(a=>a.indexOf(e.seriesData.seriesNames[t])>-1),s=this.barCtx.columnGroupIndices;let i=s.indexOf(a);return i<0&&(s.push(a),i=s.length-1),{groupIndex:a,columnGroupIndex:i}}}const W=d.__apex_Filters,H=d.__apex_Animations_computeStagger;class F{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/F.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*F.xRatio(t)}static screenXToPlotPx(t,e){const a=t.dom.baseEl,s=a&&a.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const i=s.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class D{constructor(t,e,a){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=a,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const s=new P(this.w);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=s.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=s.getBarSeriesIndices(),r=new c(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new k(this)}draw(t,e){var a,s,i;const r=this.w,o=new u(this.w),h=new c(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,c=0;h<t.length;h++,c++){let u,b;const g=[],p=[],x=r.globals.comboCharts?e[h]:h,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),y=o.group({class:"apexcharts-series",rel:h+1,seriesName:I.escapeString(r.seriesData.seriesNames[x]),"data:realIndex":x});P.addCollapsedClassToSeries(this.w,y,x),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const v=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const w=this.barHelpers.initialPositions(x),{y:S,yDivision:L,zeroW:k,x:H,xDivision:F,zeroH:D}=w;let O=w.barHeight,A=w.barWidth;b=S,u=H,this.isHorizontal||p.push(u+(null!=A?A:0)/2);const M=o.group({class:"apexcharts-datalabels","data:realIndex":x});r.globals.delayedElements.push({el:M.node,holdUntilComplete:!(null==(a=r.config.dataLabels.animate)?void 0:a.enabled)&&this.isLengthTransition(x)}),M.node.classList.add("apexcharts-element-hidden");const R=o.group({class:"apexcharts-bar-goals-markers"}),X=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:X.node}),X.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const a=this.barHelpers.getStrokeWidth(h,e,x);let o=null;const d={indexes:{i:h,j:e,realIndex:x,translationsIndex:v,bc:c},x:u,y:b,strokeWidth:a,elSeries:y};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:O,zeroW:k,yDivision:L})),A=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:F,barWidth:A,zeroH:D})),O=this.series[h][e]/this.yRatio[v]);const m=this.barHelpers.getPathFillColor(t,h,e,x);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(s=r.config.plotOptions.funnel)?void 0:s.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof m.color&&-1===(null==(i=m.color)?void 0:i.indexOf("url"))?m.color:I.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:x,j:e});if(X.add(t),r.config.chart.dropShadow.enabled){new W(this.w).dropShadow(t,r.config.chart.dropShadow,x)}}this.pathArr.push(o);const C=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:O,barWidth:A});C&&R.add(C),b=o.y,u=o.x,e>0&&p.push(u+(null!=A?A:0)/2),g.push(b),this.renderSeries(l(n({realIndex:x,pathFill:m.color},m.useRangeColor?{lineFill:m.color}:{}),{j:e,i:h,columnGroupIndex:f,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:a,elSeries:y,x:u,y:b,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:O),barWidth:Math.abs(o.barWidth?o.barWidth:A),elDataLabelsWrap:M,elGoalsMarkers:R,elBarShadows:X,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=g,r.globals.previousPaths.length>0){const e=[];for(let a=0;a<t[h].length;a++)e.push(m(r,x,a));C({w:r,elSeries:y,record:this._prevRecord(x),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(y)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:a,j:s,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:b,y2:g,series:p,barHeight:x,barWidth:f,barXPosition:y,barYPosition:v,elDataLabelsWrap:C,elGoalsMarkers:P,elBarShadows:S,visibleSeries:I,type:L,classes:k}){var F,D,O,A,M,R,X;const B=this.w,T=new u(this.w,this.ctx),j=function(t,e){const a=t&&t.renderer;return a&&a.kind&&"svg"!==a.kind?a:e}(this.ctx,T);let z=!1;const _=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,T.setupEventDelegation(h,`.apexcharts-${L}-area`)),!a){let e=function(t){const e=B.config.stroke.colors;let a;return Array.isArray(e)&&e.length>0&&(a=e[t],a||(a=""),"function"==typeof a)?a({value:B.seriesData.series[t][s],dataPointIndex:s,w:B}):a};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];a=this.barOptions.distributed?B.globals.stroke.colors[s]:i}const Y=B.config.chart.animations,$=Y.animateGradually;let G=0,E=0;if($&&!1!==$.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=$.delay||0,a=Math.min(e,.5*Y.speed/Math.max(1,t));E=H({style:"sequential",index:s,baseDelay:a}),B.config.chart.stacked&&!B.globals.dataChanged&&(E+=i*a*.5);G=E/(e||1)}const V=new w(this).handleBarDataLabels({x:d,y:c,y1:b,y2:g,i:i,j:s,series:p,realIndex:t,columnGroupIndex:r,barHeight:x,barWidth:f,barXPosition:y,barYPosition:v,visibleSeries:I});if(E>0){const t=B.config.dataLabels;if((null==(F=t.animate)?void 0:F.enabled)||(null==(D=t.countUp)?void 0:D.enabled)){const t=String(Math.round(E));null==(A=null==(O=V.dataLabels)?void 0:O.node)||A.setAttribute("data:dlDelay",t),null==(R=null==(M=V.totalDataLabels)?void 0:M.node)||R.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(V.dataLabelsPos.dataLabelsX+Math.max(f,B.globals.barPadForNumericAxis)<0||V.dataLabelsPos.dataLabelsX-Math.max(f,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[s]&&B.config.series[i].data[s].strokeColor&&(a=B.config.series[i].data[s].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(X=this.ctx.morphTypeChange)?void 0:X.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,c=r&&this.ctx.morphTypeChange.claimsTargetMark(t,s);c&&(o=n,G=0);const u=j.renderPaths({i:i,j:s,realIndex:t,pathFrom:o,pathTo:n,stroke:a,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:_,animationDelay:G,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${L}-area${k?` ${k}`:""}`,chartType:L,bindEventsOnPaths:!1});u.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),c&&(u.node.setAttribute("opacity","0"),u.node.setAttribute("data-piece-hidden","1"));const p=B.config.forecastDataPoints;p.count>0&&s>=B.globals.dataPoints-p.count&&(u.node.setAttribute("stroke-dasharray",p.dashArray),u.node.setAttribute("stroke-width",p.strokeWidth),u.node.setAttribute("fill-opacity",p.fillOpacity)),void 0!==b&&void 0!==g&&(u.attr("data-range-y1",b),u.attr("data-range-y2",g));new W(this.w).setSelectionFilter(u,t,s),h.add(u),u.attr({cy:V.dataLabelsPos.bcy,cx:V.dataLabelsPos.bcx,j:s,val:B.seriesData.series[i][s],barHeight:x,barWidth:f,"data:pathKey":m(B,t,s)}),"canvas"===j.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][s]={cx:V.dataLabelsPos.bcx,cy:V.dataLabelsPos.bcy,barWidth:f}),null!==V.dataLabels&&C.add(V.dataLabels),V.totalDataLabels&&C.add(V.totalDataLabels),h.add(C),P&&h.add(P),S&&h.add(S)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:a,zeroW:s,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let c;if(l.axisFlags.isXNumeric)c=(r=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),c=r+e*this.visibleI,c-=e*a}else c=r+e*this.visibleI;const u=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,b=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!b;if(b)c=b.y,e=b.height;else if(this.isFunnel&&!u){const t=null!=s?s:0;s=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=s?s:0),p=b?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:b.topHalf,bottomHalf:b.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:a,w:l}):u?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:a,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(u||g)&&(s=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=c),this.barHelpers.barBackground({j:d,i:h,y1:c-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:s,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",s,null,t.realIndex,d,0),barYPosition:c,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:a,xDivision:s,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,c=t.i,u=t.j,b=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:u,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:a}=this.barHelpers.getZeroValueEncounters({i:c,j:u});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*a}else g=e+i*this.visibleI;a=this.barHelpers.getYForValue(this.series[c][u],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:u,w:l});return l.axisFlags.isXNumeric||(e+=s),this.barHelpers.barBackground({bc:b,j:u,i:c,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:a,goalY:this.barHelpers.getGoalValues("y",null,r,h,u,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:a,j:s}){const i=this.w;let r=a;return i.seriesData.seriesX[a].length||(r=i.globals.maxValsInArrayIndex),I.isNumber(i.seriesData.seriesX[r][s])&&(t=F.dataXToPx(i,i.seriesData.seriesX[r][s])-e*this.seriesLen/2),{barXPosition:t+(L(i)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let a=null;for(let s=0;s<e.globals.previousPaths.length;s++){const i=e.globals.previousPaths[s];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(a=i)}return a}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let a=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),a=t}return this._prevKeyed[t]=a,a}isLengthTransition(t){var e,a;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const s=this.w;let i=!1;if(f(s)&&s.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(a=null==(e=s.seriesData.series[t])?void 0:e.length)?a:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let a=0;a<o;a++)if(!e.has(m(s,t,a))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=v(this.w,t,!0,!0),a=!(!e||!e.join.changed);return this._layoutShiftCache[t]=a,a}getPreviousPath(t,e,a,s){const i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return f(i)?null:a;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const a=l.get(m(i,t,e));a?o=a.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=D.pathCommandCount(o),e=D.pathCommandCount(a);if(t===e)return o;const r=new u(i),n=t=>{const e=D.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(a)>1;if(t<e){const t=r.roundPathCorners(o,0);if(D.pathCommandCount(t)===e){if(l&&s){const t=r.roundPathCorners(s,0);D.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(a,0);if(D.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=D.squareLike(o),a=e?r.roundPathCorners(e,0):null;if(a&&D.pathCommandCount(a)===t)return a}return o}}}return n&&f(i)?null:a}static pathBox(t){if(!t)return null;const e=[],a=/([MLC])([^MLCZz]*)/g;let s;for(;null!==(s=a.exec(t));){const t=s[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=D.pathBox(t);if(!e)return null;const{minX:a,maxX:s,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,a)=>Math.abs(t-e)<=Math.abs(t-a)?[e,a]:[a,e];let h,d,c,u;n?(h=Math.abs(o[0]-a)<=Math.abs(o[0]-s)?a:s,d=h===a?s:a,[c,u]=l(o[1],i,r)):(c=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,u=c===i?r:i,[h,d]=l(o[0],a,s));const b=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${c} L ${h} ${u} L ${d} ${u} L ${d} ${c}${b}`:`M ${h} ${c} L ${d} ${c} L ${d} ${u} L ${h} ${u}${b}`}getPreviousFlip(t,e){const a=this.w,s=this._prevRecord(t);if(!s)return null;const i=this._prevKeyedPaths(t),r=i?i.get(m(a,t,e)):s.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}const O=t=>{const e=function(t){const e=[];let a=t[0],s=t[1],i=e[0]=M(a,s),r=1;for(let o=t.length-1;r<o;r++)a=s,s=t[r+1],e[r]=.5*(i+(i=M(a,s)));return e[r]=i,e}(t),a=t.length-1,s=[];let i,r,o,n;for(let s=0;s<a;s++)o=M(t[s],t[s+1]),Math.abs(o)<1e-6?e[s]=e[s+1]=0:(i=e[s]/o,r=e[s+1]/o,n=i*i+r*r,n>9&&(n=3*o/Math.sqrt(n),e[s]=n*i,e[s+1]=n*r));for(let i=0;i<=a;i++)n=(t[Math.min(a,i+1)][0]-t[Math.max(0,i-1)][0])/(6*(1+e[i]*e[i])),s.push([n||0,e[i]*n||0]);return s},A={points(t){const e=O(t),a=t[1],s=t[0],i=[],r=e[1],o=e[0];i.push(s,[s[0]+o[0],s[1]+o[1],a[0]-r[0],a[1]-r[1],a[0],a[1]]);for(let a=2,s=e.length;a<s;a++){const s=t[a],r=e[a];i.push([s[0]-r[0],s[1]-r[1],s[0],s[1]])}return i},slice(t,e,a){const s=t.slice(e,a);if(e){if(a-e>1&&s[1].length<6){const t=s[0].length;s[1]=[2*s[0][t-2]-s[0][t-4],2*s[0][t-1]-s[0][t-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function M(t,e){return(e[1]-t[1])/(e[0]-t[0])}function R({graphics:t,w:e,elSeries:a,pointsByCat:s,options:i,distributed:r,realIndex:o,wrapClass:n,pointClass:l}){if(!i||!1===i.show||!s.length)return;const h=null!=i.opacity?i.opacity:.9,d=null!=i.strokeColor?i.strokeColor:"#fff",c=null!=i.strokeWidth?i.strokeWidth:1,u=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,b=t.group({class:u?`${n} apexcharts-element-hidden`:n});u&&e.globals.delayedElements.push({el:b.node}),s.forEach(({groups:a,j:s})=>{const n=r?e.globals.colors[s]:e.globals.colors[o],u=i.fillColor,g="series"===u?n:"series-dark"===u?X(n,.45):u||X(n,.45);a.forEach(a=>{const i=t.drawPath({d:a.d,fill:null!=a.fill?a.fill:g,stroke:c>0?d:"none",strokeWidth:c,fillOpacity:h,classes:l});i.attr("data:realIndex",o),i.attr("j",s),i.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),i.node.style.pointerEvents="none",b.add(i)})}),a.add(b)}function X(t,e){const a=I.parseHex(t);if(!a)return t;const s=Math.max(0,1-e);return`rgb(${Math.round(a[0]*s)},${Math.round(a[1]*s)},${Math.round(a[2]*s)})`}function B(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const a=Math.max(0,Math.min(1,e))*(t.length-1),s=Math.floor(a),i=a-s,r=I.parseHex(t[s])||[0,0,0],o=I.parseHex(t[Math.min(s+1,t.length-1)])||r,n=(t,e)=>Math.round(t+(e-t)*i);return`rgb(${n(r[0],o[0])},${n(r[1],o[1])},${n(r[2],o[2])})`}function T(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function j(t,e,a){return`M ${t-a} ${e} a ${a} ${a} 0 1 0 ${2*a} 0 a ${a} ${a} 0 1 0 ${-2*a} 0 `}function z(t,e,a){return`M ${t-a} ${e-a} h ${2*a} v ${2*a} h ${-2*a} z `}function _(t){const e=[];for(let a=0;a<t.length;a+=2)e.push(t[a+1],t[a]);return e}function Y(t){return"right"===t||"bottom"===t?1:"left"===t||"top"===t?-1:0}function $(t,e){let a=e;if("string"==typeof t&&t.trim().endsWith("%")){const e=parseFloat(t);isFinite(e)&&(a=e/100)}else"number"==typeof t&&isFinite(t)&&(a=t);return Math.min(.5,Math.max(0,a))}function G({halfExtent:t,cloudSign:e,rainSign:a,boxFrac:s,rainFrac:i}){const r=s*t,o=0===a?t:i*t,n=0===a?0:a*(t-o);if(0===e)return{cloudBaseOff:0,cloudMaxPx:t,boxCenterOff:0,boxHalfPx:r,rainCenterOff:n,rainHalfPx:o};const l=0===a?0:i,h=2*Math.max(0,1-l-s)*t,d=e*(t-h);return{cloudBaseOff:d,cloudMaxPx:h,boxCenterOff:d-e*r,boxHalfPx:r,rainCenterOff:n,rainHalfPx:o}}d.default.use({violin:class extends D{draw(t,e,a){var s;const i=this.w,r=new u(this.w),o=new S(this.w);this.violinOptions=i.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Y(this.violinOptions.side),this.rainSign=!1===this.pointsOptions.show?0:Y(this.pointsOptions.position),this.boxShown=!0===this.boxOptions.show,this.boxFrac=this.boxShown?$(this.boxOptions.width,.15):0,this.rainFrac=$(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=i.config.plotOptions.bar.distributed,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.coreUtils=new c(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const n=r.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let l,h;const d=[],c=[],u=i.globals.comboCharts?a[e]:e,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(u),g=r.group({class:"apexcharts-series",seriesName:I.escapeString(i.seriesData.seriesNames[u]),rel:e+1,"data:realIndex":u});P.addCollapsedClassToSeries(this.w,g,u),t[e].length>0&&(this.visibleI=this.visibleI+1);let p=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[u][0],p=u);const x=this.barHelpers.initialPositions(u),{y:f,barHeight:m,yDivision:y,zeroW:v,x:C,barWidth:w,xDivision:S,zeroH:L}=x;h=f,l=C,c.push(l+(null!=w?w:0)/2);const k=r.group({class:"apexcharts-datalabels","data:realIndex":u});if(this.seriesMaxWeight=0,"group"===this.normalize){(i.violinData.seriesViolinDensity[u]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const W=[];for(let a=0;a<i.globals.dataPoints;a++){const r=this.barHelpers.getStrokeWidth(e,a,u),n=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:a,realIndex:u,translationsIndex:p},y:h,yDivision:y,barHeight:m,zeroW:v}):this.drawVerticalViolin({indexes:{i:e,j:a,realIndex:u,translationsIndex:p},x:l,xDivision:S,barWidth:w,zeroH:L});l=n.x,h=n.y,a>0&&c.push(n.center),d.push(n.alongRepresentative);const x=this.buildPointsSubPath({realIndex:u,j:a,center:n.center,halfExtent:n.halfExtent,alongFn:n.alongFn,density:n.density,maxWeight:n.maxWeight,cloudBase:n.cloudBase,cloudMaxPx:n.cloudMaxPx,rainCenter:n.rainCenter,rainHalfPx:n.rainHalfPx});x.length&&W.push({groups:x,j:a});const f=o.fillPath({seriesNumber:this.distributed?a:u,dataPointIndex:a,color:this.distributed?i.globals.colors[a]:void 0,value:t[e][a]});this.renderSeries({realIndex:u,pathFill:f,lineFill:i.globals.stroke.colors[u],j:a,i:e,pathFrom:n.pathFrom,pathTo:n.pathTo,strokeWidth:r,elSeries:g,x:l,y:h,series:t,columnGroupIndex:b,barHeight:m,barWidth:w,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin"});const C=g.node.querySelector(`path.apexcharts-violin-area[j='${a}']`);if(C&&isFinite(n.alongRepresentative)&&C.setAttribute(this.isHorizontal?"cx":"cy",`${n.alongRepresentative}`),n.boxPaths){const r=null!=(s=this.boxOptions.strokeWidth)?s:1;n.boxPaths.forEach(s=>{this.renderSeries({realIndex:u,pathFill:s.filled?this.boxOptions.fillColor||f:"none",lineFill:i.globals.stroke.colors[u],j:a,i:e,pathFrom:s.pathFrom,pathTo:s.pathTo,strokeWidth:r,elSeries:g,x:l,y:h,series:t,columnGroupIndex:b,barHeight:m,barWidth:w,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin",classes:"apexcharts-raincloud-box"})})}}R({graphics:r,w:i,elSeries:g,pointsByCat:W,options:this.pointsOptions,distributed:this.distributed,realIndex:u,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),i.globals.seriesXvalues[u]=c,i.globals.seriesYvalues[u]=d,n.add(g)}return n}drawVerticalViolin({indexes:t,x:e,xDivision:a,barWidth:s,zeroH:i}){var r,o,n,l,h,d,c;const u=this.w,{realIndex:b,j:g,translationsIndex:p}=t,x=this.yRatio[p];u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[b][g]-u.globals.minX)/this.xRatio-s/2);const f=e+s*this.visibleI+s/2,m=s/2,y=this.getDensity(b,g),v=this.effectiveMaxWeight(y),C=t=>i-this.logVal(t,b)/x,w=G({halfExtent:m,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(n=this.boxFrac)?n:0,rainFrac:null!=(l=this.rainFrac)?l:0}),P=f+w.cloudBaseOff,S=this.buildBodyPath({nodes:y.nodes,center:P,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:C,collapsed:!1,sideSign:this.cloudSign});let I=null;const L=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(b,g);return L?I=L:u.globals.previousPaths.length>0&&(I=this.getPreviousPath(b,g,S)),null==I&&(I=this.buildBodyPath({nodes:y.nodes,center:P,halfExtent:w.cloudMaxPx,maxWeight:v,vertical:!0,alongFn:C,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=a),{pathTo:S,pathFrom:I,x:e,y:i,center:f,halfExtent:m,alongFn:C,density:y,maxWeight:v,cloudBase:P,cloudMaxPx:w.cloudMaxPx,rainCenter:f+w.rainCenterOff,rainHalfPx:w.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:b,j:g,boxCenter:f+w.boxCenterOff,boxHalfPx:w.boxHalfPx,alongFn:C,vertical:!0}),alongRepresentative:C(null!=(c=this.series[t.i][g])?c:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:a,barHeight:s,zeroW:i}){var r,o,n,l,h,d,c;const u=this.w,{realIndex:b,j:g}=t,p=this.invertedYRatio;u.axisFlags.isXNumeric&&(e=(u.seriesData.seriesX[b][g]-u.globals.minX)/this.invertedXRatio-s/2);const x=e+s*this.visibleI+s/2,f=s/2,m=this.getDensity(b,g),y=this.effectiveMaxWeight(m),v=t=>i+this.logVal(t,b)/p,C=G({halfExtent:f,cloudSign:null!=(r=this.cloudSign)?r:0,rainSign:null!=(o=this.rainSign)?o:0,boxFrac:null!=(n=this.boxFrac)?n:0,rainFrac:null!=(l=this.rainFrac)?l:0}),w=x+C.cloudBaseOff,P=this.buildBodyPath({nodes:m.nodes,center:w,halfExtent:C.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:v,collapsed:!1,sideSign:this.cloudSign});let S=null;const I=null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.getInitialPathFor(b,g);return I?S=I:u.globals.previousPaths.length>0&&(S=this.getPreviousPath(b,g,P)),null==S&&(S=this.buildBodyPath({nodes:m.nodes,center:w,halfExtent:C.cloudMaxPx,maxWeight:y,vertical:!1,alongFn:v,collapsed:!0,sideSign:this.cloudSign})),u.axisFlags.isXNumeric||(e+=a),{pathTo:P,pathFrom:S,x:i,y:e,center:x,halfExtent:f,alongFn:v,maxWeight:y,density:m,cloudBase:w,cloudMaxPx:C.cloudMaxPx,rainCenter:x+C.rainCenterOff,rainHalfPx:C.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:b,j:g,boxCenter:x+C.boxCenterOff,boxHalfPx:C.boxHalfPx,alongFn:v,vertical:!1}),alongRepresentative:v(null!=(c=this.series[t.i][g])?c:0)}}getDensity(t,e){var a;const s=null==(a=this.w.violinData.seriesViolinDensity[t])?void 0:a[e];if(!s||!s.values.length)return{nodes:[],maxWeight:0};const i=s.values.map((t,e)=>e);i.sort((t,e)=>s.values[t]-s.values[e]);const r=[];let o=null;for(const t of i){const e=s.values[t];null!==o&&e===o||(r.push({v:e,w:s.weights[t]}),o=e)}return{nodes:r,maxWeight:s.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:a,maxWeight:s,vertical:i,alongFn:r,collapsed:o,sideSign:n=0}){const l=new u(this.w);if(0===t.length){const t=r(0);return i?l.move(e,t)+l.line(e,t):l.move(t,e)+l.line(t,e)}const h=t=>{if(o||s<=0)return 0;const e=t/s*a*this.bandwidthScale;return Math.min(a,Math.max(0,e))},d=[],c=[];for(let a=0;a<t.length;a++){const s=r(t[a].v),o=h(t[a].w),l=0===n?e+o:e+n*o,u=0===n?e-o:e;i?(d.push([l,s]),c.push([u,s])):(d.push([s,l]),c.push([s,u]))}return c.reverse(),this.smoothSegment(d,i,!1)+this.smoothSegment(c,i,!0)+"z"}buildBoxSubPaths({realIndex:t,j:e,boxCenter:a,boxHalfPx:s,alongFn:i,vertical:r}){var o,n;const l=this.w;if(!this.boxShown||s<=0)return null;const h=null==(o=l.violinData.seriesViolinSummary[t])?void 0:o[e];if(!h)return null;const d=s*Math.min(1,Math.max(0,null!=(n=this.boxOptions.capWidth)?n:.5)),[c,b,g,p,x]=h.map(t=>i(t)),f=(t,e)=>{const s=new u(this.w),i=(t,e)=>r?[t,e]:[e,t],o=t=>t.map(([t,e],a)=>0===a?s.move(t,e):s.line(t,e)).join(""),n=a;return{whiskers:o([i(n,c),i(n,b)])+o([i(n,p),i(n,x)])+o([i(n-t,c),i(n+t,c)])+o([i(n-t,x),i(n+t,x)]),box:o([i(n-e,b),i(n+e,b),i(n+e,p),i(n-e,p)])+"z"+o([i(n-e,g),i(n+e,g)])}},m=f(d,s),y=f(0,0),v=(a,s)=>{let i=null;return l.globals.previousPaths.length>0&&(i=this.getPreviousPath(t,e,a)),null==i?s:i};return[{pathTo:m.whiskers,pathFrom:v(m.whiskers,y.whiskers),filled:!1},{pathTo:m.box,pathFrom:v(m.box,y.box),filled:!0}]}smoothSegment(t,e,a){const s=new u(this.w),i=t[0];let r=a?s.line(i[0],i[1]):s.move(i[0],i[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=s.line(t[e][0],t[e][1]);return r}const o=t.map(([t,a])=>e?[a,t]:[t,a]),n=A.points(o);return r+=(t=>{let e="";for(let a=0;a<t.length;a++){const s=t[a],i=s.length;i>4?(e+=`C${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`,e+=`, ${s[4]}, ${s[5]}`):i>2&&(e+=`S${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`)}return e})(e?n.map(_):n),r}strictlyMonotonic(t,e){const a=e?1:0;for(let e=1;e<t.length;e++)if(t[e][a]===t[e-1][a])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:a,halfExtent:s,alongFn:i,density:r,maxWeight:o,cloudBase:n,cloudMaxPx:l,rainCenter:h,rainHalfPx:d}){var c;const u=0!==this.rainSign,b=u?h:0!==this.cloudSign?n:a,g=u?d:0!==this.cloudSign?l:s;return function({w:t,points:e,seedA:a,seedB:s,center:i,halfExtent:r,alongFn:o,isHorizontal:n,options:l,clampAt:h,sideSign:d}){const c=l;if(!c||!1===c.show)return[];if(!e||!e.length)return[];const u=c.maxPoints||3e3,b=e.length>u?Math.ceil(e.length/u):1,g=null!=c.size?c.size:2.5,p=r*(null!=c.jitter?c.jitter:.5),x=!1!==c.constrainToViolin&&"function"==typeof h,f="square"===c.shape,m=c.colorScale,y=m&&Array.isArray(m.colors)&&m.colors.length>0,v=y?Math.max(2,m.steps||24):1,C=y&&null!=m.min?m.min:t.globals.minY,w=(y&&null!=m.max?m.max:t.globals.maxY)-C||1,P=y?new Array(v).fill(""):[""];for(let t=0;t<e.length;t+=b){const r=e[t],l=o(r);let c=2*(T(7919*a+100003*s+t)-.5)*p;if(x){const t=h(r);c>t&&(c=t),c<-t&&(c=-t)}d&&(c=Math.abs(c)*d);const u=n?l:i+c,b=n?i+c:l,m=f?z(u,b,g):j(u,b,g);if(y){let t=(r-C)/w;t<0&&(t=0),t>1&&(t=1),P[Math.round(t*(v-1))]+=m}else P[0]+=m}if(!y)return P[0]?[{fill:null,d:P[0]}]:[];const S=[];for(let t=0;t<v;t++)P[t]&&S.push({fill:B(m.colors,t/(v-1)),d:P[t]});return S}({w:this.w,points:null==(c=this.w.violinData.seriesViolinPoints[t])?void 0:c[e],seedA:t,seedB:e,center:b,halfExtent:g,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:u?null:t=>this.halfWidthAtValue(t,r,g,o),sideSign:u?0:this.cloudSign})}halfWidthAtValue(t,e,a,s){const{nodes:i}=e,r=null!=s?s:e.maxWeight;if(!i.length||r<=0)return 0;const o=t=>Math.min(a,t/r*a*this.bandwidthScale);if(t<=i[0].v)return o(i[0].w);if(t>=i[i.length-1].v)return o(i[i.length-1].w);for(let e=1;e<i.length;e++)if(t<=i[e].v){const a=i[e-1],s=i[e],r=s.v===a.v?0:(t-a.v)/(s.v-a.v);return o(a.w+(s.w-a.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
package/dist/violin.esm.js
CHANGED
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* ApexCharts v7.
|
|
21
|
+
* ApexCharts v7.4.0
|
|
22
22
|
* (c) 2018-2026 ApexCharts
|
|
23
23
|
*/
|
|
24
24
|
import * as _core from "apexcharts/core";
|
|
@@ -1312,6 +1312,14 @@ class Helpers {
|
|
|
1312
1312
|
* second at the top, and nothing else touched. Stacked totals already resolve
|
|
1313
1313
|
* per group (see drawsStackedTotal, #4173); corners never got the same fix.
|
|
1314
1314
|
*
|
|
1315
|
+
* plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
|
|
1316
|
+
* caps both the baseline and the far end, 'last' only the far end (#4845).
|
|
1317
|
+
*
|
|
1318
|
+
* A single-data-point chart used to hand its baseline segment 'top' (and a
|
|
1319
|
+
* solo segment 'top' instead of 'both'), which on a horizontal stack rounded
|
|
1320
|
+
* the first segment on its INNER edge and left a pill in the middle of the
|
|
1321
|
+
* bar (#4845). One data point is resolved like any other now.
|
|
1322
|
+
*
|
|
1315
1323
|
* @param {any[]} series
|
|
1316
1324
|
* @returns {string[][]}
|
|
1317
1325
|
*/
|
|
@@ -1326,9 +1334,11 @@ class Helpers {
|
|
|
1326
1334
|
() => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
|
|
1327
1335
|
);
|
|
1328
1336
|
if (alwaysApplyRadius) return output;
|
|
1329
|
-
const
|
|
1330
|
-
const
|
|
1331
|
-
const
|
|
1337
|
+
const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
|
|
1338
|
+
const soloPositive = lastOnly ? "top" : "both";
|
|
1339
|
+
const soloNegative = lastOnly ? "bottom" : "both";
|
|
1340
|
+
const positiveBase = lastOnly ? "none" : "bottom";
|
|
1341
|
+
const negativeBase = lastOnly ? "none" : "top";
|
|
1332
1342
|
for (const stack of this.getStackedSeriesIndices(numSeries)) {
|
|
1333
1343
|
for (let j = 0; j < numColumns; j++) {
|
|
1334
1344
|
const positiveIndices = [];
|
|
@@ -1340,22 +1350,22 @@ class Helpers {
|
|
|
1340
1350
|
}
|
|
1341
1351
|
if (positiveIndices.length > 0 && negativeIndices.length === 0) {
|
|
1342
1352
|
if (positiveIndices.length === 1) {
|
|
1343
|
-
output[positiveIndices[0]][j] =
|
|
1353
|
+
output[positiveIndices[0]][j] = soloPositive;
|
|
1344
1354
|
} else {
|
|
1345
1355
|
const first = positiveIndices[0];
|
|
1346
1356
|
const last = positiveIndices[positiveIndices.length - 1];
|
|
1347
1357
|
for (const i of positiveIndices) {
|
|
1348
|
-
output[i][j] = i === first ?
|
|
1358
|
+
output[i][j] = i === first ? positiveBase : i === last ? "top" : "none";
|
|
1349
1359
|
}
|
|
1350
1360
|
}
|
|
1351
1361
|
} else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
|
|
1352
1362
|
if (negativeIndices.length === 1) {
|
|
1353
|
-
output[negativeIndices[0]][j] =
|
|
1363
|
+
output[negativeIndices[0]][j] = soloNegative;
|
|
1354
1364
|
} else {
|
|
1355
|
-
const
|
|
1356
|
-
const
|
|
1365
|
+
const nearest = Math.min(...negativeIndices);
|
|
1366
|
+
const farthest = Math.max(...negativeIndices);
|
|
1357
1367
|
for (const i of negativeIndices) {
|
|
1358
|
-
output[i][j] = i ===
|
|
1368
|
+
output[i][j] = i === nearest ? negativeBase : i === farthest ? "bottom" : "none";
|
|
1359
1369
|
}
|
|
1360
1370
|
}
|
|
1361
1371
|
} else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
|