vue-data-ui 2.3.93 → 2.3.94

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 (147) hide show
  1. package/dist/{Arrow-DvOpIAlY.cjs → Arrow-Dqk-HgBj.cjs} +1 -1
  2. package/dist/{Arrow-tI6NQ7Cn.js → Arrow-FQNwuQt_.js} +1 -1
  3. package/dist/{BaseIcon-4CP9SAhe.js → BaseIcon-CcOdzI48.js} +1 -1
  4. package/dist/{BaseIcon-CNOWc7Xz.cjs → BaseIcon-DhAyJ2rW.cjs} +1 -1
  5. package/dist/{DataTable-BUgJSK3f.js → DataTable-D1vDu_2B.js} +2 -2
  6. package/dist/{DataTable-DhUk55WP.cjs → DataTable-kOScyzFF.cjs} +1 -1
  7. package/dist/{Legend-WO0bF0ud.cjs → Legend-BJdr5n-o.cjs} +1 -1
  8. package/dist/{Legend-C2KtRxbi.js → Legend-CZk6McMv.js} +1 -1
  9. package/dist/{PackageVersion-Cy2QrPIN.js → PackageVersion-DDKechCD.js} +1 -1
  10. package/dist/{PackageVersion-B_T5VqI7.cjs → PackageVersion-Tm6EPIDH.cjs} +1 -1
  11. package/dist/{Shape-CvvlB7a8.cjs → Shape-CHWOgbhq.cjs} +1 -1
  12. package/dist/{Shape-ovEGVZTS.js → Shape-CY3Tsyaq.js} +1 -1
  13. package/dist/{Slicer-ChxIxUKY.cjs → Slicer-C0R4JA2q.cjs} +1 -1
  14. package/dist/{Slicer-C4yPLRzp.js → Slicer-DBVND1TR.js} +15 -15
  15. package/dist/{Title-CczWCvrd.js → Title-B6kWQmNb.js} +1 -1
  16. package/dist/{Title-BRktfjVS.cjs → Title-DAEaaXFr.cjs} +1 -1
  17. package/dist/{Tooltip-iisamh_I.cjs → Tooltip-Cb9jWppv.cjs} +1 -1
  18. package/dist/{Tooltip-CLelGHFy.js → Tooltip-Cwp4dS4t.js} +1 -1
  19. package/dist/{index-B9ExL-Ae.js → index-Bu852AzK.js} +725 -705
  20. package/dist/index-jAZxyteD.cjs +9 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1 -0
  23. package/dist/types/vue-data-ui.d.ts +1 -0
  24. package/dist/{useNestedProp-BI1wvb44.js → useNestedProp-1sCLAHuR.js} +1 -1
  25. package/dist/{useNestedProp-CQjoDc6x.cjs → useNestedProp-DksYpyh6.cjs} +1 -1
  26. package/dist/{usePrinter-CUStN20z.js → usePrinter-CaNEdNUc.js} +1 -1
  27. package/dist/{usePrinter-BYx8odJu.cjs → usePrinter-Cx-xmAjb.cjs} +1 -1
  28. package/dist/{vue-data-ui-CUhpUmv_.js → vue-data-ui-DRT0INR_.js} +57 -57
  29. package/dist/{vue-data-ui-Bn0hx7hG.cjs → vue-data-ui-DVWQuwQb.cjs} +1 -1
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +5 -5
  32. package/dist/{vue-ui-3d-bar-CxlYseaq.js → vue-ui-3d-bar-CwTmIafL.js} +8 -8
  33. package/dist/{vue-ui-3d-bar-BL-ZhuNx.cjs → vue-ui-3d-bar-fPokAY4t.cjs} +1 -1
  34. package/dist/{vue-ui-accordion-SZPrlCJb.js → vue-ui-accordion-CBwmD_zS.js} +3 -3
  35. package/dist/{vue-ui-accordion-DzbFctbI.cjs → vue-ui-accordion-WXKee19V.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-B1IVehHW.js → vue-ui-age-pyramid-BuJ384HP.js} +9 -9
  37. package/dist/{vue-ui-age-pyramid-vnFYLLSN.cjs → vue-ui-age-pyramid-CSlbHHIq.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-DGedspml.js → vue-ui-annotator-CQQfgcyq.js} +1 -1
  39. package/dist/{vue-ui-annotator-Cv6XubR6.cjs → vue-ui-annotator-DqCVD1IT.cjs} +1 -1
  40. package/dist/{vue-ui-candlestick-CIJdWFvp.cjs → vue-ui-candlestick-2uxcI-Xb.cjs} +1 -1
  41. package/dist/{vue-ui-candlestick-DGN9u4Fc.js → vue-ui-candlestick-O0pBnymd.js} +10 -10
  42. package/dist/{vue-ui-carousel-table-BgDKAsLu.js → vue-ui-carousel-table-CpaHwBTF.js} +4 -4
  43. package/dist/{vue-ui-carousel-table-kawG2Va2.cjs → vue-ui-carousel-table-DJelccvO.cjs} +1 -1
  44. package/dist/{vue-ui-chestnut-mz-4OECX.cjs → vue-ui-chestnut-DoS0ZkSz.cjs} +1 -1
  45. package/dist/{vue-ui-chestnut-CtFOgJmT.js → vue-ui-chestnut-bP29gPF2.js} +7 -7
  46. package/dist/{vue-ui-cursor-BJ2nafdy.js → vue-ui-cursor-BXsEO1jQ.js} +2 -2
  47. package/dist/{vue-ui-cursor-BVS2YR2w.cjs → vue-ui-cursor-DvrLmTy2.cjs} +1 -1
  48. package/dist/{vue-ui-dashboard-wvzwXNCc.cjs → vue-ui-dashboard-CtAtCuEu.cjs} +1 -1
  49. package/dist/{vue-ui-dashboard-D93KqjL8.js → vue-ui-dashboard-VQiRxgUe.js} +2 -2
  50. package/dist/{vue-ui-digits-CTpbhzau.js → vue-ui-digits-2h-uYg5M.js} +2 -2
  51. package/dist/{vue-ui-digits-2e8Z2Ynp.cjs → vue-ui-digits-DxwUUK2a.cjs} +1 -1
  52. package/dist/vue-ui-donut-CVkNiaR7.js +999 -0
  53. package/dist/vue-ui-donut-ClCDBTXq.cjs +1 -0
  54. package/dist/{vue-ui-donut-evolution-DJpu3Zul.cjs → vue-ui-donut-evolution-CVy-DhHk.cjs} +1 -1
  55. package/dist/{vue-ui-donut-evolution-Cj4VUlYA.js → vue-ui-donut-evolution-D0HDE6fN.js} +53 -53
  56. package/dist/{vue-ui-dumbbell-DW9hFZTK.cjs → vue-ui-dumbbell-CblIThyd.cjs} +1 -1
  57. package/dist/{vue-ui-dumbbell-B5K8A6JO.js → vue-ui-dumbbell-DIVxIXgO.js} +9 -9
  58. package/dist/{vue-ui-flow-D7G8pT5u.js → vue-ui-flow-Cy5HKKbs.js} +20 -20
  59. package/dist/{vue-ui-flow-BPZIx63s.cjs → vue-ui-flow-Dbw0yzSb.cjs} +1 -1
  60. package/dist/{vue-ui-galaxy-zxi6Dh6-.js → vue-ui-galaxy-CBR86BVE.js} +23 -23
  61. package/dist/{vue-ui-galaxy-CJwQngRy.cjs → vue-ui-galaxy-Z5-e5hHG.cjs} +1 -1
  62. package/dist/{vue-ui-gauge-Dl84wBq2.js → vue-ui-gauge-BwC9HPyF.js} +19 -19
  63. package/dist/{vue-ui-gauge-BCOp8MfJ.cjs → vue-ui-gauge-DAgx6nds.cjs} +1 -1
  64. package/dist/{vue-ui-gizmo-PUYvN73T.cjs → vue-ui-gizmo-5FygVg05.cjs} +1 -1
  65. package/dist/{vue-ui-gizmo-BGeEyNk4.js → vue-ui-gizmo-D6U5riWt.js} +3 -3
  66. package/dist/{vue-ui-heatmap-B98p2zoa.js → vue-ui-heatmap-PVlvCw_B.js} +9 -9
  67. package/dist/{vue-ui-heatmap-9Upu_lU9.cjs → vue-ui-heatmap-XVVbgtw6.cjs} +1 -1
  68. package/dist/{vue-ui-kpi-BjucxBZ5.cjs → vue-ui-kpi-2eoTT0Hv.cjs} +1 -1
  69. package/dist/{vue-ui-kpi-1_lGwzeP.js → vue-ui-kpi-DiG34MXd.js} +3 -3
  70. package/dist/{vue-ui-mini-loader-B6595FMr.js → vue-ui-mini-loader-CVOfsZ-d.js} +2 -2
  71. package/dist/{vue-ui-mini-loader-OY5XrOYB.cjs → vue-ui-mini-loader-DpoTiQhx.cjs} +1 -1
  72. package/dist/{vue-ui-molecule-DaJsYbo1.js → vue-ui-molecule-85QzZoSm.js} +29 -29
  73. package/dist/{vue-ui-molecule-xmP8sBoH.cjs → vue-ui-molecule-Mt0YXGcP.cjs} +1 -1
  74. package/dist/{vue-ui-mood-radar-CB1zZjs3.cjs → vue-ui-mood-radar-B3xF0_xt.cjs} +1 -1
  75. package/dist/{vue-ui-mood-radar-CdGd-5lQ.js → vue-ui-mood-radar-Ds21V6oP.js} +21 -21
  76. package/dist/{vue-ui-nested-donuts-CYmpCetP.js → vue-ui-nested-donuts-BrMouz8T.js} +46 -46
  77. package/dist/{vue-ui-nested-donuts-BkKTALZ7.cjs → vue-ui-nested-donuts-DFrY4v-O.cjs} +1 -1
  78. package/dist/{vue-ui-onion-BuimOxUF.cjs → vue-ui-onion-CQu0-ZlV.cjs} +1 -1
  79. package/dist/{vue-ui-onion-BOi0j3dJ.js → vue-ui-onion-ZWa0bPAG.js} +10 -10
  80. package/dist/{vue-ui-parallel-coordinate-plot-Bah-cYZ5.cjs → vue-ui-parallel-coordinate-plot-Cet-vJ3E.cjs} +1 -1
  81. package/dist/{vue-ui-parallel-coordinate-plot-DfRYipb8.js → vue-ui-parallel-coordinate-plot-SpCkXomG.js} +11 -11
  82. package/dist/{vue-ui-quadrant-CVUZ1p2G.cjs → vue-ui-quadrant-B1fnSqPf.cjs} +1 -1
  83. package/dist/{vue-ui-quadrant-39hB1-rW.js → vue-ui-quadrant-DwxUTnpH.js} +11 -11
  84. package/dist/{vue-ui-quick-chart-8aeQmszL.js → vue-ui-quick-chart-DDSDdZMZ.js} +8 -8
  85. package/dist/{vue-ui-quick-chart-DJET2y_F.cjs → vue-ui-quick-chart-DSOONkrO.cjs} +1 -1
  86. package/dist/{vue-ui-radar-mk61hrfQ.cjs → vue-ui-radar-CQJzxB9Y.cjs} +1 -1
  87. package/dist/{vue-ui-radar-BHV5OcIH.js → vue-ui-radar-Cc4hxNkF.js} +11 -11
  88. package/dist/{vue-ui-rating-D0eIeFuP.js → vue-ui-rating-CRs01ao2.js} +7 -7
  89. package/dist/{vue-ui-rating-Dt46yKur.cjs → vue-ui-rating-DRLfSg4n.cjs} +1 -1
  90. package/dist/{vue-ui-relation-circle-D8tlElyL.cjs → vue-ui-relation-circle-BZcoHhTb.cjs} +1 -1
  91. package/dist/{vue-ui-relation-circle-CLWjo7gq.js → vue-ui-relation-circle-mlXpg86O.js} +6 -6
  92. package/dist/{vue-ui-rings-BrcZ1Q6y.js → vue-ui-rings-DHlbwWrt.js} +37 -37
  93. package/dist/{vue-ui-rings-CjOr2fTq.cjs → vue-ui-rings-OeMdVo_s.cjs} +1 -1
  94. package/dist/{vue-ui-scatter-DElf7q_o.cjs → vue-ui-scatter-D65sxQAb.cjs} +1 -1
  95. package/dist/{vue-ui-scatter-wq1Ygozo.js → vue-ui-scatter-DtX5NOb_.js} +34 -34
  96. package/dist/{vue-ui-screenshot-WpUmWa8T.cjs → vue-ui-screenshot-B1pv3wKU.cjs} +1 -1
  97. package/dist/{vue-ui-screenshot-BD6eevS2.js → vue-ui-screenshot-BwgdW92q.js} +1 -1
  98. package/dist/{vue-ui-skeleton-DokgyuHD.js → vue-ui-skeleton-B-obKEDg.js} +49 -49
  99. package/dist/{vue-ui-skeleton-7g5Z7tL8.cjs → vue-ui-skeleton-C14g9G-o.cjs} +1 -1
  100. package/dist/{vue-ui-smiley-M433_VGc.cjs → vue-ui-smiley-CHY-BKbe.cjs} +1 -1
  101. package/dist/{vue-ui-smiley-BTzWzbXj.js → vue-ui-smiley-i8xqKjND.js} +2 -2
  102. package/dist/{vue-ui-spark-trend-DVYSjWgR.js → vue-ui-spark-trend-DzZsfML2.js} +20 -20
  103. package/dist/{vue-ui-spark-trend-CVY2563q.cjs → vue-ui-spark-trend-i3VmY_gx.cjs} +1 -1
  104. package/dist/{vue-ui-sparkbar-CW6U_9yF.js → vue-ui-sparkbar-7rOXvOgH.js} +4 -4
  105. package/dist/{vue-ui-sparkbar-B5bm048m.cjs → vue-ui-sparkbar-BnYKNJWQ.cjs} +1 -1
  106. package/dist/{vue-ui-sparkgauge-P6vT35bq.cjs → vue-ui-sparkgauge-BuOMrzYW.cjs} +1 -1
  107. package/dist/{vue-ui-sparkgauge-Da2vhyRe.js → vue-ui-sparkgauge-DnphjNVE.js} +11 -11
  108. package/dist/{vue-ui-sparkhistogram-BRE4BZ1r.cjs → vue-ui-sparkhistogram-DZaNR3tu.cjs} +1 -1
  109. package/dist/{vue-ui-sparkhistogram-DgyNNNYs.js → vue-ui-sparkhistogram-DvLl4E_s.js} +5 -5
  110. package/dist/{vue-ui-sparkline-BNzFzh6O.cjs → vue-ui-sparkline-BpmqNCQy.cjs} +1 -1
  111. package/dist/{vue-ui-sparkline-B6F6GG5I.js → vue-ui-sparkline-CPjnG7wg.js} +21 -21
  112. package/dist/{vue-ui-sparkstackbar-DAZsawIt.js → vue-ui-sparkstackbar-BGgNBuJz.js} +4 -4
  113. package/dist/{vue-ui-sparkstackbar-uWzUzXeY.cjs → vue-ui-sparkstackbar-CJ17fiW5.cjs} +1 -1
  114. package/dist/{vue-ui-stackbar-DuvFbd8S.cjs → vue-ui-stackbar-CFoe4XwZ.cjs} +1 -1
  115. package/dist/{vue-ui-stackbar-Dm2aCHhH.js → vue-ui-stackbar-SFKe9f6_.js} +11 -11
  116. package/dist/{vue-ui-strip-plot-XYPsVx2s.cjs → vue-ui-strip-plot-B8utOfmZ.cjs} +1 -1
  117. package/dist/{vue-ui-strip-plot-B_j6rXqf.js → vue-ui-strip-plot-CGgheJ1-.js} +10 -10
  118. package/dist/{vue-ui-table-BZjBiutU.cjs → vue-ui-table-BpSsgihB.cjs} +1 -1
  119. package/dist/{vue-ui-table-Ba8yWxlH.js → vue-ui-table-JOi6x-Kt.js} +10 -10
  120. package/dist/{vue-ui-table-heatmap-B72rWSp8.js → vue-ui-table-heatmap-EeR8_0fs.js} +23 -23
  121. package/dist/{vue-ui-table-heatmap-ChZ4LL-2.cjs → vue-ui-table-heatmap-fNf5Hgfn.cjs} +1 -1
  122. package/dist/{vue-ui-table-sparkline-g1tiRXu-.js → vue-ui-table-sparkline-of9ZervK.js} +15 -15
  123. package/dist/{vue-ui-table-sparkline-D9KYyLun.cjs → vue-ui-table-sparkline-yjChfsNj.cjs} +1 -1
  124. package/dist/{vue-ui-thermometer-Bx9kCvPP.cjs → vue-ui-thermometer-Ct59Zrkd.cjs} +1 -1
  125. package/dist/{vue-ui-thermometer-BUj-EXSI.js → vue-ui-thermometer-Hb5jQa3y.js} +6 -6
  126. package/dist/{vue-ui-timer-BMi1tOzP.js → vue-ui-timer-Duo6PjNq.js} +5 -5
  127. package/dist/{vue-ui-timer-DgVg5v8D.cjs → vue-ui-timer-nIKem40S.cjs} +1 -1
  128. package/dist/{vue-ui-tiremarks-gGC8LSGo.cjs → vue-ui-tiremarks-D5vYyYcq.cjs} +1 -1
  129. package/dist/{vue-ui-tiremarks-B8E61MPf.js → vue-ui-tiremarks-rxEA2WzL.js} +6 -6
  130. package/dist/{vue-ui-treemap-Cha1rQBU.cjs → vue-ui-treemap-DK5klTWq.cjs} +1 -1
  131. package/dist/{vue-ui-treemap-D5QTDSSq.js → vue-ui-treemap-DWDrLYPR.js} +10 -10
  132. package/dist/{vue-ui-vertical-bar-BL5Issc0.js → vue-ui-vertical-bar-3TzyIQBn.js} +10 -10
  133. package/dist/{vue-ui-vertical-bar-BSzFwrWa.cjs → vue-ui-vertical-bar-CCOjOr9t.cjs} +1 -1
  134. package/dist/{vue-ui-waffle-Dh08N5SM.js → vue-ui-waffle-CUiQJf4B.js} +23 -23
  135. package/dist/{vue-ui-waffle-DxTyNZYn.cjs → vue-ui-waffle-CzbWP2YI.cjs} +1 -1
  136. package/dist/{vue-ui-wheel-DyjcbZnB.cjs → vue-ui-wheel-BgLqSlSe.cjs} +1 -1
  137. package/dist/{vue-ui-wheel-DpywOj9b.js → vue-ui-wheel-DJe1aYWh.js} +6 -6
  138. package/dist/{vue-ui-word-cloud-C7cBuLEd.cjs → vue-ui-word-cloud-CS4EPwJc.cjs} +1 -1
  139. package/dist/{vue-ui-word-cloud-CEtvW8ZU.js → vue-ui-word-cloud-ouNY0ixo.js} +36 -36
  140. package/dist/{vue-ui-xy-WnaajCFT.cjs → vue-ui-xy-DkHIDMtO.cjs} +1 -1
  141. package/dist/{vue-ui-xy-canvas-nbhxY42M.js → vue-ui-xy-canvas-CGG7Levw.js} +34 -34
  142. package/dist/{vue-ui-xy-canvas-7YaG0Huj.cjs → vue-ui-xy-canvas-iMF1sItL.cjs} +1 -1
  143. package/dist/{vue-ui-xy-C1EbGmWi.js → vue-ui-xy-iQJGfaFk.js} +28 -28
  144. package/package.json +1 -1
  145. package/dist/index-CYdWUfPi.cjs +0 -4
  146. package/dist/vue-ui-donut-CJ4HeqiO.cjs +0 -1
  147. package/dist/vue-ui-donut-CjkJB0CP.js +0 -871
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CYdWUfPi.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-BRktfjVS.cjs"),W=require("./usePrinter-BYx8odJu.cjs"),ae=require("./DataTable-DhUk55WP.cjs"),oe=require("./vue-ui-skeleton-7g5Z7tL8.cjs"),re=require("./Legend-WO0bF0ud.cjs"),se=require("./vue-ui-accordion-DzbFctbI.cjs"),U=require("./useNestedProp-CQjoDc6x.cjs"),ne=require("./PackageVersion-B_T5VqI7.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-jAZxyteD.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-DAEaaXFr.cjs"),W=require("./usePrinter-Cx-xmAjb.cjs"),ae=require("./DataTable-kOScyzFF.cjs"),oe=require("./vue-ui-skeleton-C14g9G-o.cjs"),re=require("./Legend-BJdr5n-o.cjs"),se=require("./vue-ui-accordion-WXKee19V.cjs"),U=require("./useNestedProp-DksYpyh6.cjs"),ne=require("./PackageVersion-Tm6EPIDH.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}
@@ -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-B9ExL-Ae.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-Bu852AzK.js";
3
3
  import { t as Me, u as Fe } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Oe } from "./Title-CczWCvrd.js";
