vue-data-ui 3.28.1 → 3.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PackageVersion-C4ZM3Vf7.js → PackageVersion-BIhjLNBU.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-DwcKiXuI.js +1 -0
- package/dist/{render-common-CJz0wn0I.js → render-common-B-s2XJ_I.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/style.css.d.ts +2 -0
- package/dist/style.d.css.ts +2 -0
- package/dist/vue-data-ui-BvHCscNE.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CW8ahywt.js → vue-ui-3d-bar-CkHFiFp4.js} +1 -1
- package/dist/{vue-ui-age-pyramid-CxMwKICA.js → vue-ui-age-pyramid-vpIjdLg5.js} +1 -1
- package/dist/{vue-ui-bullet-ClnewIWQ.js → vue-ui-bullet-rgxGRR1p.js} +1 -1
- package/dist/{vue-ui-bump-C6FuNDUg.js → vue-ui-bump-CeDsunDi.js} +1 -1
- package/dist/{vue-ui-candlestick-CyewIjJk.js → vue-ui-candlestick-KJHOS5F7.js} +1 -1
- package/dist/{vue-ui-carousel-table-D0dD4kai.js → vue-ui-carousel-table-CeI5SIxH.js} +1 -1
- package/dist/{vue-ui-chestnut-nS1vjCqH.js → vue-ui-chestnut-CiY-2e77.js} +1 -1
- package/dist/{vue-ui-chord-B963Q_26.js → vue-ui-chord-8rk7304-.js} +1 -1
- package/dist/{vue-ui-circle-pack-DEY9X3jA.js → vue-ui-circle-pack-BsH09EPG.js} +1 -1
- package/dist/{vue-ui-cursor-CNv12HQG.js → vue-ui-cursor-Cpov2m58.js} +1 -1
- package/dist/{vue-ui-dag-s3-TMmid.js → vue-ui-dag-BHFL2cUA.js} +1 -1
- package/dist/{vue-ui-dashboard-B5zrGAvS.js → vue-ui-dashboard-BxXdhdNJ.js} +1 -1
- package/dist/{vue-ui-digits-DXQwmTUx.js → vue-ui-digits-xHOLjA2_.js} +1 -1
- package/dist/{vue-ui-donut-DHfOfLBF.js → vue-ui-donut-CR3klUbX.js} +1 -1
- package/dist/{vue-ui-donut-CDryub1L.js → vue-ui-donut-Vbp5Xs2-.js} +1 -1
- package/dist/{vue-ui-donut-evolution-C5pHSrza.js → vue-ui-donut-evolution-BTmztL3Y.js} +1 -1
- package/dist/{vue-ui-dumbbell-CQbGR7yM.js → vue-ui-dumbbell-CDcgKS2A.js} +1 -1
- package/dist/{vue-ui-flow-B16Mj6MW.js → vue-ui-flow-kVocPE27.js} +1 -1
- package/dist/{vue-ui-funnel-Dh-xi_Qi.js → vue-ui-funnel-CZAdPYqK.js} +1 -1
- package/dist/{vue-ui-galaxy-U_ZIP5vm.js → vue-ui-galaxy-hP-9mVlB.js} +1 -1
- package/dist/{vue-ui-gauge-Dr4zsf6D.js → vue-ui-gauge-BRabsLkh.js} +1 -1
- package/dist/{vue-ui-geo-DFebja0s.js → vue-ui-geo-Dacnp6iw.js} +1 -1
- package/dist/{vue-ui-gizmo-CssVcz-O.js → vue-ui-gizmo-Dp3hpHIX.js} +1 -1
- package/dist/{vue-ui-graph-BB_97Qz7.js → vue-ui-graph-DHU9hUry.js} +1 -1
- package/dist/{vue-ui-heatmap-DEBbVnrg.js → vue-ui-heatmap-kPnmZgWi.js} +1 -1
- package/dist/{vue-ui-hill-C1sHz3TI.js → vue-ui-hill-Ddbup7-b.js} +1 -1
- package/dist/{vue-ui-history-plot-CsBTJXR3.js → vue-ui-history-plot-CwO2o-2s.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-D0kfcpEW.js → vue-ui-horizontal-bar-CvX77vE4.js} +1 -1
- package/dist/{vue-ui-kpi-CltKSYUI.js → vue-ui-kpi-CCOOwX_Q.js} +1 -1
- package/dist/{vue-ui-molecule-DtoyWWTf.js → vue-ui-molecule-BPGs9Dom.js} +1 -1
- package/dist/{vue-ui-mood-radar-ClOxfeH8.js → vue-ui-mood-radar-GJ-lhgI0.js} +1 -1
- package/dist/{vue-ui-nested-donuts-CULAXTg1.js → vue-ui-nested-donuts-CrlPwpg8.js} +1 -1
- package/dist/{vue-ui-onion-D7zu861i.js → vue-ui-onion-CKmyy-Y_.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cjbc-WUG.js → vue-ui-parallel-coordinate-plot-C0UqWt0M.js} +1 -1
- package/dist/{vue-ui-quadrant-DWAb_t6r.js → vue-ui-quadrant-CTGFBNo9.js} +1 -1
- package/dist/{vue-ui-quick-chart-oDZwgVo8.js → vue-ui-quick-chart-ZBOPZhxA.js} +1 -1
- package/dist/{vue-ui-radar-BWG_N0xO.js → vue-ui-radar-B1z3Ux3E.js} +1 -1
- package/dist/{vue-ui-relation-circle-BCRiS2n6.js → vue-ui-relation-circle-DqN5N08e.js} +1 -1
- package/dist/{vue-ui-ridgeline-VYcGUP_p.js → vue-ui-ridgeline-DcSB5Qef.js} +1 -1
- package/dist/{vue-ui-rings-Dl0AjrRj.js → vue-ui-rings-CJqAnf-l.js} +1 -1
- package/dist/{vue-ui-scatter-DTa48HvG.js → vue-ui-scatter-THQAeoWs.js} +1 -1
- package/dist/{vue-ui-skeleton-C5mGG8hR.js → vue-ui-skeleton-DqmhigQ0.js} +1 -1
- package/dist/{vue-ui-spark-trend--frxeJ8f.js → vue-ui-spark-trend-B2Nf1raK.js} +1 -1
- package/dist/{vue-ui-sparkbar-BS5v3HMo.js → vue-ui-sparkbar-CamZ_49V.js} +1 -1
- package/dist/{vue-ui-sparkgauge-B1TGfXvR.js → vue-ui-sparkgauge-Ffrp_7VV.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-Cs97AL6h.js → vue-ui-sparkhistogram-CLfzi3PO.js} +1 -1
- package/dist/{vue-ui-sparkline-Bp9J6x7z.js → vue-ui-sparkline-Y-sljnbS.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-BVuuRD10.js → vue-ui-sparkstackbar-CYZ-ADO1.js} +1 -1
- package/dist/{vue-ui-stackbar-CRuXn3XI.js → vue-ui-stackbar-CQLYm10x.js} +1 -1
- package/dist/{vue-ui-stackline-Besmr9vq.js → vue-ui-stackline-VpvF7MRx.js} +1 -1
- package/dist/{vue-ui-strip-plot-D-aRJkR7.js → vue-ui-strip-plot-B9Ogpw7K.js} +1 -1
- package/dist/{vue-ui-table-D_UdQwV3.js → vue-ui-table-Bi9C3LzP.js} +1 -1
- package/dist/{vue-ui-table-sparkline-BdNo8fW_.js → vue-ui-table-sparkline-DEVAL0cR.js} +1 -1
- package/dist/{vue-ui-thermometer-TFg1SGY7.js → vue-ui-thermometer-ClN4EO0I.js} +1 -1
- package/dist/{vue-ui-timer-BdPksC26.js → vue-ui-timer-nqZxt1vU.js} +1 -1
- package/dist/{vue-ui-tiremarks-HWuO-eyj.js → vue-ui-tiremarks-BeJBsgXo.js} +1 -1
- package/dist/{vue-ui-treemap-IegiAqaX.js → vue-ui-treemap-FA-yXwmv.js} +1 -1
- package/dist/{vue-ui-waffle-BEyGfPks.js → vue-ui-waffle-CO07S6HV.js} +1 -1
- package/dist/{vue-ui-wheel-k8GNPGET.js → vue-ui-wheel-BeaSWB4x.js} +1 -1
- package/dist/{vue-ui-word-cloud-D9_15Ve7.js → vue-ui-word-cloud-C1OWGFng.js} +1 -1
- package/dist/{vue-ui-world-rCp5Vb7u.js → vue-ui-world-CUS_mKgl.js} +1 -1
- package/dist/{vue-ui-xy-CFgFg11v.js → vue-ui-xy-6B_K-quN.js} +1 -1
- package/dist/{vue-ui-xy-42AXepcQ.js → vue-ui-xy-BigPHE0Q.js} +1 -1
- package/package.json +6 -2
- package/dist/package-DGRUegc-.js +0 -1
- package/dist/vue-data-ui-CxiWUtNw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Ht as i,It as a,Jt as o,S as ee,X as te,Yt as ne,at as re,f as s,h as ie,i as c,in as ae,nt as oe,p as se,r as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-BH9r_0Vd.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{t as be}from"./useChartExport-BZts4KFb.js";import{t as xe}from"./tableIntegration-CNoJ1CIY.js";import{n as Se,t as Ce}from"./annotationSlots-BRR85CqJ.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-sVoTzet1.js";import{t as De}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./useTableResponsive-uSz_qZOB.js";import{t as Me}from"./vue_ui_chestnut-BxxivKN7.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as Fe,guardReactiveProps as Ie,mergeProps as Le,nextTick as Re,normalizeClass as g,normalizeProps as ze,normalizeStyle as _,onMounted as Be,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ve,toDisplayString as S,toRefs as He,unref as C,useCssVars as Ue,watch as We,withCtx as Ge,withKeys as Ke}from"vue";var qe=/* @__PURE__ */ e({default:()=>zn}),Je=[`id`],Ye=[`id`],Xe={"aria-live":`polite`,class:`sr-only`},Ze={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Qe={style:{position:`relative`}},$e=[`xmlns`,`aria-describedby`,`viewBox`],et=[`width`,`height`],tt={key:1},nt=[`fill`,`font-weight`,`font-size`,`x`,`y`],rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it={key:2},at=[`x`,`y`,`font-size`,`font-weight`,`fill`],ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`d`,`stroke`,`fill`],ct=[`cx`,`cy`,`r`,`fill`],lt=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],ut={key:3},dt=[`x`,`y`,`font-size`,`fill`,`onClick`],ft={key:0},pt=[`x`,`y`,`fill`,`font-size`,`font-weight`],mt=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],ht=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],gt={key:4},_t=[`x`,`y`,`fill`,`font-size`,`onClick`],vt=[`d`,`stroke`],yt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],bt={key:5},xt=[`x`,`y`,`font-size`,`font-weight`,`fill`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`y`,`height`,`width`],wt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Tt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Et={viewBox:`0 0 20 20`,height:`16`,width:`16`},Dt=[`fill`],Ot={key:7},kt=[`y`,`height`,`width`],At={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},jt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Mt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Nt=[`fill`],Pt=[`cx`,`cy`,`fill`],Ft=[`d`,`stroke`],It=[`cx`,`cy`,`fill`],Lt=[`d`,`stroke`],Rt=[`cx`,`cy`,`fill`],zt=[`cx`,`cy`,`fill`],Bt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt={key:4,class:`vue-data-ui-watermark`},Zt={key:5,ref:`source`,dir:`auto`},Qt={class:`vue-ui-data-table`},$t={key:0},en=[`data-cell`],tn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},nn={key:0},rn={key:1},an=[`data-cell`],on={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},sn={key:0},cn={key:1},ln=[`data-cell`],un={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},dn={key:0},fn={key:1},pn=[`data-cell`],mn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},hn={key:0},gn={key:1},_n=[`data-cell`],vn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},yn={key:0},bn={key:1},xn=[`data-cell`],Sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Cn={key:0},wn={key:1},Tn=[`data-cell`],En={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Dn={key:0},On={key:1},kn=[`data-cell`],An={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},jn=[`data-cell`],Mn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Nn=[`data-cell`],Pn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Fn=[`data-cell`],In={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ln=[`data-cell`],Rn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},zn=/*#__PURE__*/ _e({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:_e,emit:qe}){Ue(e=>({ba98aae8:e.tdo}));let zn=Fe(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Bn=Fe(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Vn=Fe(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Hn=Fe(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Un=Fe(()=>import(`./PackageVersion-C4ZM3Vf7.js`).then(e=>e.t)),Wn=Fe(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_chestnut:Gn}=t(),w=e,Kn=u(()=>!!w.dataset&&w.dataset.length),T=y(te()),qn=y(null),Jn=y(0),Yn=y(null),Xn=y(null),Zn=y(!1),E=y(!1),D=y(``),O=y({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),k=y(ar()),A=u(()=>k.value.style.chart.layout.roots),j=u(()=>k.value.style.chart.layout.branches),M=u(()=>k.value.style.chart.layout.nuts),N=u(()=>k.value.style.chart.layout),P=u(()=>k.value.style.chart);he({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiChestnut`,rules:[ge.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let F=u(()=>k.value.userOptions.useCursorPointer),Qn=u(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:$n,FINAL_DATASET:er}=pe({...He(w),FINAL_CONFIG:k,prepareConfig:ar,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:ae({defaultConfig:k.value,userConfig:Qn.value})}),{userOptionsVisible:tr,setUserOptionsVisibility:nr,keepUserOptionState:rr}=ke({config:k.value}),{svgRef:ir}=Ae({config:N.value.title});function ar(){return ve(w.config,Gn,Me)}We(()=>w.config,e=>{k.value=ar(),tr.value=!k.value.userOptions.showOnChartHover,fr.value.showTable=k.value.table.show,Nr()},{deep:!0});let{isPrinting:or,isImaging:sr,generatePdf:cr,generateImage:lr}=Ee({elementId:`vue-ui-chestnut_${T.value}`,fileName:N.value.title.text||`vue-ui-chestnut`,options:k.value.userOptions.print}),ur=u(()=>k.value.userOptions.show),dr=u(()=>ue(k.value.customPalette)),fr=y({showTable:k.value.table.show});We(k,()=>{fr.value={showTable:k.value.table.show}},{immediate:!0});let pr=y(null),mr=u(()=>k.value.table.responsiveBreakpoint),I=y({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),L=u(()=>({left:I.value.padding.left,top:I.value.padding.top,right:I.value.width-I.value.padding.right,bottom:I.value.height-I.value.padding.bottom,width:I.value.width-(I.value.padding.left+I.value.padding.right),height:I.value.height-(I.value.padding.top+I.value.padding.bottom),seedX:I.value.padding.left+64})),R=u(()=>er.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),hr=u(()=>k.value.debug),z=u(()=>(hr.value&&er.value.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{de({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{de({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),er.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:ee(e.color)||dr.value[t]||i[t]||i[t%i.length],id:e.id||`root_${t}_${T.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,a)=>({...r,rootName:e.name,rootIndex:t,color:ee(e.color)||dr.value[t]||i[t]||i[t%i.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${a}_${T.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((o,te)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/R.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/R.value,branchToRoot:r.value/n,nutName:o.name,nutValue:o.value,nutToTotal:o.value/R.value,nutToRoot:o.value/n,nutToBranch:o.value/r.value},...o,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:o.value/r.value,proportionToRoot:o.value/n,proportionToTree:o.value/R.value,rootIndex:t,id:o.id||`nut_${t}_${a}_${te}_${T.value}`,color:ee(o.color)||dr.value[te]||i[te]||i[te%i.length],value:o.value>=0?o.value:0}))}))}})));function gr(){return z.value}let _r=qe,vr=u(()=>z.value.flatMap(e=>e.branches).length),yr=u(()=>Math.max(...z.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),br=u(()=>Math.max(...z.value.flatMap(e=>e.branches.map(e=>e.value)))),xr=u(()=>256+I.value.padding.left),B=u(()=>z.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=L.value.height/z.value.length/2,r=e.total/yr.value*(n>64?64:n);return{...e,x:L.value.seedX,y:L.value.top+L.value.height/z.value.length*(t+1)-(L.value.height/z.value.length/2+I.value.gap/2),r:r<I.value.branchSize/2?I.value.branchSize/2:r}})),Sr=u(()=>j.value.widthRatio<=0?.1:j.value.widthRatio>1.8?1.8:j.value.widthRatio),Cr=u(()=>B.value.flatMap(e=>e.branches)),V=u(()=>Cr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*I.value.branchSize+L.value.top+t*I.value.gap,y2:t*I.value.branchSize+I.value.branchSize,x1:xr.value,x2:384*e.value/br.value*Sr.value+xr.value}))),wr=u(()=>B.value),Tr=u(()=>wr.value.map(e=>V.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Er=u(()=>wr.value.map((e,t)=>Tr.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Dr(e){let t=B.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let H=y(null),U=y(null),W=y(null),G=y(null);function K(){H.value=null,W.value=null,G.value=null}function q(e){if(H.value)return e.type===`root`?e.rootIndex===H.value.rootIndex:e.type===`branch`?e.id===H.value.id:e.type===`nut`&&e.branchName===H.value.name&&e.rootIndex===H.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(ci.value&&E.value){if(O.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(O.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?oi.value&&e.id===oi.value.id:(e.type,!1);if(O.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?si.value&&e.id===si.value.id:e.type===`nut`&&si.value&&e.branchName===si.value.name&&e.rootIndex===si.value.rootIndex}return!0}function Or(e){K();let t=wr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Tr.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`nut`,O.value.nutIndex=0,Re(()=>{H.value=e,W.value=e,U.value=a({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,80,80),_r(`selectNut`,e.breakdown),Q()})}function J(){H.value=null,U.value=null,_r(`selectNut`,null)}function kr(e){let t=wr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Tr.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`branch`,O.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),_r(`selectBranch`,null),Q()):(K(),W.value=e,_r(`selectBranch`,e),Q())}function Ar(e){let t=wr.value.findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),O.value.level=`root`,O.value.branchIndex=0,O.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),_r(`selectRoot`,null),Q()):(K(),G.value=e,_r(`selectRoot`,e),Q())}function jr(){return L.value.bottom-(H.value.y1+180)<0?0:L.value.bottom}function Mr(e){return e.proportion*100>M.value.selected.labels.dataLabels.hideUnderValue}Be(()=>{Nr()});function Nr(){fe(w.dataset)&&re({componentName:`VueUiChestnut`,type:`dataset`,debug:hr.value});let e=vr.value*(I.value.branchSize+I.value.gap)+I.value.padding.top+I.value.padding.bottom;I.value.height=e}let Y=u(()=>({head:[k.value.table.th.translations.rootName,k.value.table.th.translations.rootValue,k.value.table.th.translations.rootToTotal,k.value.table.th.translations.branchName,k.value.table.th.translations.branchValue,k.value.table.th.translations.branchToRoot,k.value.table.th.translations.branchToTotal,k.value.table.th.translations.nutName,k.value.table.th.translations.nutValue,k.value.table.th.translations.nutToBranch,k.value.table.th.translations.nutToRoot,k.value.table.th.translations.nutToTotal],body:z.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Pr(e=null){Re(()=>{let t=[[N.value.title.text],[N.value.title.subtitle.text],[``],[`Grand total`,R.value],[``]],n=Y.value.head,i=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),a=t.concat([n]).concat(i),o=r(a);e?e(o):oe({csvContent:o,title:N.value.title.text||`vue-ui-chestnut`})})}let Fr=y(!1);function Ir(e){Fr.value=e,Jn.value+=1}function Lr(){fr.value.showTable=!fr.value.showTable}let Rr=y(!1);function zr(){Rr.value=!Rr.value}async function Br({scale:e=2}={}){if(!qn.value)return;let{width:t,height:n}=qn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ye({domElement:qn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title.text,width:t,height:n,aspectRatio:r}}function Vr(e){let t=Dr(e),n=e.x1,r=e.y1,i=I.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Hr=u(()=>xe({config:k,style:P,mutableConfig:fr,dialog:Wn,accordion:Bn,isFullscreen:Fr,parent:qn,maxWidth:800,titleStyle:N,isCursorPointer:F}));We(()=>fr.value.showTable,async e=>{k.value.table.show||(e&&k.value.table.useDialog&&Yn.value?(await Re(),Yn.value.open()):`close`in Yn.value&&Yn.value.close())});let{isResponsive:Ur}=je(pr,mr);function Wr(){fr.value.showTable=!1,Xn.value&&Xn.value.setTableIconState(!1)}let Gr=u(()=>z.value.map((e,t)=>({...e,display:`${e.name}: ${c(A.value.labels.formatter,e.total,n({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),{datapoint:e})} (${n({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage})})`}))),Kr=u(()=>Gr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),qr=u(()=>P.value.backgroundColor),Jr=u(()=>({...N.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Yr=u(()=>N.value.title),{isCallbackImaging:Xr,isCallbackSvg:Zr,generateSvg:Qr,onGenerateImage:$r}=be({svg:ir,title:Yr,legend:Jr,legendItems:Kr,backgroundColor:qr,titleEmbedded:!0,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:lr});async function ei(){_r(`copyAlt`,{config:k.value,dataset:z.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ti(e){if(!e)return``;let t=n({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),r=n({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${r} of total.`}function ni(e){if(!e)return``;let t=n({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),r=n({v:e.proportionToRoot*100,s:`%`,r:N.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${r} of root ${e.rootName}.`}function ri(e){if(!e)return``;let t=n({p:N.value.legend.prefix,v:e.value,s:N.value.legend.suffix,r:M.value.selected.labels.roundingValue}),r=n({v:e.proportionToBranch*100,s:`%`,r:M.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${r} of branch ${e.branchName}.`}let ii=u(()=>wr.value[O.value.rootIndex]||null),X=u(()=>(Tr.value[O.value.rootIndex]||[])[O.value.branchIndex]||null),ai=u(()=>((Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[])[O.value.nutIndex]||null),Z=u(()=>ii.value),oi=u(()=>X.value),si=u(()=>O.value.level===`nut`?X.value:null),ci=u(()=>Zn.value);function Q(){O.value.level===`root`?D.value=ti(ii.value):O.value.level===`branch`?D.value=ni(X.value):O.value.level===`nut`&&(D.value=ri(ai.value))}function $(){O.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},D.value=``}function li(){let e=Tr.value[O.value.rootIndex]||[];e.length?(O.value.branchIndex>=e.length&&(O.value.branchIndex=0),O.value.branchIndex<0&&(O.value.branchIndex=e.length-1)):O.value.branchIndex=0}function ui(){let e=(Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[];e.length?(O.value.nutIndex>=e.length&&(O.value.nutIndex=0),O.value.nutIndex<0&&(O.value.nutIndex=e.length-1)):O.value.nutIndex=0}function di(e){if(O.value.level===`root`){let t=wr.value.length;if(!t)return;O.value.rootIndex+=e,O.value.rootIndex>=t&&(O.value.rootIndex=0),O.value.rootIndex<0&&(O.value.rootIndex=t-1),O.value.branchIndex=0,O.value.nutIndex=0,Q()}else O.value.level===`branch`?(O.value.branchIndex+=e,li(),O.value.nutIndex=0,Q()):O.value.level===`nut`&&(O.value.nutIndex+=e,ui(),Q())}function fi(e){if(e>0){if(O.value.level===`root`){if(!(Tr.value[O.value.rootIndex]||[]).length)return;O.value.level=`branch`,O.value.branchIndex=0,O.value.nutIndex=0,Q();return}if(O.value.level===`branch`){if(!((Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[]).length)return;O.value.level=`nut`,O.value.nutIndex=0,X.value?Or(X.value):Q();return}}else O.value.level===`nut`?(J(),W.value=null,O.value.level=`branch`,O.value.nutIndex=0,Q()):O.value.level===`branch`&&(W.value=null,G.value=null,O.value.level=`root`,O.value.nutIndex=0,Q())}function pi(){O.value.level===`root`&&ii.value?(Ar(ii.value),D.value=`${ti(ii.value)} selected.`):O.value.level===`branch`&&X.value?(kr(X.value),D.value=`${ni(X.value)} selected.`):O.value.level===`nut`&&X.value&&ai.value&&(Or(X.value),D.value=`${ri(ai.value)} details opened.`)}function mi(){Zn.value=!0,E.value=!1}function hi(){Zn.value=!1,E.value=!1,D.value=``,!G.value&&!W.value&&!H.value&&$()}function gi(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Zn.value||=!0,o?(K(),$(),E.value=!1):((t||n||r||i)&&(E.value=!0),t?di(-1):n?di(1):r?fi(-1):i?fi(1):a&&pi()))}let _i=u(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,n({v:e.rootToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.branchName,e.branchValue,n({v:e.branchToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.branchToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.nutName,e.nutValue,n({v:e.nutToBranch*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.nutToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.nutToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage})])}));return _e({getData:gr,getImage:Br,generatePdf:cr,generateCsv:Pr,generateImage:lr,generateSvg:Qr,toggleTable:Lr,toggleAnnotator:zr,toggleFullscreen:Ir,copyAlt:ei}),(e,t)=>(v(),p(`div`,{class:g(`vue-data-ui-component vue-ui-chestnut ${Fr.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:qn,id:`vue-ui-chestnut_${T.value}`,style:_(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:t[12]||=()=>C(nr)(!0),onMouseleave:t[13]||=()=>C(nr)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ye),m(`div`,Xe,S(D.value),1),_i.value?.rows?.length?(v(),d(Oe,{key:0,uid:T.value,head:_i.value.headers,body:_i.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),k.value.userOptions.buttons.annotator?(v(),d(C(Vn),{key:1,svgRef:C(ir),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Rr.value,isCursorPointer:F.value,palette:k.value.userOptions.annotatorPalette,onClose:zr},Ne({_:2},[b(C(Ce),t=>({name:t,fn:Ge(n=>[x(e.$slots,t,ze(Ie(C(Se)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),ur.value?(v(),p(`div`,Ze,null,512)):f(``,!0),k.value.userOptions.show&&Kn.value&&(C(rr)||C(tr))?(v(),d(C(Hn),{ref_key:`userOptionsRef`,ref:Xn,key:`user_options_${Jn.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:C(sr),isPrinting:C(or),uid:T.value,hasPdf:k.value.userOptions.buttons.pdf,hasImg:k.value.userOptions.buttons.img,hasSvg:k.value.userOptions.buttons.svg,hasXls:k.value.userOptions.buttons.csv,hasTable:k.value.userOptions.buttons.table,hasFullscreen:k.value.userOptions.buttons.fullscreen,hasAltCopy:k.value.userOptions.buttons.altCopy,isFullscreen:Fr.value,titles:{...k.value.userOptions.buttonTitles},chartElement:qn.value,position:k.value.userOptions.position,hasAnnotator:k.value.userOptions.buttons.annotator,isAnnotation:Rr.value,callbacks:k.value.userOptions.callbacks,printScale:k.value.userOptions.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Ir,onGeneratePdf:C(cr),onGenerateCsv:Pr,onGenerateImage:C($r),onGenerateSvg:C(Qr),onToggleTable:Lr,onToggleAnnotator:zr,onCopyAlt:ei,style:_({visibility:C(rr)?C(tr)?`visible`:`hidden`:`visible`})},Ne({_:2},[b(C(we)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ge(n=>[x(e.$slots,t,ze(Ie(C(Te)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,Qe,[I.value.height>0?(v(),p(`svg`,{key:0,ref_key:`svgRef`,ref:ir,xmlns:C(le),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Fr.value,"vue-data-ui-fulscreen--off":!Fr.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:_(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:mi,onBlur:hi,onKeydown:gi},[h(C(Un)),x(e.$slots,`svg-underlayer`,{svg:{...I.value,isPrintingImg:C(or)||C(sr)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:I.value.width<=0?10:I.value.width,height:I.value.height<=0?10:I.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,et)):f(``,!0),H.value?f(``,!0):(v(),p(`g`,tt,[N.value.title.text?(v(),p(`text`,{key:0,"text-anchor":`middle`,fill:N.value.title.color,"font-weight":N.value.title.bold?`bold`:`normal`,"font-size":N.value.title.fontSize,x:I.value.width/2,y:12+N.value.title.fontSize+N.value.title.offsetY,onClick:t[0]||=()=>{K(),$(),E.value=!1}},S(N.value.title.text),9,nt)):f(``,!0),N.value.title.subtitle.text?(v(),p(`text`,{key:1,"text-anchor":`middle`,fill:N.value.title.subtitle.color,"font-weight":N.value.title.subtitle.bold?`bold`:`normal`,"font-size":N.value.title.subtitle.fontSize,x:I.value.width/2,y:48+N.value.title.subtitle.fontSize+N.value.title.subtitle.offsetY,onClick:t[1]||=()=>{K(),$(),E.value=!1}},S(N.value.title.subtitle.text),9,rt)):f(``,!0)])),m(`defs`,null,[(v(!0),p(l,null,b(z.value,(e,t)=>(v(),d(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${T.value}_${e.rootIndex}`,key:`root_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,C(o)(C(ne)(e.color,.05),100-A.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(v(!0),p(l,null,b(z.value,e=>(v(),d(De,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${T.value}_${e.rootIndex}`,key:`branch_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,C(o)(C(ne)(e.color,.02),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${T.value}`,stops:[[`0%`,C(o)(`#FFFFFF`,0),0],[`80%`,C(o)(`#FFFFFF`,M.value.selected.gradientIntensity),1],[`100%`,C(o)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${T.value}`,stops:[[`0%`,C(o)(`#FFFFFF`,0),0],[`80%`,C(o)(`#FFFFFF`,M.value.gradientIntensity),1],[`100%`,C(o)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${T.value}`,stops:[[`0%`,C(o)(P.value.backgroundColor,100),1],[`80%`,C(o)(P.value.backgroundColor,60),1],[`100%`,C(o)(P.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),N.value.grandTotal.show?(v(),p(`g`,it,[m(`text`,{x:L.value.seedX,y:32+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:t[2]||=()=>{K(),$(),E.value=!1}},S(N.value.grandTotal.text),9,at),m(`text`,{x:L.value.seedX,y:38+N.value.grandTotal.fontSize+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:t[3]||=()=>{K(),$(),E.value=!1}},S(C(c)(N.value.grandTotal.formatter,R.value,C(n)({p:N.value.grandTotal.prefix,v:R.value,s:N.value.grandTotal.suffix,r:N.value.grandTotal.roundingValue}))),9,ot)])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[m(`defs`,null,[h(De,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,C(o)(e.color,N.value.links.opacity),1]]},null,8,[`id`,`stops`])]),m(`path`,{d:Vr(e),stroke:C(o)(e.color,N.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_(`opacity:${+!!q(e)}`),onClick:t[4]||=()=>{K(),$(),E.value=!1}},null,12,st)]))),256)),(v(!0),p(l,null,b(B.value,e=>(v(),p(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:A.value.underlayerColor,stroke:`none`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,ct))),256)),(v(!0),p(l,null,b(B.value,(e,t)=>(v(),p(`circle`,{"aria-label":ti(e),cx:e.x,cy:e.y,r:e.r,fill:A.value.useGradient?`url(#root_gradient_${T.value}_${e.rootIndex})`:e.color,stroke:A.value.stroke,"stroke-width":A.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,lt))),256)),A.value.labels.show?(v(),p(`g`,ut,[(v(!0),p(l,null,b(B.value,(e,t)=>(v(),p(`text`,{x:e.x,y:e.y+A.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":A.value.labels.fontSize,fill:A.value.labels.adaptColorToBackground?C(ce)(e.color):A.value.labels.color,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},S(C(c)(A.value.labels.formatter,e.total,C(n)({p:A.value.labels.prefix,v:e.total,s:A.value.labels.suffix,r:A.value.labels.roundingValue}),{datapoint:e})),13,dt))),256)),(v(!0),p(l,null,b(B.value,e=>(v(),p(`g`,null,[H.value&&e.rootIndex===H.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(v(),p(`g`,ft,[m(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:A.value.labels.name.color,"font-size":A.value.labels.name.fontSize,"font-weight":A.value.labels.name.bold?`bold`:`normal`,onClick:t[5]||=()=>{K(),$(),E.value=!1}},S(e.name),9,pt)])):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`rect`,{x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.underlayerColor,rx:j.value.borderRadius,stroke:`none`,style:_(`opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},null,12,mt))),256)),(v(!0),p(l,null,b(V.value,(e,t)=>(v(),p(`rect`,{"aria-label":ni(e),x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.useGradient?`url(#branch_gradient_${T.value}_${e.rootIndex})`:e.color,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},null,12,ht))),256)),j.value.labels.dataLabels.show?(v(),p(`g`,gt,[(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[e.proportionToRoot*100>j.value.labels.dataLabels.hideUnderValue?(v(),p(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize/1.5,"text-anchor":`start`,fill:C(ce)(e.color),"font-size":j.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},S(C(c)(j.value.labels.dataLabels.formatter,e.value,C(n)({p:N.value.branches.labels.dataLabels.prefix,v:e.value,s:N.value.branches.labels.dataLabels.suffix,r:N.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,_t)):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,(e,t)=>(v(),p(`g`,null,[(v(!0),p(l,null,b(C(a)({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,I.value.branchSize/3,I.value.branchSize/3),(t,n)=>(v(),p(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:_(`opacity:${q(e)?1:.1}`)},null,12,vt))),256)),m(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:M.value.useGradient?`url(#nut_${T.value})`:`transparent`,cx:e.x2+24+M.value.offsetX,cy:e.y1+I.value.branchSize/2,r:I.value.branchSize/2+2,onClick:t=>Or(e),style:_(`cursor:${F.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,yt)]))),256)),j.value.labels.show&&!W.value?(v(),p(`g`,bt,[(v(!0),p(l,null,b(V.value,e=>(v(),p(`text`,{x:e.x2+I.value.branchSize+24+M.value.offsetX,y:e.y1+I.value.branchSize/2+5,"font-size":j.value.labels.fontSize,"font-weight":j.value.labels.bold?`bold`:`normal`,fill:j.value.labels.color,"text-anchor":`start`,style:_(`opacity:${q(e)?1:.1}`)},S(e.name),13,xt))),256))])):f(``,!0),m(`line`,{x1:256+I.value.padding.left,x2:256+I.value.padding.left,y1:L.value.top,y2:L.value.bottom,stroke:N.value.verticalSeparator.stroke,"stroke-width":N.value.verticalSeparator.strokeWidth},null,8,St),!H.value&&!W.value?(v(),p(`foreignObject`,{key:6,x:0,y:L.value.bottom,height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:t[6]||=()=>{K(),$(),E.value=!1}},[m(`div`,wt,[m(`div`,Tt,[(v(!0),p(l,null,b(B.value,e=>(v(),p(`div`,{style:_(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),p(`svg`,Et,[m(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Dt)])),C($n)?f(``,!0):(v(),p(l,{key:0},[m(`span`,null,S(e.name)+`:`,1),m(`b`,null,S(C(c)(N.value.roots.labels.formatter,e.total,C(n)({p:P.value.layout.legend.prefix,v:e.total,s:P.value.layout.legend.suffix,r:P.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+S(C(n)({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,Ct)):f(``,!0),H.value&&U.value?(v(),p(`g`,Ot,[(v(),p(`foreignObject`,{x:0,y:jr(),height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},onClick:t[7]||=()=>{K(),$(),E.value=!1}},[m(`div`,At,[m(`b`,null,S(H.value.name),1),m(`div`,jt,[(v(!0),p(l,null,b(H.value.breakdown,(e,t)=>(v(),p(`div`,{style:_(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),p(`svg`,Mt,[m(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Nt)])),m(`span`,null,[Pe(S(e.name)+`: `,1),m(`b`,null,S(N.value.legend.prefix)+` `+S(e.value.toFixed(P.value.layout.nuts.selected.labels.roundingValue))+` `+S(N.value.legend.suffix),1),Pe(` (`+S((e.proportionToBranch*100).toFixed(N.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,kt)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Pt),(v(!0),p(l,null,b(U.value,e=>(v(),p(`g`,null,[Mr(e)?(v(),p(`path`,{key:0,d:C(ie)(e,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+I.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft)):f(``,!0)]))),256)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:118,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It),(v(!0),p(l,null,b(U.value,e=>(v(),p(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt))),256)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:110,fill:`url(#nutpick_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:64,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),m(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+8,fill:M.value.selected.labels.core.total.color,"font-size":M.value.selected.labels.core.total.fontSize,"font-weight":M.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(k.value.translations.total),11,Bt),m(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+36,fill:M.value.selected.labels.core.value.color,"font-size":M.value.selected.labels.core.value.fontSize,"font-weight":M.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(c)(M.value.selected.labels.dataLabels.formatter,H.value.value,C(n)({p:M.value.selected.labels.core.value.prefix,v:H.value.value,s:M.value.selected.labels.core.value.suffix,r:M.value.selected.roundingValue}),{datapoint:H.value})),11,Vt),(v(!0),p(l,null,b(U.value,(e,t)=>(v(),p(`g`,null,[Mr(e)?(v(),p(`text`,{key:0,x:C(s)(e).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)-M.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":M.value.selected.labels.dataLabels.fontSize/2,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ht)):f(``,!0),Mr(e)?(v(),p(`text`,{key:1,x:C(s)(e,!0).x,"text-anchor":C(s)(e,!0).anchor,y:C(se)(e),fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(H.value.breakdown[t].name),15,Ut)):f(``,!0)]))),256)),(v(!0),p(l,null,b(U.value,(e,t)=>(v(),p(`g`,null,[Mr(e)?(v(),p(`text`,{key:0,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].value/H.value.value*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].branchName)+` `+S(C(c)(M.value.selected.labels.dataLabels.formatter,H.value.breakdown[t].value,C(n)({p:M.value.selected.labels.dataLabels.prefix,v:H.value.breakdown[t].value,s:M.value.selected.labels.dataLabels.suffix,r:M.value.selected.roundingValue}),{datapoint:U.value,seriesIndex:t})),15,Wt)):f(``,!0),Mr(e)?(v(),p(`text`,{key:1,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize*2,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].proportionToRoot*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].rootName),15,Gt)):f(``,!0),Mr(e)?(v(),p(`text`,{key:2,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize*3,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].proportionToTree*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),15,Kt)):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[8]||=()=>{K(),$(),E.value=!1}},S(e.name)+`: `+S(C(c)(j.value.labels.dataLabels.formatter,e.value,C(n)({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,qt)):f(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:1,x:e.x1+6,y:e.y1+I.value.branchSize+48,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[9]||=()=>{K(),$(),E.value=!1}},S(C(n)({v:e.proportionToRoot*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(e.rootName),9,Jt)):f(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:2,x:e.x1+6,y:e.y1+I.value.branchSize+72,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[10]||=()=>{K(),$(),E.value=!1}},S(C(n)({v:e.value/R.value*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),9,Yt)):f(``,!0)]))),256)),x(e.$slots,`svg`,{svg:{...I.value,isPrintingImg:C(or)||C(sr)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0)],46,$e)):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,Xt,[x(e.$slots,`watermark`,ze(Ie({isPrinting:C(or)||C(sr)||C(Xr)||C(Zr)})),void 0,!0)])):f(``,!0),x(e.$slots,`legend`,{legend:z.value},void 0,!0),e.$slots.source?(v(),p(`div`,Zt,[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Kn.value&&k.value.userOptions.buttons.table?(v(),d(Ve(Hr.value.component),Le({key:6},Hr.value.props,{ref_key:`tableUnit`,ref:Yn,onClose:Wr}),Ne({content:Ge(()=>[m(`div`,{ref_key:`tableContainer`,ref:pr,class:`vue-ui-chestnut-table`,style:_(`${k.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[m(`div`,{style:_(`${k.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[k.value.table.useDialog?f(``,!0):(v(),p(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${F.value?`pointer`:`default`}; background:${k.value.table.th.backgroundColor};`),onClick:Wr,onKeypress:Ke(Wr,[`enter`])},[h(C(zn),{name:`close`,stroke:k.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),m(`div`,{style:{width:`100%`},class:g({"vue-ui-responsive":C(Ur)})},[m(`table`,Qt,[k.value.table.useDialog?f(``,!0):(v(),p(`caption`,{key:0,style:_({backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(S(N.value.title.text)+` `,1),N.value.title.subtitle.text?(v(),p(`span`,$t,S(N.value.title.subtitle.text),1)):f(``,!0)],4)),m(`thead`,null,[m(`tr`,{role:`row`,style:_(`background:${k.value.table.th.backgroundColor};color:${k.value.table.th.color}`)},[(v(!0),p(l,null,b(Y.value.head,e=>(v(),p(`th`,{style:_(`outline:${k.value.table.th.outline}`)},S(e),5))),256))],4)]),m(`tbody`,null,[(v(!0),p(l,null,b(Y.value.body,(e,t)=>(v(),p(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${k.value.table.td.backgroundColor};color:${k.value.table.td.color}`)},[m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[0]},[m(`div`,tn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,nn)):(v(),p(`span`,rn,S(e.rootName),1))])],12,en),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[1]},[m(`div`,on,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,sn)):(v(),p(`span`,cn,S(e.rootValue.toFixed(k.value.table.td.roundingValue)),1))])],12,an),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[2]},[m(`div`,un,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,dn)):(v(),p(`span`,fn,S((e.rootToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,ln),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[3]},[m(`div`,mn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,hn)):(v(),p(`span`,gn,S(e.branchName),1))])],12,pn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[4]},[m(`div`,vn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,yn)):(v(),p(`span`,bn,S(e.branchValue.toFixed(k.value.table.td.roundingValue)),1))])],12,_n),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[5]},[m(`div`,Sn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,Cn)):(v(),p(`span`,wn,S((e.branchToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,xn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[6]},[m(`div`,En,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,Dn)):(v(),p(`span`,On,S((e.branchToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,Tn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[7]},[m(`div`,An,S(e.nutName),1)],12,kn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[8]},[m(`div`,Mn,S(e.nutValue.toFixed(k.value.table.td.roundingValue)),1)],12,jn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[9]},[m(`div`,Pn,S((e.nutToBranch*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Nn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[10]},[m(`div`,In,S((e.nutToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Fn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[11]},[m(`div`,Rn,S((e.nutToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Ln)],6))),256))])])],2)],4)],4)]),_:2},[k.value.table.useDialog?{name:`title`,fn:Ge(()=>[Pe(S(Hr.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:Ge(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[11]||=e=>Pr(k.value.userOptions.callbacks.csv)},[h(C(zn),{name:`fileCsv`,stroke:Hr.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C($n)?(v(),d(me,{key:0})):f(``,!0)],!0)],46,Je))}},[[`__scopeId`,`data-v-53cc9745`]]);export{qe as n,zn as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Ht as i,It as a,Jt as o,S as ee,X as te,Yt as ne,at as re,f as s,h as ie,i as c,in as ae,nt as oe,p as se,r as ce,t as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-BH9r_0Vd.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{t as be}from"./useChartExport-BZts4KFb.js";import{t as xe}from"./tableIntegration-CNoJ1CIY.js";import{n as Se,t as Ce}from"./annotationSlots-BRR85CqJ.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-sVoTzet1.js";import{t as De}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./useTableResponsive-uSz_qZOB.js";import{t as Me}from"./vue_ui_chestnut-BxxivKN7.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ne,createTextVNode as Pe,createVNode as h,defineAsyncComponent as Fe,guardReactiveProps as Ie,mergeProps as Le,nextTick as Re,normalizeClass as g,normalizeProps as ze,normalizeStyle as _,onMounted as Be,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ve,toDisplayString as S,toRefs as He,unref as C,useCssVars as Ue,watch as We,withCtx as Ge,withKeys as Ke}from"vue";var qe=/* @__PURE__ */ e({default:()=>zn}),Je=[`id`],Ye=[`id`],Xe={"aria-live":`polite`,class:`sr-only`},Ze={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Qe={style:{position:`relative`}},$e=[`xmlns`,`aria-describedby`,`viewBox`],et=[`width`,`height`],tt={key:1},nt=[`fill`,`font-weight`,`font-size`,`x`,`y`],rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it={key:2},at=[`x`,`y`,`font-size`,`font-weight`,`fill`],ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`d`,`stroke`,`fill`],ct=[`cx`,`cy`,`r`,`fill`],lt=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],ut={key:3},dt=[`x`,`y`,`font-size`,`fill`,`onClick`],ft={key:0},pt=[`x`,`y`,`fill`,`font-size`,`font-weight`],mt=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],ht=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],gt={key:4},_t=[`x`,`y`,`fill`,`font-size`,`onClick`],vt=[`d`,`stroke`],yt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],bt={key:5},xt=[`x`,`y`,`font-size`,`font-weight`,`fill`],St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`y`,`height`,`width`],wt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Tt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Et={viewBox:`0 0 20 20`,height:`16`,width:`16`},Dt=[`fill`],Ot={key:7},kt=[`y`,`height`,`width`],At={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},jt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Mt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Nt=[`fill`],Pt=[`cx`,`cy`,`fill`],Ft=[`d`,`stroke`],It=[`cx`,`cy`,`fill`],Lt=[`d`,`stroke`],Rt=[`cx`,`cy`,`fill`],zt=[`cx`,`cy`,`fill`],Bt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt={key:4,class:`vue-data-ui-watermark`},Zt={key:5,ref:`source`,dir:`auto`},Qt={class:`vue-ui-data-table`},$t={key:0},en=[`data-cell`],tn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},nn={key:0},rn={key:1},an=[`data-cell`],on={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},sn={key:0},cn={key:1},ln=[`data-cell`],un={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},dn={key:0},fn={key:1},pn=[`data-cell`],mn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},hn={key:0},gn={key:1},_n=[`data-cell`],vn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},yn={key:0},bn={key:1},xn=[`data-cell`],Sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Cn={key:0},wn={key:1},Tn=[`data-cell`],En={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Dn={key:0},On={key:1},kn=[`data-cell`],An={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},jn=[`data-cell`],Mn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Nn=[`data-cell`],Pn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Fn=[`data-cell`],In={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ln=[`data-cell`],Rn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},zn=/*#__PURE__*/ _e({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:_e,emit:qe}){Ue(e=>({ba98aae8:e.tdo}));let zn=Fe(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Bn=Fe(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Vn=Fe(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Hn=Fe(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Un=Fe(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),Wn=Fe(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_chestnut:Gn}=t(),w=e,Kn=u(()=>!!w.dataset&&w.dataset.length),T=y(te()),qn=y(null),Jn=y(0),Yn=y(null),Xn=y(null),Zn=y(!1),E=y(!1),D=y(``),O=y({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),k=y(ar()),A=u(()=>k.value.style.chart.layout.roots),j=u(()=>k.value.style.chart.layout.branches),M=u(()=>k.value.style.chart.layout.nuts),N=u(()=>k.value.style.chart.layout),P=u(()=>k.value.style.chart);he({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiChestnut`,rules:[ge.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let F=u(()=>k.value.userOptions.useCursorPointer),Qn=u(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:$n,FINAL_DATASET:er}=pe({...He(w),FINAL_CONFIG:k,prepareConfig:ar,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:ae({defaultConfig:k.value,userConfig:Qn.value})}),{userOptionsVisible:tr,setUserOptionsVisibility:nr,keepUserOptionState:rr}=ke({config:k.value}),{svgRef:ir}=Ae({config:N.value.title});function ar(){return ve(w.config,Gn,Me)}We(()=>w.config,e=>{k.value=ar(),tr.value=!k.value.userOptions.showOnChartHover,fr.value.showTable=k.value.table.show,Nr()},{deep:!0});let{isPrinting:or,isImaging:sr,generatePdf:cr,generateImage:lr}=Ee({elementId:`vue-ui-chestnut_${T.value}`,fileName:N.value.title.text||`vue-ui-chestnut`,options:k.value.userOptions.print}),ur=u(()=>k.value.userOptions.show),dr=u(()=>ue(k.value.customPalette)),fr=y({showTable:k.value.table.show});We(k,()=>{fr.value={showTable:k.value.table.show}},{immediate:!0});let pr=y(null),mr=u(()=>k.value.table.responsiveBreakpoint),I=y({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),L=u(()=>({left:I.value.padding.left,top:I.value.padding.top,right:I.value.width-I.value.padding.right,bottom:I.value.height-I.value.padding.bottom,width:I.value.width-(I.value.padding.left+I.value.padding.right),height:I.value.height-(I.value.padding.top+I.value.padding.bottom),seedX:I.value.padding.left+64})),R=u(()=>er.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),hr=u(()=>k.value.debug),z=u(()=>(hr.value&&er.value.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{de({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{de({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{re({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),er.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:ee(e.color)||dr.value[t]||i[t]||i[t%i.length],id:e.id||`root_${t}_${T.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,a)=>({...r,rootName:e.name,rootIndex:t,color:ee(e.color)||dr.value[t]||i[t]||i[t%i.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${a}_${T.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((o,te)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/R.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/R.value,branchToRoot:r.value/n,nutName:o.name,nutValue:o.value,nutToTotal:o.value/R.value,nutToRoot:o.value/n,nutToBranch:o.value/r.value},...o,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:o.value/r.value,proportionToRoot:o.value/n,proportionToTree:o.value/R.value,rootIndex:t,id:o.id||`nut_${t}_${a}_${te}_${T.value}`,color:ee(o.color)||dr.value[te]||i[te]||i[te%i.length],value:o.value>=0?o.value:0}))}))}})));function gr(){return z.value}let _r=qe,vr=u(()=>z.value.flatMap(e=>e.branches).length),yr=u(()=>Math.max(...z.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),br=u(()=>Math.max(...z.value.flatMap(e=>e.branches.map(e=>e.value)))),xr=u(()=>256+I.value.padding.left),B=u(()=>z.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=L.value.height/z.value.length/2,r=e.total/yr.value*(n>64?64:n);return{...e,x:L.value.seedX,y:L.value.top+L.value.height/z.value.length*(t+1)-(L.value.height/z.value.length/2+I.value.gap/2),r:r<I.value.branchSize/2?I.value.branchSize/2:r}})),Sr=u(()=>j.value.widthRatio<=0?.1:j.value.widthRatio>1.8?1.8:j.value.widthRatio),Cr=u(()=>B.value.flatMap(e=>e.branches)),V=u(()=>Cr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*I.value.branchSize+L.value.top+t*I.value.gap,y2:t*I.value.branchSize+I.value.branchSize,x1:xr.value,x2:384*e.value/br.value*Sr.value+xr.value}))),wr=u(()=>B.value),Tr=u(()=>wr.value.map(e=>V.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Er=u(()=>wr.value.map((e,t)=>Tr.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Dr(e){let t=B.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let H=y(null),U=y(null),W=y(null),G=y(null);function K(){H.value=null,W.value=null,G.value=null}function q(e){if(H.value)return e.type===`root`?e.rootIndex===H.value.rootIndex:e.type===`branch`?e.id===H.value.id:e.type===`nut`&&e.branchName===H.value.name&&e.rootIndex===H.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(ci.value&&E.value){if(O.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(O.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?oi.value&&e.id===oi.value.id:(e.type,!1);if(O.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?si.value&&e.id===si.value.id:e.type===`nut`&&si.value&&e.branchName===si.value.name&&e.rootIndex===si.value.rootIndex}return!0}function Or(e){K();let t=wr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Tr.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`nut`,O.value.nutIndex=0,Re(()=>{H.value=e,W.value=e,U.value=a({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,80,80),_r(`selectNut`,e.breakdown),Q()})}function J(){H.value=null,U.value=null,_r(`selectNut`,null)}function kr(e){let t=wr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Tr.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`branch`,O.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),_r(`selectBranch`,null),Q()):(K(),W.value=e,_r(`selectBranch`,e),Q())}function Ar(e){let t=wr.value.findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),O.value.level=`root`,O.value.branchIndex=0,O.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),_r(`selectRoot`,null),Q()):(K(),G.value=e,_r(`selectRoot`,e),Q())}function jr(){return L.value.bottom-(H.value.y1+180)<0?0:L.value.bottom}function Mr(e){return e.proportion*100>M.value.selected.labels.dataLabels.hideUnderValue}Be(()=>{Nr()});function Nr(){fe(w.dataset)&&re({componentName:`VueUiChestnut`,type:`dataset`,debug:hr.value});let e=vr.value*(I.value.branchSize+I.value.gap)+I.value.padding.top+I.value.padding.bottom;I.value.height=e}let Y=u(()=>({head:[k.value.table.th.translations.rootName,k.value.table.th.translations.rootValue,k.value.table.th.translations.rootToTotal,k.value.table.th.translations.branchName,k.value.table.th.translations.branchValue,k.value.table.th.translations.branchToRoot,k.value.table.th.translations.branchToTotal,k.value.table.th.translations.nutName,k.value.table.th.translations.nutValue,k.value.table.th.translations.nutToBranch,k.value.table.th.translations.nutToRoot,k.value.table.th.translations.nutToTotal],body:z.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Pr(e=null){Re(()=>{let t=[[N.value.title.text],[N.value.title.subtitle.text],[``],[`Grand total`,R.value],[``]],n=Y.value.head,i=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),a=t.concat([n]).concat(i),o=r(a);e?e(o):oe({csvContent:o,title:N.value.title.text||`vue-ui-chestnut`})})}let Fr=y(!1);function Ir(e){Fr.value=e,Jn.value+=1}function Lr(){fr.value.showTable=!fr.value.showTable}let Rr=y(!1);function zr(){Rr.value=!Rr.value}async function Br({scale:e=2}={}){if(!qn.value)return;let{width:t,height:n}=qn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ye({domElement:qn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title.text,width:t,height:n,aspectRatio:r}}function Vr(e){let t=Dr(e),n=e.x1,r=e.y1,i=I.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Hr=u(()=>xe({config:k,style:P,mutableConfig:fr,dialog:Wn,accordion:Bn,isFullscreen:Fr,parent:qn,maxWidth:800,titleStyle:N,isCursorPointer:F}));We(()=>fr.value.showTable,async e=>{k.value.table.show||(e&&k.value.table.useDialog&&Yn.value?(await Re(),Yn.value.open()):`close`in Yn.value&&Yn.value.close())});let{isResponsive:Ur}=je(pr,mr);function Wr(){fr.value.showTable=!1,Xn.value&&Xn.value.setTableIconState(!1)}let Gr=u(()=>z.value.map((e,t)=>({...e,display:`${e.name}: ${c(A.value.labels.formatter,e.total,n({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),{datapoint:e})} (${n({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage})})`}))),Kr=u(()=>Gr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),qr=u(()=>P.value.backgroundColor),Jr=u(()=>({...N.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Yr=u(()=>N.value.title),{isCallbackImaging:Xr,isCallbackSvg:Zr,generateSvg:Qr,onGenerateImage:$r}=be({svg:ir,title:Yr,legend:Jr,legendItems:Kr,backgroundColor:qr,titleEmbedded:!0,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:lr});async function ei(){_r(`copyAlt`,{config:k.value,dataset:z.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ti(e){if(!e)return``;let t=n({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),r=n({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${r} of total.`}function ni(e){if(!e)return``;let t=n({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),r=n({v:e.proportionToRoot*100,s:`%`,r:N.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${r} of root ${e.rootName}.`}function ri(e){if(!e)return``;let t=n({p:N.value.legend.prefix,v:e.value,s:N.value.legend.suffix,r:M.value.selected.labels.roundingValue}),r=n({v:e.proportionToBranch*100,s:`%`,r:M.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${r} of branch ${e.branchName}.`}let ii=u(()=>wr.value[O.value.rootIndex]||null),X=u(()=>(Tr.value[O.value.rootIndex]||[])[O.value.branchIndex]||null),ai=u(()=>((Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[])[O.value.nutIndex]||null),Z=u(()=>ii.value),oi=u(()=>X.value),si=u(()=>O.value.level===`nut`?X.value:null),ci=u(()=>Zn.value);function Q(){O.value.level===`root`?D.value=ti(ii.value):O.value.level===`branch`?D.value=ni(X.value):O.value.level===`nut`&&(D.value=ri(ai.value))}function $(){O.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},D.value=``}function li(){let e=Tr.value[O.value.rootIndex]||[];e.length?(O.value.branchIndex>=e.length&&(O.value.branchIndex=0),O.value.branchIndex<0&&(O.value.branchIndex=e.length-1)):O.value.branchIndex=0}function ui(){let e=(Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[];e.length?(O.value.nutIndex>=e.length&&(O.value.nutIndex=0),O.value.nutIndex<0&&(O.value.nutIndex=e.length-1)):O.value.nutIndex=0}function di(e){if(O.value.level===`root`){let t=wr.value.length;if(!t)return;O.value.rootIndex+=e,O.value.rootIndex>=t&&(O.value.rootIndex=0),O.value.rootIndex<0&&(O.value.rootIndex=t-1),O.value.branchIndex=0,O.value.nutIndex=0,Q()}else O.value.level===`branch`?(O.value.branchIndex+=e,li(),O.value.nutIndex=0,Q()):O.value.level===`nut`&&(O.value.nutIndex+=e,ui(),Q())}function fi(e){if(e>0){if(O.value.level===`root`){if(!(Tr.value[O.value.rootIndex]||[]).length)return;O.value.level=`branch`,O.value.branchIndex=0,O.value.nutIndex=0,Q();return}if(O.value.level===`branch`){if(!((Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||[]).length)return;O.value.level=`nut`,O.value.nutIndex=0,X.value?Or(X.value):Q();return}}else O.value.level===`nut`?(J(),W.value=null,O.value.level=`branch`,O.value.nutIndex=0,Q()):O.value.level===`branch`&&(W.value=null,G.value=null,O.value.level=`root`,O.value.nutIndex=0,Q())}function pi(){O.value.level===`root`&&ii.value?(Ar(ii.value),D.value=`${ti(ii.value)} selected.`):O.value.level===`branch`&&X.value?(kr(X.value),D.value=`${ni(X.value)} selected.`):O.value.level===`nut`&&X.value&&ai.value&&(Or(X.value),D.value=`${ri(ai.value)} details opened.`)}function mi(){Zn.value=!0,E.value=!1}function hi(){Zn.value=!1,E.value=!1,D.value=``,!G.value&&!W.value&&!H.value&&$()}function gi(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Zn.value||=!0,o?(K(),$(),E.value=!1):((t||n||r||i)&&(E.value=!0),t?di(-1):n?di(1):r?fi(-1):i?fi(1):a&&pi()))}let _i=u(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,n({v:e.rootToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.branchName,e.branchValue,n({v:e.branchToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.branchToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.nutName,e.nutValue,n({v:e.nutToBranch*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.nutToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),n({v:e.nutToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage})])}));return _e({getData:gr,getImage:Br,generatePdf:cr,generateCsv:Pr,generateImage:lr,generateSvg:Qr,toggleTable:Lr,toggleAnnotator:zr,toggleFullscreen:Ir,copyAlt:ei}),(e,t)=>(v(),p(`div`,{class:g(`vue-data-ui-component vue-ui-chestnut ${Fr.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:qn,id:`vue-ui-chestnut_${T.value}`,style:_(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:t[12]||=()=>C(nr)(!0),onMouseleave:t[13]||=()=>C(nr)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ye),m(`div`,Xe,S(D.value),1),_i.value?.rows?.length?(v(),d(Oe,{key:0,uid:T.value,head:_i.value.headers,body:_i.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),k.value.userOptions.buttons.annotator?(v(),d(C(Vn),{key:1,svgRef:C(ir),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Rr.value,isCursorPointer:F.value,palette:k.value.userOptions.annotatorPalette,onClose:zr},Ne({_:2},[b(C(Ce),t=>({name:t,fn:Ge(n=>[x(e.$slots,t,ze(Ie(C(Se)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),ur.value?(v(),p(`div`,Ze,null,512)):f(``,!0),k.value.userOptions.show&&Kn.value&&(C(rr)||C(tr))?(v(),d(C(Hn),{ref_key:`userOptionsRef`,ref:Xn,key:`user_options_${Jn.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:C(sr),isPrinting:C(or),uid:T.value,hasPdf:k.value.userOptions.buttons.pdf,hasImg:k.value.userOptions.buttons.img,hasSvg:k.value.userOptions.buttons.svg,hasXls:k.value.userOptions.buttons.csv,hasTable:k.value.userOptions.buttons.table,hasFullscreen:k.value.userOptions.buttons.fullscreen,hasAltCopy:k.value.userOptions.buttons.altCopy,isFullscreen:Fr.value,titles:{...k.value.userOptions.buttonTitles},chartElement:qn.value,position:k.value.userOptions.position,hasAnnotator:k.value.userOptions.buttons.annotator,isAnnotation:Rr.value,callbacks:k.value.userOptions.callbacks,printScale:k.value.userOptions.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Ir,onGeneratePdf:C(cr),onGenerateCsv:Pr,onGenerateImage:C($r),onGenerateSvg:C(Qr),onToggleTable:Lr,onToggleAnnotator:zr,onCopyAlt:ei,style:_({visibility:C(rr)?C(tr)?`visible`:`hidden`:`visible`})},Ne({_:2},[b(C(we)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ge(n=>[x(e.$slots,t,ze(Ie(C(Te)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,Qe,[I.value.height>0?(v(),p(`svg`,{key:0,ref_key:`svgRef`,ref:ir,xmlns:C(le),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Fr.value,"vue-data-ui-fulscreen--off":!Fr.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:_(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:mi,onBlur:hi,onKeydown:gi},[h(C(Un)),x(e.$slots,`svg-underlayer`,{svg:{...I.value,isPrintingImg:C(or)||C(sr)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:I.value.width<=0?10:I.value.width,height:I.value.height<=0?10:I.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,et)):f(``,!0),H.value?f(``,!0):(v(),p(`g`,tt,[N.value.title.text?(v(),p(`text`,{key:0,"text-anchor":`middle`,fill:N.value.title.color,"font-weight":N.value.title.bold?`bold`:`normal`,"font-size":N.value.title.fontSize,x:I.value.width/2,y:12+N.value.title.fontSize+N.value.title.offsetY,onClick:t[0]||=()=>{K(),$(),E.value=!1}},S(N.value.title.text),9,nt)):f(``,!0),N.value.title.subtitle.text?(v(),p(`text`,{key:1,"text-anchor":`middle`,fill:N.value.title.subtitle.color,"font-weight":N.value.title.subtitle.bold?`bold`:`normal`,"font-size":N.value.title.subtitle.fontSize,x:I.value.width/2,y:48+N.value.title.subtitle.fontSize+N.value.title.subtitle.offsetY,onClick:t[1]||=()=>{K(),$(),E.value=!1}},S(N.value.title.subtitle.text),9,rt)):f(``,!0)])),m(`defs`,null,[(v(!0),p(l,null,b(z.value,(e,t)=>(v(),d(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${T.value}_${e.rootIndex}`,key:`root_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,C(o)(C(ne)(e.color,.05),100-A.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(v(!0),p(l,null,b(z.value,e=>(v(),d(De,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${T.value}_${e.rootIndex}`,key:`branch_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,C(o)(C(ne)(e.color,.02),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${T.value}`,stops:[[`0%`,C(o)(`#FFFFFF`,0),0],[`80%`,C(o)(`#FFFFFF`,M.value.selected.gradientIntensity),1],[`100%`,C(o)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${T.value}`,stops:[[`0%`,C(o)(`#FFFFFF`,0),0],[`80%`,C(o)(`#FFFFFF`,M.value.gradientIntensity),1],[`100%`,C(o)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),h(De,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${T.value}`,stops:[[`0%`,C(o)(P.value.backgroundColor,100),1],[`80%`,C(o)(P.value.backgroundColor,60),1],[`100%`,C(o)(P.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),N.value.grandTotal.show?(v(),p(`g`,it,[m(`text`,{x:L.value.seedX,y:32+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:t[2]||=()=>{K(),$(),E.value=!1}},S(N.value.grandTotal.text),9,at),m(`text`,{x:L.value.seedX,y:38+N.value.grandTotal.fontSize+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:t[3]||=()=>{K(),$(),E.value=!1}},S(C(c)(N.value.grandTotal.formatter,R.value,C(n)({p:N.value.grandTotal.prefix,v:R.value,s:N.value.grandTotal.suffix,r:N.value.grandTotal.roundingValue}))),9,ot)])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[m(`defs`,null,[h(De,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,C(o)(e.color,N.value.links.opacity),1]]},null,8,[`id`,`stops`])]),m(`path`,{d:Vr(e),stroke:C(o)(e.color,N.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_(`opacity:${+!!q(e)}`),onClick:t[4]||=()=>{K(),$(),E.value=!1}},null,12,st)]))),256)),(v(!0),p(l,null,b(B.value,e=>(v(),p(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:A.value.underlayerColor,stroke:`none`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,ct))),256)),(v(!0),p(l,null,b(B.value,(e,t)=>(v(),p(`circle`,{"aria-label":ti(e),cx:e.x,cy:e.y,r:e.r,fill:A.value.useGradient?`url(#root_gradient_${T.value}_${e.rootIndex})`:e.color,stroke:A.value.stroke,"stroke-width":A.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,lt))),256)),A.value.labels.show?(v(),p(`g`,ut,[(v(!0),p(l,null,b(B.value,(e,t)=>(v(),p(`text`,{x:e.x,y:e.y+A.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":A.value.labels.fontSize,fill:A.value.labels.adaptColorToBackground?C(ce)(e.color):A.value.labels.color,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},S(C(c)(A.value.labels.formatter,e.total,C(n)({p:A.value.labels.prefix,v:e.total,s:A.value.labels.suffix,r:A.value.labels.roundingValue}),{datapoint:e})),13,dt))),256)),(v(!0),p(l,null,b(B.value,e=>(v(),p(`g`,null,[H.value&&e.rootIndex===H.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(v(),p(`g`,ft,[m(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:A.value.labels.name.color,"font-size":A.value.labels.name.fontSize,"font-weight":A.value.labels.name.bold?`bold`:`normal`,onClick:t[5]||=()=>{K(),$(),E.value=!1}},S(e.name),9,pt)])):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`rect`,{x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.underlayerColor,rx:j.value.borderRadius,stroke:`none`,style:_(`opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},null,12,mt))),256)),(v(!0),p(l,null,b(V.value,(e,t)=>(v(),p(`rect`,{"aria-label":ni(e),x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.useGradient?`url(#branch_gradient_${T.value}_${e.rootIndex})`:e.color,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},null,12,ht))),256)),j.value.labels.dataLabels.show?(v(),p(`g`,gt,[(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[e.proportionToRoot*100>j.value.labels.dataLabels.hideUnderValue?(v(),p(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize/1.5,"text-anchor":`start`,fill:C(ce)(e.color),"font-size":j.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>kr(e)},S(C(c)(j.value.labels.dataLabels.formatter,e.value,C(n)({p:N.value.branches.labels.dataLabels.prefix,v:e.value,s:N.value.branches.labels.dataLabels.suffix,r:N.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,_t)):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,(e,t)=>(v(),p(`g`,null,[(v(!0),p(l,null,b(C(a)({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,I.value.branchSize/3,I.value.branchSize/3),(t,n)=>(v(),p(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:_(`opacity:${q(e)?1:.1}`)},null,12,vt))),256)),m(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:M.value.useGradient?`url(#nut_${T.value})`:`transparent`,cx:e.x2+24+M.value.offsetX,cy:e.y1+I.value.branchSize/2,r:I.value.branchSize/2+2,onClick:t=>Or(e),style:_(`cursor:${F.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,yt)]))),256)),j.value.labels.show&&!W.value?(v(),p(`g`,bt,[(v(!0),p(l,null,b(V.value,e=>(v(),p(`text`,{x:e.x2+I.value.branchSize+24+M.value.offsetX,y:e.y1+I.value.branchSize/2+5,"font-size":j.value.labels.fontSize,"font-weight":j.value.labels.bold?`bold`:`normal`,fill:j.value.labels.color,"text-anchor":`start`,style:_(`opacity:${q(e)?1:.1}`)},S(e.name),13,xt))),256))])):f(``,!0),m(`line`,{x1:256+I.value.padding.left,x2:256+I.value.padding.left,y1:L.value.top,y2:L.value.bottom,stroke:N.value.verticalSeparator.stroke,"stroke-width":N.value.verticalSeparator.strokeWidth},null,8,St),!H.value&&!W.value?(v(),p(`foreignObject`,{key:6,x:0,y:L.value.bottom,height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:t[6]||=()=>{K(),$(),E.value=!1}},[m(`div`,wt,[m(`div`,Tt,[(v(!0),p(l,null,b(B.value,e=>(v(),p(`div`,{style:_(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),p(`svg`,Et,[m(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Dt)])),C($n)?f(``,!0):(v(),p(l,{key:0},[m(`span`,null,S(e.name)+`:`,1),m(`b`,null,S(C(c)(N.value.roots.labels.formatter,e.total,C(n)({p:P.value.layout.legend.prefix,v:e.total,s:P.value.layout.legend.suffix,r:P.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+S(C(n)({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,Ct)):f(``,!0),H.value&&U.value?(v(),p(`g`,Ot,[(v(),p(`foreignObject`,{x:0,y:jr(),height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},onClick:t[7]||=()=>{K(),$(),E.value=!1}},[m(`div`,At,[m(`b`,null,S(H.value.name),1),m(`div`,jt,[(v(!0),p(l,null,b(H.value.breakdown,(e,t)=>(v(),p(`div`,{style:_(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),p(`svg`,Mt,[m(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Nt)])),m(`span`,null,[Pe(S(e.name)+`: `,1),m(`b`,null,S(N.value.legend.prefix)+` `+S(e.value.toFixed(P.value.layout.nuts.selected.labels.roundingValue))+` `+S(N.value.legend.suffix),1),Pe(` (`+S((e.proportionToBranch*100).toFixed(N.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,kt)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Pt),(v(!0),p(l,null,b(U.value,e=>(v(),p(`g`,null,[Mr(e)?(v(),p(`path`,{key:0,d:C(ie)(e,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+I.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft)):f(``,!0)]))),256)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:118,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It),(v(!0),p(l,null,b(U.value,e=>(v(),p(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt))),256)),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:110,fill:`url(#nutpick_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt),m(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:64,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),m(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+8,fill:M.value.selected.labels.core.total.color,"font-size":M.value.selected.labels.core.total.fontSize,"font-weight":M.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(k.value.translations.total),11,Bt),m(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+36,fill:M.value.selected.labels.core.value.color,"font-size":M.value.selected.labels.core.value.fontSize,"font-weight":M.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(c)(M.value.selected.labels.dataLabels.formatter,H.value.value,C(n)({p:M.value.selected.labels.core.value.prefix,v:H.value.value,s:M.value.selected.labels.core.value.suffix,r:M.value.selected.roundingValue}),{datapoint:H.value})),11,Vt),(v(!0),p(l,null,b(U.value,(e,t)=>(v(),p(`g`,null,[Mr(e)?(v(),p(`text`,{key:0,x:C(s)(e).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)-M.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":M.value.selected.labels.dataLabels.fontSize/2,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ht)):f(``,!0),Mr(e)?(v(),p(`text`,{key:1,x:C(s)(e,!0).x,"text-anchor":C(s)(e,!0).anchor,y:C(se)(e),fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(H.value.breakdown[t].name),15,Ut)):f(``,!0)]))),256)),(v(!0),p(l,null,b(U.value,(e,t)=>(v(),p(`g`,null,[Mr(e)?(v(),p(`text`,{key:0,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].value/H.value.value*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].branchName)+` `+S(C(c)(M.value.selected.labels.dataLabels.formatter,H.value.breakdown[t].value,C(n)({p:M.value.selected.labels.dataLabels.prefix,v:H.value.breakdown[t].value,s:M.value.selected.labels.dataLabels.suffix,r:M.value.selected.roundingValue}),{datapoint:U.value,seriesIndex:t})),15,Wt)):f(``,!0),Mr(e)?(v(),p(`text`,{key:1,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize*2,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].proportionToRoot*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].rootName),15,Gt)):f(``,!0),Mr(e)?(v(),p(`text`,{key:2,x:C(s)(e,!0).x,"text-anchor":C(s)(e).anchor,y:C(se)(e)+M.value.selected.labels.dataLabels.fontSize*3,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(n)({v:H.value.breakdown[t].proportionToTree*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),15,Kt)):f(``,!0)]))),256))])):f(``,!0),(v(!0),p(l,null,b(V.value,e=>(v(),p(`g`,null,[W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[8]||=()=>{K(),$(),E.value=!1}},S(e.name)+`: `+S(C(c)(j.value.labels.dataLabels.formatter,e.value,C(n)({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,qt)):f(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:1,x:e.x1+6,y:e.y1+I.value.branchSize+48,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[9]||=()=>{K(),$(),E.value=!1}},S(C(n)({v:e.proportionToRoot*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(e.rootName),9,Jt)):f(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),p(`text`,{key:2,x:e.x1+6,y:e.y1+I.value.branchSize+72,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:t[10]||=()=>{K(),$(),E.value=!1}},S(C(n)({v:e.value/R.value*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),9,Yt)):f(``,!0)]))),256)),x(e.$slots,`svg`,{svg:{...I.value,isPrintingImg:C(or)||C(sr)||C(Xr),isPrintingSvg:C(Zr)}},void 0,!0)],46,$e)):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,Xt,[x(e.$slots,`watermark`,ze(Ie({isPrinting:C(or)||C(sr)||C(Xr)||C(Zr)})),void 0,!0)])):f(``,!0),x(e.$slots,`legend`,{legend:z.value},void 0,!0),e.$slots.source?(v(),p(`div`,Zt,[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Kn.value&&k.value.userOptions.buttons.table?(v(),d(Ve(Hr.value.component),Le({key:6},Hr.value.props,{ref_key:`tableUnit`,ref:Yn,onClose:Wr}),Ne({content:Ge(()=>[m(`div`,{ref_key:`tableContainer`,ref:pr,class:`vue-ui-chestnut-table`,style:_(`${k.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[m(`div`,{style:_(`${k.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[k.value.table.useDialog?f(``,!0):(v(),p(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${F.value?`pointer`:`default`}; background:${k.value.table.th.backgroundColor};`),onClick:Wr,onKeypress:Ke(Wr,[`enter`])},[h(C(zn),{name:`close`,stroke:k.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),m(`div`,{style:{width:`100%`},class:g({"vue-ui-responsive":C(Ur)})},[m(`table`,Qt,[k.value.table.useDialog?f(``,!0):(v(),p(`caption`,{key:0,style:_({backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(S(N.value.title.text)+` `,1),N.value.title.subtitle.text?(v(),p(`span`,$t,S(N.value.title.subtitle.text),1)):f(``,!0)],4)),m(`thead`,null,[m(`tr`,{role:`row`,style:_(`background:${k.value.table.th.backgroundColor};color:${k.value.table.th.color}`)},[(v(!0),p(l,null,b(Y.value.head,e=>(v(),p(`th`,{style:_(`outline:${k.value.table.th.outline}`)},S(e),5))),256))],4)]),m(`tbody`,null,[(v(!0),p(l,null,b(Y.value.body,(e,t)=>(v(),p(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${k.value.table.td.backgroundColor};color:${k.value.table.td.color}`)},[m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[0]},[m(`div`,tn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,nn)):(v(),p(`span`,rn,S(e.rootName),1))])],12,en),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[1]},[m(`div`,on,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,sn)):(v(),p(`span`,cn,S(e.rootValue.toFixed(k.value.table.td.roundingValue)),1))])],12,an),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[2]},[m(`div`,un,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),p(`span`,dn)):(v(),p(`span`,fn,S((e.rootToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,ln),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[3]},[m(`div`,mn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,hn)):(v(),p(`span`,gn,S(e.branchName),1))])],12,pn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[4]},[m(`div`,vn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,yn)):(v(),p(`span`,bn,S(e.branchValue.toFixed(k.value.table.td.roundingValue)),1))])],12,_n),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[5]},[m(`div`,Sn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,Cn)):(v(),p(`span`,wn,S((e.branchToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,xn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[6]},[m(`div`,En,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),p(`span`,Dn)):(v(),p(`span`,On,S((e.branchToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,Tn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[7]},[m(`div`,An,S(e.nutName),1)],12,kn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[8]},[m(`div`,Mn,S(e.nutValue.toFixed(k.value.table.td.roundingValue)),1)],12,jn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[9]},[m(`div`,Pn,S((e.nutToBranch*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Nn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[10]},[m(`div`,In,S((e.nutToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Fn),m(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[11]},[m(`div`,Rn,S((e.nutToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Ln)],6))),256))])])],2)],4)],4)]),_:2},[k.value.table.useDialog?{name:`title`,fn:Ge(()=>[Pe(S(Hr.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:Ge(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[11]||=e=>Pr(k.value.userOptions.callbacks.csv)},[h(C(zn),{name:`fileCsv`,stroke:Hr.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C($n)?(v(),d(me,{key:0})):f(``,!0)],!0)],46,Je))}},[[`__scopeId`,`data-v-53cc9745`]]);export{qe as n,zn as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Ht as i,S as a,X as o,Y as s,at as c,i as ee,in as l,nt as te,r as ne,sn as re,t as ie,w as ae,yt as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue}from"./useHints-BH9r_0Vd.js";import{t as de}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as fe}from"./resolveChartConfig-CIhClE5R.js";import{t as pe}from"./chartImage-DPGnEuYM.js";import{n as me}from"./Title-BliHuXfT.js";import{t as he}from"./useChartExport-BZts4KFb.js";import{n as ge,t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./annotationSlots-BRR85CqJ.js";import{n as be,t as xe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Se}from"./usePrinter-sVoTzet1.js";import{t as Ce}from"./Shape-CRe8woTu.js";import{c as we}from"./canvas-lib-22VpOI4_.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./useUserOptionState-CXlFnwPv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Legend-DM0ClX3D.js";import{t as Ae}from"./vue_ui_chord-Fq6VBRT1.js";import{Fragment as u,Teleport as je,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Me,createTextVNode as Ne,createVNode as Pe,defineAsyncComponent as g,guardReactiveProps as Fe,mergeProps as Ie,nextTick as Le,normalizeClass as _,normalizeProps as Re,normalizeStyle as v,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,useCssVars as We,watch as Ge,withCtx as T,withModifiers as Ke}from"vue";var qe=/* @__PURE__ */ e({default:()=>Tt}),Je=[`id`],Ye=[`id`],Xe=[`id`],Ze=[`xmlns`,`viewBox`,`aria-describedby`],Qe=[`width`,`height`],$e={key:1},et=[`id`,`d`],tt={key:2},nt=[`transform`],rt=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],it=[`d`,`fill`,`stroke`,`stroke-width`],at=[`d`,`fill`],ot=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],st=[`d`,`fill`,`stroke`,`stroke-width`],ct=[`d`,`fill`,`stroke`,`stroke-width`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut={key:0},dt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],pt=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],mt=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],ht={key:1},gt=[`font-size`,`font-weight`,`fill`],_t=[`href`],vt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],yt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:6,class:`vue-data-ui-watermark`},xt=[`id`],St=[`onClick`],Ct={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},wt={style:{"text-align":`right`,width:`100%`}},Tt=/*#__PURE__*/ de({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:de,emit:qe}){We(e=>({v4f2ad1de:e.slicerColor}));let Tt=g(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Dt=g(()=>import(`./DataTable-0Vv-aGHD.js`)),Ot=g(()=>import(`./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Ht as i,S as a,X as o,Y as s,at as c,i as ee,in as l,nt as te,r as ne,sn as re,t as ie,w as ae,yt as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue}from"./useHints-BH9r_0Vd.js";import{t as de}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as fe}from"./resolveChartConfig-CIhClE5R.js";import{t as pe}from"./chartImage-DPGnEuYM.js";import{n as me}from"./Title-BliHuXfT.js";import{t as he}from"./useChartExport-BZts4KFb.js";import{n as ge,t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./annotationSlots-BRR85CqJ.js";import{n as be,t as xe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Se}from"./usePrinter-sVoTzet1.js";import{t as Ce}from"./Shape-CRe8woTu.js";import{c as we}from"./canvas-lib-22VpOI4_.js";import{t as Te}from"./useResponsive-CENUxfEL.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./useUserOptionState-CXlFnwPv.js";import{t as Oe}from"./useChartAccessibility-DOMuYJfm.js";import{t as ke}from"./Legend-DM0ClX3D.js";import{t as Ae}from"./vue_ui_chord-Fq6VBRT1.js";import{Fragment as u,Teleport as je,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Me,createTextVNode as Ne,createVNode as Pe,defineAsyncComponent as g,guardReactiveProps as Fe,mergeProps as Ie,nextTick as Le,normalizeClass as _,normalizeProps as Re,normalizeStyle as v,onBeforeUnmount as ze,onMounted as Be,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Ve,shallowRef as He,toDisplayString as C,toRefs as Ue,unref as w,useCssVars as We,watch as Ge,withCtx as T,withModifiers as Ke}from"vue";var qe=/* @__PURE__ */ e({default:()=>Tt}),Je=[`id`],Ye=[`id`],Xe=[`id`],Ze=[`xmlns`,`viewBox`,`aria-describedby`],Qe=[`width`,`height`],$e={key:1},et=[`id`,`d`],tt={key:2},nt=[`transform`],rt=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],it=[`d`,`fill`,`stroke`,`stroke-width`],at=[`d`,`fill`],ot=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],st=[`d`,`fill`,`stroke`,`stroke-width`],ct=[`d`,`fill`,`stroke`,`stroke-width`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut={key:0},dt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],pt=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],mt=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],ht={key:1},gt=[`font-size`,`font-weight`,`fill`],_t=[`href`],vt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],yt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:6,class:`vue-data-ui-watermark`},xt=[`id`],St=[`onClick`],Ct={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},wt={style:{"text-align":`right`,width:`100%`}},Tt=/*#__PURE__*/ de({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:de,emit:qe}){We(e=>({v4f2ad1de:e.slicerColor}));let Tt=g(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Dt=g(()=>import(`./DataTable-0Vv-aGHD.js`)),Ot=g(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),kt=g(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),At=g(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),jt=g(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_chord:Mt}=t(),E=e,Nt=qe,D=b(!!E.dataset&&Object.hasOwn(E.dataset,`matrix`)),O=b(o()),k=b(null),A=b(null),j=b(null),Pt=b(0),M=b(null),Ft=b(null),It=b(null),Lt=b(null),Rt=b(null),zt=b(0),Bt=b(0),Vt=b(0),Ht=b(!1),N=He(null),P=He(null),Ut=b(!1),Wt=b(null),Gt=b(null),F=b(`group`),I=b(null),Kt=b(!1),L=b(rn()),R=d(()=>L.value.style.chart.arcs),z=d(()=>L.value.style.chart.ribbons),B=d(()=>L.value.style.chart);ue({config:()=>L.value,dataset:()=>E.dataset,component:`VueUiChord`,rules:[{test:e=>e.matrix&&e.matrix.length>12,message:[`👀 The number of groups > 12, the chart might become hard to read. Consider:`,``,`▶️ Using broader groups to reduce their number.`]}]});let V=d(()=>L.value.userOptions.useCursorPointer),qt=d(()=>l({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},arcs:{stroke:`#6A6A6A`,labels:{show:!1}},ribbons:{stroke:`#6A6A6A`,underlayerOpacity:0,labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:Jt,FINAL_DATASET:H,manualLoading:Yt}=ce({...Ue(E),FINAL_CONFIG:L,prepareConfig:rn,callback:()=>{Promise.resolve().then(async()=>{await Le(),W.value.showTable=L.value.table.show})},skeletonDataset:E.config?.skeletonDataset??{matrix:[[12e3,6e3,9e3,3e3],[2e3,1e4,2e3,6001],[8e3,1600,8e3,8001],[1e3,1e3,1e3,7001]],labels:[],colors:[`#DBDBDB`,`#C4C4C4`,`#ADADAD`,`#969696`]},skeletonConfig:l({defaultConfig:L.value,userConfig:qt.value})}),{userOptionsVisible:Xt,setUserOptionsVisibility:Zt,keepUserOptionState:Qt}=De({config:L.value}),{svgRef:U}=Oe({config:B.value.title}),{isPrinting:$t,isImaging:en,generatePdf:tn,generateImage:nn}=Se({elementId:`chord_${O.value}`,fileName:B.value.title.text||`vue-ui-chord`,options:L.value.userOptions.print}),W=b({showTable:L.value.table.show});function rn(){return fe(E.config,Mt,Ae)}Ge(()=>E.config,e=>{Jt.value||(L.value=rn()),Xt.value=!L.value.userOptions.showOnChartHover,on(),zt.value+=1,Bt.value+=1,Vt.value+=1,X.value=L.value.initialRotation,W.value.showTable=L.value.table.show},{deep:!0});let G=d(()=>L.value.debug);Ge(()=>E.dataset,()=>{an(),on(),zt.value+=1,Bt.value+=1,Vt.value+=1});function an(){if(se(E.dataset)){c({componentName:`VueUiChord`,type:`dataset`,debug:G.value}),D.value=!1,Yt.value=!0;return}let e=oe({datasetObject:E.dataset,requiredAttributes:[`matrix`]});if(e.length){G.value&&e.forEach(e=>{c({componentName:`VueUiChord`,type:`datasetAttribute`,property:e})}),D.value=!1,Yt.value=!0;return}let t=E.dataset.matrix;if(!Array.isArray(t)||t.length<2){G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
2
2
|
|
|
3
3
|
matrix:[
|
|
4
4
|
[1, 1],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Dt as i,Ft as a,Ht as o,Q as s,S as c,X as l,Zt as u,at as d,i as f,in as p,nn as m,nt as ee,q as h,r as g,t as te,tn as ne,w as re,zt as ie}from"./lib-rPeBMZrn.js";import{n as ae,t as oe}from"./BaseScanner-8NdoBs7B.js";import{n as se,t as ce}from"./useHints-BH9r_0Vd.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{t as me}from"./tableIntegration-CNoJ1CIY.js";import{n as he,t as ge}from"./annotationSlots-BRR85CqJ.js";import{n as _e,t as ve}from"./userOptionsSlots-DYuo-E5m.js";import{t as ye}from"./usePrinter-sVoTzet1.js";import{t as be}from"./useTransitions-ChGGrtrv.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./usePanZoom-BdjP5Suc.js";import{t as Oe}from"./vue_ui_circle_pack-CfXkXi7v.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as Me,nextTick as Ne,normalizeClass as T,normalizeProps as E,normalizeStyle as Pe,onBeforeUnmount as Fe,onMounted as Ie,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Le,toDisplayString as j,toRefs as Re,unref as M,useCssVars as ze,watch as Be,withCtx as N}from"vue";function Ve(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function He(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ue(e,t,n){let r=He,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Ke(e,n,t),e;We(o,a,s=e[2]),a=new $e(a),o=new $e(o),s=new $e(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){We(a._,o._,s=e[c]),s=new $e(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(Ge(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(Ge(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Ke(e,n,t),Ye(e,n,t),e}function We(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function Ge(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Ke(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);qe(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Je(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function qe(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&Ge(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Je(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ye(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Xe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Xe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=Ze(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!P(s,t))continue;let c=Qe(s,t,n,r);c<a&&(a=c,i=o)}}return i}function Ze(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function P(e,t){for(let n of t)if(Ge(n,e))return!1;return!0}function Qe(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var $e=class{constructor(e){this._=e,this.next=null,this.previous=null}},et=/* @__PURE__ */ e({default:()=>F}),tt=[`id`],nt=[`id`],rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`x`,`y`,`width`,`height`],at={key:0},ot=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],st=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ct=[`x`,`y`,`width`,`height`,`fill`,`rx`],lt=[`transform`,`font-size`,`fill`,`font-weight`],ut=[`transform`,`font-size`,`fill`,`font-weight`],dt={key:1,style:{pointerEvents:`none`}},ft=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],pt=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],mt=[`fill`,`x`,`y`,`rx`,`width`,`height`],ht=[`transform`,`font-size`,`fill`,`font-family`],gt=[`dy`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},bt={style:{display:`flex`,"align-items":`center`}},F=/*#__PURE__*/ le({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:He}){ze(e=>({v5a502830:pr.value}));let We=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ge=C(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Ke=C(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),qe=C(()=>import(`./DataTable-0Vv-aGHD.js`)),Je=C(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Ye=C(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Xe=C(()=>import(`./PackageVersion-C4ZM3Vf7.js`).then(e=>e.t)),Ze=C(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),P=e,Qe=He,{vue_ui_circle_pack:$e}=t(),et=v(()=>!!P.dataset&&P.dataset.length),F=O(l()),I=O(null),xt=O(null),St=O(null),Ct=O(0),wt=O(0),Tt=O(0),Et=O(null),L=O(null),Dt=O(null),Ot=O(!1),kt=O(``),R=O(null),z=O(null),At=O({x:0,y:0}),jt=O(`pointer`),Mt=O(!1),B=O(Bt()),V=v(()=>B.value.style.chart.circles.labels),H=v(()=>B.value.style.chart.circles),U=v(()=>B.value.style.chart);se({config:()=>B.value,dataset:()=>P.dataset,component:`VueUiCirclePack`,rules:[ce.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:W}=be({config:()=>B.value.transitions,dataset:()=>P.dataset}),Nt=v(()=>B.value.userOptions.useCursorPointer),Pt=v(()=>p({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:B.value.skeletonConfig??{}})),{loading:Ft,FINAL_DATASET:It}=ae({...Re(P),FINAL_CONFIG:B,prepareConfig:Bt,skeletonDataset:P.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:p({defaultConfig:B.value,userConfig:Pt.value})}),{svgRef:G}=Ee({config:U.value.title}),{userOptionsVisible:Lt,setUserOptionsVisibility:Rt,keepUserOptionState:zt}=Te({config:B.value});function Bt(){return ue(P.config,$e,Oe)}let Vt=u(P.config);Be(()=>P.config,(e,t)=>{let n=u(e),r=n!==Vt;Vt=n;let i=Bt();r?(B.value=i,Lt.value=!B.value.userOptions.showOnChartHover,dn(),Ct.value+=1,wt.value+=1,K.value.showTable=B.value.table.show,K.value.showTooltip=U.value.tooltip.show,K.value.showZoom=U.value.zoom?.show??!1):(B.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=B.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Ht,isImaging:Ut,generatePdf:Wt,generateImage:Gt}=ye({elementId:`vue-ui-circle-pack_${F.value}`,fileName:U.value.title.text||`vue-ui-circle-pack`,options:B.value.userOptions.print}),Kt=v(()=>B.value.userOptions.show&&!U.value.title.text),K=O({showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1});Be(B,()=>{K.value={showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1}},{immediate:!0});let q=O({h:10,w:10}),qt=O([0,0,100,100]),Jt=O({x:0,y:0,width:100,height:100}),Yt=v(()=>B.value.debug),Xt=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),Zt=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=O([]),Y=O([]),X=O(null),Z=O(null);function Qt(e,t){q.value={w:e,h:t};let n=pn.value.map($t);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],qt.value=[n.x,n.y,n.width,n.height],Jt.value={...n},kn(n);return}let r=Ue(n,t,e),[i,a,o,s]=Ve(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=on(d),Y.value=J.value;let f=Bn({x:0,y:0,width:e,height:t});qt.value=[f.x,f.y,f.width,f.height],Jt.value={...f},kn(f)}function $t(e){return{...e,children:Array.isArray(e.children)?e.children.map($t):[]}}function en(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+en(t),0):0}function tn(e,t){let n=m[B.value.theme||`default`]||o,r=fn.value.length?fn.value:n.length?n:o;return c(e.color)||r[t%r.length]||o[t%o.length]}function nn(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+nn(t),0)}function rn(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=en(e);if(!Number.isFinite(a)||a<=0)return null;let o=l(),s=[...r,i],u=s.reduce((e,t,n)=>e+t+n,0),d=e.color||t?.color?c(e.color||t?.color):tn(e,u),f=rn(e.children,{id:o,name:e.name,color:d,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:d,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:f.length>0,childCount:f.length,leafCount:f.length?nn({children:f}):1,hierarchyPath:s,children:f}}).filter(Boolean):[]}function an(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ue(e.children.map($t),t,t),[r,i,a,o]=Ve(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function on(e){let t=[];return e.forEach(e=>{let n=an(e);t.push({...e,children:n}),t.push(...on(n))}),t}function sn(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function cn(e){return e.hasChildren?V.value.parents.show:V.value.children.show}function ln(){if(!B.value.responsive||!I.value)return;let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:U.value.title.text?xt.value:null,legend:null,source:Et.value,noTitle:St.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),Qt(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=I.value.parentNode||I.value,Z.value&&X.value.observe(Z.value),e()}function un(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function dn(){ie(P.dataset)&&d({componentName:`VueUiCirclePack`,type:`dataset`,debug:Yt.value});let e=Xt.value,t=Zt.value;Qt(e,t),B.value.responsive?ln():un()}Ie(dn),Fe(()=>{un()}),Be(()=>It.value,async e=>{await dn()},{deep:!0});let fn=v(()=>re(B.value.customPalette)),pn=v(()=>rn(It.value)),mn=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function hn(e,t){return mn.value?t/mn.value*e:0}function gn(e,t){B.value.events.datapointLeave&&B.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(jt.value!==`keyboard`||R.value?.id!==e?.id)&&(Ot.value=!1,R.value=null,z.value=null,jt.value=`pointer`)}function _n(e,t){Qe(`selectDatapoint`,e),B.value.events.datapointClick&&B.value.events.datapointClick({datapoint:e,seriesIndex:t})}let vn=O(null),yn=O(!1);function bn(e,t,n=`pointer`){R.value=e,z.value=t,jt.value=n,B.value.events.datapointEnter&&B.value.events.datapointEnter({datapoint:e,seriesIndex:t}),vn.value={datapoint:e,seriesIndex:t,config:B.value,series:Y.value},Ot.value=!0;let r=U.value.tooltip.customFormat;if(yn.value=!1,i(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:B.value});typeof n==`string`&&(kt.value=n,yn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),yn.value=!1}if(!yn.value){let t=``;t+=`
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,D as r,Dt as i,Ft as a,Ht as o,Q as s,S as c,X as l,Zt as u,at as d,i as f,in as p,nn as m,nt as ee,q as h,r as g,t as te,tn as ne,w as re,zt as ie}from"./lib-rPeBMZrn.js";import{n as ae,t as oe}from"./BaseScanner-8NdoBs7B.js";import{n as se,t as ce}from"./useHints-BH9r_0Vd.js";import{t as le}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./chartImage-DPGnEuYM.js";import{n as fe}from"./Title-BliHuXfT.js";import{t as pe}from"./useChartExport-BZts4KFb.js";import{t as me}from"./tableIntegration-CNoJ1CIY.js";import{n as he,t as ge}from"./annotationSlots-BRR85CqJ.js";import{n as _e,t as ve}from"./userOptionsSlots-DYuo-E5m.js";import{t as ye}from"./usePrinter-sVoTzet1.js";import{t as be}from"./useTransitions-ChGGrtrv.js";import{c as xe}from"./canvas-lib-22VpOI4_.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./usePanZoom-BdjP5Suc.js";import{t as Oe}from"./vue_ui_circle_pack-CfXkXi7v.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as Me,nextTick as Ne,normalizeClass as T,normalizeProps as E,normalizeStyle as Pe,onBeforeUnmount as Fe,onMounted as Ie,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as Le,toDisplayString as j,toRefs as Re,unref as M,useCssVars as ze,watch as Be,withCtx as N}from"vue";function Ve(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function He(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ue(e,t,n){let r=He,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Ke(e,n,t),e;We(o,a,s=e[2]),a=new $e(a),o=new $e(o),s=new $e(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){We(a._,o._,s=e[c]),s=new $e(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(Ge(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(Ge(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Ke(e,n,t),Ye(e,n,t),e}function We(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function Ge(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Ke(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);qe(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Je(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function qe(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&Ge(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Je(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ye(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Xe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Xe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=Ze(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!P(s,t))continue;let c=Qe(s,t,n,r);c<a&&(a=c,i=o)}}return i}function Ze(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function P(e,t){for(let n of t)if(Ge(n,e))return!1;return!0}function Qe(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var $e=class{constructor(e){this._=e,this.next=null,this.previous=null}},et=/* @__PURE__ */ e({default:()=>F}),tt=[`id`],nt=[`id`],rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`x`,`y`,`width`,`height`],at={key:0},ot=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],st=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ct=[`x`,`y`,`width`,`height`,`fill`,`rx`],lt=[`transform`,`font-size`,`fill`,`font-weight`],ut=[`transform`,`font-size`,`fill`,`font-weight`],dt={key:1,style:{pointerEvents:`none`}},ft=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],pt=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],mt=[`fill`,`x`,`y`,`rx`,`width`,`height`],ht=[`transform`,`font-size`,`fill`,`font-family`],gt=[`dy`],_t={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vt={key:5,class:`vue-data-ui-watermark`},yt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},bt={style:{display:`flex`,"align-items":`center`}},F=/*#__PURE__*/ le({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:le,emit:He}){ze(e=>({v5a502830:pr.value}));let We=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ge=C(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),Ke=C(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),qe=C(()=>import(`./DataTable-0Vv-aGHD.js`)),Je=C(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),Ye=C(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),Xe=C(()=>import(`./PackageVersion-BIhjLNBU.js`).then(e=>e.t)),Ze=C(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),P=e,Qe=He,{vue_ui_circle_pack:$e}=t(),et=v(()=>!!P.dataset&&P.dataset.length),F=O(l()),I=O(null),xt=O(null),St=O(null),Ct=O(0),wt=O(0),Tt=O(0),Et=O(null),L=O(null),Dt=O(null),Ot=O(!1),kt=O(``),R=O(null),z=O(null),At=O({x:0,y:0}),jt=O(`pointer`),Mt=O(!1),B=O(Bt()),V=v(()=>B.value.style.chart.circles.labels),H=v(()=>B.value.style.chart.circles),U=v(()=>B.value.style.chart);se({config:()=>B.value,dataset:()=>P.dataset,component:`VueUiCirclePack`,rules:[ce.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:W}=be({config:()=>B.value.transitions,dataset:()=>P.dataset}),Nt=v(()=>B.value.userOptions.useCursorPointer),Pt=v(()=>p({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:B.value.skeletonConfig??{}})),{loading:Ft,FINAL_DATASET:It}=ae({...Re(P),FINAL_CONFIG:B,prepareConfig:Bt,skeletonDataset:P.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:p({defaultConfig:B.value,userConfig:Pt.value})}),{svgRef:G}=Ee({config:U.value.title}),{userOptionsVisible:Lt,setUserOptionsVisibility:Rt,keepUserOptionState:zt}=Te({config:B.value});function Bt(){return ue(P.config,$e,Oe)}let Vt=u(P.config);Be(()=>P.config,(e,t)=>{let n=u(e),r=n!==Vt;Vt=n;let i=Bt();r?(B.value=i,Lt.value=!B.value.userOptions.showOnChartHover,dn(),Ct.value+=1,wt.value+=1,K.value.showTable=B.value.table.show,K.value.showTooltip=U.value.tooltip.show,K.value.showZoom=U.value.zoom?.show??!1):(B.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=B.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Ht,isImaging:Ut,generatePdf:Wt,generateImage:Gt}=ye({elementId:`vue-ui-circle-pack_${F.value}`,fileName:U.value.title.text||`vue-ui-circle-pack`,options:B.value.userOptions.print}),Kt=v(()=>B.value.userOptions.show&&!U.value.title.text),K=O({showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1});Be(B,()=>{K.value={showTable:B.value.table.show,showTooltip:U.value.tooltip.show,showZoom:U.value.zoom?.show??!1}},{immediate:!0});let q=O({h:10,w:10}),qt=O([0,0,100,100]),Jt=O({x:0,y:0,width:100,height:100}),Yt=v(()=>B.value.debug),Xt=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),Zt=v(()=>{let e=B.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=O([]),Y=O([]),X=O(null),Z=O(null);function Qt(e,t){q.value={w:e,h:t};let n=pn.value.map($t);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],qt.value=[n.x,n.y,n.width,n.height],Jt.value={...n},kn(n);return}let r=Ue(n,t,e),[i,a,o,s]=Ve(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=on(d),Y.value=J.value;let f=Bn({x:0,y:0,width:e,height:t});qt.value=[f.x,f.y,f.width,f.height],Jt.value={...f},kn(f)}function $t(e){return{...e,children:Array.isArray(e.children)?e.children.map($t):[]}}function en(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+en(t),0):0}function tn(e,t){let n=m[B.value.theme||`default`]||o,r=fn.value.length?fn.value:n.length?n:o;return c(e.color)||r[t%r.length]||o[t%o.length]}function nn(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+nn(t),0)}function rn(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=en(e);if(!Number.isFinite(a)||a<=0)return null;let o=l(),s=[...r,i],u=s.reduce((e,t,n)=>e+t+n,0),d=e.color||t?.color?c(e.color||t?.color):tn(e,u),f=rn(e.children,{id:o,name:e.name,color:d,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:d,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:f.length>0,childCount:f.length,leafCount:f.length?nn({children:f}):1,hierarchyPath:s,children:f}}).filter(Boolean):[]}function an(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ue(e.children.map($t),t,t),[r,i,a,o]=Ve(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function on(e){let t=[];return e.forEach(e=>{let n=an(e);t.push({...e,children:n}),t.push(...on(n))}),t}function sn(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function cn(e){return e.hasChildren?V.value.parents.show:V.value.children.show}function ln(){if(!B.value.responsive||!I.value)return;let e=xe(()=>{let{width:e,height:t}=Se({chart:I.value,title:U.value.title.text?xt.value:null,legend:null,source:Et.value,noTitle:St.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),Qt(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=I.value.parentNode||I.value,Z.value&&X.value.observe(Z.value),e()}function un(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function dn(){ie(P.dataset)&&d({componentName:`VueUiCirclePack`,type:`dataset`,debug:Yt.value});let e=Xt.value,t=Zt.value;Qt(e,t),B.value.responsive?ln():un()}Ie(dn),Fe(()=>{un()}),Be(()=>It.value,async e=>{await dn()},{deep:!0});let fn=v(()=>re(B.value.customPalette)),pn=v(()=>rn(It.value)),mn=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function hn(e,t){return mn.value?t/mn.value*e:0}function gn(e,t){B.value.events.datapointLeave&&B.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(jt.value!==`keyboard`||R.value?.id!==e?.id)&&(Ot.value=!1,R.value=null,z.value=null,jt.value=`pointer`)}function _n(e,t){Qe(`selectDatapoint`,e),B.value.events.datapointClick&&B.value.events.datapointClick({datapoint:e,seriesIndex:t})}let vn=O(null),yn=O(!1);function bn(e,t,n=`pointer`){R.value=e,z.value=t,jt.value=n,B.value.events.datapointEnter&&B.value.events.datapointEnter({datapoint:e,seriesIndex:t}),vn.value={datapoint:e,seriesIndex:t,config:B.value,series:Y.value},Ot.value=!0;let r=U.value.tooltip.customFormat;if(yn.value=!1,i(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:B.value});typeof n==`string`&&(kt.value=n,yn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),yn.value=!1}if(!yn.value){let t=``;t+=`
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="${U.value.tooltip.fontSize}" width="${U.value.tooltip.fontSize}">
|
|
4
4
|
<circle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{Jt as ee,X as n,t as te}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{n as a}from"./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{Jt as ee,X as n,t as te}from"./lib-rPeBMZrn.js";import{t as r}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as i}from"./useNestedProp-DnGoh-XS.js";import{n as a}from"./PackageVersion-BIhjLNBU.js";import{Teleport as o,computed as s,createBlock as ne,createCommentVNode as c,createElementBlock as l,createElementVNode as u,createVNode as d,nextTick as f,normalizeClass as p,normalizeStyle as m,onBeforeUnmount as h,onMounted as g,openBlock as _,ref as v,toDisplayString as y,unref as b}from"vue";var x=/* @__PURE__ */ e({default:()=>R}),re=[`xmlns`,`height`,`width`],ie={id:`follower`,fy:`30%`,fx:`30%`},ae=[`stop-color`,`stop-opacity`],oe=[`r`,`fill`,`stroke`,`stroke-width`,`stroke-dasharray`],se=[`r`],S={key:2,class:`wave`},C=[`id`],w=[`id`],T=[`filter`,`stroke`],E={key:3,class:`crosshair`},D=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],O=[`x1`,`stroke`,`stroke-width`,`stroke-dasharray`],k=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],A=[`y1`,`stroke`,`stroke-width`,`stroke-dasharray`],j=[`cy`,`r`,`fill`],M=[`cy`,`r`,`fill`],N=[`cx`,`r`,`fill`],P=[`cx`,`r`,`fill`],F={key:5,class:`coordinates`},I=[`x`,`y`,`font-size`,`fill`],L=[`transform`],ce=[`font-size`,`fill`],R=/*#__PURE__*/ r({__name:`vue-ui-cursor`,props:{config:{type:Object,default:{}}},setup(e){let{vue_ui_cursor:r}=t(),x=e,R=v(n()),z=s(()=>i({userConfig:x.config,defaultConfig:r})),B=v({x:-100,y:-100}),V=s(()=>Math.round(z.value.centerCircleRadius)),H=s(()=>Math.round(z.value.coordinatesOffset));function U({clientX:e,clientY:t,...ee}){B.value.x=e-V.value,B.value.y=t-V.value}function W(e){B.value.x=e.targetTouches[0].clientX-V.value,B.value.y=e.targetTouches[0].clientY-V.value}let G=v(!0);function K(e){G.value=e}let q=v(!1),J=v(null);function Y(){q.value=!1,J.value&&clearTimeout(J.value),f(()=>{q.value=!0,J.value=setTimeout(()=>{q.value=!1},1e3)})}let X=v(null),Z=v(null);function Q(){return z.value.parentId?document.getElementById(z.value.parentId):document.getElementsByTagName(`div`)[0]||null}function $(e){e&&(e.addEventListener(`mousemove`,U),e.addEventListener(`touchmove`,W),e.addEventListener(`mouseleave`,()=>K(!1)),e.addEventListener(`mouseenter`,()=>K(!0)),e.addEventListener(`click`,Y))}function le(e){e&&(e.removeEventListener(`mousemove`,U),e.removeEventListener(`touchmove`,W),e.removeEventListener(`mouseleave`,()=>K(!1)),e.removeEventListener(`mouseenter`,()=>K(!0)),e.removeEventListener(`click`,Y))}return g(()=>{let e=Q();if(e){X.value=e,$(e);return}if(!z.value.parentId)return;let t=new MutationObserver(()=>{let e=Q();e&&(X.value=e,$(e),t.disconnect(),Z.value=null)});t.observe(document.body,{childList:!0,subtree:!0}),Z.value=t}),h(()=>{Z.value&&=(Z.value.disconnect(),null),X.value&&=(le(X.value),null)}),(e,t)=>(_(),ne(o,{to:`body`},[G.value?(_(),l(`svg`,{key:0,"data-dom-to-png-ignore":``,xmlns:b(te),style:m(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${B.value.y}px; left:${B.value.x}px;`),viewBox:`0 0 100 100`,height:V.value*2,width:V.value*2},[d(a),u(`defs`,null,[u(`radialGradient`,ie,[u(`stop`,{offset:`10%`,"stop-color":z.value.bubbleEffectColor,"stop-opacity":z.value.bubbleEffectOpacity},null,8,ae),t[0]||=u(`stop`,{offset:`95%`,"stop-color":`transparent`},null,-1)])]),z.value.showCenterCircle?(_(),l(`circle`,{key:0,cx:50,cy:50,r:V.value,fill:b(ee)(z.value.centerCircleColor,z.value.centerCircleOpacity*100),stroke:z.value.centerCircleStroke,"stroke-width":z.value.centerCircleStrokeWidth,"stroke-dasharray":z.value.centerCircleDasharray},null,8,oe)):c(``,!0),z.value.bubbleEffect?(_(),l(`circle`,{key:1,cx:50,cy:50,r:V.value,fill:`url(#follower)`,stroke:`none`},null,8,se)):c(``,!0),z.value.useWaveOnClick?(_(),l(`g`,S,[u(`defs`,null,[u(`filter`,{id:`blur_${R.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[u(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:4,id:`blur_std_${R.value}`},null,8,w),t[1]||=u(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,C)]),q.value?(_(),l(`circle`,{key:0,class:p({"circle-wave":q.value}),cx:50,cy:50,r:50,filter:`url(#blur_${R.value})`,stroke:z.value.centerCircleStroke,fill:`none`,"stroke-width":`3`},null,10,T)):c(``,!0)])):c(``,!0),z.value.showCrosshair?(_(),l(`g`,E,[u(`line`,{x1:-V.value+50,x2:-5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,D),u(`line`,{x1:50+V.value,x2:5e3,y1:50,y2:50,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,O),u(`line`,{x1:50,x2:50,y1:-V.value+50,y2:-5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,k),u(`line`,{x1:50,x2:50,y1:V.value+50,y2:5e3,stroke:z.value.crosshairStroke,"stroke-width":z.value.crosshairStrokeWidth,"stroke-dasharray":z.value.crosshairDasharray,"stroke-linecap":`round`},null,8,A)])):c(``,!0),z.value.showIntersectCircles?(_(),l(`g`,{key:4,class:p({"rotating-circles":z.value.isLoading})},[u(`circle`,{cx:50,cy:V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,j),u(`circle`,{cx:50,cy:-V.value+50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,M),u(`circle`,{cx:-V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,N),u(`circle`,{cx:V.value+50,cy:50,r:z.value.intersectCirclesRadius,fill:z.value.intersectCirclesFill},null,8,P)],2)):c(``,!0),z.value.showCoordinates?(_(),l(`g`,F,[u(`text`,{"text-anchor":`end`,x:-V.value+50-z.value.coordinatesFontSize/2+H.value,y:50-z.value.coordinatesFontSize/2+H.value,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},"font-family":`Arial`},y(B.value.x.toFixed(0)),9,I),u(`g`,{transform:`translate(${50-z.value.coordinatesFontSize/2+H.value}, ${-V.value+50-z.value.coordinatesFontSize/2+H.value})`},[u(`text`,{"text-anchor":`start`,"font-size":z.value.coordinatesFontSize,fill:z.value.coordinatesColor,style:{"font-variant-numeric":`tabular-nums`},transform:`rotate(-90)`,"font-family":`Arial`},y(B.value.y.toFixed(0)),9,ce)],8,L)])):c(``,!0)],12,re)):c(``,!0)]))}},[[`__scopeId`,`data-v-4b1f566e`]]);export{x as n,R as t};
|