vue-data-ui 2.3.95 → 2.3.96

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 (144) hide show
  1. package/dist/{Arrow-ClB1PHpS.js → Arrow-Dse9W-xd.js} +1 -1
  2. package/dist/{Arrow-OPbsbOoM.cjs → Arrow-eiCuVfYA.cjs} +1 -1
  3. package/dist/{BaseIcon-ZChy8GeS.js → BaseIcon-DFIHCTyJ.js} +6 -6
  4. package/dist/{BaseIcon-CGKu0qTV.cjs → BaseIcon-DJbzYsmN.cjs} +1 -1
  5. package/dist/{DataTable-B9SSwFM2.js → DataTable-TdEc8llA.js} +2 -2
  6. package/dist/{DataTable-CUi5w5e6.cjs → DataTable-YpBvWSn5.cjs} +1 -1
  7. package/dist/{Legend-D4PxDNTf.js → Legend-BsB-CXKk.js} +1 -1
  8. package/dist/{Legend-DP-Tm5Kr.cjs → Legend-CsYNhmuM.cjs} +1 -1
  9. package/dist/{PackageVersion-I1_4jcn_.js → PackageVersion-C5LvF-TN.js} +1 -1
  10. package/dist/{PackageVersion-DdGAD2ox.cjs → PackageVersion-kqwH1rG4.cjs} +1 -1
  11. package/dist/{Shape-DRb45Knl.cjs → Shape-CyDjKOjw.cjs} +1 -1
  12. package/dist/{Shape-DVc7K58k.js → Shape-DpWOBZlx.js} +1 -1
  13. package/dist/{Slicer-Bk9LTQad.js → Slicer-BQr2RZjz.js} +2 -2
  14. package/dist/{Slicer-D7S48Lno.cjs → Slicer-D-wCwIJ3.cjs} +1 -1
  15. package/dist/{Title-Cxlu3Etv.js → Title-BMSO566P.js} +1 -1
  16. package/dist/{Title-DcXqsD3c.cjs → Title-DWSN4YUC.cjs} +1 -1
  17. package/dist/{Tooltip-onlvaIFL.cjs → Tooltip-Bl8Ilf5h.cjs} +1 -1
  18. package/dist/{Tooltip-Bt9pHzBM.js → Tooltip-CHABi2zh.js} +1 -1
  19. package/dist/{index-DK7qqHGP.js → index-BcpaEQjg.js} +21 -21
  20. package/dist/{index-BwtKB_oG.cjs → index-Bv8wGGBc.cjs} +3 -3
  21. package/dist/style.css +1 -1
  22. package/dist/{useNestedProp-CE6ustAp.cjs → useNestedProp-Bf7w6kTt.cjs} +1 -1
  23. package/dist/{useNestedProp-0nRX_rTi.js → useNestedProp-CEsVEbKF.js} +1 -1
  24. package/dist/{usePrinter-BMJj8aqh.cjs → usePrinter-7jNVagoH.cjs} +1 -1
  25. package/dist/{usePrinter-Cza87yNE.js → usePrinter-DzCuoQHM.js} +1 -1
  26. package/dist/{vue-data-ui-C_TmwtMr.js → vue-data-ui-BFU1Dig_.js} +57 -57
  27. package/dist/{vue-data-ui-Hk08-jMu.cjs → vue-data-ui-Bs74qL5y.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-C7dVjCP4.js → vue-ui-3d-bar-4ue7sfgA.js} +8 -8
  31. package/dist/{vue-ui-3d-bar-DLpRGWHF.cjs → vue-ui-3d-bar-DxfiT-RQ.cjs} +1 -1
  32. package/dist/{vue-ui-accordion-CM2NnUan.cjs → vue-ui-accordion-CSkH8Ztm.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-5C4CP3gA.js → vue-ui-accordion-Dhi5XiYk.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-mLYneMWu.js → vue-ui-age-pyramid-BApJ-rfW.js} +9 -9
  35. package/dist/{vue-ui-age-pyramid-CTvGXHzp.cjs → vue-ui-age-pyramid-Ds5Q2JFz.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-CPZoIz9j.cjs → vue-ui-annotator-8qRRkhYB.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-BB0EN1X8.js → vue-ui-annotator-BASwkqF2.js} +1 -1
  38. package/dist/{vue-ui-candlestick-BqH7QdhN.cjs → vue-ui-candlestick-CljlKMFQ.cjs} +1 -1
  39. package/dist/{vue-ui-candlestick-91SHWtIZ.js → vue-ui-candlestick-Dlgm0_M_.js} +10 -10
  40. package/dist/{vue-ui-carousel-table-Dvr8K0wL.js → vue-ui-carousel-table-3izbh8XN.js} +4 -4
  41. package/dist/{vue-ui-carousel-table-Cj9K0i-8.cjs → vue-ui-carousel-table-DkveY2W7.cjs} +1 -1
  42. package/dist/{vue-ui-chestnut-BMbO3LQx.cjs → vue-ui-chestnut-CQu1jOyT.cjs} +1 -1
  43. package/dist/{vue-ui-chestnut-C8-hqYVj.js → vue-ui-chestnut-DzKXA8vJ.js} +7 -7
  44. package/dist/{vue-ui-cursor-fOFRnGWg.js → vue-ui-cursor-BrBsIJo3.js} +2 -2
  45. package/dist/{vue-ui-cursor-CiNq70Vh.cjs → vue-ui-cursor-DbQV-LLF.cjs} +1 -1
  46. package/dist/{vue-ui-dashboard-XROIeMZs.js → vue-ui-dashboard-DXdmiwYq.js} +2 -2
  47. package/dist/{vue-ui-dashboard-emcX9lzJ.cjs → vue-ui-dashboard-Wzves807.cjs} +1 -1
  48. package/dist/{vue-ui-digits-Dao_RHVG.js → vue-ui-digits-BppnP8CH.js} +2 -2
  49. package/dist/{vue-ui-digits-Fx6hf8lh.cjs → vue-ui-digits-CSQi9Lh3.cjs} +1 -1
  50. package/dist/vue-ui-donut-CqlGTsGd.cjs +1 -0
  51. package/dist/{vue-ui-donut-D5q_f9RX.js → vue-ui-donut-DkHShWM1.js} +17 -13
  52. package/dist/{vue-ui-donut-evolution-Dnx-o2Ok.cjs → vue-ui-donut-evolution-CwOes6ko.cjs} +1 -1
  53. package/dist/{vue-ui-donut-evolution-ciU7PKzb.js → vue-ui-donut-evolution-oDtnYccI.js} +10 -10
  54. package/dist/{vue-ui-dumbbell-nLr7lvcv.js → vue-ui-dumbbell-CDv2q1Sr.js} +9 -9
  55. package/dist/{vue-ui-dumbbell-DkX4VmBe.cjs → vue-ui-dumbbell-DQlj4MnV.cjs} +1 -1
  56. package/dist/{vue-ui-flow-B6HJtYfr.js → vue-ui-flow-1DFcpdAA.js} +8 -8
  57. package/dist/{vue-ui-flow-smeC886u.cjs → vue-ui-flow-Bx-zjQWh.cjs} +1 -1
  58. package/dist/{vue-ui-galaxy-Buek4k31.cjs → vue-ui-galaxy-BqB8ilSB.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-Ts-pIaqK.js → vue-ui-galaxy-bE0htYx4.js} +10 -10
  60. package/dist/{vue-ui-gauge-CB1FXw50.cjs → vue-ui-gauge-B3fJ7NBS.cjs} +1 -1
  61. package/dist/{vue-ui-gauge-CokjkUw7.js → vue-ui-gauge-QgQpiMpP.js} +6 -6
  62. package/dist/{vue-ui-gizmo-CQzBf-wG.cjs → vue-ui-gizmo-BPTXhk_5.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-DcGemMpp.js → vue-ui-gizmo-Dvhxmifg.js} +3 -3
  64. package/dist/{vue-ui-heatmap-BBVeSW2b.js → vue-ui-heatmap-Dz__vLIx.js} +9 -9
  65. package/dist/{vue-ui-heatmap-B3eEfpF_.cjs → vue-ui-heatmap-mKhWCDCz.cjs} +1 -1
  66. package/dist/{vue-ui-kpi-0FoMbSuC.cjs → vue-ui-kpi-By6cERhR.cjs} +1 -1
  67. package/dist/{vue-ui-kpi-CPMnrH0b.js → vue-ui-kpi-CBUwc_CD.js} +3 -3
  68. package/dist/{vue-ui-mini-loader-Dpn4tXn2.js → vue-ui-mini-loader-DgHibV20.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-DNrvLX3D.cjs → vue-ui-mini-loader-jX_8sp7v.cjs} +1 -1
  70. package/dist/{vue-ui-molecule-CKFgcQYg.cjs → vue-ui-molecule-B0U_SHX-.cjs} +1 -1
  71. package/dist/{vue-ui-molecule-C98VGiyq.js → vue-ui-molecule-DKpW8ux_.js} +10 -10
  72. package/dist/{vue-ui-mood-radar-CD3cjrDN.js → vue-ui-mood-radar-DCDK2sIV.js} +10 -10
  73. package/dist/{vue-ui-mood-radar-DN0allOW.cjs → vue-ui-mood-radar-DVChUb6f.cjs} +1 -1
  74. package/dist/{vue-ui-nested-donuts-Bdl_tUXJ.cjs → vue-ui-nested-donuts-CGp-Jubi.cjs} +1 -1
  75. package/dist/{vue-ui-nested-donuts-B__WecmQ.js → vue-ui-nested-donuts-FMQPCwII.js} +10 -10
  76. package/dist/{vue-ui-onion-U8VRuYjQ.js → vue-ui-onion-DL6021Q8.js} +10 -10
  77. package/dist/{vue-ui-onion-4g5ewsye.cjs → vue-ui-onion-uId6GP2z.cjs} +1 -1
  78. package/dist/{vue-ui-parallel-coordinate-plot-CdegwDSr.cjs → vue-ui-parallel-coordinate-plot-BQnqXMkU.cjs} +1 -1
  79. package/dist/{vue-ui-parallel-coordinate-plot-9WvsfJtY.js → vue-ui-parallel-coordinate-plot-BQuvfJQt.js} +11 -11
  80. package/dist/{vue-ui-quadrant-D2SDPxFH.cjs → vue-ui-quadrant-D0aD-7Tw.cjs} +1 -1
  81. package/dist/{vue-ui-quadrant-DMto8r-E.js → vue-ui-quadrant-rUE9NWa4.js} +11 -11
  82. package/dist/vue-ui-quick-chart-D-sbJNy5.cjs +15 -0
  83. package/dist/{vue-ui-quick-chart-YlkEojCz.js → vue-ui-quick-chart-Jh4YDviZ.js} +190 -195
  84. package/dist/{vue-ui-radar-lg4R0yio.js → vue-ui-radar-Bfdoz0Xo.js} +11 -11
  85. package/dist/{vue-ui-radar-DdPAZvLB.cjs → vue-ui-radar-De-YX5t1.cjs} +1 -1
  86. package/dist/{vue-ui-rating-BxV1W8_t.js → vue-ui-rating-D9vACqJ2.js} +2 -2
  87. package/dist/{vue-ui-rating-B7erplTm.cjs → vue-ui-rating-Dur118_W.cjs} +1 -1
  88. package/dist/{vue-ui-relation-circle-BviKM7qW.js → vue-ui-relation-circle-CnRm-wQ3.js} +6 -6
  89. package/dist/{vue-ui-relation-circle-RHy8p_Rq.cjs → vue-ui-relation-circle-Dux0WfBo.cjs} +1 -1
  90. package/dist/{vue-ui-rings-Bn-nQaV1.js → vue-ui-rings-B3K3LXLl.js} +10 -10
  91. package/dist/{vue-ui-rings-DMksrRmV.cjs → vue-ui-rings-BkrRebjS.cjs} +1 -1
  92. package/dist/{vue-ui-scatter-DJ0wpNbL.cjs → vue-ui-scatter-DeebI4Fn.cjs} +1 -1
  93. package/dist/{vue-ui-scatter-BdTMgLFD.js → vue-ui-scatter-DejGOjhr.js} +11 -11
  94. package/dist/{vue-ui-screenshot-D0XIDX5K.cjs → vue-ui-screenshot-Bar9x-5m.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-beg_Jx2O.js → vue-ui-screenshot-C08awO8c.js} +1 -1
  96. package/dist/{vue-ui-skeleton-CQnYuosp.js → vue-ui-skeleton-C53xk8CG.js} +3 -3
  97. package/dist/{vue-ui-skeleton-snFRuZgs.cjs → vue-ui-skeleton-TRdDtmHK.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-3x3w-9Zh.js → vue-ui-smiley-Cea-O3KH.js} +2 -2
  99. package/dist/{vue-ui-smiley-BUlMGmlz.cjs → vue-ui-smiley-Dav2CD3O.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-Ds7Vnwpb.cjs → vue-ui-spark-trend-6ntFUEU4.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-LsojHGxX.js → vue-ui-spark-trend-Bs8twUaY.js} +5 -5
  102. package/dist/{vue-ui-sparkbar-DJAZa23-.cjs → vue-ui-sparkbar-C21yWQQ3.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-45yFHmFN.js → vue-ui-sparkbar-Cbmc-caP.js} +4 -4
  104. package/dist/{vue-ui-sparkgauge-D-hauinY.js → vue-ui-sparkgauge-0GVv8hjM.js} +4 -4
  105. package/dist/{vue-ui-sparkgauge-CnMl3jNc.cjs → vue-ui-sparkgauge-BmamgyGt.cjs} +1 -1
  106. package/dist/{vue-ui-sparkhistogram-vLsGWKZe.cjs → vue-ui-sparkhistogram-CfdPXl3J.cjs} +1 -1
  107. package/dist/{vue-ui-sparkhistogram-DaeMxgM8.js → vue-ui-sparkhistogram-DCM-BHkv.js} +5 -5
  108. package/dist/{vue-ui-sparkline-DDwGkMVO.cjs → vue-ui-sparkline-BTNHzn2V.cjs} +1 -1
  109. package/dist/{vue-ui-sparkline-Ddi4Jz8I.js → vue-ui-sparkline-BYJczOkd.js} +4 -4
  110. package/dist/{vue-ui-sparkstackbar-1_EPRHfC.js → vue-ui-sparkstackbar-CkAqCQvJ.js} +4 -4
  111. package/dist/{vue-ui-sparkstackbar-wbl8ZH9S.cjs → vue-ui-sparkstackbar-DRhK17o6.cjs} +1 -1
  112. package/dist/{vue-ui-stackbar-0cKpezVg.js → vue-ui-stackbar-CfYTo4Ku.js} +11 -11
  113. package/dist/{vue-ui-stackbar-BKojs76u.cjs → vue-ui-stackbar-DYBUaxzj.cjs} +1 -1
  114. package/dist/{vue-ui-strip-plot-BPICqL2j.cjs → vue-ui-strip-plot-CIN4KwoI.cjs} +1 -1
  115. package/dist/{vue-ui-strip-plot-D_7VbcMM.js → vue-ui-strip-plot-DEXBmsAI.js} +10 -10
  116. package/dist/{vue-ui-table-B1kfbP6Q.cjs → vue-ui-table-DRpceoPe.cjs} +1 -1
  117. package/dist/{vue-ui-table-heatmap-UKF0bVRc.js → vue-ui-table-heatmap-BA2teZNQ.js} +4 -4
  118. package/dist/{vue-ui-table-heatmap-CrXS3ruF.cjs → vue-ui-table-heatmap-DGJ9FlVp.cjs} +1 -1
  119. package/dist/{vue-ui-table-BTdufdp5.js → vue-ui-table-nN3CrtRu.js} +1 -1
  120. package/dist/{vue-ui-table-sparkline-CbhcBl__.js → vue-ui-table-sparkline-BvnGInz9.js} +5 -5
  121. package/dist/{vue-ui-table-sparkline-DnViPd7H.cjs → vue-ui-table-sparkline-Cu3WXN2z.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-CGlN3EdJ.cjs → vue-ui-thermometer-DbZ0o20q.cjs} +1 -1
  123. package/dist/{vue-ui-thermometer-BTb0KKkD.js → vue-ui-thermometer-tMXK87ka.js} +6 -6
  124. package/dist/{vue-ui-timer-Ca8z8fpL.cjs → vue-ui-timer-BC8eaIGC.cjs} +1 -1
  125. package/dist/{vue-ui-timer-DsXON-oQ.js → vue-ui-timer-SzmYKRd2.js} +5 -5
  126. package/dist/{vue-ui-tiremarks-C2FsHymJ.js → vue-ui-tiremarks-Ckslwdk8.js} +6 -6
  127. package/dist/{vue-ui-tiremarks-DfQgIZ-v.cjs → vue-ui-tiremarks-D-OLOU0v.cjs} +1 -1
  128. package/dist/{vue-ui-treemap-Ijgu5Uxo.cjs → vue-ui-treemap-CUtRsRug.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-COGNksGL.js → vue-ui-treemap-Mm79m8P6.js} +10 -10
  130. package/dist/{vue-ui-vertical-bar-C8q8aSVA.cjs → vue-ui-vertical-bar-CvLxGsDB.cjs} +1 -1
  131. package/dist/{vue-ui-vertical-bar-CSk11lJL.js → vue-ui-vertical-bar-r6pUOD2L.js} +10 -10
  132. package/dist/{vue-ui-waffle-BAFi3Ix0.cjs → vue-ui-waffle-CSyW6ncV.cjs} +1 -1
  133. package/dist/{vue-ui-waffle-nhWigJK4.js → vue-ui-waffle-C_9IOFs2.js} +10 -10
  134. package/dist/{vue-ui-wheel-DjPcnznT.js → vue-ui-wheel-BOhOVAnh.js} +6 -6
  135. package/dist/{vue-ui-wheel-CDcGk_zm.cjs → vue-ui-wheel-CKr2Vu47.cjs} +1 -1
  136. package/dist/{vue-ui-word-cloud-BwgErpI2.cjs → vue-ui-word-cloud-D2pGh3Xa.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-DFGYfQfb.js → vue-ui-word-cloud-ES0R6vuB.js} +9 -9
  138. package/dist/{vue-ui-xy-CTxjevvM.cjs → vue-ui-xy-BASuw3ZU.cjs} +1 -1
  139. package/dist/{vue-ui-xy-BT3XcRoD.js → vue-ui-xy-CyFLJGSu.js} +13 -13
  140. package/dist/{vue-ui-xy-canvas-BPRpgAOu.cjs → vue-ui-xy-canvas-1N7guNkI.cjs} +1 -1
  141. package/dist/{vue-ui-xy-canvas-AgaDG8-s.js → vue-ui-xy-canvas-BSV_IOwc.js} +10 -10
  142. package/package.json +1 -1
  143. package/dist/vue-ui-donut-Bf7irbZr.cjs +0 -1
  144. package/dist/vue-ui-quick-chart-BLom9Z1d.cjs +0 -15
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-9cRTLjY8.cjs"),q=require("./useNestedProp-CE6ustAp.cjs"),O=require("./index-BwtKB_oG.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.default({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-9cRTLjY8.cjs"),q=require("./useNestedProp-Bf7w6kTt.cjs"),O=require("./index-Bv8wGGBc.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.default({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
@@ -1,6 +1,6 @@
1
1
  import { ref as k, computed as d, openBlock as $, createElementBlock as i, Fragment as o, createElementVNode as l, createCommentVNode as m, unref as v, normalizeStyle as C, renderList as b, createBlock as N } from "vue";
2
- import { u as q } from "./useNestedProp-0nRX_rTi.js";
3
- import { u as M, X as S } from "./index-DK7qqHGP.js";
2
+ import { u as q } from "./useNestedProp-CEsVEbKF.js";
3
+ import { u as M, X as S } from "./index-BcpaEQjg.js";
4
4
  const w = { key: 0 }, B = ["d", "fill"], F = ["d", "fill"], X = ["d", "fill"], E = ["d", "fill"], I = ["d", "fill"], O = ["d", "fill"], A = ["d", "fill"], D = { key: 1 }, G = ["cx", "cy", "fill"], V = {
5
5
  __name: "Digit",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-CE6ustAp.cjs"),L=require("./index-BwtKB_oG.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-Bf7w6kTt.cjs"),L=require("./index-Bv8wGGBc.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Bv8wGGBc.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),_e=require("./Title-DWSN4YUC.cjs"),fe=require("./usePrinter-7jNVagoH.cjs"),Se=require("./DataTable-YpBvWSn5.cjs"),Pe=require("./Tooltip-Bl8Ilf5h.cjs"),$e=require("./Legend-CsYNhmuM.cjs"),Ne=require("./vue-ui-skeleton-TRdDtmHK.cjs"),Ee=require("./vue-ui-accordion-CSkH8Ztm.cjs"),ye=require("./useNestedProp-Bf7w6kTt.cjs"),Le=require("./PackageVersion-kqwH1rG4.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=$=>(e.pushScopeId("data-v-3151515d"),$=$(),e.popScopeId(),$),ze=["id"],Oe=["xmlns","viewBox"],Te={key:0},Xe=["id"],De=["stop-color"],Me=["offset","stop-color"],Ye=["offset","stop-color"],Ie=["stop-color"],Ae={key:1},qe=["id","cx","cy"],Ge=["stop-color","stop-opacity"],Re=["stop-color"],je=["id"],He=["id"],Ue=Ve(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),We=["id"],Je=["flood-color"],Ke=["d","stroke","filter"],Qe=["x1","y1","x2","y2","stroke","filter"],Ze=["cx","cy","r","fill","filter"],et=["stroke","d"],tt=["d","fill","stroke","stroke-width","filter"],lt={key:0},at=["stroke","d"],ot=["d","fill","stroke","stroke-width","filter"],nt={key:1},rt=["cx","cy","r","fill","stroke","stroke-width"],ut=["cx","cy","r","stroke"],st=["cx","cy","r","fill"],it={key:0},ct=["d","fill","onMouseenter","onClick"],dt={key:1},vt=["cx","cy","r","fill"],ht=["x","y","fill","font-size"],ft=["x","y","fill","font-size"],yt=["x","y","fill","font-size"],mt=["x","y","fill","font-size"],pt=["filter"],gt={key:0},bt=["x","y"],kt={key:1},wt=["cx","cy","fill","stroke","filter","onClick"],Ct=["cx","cy","fill","stroke","filter","onClick"],xt=["text-anchor","x","y","fill","font-size","onClick"],Bt=["text-anchor","x","y","fill","font-size","onClick"],_t=["text-anchor","x","y","fill","font-size","onClick"],St=["text-anchor","x","y","fill","font-size","onClick"],Pt={key:2},$t=["x","y","width"],Nt=["x","y","width"],Et={key:3,class:"vue-data-ui-watermark"},Lt=["onClick"],Ft={key:0,style:{"font-variant-numeric":"tabular-nums"}},Vt={key:1},zt=["innerHTML"],Ot={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup($,{expose:me,emit:A}){const k=$,{vue_ui_donut:pe}=o.useConfig(),N=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),E=e.ref(null),q=e.ref(null),G=e.ref(null),O=e.ref(null),R=e.ref(0),j=e.ref(0),H=e.ref(0);e.onMounted(()=>{U()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function U(){if(o.objectIsEmpty(k.dataset)?o.error({componentName:"VueUiDonut",type:"dataset"}):k.dataset.forEach((a,u)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{N.value=!1,o.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const a=he.throttle(()=>{const{width:u,height:l}=he.useResponsive({chart:E.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?G.value:null});r.value.width=u,r.value.height=l});O.value=new ResizeObserver(a),O.value.observe(E.value.parentNode)}}const f=e.ref(o.createUid()),ge=e.ref(null),T=e.ref(!1),D=e.ref(""),p=e.ref(null),W=e.ref(0);function J(){const a=ye.useNestedProp({userConfig:k.config,defaultConfig:pe});return a.theme?{...ye.useNestedProp({userConfig:o.themes.vue_ui_donut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}const t=e.computed({get:()=>J(),set:a=>a});e.watch(()=>k.config,a=>{t.value=J(),U(),R.value+=1,j.value+=1,H.value+=1},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=fe.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),te=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),L=e.computed(()=>{const a=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*a,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>k.dataset.map((a,u)=>({name:a.name,color:o.convertColorToHex(a.color)||te.value[u]||o.palette[u]||o.palette[u%o.palette.length],value:a.values.reduce((l,n)=>l+n,0),absoluteValues:a.values,comment:a.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,a=>g.value=a);function be(){return _.value.map(a=>({name:a.name,color:a.color,value:a.value}))}const w=e.ref([]),le=e.ref(null),ae=e.ref(null),S=e.ref(!1);function oe(a){const u=_.value.find((s,h)=>h===a);let n=g.value.find((s,h)=>h===a).value;if(w.value.includes(a)){let h=function(){n>s?(cancelAnimationFrame(le.value),g.value=g.value.map((d,I)=>a===I?{...d,value:s}:d),S.value=!1):(S.value=!0,n+=s*.025,g.value=g.value.map((d,I)=>a===I?{...d,value:n}:d),le.value=requestAnimationFrame(h))};w.value=w.value.filter(d=>d!==a);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){n<.1?(cancelAnimationFrame(ae.value),w.value.push(a),g.value=g.value.map((h,d)=>a===d?{...h,value:0}:h),S.value=!1):(S.value=!0,n/=1.1,g.value=g.value.map((h,d)=>a===d?{...h,value:n}:h),ae.value=requestAnimationFrame(s))};s()}A("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((a,u)=>{if([null,void 0].includes(a.values))return{...a,values:[]}}),g.value.map((a,u)=>({...a,seriesIndex:u})).filter((a,u)=>!w.value.includes(u)))),ne=e.computed(()=>k.dataset.map((a,u)=>({name:a.name,color:o.convertColorToHex(a.color)||te.value[u]||o.palette[u]||o.palette[u%o.palette.length],value:(a.values||[]).reduce((l,n)=>l+n,0),shape:"circle"})).map((a,u)=>({...a,proportion:a.value/k.dataset.map(l=>(l.values||[]).reduce((n,s)=>n+s,0)).reduce((l,n)=>l+n,0),opacity:w.value.includes(u)?.5:1,segregate:()=>oe(u),isSegregated:w.value.includes(u)}))),ke=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":""})),y=e.computed(()=>{const a=Math.min(r.value.width/3,r.value.height/3);return a<55?55:a}),v=e.computed(()=>o.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const a=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/a);return o.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function P(a){return a.x>r.value.width/2+6?"start":a.x<r.value.width/2-6?"end":"middle"}function we(a){return a.middlePoint.y>r.value.height/2?o.offsetFromCenterPoint({initX:a.middlePoint.x,initY:a.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:o.offsetFromCenterPoint({initX:a.middlePoint.x,initY:a.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function b(a){return a.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function M(a,u){const l=a.value/Ce(u);return isNaN(l)?0:o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,o.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:a})}function Ce(a){return[...a].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(a=>a.value).reduce((a,u)=>a+u,0)),re=e.computed(()=>m.value/C.value.length),Y=e.ref(null),F=e.ref(!1);function ue({datapoint:a,relativeIndex:u,seriesIndex:l,show:n=!1}){Y.value={datapoint:a,seriesIndex:l,config:t.value,series:_.value},T.value=n,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(F.value=!1,o.isFunction(h))try{const d=h({seriesIndex:l,datapoint:a,series:_.value,config:t.value});typeof d=="string"&&(D.value=d,F.value=!0)}catch{console.warn("Custom format cannot be applied."),F.value=!1}if(!F.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.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="${a.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${o.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const d=o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,a.proportion*100,o.dataLabel({v:a.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:a,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${d})</span></div>`:s+=`<b>${d}</b></div>`}t.value.style.chart.comments.showInTooltip&&a.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${a.color}">${a.comment}</div>`),D.value=`<div>${s}</div>`}}function V(a){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==a?`url(#blur_${f.value})`:""}const x=e.computed(()=>{const a=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:a,body:u}});function se(){e.nextTick(()=>{const a=x.value.head.map((n,s)=>[[n.name],[x.value.body[s]],[isNaN(x.value.body[s]/m.value)?"-":x.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(a),l=o.createCsvContent(u);o.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const a=[' <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>',o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=x.value.head.map((s,h)=>{const d=o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:x.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},d,isNaN(x.value.body[h]/m.value)?"-":(x.value.body[h]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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.value,t.value.table.columnNames.percentage],head:a,body:u,config:l}}),z=e.ref(!1);function xe(a){z.value=a,W.value+=1}const ie=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Be(a){return a.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function B(a,u){A("selectDatapoint",{datapoint:a,index:u})}function ce(){c.value.showTable=!c.value.showTable}function de(){c.value.dataLabels.show=!c.value.dataLabels.show}function ve(){c.value.showTooltip=!c.value.showTooltip}return me({getData:be,generatePdf:Z,generateCsv:se,generateImage:ee,toggleTable:ce,toggleLabels:de,toggleTooltip:ve}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:E,class:e.normalizeClass(`vue-ui-donut ${z.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${f.value}`},[e.renderSlot(a.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:q,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${R.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&N.value?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:ge,key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:E.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:xe,onGeneratePdf:e.unref(Z),onGenerateCsv:se,onGenerateImage:e.unref(ee),onToggleTable:ce,onToggleLabels:de,onToggleTooltip:ve},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Le._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Te,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,De),e.createElementVNode("stop",{offset:`${(1-L.value/y.value)*100}%`,"stop-color":e.unref(o.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Me),e.createElementVNode("stop",{offset:`${(1-L.value/y.value/2)*100}%`,"stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ie)],8,Xe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${n}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(v.value[n].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":v.value[n].color},null,8,Re)],8,qe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,He),Ue],8,je),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Je)],8,We)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(n)},null,8,Ke)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[n].middlePoint.x,y2:i.value[n].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(n)},null,8,Qe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,Ze)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(o.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(n)},null,8,tt))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[v.value.length>1?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[n].path,fill:"#FFFFFF"},null,8,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[n].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${n}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(n)},null,8,ot))),256))])):(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:v.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,rt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,ut)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,st)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[v.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[n].path,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>ue({datapoint:l,relativeIndex:n,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>B(l,n)},null,40,ct))),256))])):(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===a.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>ue({datapoint:v.value[0],relativeIndex:0,seriesIndex:v.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>B(v.value[0],a.i))},null,40,vt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,ft)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,yt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(S.value?"--":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,re.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:re.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,mt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{filter:V(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-120:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-60:e.unref(o.calcMarkerOffsetX)(l).x,y:e.unref(o.calcMarkerOffsetY)(l)-(ie.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ie.value,isVisible:b(l)&&c.value.dataLabels.show,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor,percentage:M(l,v.value)})),void 0,!0)])],8,bt))])):(e.openBlock(),e.createElementBlock("g",kt,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.calcMarkerOffsetX)(l).x,cy:e.unref(o.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${f.value})`,onClick:s=>B(l,n)},null,8,wt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${f.value})`,onClick:s=>B(l,n)},null,8,Ct)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(M(l,v.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,xt)):e.createCommentVNode("",!0),b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(l.name),13,Bt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":P(i.value[n].middlePoint),x:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(M(l,v.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,_t)):e.createCommentVNode("",!0),b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":P(i.value[n].middlePoint),x:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(l.name),13,St)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",Pt,[b(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(o.calcMarkerOffsetX)(l).x),y:e.unref(o.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,$t)):e.createCommentVNode("",!0),b(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(P(i.value[n].middlePoint)==="end"?e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:P(i.value[n].middlePoint)==="middle"?e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:we(i.value[n])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:P(i.value[n].middlePoint),flexAlign:P(i.value[n].middlePoint)}},void 0,!0)])],8,Nt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,pt))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:G},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock($e.Legend,{key:`legend_${H.value}`,legendSet:ne.value,config:ke.value,onClickMarker:u[4]||(u[4]=({i:l})=>oe(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${w.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.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.legend.roundingValue}),{datapoint:l,index:n}))+" ",1),w.value.includes(n)?(e.openBlock(),e.createElementBlock("span",Vt," ( "+e.toDisplayString(Be(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",Ft," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,S.value?l.proportion*100:l.value/m.value*100,e.unref(o.dataLabel)({v:S.value?l.proportion*100:l.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,Lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ne.value},void 0,!0)],512),e.createVNode(Pe._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:E.value,content:D.value,isCustom:F.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),N.value?(e.openBlock(),e.createBlock(Ee.default,{key:5,hideDetails:"",config:{open:c.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.openBlock(),e.createBlock(Se.DataTable,{key:`table_${j.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,zt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(o.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ze))}},Tt=Fe._export_sfc(Ot,[["__scopeId","data-v-3151515d"]]);exports.default=Tt;
@@ -1,20 +1,20 @@
1
1
  import { computed as w, ref as d, onMounted as Je, onBeforeUnmount as Ke, watch as Oe, openBlock as u, createElementBlock as r, normalizeClass as ie, normalizeStyle as Y, renderSlot as k, createBlock as H, createCommentVNode as v, unref as s, createSlots as Qe, withCtx as L, normalizeProps as Q, guardReactiveProps as Z, createVNode as Ie, createElementVNode as f, Fragment as m, renderList as I, toDisplayString as _, createTextVNode as Ae, nextTick as Ze, pushScopeId as et, popScopeId as tt } from "vue";
2
- import { u as lt, o as at, e as De, g as ot, c as ut, b as st, d as Be, p as G, m as nt, G as rt, f as S, X as it, s as ee, w as vt, j as ct, H as F, i as X, k as b, n as te, t as dt, a as ht, x as yt, q as ft, r as pt } from "./index-DK7qqHGP.js";
2
+ import { u as lt, o as at, e as De, g as ot, c as ut, b as st, d as Be, p as G, m as nt, G as rt, f as S, X as it, s as ee, w as vt, j as ct, H as F, i as X, k as b, n as te, t as dt, a as ht, x as yt, q as ft, r as pt } from "./index-BcpaEQjg.js";
3
3
  import { t as gt, u as bt } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as mt } from "./Title-Cxlu3Etv.js";