5
- import { u as Ve, U as Ee } from "./usePrinter-CUStN20z.js";
6
- import { D as He } from "./DataTable-BUgJSK3f.js";
7
- import We from "./vue-ui-skeleton-DokgyuHD.js";
8
- import { L as Re } from "./Legend-C2KtRxbi.js";
9
- import Be from "./vue-ui-accordion-SZPrlCJb.js";
10
- import { u as ge } from "./useNestedProp-BI1wvb44.js";
11
- import { _ as Ue } from "./PackageVersion-Cy2QrPIN.js";
4
+ import { _ as Oe } from "./Title-B6kWQmNb.js";
5
+ import { u as Ve, U as Ee } from "./usePrinter-CaNEdNUc.js";
6
+ import { D as He } from "./DataTable-D1vDu_2B.js";
7
+ import We from "./vue-ui-skeleton-B-obKEDg.js";
8
+ import { L as Re } from "./Legend-CZk6McMv.js";
9
+ import Be from "./vue-ui-accordion-CBwmD_zS.js";
10
+ import { u as ge } from "./useNestedProp-1sCLAHuR.js";
11
+ import { _ as Ue } from "./PackageVersion-DDKechCD.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,12 +1,12 @@
1
1
  import { computed as m, onMounted as He, ref as y, watch as Oe, openBlock as r, createElementBlock as h, normalizeClass as ce, normalizeStyle as _, createBlock as E, createCommentVNode as T, unref as i, createSlots as Ee, withCtx as k, renderSlot as C, normalizeProps as de, guardReactiveProps as ve, createVNode as fe, createElementVNode as S, Fragment as P, renderList as F, toDisplayString as U, createTextVNode as Se, nextTick as Me } from "vue";
