vue-data-ui 2.3.22 → 2.3.24

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.
Files changed (142) hide show
  1. package/dist/{Arrow-DxXzMXB1.js → Arrow-BzYehwRw.js} +1 -1
  2. package/dist/{Arrow-BOSHa3Ag.cjs → Arrow-DfxwtZYG.cjs} +1 -1
  3. package/dist/{BaseIcon-C-k_mqXL.cjs → BaseIcon-eEUOqFAE.cjs} +1 -1
  4. package/dist/{BaseIcon-DuMfKUDs.js → BaseIcon-y4nt-SIh.js} +1 -1
  5. package/dist/{DataTable-CHXdpx94.cjs → DataTable-Ckvkqg78.cjs} +1 -1
  6. package/dist/{DataTable-DKHF_NH2.js → DataTable-DVpbqbwp.js} +2 -2
  7. package/dist/{Legend-BqqpwXbu.js → Legend-Crc6SgWK.js} +1 -1
  8. package/dist/{Legend-BwrzHxLy.cjs → Legend-DA1uCuos.cjs} +1 -1
  9. package/dist/{Shape-DW18-C9f.cjs → Shape-DaECX0MP.cjs} +1 -1
  10. package/dist/{Shape-Ccky9omb.js → Shape-_K1DD00e.js} +1 -1
  11. package/dist/{Slicer-BDsv196Y.js → Slicer-BL7ysGrk.js} +1 -1
  12. package/dist/{Slicer-xKlzke1v.cjs → Slicer-BeTiFzmi.cjs} +1 -1
  13. package/dist/{Title-Bx2ibobQ.js → Title-CMEhX9eJ.js} +1 -1
  14. package/dist/{Title-DxNugmhI.cjs → Title-D9E4eBNp.cjs} +1 -1
  15. package/dist/{Tooltip-DOEMrisX.js → Tooltip-B2XPbRE_.js} +1 -1
  16. package/dist/{Tooltip-BC2Wlz7P.cjs → Tooltip-C6EZFw-G.cjs} +1 -1
  17. package/dist/{index-BvjCO-wv.js → index-BbBCE1pM.js} +1 -1
  18. package/dist/{index-oufiZvaS.cjs → index-BcLWKvbg.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +1 -1
  21. package/dist/types/vue-data-ui.d.ts +1 -1
  22. package/dist/{useNestedProp-CmTItGss.cjs → useNestedProp-BcuQPNiW.cjs} +1 -1
  23. package/dist/{useNestedProp-2KJaYPfM.js → useNestedProp-QJwLGaK5.js} +1 -1
  24. package/dist/{usePrinter-Cc8ufBvU.cjs → usePrinter-BWCvrSz2.cjs} +1 -1
  25. package/dist/{usePrinter-CaKXrCiB.js → usePrinter-CnT0_Cbi.js} +1 -1
  26. package/dist/{vue-data-ui-DnlOZVL-.js → vue-data-ui-DfTF5XN4.js} +56 -56
  27. package/dist/{vue-data-ui-D5LrE3dP.cjs → vue-data-ui-JnBZ4O4G.cjs} +1 -1
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-Cma1NB-u.cjs → vue-ui-3d-bar-Cmj5FUss.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-qegO2SzJ.js → vue-ui-3d-bar-qtJF55BB.js} +7 -7
  32. package/dist/{vue-ui-accordion-DiR0dVog.cjs → vue-ui-accordion-BOEIWXgn.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-q-bLDiD3.js → vue-ui-accordion-CM8Lp-MV.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-vQvy7rWY.js → vue-ui-age-pyramid-CVELozuZ.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-xk6Gt1LJ.cjs → vue-ui-age-pyramid-ZTUAsVJ3.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-LwO1PGoN.cjs → vue-ui-annotator-BN1e8QBk.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-BYT8v1SY.js → vue-ui-annotator-Cfl6lVxC.js} +1 -1
  38. package/dist/{vue-ui-candlestick-zvv6_kwp.js → vue-ui-candlestick-BhfanGOK.js} +9 -9
  39. package/dist/{vue-ui-candlestick-CmM0kwJR.cjs → vue-ui-candlestick-g0uWwqCg.cjs} +1 -1
  40. package/dist/vue-ui-carousel-table-CXmHksHV.js +346 -0
  41. package/dist/vue-ui-carousel-table-Ccc8TeFs.cjs +1 -0
  42. package/dist/{vue-ui-chestnut-A9asY_42.js → vue-ui-chestnut-Bw6l763j.js} +6 -6
  43. package/dist/{vue-ui-chestnut-4MvRD28_.cjs → vue-ui-chestnut-DHa1RSdI.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-DusWgM7W.cjs → vue-ui-cursor-BGv7dDr-.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-CPPPIH2W.js → vue-ui-cursor-BK77V_9W.js} +2 -2
  46. package/dist/{vue-ui-dashboard-CuQ81BKN.js → vue-ui-dashboard-CshdP-o6.js} +2 -2
  47. package/dist/{vue-ui-dashboard-ZTzEd521.cjs → vue-ui-dashboard-fqSrgnC8.cjs} +1 -1
  48. package/dist/{vue-ui-digits-DlupvOo-.cjs → vue-ui-digits-BFiCPsVU.cjs} +1 -1
  49. package/dist/{vue-ui-digits-Czkbi2AR.js → vue-ui-digits-tFHIZZ9N.js} +2 -2
  50. package/dist/{vue-ui-donut-DA5YfWlL.cjs → vue-ui-donut-BOq5T2_k.cjs} +1 -1
  51. package/dist/{vue-ui-donut-Cis7kzDB.js → vue-ui-donut-DwCC5FLx.js} +9 -9
  52. package/dist/{vue-ui-donut-evolution-BigmUCTm.cjs → vue-ui-donut-evolution-Bg70zsf9.cjs} +1 -1
  53. package/dist/{vue-ui-donut-evolution-D2I4ZD5a.js → vue-ui-donut-evolution-CysSbRMg.js} +9 -9
  54. package/dist/{vue-ui-dumbbell-D8ZSCX0H.cjs → vue-ui-dumbbell-DIbbkhZs.cjs} +1 -1
  55. package/dist/{vue-ui-dumbbell-fdV94xQB.js → vue-ui-dumbbell-Df9_opHf.js} +8 -8
  56. package/dist/{vue-ui-flow-CH6PmIBT.cjs → vue-ui-flow-BYvtiYei.cjs} +1 -1
  57. package/dist/{vue-ui-flow-C1PVwgKX.js → vue-ui-flow-DtZGgvJy.js} +7 -7
  58. package/dist/{vue-ui-galaxy-IFmqHh3R.cjs → vue-ui-galaxy-B2fbFVWs.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-DzWOfvyj.js → vue-ui-galaxy-DqiIk9DH.js} +9 -9
  60. package/dist/{vue-ui-gauge-Bbda2H3b.cjs → vue-ui-gauge-Ce80Waly.cjs} +1 -1
  61. package/dist/{vue-ui-gauge-CeGa1oMf.js → vue-ui-gauge-CkWosWjO.js} +5 -5
  62. package/dist/{vue-ui-gizmo-DyJngE0E.cjs → vue-ui-gizmo-Clsm9g4j.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-BILyJylm.js → vue-ui-gizmo-Cz_vLQob.js} +2 -2
  64. package/dist/{vue-ui-heatmap-Dp68UbGB.cjs → vue-ui-heatmap-C5C46dEp.cjs} +1 -1
  65. package/dist/{vue-ui-heatmap-DRk0VXaJ.js → vue-ui-heatmap-DPIUcnuz.js} +8 -8
  66. package/dist/{vue-ui-kpi-Mbre-_3M.cjs → vue-ui-kpi-D1ViyJSz.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-u5GBFKBR.js → vue-ui-kpi-DUDYmxGM.js} +2 -2
  68. package/dist/{vue-ui-mini-loader-DLXv9Seq.js → vue-ui-mini-loader-WhdcL_Ka.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-CXiMb5pi.cjs → vue-ui-mini-loader-ggvINlYv.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-JlPbVJ8I.js → vue-ui-molecule-DJvkH7pt.js} +9 -9
  71. package/dist/{vue-ui-molecule-DOwGWqSR.cjs → vue-ui-molecule-fzhl4bdu.cjs} +1 -1
  72. package/dist/{vue-ui-mood-radar-C3Boyr96.js → vue-ui-mood-radar-D_5uqQQu.js} +9 -9
  73. package/dist/{vue-ui-mood-radar-BF3WqcyN.cjs → vue-ui-mood-radar-Dtk9oVC5.cjs} +1 -1
  74. package/dist/{vue-ui-nested-donuts-DkGXmwTg.cjs → vue-ui-nested-donuts-Ds13H5z7.cjs} +1 -1
  75. package/dist/{vue-ui-nested-donuts-C9CFBzvj.js → vue-ui-nested-donuts-XAlzU4h6.js} +9 -9
  76. package/dist/{vue-ui-onion-COYhqrEx.cjs → vue-ui-onion-DbkWcknp.cjs} +1 -1
  77. package/dist/{vue-ui-onion-BqzUINBq.js → vue-ui-onion-Dkg0bF7v.js} +9 -9
  78. package/dist/{vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs → vue-ui-parallel-coordinate-plot-GFBhsvzT.cjs} +1 -1
  79. package/dist/{vue-ui-parallel-coordinate-plot-DtXx6zpM.js → vue-ui-parallel-coordinate-plot-VSLNUybk.js} +10 -10
  80. package/dist/{vue-ui-quadrant-g34Ky2Hq.cjs → vue-ui-quadrant-ByC7oL_6.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-Cr2jm-2w.js → vue-ui-quadrant-Dd6rn_Pi.js} +10 -10
  82. package/dist/{vue-ui-quick-chart-gurflOrc.js → vue-ui-quick-chart-Bu6exyaS.js} +6 -6
  83. package/dist/{vue-ui-quick-chart-BEXF1YLk.cjs → vue-ui-quick-chart-Dc71ePSN.cjs} +1 -1
  84. package/dist/{vue-ui-radar-DGXj7kOe.js → vue-ui-radar-CxJWvM3Y.js} +10 -10
  85. package/dist/{vue-ui-radar-B77sXFJD.cjs → vue-ui-radar-D8CnwaFE.cjs} +1 -1
  86. package/dist/{vue-ui-rating-J4wpjGDw.cjs → vue-ui-rating-CESNVfXP.cjs} +1 -1
  87. package/dist/{vue-ui-rating-D2wmEDux.js → vue-ui-rating-DS1AG6Jp.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-8hDVUqzX.js → vue-ui-relation-circle-CDCF4oQw.js} +5 -5
  89. package/dist/{vue-ui-relation-circle-CkO4PvuL.cjs → vue-ui-relation-circle-DVhnxuiU.cjs} +1 -1
  90. package/dist/{vue-ui-rings-Bt4lsykR.cjs → vue-ui-rings-BfUQSnuu.cjs} +1 -1
  91. package/dist/{vue-ui-rings-Bs4I_DFj.js → vue-ui-rings-DluO88_f.js} +9 -9
  92. package/dist/{vue-ui-scatter-pnVV0nUg.cjs → vue-ui-scatter-CI0FcEEN.cjs} +1 -1
  93. package/dist/{vue-ui-scatter-BcuxFe_0.js → vue-ui-scatter-DWutde89.js} +10 -10
  94. package/dist/{vue-ui-screenshot-Q4jzniKW.cjs → vue-ui-screenshot-B3nuvgoB.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-CkunIVDh.js → vue-ui-screenshot-QZKcfcQz.js} +1 -1
  96. package/dist/{vue-ui-skeleton-Fsru0dbb.cjs → vue-ui-skeleton-BG428rdQ.cjs} +1 -1
  97. package/dist/{vue-ui-skeleton-jYHncdu5.js → vue-ui-skeleton-BYBsAUyH.js} +2 -2
  98. package/dist/{vue-ui-smiley-B3gIeKih.js → vue-ui-smiley-DlM_vi6f.js} +2 -2
  99. package/dist/{vue-ui-smiley-Bd3lgUj_.cjs → vue-ui-smiley-rIdwAdX9.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DfD8Q9Zl.cjs → vue-ui-spark-trend-vKIobiEO.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-CgEi2LBP.js → vue-ui-spark-trend-z0SJASPo.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-Bu_TX-tQ.js → vue-ui-sparkbar-8UFAzq_D.js} +3 -3
  103. package/dist/{vue-ui-sparkbar-BCmLvKvU.cjs → vue-ui-sparkbar-nRQoMePg.cjs} +1 -1
  104. package/dist/{vue-ui-sparkgauge-Cml4o6Bs.js → vue-ui-sparkgauge-Dek8oWQO.js} +3 -3
  105. package/dist/{vue-ui-sparkgauge-C_DSQGId.cjs → vue-ui-sparkgauge-JqAOrMu8.cjs} +1 -1
  106. package/dist/{vue-ui-sparkhistogram-BsyOeGbq.js → vue-ui-sparkhistogram-T-HHiCJz.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-BZDofxtq.cjs → vue-ui-sparkhistogram-hffqVDLl.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-DOsWIDug.js → vue-ui-sparkline-5f5eFY-F.js} +3 -3
  109. package/dist/{vue-ui-sparkline-twqIgYC3.cjs → vue-ui-sparkline-CJpMZzGq.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-DTgoeXjb.cjs → vue-ui-sparkstackbar-B__Fucjz.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-DeWgfL12.js → vue-ui-sparkstackbar-OLeLCAfa.js} +3 -3
  112. package/dist/{vue-ui-strip-plot-BV27VHWB.cjs → vue-ui-strip-plot-DaIXrnMv.cjs} +1 -1
  113. package/dist/{vue-ui-strip-plot-Ci-hICkJ.js → vue-ui-strip-plot-ozTKwGJu.js} +9 -9
  114. package/dist/{vue-ui-table-R_KFQoq4.js → vue-ui-table-CSd6SuV6.js} +1 -1
  115. package/dist/{vue-ui-table-Bd9ddVGy.cjs → vue-ui-table-DEjTd9bz.cjs} +1 -1
  116. package/dist/{vue-ui-table-heatmap-TYLCpM_Y.js → vue-ui-table-heatmap-BCwbIRjJ.js} +4 -4
  117. package/dist/{vue-ui-table-heatmap-CPOETxT8.cjs → vue-ui-table-heatmap-Ch3DNTwB.cjs} +1 -1
  118. package/dist/{vue-ui-table-sparkline-H_qcrFc0.cjs → vue-ui-table-sparkline-BamEvqqU.cjs} +1 -1
  119. package/dist/{vue-ui-table-sparkline-B-qJP3Yr.js → vue-ui-table-sparkline-pqkWVgDE.js} +5 -5
  120. package/dist/{vue-ui-thermometer-fV6P7B8U.js → vue-ui-thermometer-BNKjEKa5.js} +5 -5
  121. package/dist/{vue-ui-thermometer-CBybvctJ.cjs → vue-ui-thermometer-j0imZL11.cjs} +1 -1
  122. package/dist/{vue-ui-timer-CU-tJV53.js → vue-ui-timer-UN1HRKqX.js} +4 -4
  123. package/dist/{vue-ui-timer-CwQteT9E.cjs → vue-ui-timer-y8-BpbDO.cjs} +1 -1
  124. package/dist/{vue-ui-tiremarks-Dxy0W8kp.js → vue-ui-tiremarks-BgPY-Xdg.js} +5 -5
  125. package/dist/{vue-ui-tiremarks-Ba1Er97s.cjs → vue-ui-tiremarks-Br8VFETW.cjs} +1 -1
  126. package/dist/{vue-ui-treemap-CFqf6BUd.js → vue-ui-treemap-DarcNBcD.js} +9 -9
  127. package/dist/{vue-ui-treemap-CpPqA91r.cjs → vue-ui-treemap-eOm05Tfs.cjs} +1 -1
  128. package/dist/{vue-ui-vertical-bar-Px2OPOQp.cjs → vue-ui-vertical-bar-BcM0OUyM.cjs} +1 -1
  129. package/dist/{vue-ui-vertical-bar-CpIgWUoF.js → vue-ui-vertical-bar-eHmn-md4.js} +9 -9
  130. package/dist/{vue-ui-waffle-DbR7pPaP.js → vue-ui-waffle-DWLU2K8D.js} +9 -9
  131. package/dist/{vue-ui-waffle-BEOhRYhC.cjs → vue-ui-waffle-rTt5NUn9.cjs} +1 -1
  132. package/dist/{vue-ui-wheel-BkbAV9mu.js → vue-ui-wheel-DDLbFhWQ.js} +5 -5
  133. package/dist/{vue-ui-wheel-C4H-fBbx.cjs → vue-ui-wheel-hSoxrrRg.cjs} +1 -1
  134. package/dist/{vue-ui-word-cloud-704bFMO3.js → vue-ui-word-cloud-Cxbw7xOK.js} +6 -6
  135. package/dist/{vue-ui-word-cloud-B8vX27Pz.cjs → vue-ui-word-cloud-FbXg9B5l.cjs} +1 -1
  136. package/dist/{vue-ui-xy-kFskWWiT.js → vue-ui-xy-B5D5L9TB.js} +12 -12
  137. package/dist/{vue-ui-xy-B8qzx04X.cjs → vue-ui-xy-BZrKDy2O.cjs} +1 -1
  138. package/dist/{vue-ui-xy-canvas-CJO0hp3z.js → vue-ui-xy-canvas-BZ3uoI37.js} +10 -10
  139. package/dist/{vue-ui-xy-canvas-BVhRHPYN.cjs → vue-ui-xy-canvas-BmaDU5gm.cjs} +1 -1
  140. package/package.json +1 -1
  141. package/dist/vue-ui-carousel-table-FMfXIF7s.cjs +0 -1
  142. package/dist/vue-ui-carousel-table-S3daEHYR.js +0 -330
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-oufiZvaS.cjs"),me=require("./Title-DxNugmhI.cjs"),le=require("./usePrinter-Cc8ufBvU.cjs"),ge=require("./DataTable-CHXdpx94.cjs"),fe=require("./Legend-BwrzHxLy.cjs"),ke=require("./vue-ui-skeleton-Fsru0dbb.cjs"),pe=require("./Slicer-xKlzke1v.cjs"),be=require("./vue-ui-accordion-DiR0dVog.cjs"),oe=require("./useNestedProp-CmTItGss.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:v.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(B.value.subtotal)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[B.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(B.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>F.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BcLWKvbg.cjs"),me=require("./Title-D9E4eBNp.cjs"),le=require("./usePrinter-BWCvrSz2.cjs"),ge=require("./DataTable-Ckvkqg78.cjs"),fe=require("./Legend-DA1uCuos.cjs"),ke=require("./vue-ui-skeleton-BG428rdQ.cjs"),pe=require("./Slicer-BeTiFzmi.cjs"),be=require("./vue-ui-accordion-BOEIWXgn.cjs"),oe=require("./useNestedProp-BcuQPNiW.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:v.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(B.value.subtotal)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[B.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(B.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=l=>F.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
@@ -1,13 +1,13 @@
1
1
  import { computed as x, ref as $, onMounted as Re, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as j, createVNode as Ce, createCommentVNode as v, createBlock as R, unref as y, createSlots as Ue, withCtx as P, renderSlot as T, normalizeProps as le, guardReactiveProps as ae, createElementVNode as c, Fragment as m, renderList as p, toDisplayString as g, withKeys as Xe, createTextVNode as we, nextTick as Ge } from "vue";
2
- import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-BvjCO-wv.js";
3
- import { _ as lt } from "./Title-Bx2ibobQ.js";
4
- import { u as at, U as ut } from "./usePrinter-CaKXrCiB.js";
5
- import { D as ot } from "./DataTable-DKHF_NH2.js";
6
- import { L as st } from "./Legend-BqqpwXbu.js";
7
- import nt from "./vue-ui-skeleton-jYHncdu5.js";
8
- import { S as rt } from "./Slicer-BDsv196Y.js";
9
- import it from "./vue-ui-accordion-q-bLDiD3.js";
10
- import { u as ze } from "./useNestedProp-2KJaYPfM.js";
2
+ import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-BbBCE1pM.js";
3
+ import { _ as lt } from "./Title-CMEhX9eJ.js";
4
+ import { u as at, U as ut } from "./usePrinter-CnT0_Cbi.js";
5
+ import { D as ot } from "./DataTable-DVpbqbwp.js";
6
+ import { L as st } from "./Legend-Crc6SgWK.js";
7
+ import nt from "./vue-ui-skeleton-BYBsAUyH.js";
8
+ import { S as rt } from "./Slicer-BL7ysGrk.js";
9
+ import it from "./vue-ui-accordion-CM8Lp-MV.js";
10
+ import { u as ze } from "./useNestedProp-QJwLGaK5.js";
11
11
  import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const vt = ["id"], dt = ["xmlns", "viewBox"], ht = ["id"], yt = ["stop-color"], gt = ["stop-color"], ft = ["id"], bt = ["stop-color"], xt = ["stop-color"], mt = ["stop-color"], pt = { key: 0 }, kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ct = { key: 0 }, wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "font-size", "fill", "font-weight"], St = ["text-anchor", "font-size", "fill", "transform"], Nt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 1 }, zt = ["cx", "cy", "r", "fill"], Ft = { key: 0 }, Pt = { key: 0 }, Dt = ["d", "stroke"], Tt = ["text-anchor", "x", "y", "fill"], Et = ["cx", "cy", "r", "fill"], It = { key: 0 }, Ot = ["cx", "cy", "fill"], Vt = { key: 1 }, Ht = ["d", "fill", "stroke"], Mt = { key: 2 }, Wt = ["d", "fill", "stroke"], Rt = ["x", "y", "font-size", "fill"], Ut = ["x", "y", "width", "fill", "onClick"], Xt = ["x", "y", "width", "height", "onMouseenter", "onClick"], Gt = {
13
13
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-oufiZvaS.cjs"),M=require("./useResponsive-B3TrDDIG.cjs"),Z=require("./Title-DxNugmhI.cjs"),G=require("./usePrinter-Cc8ufBvU.cjs"),J=require("./DataTable-CHXdpx94.cjs"),K=require("./vue-ui-skeleton-Fsru0dbb.cjs"),Q=require("./Legend-BwrzHxLy.cjs"),ee=require("./vue-ui-accordion-DiR0dVog.cjs"),I=require("./useNestedProp-CmTItGss.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],oe={key:0},re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se={key:1},ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce={key:2},ie=["x","y","font-size","fill","font-weight"],de=["x","y","font-size","fill"],ve={key:3},he=["x","y","font-size","fill","font-weight"],ye=["id"],me=["stop-color"],be=["stop-color"],fe=["stop-color"],ge=["id"],pe=["stop-color"],ke=["stop-color"],xe=["stop-color"],_e=["id"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le={key:0},$e=["d","fill"],Ve={key:1},Se=["x","y","height","width","fill"],ze=["cx","cy","r","fill","stroke","stroke-width"],Xe=["cx","cy","r","fill","stroke","stroke-width"],Ae={key:2},Pe=["x","y","fill","font-size"],Te={key:3},Fe=["x","y","fill","font-size"],De={key:3,class:"vue-data-ui-watermark"},Me=["xmlns","height","width"],Ge=["fill"],Ie=["innerHTML"],Oe={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(O,{expose:H,emit:qe}){const y=O,{vue_ui_dumbbell:q}=s.useConfig(),f=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),i=e.ref(s.createUid()),L=e.ref(0),p=e.ref(null),$=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=I.useNestedProp({userConfig:y.config,defaultConfig:q});return a.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}),k=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=M.throttle(()=>{const{width:n,height:l}=M.useResponsive({chart:p.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});_.value=n,d.value=l/y.dataset.length,v.value=C()});k.value=new ResizeObserver(a),k.value.observe(p.value.parentNode)}}),e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const{isPrinting:S,isImaging:z,generatePdf:X,generateImage:A}=G.usePrinter({elementId:`dumbbell_${i.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),d=e.ref(t.value.style.chart.rowHeight),_=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=d.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+_.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=u.value.ticks.length*(_.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:_.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,c=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:c,y:o.value.top+n*d.value+d.value/2,endVal:a.start}})}const v=e.ref([]),P=e.ref(null),R=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=R.value?(cancelAnimationFrame(P.value),v.value=C()):(v.value=v.value.map((r,c)=>{r.endVal+=l[c]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+c*d.value+d.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,c)=>r+c,0),P.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()});const T=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${i.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${i.value})`:t.value.style.chart.plots.endColor}]),W=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=b.value.head.map((c,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),Y=s.dataLabel({v:100*(b.value.body[h].end/b.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:c.name},B,E,Y]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function F(){e.nextTick(()=>{const a=b.value.head.map((r,c)=>[[r.name],[b.value.body[c].start],[b.value.body[c].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const g=e.ref(!1);function U(a){g.value=a,L.value+=1}function j(){return v.value}function D(){x.value.showTable=!x.value.showTable}return H({getData:j,generatePdf:X,generateCsv:F,generateImage:A,toggleTable:D}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${i.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(z),uid:i.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,onToggleFullscreen:U,onGeneratePdf:e.unref(X),onGenerateCsv:F,onGenerateImage:e.unref(A),onToggleTable:D},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(u.value.ticks.length-1),x2:o.value.left+r*o.value.width/(u.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*d.value,y2:o.value.top+r*d.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ne))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ue)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+(t.value.style.chart.labels.yAxisLabels.showProgression?d.value/3:d.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,ie))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+d.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,de))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(u.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding})),9,he))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,me),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,fe)],8,ye),e.createElementVNode("radialGradient",{id:`end_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,xe)],8,ge)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,we)],8,_e),e.createElementVNode("linearGradient",{id:`grad_negative_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ee)],8,Be)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BcLWKvbg.cjs"),M=require("./useResponsive-B3TrDDIG.cjs"),Z=require("./Title-D9E4eBNp.cjs"),G=require("./usePrinter-BWCvrSz2.cjs"),J=require("./DataTable-Ckvkqg78.cjs"),K=require("./vue-ui-skeleton-BG428rdQ.cjs"),Q=require("./Legend-DA1uCuos.cjs"),ee=require("./vue-ui-accordion-BOEIWXgn.cjs"),I=require("./useNestedProp-BcuQPNiW.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],oe={key:0},re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se={key:1},ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce={key:2},ie=["x","y","font-size","fill","font-weight"],de=["x","y","font-size","fill"],ve={key:3},he=["x","y","font-size","fill","font-weight"],ye=["id"],me=["stop-color"],be=["stop-color"],fe=["stop-color"],ge=["id"],pe=["stop-color"],ke=["stop-color"],xe=["stop-color"],_e=["id"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le={key:0},$e=["d","fill"],Ve={key:1},Se=["x","y","height","width","fill"],ze=["cx","cy","r","fill","stroke","stroke-width"],Xe=["cx","cy","r","fill","stroke","stroke-width"],Ae={key:2},Pe=["x","y","fill","font-size"],Te={key:3},Fe=["x","y","fill","font-size"],De={key:3,class:"vue-data-ui-watermark"},Me=["xmlns","height","width"],Ge=["fill"],Ie=["innerHTML"],Oe={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(O,{expose:H,emit:qe}){const y=O,{vue_ui_dumbbell:q}=s.useConfig(),f=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),i=e.ref(s.createUid()),L=e.ref(0),p=e.ref(null),$=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=I.useNestedProp({userConfig:y.config,defaultConfig:q});return a.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}),k=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=M.throttle(()=>{const{width:n,height:l}=M.useResponsive({chart:p.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});_.value=n,d.value=l/y.dataset.length,v.value=C()});k.value=new ResizeObserver(a),k.value.observe(p.value.parentNode)}}),e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const{isPrinting:S,isImaging:z,generatePdf:X,generateImage:A}=G.usePrinter({elementId:`dumbbell_${i.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),d=e.ref(t.value.style.chart.rowHeight),_=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=d.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+_.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=u.value.ticks.length*(_.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:_.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,c=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:c,y:o.value.top+n*d.value+d.value/2,endVal:a.start}})}const v=e.ref([]),P=e.ref(null),R=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=R.value?(cancelAnimationFrame(P.value),v.value=C()):(v.value=v.value.map((r,c)=>{r.endVal+=l[c]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+c*d.value+d.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,c)=>r+c,0),P.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()});const T=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${i.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${i.value})`:t.value.style.chart.plots.endColor}]),W=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=b.value.head.map((c,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),Y=s.dataLabel({v:100*(b.value.body[h].end/b.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:c.name},B,E,Y]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function F(){e.nextTick(()=>{const a=b.value.head.map((r,c)=>[[r.name],[b.value.body[c].start],[b.value.body[c].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const g=e.ref(!1);function U(a){g.value=a,L.value+=1}function j(){return v.value}function D(){x.value.showTable=!x.value.showTable}return H({getData:j,generatePdf:X,generateCsv:F,generateImage:A,toggleTable:D}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${i.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(z),uid:i.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,onToggleFullscreen:U,onGeneratePdf:e.unref(X),onGenerateCsv:F,onGenerateImage:e.unref(A),onToggleTable:D},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(u.value.ticks.length-1),x2:o.value.left+r*o.value.width/(u.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*d.value,y2:o.value.top+r*d.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ne))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ue)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+(t.value.style.chart.labels.yAxisLabels.showProgression?d.value/3:d.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,ie))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+d.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,de))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(u.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding})),9,he))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,me),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,fe)],8,ye),e.createElementVNode("radialGradient",{id:`end_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,xe)],8,ge)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,we)],8,_e),e.createElementVNode("linearGradient",{id:`grad_negative_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ee)],8,Be)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("path",{d:`M
2
2
  ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
3
  C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
4
  ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
@@ -1,13 +1,13 @@
1
1
  import { computed as m, ref as g, onMounted as K, onBeforeUnmount as me, openBlock as o, createElementBlock as r, normalizeClass as Q, normalizeStyle as F, createVNode as ee, createCommentVNode as b, createBlock as I, unref as d, createSlots as pe, withCtx as _, renderSlot as C, normalizeProps as te, guardReactiveProps as le, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ae, nextTick as _e } from "vue";
2
- import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-BvjCO-wv.js";
2
+ import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-BbBCE1pM.js";
3
3
  import { t as Xe, u as Ae } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Se } from "./Title-Bx2ibobQ.js";
5
- import { u as Ne, U as Te } from "./usePrinter-CaKXrCiB.js";
6
- import { D as Pe } from "./DataTable-DKHF_NH2.js";
7
- import Ge from "./vue-ui-skeleton-jYHncdu5.js";
8
- import { L as Me } from "./Legend-BqqpwXbu.js";
9
- import De from "./vue-ui-accordion-q-bLDiD3.js";
10
- import { u as ie } from "./useNestedProp-2KJaYPfM.js";
4
+ import { _ as Se } from "./Title-CMEhX9eJ.js";
5
+ import { u as Ne, U as Te } from "./usePrinter-CnT0_Cbi.js";
6
+ import { D as Pe } from "./DataTable-DVpbqbwp.js";
7
+ import Ge from "./vue-ui-skeleton-BYBsAUyH.js";
8
+ import { L as Me } from "./Legend-Crc6SgWK.js";
9
+ import De from "./vue-ui-accordion-CM8Lp-MV.js";
10
+ import { u as ie } from "./useNestedProp-QJwLGaK5.js";
11
11
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Ie = ["id"], Oe = ["xmlns", "viewBox"], Ve = { key: 0 }, Ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], We = { key: 1 }, He = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Be = { key: 2 }, Ue = ["x", "y", "font-size", "fill", "font-weight"], je = ["x", "y", "font-size", "fill"], qe = { key: 3 }, Ye = ["x", "y", "font-size", "fill", "font-weight"], Ze = ["id"], Je = ["stop-color"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], at = ["stop-color"], st = ["id"], ot = ["stop-color"], rt = ["stop-color"], nt = ["id"], ut = ["stop-color"], it = ["stop-color"], ct = { key: 0 }, dt = ["d", "fill"], vt = { key: 1 }, ht = ["x", "y", "height", "width", "fill"], yt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ft = { key: 2 }, gt = ["x", "y", "fill", "font-size"], mt = { key: 3 }, pt = ["x", "y", "fill", "font-size"], _t = {
13
13
  key: 3,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-oufiZvaS.cjs"),ue=require("./Title-DxNugmhI.cjs"),A=require("./usePrinter-Cc8ufBvU.cjs"),ie=require("./DataTable-CHXdpx94.cjs"),ce=require("./vue-ui-accordion-DiR0dVog.cjs"),de=require("./vue-ui-skeleton-Fsru0dbb.cjs"),W=require("./useNestedProp-CmTItGss.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],pe=["stop-color"],ge=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce={key:2,class:"vue-data-ui-watermark"},xe=["innerHTML"],$e={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(X,{expose:R}){const f=X,{vue_ui_flow:Z}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function J(o){b.value=o,P.value+=1}const t=e.computed(()=>{const o=W.useNestedProp({userConfig:f.config,defaultConfig:Z});return o.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),{isPrinting:F,isImaging:L,generatePdf:z,generateImage:I}=A.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),O=e.computed(()=>t.value.style.chart.links.width),V=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}f.dataset.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function K(o){return o/V.value*100+t.value.style.chart.nodes.minHeight}function Q(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*V.value}function ee(o){const n={},l={};function r(s,u){n[s]||(n[s]={height:0,level:null,inflow:0,outflow:0}),n[s].level===null&&(n[s].level=u),l[u]||(l[u]=[]),l[u].includes(s)||l[u].push(s)}o.forEach(([s,u,v],y)=>{const p=n[s]?n[s].level:0,x=p+1;r(s,p),r(u,x),n[s].children||(n[s].children=[]),n[s].children.push({target:u,value:v}),n[s].outflow+=v,n[u].inflow+=v}),Object.keys(n).forEach((s,u)=>{n[s].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const s in n)n[s].height=K(Math.max(n[s].inflow,n[s].outflow)),n[s].name=s;const a={};for(const s in l){let u=0;l[s].forEach((v,y)=>{const p=n[v].height;a[v]={x:parseInt(s,10)*O.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:p,i:y,color:n[v].color,value:Q(p)},u+=p+H.value})}const c=[];for(const s in n){let u=a[s].absoluteY;n[s].children&&n[s].children.forEach(({target:v,value:y},p)=>{const x=a[v].y,E=a[s],S=a[v],q=u,G=u+y/n[s].outflow*E.height,U=x,j=x+y/n[v].inflow*S.height,re={id:i.createUid(),source:s,target:v,path:`M ${E.x+g.value} ${q} L ${E.x+g.value} ${G} L ${S.x} ${j} L ${S.x} ${U} Z`,value:y,sourceColor:n[s].color,targetColor:n[v].color};c.push(re),u+=G-q,a[v].y+=j-U})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=ee(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),te=e.computed(()=>le(h.value.nodes));function le(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+H.value}return Math.max(...Object.values(n))}const _=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=f.dataset.length*O.value;return{height:te.value+o+r,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function oe(o){const n={},l={},r=new Set;return f.dataset.forEach(([a,c,s])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const m=e.ref(null),w=e.ref(null);function ne(o){m.value=oe(o.name),w.value=o.name}function ae(){m.value=null,w.value=null}const M=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function Y(){e.nextTick(()=>{const o=M.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=i.createCsvContent(n);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=M.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function se(){return h.value}function D(){k.value.showTable=!k.value.showTable}return R({getData:se,generateCsv:Y,generateImage:I,generatePdf:z,toggleTable:D}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(L),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:J,onGeneratePdf:e.unref(z),onGenerateCsv:Y,onGenerateImage:e.unref(I),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ge)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:n[0]||(n[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})),13,we))),256)),e.renderSlot(o.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Be=ve._export_sfc($e,[["__scopeId","data-v-4616230a"]]);exports.default=Be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BcLWKvbg.cjs"),ue=require("./Title-D9E4eBNp.cjs"),A=require("./usePrinter-BWCvrSz2.cjs"),ie=require("./DataTable-Ckvkqg78.cjs"),ce=require("./vue-ui-accordion-BOEIWXgn.cjs"),de=require("./vue-ui-skeleton-BG428rdQ.cjs"),W=require("./useNestedProp-BcuQPNiW.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],pe=["stop-color"],ge=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce={key:2,class:"vue-data-ui-watermark"},xe=["innerHTML"],$e={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(X,{expose:R}){const f=X,{vue_ui_flow:Z}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function J(o){b.value=o,P.value+=1}const t=e.computed(()=>{const o=W.useNestedProp({userConfig:f.config,defaultConfig:Z});return o.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),{isPrinting:F,isImaging:L,generatePdf:z,generateImage:I}=A.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),O=e.computed(()=>t.value.style.chart.links.width),V=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}f.dataset.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function K(o){return o/V.value*100+t.value.style.chart.nodes.minHeight}function Q(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*V.value}function ee(o){const n={},l={};function r(s,u){n[s]||(n[s]={height:0,level:null,inflow:0,outflow:0}),n[s].level===null&&(n[s].level=u),l[u]||(l[u]=[]),l[u].includes(s)||l[u].push(s)}o.forEach(([s,u,v],y)=>{const p=n[s]?n[s].level:0,x=p+1;r(s,p),r(u,x),n[s].children||(n[s].children=[]),n[s].children.push({target:u,value:v}),n[s].outflow+=v,n[u].inflow+=v}),Object.keys(n).forEach((s,u)=>{n[s].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const s in n)n[s].height=K(Math.max(n[s].inflow,n[s].outflow)),n[s].name=s;const a={};for(const s in l){let u=0;l[s].forEach((v,y)=>{const p=n[v].height;a[v]={x:parseInt(s,10)*O.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:p,i:y,color:n[v].color,value:Q(p)},u+=p+H.value})}const c=[];for(const s in n){let u=a[s].absoluteY;n[s].children&&n[s].children.forEach(({target:v,value:y},p)=>{const x=a[v].y,E=a[s],S=a[v],q=u,G=u+y/n[s].outflow*E.height,U=x,j=x+y/n[v].inflow*S.height,re={id:i.createUid(),source:s,target:v,path:`M ${E.x+g.value} ${q} L ${E.x+g.value} ${G} L ${S.x} ${j} L ${S.x} ${U} Z`,value:y,sourceColor:n[s].color,targetColor:n[v].color};c.push(re),u+=G-q,a[v].y+=j-U})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=ee(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),te=e.computed(()=>le(h.value.nodes));function le(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+H.value}return Math.max(...Object.values(n))}const _=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=f.dataset.length*O.value;return{height:te.value+o+r,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function oe(o){const n={},l={},r=new Set;return f.dataset.forEach(([a,c,s])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const m=e.ref(null),w=e.ref(null);function ne(o){m.value=oe(o.name),w.value=o.name}function ae(){m.value=null,w.value=null}const M=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function Y(){e.nextTick(()=>{const o=M.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=i.createCsvContent(n);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=M.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function se(){return h.value}function D(){k.value.showTable=!k.value.showTable}return R({getData:se,generateCsv:Y,generateImage:I,generatePdf:z,toggleTable:D}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(L),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:J,onGeneratePdf:e.unref(z),onGenerateCsv:Y,onGenerateImage:e.unref(I),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ge)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:n[0]||(n[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})),13,we))),256)),e.renderSlot(o.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Be=ve._export_sfc($e,[["__scopeId","data-v-4616230a"]]);exports.default=Be;
@@ -1,11 +1,11 @@
1
1
  import { computed as f, onMounted as Te, ref as k, openBlock as r, createElementBlock as v, normalizeClass as ne, normalizeStyle as w, createVNode as se, createCommentVNode as N, createBlock as G, unref as h, createSlots as Pe, withCtx as b, renderSlot as C, normalizeProps as ue, guardReactiveProps as re, createElementVNode as E, Fragment as T, renderList as P, toDisplayString as B, createTextVNode as Fe, nextTick as Ie } from "vue";
2
- import { u as He, o as Le, e as Ee, c as ie, t as Oe, a as Me, p as A, b as Se, f as ce, X as ze, C as de, E as Ye, n as De, q as Ge } from "./index-BvjCO-wv.js";
3
- import { _ as Be } from "./Title-Bx2ibobQ.js";
4
- import { u as Ae, U as Ue } from "./usePrinter-CaKXrCiB.js";
5
- import { D as Ve } from "./DataTable-DKHF_NH2.js";
6
- import je from "./vue-ui-accordion-q-bLDiD3.js";
7
- import Xe from "./vue-ui-skeleton-jYHncdu5.js";
8
- import { u as ve } from "./useNestedProp-2KJaYPfM.js";
2
+ import { u as He, o as Le, e as Ee, c as ie, t as Oe, a as Me, p as A, b as Se, f as ce, X as ze, C as de, E as Ye, n as De, q as Ge } from "./index-BbBCE1pM.js";
3
+ import { _ as Be } from "./Title-CMEhX9eJ.js";
4
+ import { u as Ae, U as Ue } from "./usePrinter-CnT0_Cbi.js";
5
+ import { D as Ve } from "./DataTable-DVpbqbwp.js";
6
+ import je from "./vue-ui-accordion-CM8Lp-MV.js";
7
+ import Xe from "./vue-ui-skeleton-BYBsAUyH.js";
8
+ import { u as ve } from "./useNestedProp-QJwLGaK5.js";
9
9
  import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"], Ke = ["stop-color"], Qe = ["d", "fill", "stroke", "stroke-width"], et = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], tt = ["x", "y", "font-size", "fill"], lt = ["x", "y", "font-size", "fill"], ot = {
11
11
  key: 2,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-oufiZvaS.cjs"),K=require("./Legend-BwrzHxLy.cjs"),Q=require("./Title-DxNugmhI.cjs"),Z=require("./Tooltip-BC2Wlz7P.cjs"),ee=require("./DataTable-CHXdpx94.cjs"),D=require("./usePrinter-Cc8ufBvU.cjs"),te=require("./vue-ui-skeleton-Fsru0dbb.cjs"),le=require("./vue-ui-accordion-DiR0dVog.cjs"),q=require("./useNestedProp-CmTItGss.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],ne=["id"],se=["stdDeviation"],ue=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he={key:3,class:"vue-data-ui-watermark"},pe=["onClick"],ge={key:0},ye={key:1},fe=["innerHTML"],me={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(G,{expose:M,emit:B}){const d=G,{vue_ui_galaxy:W}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const y=e.ref(r.createUid()),C=e.ref(null),U=e.ref(null),x=e.ref(!1),w=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=q.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:_,isImaging:P,generatePdf:E,generateImage:V}=D.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),B("selectLegend",f.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,n)=>o+n,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),F=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),f=e.computed(()=>{const l=[];for(let a=0;a<F.value.length;a+=1){const o=F.value[a];let n=o.value/c.value*R.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const T=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},x.value=n,i.value=l.id;let s="";const g=t.value.style.chart.tooltip.customFormat;r.isFunction(g)&&r.functionReturnsString(()=>g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?w.value=g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:s+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),w.value=`<div>${s}</div>`)}const L=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=f.value.map(o=>({name:o.name,color:o.color})),a=f.value.map(o=>o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/c.value)?"-":h.value.body[s]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,g)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[g],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},J,isNaN(h.value.body[g]/c.value)?"-":(h.value.body[g]/c.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function O(){v.value.showTable=!v.value.showTable}function z(){v.value.showTooltip=!v.value.showTooltip}return M({getData:H,generatePdf:E,generateCsv:I,generateImage:V,toggleTable:O,toggleTooltip:z}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:U,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(P),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(E),onGenerateCsv:I,onGenerateImage:e.unref(V),onToggleTable:O,onToggleTooltip:z},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,se)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>j({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,i.value=null}),onClick:s=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:5,legendSet:L.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ge," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":(o.value/c.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,pe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:L.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:w.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},be=oe._export_sfc(me,[["__scopeId","data-v-56d17af8"]]);exports.default=be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BcLWKvbg.cjs"),K=require("./Legend-DA1uCuos.cjs"),Q=require("./Title-D9E4eBNp.cjs"),Z=require("./Tooltip-C6EZFw-G.cjs"),ee=require("./DataTable-Ckvkqg78.cjs"),D=require("./usePrinter-BWCvrSz2.cjs"),te=require("./vue-ui-skeleton-BG428rdQ.cjs"),le=require("./vue-ui-accordion-BOEIWXgn.cjs"),q=require("./useNestedProp-BcuQPNiW.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],ne=["id"],se=["stdDeviation"],ue=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he={key:3,class:"vue-data-ui-watermark"},pe=["onClick"],ge={key:0},ye={key:1},fe=["innerHTML"],me={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(G,{expose:M,emit:B}){const d=G,{vue_ui_galaxy:W}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const y=e.ref(r.createUid()),C=e.ref(null),U=e.ref(null),x=e.ref(!1),w=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=q.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:_,isImaging:P,generatePdf:E,generateImage:V}=D.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),B("selectLegend",f.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,n)=>o+n,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),F=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),f=e.computed(()=>{const l=[];for(let a=0;a<F.value.length;a+=1){const o=F.value[a];let n=o.value/c.value*R.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const T=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},x.value=n,i.value=l.id;let s="";const g=t.value.style.chart.tooltip.customFormat;r.isFunction(g)&&r.functionReturnsString(()=>g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?w.value=g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:s+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),w.value=`<div>${s}</div>`)}const L=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=f.value.map(o=>({name:o.name,color:o.color})),a=f.value.map(o=>o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/c.value)?"-":h.value.body[s]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,g)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[g],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},J,isNaN(h.value.body[g]/c.value)?"-":(h.value.body[g]/c.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function O(){v.value.showTable=!v.value.showTable}function z(){v.value.showTooltip=!v.value.showTooltip}return M({getData:H,generatePdf:E,generateCsv:I,generateImage:V,toggleTable:O,toggleTooltip:z}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:U,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(P),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(E),onGenerateCsv:I,onGenerateImage:e.unref(V),onToggleTable:O,onToggleTooltip:z},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,se)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>j({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,i.value=null}),onClick:s=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:5,legendSet:L.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ge," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":(o.value/c.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,pe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:L.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:w.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},be=oe._export_sfc(me,[["__scopeId","data-v-56d17af8"]]);exports.default=be;
@@ -1,13 +1,13 @@
1
1
  import { computed as v, onMounted as be, ref as n, openBlock as r, createElementBlock as u, normalizeClass as N, normalizeStyle as F, createVNode as A, createCommentVNode as d, createBlock as S, unref as f, createSlots as me, withCtx as i, renderSlot as h, normalizeProps as I, guardReactiveProps as L, createElementVNode as w, Fragment as ee, renderList as te, createTextVNode as le, toDisplayString as O, nextTick as ke } from "vue";
2
- import { u as Ce, o as we, e as ae, g as xe, c as oe, t as $e, a as Te, p as E, b as _e, d as Pe, F as Ne, f as V, X as Fe, v as se, w as Se, n as Ie, q as Le } from "./index-BvjCO-wv.js";
3
- import { L as Oe } from "./Legend-BqqpwXbu.js";
4
- import { _ as Ee } from "./Title-Bx2ibobQ.js";
5
- import { _ as Ve } from "./Tooltip-DOEMrisX.js";
6
- import { D as Be } from "./DataTable-DKHF_NH2.js";
7
- import { u as De, U as Ge } from "./usePrinter-CaKXrCiB.js";
8
- import Me from "./vue-ui-skeleton-jYHncdu5.js";
9
- import We from "./vue-ui-accordion-q-bLDiD3.js";
10
- import { u as re } from "./useNestedProp-2KJaYPfM.js";
2
+ import { u as Ce, o as we, e as ae, g as xe, c as oe, t as $e, a as Te, p as E, b as _e, d as Pe, F as Ne, f as V, X as Fe, v as se, w as Se, n as Ie, q as Le } from "./index-BbBCE1pM.js";
3
+ import { L as Oe } from "./Legend-Crc6SgWK.js";
4
+ import { _ as Ee } from "./Title-CMEhX9eJ.js";
5
+ import { _ as Ve } from "./Tooltip-B2XPbRE_.js";
6
+ import { D as Be } from "./DataTable-DVpbqbwp.js";
7
+ import { u as De, U as Ge } from "./usePrinter-CnT0_Cbi.js";
8
+ import Me from "./vue-ui-skeleton-BYBsAUyH.js";
9
+ import We from "./vue-ui-accordion-CM8Lp-MV.js";
10
+ import { u as re } from "./useNestedProp-QJwLGaK5.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Ae = ["id"], He = ["xmlns", "viewBox"], Ue = ["id"], Xe = ["stdDeviation"], Re = ["d", "stroke", "stroke-width"], Ye = ["d", "stroke", "stroke-width"], je = ["filter"], qe = ["d", "stroke", "stroke-width"], Je = ["d", "stroke-width", "onMouseenter", "onClick"], Ke = {
13
13
  key: 3,