5
- import { u as wt, U as kt } from "./usePrinter-Cza87yNE.js";
6
- import { D as xt } from "./DataTable-B9SSwFM2.js";
7
- import { _ as _t } from "./Tooltip-Bt9pHzBM.js";
8
- import { L as Ct } from "./Legend-D4PxDNTf.js";
9
- import $t from "./vue-ui-skeleton-CQnYuosp.js";
10
- import Pt from "./vue-ui-accordion-5C4CP3gA.js";
11
- import { u as Me } from "./useNestedProp-0nRX_rTi.js";
12
- import { _ as Lt } from "./PackageVersion-I1_4jcn_.js";
4
+ import { _ as mt } from "./Title-BMSO566P.js";
5
+ import { u as wt, U as kt } from "./usePrinter-DzCuoQHM.js";
6
+ import { D as xt } from "./DataTable-TdEc8llA.js";
7
+ import { _ as _t } from "./Tooltip-CHABi2zh.js";
8
+ import { L as Ct } from "./Legend-BsB-CXKk.js";
9
+ import $t from "./vue-ui-skeleton-C53xk8CG.js";
10
+ import Pt from "./vue-ui-accordion-Dhi5XiYk.js";
11
+ import { u as Me } from "./useNestedProp-CEsVEbKF.js";
12
+ import { _ as Lt } from "./PackageVersion-C5LvF-TN.js";
13
13
  import { _ as St } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const Ft = (U) => (et("data-v-a418a215"), U = U(), tt(), U), zt = ["id"], Tt = ["xmlns", "viewBox"], Yt = { key: 0 }, Xt = ["id"], Nt = ["stop-color"], Ot = ["offset", "stop-color"], It = ["offset", "stop-color"], At = ["stop-color"], Dt = { key: 1 }, Bt = ["id", "cx", "cy"], Mt = ["stop-color", "stop-opacity"], Vt = ["stop-color"], Gt = ["id"], jt = ["id"], Ht = /* @__PURE__ */ Ft(() => /* @__PURE__ */ f("feColorMatrix", {
14
+ const Ft = (U) => (et("data-v-3151515d"), U = U(), tt(), U), zt = ["id"], Tt = ["xmlns", "viewBox"], Yt = { key: 0 }, Xt = ["id"], Nt = ["stop-color"], Ot = ["offset", "stop-color"], It = ["offset", "stop-color"], At = ["stop-color"], Dt = { key: 1 }, Bt = ["id", "cx", "cy"], Mt = ["stop-color", "stop-opacity"], Vt = ["stop-color"], Gt = ["id"], jt = ["id"], Ht = /* @__PURE__ */ Ft(() => /* @__PURE__ */ f("feColorMatrix", {
15
15
  type: "saturate",
16
16
  values: "0"
17
- }, null, -1)), Ut = ["id"], Et = ["flood-color"], Rt = ["d", "stroke", "filter"], Wt = ["x1", "y1", "x2", "y2", "stroke", "filter"], qt = ["cx", "cy", "r", "fill", "filter"], Jt = ["stroke", "d"], Kt = ["d", "fill", "stroke", "stroke-width", "filter"], Qt = { key: 0 }, Zt = ["stroke", "d"], el = ["d", "fill", "stroke", "stroke-width", "filter"], tl = { key: 1 }, ll = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], al = ["cx", "cy", "r", "stroke"], ol = ["cx", "cy", "r", "fill"], ul = { key: 0 }, sl = ["d", "fill", "onMouseenter", "onClick"], nl = { key: 1 }, rl = ["cx", "cy", "r", "fill"], il = ["x", "y", "fill", "font-size"], vl = ["x", "y", "fill", "font-size"], cl = ["x", "y", "fill", "font-size"], dl = ["x", "y", "fill", "font-size"], hl = ["filter"], yl = { key: 0 }, fl = ["x", "y"], pl = { key: 1 }, gl = ["cx", "cy", "fill", "filter", "onClick"], bl = ["cx", "cy", "fill", "filter", "onClick"], ml = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], wl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], kl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], xl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], _l = { key: 2 }, Cl = ["x", "y", "width"], $l = ["x", "y", "width"], Pl = {
17
+ }, null, -1)), Ut = ["id"], Et = ["flood-color"], Rt = ["d", "stroke", "filter"], Wt = ["x1", "y1", "x2", "y2", "stroke", "filter"], qt = ["cx", "cy", "r", "fill", "filter"], Jt = ["stroke", "d"], Kt = ["d", "fill", "stroke", "stroke-width", "filter"], Qt = { key: 0 }, Zt = ["stroke", "d"], el = ["d", "fill", "stroke", "stroke-width", "filter"], tl = { key: 1 }, ll = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], al = ["cx", "cy", "r", "stroke"], ol = ["cx", "cy", "r", "fill"], ul = { key: 0 }, sl = ["d", "fill", "onMouseenter", "onClick"], nl = { key: 1 }, rl = ["cx", "cy", "r", "fill"], il = ["x", "y", "fill", "font-size"], vl = ["x", "y", "fill", "font-size"], cl = ["x", "y", "fill", "font-size"], dl = ["x", "y", "fill", "font-size"], hl = ["filter"], yl = { key: 0 }, fl = ["x", "y"], pl = { key: 1 }, gl = ["cx", "cy", "fill", "stroke", "filter", "onClick"], bl = ["cx", "cy", "fill", "stroke", "filter", "onClick"], ml = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], wl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], kl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], xl = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], _l = { key: 2 }, Cl = ["x", "y", "width"], $l = ["x", "y", "width"], Pl = {
18
18
  key: 3,
19
19
  class: "vue-data-ui-watermark"
20
20
  }, Ll = ["onClick"], Sl = {
@@ -770,6 +770,8 @@ const Ft = (U) => (et("data-v-a418a215"), U = U(), tt(), U), zt = ["id"], Tt = [
770
770
  cx: s(b)(t).x,
771
771
  cy: s(te)(t) - 3.5,
772
772
  fill: t.color,
773
+ stroke: e.value.style.chart.backgroundColor,
774
+ "stroke-width": 1,
773
775
  r: 3,
774
776
  filter: !e.value.useBlurOnHover || [null, void 0].includes(P.value) || P.value === a ? "" : `url(#blur_${x.value})`,
775
777
  onClick: (i) => B(t, a)
@@ -781,6 +783,8 @@ const Ft = (U) => (et("data-v-a418a215"), U = U(), tt(), U), zt = ["id"], Tt = [
781
783
  cx: s(F)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: o.value.width / 2, centerY: o.value.height / 2 }).x,
782
784
  cy: s(F)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: o.value.width / 2, centerY: o.value.height / 2 }).y,