2
- import { u as ze, o as Ye, e as De, c as he, t as Ge, a as Be, p as V, b as Ae, v, f as me, X as Ue, F as ge, I as Ve, i as je, q as Xe, r as We } from "./index-B9ExL-Ae.js";
3
- import { _ as qe } from "./Title-CczWCvrd.js";
4
- import { u as Re, U as Ze } from "./usePrinter-CUStN20z.js";
5
- import { D as Je } from "./DataTable-BUgJSK3f.js";
6
- import Ke from "./vue-ui-accordion-SZPrlCJb.js";
7
- import Qe from "./vue-ui-skeleton-DokgyuHD.js";
8
- import { u as pe } from "./useNestedProp-BI1wvb44.js";
9
- import { _ as et } from "./PackageVersion-Cy2QrPIN.js";
2
+ import { u as ze, o as Ye, e as De, c as he, t as Ge, a as Be, p as V, b as Ae, v, f as me, X as Ue, F as ge, K as Ve, i as je, q as Xe, r as We } from "./index-Bu852AzK.js";
3
+ import { _ as qe } from "./Title-B6kWQmNb.js";
4
+ import { u as Ke, U as Re } from "./usePrinter-CaNEdNUc.js";
5
+ import { D as Ze } from "./DataTable-D1vDu_2B.js";
6
+ import Je from "./vue-ui-accordion-CBwmD_zS.js";
7
+ import Qe from "./vue-ui-skeleton-B-obKEDg.js";
8
+ import { u as pe } from "./useNestedProp-1sCLAHuR.js";
9
+ import { _ as et } from "./PackageVersion-DDKechCD.js";
10
10
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const lt = ["id"], ot = {
12
12
  key: 0,
@@ -46,10 +46,10 @@ const lt = ["id"], ot = {
46
46
  N.value = t, W.value += 1;
47
47
  }
48
48
  const e = m({
49
- get: () => R(),
49
+ get: () => K(),
50
50
  set: (t) => t
51
51
  });
52
- function R() {
52
+ function K() {
53
53
  const t = pe({
54
54
  userConfig: g.config,
55
55
  defaultConfig: ke
@@ -63,9 +63,9 @@ const lt = ["id"], ot = {
63
63
  } : t;
64
64
  }
65
65
  Oe(() => g.config, (t) => {
66
- e.value = R(), j(), q.value += 1;
66
+ e.value = K(), j(), q.value += 1;
67
67
  }, { deep: !0 });
68
- const { isPrinting: Z, isImaging: J, generatePdf: K, generateImage: Q } = Re({
68
+ const { isPrinting: R, isImaging: Z, generatePdf: J, generateImage: Q } = Ke({
69
69
  elementId: `flow_${z.value}`,
70
70
  fileName: e.value.style.chart.title.text || "vue-ui-flow"
71
71
  }), Y = m(() => Ae(e.value.customPalette)), ee = m(() => e.value.style.chart.nodes.gap), x = m(() => e.value.style.chart.nodes.width), I = y({
@@ -268,7 +268,7 @@ const lt = ["id"], ot = {
268
268
  getData: Ie,
269
269
  generateCsv: ae,
270
270
  generateImage: Q,
271
- generatePdf: K,
271
+ generatePdf: J,
272
272
  toggleTable: ne
273
273
  }), (t, o) => (r(), h("div", {
274
274
  ref_key: "flowChart",
@@ -292,13 +292,13 @@ const lt = ["id"], ot = {
292
292
  }
293
293
  }, null, 8, ["config"]))
294
294
  ])) : T("", !0),
295
- e.value.userOptions.show && M.value ? (r(), E(Ze, {
295
+ e.value.userOptions.show && M.value ? (r(), E(Re, {
296
296
  ref: "details",
297
297
  key: `user_option_${W.value}`,
298
298
  backgroundColor: e.value.style.chart.backgroundColor,
299
299
  color: e.value.style.chart.color,
300
- isPrinting: i(Z),
301
- isImaging: i(J),
300
+ isPrinting: i(R),
301
+ isImaging: i(Z),
302
302
  uid: z.value,
303
303
  hasPdf: e.value.userOptions.buttons.pdf,
304
304
  hasXls: e.value.userOptions.buttons.csv,
@@ -310,7 +310,7 @@ const lt = ["id"], ot = {
310
310
  chartElement: X.value,
311
311
  position: e.value.userOptions.position,
312
312
  onToggleFullscreen: we,
313
- onGeneratePdf: i(K),
313
+ onGeneratePdf: i(J),
314
314
  onGenerateCsv: ae,
315
315
  onGenerateImage: i(Q),
316
316
  onToggleTable: ne
@@ -426,7 +426,7 @@ const lt = ["id"], ot = {
426
426
  C(t.$slots, "svg", { svg: G.value }, void 0, !0)
427
427
  ], 14, at)),
428
428
  t.$slots.watermark ? (r(), h("div", vt, [
429
- C(t.$slots, "watermark", de(ve({ isPrinting: i(Z) || i(J) })), void 0, !0)
429
+ C(t.$slots, "watermark", de(ve({ isPrinting: i(R) || i(Z) })), void 0, !0)
430
430
  ])) : T("", !0),
431
431
  M.value ? T("", !0) : (r(), E(Qe, {
432
432
  key: 3,
@@ -437,7 +437,7 @@ const lt = ["id"], ot = {
437
437
  }
438
438
  }
439
439
  }, null, 8, ["config"])),
440
- M.value ? (r(), E(Ke, {
440
+ M.value ? (r(), E(Je, {
441
441
  key: 4,
442
442
  hideDetails: "",
443
443
  config: {
@@ -454,7 +454,7 @@ const lt = ["id"], ot = {
454
454
  }
455
455
  }, {
456
456
  content: k(() => [
457
- fe(Je, {
457
+ fe(Ze, {
458
458
  colNames: H.value.colNames,
459
459
  head: H.value.head,
460
460
  body: H.value.body,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CYdWUfPi.cjs"),fe=require("./Title-BRktfjVS.cjs"),Z=require("./usePrinter-BYx8odJu.cjs"),he=require("./DataTable-DhUk55WP.cjs"),ve=require("./vue-ui-accordion-DzbFctbI.cjs"),me=require("./vue-ui-skeleton-7g5Z7tL8.cjs"),J=require("./useNestedProp-CQjoDc6x.cjs"),pe=require("./PackageVersion-B_T5VqI7.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ye={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},be=["xmlns","viewBox"],we=["id"],Ce=["stop-color"],Ne=["stop-color"],xe=["d","fill","stroke","stroke-width"],_e=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],$e=["x","y","font-size","fill"],Be=["x","y","font-size","fill"],Ee={key:2,class:"vue-data-ui-watermark"},Se=["innerHTML"],Pe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const h=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{T()});function T(){r.objectIsEmpty(h.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:h.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||h.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>h.config,l=>{t.value=I(),T(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:V,generateImage:M}=Z.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),$=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),B=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}B.value.forEach(([s,a,c])=>{n(s),n(a),l[s].outflow+=c,l[a].inflow+=c});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),o[i]||(o[i]=[]),o[i].includes(u)||o[i].push(u)}l.forEach(([u,i,f],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(i,N),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:f}),n[u].outflow+=f,n[i].inflow+=f}),Object.keys(n).forEach((u,i)=>{n[u].color=$.value[i]||$.value[i%$.value.length]||r.palette[i]||r.palette[i%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let i=0;o[u].forEach((f,k)=>{const p=n[f].height;a[f]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[f].color,value:oe(p)},i+=p+D.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:f,value:k},p)=>{const N=a[f].y,S=a[u],P=a[f],A=r.checkNaN(i),W=r.checkNaN(i+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[f].inflow*P.height),de={id:r.createUid(),source:u,target:f,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(P.x)} ${R} L ${r.checkNaN(P.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[f].color};c.push(de),i+=W-A,a[f].y+=R-X})}return{nodeCoordinates:a,links:c}}const v=e.computed(()=>{const l=ne(h.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:c}=l[s];n[a]||(n[a]=0),n[a]+=c+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=B.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(c=>c.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return B.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),o[c]||(o[c]=[]),n[a].push(c),o[c].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ie(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ce(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ce,generateCsv:U,generateImage:M,generatePdf:V,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(fe._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:_.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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,onToggleFullscreen:te,onGeneratePdf:e.unref(V),onGenerateCsv:U,onGenerateImage:e.unref(M),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),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),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,Ne)],8,we))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ie()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,Be))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,be)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(he.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Se)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ke))}},Te=ge._export_sfc(Pe,[["__scopeId","data-v-53bf76e7"]]);exports.default=Te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-jAZxyteD.cjs"),fe=require("./Title-DAEaaXFr.cjs"),Z=require("./usePrinter-Cx-xmAjb.cjs"),he=require("./DataTable-kOScyzFF.cjs"),ve=require("./vue-ui-accordion-WXKee19V.cjs"),me=require("./vue-ui-skeleton-C14g9G-o.cjs"),J=require("./useNestedProp-DksYpyh6.cjs"),pe=require("./PackageVersion-Tm6EPIDH.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ye={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},be=["xmlns","viewBox"],we=["id"],Ce=["stop-color"],Ne=["stop-color"],xe=["d","fill","stroke","stroke-width"],_e=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],$e=["x","y","font-size","fill"],Be=["x","y","font-size","fill"],Ee={key:2,class:"vue-data-ui-watermark"},Se=["innerHTML"],Pe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const h=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{T()});function T(){r.objectIsEmpty(h.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:h.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||h.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>h.config,l=>{t.value=I(),T(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:V,generateImage:M}=Z.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),$=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),B=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}B.value.forEach(([s,a,c])=>{n(s),n(a),l[s].outflow+=c,l[a].inflow+=c});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),o[i]||(o[i]=[]),o[i].includes(u)||o[i].push(u)}l.forEach(([u,i,f],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(i,N),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:f}),n[u].outflow+=f,n[i].inflow+=f}),Object.keys(n).forEach((u,i)=>{n[u].color=$.value[i]||$.value[i%$.value.length]||r.palette[i]||r.palette[i%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let i=0;o[u].forEach((f,k)=>{const p=n[f].height;a[f]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[f].color,value:oe(p)},i+=p+D.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:f,value:k},p)=>{const N=a[f].y,S=a[u],P=a[f],A=r.checkNaN(i),W=r.checkNaN(i+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[f].inflow*P.height),de={id:r.createUid(),source:u,target:f,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(P.x)} ${R} L ${r.checkNaN(P.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[f].color};c.push(de),i+=W-A,a[f].y+=R-X})}return{nodeCoordinates:a,links:c}}const v=e.computed(()=>{const l=ne(h.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:c}=l[s];n[a]||(n[a]=0),n[a]+=c+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=B.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(c=>c.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return B.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),o[c]||(o[c]=[]),n[a].push(c),o[c].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ie(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ce(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ce,generateCsv:U,generateImage:M,generatePdf:V,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${_.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(fe._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:_.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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,onToggleFullscreen:te,onGeneratePdf:e.unref(V),onGenerateCsv:U,onGenerateImage:e.unref(M),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),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),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,Ne)],8,we))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ie()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,Be))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,be)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(he.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Se)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ke))}},Te=ge._export_sfc(Pe,[["__scopeId","data-v-53bf76e7"]]);exports.default=Te;
@@ -1,14 +1,14 @@
1
1
  import { computed as v, onMounted as _e, ref as u, watch as Te, openBlock as s, createElementBlock as n, normalizeClass as L, normalizeStyle as W, createBlock as x, createCommentVNode as d, unref as h, createSlots as Pe, withCtx as i, renderSlot as y, normalizeProps as I, guardReactiveProps as F, createVNode as oe, createElementVNode as $, Fragment as se, renderList as re, createTextVNode as ue, toDisplayString as O, nextTick as Se } from "vue";
2
- import { u as Ne, o as Le, e as ne, g as Ie, c as ie, t as Fe, a as Oe, p as E, b as Ee, d as De, G as ce, J as Ge, f as k, X as Ve, i as ve, x as de, y as Be, q as Me, r as ze } from "./index-B9ExL-Ae.js";
3
- import { L as We } from "./Legend-C2KtRxbi.js";
4
- import { _ as Ae } from "./Title-CczWCvrd.js";
5
- import { _ as He } from "./Tooltip-CLelGHFy.js";
6
- import { D as Ue } from "./DataTable-BUgJSK3f.js";
7
- import { u as Xe, U as Re } from "./usePrinter-CUStN20z.js";
8
- import Ye from "./vue-ui-skeleton-DokgyuHD.js";
9
- import je from "./vue-ui-accordion-SZPrlCJb.js";
10
- import { u as he } from "./useNestedProp-BI1wvb44.js";
11
- import { _ as qe } from "./PackageVersion-Cy2QrPIN.js";
2
+ import { u as Ne, o as Le, e as ne, g as Ie, c as ie, t as Fe, a as Oe, p as E, b as Ee, d as De, I as ce, L as Ve, f as k, X as Be, i as ve, x as de, y as Ge, q as Me, r as ze } from "./index-Bu852AzK.js";
3
+ import { L as We } from "./Legend-CZk6McMv.js";
4
+ import { _ as Ae } from "./Title-B6kWQmNb.js";
5
+ import { _ as He } from "./Tooltip-Cwp4dS4t.js";
6
+ import { D as Ue } from "./DataTable-D1vDu_2B.js";
7
+ import { u as Xe, U as Re } from "./usePrinter-CaNEdNUc.js";
8
+ import Ye from "./vue-ui-skeleton-B-obKEDg.js";
9
+ import je from "./vue-ui-accordion-CBwmD_zS.js";
10
+ import { u as he } from "./useNestedProp-1sCLAHuR.js";
11
+ import { _ as qe } from "./PackageVersion-DDKechCD.js";
12
12
  import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const Ke = ["id"], Qe = {
14
14
  key: 0,
@@ -56,7 +56,7 @@ const Ke = ["id"], Qe = {
56
56
  });