783
785
  fill: t.color,
786
+ stroke: e.value.style.chart.backgroundColor,
787
+ "stroke-width": 1,
784
788
  r: 3,
785
789
  filter: !e.value.useBlurOnHover || [null, void 0].includes(P.value) || P.value === a ? "" : `url(#blur_${x.value})`,
786
790
  onClick: (i) => B(t, a)
@@ -1026,7 +1030,7 @@ const Ft = (U) => (et("data-v-a418a215"), U = U(), tt(), U), zt = ["id"], Tt = [
1026
1030
  }, 8, ["config"])) : v("", !0)
1027
1031
  ], 14, zt));
1028
1032
  }
1029
- }, Ul = /* @__PURE__ */ St(Tl, [["__scopeId", "data-v-a418a215"]]);
1033
+ }, Ul = /* @__PURE__ */ St(Tl, [["__scopeId", "data-v-3151515d"]]);
1030
1034
  export {
1031
1035
  Ul as default
1032
1036
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BwtKB_oG.cjs"),be=require("./Title-DcXqsD3c.cjs"),se=require("./usePrinter-BMJj8aqh.cjs"),xe=require("./DataTable-CUi5w5e6.cjs"),Be=require("./Legend-DP-Tm5Kr.cjs"),Ce=require("./vue-ui-skeleton-snFRuZgs.cjs"),_e=require("./Slicer-D7S48Lno.cjs"),Ee=require("./vue-ui-accordion-CM2NnUan.cjs"),ce=require("./useNestedProp-CE6ustAp.cjs"),Ne=require("./PackageVersion-DdGAD2ox.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Le=["xmlns","viewBox"],Ve=["id"],ze=["stop-color"],$e=["stop-color"],Fe=["id"],Ae=["stop-color"],De=["stop-color"],Pe=["stop-color"],Te={key:0},Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","font-size","fill","font-weight"],qe=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},Ge=["cx","cy","r","fill"],Ye={key:0},je={key:0},Ke=["d","stroke"],Je=["text-anchor","x","y","fill"],Qe=["cx","cy","r","fill"],Ze={key:0},et=["cx","cy","fill"],tt={key:1},lt=["d","fill","stroke"],at={key:2},ot=["d","fill","stroke"],ut=["x","y","font-size","fill"],rt=["x","y","width","fill","onClick"],nt=["x","y","width","height","onMouseenter","onClick"],st={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ct=["x","y","width","height","fill"],it=["x1","y1","x2","y2","stroke"],dt=["x1","y2","x2","y1","stroke"],vt=["onKeypress","cx","cy","r"],ht=["d","stroke"],yt=["cx","cy","r","fill"],mt=["d","fill","stroke"],ft={class:"vue-ui-donut-evolution-focus"},gt=["text-anchor","x","y","fill"],pt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],bt=["x","y","fill"],xt=["x","y","font-size","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Ct=["onClick"],_t={key:0},Et={key:1},Nt={key:0},wt={key:1},St={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const p=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),z=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},U.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(p.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),b=e.ref(null),W=e.ref(null),q=e.ref(0),U=e.ref(0),X=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:p.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>p.config,a=>{t.value=j(),R(),X.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),$=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 a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??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 F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){k.value||(h.value=null,A.value=null)}function fe(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,k.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=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(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.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(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function pe(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ke(a){V.value=a,q.value+=1}function re(){$.value.showTable=!$.value.showTable}return de({getData:pe,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,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:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${X.value}`,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"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),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:W.value,position:t.value.userOptions.position,onToggleFullscreen:ke,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},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:s})=>[e.renderSlot(a.$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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Ve),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ae),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Pe)],8,Fe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Te,[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,Oe),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,Ie),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Me,[(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)*f.value,x2:u.value.left+(s+1)*f.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,He))),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":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.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,Re)):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(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,We)):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+f.value*s+f.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,qe)):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":h.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,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[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,Ge)):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!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ye,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Je)]))),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!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ze,[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,et)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ot))),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!==h.value&&h.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:h.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(F(l.subtotal,l,s)),9,ut)):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*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,rt))),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*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,nt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",st,[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,ct),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,it),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,dt),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["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,vt),(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(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,ht)]))),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,yt),(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,mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,gt)]))),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,pt),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,kt),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(F(b.value.subtotal,b.value,null)),9,bt),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,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.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(_e.Slicer,{key:`slicer_${U.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":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$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(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",_t," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ct)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),z.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:$.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.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,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:c[3]||(c[3]=l=>$.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",Nt,"-")):(e.openBlock(),e.createElementBlock("b",wt,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,Se))}},Lt=we._export_sfc(St,[["__scopeId","data-v-715ec8d1"]]);exports.default=Lt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bv8wGGBc.cjs"),be=require("./Title-DWSN4YUC.cjs"),se=require("./usePrinter-7jNVagoH.cjs"),xe=require("./DataTable-YpBvWSn5.cjs"),Be=require("./Legend-CsYNhmuM.cjs"),Ce=require("./vue-ui-skeleton-TRdDtmHK.cjs"),_e=require("./Slicer-D-wCwIJ3.cjs"),Ee=require("./vue-ui-accordion-CSkH8Ztm.cjs"),ce=require("./useNestedProp-Bf7w6kTt.cjs"),Ne=require("./PackageVersion-kqwH1rG4.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Le=["xmlns","viewBox"],Ve=["id"],ze=["stop-color"],$e=["stop-color"],Fe=["id"],Ae=["stop-color"],De=["stop-color"],Pe=["stop-color"],Te={key:0},Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","font-size","fill","font-weight"],qe=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},Ge=["cx","cy","r","fill"],Ye={key:0},je={key:0},Ke=["d","stroke"],Je=["text-anchor","x","y","fill"],Qe=["cx","cy","r","fill"],Ze={key:0},et=["cx","cy","fill"],tt={key:1},lt=["d","fill","stroke"],at={key:2},ot=["d","fill","stroke"],ut=["x","y","font-size","fill"],rt=["x","y","width","fill","onClick"],nt=["x","y","width","height","onMouseenter","onClick"],st={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ct=["x","y","width","height","fill"],it=["x1","y1","x2","y2","stroke"],dt=["x1","y2","x2","y1","stroke"],vt=["onKeypress","cx","cy","r"],ht=["d","stroke"],yt=["cx","cy","r","fill"],mt=["d","fill","stroke"],ft={class:"vue-ui-donut-evolution-focus"},gt=["text-anchor","x","y","fill"],pt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],bt=["x","y","fill"],xt=["x","y","font-size","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Ct=["onClick"],_t={key:0},Et={key:1},Nt={key:0},wt={key:1},St={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const p=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),z=e.computed(()=>!!p.dataset&&p.dataset.length),i=e.ref({start:0,end:Math.max(...p.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},U.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(p.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):p.dataset.length&&p.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),k=e.ref(!1),b=e.ref(null),W=e.ref(null),q=e.ref(0),U=e.ref(0),X=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:p.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||p.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>p.config,a=>{t.value=j(),R(),X.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>p.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),$=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 a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(p.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),p.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??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 F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){k.value||(h.value=null,A.value=null)}function fe(a){k.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,k.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,k.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=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(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.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(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function pe(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ke(a){V.value=a,q.value+=1}function re(){$.value.showTable=!$.value.showTable}return de({getData:pe,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,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:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${X.value}`,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"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),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:W.value,position:t.value.userOptions.position,onToggleFullscreen:ke,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},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:s})=>[e.renderSlot(a.$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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),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":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Ve),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Ae),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Pe)],8,Fe)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Te,[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,Oe),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,Ie),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Me,[(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)*f.value,x2:u.value.left+(s+1)*f.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,He))),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":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.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,Re)):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(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,We)):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+f.value*s+f.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,qe)):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":h.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,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[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,Ge)):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!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ye,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0,20),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Je)]))),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!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ze,[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,et)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,ot))),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!==h.value&&h.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:h.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(F(l.subtotal,l,s)),9,ut)):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*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,rt))),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*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,nt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",st,[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,ct),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,it),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,dt),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["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,vt),(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(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,ht)]))),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,yt),(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,mt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,gt)]))),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,pt),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,kt),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(F(b.value.subtotal,b.value,null)),9,bt),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,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Le)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.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(_e.Slicer,{key:`slicer_${U.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":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$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(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",_t," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ct)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),z.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:$.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.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,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:c[3]||(c[3]=l=>$.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",Nt,"-")):(e.openBlock(),e.createElementBlock("b",wt,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,Se))}},Lt=we._export_sfc(St,[["__scopeId","data-v-715ec8d1"]]);exports.default=Lt;
@@ -1,14 +1,14 @@
1
1
  import { computed as x, ref as m, onMounted as Ke, watch as Fe, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as ae, createBlock as E, createCommentVNode as d, unref as c, createSlots as qe, withCtx as P, renderSlot as I, normalizeProps as ue, guardReactiveProps as oe, createVNode as Je, createElementVNode as v, Fragment as p, renderList as k, toDisplayString as b, withKeys as Qe, createTextVNode as Pe, nextTick as Ze } from "vue";
2
- import { u as et, o as tt, e as B, g as lt, c as De, t as at, a as ut, p as Y, b as ot, I as st, d as se, C as Ie, m as re, X as rt, s as U, D as nt, i as ne, f as K, j as Te, k as q, n as Ee, J as Oe, q as it, r as ct } from "./index-DK7qqHGP.js";
3
- import { _ as vt } from "./Title-Cxlu3Etv.js";
4
- import { u as dt, U as ht } from "./usePrinter-Cza87yNE.js";
5
- import { D as yt } from "./DataTable-B9SSwFM2.js";
6
- import { L as ft } from "./Legend-D4PxDNTf.js";
7
- import gt from "./vue-ui-skeleton-CQnYuosp.js";
8
- import { S as bt } from "./Slicer-Bk9LTQad.js";
9
- import xt from "./vue-ui-accordion-5C4CP3gA.js";
10
- import { u as Ve } from "./useNestedProp-0nRX_rTi.js";
11
- import { _ as mt } from "./PackageVersion-I1_4jcn_.js";
2
+ import { u as et, o as tt, e as B, g as lt, c as De, t as at, a as ut, p as Y, b as ot, I as st, d as se, C as Ie, m as re, X as rt, s as U, D as nt, i as ne, f as K, j as Te, k as q, n as Ee, J as Oe, q as it, r as ct } from "./index-BcpaEQjg.js";
3
+ import { _ as vt } from "./Title-BMSO566P.js";
4
+ import { u as dt, U as ht } from "./usePrinter-DzCuoQHM.js";
5
+ import { D as yt } from "./DataTable-TdEc8llA.js";
6
+ import { L as ft } from "./Legend-BsB-CXKk.js";
7
+ import gt from "./vue-ui-skeleton-C53xk8CG.js";
8
+ import { S as bt } from "./Slicer-BQr2RZjz.js";
9
+ import xt from "./vue-ui-accordion-Dhi5XiYk.js";
10
+ import { u as Ve } from "./useNestedProp-CEsVEbKF.js";
11
+ import { _ as mt } from "./PackageVersion-C5LvF-TN.js";
12
12
  import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const kt = ["id"], _t = ["xmlns", "viewBox"], Ct = ["id"], wt = ["stop-color"], Lt = ["stop-color"], $t = ["id"], St = ["stop-color"], At = ["stop-color"], Nt = ["stop-color"], zt = { key: 0 }, Ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = { key: 0 }, It = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = ["x", "y", "font-size", "fill", "font-weight"], Ot = ["text-anchor", "font-size", "fill", "transform"], Vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ht = { key: 1 }, Mt = ["cx", "cy", "r", "fill"], Wt = { key: 0 }, Rt = { key: 0 }, Ut = ["d", "stroke"], Xt = ["text-anchor", "x", "y", "fill"], Gt = ["cx", "cy", "r", "fill"], jt = { key: 0 }, Bt = ["cx", "cy", "fill"], Yt = { key: 1 }, Kt = ["d", "fill", "stroke"], qt = { key: 2 }, Jt = ["d", "fill", "stroke"], Qt = ["x", "y", "font-size", "fill"], Zt = ["x", "y", "width", "fill", "onClick"], el = ["x", "y", "width", "height", "onMouseenter", "onClick"], tl = {
14
14
  key: 3,
@@ -1,14 +1,14 @@
1
1
  import { computed as p, ref as y, watch as oe, onMounted as re, onBeforeUnmount as Le, openBlock as o, createElementBlock as r, normalizeClass as ne, normalizeStyle as V, createBlock as S, createCommentVNode as g, unref as d, createSlots as ze, withCtx as _, renderSlot as C, normalizeProps as ue, guardReactiveProps as ie, createVNode as Xe, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ce, nextTick as Se } from "vue";
2
- import { u as Ne, c as de, t as Ae, o as Te, e as ve, g as Pe, v as he, C as Ge, f as z, X as ye, i as E, l as be, h as fe, q as De, r as Ie } from "./index-DK7qqHGP.js";
2
+ import { u as Ne, c as de, t as Ae, o as Te, e as ve, g as Pe, v as he, C as Ge, f as z, X as ye, i as E, l as be, h as fe, q as De, r as Ie } from "./index-BcpaEQjg.js";
3
3
  import { t as Me, u as Fe } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Oe } from "./Title-Cxlu3Etv.js";
5
- import { u as Ve, U as Ee } from "./usePrinter-Cza87yNE.js";
6
- import { D as He } from "./DataTable-B9SSwFM2.js";
7
- import We from "./vue-ui-skeleton-CQnYuosp.js";
8
- import { L as Re } from "./Legend-D4PxDNTf.js";
9
- import Be from "./vue-ui-accordion-5C4CP3gA.js";
10
- import { u as ge } from "./useNestedProp-0nRX_rTi.js";
11
- import { _ as Ue } from "./PackageVersion-I1_4jcn_.js";
4
+ import { _ as Oe } from "./Title-BMSO566P.js";
5
+ import { u as Ve, U as Ee } from "./usePrinter-DzCuoQHM.js";
6
+ import { D as He } from "./DataTable-TdEc8llA.js";
7
+ import We from "./vue-ui-skeleton-C53xk8CG.js";
8
+ import { L as Re } from "./Legend-BsB-CXKk.js";
9
+ import Be from "./vue-ui-accordion-Dhi5XiYk.js";
10
+ import { u as ge } from "./useNestedProp-CEsVEbKF.js";
11
+ import { _ as Ue } from "./PackageVersion-C5LvF-TN.js";
12
12
  import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const qe = ["id"], Ye = ["xmlns", "viewBox"], Ze = { key: 0 }, Je = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ke = { key: 1 }, Qe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], tt = { key: 2 }, lt = ["x", "y", "font-size", "fill", "font-weight"], at = ["x", "y", "font-size", "fill"], st = { key: 3 }, ot = ["x", "y", "font-size", "fill", "font-weight"], rt = ["id"], nt = ["stop-color"], ut = ["stop-color"], it = ["stop-color"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], ht = ["stop-color"], yt = ["id"], bt = ["stop-color"], ft = ["stop-color"], gt = ["id"], mt = ["stop-color"], pt = ["stop-color"], _t = { key: 0 }, xt = ["d", "fill"], kt = { key: 1 }, Ct = ["x", "y", "height", "width", "fill"], wt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], $t = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Lt = { key: 2 }, zt = ["x", "y", "fill", "font-size"], Xt = { key: 3 }, St = ["x", "y", "fill", "font-size"], Nt = {
14
14
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BwtKB_oG.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-DcXqsD3c.cjs"),W=require("./usePrinter-BMJj8aqh.cjs"),ae=require("./DataTable-CUi5w5e6.cjs"),oe=require("./vue-ui-skeleton-snFRuZgs.cjs"),re=require("./Legend-DP-Tm5Kr.cjs"),se=require("./vue-ui-accordion-CM2NnUan.cjs"),U=require("./useNestedProp-CE6ustAp.cjs"),ne=require("./PackageVersion-DdGAD2ox.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],ie=["xmlns","viewBox"],de={key:0},ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],he={key:1},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:2},be=["x","y","font-size","fill","font-weight"],ge=["x","y","font-size","fill"],pe={key:3},ke=["x","y","font-size","fill","font-weight"],_e=["id"],xe=["stop-color"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le=["stop-color"],$e=["id"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Xe=["stop-color"],Pe=["stop-color"],Ae={key:0},Te=["d","fill"],De={key:1},Fe=["x","y","height","width","fill"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge=["cx","cy","r","fill","stroke","stroke-width"],Ie={key:2},Oe=["x","y","fill","font-size"],He={key:3},qe=["x","y","fill","font-size"],Re={key:3,class:"vue-data-ui-watermark"},We=["xmlns","height","width"],Ue=["fill"],je=["innerHTML"],Ye={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Je}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),V=e.ref(null),S=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>P(),set:a=>a});function P(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=P(),A(),S.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{A()});function A(){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=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.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,start:s.checkNaN(a.start),end:s.checkNaN(a.end),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]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.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:g.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(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){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>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const O=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.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_${d.value})`:t.value.style.chart.plots.endColor}]),K=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":""})),f=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=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.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:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),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 H(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].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 p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:H,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.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_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${S.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.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:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:q},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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.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,ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",he,[(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*i.value,y2:o.value.top+r*i.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,ye))),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,me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",fe,[(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*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.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,be))),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*i.value+i.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,ge))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.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.applyDataLabel)(t.value.style.chart.labels.formatter,l,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}),{datapoint:l,seriesIndex:r})),9,ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.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,xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,we)],8,_e),e.createElementVNode("radialGradient",{id:`end_grad_${d.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,Ne),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Le)],8,Be)]),(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_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,$e),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Pe)],8,ze)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bv8wGGBc.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-DWSN4YUC.cjs"),W=require("./usePrinter-7jNVagoH.cjs"),ae=require("./DataTable-YpBvWSn5.cjs"),oe=require("./vue-ui-skeleton-TRdDtmHK.cjs"),re=require("./Legend-CsYNhmuM.cjs"),se=require("./vue-ui-accordion-CSkH8Ztm.cjs"),U=require("./useNestedProp-Bf7w6kTt.cjs"),ne=require("./PackageVersion-kqwH1rG4.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],ie=["xmlns","viewBox"],de={key:0},ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],he={key:1},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:2},be=["x","y","font-size","fill","font-weight"],ge=["x","y","font-size","fill"],pe={key:3},ke=["x","y","font-size","fill","font-weight"],_e=["id"],xe=["stop-color"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le=["stop-color"],$e=["id"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Xe=["stop-color"],Pe=["stop-color"],Ae={key:0},Te=["d","fill"],De={key:1},Fe=["x","y","height","width","fill"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge=["cx","cy","r","fill","stroke","stroke-width"],Ie={key:2},Oe=["x","y","fill","font-size"],He={key:3},qe=["x","y","fill","font-size"],Re={key:3,class:"vue-data-ui-watermark"},We=["xmlns","height","width"],Ue=["fill"],je=["innerHTML"],Ye={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Je}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),V=e.ref(null),S=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>P(),set:a=>a});function P(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=P(),A(),S.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{A()});function A(){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=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.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,start:s.checkNaN(a.start),end:s.checkNaN(a.end),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]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.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:g.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(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){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>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const O=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.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_${d.value})`:t.value.style.chart.plots.endColor}]),K=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":""})),f=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=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.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:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),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 H(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].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 p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:H,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.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_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${S.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.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:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:q},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","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.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,ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",he,[(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*i.value,y2:o.value.top+r*i.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,ye))),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,me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",fe,[(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*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.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,be))),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*i.value+i.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,ge))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.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.applyDataLabel)(t.value.style.chart.labels.formatter,l,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}),{datapoint:l,seriesIndex:r})),9,ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.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,xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,we)],8,_e),e.createElementVNode("radialGradient",{id:`end_grad_${d.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,Ne),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Le)],8,Be)]),(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_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,$e),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Pe)],8,ze)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[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}