57
57
  });
58
58
  }
59
- const _ = u(ie()), D = u(null), ge = u(null), G = u(!1), V = u(""), f = u(null), U = u(0), X = u(0), R = u(0), Y = u(0), e = v({
59
+ const _ = u(ie()), D = u(null), ge = u(null), V = u(!1), B = u(""), f = u(null), U = u(0), X = u(0), R = u(0), Y = u(0), e = v({
60
60
  get: () => j(),
61
61
  set: (t) => t
62
62
  });
@@ -85,7 +85,7 @@ const Ke = ["id"], Qe = {
85
85
  },
86
86
  showTable: e.value.table.show,
87
87
  showTooltip: e.value.style.chart.tooltip.show
88
- }), B = u({
88
+ }), G = u({
89
89
  height: 180,
90
90
  // or 250 if non fibo
91
91
  width: 250
@@ -122,7 +122,7 @@ const Ke = ["id"], Qe = {
122
122
  ...l,
123
123
  seriesIndex: a,
124
124
  proportion: l.value / g.value,
125
- path: Ge({
125
+ path: Ve({
126
126
  points: o,
127
127
  startX: 115 + e.value.style.chart.layout.arcs.offsetX,
128
128
  startY: 90 + e.value.style.chart.layout.arcs.offsetY
@@ -141,15 +141,15 @@ const Ke = ["id"], Qe = {
141
141
  seriesIndex: l,
142
142
  series: C.value,
143
143
  config: e.value
144
- }, G.value = o, f.value = t.id;
144
+ }, V.value = o, f.value = t.id;
145
145
  let r = "";
146
146
  const w = e.value.style.chart.tooltip.customFormat;
147
- de(w) && Be(() => w({
147
+ de(w) && Ge(() => w({
148
148
  seriesIndex: l,
149
149
  datapoint: t,
150
150
  series: C.value,
151
151
  config: e.value
152
- })) ? V.value = w({
152
+ })) ? B.value = w({
153
153
  seriesIndex: l,
154
154
  datapoint: t,
155
155
  series: C.value,
@@ -172,7 +172,7 @@ const Ke = ["id"], Qe = {
172
172
  v: t.proportion * 100,
173
173
  s: "%",
174
174
  r: e.value.style.chart.tooltip.roundingPercentage
175
- })}</b></div>`), V.value = `<div>${r}</div>`);
175
+ })}</b></div>`), B.value = `<div>${r}</div>`);
176
176
  }
177
177
  const ee = v(() => C.value.map((t, a) => ({
178
178
  ...t,
@@ -353,9 +353,9 @@ const Ke = ["id"], Qe = {
353
353
  ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : d("", !0),
354
354
  S.value ? (s(), n("svg", {
355
355
  key: 2,
356
- xmlns: h(Ve),
356
+ xmlns: h(Be),
357
357
  class: L({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
358
- viewBox: `0 0 ${B.value.width} ${B.value.height}`,
358
+ viewBox: `0 0 ${G.value.width} ${G.value.height}`,
359
359
  style: W(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
360
360
  }, [
361
361
  oe(qe),
@@ -420,12 +420,12 @@ const Ke = ["id"], Qe = {
420
420
  show: !0
421
421
  }),
422
422
  onMouseleave: a[0] || (a[0] = (r) => {
423
- G.value = !1, f.value = null;
423
+ V.value = !1, f.value = null;
424
424
  }),
425
425
  onClick: (r) => A("selectDatapoint", l)
426
426
  }, null, 40, rt)) : d("", !0)
427
427
  ]))), 256)),
428
- y(t.$slots, "svg", { svg: B.value }, void 0, !0)
428
+ y(t.$slots, "svg", { svg: G.value }, void 0, !0)
429
429
  ], 14, Ze)) : d("", !0),
430
430
  t.$slots.watermark ? (s(), n("div", ut, [
431
431
  y(t.$slots, "watermark", I(F({ isPrinting: h(q) || h(J) })), void 0, !0)
@@ -475,7 +475,7 @@ const Ke = ["id"], Qe = {
475
475
  }, 8, ["legendSet", "config"])) : d("", !0),
476
476
  y(t.$slots, "legend", { legend: ee.value }, void 0, !0),
477
477
  oe(He, {
478
- show: b.value.showTooltip && G.value,
478
+ show: b.value.showTooltip && V.value,
479
479
  backgroundColor: e.value.style.chart.tooltip.backgroundColor,
480
480
  color: e.value.style.chart.tooltip.color,
481
481
  borderRadius: e.value.style.chart.tooltip.borderRadius,
@@ -486,7 +486,7 @@ const Ke = ["id"], Qe = {
486
486
  position: e.value.style.chart.tooltip.position,
487
487
  offsetY: e.value.style.chart.tooltip.offsetY,
488
488
  parent: D.value,
489
- content: V.value,
489
+ content: B.value,
490
490
  isCustom: h(de)(e.value.style.chart.tooltip.customFormat)
491
491
  }, {
492
492
  "tooltip-before": i(() => [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CYdWUfPi.cjs"),le=require("./Legend-WO0bF0ud.cjs"),oe=require("./Title-BRktfjVS.cjs"),ae=require("./Tooltip-iisamh_I.cjs"),re=require("./DataTable-DhUk55WP.cjs"),W=require("./usePrinter-BYx8odJu.cjs"),ne=require("./vue-ui-skeleton-7g5Z7tL8.cjs"),se=require("./vue-ui-accordion-DzbFctbI.cjs"),U=require("./useNestedProp-CQjoDc6x.cjs"),ue=require("./PackageVersion-B_T5VqI7.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},ve=["xmlns","viewBox"],he=["id"],pe=["stdDeviation"],fe=["d","stroke","stroke-width"],ye=["d","stroke","stroke-width"],ge=["filter"],me=["d","stroke","stroke-width"],be=["d","stroke-width","onMouseenter","onClick"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},$e=["innerHTML"],Be={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),S=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:O,generateImage:z}=W.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function B(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),T("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<D.value.length;a+=1){const o=D.value[a];let n=o.value/d.value*K.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function Q(l){m.value=l,S.value+=1}const _=e.ref(null);function Z({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){_.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${s}</div>`)}const q=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:u.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/d.value)?"-":h.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},te,isNaN(h.value.body[f]/d.value)?"-":r.dataLabel({v:h.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:O,generateCsv:G,generateImage:z,toggleTable:M,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(O),onGenerateCsv:G,onGenerateImage:e.unref(z),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ue._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,pe)],8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ye)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,me)],8,ge)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>Z({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{w.value=!1,c.value=null}),onClick:s=>T("selectDatapoint",o)},null,40,be)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>B(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(ae._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(se.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,$e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ce))}},_e=ie._export_sfc(Be,[["__scopeId","data-v-20ef4a66"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-jAZxyteD.cjs"),le=require("./Legend-BJdr5n-o.cjs"),oe=require("./Title-DAEaaXFr.cjs"),ae=require("./Tooltip-Cb9jWppv.cjs"),re=require("./DataTable-kOScyzFF.cjs"),W=require("./usePrinter-Cx-xmAjb.cjs"),ne=require("./vue-ui-skeleton-C14g9G-o.cjs"),se=require("./vue-ui-accordion-WXKee19V.cjs"),U=require("./useNestedProp-DksYpyh6.cjs"),ue=require("./PackageVersion-Tm6EPIDH.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},ve=["xmlns","viewBox"],he=["id"],pe=["stdDeviation"],fe=["d","stroke","stroke-width"],ye=["d","stroke","stroke-width"],ge=["filter"],me=["d","stroke","stroke-width"],be=["d","stroke-width","onMouseenter","onClick"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},$e=["innerHTML"],Be={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),S=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:O,generateImage:z}=W.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),u=e.ref([]);function B(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),T("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<D.value.length;a+=1){const o=D.value[a];let n=o.value/d.value*K.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function Q(l){m.value=l,S.value+=1}const _=e.ref(null);function Z({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){_.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${s}</div>`)}const q=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:u.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/d.value)?"-":h.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},te,isNaN(h.value.body[f]/d.value)?"-":r.dataLabel({v:h.value.body[f]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:O,generateCsv:G,generateImage:z,toggleTable:M,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(O),onGenerateCsv:G,onGenerateImage:e.unref(z),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ue._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,pe)],8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,fe)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ye)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,me)],8,ge)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>Z({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{w.value=!1,c.value=null}),onClick:s=>T("selectDatapoint",o)},null,40,be)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>B(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(ae._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(se.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,$e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ce))}},_e=ie._export_sfc(Be,[["__scopeId","data-v-20ef4a66"]]);exports.default=_e;