vue-data-ui 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/{Arrow-CG_4BSkT.js → Arrow-B4TCBt4-.js} +1 -1
  2. package/dist/{Arrow-DaCdeKAQ.cjs → Arrow-DnYsOsEt.cjs} +1 -1
  3. package/dist/{BaseIcon-zOOwakRm.js → BaseIcon-DTJIrD3k.js} +1 -1
  4. package/dist/{BaseIcon-CKMrYVdW.cjs → BaseIcon-Dn1igOva.cjs} +1 -1
  5. package/dist/{DataTable-DGgj14m-.js → DataTable-BWABkdIL.js} +2 -2
  6. package/dist/{DataTable-BLEXsQBY.cjs → DataTable-Cybmjq2W.cjs} +1 -1
  7. package/dist/{Legend-BvLLHGBp.cjs → Legend-Bf8J9KZk.cjs} +1 -1
  8. package/dist/{Legend-D8BbMFRZ.js → Legend-du4CJMG1.js} +2 -2
  9. package/dist/{PackageVersion-B7vHZ873.cjs → PackageVersion-Bmro6-lR.cjs} +1 -1
  10. package/dist/{PackageVersion-Bk5LVTq1.js → PackageVersion-Dqo8V-i_.js} +1 -1
  11. package/dist/{PenAndPaper-C2r4IIot.cjs → PenAndPaper-B7dv_ssy.cjs} +1 -1
  12. package/dist/{PenAndPaper-CQfs_lTN.js → PenAndPaper-QsaleY3R.js} +3 -3
  13. package/dist/{Shape-DRv28FRP.js → Shape-D_MGNYEa.js} +1 -1
  14. package/dist/{Shape-CMWPm64P.cjs → Shape-QydDpcqr.cjs} +1 -1
  15. package/dist/{Slicer-BTtwLXWn.js → Slicer-DKXIt2om.js} +2 -2
  16. package/dist/{Slicer-5eB08Bkj.cjs → Slicer-Vzo3baUi.cjs} +1 -1
  17. package/dist/{Title-ag6gXJcz.js → Title-MKfkLka7.js} +1 -1
  18. package/dist/{Title-DDaORN3r.cjs → Title-x7Hmi2zb.cjs} +1 -1
  19. package/dist/{Tooltip-95WjskR9.js → Tooltip-BUMgVEu0.js} +1 -1
  20. package/dist/{Tooltip-DwioWtpe.cjs → Tooltip-pA64woiQ.cjs} +1 -1
  21. package/dist/{index-DaaDBRRF.js → index-B8uVRkA1.js} +1 -1
  22. package/dist/{index-Dla35rDR.cjs → index-Bmq5HB9y.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-onENMM4v.cjs → useNestedProp-CivZENAh.cjs} +1 -1
  25. package/dist/{useNestedProp-ReVcQys2.js → useNestedProp-kStEZqtl.js} +1 -1
  26. package/dist/{usePrinter-cQwX-nf0.cjs → usePrinter-Cf6Zct5m.cjs} +1 -1
  27. package/dist/{usePrinter-DUVTMVcK.js → usePrinter-CppD6oY_.js} +1 -1
  28. package/dist/{vue-data-ui-S7WYrlMn.cjs → vue-data-ui-HGY4nSGa.cjs} +1 -1
  29. package/dist/{vue-data-ui-DBJxJRA8.js → vue-data-ui-ZZGY9nKv.js} +61 -61
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-yWjl5iDC.cjs → vue-ui-3d-bar-BMZJgQzl.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-C4Lf5ZsJ.js → vue-ui-3d-bar-DbhESYsC.js} +9 -9
  34. package/dist/{vue-ui-accordion-BJBt7sbb.js → vue-ui-accordion-CE2Pnpz3.js} +3 -3
  35. package/dist/{vue-ui-accordion-DcbFZ2D3.cjs → vue-ui-accordion-WWblnzaJ.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-CMLAz6Mp.js → vue-ui-age-pyramid-CxW84Zy4.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-CAh4pv9o.cjs → vue-ui-age-pyramid-DzPdTFTe.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-Ccv0-AJJ.cjs → vue-ui-annotator-D5PCmH8u.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-DgYKMAvZ.js → vue-ui-annotator-DuS_kY-C.js} +1 -1
  40. package/dist/{vue-ui-bullet-BPdkEe6M.js → vue-ui-bullet-CvB9cU_g.js} +8 -8
  41. package/dist/{vue-ui-bullet-BYvPZfEi.cjs → vue-ui-bullet-DND6LL0P.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-Bl48zOlH.cjs → vue-ui-candlestick-Bq4VyBVk.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-Dh8xqZUc.js → vue-ui-candlestick-C76ZVkkY.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-54orau8Z.cjs → vue-ui-carousel-table-CdwSAavZ.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-BGXTUQcI.js → vue-ui-carousel-table-DPlos7Us.js} +4 -4
  46. package/dist/{vue-ui-chestnut-DWW5UXQ_.js → vue-ui-chestnut-CB4BA3mx.js} +8 -8
  47. package/dist/{vue-ui-chestnut-BbK-8JcW.cjs → vue-ui-chestnut-CH1rO8yv.cjs} +1 -1
  48. package/dist/{vue-ui-circle-pack-Be3vnkLn.js → vue-ui-circle-pack-DslAztEw.js} +9 -9
  49. package/dist/{vue-ui-circle-pack-C6nsFaf9.cjs → vue-ui-circle-pack-T0baWnD4.cjs} +1 -1
  50. package/dist/{vue-ui-cursor-BMD9oXM_.js → vue-ui-cursor-CNrbLYcU.js} +2 -2
  51. package/dist/{vue-ui-cursor-Bd4WawYT.cjs → vue-ui-cursor-tyy0Lbsc.cjs} +1 -1
  52. package/dist/{vue-ui-dashboard-CIb57ZTu.cjs → vue-ui-dashboard-2EJIfom5.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-CRFAupNn.js → vue-ui-dashboard-BIQYUy0X.js} +2 -2
  54. package/dist/{vue-ui-digits-hKIjwNLE.cjs → vue-ui-digits-9j9HvJAE.cjs} +1 -1
  55. package/dist/{vue-ui-digits-DA1yrPSo.js → vue-ui-digits-B9zkzbxp.js} +2 -2
  56. package/dist/{vue-ui-donut-C6thkzA9.js → vue-ui-donut-CTTVwsjp.js} +12 -12
  57. package/dist/{vue-ui-donut-d-C5olqi.cjs → vue-ui-donut-MNv-tPgT.cjs} +1 -1
  58. package/dist/{vue-ui-donut-evolution-Dzv3ligP.cjs → vue-ui-donut-evolution-ByfZmrmA.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-CYAgFkE9.js → vue-ui-donut-evolution-QrqawlMF.js} +11 -11
  60. package/dist/{vue-ui-dumbbell-D7s7aDL9.js → vue-ui-dumbbell-DbJC4PQf.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-oXJoC9vw.cjs → vue-ui-dumbbell-DdFhLM7x.cjs} +1 -1
  62. package/dist/{vue-ui-flow-D1M1iLei.cjs → vue-ui-flow-D3fu0o6H.cjs} +1 -1
  63. package/dist/{vue-ui-flow-C_UFS27X.js → vue-ui-flow-oXRtEqoD.js} +9 -9
  64. package/dist/{vue-ui-funnel-D-Ph4pEt.cjs → vue-ui-funnel-Btk9EM8C.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-CyHc5q64.js → vue-ui-funnel-wG5mmmoA.js} +9 -9
  66. package/dist/{vue-ui-galaxy-CYVuaFx4.cjs → vue-ui-galaxy-D0chyXGV.cjs} +1 -1
  67. package/dist/{vue-ui-galaxy-C2B21QDs.js → vue-ui-galaxy-DKsUFAVZ.js} +11 -11
  68. package/dist/{vue-ui-gauge-DN7BfHVH.cjs → vue-ui-gauge-BgRQ_PbK.cjs} +1 -1
  69. package/dist/{vue-ui-gauge-BbCrRAcn.js → vue-ui-gauge-CVS_Ragk.js} +7 -7
  70. package/dist/{vue-ui-gizmo-BxmQXMMz.js → vue-ui-gizmo-D4BHhwJ8.js} +3 -3
  71. package/dist/{vue-ui-gizmo-BLi-aeOT.cjs → vue-ui-gizmo-Dhu6rJ9P.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-Di-4_KVj.js → vue-ui-heatmap-BGioOZJj.js} +10 -10
  73. package/dist/{vue-ui-heatmap-B5kk3ubl.cjs → vue-ui-heatmap-EGSWPEkM.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-BgQ7_nGB.js → vue-ui-history-plot-B18G7ARJ.js} +11 -11
  75. package/dist/{vue-ui-history-plot-C4Rh7d4A.cjs → vue-ui-history-plot-Be4mtSAH.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-C_QMS2sW.cjs → vue-ui-kpi-B7rHhQ3H.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-D5dlDIrE.js → vue-ui-kpi-BK1Vq6tA.js} +3 -3
  78. package/dist/{vue-ui-mini-loader-DC9WI9t6.cjs → vue-ui-mini-loader-DrWDl3Hc.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-brOHSBkA.js → vue-ui-mini-loader-lAOgjMme.js} +2 -2
  80. package/dist/{vue-ui-molecule-BlZa7LFK.js → vue-ui-molecule-DEKmU-Mx.js} +11 -11
  81. package/dist/{vue-ui-molecule-Brrb0vRD.cjs → vue-ui-molecule-TSwsc6wZ.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-bdoq5L0c.js → vue-ui-mood-radar-6XZfljIe.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-ewQ9HT5w.cjs → vue-ui-mood-radar-vLXtDHcR.cjs} +1 -1
  84. package/dist/{vue-ui-nested-donuts-BrxC6lYZ.cjs → vue-ui-nested-donuts--A1qjixG.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-6bcJ22S6.js → vue-ui-nested-donuts-Cl8xdJU6.js} +11 -11
  86. package/dist/{vue-ui-onion-CPTPsRp_.cjs → vue-ui-onion-C32u8Ezk.cjs} +1 -1
  87. package/dist/{vue-ui-onion-Yff-DwJ0.js → vue-ui-onion-CPlqANiN.js} +11 -11
  88. package/dist/{vue-ui-parallel-coordinate-plot-BAGdY2ni.js → vue-ui-parallel-coordinate-plot-95RlJka2.js} +12 -12
  89. package/dist/{vue-ui-parallel-coordinate-plot-BBf4Stme.cjs → vue-ui-parallel-coordinate-plot-BY0t_Hc_.cjs} +1 -1
  90. package/dist/{vue-ui-quadrant-DpRKaZTi.cjs → vue-ui-quadrant-CWwHr8BX.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-BYkclEHK.js → vue-ui-quadrant-C_BIZcc8.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-tOqfl8Wv.js → vue-ui-quick-chart-BZ5n0UQy.js} +9 -9
  93. package/dist/{vue-ui-quick-chart-DZ6tgwO-.cjs → vue-ui-quick-chart-CZYAIILY.cjs} +1 -1
  94. package/dist/{vue-ui-radar-THcYC_gY.cjs → vue-ui-radar-D4XBfJym.cjs} +1 -1
  95. package/dist/{vue-ui-radar-DGV_Qsfo.js → vue-ui-radar-Ddu3Dzxx.js} +12 -12
  96. package/dist/{vue-ui-rating-Cuou21Nk.js → vue-ui-rating-C7MH_wxf.js} +2 -2
  97. package/dist/{vue-ui-rating-ChvACa7-.cjs → vue-ui-rating-WjFEnnp5.cjs} +1 -1
  98. package/dist/{vue-ui-relation-circle-3c5hexW_.cjs → vue-ui-relation-circle-8Kw5PdZD.cjs} +1 -1
  99. package/dist/{vue-ui-relation-circle-Qikk7b8Z.js → vue-ui-relation-circle-B_xPyr_-.js} +7 -7
  100. package/dist/{vue-ui-rings-pwelBySH.cjs → vue-ui-rings-CuLwbEa2.cjs} +1 -1
  101. package/dist/{vue-ui-rings-DM1bBtQj.js → vue-ui-rings-pjfgnXyP.js} +12 -12
  102. package/dist/{vue-ui-scatter-tRzawjcj.cjs → vue-ui-scatter-YQ4zYJj0.cjs} +1 -1
  103. package/dist/{vue-ui-scatter-D3ZdlKut.js → vue-ui-scatter-x6zrT3IA.js} +12 -12
  104. package/dist/{vue-ui-screenshot-BpH4_ZD6.cjs → vue-ui-screenshot-D3k8rLXz.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-D7LdEMAv.js → vue-ui-screenshot-DeKe5Csw.js} +1 -1
  106. package/dist/{vue-ui-skeleton-Ce7b04xD.js → vue-ui-skeleton-BC7kQhlE.js} +3 -3
  107. package/dist/{vue-ui-skeleton-BIuKWqj2.cjs → vue-ui-skeleton-D5890icn.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-vo6yPzcF.js → vue-ui-smiley-5evB5mWX.js} +2 -2
  109. package/dist/{vue-ui-smiley-BUJpZcSm.cjs → vue-ui-smiley-CNlhfa-H.cjs} +1 -1
  110. package/dist/{vue-ui-spark-trend-C7k3udvc.js → vue-ui-spark-trend-BgZ0JbXH.js} +5 -5
  111. package/dist/{vue-ui-spark-trend-C_MN59hc.cjs → vue-ui-spark-trend-CuqG_rtb.cjs} +1 -1
  112. package/dist/{vue-ui-sparkbar-CdENaD7Y.js → vue-ui-sparkbar-DkAi7xTy.js} +4 -4
  113. package/dist/{vue-ui-sparkbar-CPCZlpHO.cjs → vue-ui-sparkbar-DrG8Dq7-.cjs} +1 -1
  114. package/dist/{vue-ui-sparkgauge-B2uWPCJq.js → vue-ui-sparkgauge-BPhv4OLb.js} +4 -4
  115. package/dist/{vue-ui-sparkgauge-QZgcWK60.cjs → vue-ui-sparkgauge-C8JczQHv.cjs} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-DCTnIVXe.js → vue-ui-sparkhistogram-CvhqCMzj.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-DZabvSAV.cjs → vue-ui-sparkhistogram-e9JHVPef.cjs} +1 -1
  118. package/dist/{vue-ui-sparkline-BEWrNJvV.cjs → vue-ui-sparkline-DAaH0160.cjs} +1 -1
  119. package/dist/{vue-ui-sparkline-D3S5lo7r.js → vue-ui-sparkline-TSwCmhPw.js} +4 -4
  120. package/dist/{vue-ui-sparkstackbar-DWHqCmiK.js → vue-ui-sparkstackbar-BoS2_lla.js} +5 -5
  121. package/dist/{vue-ui-sparkstackbar-B5D0afLQ.cjs → vue-ui-sparkstackbar-r_awjtOp.cjs} +1 -1
  122. package/dist/{vue-ui-stackbar-q8Ibh-d4.js → vue-ui-stackbar-BEN8-V44.js} +13 -13
  123. package/dist/{vue-ui-stackbar-C9-V2SdI.cjs → vue-ui-stackbar-COZlH_nE.cjs} +1 -1
  124. package/dist/{vue-ui-strip-plot-D7foO-kq.js → vue-ui-strip-plot-Cbd43lkd.js} +11 -11
  125. package/dist/{vue-ui-strip-plot-DyGtwTEn.cjs → vue-ui-strip-plot-zTtIMHMC.cjs} +1 -1
  126. package/dist/{vue-ui-table-C6r6UbXb.js → vue-ui-table-Cdn-p4Sv.js} +1 -1
  127. package/dist/{vue-ui-table-DLR0ha2q.cjs → vue-ui-table-D3n9zK4_.cjs} +1 -1
  128. package/dist/{vue-ui-table-heatmap-DXZkNgsX.cjs → vue-ui-table-heatmap-1gluLlyr.cjs} +1 -1
  129. package/dist/{vue-ui-table-heatmap-Bs3RyLJ-.js → vue-ui-table-heatmap-DUoSqJAq.js} +4 -4
  130. package/dist/{vue-ui-table-sparkline-Dxy58OjL.js → vue-ui-table-sparkline-B6WbUZ-8.js} +5 -5
  131. package/dist/{vue-ui-table-sparkline-8jNNkRHl.cjs → vue-ui-table-sparkline-axmTWfsW.cjs} +1 -1
  132. package/dist/{vue-ui-thermometer-C0ebsziQ.js → vue-ui-thermometer-CYPaaRUL.js} +7 -7
  133. package/dist/{vue-ui-thermometer-CB82D9V2.cjs → vue-ui-thermometer-DO8jsmEA.cjs} +1 -1
  134. package/dist/{vue-ui-timer-C1SeltGj.cjs → vue-ui-timer-BxB-pqMO.cjs} +1 -1
  135. package/dist/{vue-ui-timer-2l2uA9ds.js → vue-ui-timer-DVDPJaIq.js} +5 -5
  136. package/dist/{vue-ui-tiremarks-B0Ko-3Nl.cjs → vue-ui-tiremarks-CHJQsXBn.cjs} +1 -1
  137. package/dist/{vue-ui-tiremarks-DqV4z-gF.js → vue-ui-tiremarks-LeiTjrNE.js} +7 -7
  138. package/dist/{vue-ui-treemap-VQLgKoFv.cjs → vue-ui-treemap-5vtoQA3B.cjs} +1 -1
  139. package/dist/{vue-ui-treemap-ZCkY5MIc.js → vue-ui-treemap-D1qUMxJQ.js} +11 -11
  140. package/dist/{vue-ui-vertical-bar-C7c4aoAE.js → vue-ui-vertical-bar-BjqeLwN6.js} +12 -12
  141. package/dist/{vue-ui-vertical-bar-D2fsnSXJ.cjs → vue-ui-vertical-bar-BvooiWAc.cjs} +1 -1
  142. package/dist/{vue-ui-waffle-D80rQuGH.js → vue-ui-waffle-DphHhyQF.js} +12 -12
  143. package/dist/{vue-ui-waffle-D6haAPI4.cjs → vue-ui-waffle-I9RUtRMp.cjs} +1 -1
  144. package/dist/{vue-ui-wheel-CoUOGnK9.js → vue-ui-wheel-BloNNVqT.js} +7 -7
  145. package/dist/{vue-ui-wheel-aifK19L_.cjs → vue-ui-wheel-KJdapRnF.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-CyukymPI.cjs → vue-ui-word-cloud-BLpGQgdL.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-D4ncvvGd.js → vue-ui-word-cloud-wxMpsmI9.js} +10 -10
  148. package/dist/{vue-ui-xy-xvt_IG7z.cjs → vue-ui-xy-BEgKs6jA.cjs} +2 -2
  149. package/dist/{vue-ui-xy-BxKSrC7D.js → vue-ui-xy-Zy60Z2c1.js} +90 -90
  150. package/dist/{vue-ui-xy-canvas-B4eBS-TN.cjs → vue-ui-xy-canvas-rKk7-Q2Q.cjs} +1 -1
  151. package/dist/{vue-ui-xy-canvas-IYFIfZxq.js → vue-ui-xy-canvas-zINzDQlN.js} +11 -11
  152. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import { computed as m, ref as i, watch as Ve, onMounted as at, onBeforeUnmount as ot, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as P, createBlock as D, createCommentVNode as f, createVNode as Me, createSlots as st, withCtx as k, renderSlot as w, normalizeProps as B, guardReactiveProps as E, createElementVNode as b, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as ut } from "vue";
2
- import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-DaaDBRRF.js";
2
+ import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-B8uVRkA1.js";
3
3
  import { t as mt, u as kt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as wt } from "./Title-ag6gXJcz.js";
5
- import { u as $t, U as Lt } from "./usePrinter-DUVTMVcK.js";
6
- import { D as Ct } from "./DataTable-DGgj14m-.js";
7
- import { _ as xt } from "./Tooltip-95WjskR9.js";
8
- import { L as _t } from "./Legend-D8BbMFRZ.js";
9
- import Tt from "./vue-ui-skeleton-Ce7b04xD.js";
10
- import Ft from "./vue-ui-accordion-BJBt7sbb.js";
11
- import { u as Ge } from "./useNestedProp-ReVcQys2.js";
12
- import { _ as Nt } from "./PackageVersion-Bk5LVTq1.js";
13
- import { P as St } from "./PenAndPaper-CQfs_lTN.js";
4
+ import { _ as wt } from "./Title-MKfkLka7.js";
5
+ import { u as $t, U as Lt } from "./usePrinter-CppD6oY_.js";
6
+ import { D as Ct } from "./DataTable-BWABkdIL.js";
7
+ import { _ as xt } from "./Tooltip-BUMgVEu0.js";
8
+ import { L as _t } from "./Legend-du4CJMG1.js";
9
+ import Tt from "./vue-ui-skeleton-BC7kQhlE.js";
10
+ import Ft from "./vue-ui-accordion-CE2Pnpz3.js";
11
+ import { u as Ge } from "./useNestedProp-kStEZqtl.js";
12
+ import { _ as Nt } from "./PackageVersion-Dqo8V-i_.js";
13
+ import { P as St } from "./PenAndPaper-QsaleY3R.js";
14
14
  import { u as Ot } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const It = ["id"], Pt = ["xmlns", "viewBox"], Dt = ["width", "height"], zt = ["id"], Vt = ["offset", "stop-color"], Mt = ["offset", "stop-opacity"], Ut = ["id"], Bt = ["id"], Et = ["id"], Rt = ["flood-color"], Gt = ["d", "fill", "stroke", "stroke-width", "filter"], Yt = { key: 1 }, Xt = ["d", "fill"], Ht = { key: 2 }, Wt = ["x", "y", "font-size", "font-weight", "fill"], qt = { key: 3 }, Jt = ["filter"], Kt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Qt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Zt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], jt = ["d", "fill", "onMouseenter", "onClick"], el = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Dla35rDR.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-DDaORN3r.cjs"),ae=require("./usePrinter-cQwX-nf0.cjs"),$e=require("./Legend-BvLLHGBp.cjs"),xe=require("./DataTable-BLEXsQBY.cjs"),Be=require("./Tooltip-DwioWtpe.cjs"),Te=require("./vue-ui-skeleton-BIuKWqj2.cjs"),Se=require("./vue-ui-accordion-DcbFZ2D3.cjs"),oe=require("./useNestedProp-onENMM4v.cjs"),Pe=require("./PackageVersion-B7vHZ873.cjs"),Oe=require("./PenAndPaper-C2r4IIot.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Fe=["xmlns","viewBox"],Ae=["width","height"],Ee=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ie=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["id"],Le=["stdDeviation"],Re=["filter"],ze=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],De=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],qe={key:2},Ue=["onMouseenter"],Ye=["x","y","font-size","fill","font-weight"],Xe={key:5,class:"vue-data-ui-watermark"},Ge=["onClick"],He=["innerHTML"],je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const{vue_ui_onion:se}=u.useConfig(),f=re,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Ne.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:f.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=X(),P.value=!t.value.userOptions.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:W}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=e.computed(()=>({cy:"onion-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":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Bmq5HB9y.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-x7Hmi2zb.cjs"),ae=require("./usePrinter-Cf6Zct5m.cjs"),$e=require("./Legend-Bf8J9KZk.cjs"),xe=require("./DataTable-Cybmjq2W.cjs"),Be=require("./Tooltip-pA64woiQ.cjs"),Te=require("./vue-ui-skeleton-D5890icn.cjs"),Se=require("./vue-ui-accordion-WWblnzaJ.cjs"),oe=require("./useNestedProp-CivZENAh.cjs"),Pe=require("./PackageVersion-Bmro6-lR.cjs"),Oe=require("./PenAndPaper-B7dv_ssy.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Fe=["xmlns","viewBox"],Ae=["width","height"],Ee=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ie=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["id"],Le=["stdDeviation"],Re=["filter"],ze=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],De=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],qe={key:2},Ue=["onMouseenter"],Ye=["x","y","font-size","fill","font-weight"],Xe={key:5,class:"vue-data-ui-watermark"},Ge=["onClick"],He=["innerHTML"],je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const{vue_ui_onion:se}=u.useConfig(),f=re,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Ne.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:f.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=X(),P.value=!t.value.userOptions.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:W}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=e.computed(()=>({cy:"onion-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":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
2
2
  M ${s.value.centerX},${s.value.centerY-l}
3
3
  A ${l},${l} 0 1 1
4
4
  ${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
@@ -1,16 +1,16 @@
1
1
  import { computed as v, ref as s, watch as ke, onMounted as Ue, onBeforeUnmount as Xe, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as f, createElementVNode as O, createVNode as we, createSlots as Ge, withCtx as g, renderSlot as h, normalizeProps as S, guardReactiveProps as F, Fragment as M, renderList as N, toDisplayString as P, createTextVNode as Ee, nextTick as He } from "vue";
2
- import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-DaaDBRRF.js";
2
+ import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-B8uVRkA1.js";
3
3
  import { t as ot, u as rt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as nt } from "./Title-ag6gXJcz.js";
5
- import { u as st, U as ut } from "./usePrinter-DUVTMVcK.js";
6
- import { L as it } from "./Legend-D8BbMFRZ.js";
7
- import { D as ct } from "./DataTable-DGgj14m-.js";
8
- import { _ as dt } from "./Tooltip-95WjskR9.js";
9
- import vt from "./vue-ui-skeleton-Ce7b04xD.js";
10
- import ht from "./vue-ui-accordion-BJBt7sbb.js";
11
- import { u as xe } from "./useNestedProp-ReVcQys2.js";
12
- import { _ as ft } from "./PackageVersion-Bk5LVTq1.js";
13
- import { P as gt } from "./PenAndPaper-CQfs_lTN.js";
4
+ import { _ as nt } from "./Title-MKfkLka7.js";
5
+ import { u as st, U as ut } from "./usePrinter-CppD6oY_.js";
6
+ import { L as it } from "./Legend-du4CJMG1.js";
7
+ import { D as ct } from "./DataTable-BWABkdIL.js";
8
+ import { _ as dt } from "./Tooltip-BUMgVEu0.js";
9
+ import vt from "./vue-ui-skeleton-BC7kQhlE.js";
10
+ import ht from "./vue-ui-accordion-CE2Pnpz3.js";
11
+ import { u as xe } from "./useNestedProp-kStEZqtl.js";
12
+ import { _ as ft } from "./PackageVersion-Dqo8V-i_.js";
13
+ import { P as gt } from "./PenAndPaper-QsaleY3R.js";
14
14
  import { u as pt } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const mt = ["id"], bt = ["xmlns", "viewBox"], kt = ["width", "height"], wt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ct = ["id"], xt = ["stdDeviation"], Tt = ["filter"], _t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ot = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], Pt = { key: 2 }, At = ["onMouseenter"], It = ["x", "y", "font-size", "fill", "font-weight"], St = {
@@ -1,17 +1,17 @@
1
1
  import { computed as g, ref as v, watch as Ge, onMounted as Xe, onBeforeUnmount as Ye, createElementBlock as i, openBlock as u, unref as x, normalizeStyle as T, normalizeClass as U, createBlock as z, createCommentVNode as m, createElementVNode as I, createVNode as _e, createSlots as qe, withCtx as k, renderSlot as b, normalizeProps as W, guardReactiveProps as E, Fragment as C, renderList as F, toDisplayString as D, createTextVNode as Je } from "vue";
2
- import { u as Ke, c as ee, t as Qe, p as H, a as Ze, o as et, e as Me, g as tt, b as at, d as lt, D as ot, R as st, S as nt, T as ut, X as it, x as ze, F as G, q as rt, r as ct, i as Fe, f as Ie, y as vt } from "./index-DaaDBRRF.js";
2
+ import { u as Ke, c as ee, t as Qe, p as H, a as Ze, o as et, e as Me, g as tt, b as at, d as lt, D as ot, R as st, S as nt, T as ut, X as it, x as ze, F as G, q as rt, r as ct, i as Fe, f as Ie, y as vt } from "./index-B8uVRkA1.js";
3
3
  import { t as dt, u as ht } from "./useResponsive-CoxXLe23.js";
4
- import { _ as pt } from "./Title-ag6gXJcz.js";
5
- import { L as mt } from "./Legend-D8BbMFRZ.js";
6
- import { _ as yt } from "./Tooltip-95WjskR9.js";
7
- import { _ as ft } from "./Shape-DRv28FRP.js";
8
- import { u as gt, U as bt } from "./usePrinter-DUVTMVcK.js";
9
- import { D as xt } from "./DataTable-DGgj14m-.js";
10
- import kt from "./vue-ui-accordion-BJBt7sbb.js";
11
- import wt from "./vue-ui-skeleton-Ce7b04xD.js";
12
- import { u as Pe } from "./useNestedProp-ReVcQys2.js";
13
- import { _ as Ct } from "./PackageVersion-Bk5LVTq1.js";
14
- import { P as $t } from "./PenAndPaper-CQfs_lTN.js";
4
+ import { _ as pt } from "./Title-MKfkLka7.js";
5
+ import { L as mt } from "./Legend-du4CJMG1.js";
6
+ import { _ as yt } from "./Tooltip-BUMgVEu0.js";
7
+ import { _ as ft } from "./Shape-D_MGNYEa.js";
8
+ import { u as gt, U as bt } from "./usePrinter-CppD6oY_.js";
9
+ import { D as xt } from "./DataTable-BWABkdIL.js";
10
+ import kt from "./vue-ui-accordion-CE2Pnpz3.js";
11
+ import wt from "./vue-ui-skeleton-BC7kQhlE.js";
12
+ import { u as Pe } from "./useNestedProp-kStEZqtl.js";
13
+ import { _ as Ct } from "./PackageVersion-Dqo8V-i_.js";
14
+ import { P as $t } from "./PenAndPaper-QsaleY3R.js";
15
15
  import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const _t = ["id"], Mt = ["xmlns", "viewBox"], zt = ["x", "y", "width", "height"], Ft = { style: { "pointer-events": "none" } }, It = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pt = ["x", "y", "fill", "font-size", "font-weight"], Nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "fill", "font-size", "font-weight"], Ot = { key: 0 }, St = ["x", "y", "font-size", "fill"], Dt = ["width", "x", "y"], Ut = { style: { width: "100%" } }, Wt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], Et = ["d", "stroke", "stroke-width", "onMouseenter"], Vt = ["d", "onMouseenter"], jt = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Dla35rDR.cjs"),ue=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./Title-DDaORN3r.cjs"),Se=require("./Legend-BvLLHGBp.cjs"),ze=require("./Tooltip-DwioWtpe.cjs"),Ne=require("./Shape-CMWPm64P.cjs"),ce=require("./usePrinter-cQwX-nf0.cjs"),Ae=require("./DataTable-BLEXsQBY.cjs"),Te=require("./vue-ui-accordion-DcbFZ2D3.cjs"),Pe=require("./vue-ui-skeleton-BIuKWqj2.cjs"),de=require("./useNestedProp-onENMM4v.cjs"),Fe=require("./PackageVersion-B7vHZ873.cjs"),Me=require("./PenAndPaper-C2r4IIot.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ie=["id"],Le=["xmlns","viewBox"],Ve=["x","y","width","height"],Oe={style:{"pointer-events":"none"}},De=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","fill","font-size","font-weight"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","fill","font-size","font-weight"],We={key:0},je=["x","y","font-size","fill"],He=["width","x","y"],Ge={style:{width:"100%"}},Ye=["x","y","fill","font-weight","font-size","onMouseenter"],Xe=["d","stroke","stroke-width","onMouseenter"],Je=["d","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze=["innerHTML"],et={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ve,{expose:pe,emit:he}){const{vue_ui_parallel_coordinate_plot:me}=i.useConfig(),b=ve,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),U=e.ref(0),R=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),w=e.ref(!1);function ye(l){w.value=l,L.value+=1}const t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=_e.useUserOptionState({config:t.value});function G(){const l=de.useNestedProp({userConfig:b.config,defaultConfig:me});return l.theme?{...de.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,Y(),U.value+=1,W.value+=1,R.value+=1,v.value.dataLabels.show=t.value.style.chart.yAxis.labels.datapoints.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const S=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ue.throttle(()=>{const{width:o,height:a}=ue.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=a,d.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})})});S.value=new ResizeObserver(l),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:X,isImaging:J,generatePdf:K,generateImage:Q}=ce.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=d.value.height,s=d.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),ge=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function Z(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ge.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),be=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>Z(l.id),isSegregated:f.value.includes(l.id)}))),ke=e.computed(()=>({cy:"pcp-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":""})),ee=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>c.value.width/ee.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<ee.value;o+=1){const a=Math.min(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((p,A)=>{const we=u.min<0?p+Math.abs(u.min):p-Math.abs(u.min),Be=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(we/Be),x:c.value.left+y.value*o+y.value/2,value:p}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:c.value.left+y.value*s+y.value/2,y:c.value.bottom-c.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function te({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),B=e.ref(!1),E=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},B.value=!0,h.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?E.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.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;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,p)=>{s+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Bmq5HB9y.cjs"),ue=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./Title-x7Hmi2zb.cjs"),Se=require("./Legend-Bf8J9KZk.cjs"),ze=require("./Tooltip-pA64woiQ.cjs"),Ne=require("./Shape-QydDpcqr.cjs"),ce=require("./usePrinter-Cf6Zct5m.cjs"),Ae=require("./DataTable-Cybmjq2W.cjs"),Te=require("./vue-ui-accordion-WWblnzaJ.cjs"),Pe=require("./vue-ui-skeleton-D5890icn.cjs"),de=require("./useNestedProp-CivZENAh.cjs"),Fe=require("./PackageVersion-Bmro6-lR.cjs"),Me=require("./PenAndPaper-B7dv_ssy.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ie=["id"],Le=["xmlns","viewBox"],Ve=["x","y","width","height"],Oe={style:{"pointer-events":"none"}},De=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","fill","font-size","font-weight"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","fill","font-size","font-weight"],We={key:0},je=["x","y","font-size","fill"],He=["width","x","y"],Ge={style:{width:"100%"}},Ye=["x","y","fill","font-weight","font-size","onMouseenter"],Xe=["d","stroke","stroke-width","onMouseenter"],Je=["d","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze=["innerHTML"],et={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ve,{expose:pe,emit:he}){const{vue_ui_parallel_coordinate_plot:me}=i.useConfig(),b=ve,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),U=e.ref(0),R=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),w=e.ref(!1);function ye(l){w.value=l,L.value+=1}const t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=_e.useUserOptionState({config:t.value});function G(){const l=de.useNestedProp({userConfig:b.config,defaultConfig:me});return l.theme?{...de.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,Y(),U.value+=1,W.value+=1,R.value+=1,v.value.dataLabels.show=t.value.style.chart.yAxis.labels.datapoints.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const S=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ue.throttle(()=>{const{width:o,height:a}=ue.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=a,d.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})})});S.value=new ResizeObserver(l),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:X,isImaging:J,generatePdf:K,generateImage:Q}=ce.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=d.value.height,s=d.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),ge=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function Z(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ge.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),be=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>Z(l.id),isSegregated:f.value.includes(l.id)}))),ke=e.computed(()=>({cy:"pcp-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":""})),ee=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>c.value.width/ee.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<ee.value;o+=1){const a=Math.min(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((p,A)=>{const we=u.min<0?p+Math.abs(u.min):p-Math.abs(u.min),Be=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(we/Be),x:c.value.left+y.value*o+y.value/2,value:p}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:c.value.left+y.value*s+y.value/2,y:c.value.bottom-c.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function te({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),B=e.ref(!1),E=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},B.value=!0,h.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?E.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.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;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,p)=>{s+=`
2
2
  <div class="vue-ui-tooltip-item" style="text-align:left">
3
3
  <span>${g}: </span>
4
4
  <span>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Dla35rDR.cjs"),ke=require("./useResponsive-BJ7DTGpm.cjs"),Xe=require("./Title-DDaORN3r.cjs"),xe=require("./usePrinter-cQwX-nf0.cjs"),Ye=require("./Tooltip-DwioWtpe.cjs"),$e=require("./Shape-CMWPm64P.cjs"),Ae=require("./Legend-BvLLHGBp.cjs"),Me=require("./DataTable-BLEXsQBY.cjs"),Pe=require("./vue-ui-skeleton-BIuKWqj2.cjs"),Oe=require("./vue-ui-accordion-DcbFZ2D3.cjs"),Le=require("./useNestedProp-onENMM4v.cjs"),Fe=require("./PackageVersion-B7vHZ873.cjs"),De=require("./PenAndPaper-C2r4IIot.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Ie=["xmlns","viewBox","id"],Ge=["x","y","width","height"],Qe=["id"],je=["stop-color"],Je=["stop-color"],Ze={key:1},Ke=["fill","x","y","height","width","stroke-width","stroke","rx"],et=["x1","y1","x2","y2","stroke","stroke-width"],tt=["x1","y1","x2","y2","stroke","stroke-width"],lt={key:2},at=["points","fill"],ot=["points","fill"],ut=["points","fill"],rt=["points","fill"],nt={key:3},st=["y","fill","font-size"],it=["x","y","fill","font-size"],ct=["x","y","fill","font-size"],vt=["y","fill","font-size"],dt={key:4},ht=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],bt=["x","y","font-size","fill"],pt=["id","font-size","transform","fill"],ft=["id","font-size","transform","fill"],mt=["id","font-size","transform","fill"],gt={key:5},kt=["fill","points"],xt=["x","y","width","height"],$t=["x","y","width","height"],Lt=["x","y","width","height"],wt=["x","y","width","height"],Ct={key:0,style:{"pointer-events":"none"}},St=["x","y","font-size","fill"],Bt={key:0},qt=["x","y","onMouseover","onClick"],_t={key:8,class:"vue-ui-dna"},zt=["points","fill"],Nt=["points","fill"],Vt=["points","fill"],Et=["points","fill"],Tt={key:9},Wt=["x","y","font-size","fill","font-weight"],Xt={key:10},Yt=["x","y","fill"],At=["x","y","fill"],Mt=["x","y","fill"],Pt=["x","y","fill"],Ot=["stroke","d"],Ft=["stroke","d"],Dt={key:5,class:"vue-data-ui-watermark"},Rt=["onClick"],Ht={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Ut=["innerHTML"],It={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(we,{expose:Ce,emit:Se}){const{vue_ui_quadrant:Be}=s.useConfig(),k=we,V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),M=Se,qe=e.ref(null),E=e.ref(!1),P=e.ref(""),H=e.ref(0),h=e.ref(!1),C=e.ref(null),U=e.ref(null),I=e.ref(null),G=e.ref(null),Q=e.ref(null),j=e.ref(0),J=e.ref(0),Z=e.ref(0),l=e.computed({get:()=>te(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:K,keepUserOptionState:ee}=Re.useUserOptionState({config:l.value});function te(){const a=Le.useNestedProp({userConfig:k.config,defaultConfig:Be});return a.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=te(),O.value=!l.value.userOptions.showOnChartHover,le(),j.value+=1,J.value+=1,Z.value+=1,y.value.plotLabels.show=l.value.style.chart.layout.labels.plotLabels.show,y.value.showTable=l.value.table.show,y.value.showTooltip=l.value.style.chart.tooltip.show},{deep:!0});const T=e.ref(null);function le(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=ke.throttle(()=>{const{width:u,height:o}=ke.useResponsive({chart:C.value,title:l.value.style.chart.title.text?U.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:G.value,noTitle:Q.value});b.value=48,requestAnimationFrame(()=>{t.value.height=o,t.value.usableHeight=o-b.value*2,t.value.width=u,t.value.usableWidth=u-b.value*2,t.value.top=b.value,t.value.left=b.value,t.value.right=u-b.value,t.value.bottom=o-b.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=b.value})});T.value=new ResizeObserver(a),T.value.observe(C.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:ue,generateImage:re}=xe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),_e=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),ne=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),y=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),b=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-b.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-b.value*2,top:b.value,left:b.value,right:l.value.style.chart.width-b.value,bottom:l.value.style.chart.height-b.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:b.value}),i=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(i.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const c=e.ref(null),w=e.computed(()=>{switch(c.value){case"TL":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),ze=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){c.value&&N(n);const v={x:a-i.value.startX,y:u-i.value.startY,w:o-i.value.width,h:r-i.value.height},d=l.value.zoomAnimationFrames;let x=0;function ge(){W.value=!0,i.value.startX+=v.x/d,i.value.startY+=v.y/d,i.value.width+=v.w/d,i.value.height+=v.h/d,x+=1,x<d?ze.value=requestAnimationFrame(ge):W.value=!1}ge()}function $(a){if(!W.value)if(h.value&&c.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),c.value=null,h.value=!1;else{switch(c.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:i.value.startX=0,i.value.startY=0,i.value.width=t.value.width,i.value.height=t.value.height;break}h.value=!0}}const Ne=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||ne.value[u]||s.palette[u]}))),Ve=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Ee=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Ve.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ne.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function se(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function ie(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ye();M("selectLegend",u)}const ce=e.computed(()=>Ee.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),Te=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function ve(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function de(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,P.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function he(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};M("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};M("selectSide",o)}const p=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ye(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function be(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const B=e.ref(!1);function We(a){B.value=a,H.value+=1}function pe(){y.value.showTable=!y.value.showTable}function fe(){y.value.plotLabels.show=!y.value.plotLabels.show}function me(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}return Ce({getData:ye,generatePdf:ue,generateCsv:be,generateImage:re,toggleTable:pe,toggleLabels:fe,toggleTooltip:me,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:C,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`),onMouseenter:u[16]||(u[16]=()=>e.unref(K)(!0)),onMouseleave:u[17]||(u[17]=()=>e.unref(K)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:C.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:U,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Xe._sfc_main,{key:`table_${j.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value&&(e.unref(ee)||e.unref(O))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref_key:"details",ref:qe,key:`user_options_${H.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(oe),isPrinting:e.unref(ae),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:y.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:C.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:We,onGeneratePdf:e.unref(ue),onGenerateCsv:be,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleLabels:fe,onToggleTooltip:me,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`${i.value.startX} ${i.value.startY} ${i.value.width} ${i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:i.value.startX,y:i.value.startY,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,Je)],8,Qe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,et),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,tt),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,at),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ot),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ut),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,rt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",nt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,st)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,it)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,ct)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,vt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ht),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,yt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,bt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,pt),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ft),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,mt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,xt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,$t),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,Lt),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,wt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[y.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>de(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,qt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock($e._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>de(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),y.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,St))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",_t,[c.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,zt)):e.createCommentVNode("",!0),c.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Nt)):e.createCommentVNode("",!0),c.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Vt)):e.createCommentVNode("",!0),c.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&!W.value?(e.openBlock(),e.createElementBlock("g",Tt,[e.createElementVNode("text",{x:w.value.x,y:w.value.y-w.value.fontSize/1.5,"font-size":w.value.fontSize/1.5,fill:w.value.fill,"text-anchor":"middle","font-weight":w.value.bold?"bold":"normal"},e.toDisplayString(w.value.text),9,Wt)])):e.createCommentVNode("",!0),h.value&&c.value?(e.openBlock(),e.createElementBlock("g",Xt,[e.createElementVNode("rect",{x:p.value[c.value].tl.x,y:p.value[c.value].tl.y,height:"20",width:"20",fill:p.value[c.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TL"})},null,14,Yt),e.createElementVNode("rect",{x:p.value[c.value].tr.x,y:p.value[c.value].tr.y,height:"20",width:"20",fill:p.value[c.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TR"})},null,14,At),e.createElementVNode("rect",{x:p.value[c.value].br.x,y:p.value[c.value].br.y,height:"20",width:"20",fill:p.value[c.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BR"})},null,14,Mt),e.createElementVNode("rect",{x:p.value[c.value].bl.x,y:p.value[c.value].bl.y,height:"20",width:"20",fill:p.value[c.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BL"})},null,14,Pt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:p.value[c.value].crosshairs.horizontal},null,8,Ot),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:p.value[c.value].crosshairs.vertical},null,8,Ft)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Z.value}`,legendSet:ce.value,config:Te.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Rt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:G,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ye._sfc_main,{show:y.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:C.value,content:P.value,isFullscreen:B.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Ht,[e.createVNode($e._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Oe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Me.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>y.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Ut)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},Gt=He._export_sfc(It,[["__scopeId","data-v-e33b0c6f"]]);exports.default=Gt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Bmq5HB9y.cjs"),ke=require("./useResponsive-BJ7DTGpm.cjs"),Xe=require("./Title-x7Hmi2zb.cjs"),xe=require("./usePrinter-Cf6Zct5m.cjs"),Ye=require("./Tooltip-pA64woiQ.cjs"),$e=require("./Shape-QydDpcqr.cjs"),Ae=require("./Legend-Bf8J9KZk.cjs"),Me=require("./DataTable-Cybmjq2W.cjs"),Pe=require("./vue-ui-skeleton-D5890icn.cjs"),Oe=require("./vue-ui-accordion-WWblnzaJ.cjs"),Le=require("./useNestedProp-CivZENAh.cjs"),Fe=require("./PackageVersion-Bmro6-lR.cjs"),De=require("./PenAndPaper-B7dv_ssy.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Ie=["xmlns","viewBox","id"],Ge=["x","y","width","height"],Qe=["id"],je=["stop-color"],Je=["stop-color"],Ze={key:1},Ke=["fill","x","y","height","width","stroke-width","stroke","rx"],et=["x1","y1","x2","y2","stroke","stroke-width"],tt=["x1","y1","x2","y2","stroke","stroke-width"],lt={key:2},at=["points","fill"],ot=["points","fill"],ut=["points","fill"],rt=["points","fill"],nt={key:3},st=["y","fill","font-size"],it=["x","y","fill","font-size"],ct=["x","y","fill","font-size"],vt=["y","fill","font-size"],dt={key:4},ht=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],bt=["x","y","font-size","fill"],pt=["id","font-size","transform","fill"],ft=["id","font-size","transform","fill"],mt=["id","font-size","transform","fill"],gt={key:5},kt=["fill","points"],xt=["x","y","width","height"],$t=["x","y","width","height"],Lt=["x","y","width","height"],wt=["x","y","width","height"],Ct={key:0,style:{"pointer-events":"none"}},St=["x","y","font-size","fill"],Bt={key:0},qt=["x","y","onMouseover","onClick"],_t={key:8,class:"vue-ui-dna"},zt=["points","fill"],Nt=["points","fill"],Vt=["points","fill"],Et=["points","fill"],Tt={key:9},Wt=["x","y","font-size","fill","font-weight"],Xt={key:10},Yt=["x","y","fill"],At=["x","y","fill"],Mt=["x","y","fill"],Pt=["x","y","fill"],Ot=["stroke","d"],Ft=["stroke","d"],Dt={key:5,class:"vue-data-ui-watermark"},Rt=["onClick"],Ht={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Ut=["innerHTML"],It={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(we,{expose:Ce,emit:Se}){const{vue_ui_quadrant:Be}=s.useConfig(),k=we,V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),M=Se,qe=e.ref(null),E=e.ref(!1),P=e.ref(""),H=e.ref(0),h=e.ref(!1),C=e.ref(null),U=e.ref(null),I=e.ref(null),G=e.ref(null),Q=e.ref(null),j=e.ref(0),J=e.ref(0),Z=e.ref(0),l=e.computed({get:()=>te(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:K,keepUserOptionState:ee}=Re.useUserOptionState({config:l.value});function te(){const a=Le.useNestedProp({userConfig:k.config,defaultConfig:Be});return a.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=te(),O.value=!l.value.userOptions.showOnChartHover,le(),j.value+=1,J.value+=1,Z.value+=1,y.value.plotLabels.show=l.value.style.chart.layout.labels.plotLabels.show,y.value.showTable=l.value.table.show,y.value.showTooltip=l.value.style.chart.tooltip.show},{deep:!0});const T=e.ref(null);function le(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=ke.throttle(()=>{const{width:u,height:o}=ke.useResponsive({chart:C.value,title:l.value.style.chart.title.text?U.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:G.value,noTitle:Q.value});b.value=48,requestAnimationFrame(()=>{t.value.height=o,t.value.usableHeight=o-b.value*2,t.value.width=u,t.value.usableWidth=u-b.value*2,t.value.top=b.value,t.value.left=b.value,t.value.right=u-b.value,t.value.bottom=o-b.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=b.value})});T.value=new ResizeObserver(a),T.value.observe(C.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:ue,generateImage:re}=xe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),_e=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),ne=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),y=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),b=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-b.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-b.value*2,top:b.value,left:b.value,right:l.value.style.chart.width-b.value,bottom:l.value.style.chart.height-b.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:b.value}),i=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(i.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const c=e.ref(null),w=e.computed(()=>{switch(c.value){case"TL":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),ze=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){c.value&&N(n);const v={x:a-i.value.startX,y:u-i.value.startY,w:o-i.value.width,h:r-i.value.height},d=l.value.zoomAnimationFrames;let x=0;function ge(){W.value=!0,i.value.startX+=v.x/d,i.value.startY+=v.y/d,i.value.width+=v.w/d,i.value.height+=v.h/d,x+=1,x<d?ze.value=requestAnimationFrame(ge):W.value=!1}ge()}function $(a){if(!W.value)if(h.value&&c.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),c.value=null,h.value=!1;else{switch(c.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:i.value.startX=0,i.value.startY=0,i.value.width=t.value.width,i.value.height=t.value.height;break}h.value=!0}}const Ne=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||ne.value[u]||s.palette[u]}))),Ve=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Ee=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Ve.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ne.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function se(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function ie(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ye();M("selectLegend",u)}const ce=e.computed(()=>Ee.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),Te=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function ve(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function de(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,P.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function he(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};M("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};M("selectSide",o)}const p=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ye(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function be(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const B=e.ref(!1);function We(a){B.value=a,H.value+=1}function pe(){y.value.showTable=!y.value.showTable}function fe(){y.value.plotLabels.show=!y.value.plotLabels.show}function me(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}return Ce({getData:ye,generatePdf:ue,generateCsv:be,generateImage:re,toggleTable:pe,toggleLabels:fe,toggleTooltip:me,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:C,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`),onMouseenter:u[16]||(u[16]=()=>e.unref(K)(!0)),onMouseleave:u[17]||(u[17]=()=>e.unref(K)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(De.PenAndPaper,{key:0,parent:C.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:U,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Xe._sfc_main,{key:`table_${j.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value&&(e.unref(ee)||e.unref(O))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref_key:"details",ref:qe,key:`user_options_${H.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(oe),isPrinting:e.unref(ae),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:y.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:C.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:We,onGeneratePdf:e.unref(ue),onGenerateCsv:be,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleLabels:fe,onToggleTooltip:me,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`${i.value.startX} ${i.value.startY} ${i.value.width} ${i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:i.value.startX,y:i.value.startY,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,Je)],8,Qe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,et),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,tt),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,at),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ot),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ut),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,rt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",nt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,st)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,it)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,ct)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,vt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ht),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,yt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,bt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,pt),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ft),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,mt)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,xt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,$t),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,Lt),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,wt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[y.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>de(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,qt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock($e._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>de(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),y.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,St))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",_t,[c.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,zt)):e.createCommentVNode("",!0),c.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Nt)):e.createCommentVNode("",!0),c.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Vt)):e.createCommentVNode("",!0),c.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&!W.value?(e.openBlock(),e.createElementBlock("g",Tt,[e.createElementVNode("text",{x:w.value.x,y:w.value.y-w.value.fontSize/1.5,"font-size":w.value.fontSize/1.5,fill:w.value.fill,"text-anchor":"middle","font-weight":w.value.bold?"bold":"normal"},e.toDisplayString(w.value.text),9,Wt)])):e.createCommentVNode("",!0),h.value&&c.value?(e.openBlock(),e.createElementBlock("g",Xt,[e.createElementVNode("rect",{x:p.value[c.value].tl.x,y:p.value[c.value].tl.y,height:"20",width:"20",fill:p.value[c.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TL"})},null,14,Yt),e.createElementVNode("rect",{x:p.value[c.value].tr.x,y:p.value[c.value].tr.y,height:"20",width:"20",fill:p.value[c.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TR"})},null,14,At),e.createElementVNode("rect",{x:p.value[c.value].br.x,y:p.value[c.value].br.y,height:"20",width:"20",fill:p.value[c.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BR"})},null,14,Mt),e.createElementVNode("rect",{x:p.value[c.value].bl.x,y:p.value[c.value].bl.y,height:"20",width:"20",fill:p.value[c.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BL"})},null,14,Pt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:p.value[c.value].crosshairs.horizontal},null,8,Ot),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:p.value[c.value].crosshairs.vertical},null,8,Ft)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${Z.value}`,legendSet:ce.value,config:Te.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Rt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:G,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ye._sfc_main,{show:y.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:C.value,content:P.value,isFullscreen:B.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Ht,[e.createVNode($e._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Oe.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Me.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>y.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Ut)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},Gt=He._export_sfc(It,[["__scopeId","data-v-e33b0c6f"]]);exports.default=Gt;
@@ -1,17 +1,17 @@
1
1
  import { computed as g, ref as h, watch as Fe, onMounted as at, onBeforeUnmount as ut, createElementBlock as n, openBlock as o, unref as y, normalizeStyle as q, normalizeClass as T, createBlock as N, createCommentVNode as c, createElementVNode as d, createVNode as ve, createSlots as ot, withCtx as $, renderSlot as k, normalizeProps as G, guardReactiveProps as Q, Fragment as S, renderList as Y, toDisplayString as L, createTextVNode as st, nextTick as rt } from "vue";
2
- import { u as nt, c as Re, t as it, p as de, a as vt, o as dt, e as H, b as ct, d as ht, U as yt, i as O, f as V, X as bt, s as ae, w as ft, V as pt, G as gt, q as mt, r as xt, x as $t, y as kt } from "./index-DaaDBRRF.js";
2
+ import { u as nt, c as Re, t as it, p as de, a as vt, o as dt, e as H, b as ct, d as ht, U as yt, i as O, f as V, X as bt, s as ae, w as ft, V as pt, G as gt, q as mt, r as xt, x as $t, y as kt } from "./index-B8uVRkA1.js";
3
3
  import { t as Lt, u as wt } from "./useResponsive-CoxXLe23.js";
4
- import { _ as qt } from "./Title-ag6gXJcz.js";
5
- import { u as _t, U as St } from "./usePrinter-DUVTMVcK.js";
6
- import { _ as Ct } from "./Tooltip-95WjskR9.js";
7
- import { _ as He } from "./Shape-DRv28FRP.js";
8
- import { L as zt } from "./Legend-D8BbMFRZ.js";
9
- import { D as Tt } from "./DataTable-DGgj14m-.js";
10
- import Xt from "./vue-ui-skeleton-Ce7b04xD.js";
11
- import Wt from "./vue-ui-accordion-BJBt7sbb.js";
12
- import { u as Ie } from "./useNestedProp-ReVcQys2.js";
13
- import { _ as Yt } from "./PackageVersion-Bk5LVTq1.js";
14
- import { P as At } from "./PenAndPaper-CQfs_lTN.js";
4
+ import { _ as qt } from "./Title-MKfkLka7.js";
5
+ import { u as _t, U as St } from "./usePrinter-CppD6oY_.js";
6
+ import { _ as Ct } from "./Tooltip-BUMgVEu0.js";
7
+ import { _ as He } from "./Shape-D_MGNYEa.js";
8
+ import { L as zt } from "./Legend-du4CJMG1.js";
9
+ import { D as Tt } from "./DataTable-BWABkdIL.js";
10
+ import Xt from "./vue-ui-skeleton-BC7kQhlE.js";
11
+ import Wt from "./vue-ui-accordion-CE2Pnpz3.js";
12
+ import { u as Ie } from "./useNestedProp-kStEZqtl.js";
13
+ import { _ as Yt } from "./PackageVersion-Dqo8V-i_.js";
14
+ import { P as At } from "./PenAndPaper-QsaleY3R.js";
15
15
  import { u as Mt } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Ot = ["id"], Vt = ["xmlns", "viewBox", "id"], Pt = ["x", "y", "width", "height"], Bt = ["id"], Ft = ["stop-color"], Rt = ["stop-color"], Ht = { key: 1 }, It = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Ut = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Dt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Et = { key: 2 }, Gt = ["points", "fill"], Qt = ["points", "fill"], Jt = ["points", "fill"], jt = ["points", "fill"], Zt = { key: 3 }, Kt = ["y", "fill", "font-size"], el = ["x", "y", "fill", "font-size"], tl = ["x", "y", "fill", "font-size"], ll = ["y", "fill", "font-size"], al = { key: 4 }, ul = ["x", "y", "font-size", "fill"], ol = ["x", "y", "font-size", "fill"], sl = ["x", "y", "font-size", "fill"], rl = ["id", "font-size", "transform", "fill"], nl = ["id", "font-size", "transform", "fill"], il = ["id", "font-size", "transform", "fill"], vl = { key: 5 }, dl = ["fill", "points"], cl = ["x", "y", "width", "height"], hl = ["x", "y", "width", "height"], yl = ["x", "y", "width", "height"], bl = ["x", "y", "width", "height"], fl = {
@@ -1,14 +1,14 @@
1
1
  import { ref as L, computed as B, watch as Fe, onMounted as St, onBeforeUnmount as wt, nextTick as Ie, createElementBlock as l, openBlock as a, normalizeStyle as N, normalizeClass as re, createBlock as Ee, createCommentVNode as f, createVNode as se, unref as g, createSlots as At, withCtx as J, renderSlot as F, normalizeProps as ve, guardReactiveProps as de, toDisplayString as P, createElementVNode as _, Fragment as m, renderList as $, mergeProps as Me } from "vue";
2
- import { u as _t, c as zt, t as Lt, p as q, a as $t, C as ot, b as Ct, J as It, e as Et, d as Ue, m as Tt, D as it, X as Pt, j as Ot, k as Be, n as ke, i as G, f as D, S as nt, v as X, x as Te, y as De } from "./index-DaaDBRRF.js";
2
+ import { u as _t, c as zt, t as Lt, p as q, a as $t, C as ot, b as Ct, J as It, e as Et, d as Ue, m as Tt, D as it, X as Pt, j as Ot, k as Be, n as ke, i as G, f as D, S as nt, v as X, x as Te, y as De } from "./index-B8uVRkA1.js";
3
3
  import { t as Rt, u as Nt } from "./useResponsive-CoxXLe23.js";
4
- import Pe from "./BaseIcon-zOOwakRm.js";
5
- import { _ as Ft } from "./Tooltip-95WjskR9.js";
6
- import { u as Mt, U as Ut } from "./usePrinter-DUVTMVcK.js";
7
- import { S as Bt } from "./Slicer-BTtwLXWn.js";
8
- import Dt from "./vue-ui-skeleton-Ce7b04xD.js";
9
- import { u as ut } from "./useNestedProp-ReVcQys2.js";
10
- import { _ as Vt } from "./PackageVersion-Bk5LVTq1.js";
11
- import { P as qt } from "./PenAndPaper-CQfs_lTN.js";
4
+ import Pe from "./BaseIcon-DTJIrD3k.js";
5
+ import { _ as Ft } from "./Tooltip-BUMgVEu0.js";
6
+ import { u as Mt, U as Ut } from "./usePrinter-CppD6oY_.js";
7
+ import { S as Bt } from "./Slicer-DKXIt2om.js";
8
+ import Dt from "./vue-ui-skeleton-BC7kQhlE.js";
9
+ import { u as ut } from "./useNestedProp-kStEZqtl.js";
10
+ import { _ as Vt } from "./PackageVersion-Dqo8V-i_.js";
11
+ import { P as qt } from "./PenAndPaper-QsaleY3R.js";
12
12
  import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const A = {
14
14
  LINE: "LINE",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Dla35rDR.cjs"),ze=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./BaseIcon-CKMrYVdW.cjs"),Ge=require("./Tooltip-DwioWtpe.cjs"),Ne=require("./usePrinter-cQwX-nf0.cjs"),Xe=require("./Slicer-5eB08Bkj.cjs"),Ye=require("./vue-ui-skeleton-BIuKWqj2.cjs"),Ve=require("./useNestedProp-onENMM4v.cjs"),Ze=require("./PackageVersion-B7vHZ873.cjs"),Je=require("./PenAndPaper-C2r4IIot.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:v,barLineSwitch:B=6}){let h=null,_=null,L=0;if((typeof v=="number"||typeof v=="string")&&console.warn(`The provided dataset (${v}) is not sufficient to build a chart`),te(v)&&(P(v)&&(v.length<B?h=S.BAR:h=S.LINE,_=v,L=v.length),de(v))){if(!lt(v))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(v[0]),G=Object.values(v[0]);if(!U.some(E=>at(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;$e(G,E=>typeof E=="number")&&(h=S.DONUT,_=v),$e(G,E=>Array.isArray(E)&&P(E))&&(Fe(v)>B?h=S.LINE:h=S.BAR,L=Fe(v),_=v.map(E=>({...E,data:ot(E,F=>P(F))}))),v=v.map(E=>Pe(E)),_=_.map(E=>Pe(E))}return te(v)&&[...new Set(v.flatMap(U=>Array.isArray(U)))][0],{dataset:v,type:h,usableDataset:_,maxSeriesLength:L}}function Ie(v){return!v||te(v)&&!v.length}function te(v){return Array.isArray(v)}function P(v){if(!te(v)||Ie(v))return!1;const B=v.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function de(v){return!te(v)||Ie(v)||!![...new Set(v.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!v.map(h=>Object.keys(h).length>0).includes(!1)}function tt(v,B){const h=Object.keys(v).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let L=0;L<h.length;L+=1){const V=h[L],M=_[L];if(V!==M||typeof v[V]!=typeof B[M])return!1}return!0}function lt(v){if(v.length<=1)return!0;for(let B=0;B<v.length;B+=1)for(let h=B+1;h<v.length;h+=1)if(!tt(v[B],v[h]))return!1;return!0}function at(v){return Ke.includes(v.toUpperCase())}function $e(v,B){let h=[];for(let _=0;_<v.length;_+=1)h.push(B(v[_]));return h.includes(!0)}function Fe(v){return Math.max(...[...v].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function ot(v,B){return Object.values(v).filter(h=>B(h))[0]}function Pe(v){const B={};for(let h in v)v.hasOwnProperty(h)&&(B[h.toUpperCase()]=v[h]);return B}const nt=["id"],rt=["xmlns","viewBox"],it=["x","y","width","height"],ut=["x","y","width","height"],st=["width","height"],ct=["id"],dt=["id"],vt=["id"],mt=["flood-color"],ht={key:0,class:"donut-label-connectors"},ft=["d","stroke","stroke-width","filter"],pt=["cx","cy","r","fill","filter"],kt={class:"donut"},gt=["d","fill","stroke","stroke-width","filter"],yt=["d","onMouseenter","onClick"],xt={key:1,class:"donut-labels quick-animation"},St=["cx","cy","fill","stroke","filter"],bt=["text-anchor","x","y","fill","font-size","filter"],Bt=["text-anchor","x","y","fill","font-size","filter"],wt={key:2,class:"donut-hollow quick-animation"},Et=["x","y","font-size","fill"],At=["x","y","font-size","fill"],Lt={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],_t=["x1","x2","y1","y2","stroke","stroke-width"],zt={key:1,class:"line-axis"},Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t={key:2,class:"yLabels"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],Pt=["x","y","font-size","fill"],It={key:3,class:"periodLabels"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["font-size","text-anchor","fill","transform"],Rt={class:"plots"},Dt={class:"line-plot-series"},Mt=["d","stroke","stroke-width"],Ut=["d","stroke","stroke-width"],qt=["d","stroke","stroke-width"],Ht=["d","stroke","stroke-width"],Wt=["cx","cy","fill","stroke"],jt={key:4,class:"dataLabels"},Gt=["font-size","fill","x","y"],Xt={class:"tooltip-traps"},Yt=["x","y","height","width","fill","onMouseenter","onClick"],Zt={key:0,class:"line-grid"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt={key:1,class:"line-axis"},el=["x1","x2","y1","y2","stroke","stroke-width"],tl=["x1","x2","y1","y2","stroke","stroke-width"],ll={key:2,class:"yLabels"},al=["x1","x2","y1","y2","stroke","stroke-width"],ol=["x","y","font-size","fill"],nl={key:3,class:"periodLabels"},rl=["x1","x2","y1","y2","stroke","stroke-width"],il=["font-size","text-anchor","transform","fill"],ul={class:"plots"},sl=["x","width","height","y","fill","stroke","stroke-width"],cl=["to"],dl=["from","to"],vl={key:4,class:"dataLabels"},ml=["x","y","font-size","fill"],hl={class:"tooltip-traps"},fl=["x","y","height","width","fill","onMouseenter","onClick"],pl={key:6,class:"axis-labels"},kl={key:0},gl=["font-size","fill","x","y"],yl={key:1},xl=["font-size","fill","x","y"],Sl={key:2},bl=["font-size","fill","transform"],Bl={key:3},wl=["font-size","fill","transform"],El={key:6,class:"vue-data-ui-watermark"},Al=["onClick"],Ll=["onClick"],Cl=["onClick"],_l={key:1,class:"vue-ui-quick-chart-not-processable"},zl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(v,{expose:B,emit:h}){const{vue_ui_quick_chart:_}=i.useConfig(),L=v,V=e.ref(null),M=e.ref(null),U=e.ref(null),G=e.ref(null),E=e.ref(i.createUid()),F=e.ref(!1),X=e.ref(null),T=e.ref(""),$=e.ref(null),he=e.ref(null),fe=e.ref(null),x=e.ref([]),pe=e.ref(0),le=e.ref(0),t=e.computed({get:()=>ye(),set:a=>a}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),ke=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),ae=e.ref(!t.value.showUserOptionsOnChartHover);function ge(a=!1){Te.value&&(ae.value=a)}function ye(){const a=Ve.useNestedProp({userConfig:L.config,defaultConfig:_});let s={};return a.theme?s={...Ve.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[a.theme]||L.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:s=a,L.config&&i.hasDeepProperty(L.config,"zoomStartIndex")?s.zoomStartIndex=L.config.zoomStartIndex:s.zoomStartIndex=null,L.config&&i.hasDeepProperty(L.config,"zoomEndIndex")?s.zoomEndIndex=L.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>L.config,a=>{t.value=ye(),k.value.width=t.value.width,k.value.height=t.value.height,ae.value=!t.value.showUserOptionsOnChartHover,be(),J.value.showTooltip=t.value.showTooltip},{deep:!0}),e.watch(()=>L.dataset,a=>{f.value=Z.value,g.value.start=0,g.value.end=f.value.maxSeriesLength,le.value+=1},{deep:!0});const Y=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),q=h,Z=e.computed(()=>{const a=et({dataset:i.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return a||console.error("VueUiQuickChart : Dataset is not processable"),a}),f=e.ref(Z.value),Oe=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,a=>{a||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:oe,isImaging:ne,generatePdf:xe,generateImage:Se}=Ne.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),k=e.ref({width:t.value.width,height:t.value.height}),J=e.ref({showTooltip:t.value.showTooltip}),re=e.ref(null);e.onMounted(()=>{be()});function be(){if(t.value.responsive){const a=ze.throttle(()=>{const{width:s,height:l}=ze.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?G.value:null,source:he.value,noTitle:fe.value});requestAnimationFrame(()=>{k.value.width=s,k.value.height=l})});re.value=new ResizeObserver(a),re.value.observe(V.value.parentNode)}Ce()}e.onBeforeUnmount(()=>{re.value&&re.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.BAR:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.DONUT:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;default:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`}});function Be(a){return[...a].map(s=>s.value).reduce((s,l)=>s+l,0)}function Q(a){return t.value.blurOnHover&&![null,void 0].includes($.value)&&$.value!==a?`url(#blur_${E.value})`:""}function we(a,s){x.value.includes(a)?x.value=x.value.filter(l=>l!==a):x.value.length<s&&x.value.push(a)}const Ee=e.ref(null),Ae=e.ref(null),ie=e.ref(!1);function Me(a,s){ie.value=!0;let l=a.value;const r=Z.value.dataset.find((u,m)=>a.id===`donut_${m}`).VALUE;if(x.value.includes(a.id)){let u=function(){l>r?(ie.value=!1,cancelAnimationFrame(Ae.value),f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Ae.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==a.id),u()}else if(s.length>1){let u=function(){l<r/100?(ie.value=!1,cancelAnimationFrame(Ee.value),x.value.push(a.id),f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(a){I.value=a}const Le=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const a=f.value.dataset.map((o,n)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`donut_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,n){return i.dataLabel({v:isNaN(o.value/Be(n))?0:o.value/Be(n)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function r(o,n){const y=Z.value.dataset.find((A,z)=>`donut_${z}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(n.toFixed(0))).length)}function u({datapoint:o,seriesIndex:n}){X.value={datapoint:o,seriesIndex:n,config:t.value,dataset:a},$.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:n,series:a,config:t.value})))T.value=y({datapoint:o,seriesIndex:n,series:a,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,p+=`<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="${o.color}"/></svg>`,p+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:n})}</b>`,p+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}F.value=!0}function m(){F.value=!1,$.value=null,I.value=null}const C={centerX:k.value.width/2,centerY:k.value.height/2},N=a.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,n)=>o+n,0),W=a.map((o,n)=>({...o,proportion:(o.value||0)/N,value:o.value||0,absoluteValue:Z.value.dataset.find((y,p)=>`donut_${p}`===o.id).VALUE})),O=k.value.width/2,j=k.value.height/2,R=k.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(o=>!x.value.includes(o.id)),legend:W,drawingArea:C,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:N,cx:O,cy:j,radius:R,chart:i.makeDonut({series:a.filter(o=>!x.value.includes(o.id))},O,j,R,R,1.99999,2,1,360,105.25,k.value.height*Le.value)}}),g=e.ref({start:0,end:f.value.maxSeriesLength});function qe(){Ce()}const H=e.ref(null);async function Ce(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&H.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setEndValue(He(t.value.zoomEndIndex+1)))):(g.value={start:0,end:f.value.maxSeriesLength},le.value+=1)}function He(a){const s=f.value.maxSeriesLength;return a>s?s:a<0||t.value.zoomStartIndex!==null&&a<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:a}const We=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let a=[];P(f.value.dataset)&&(a=f.value.dataset),de(f.value.dataset)&&(a=f.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=P(a)?a.length:Math.max(...a.map(u=>u.values.length));let l=[];if(P(a))l=a;else for(let u=0;u<s;u+=1)l.push(a.map(m=>m.values[u]||0).reduce((m,C)=>(m||0)+(C||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const a={height:k.value.height,width:k.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:f.value.dataset.map((o,n)=>n).slice(g.value.start,g.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),de(f.value.dataset)&&(l=f.value.dataset.map((o,n)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`line_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((y,p)=>p).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.map(o=>o.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,C=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,N=s.width/r.maxSeries,W=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=l.map((o,n)=>({...o,coordinates:o.values.map((y,p)=>({x:s.left+N*(p+1)-N/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let n=[];return o.coordinates.forEach(y=>{n.push(`${y.x},${y.y} `)}),{...o,linePath:n.join(" ")}});function j(o){$.value=o,I.value=o;const n=l.map(p=>({...p,value:p.values[o],absoluteIndex:p.absoluteIndices[o]})).filter(p=>!x.value.includes(p.id));X.value={datapoint:n,seriesIndex:o,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:n,seriesIndex:o,series:l,config:t.value})))T.value=y({datapoint:n,seriesIndex:o,series:l,config:t.value});else{let p="";t.value.xyPeriods[n[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[n[0].absoluteIndex]}</div>`),n.forEach((A,z)=>{p+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Bmq5HB9y.cjs"),ze=require("./useResponsive-BJ7DTGpm.cjs"),ce=require("./BaseIcon-Dn1igOva.cjs"),Ge=require("./Tooltip-pA64woiQ.cjs"),Ne=require("./usePrinter-Cf6Zct5m.cjs"),Xe=require("./Slicer-Vzo3baUi.cjs"),Ye=require("./vue-ui-skeleton-D5890icn.cjs"),Ve=require("./useNestedProp-CivZENAh.cjs"),Ze=require("./PackageVersion-Bmro6-lR.cjs"),Je=require("./PenAndPaper-B7dv_ssy.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:v,barLineSwitch:B=6}){let h=null,_=null,L=0;if((typeof v=="number"||typeof v=="string")&&console.warn(`The provided dataset (${v}) is not sufficient to build a chart`),te(v)&&(P(v)&&(v.length<B?h=S.BAR:h=S.LINE,_=v,L=v.length),de(v))){if(!lt(v))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(v[0]),G=Object.values(v[0]);if(!U.some(E=>at(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;$e(G,E=>typeof E=="number")&&(h=S.DONUT,_=v),$e(G,E=>Array.isArray(E)&&P(E))&&(Fe(v)>B?h=S.LINE:h=S.BAR,L=Fe(v),_=v.map(E=>({...E,data:ot(E,F=>P(F))}))),v=v.map(E=>Pe(E)),_=_.map(E=>Pe(E))}return te(v)&&[...new Set(v.flatMap(U=>Array.isArray(U)))][0],{dataset:v,type:h,usableDataset:_,maxSeriesLength:L}}function Ie(v){return!v||te(v)&&!v.length}function te(v){return Array.isArray(v)}function P(v){if(!te(v)||Ie(v))return!1;const B=v.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function de(v){return!te(v)||Ie(v)||!![...new Set(v.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!v.map(h=>Object.keys(h).length>0).includes(!1)}function tt(v,B){const h=Object.keys(v).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let L=0;L<h.length;L+=1){const V=h[L],M=_[L];if(V!==M||typeof v[V]!=typeof B[M])return!1}return!0}function lt(v){if(v.length<=1)return!0;for(let B=0;B<v.length;B+=1)for(let h=B+1;h<v.length;h+=1)if(!tt(v[B],v[h]))return!1;return!0}function at(v){return Ke.includes(v.toUpperCase())}function $e(v,B){let h=[];for(let _=0;_<v.length;_+=1)h.push(B(v[_]));return h.includes(!0)}function Fe(v){return Math.max(...[...v].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function ot(v,B){return Object.values(v).filter(h=>B(h))[0]}function Pe(v){const B={};for(let h in v)v.hasOwnProperty(h)&&(B[h.toUpperCase()]=v[h]);return B}const nt=["id"],rt=["xmlns","viewBox"],it=["x","y","width","height"],ut=["x","y","width","height"],st=["width","height"],ct=["id"],dt=["id"],vt=["id"],mt=["flood-color"],ht={key:0,class:"donut-label-connectors"},ft=["d","stroke","stroke-width","filter"],pt=["cx","cy","r","fill","filter"],kt={class:"donut"},gt=["d","fill","stroke","stroke-width","filter"],yt=["d","onMouseenter","onClick"],xt={key:1,class:"donut-labels quick-animation"},St=["cx","cy","fill","stroke","filter"],bt=["text-anchor","x","y","fill","font-size","filter"],Bt=["text-anchor","x","y","fill","font-size","filter"],wt={key:2,class:"donut-hollow quick-animation"},Et=["x","y","font-size","fill"],At=["x","y","font-size","fill"],Lt={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],_t=["x1","x2","y1","y2","stroke","stroke-width"],zt={key:1,class:"line-axis"},Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t={key:2,class:"yLabels"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],Pt=["x","y","font-size","fill"],It={key:3,class:"periodLabels"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["font-size","text-anchor","fill","transform"],Rt={class:"plots"},Dt={class:"line-plot-series"},Mt=["d","stroke","stroke-width"],Ut=["d","stroke","stroke-width"],qt=["d","stroke","stroke-width"],Ht=["d","stroke","stroke-width"],Wt=["cx","cy","fill","stroke"],jt={key:4,class:"dataLabels"},Gt=["font-size","fill","x","y"],Xt={class:"tooltip-traps"},Yt=["x","y","height","width","fill","onMouseenter","onClick"],Zt={key:0,class:"line-grid"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt={key:1,class:"line-axis"},el=["x1","x2","y1","y2","stroke","stroke-width"],tl=["x1","x2","y1","y2","stroke","stroke-width"],ll={key:2,class:"yLabels"},al=["x1","x2","y1","y2","stroke","stroke-width"],ol=["x","y","font-size","fill"],nl={key:3,class:"periodLabels"},rl=["x1","x2","y1","y2","stroke","stroke-width"],il=["font-size","text-anchor","transform","fill"],ul={class:"plots"},sl=["x","width","height","y","fill","stroke","stroke-width"],cl=["to"],dl=["from","to"],vl={key:4,class:"dataLabels"},ml=["x","y","font-size","fill"],hl={class:"tooltip-traps"},fl=["x","y","height","width","fill","onMouseenter","onClick"],pl={key:6,class:"axis-labels"},kl={key:0},gl=["font-size","fill","x","y"],yl={key:1},xl=["font-size","fill","x","y"],Sl={key:2},bl=["font-size","fill","transform"],Bl={key:3},wl=["font-size","fill","transform"],El={key:6,class:"vue-data-ui-watermark"},Al=["onClick"],Ll=["onClick"],Cl=["onClick"],_l={key:1,class:"vue-ui-quick-chart-not-processable"},zl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(v,{expose:B,emit:h}){const{vue_ui_quick_chart:_}=i.useConfig(),L=v,V=e.ref(null),M=e.ref(null),U=e.ref(null),G=e.ref(null),E=e.ref(i.createUid()),F=e.ref(!1),X=e.ref(null),T=e.ref(""),$=e.ref(null),he=e.ref(null),fe=e.ref(null),x=e.ref([]),pe=e.ref(0),le=e.ref(0),t=e.computed({get:()=>ye(),set:a=>a}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),ke=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),ae=e.ref(!t.value.showUserOptionsOnChartHover);function ge(a=!1){Te.value&&(ae.value=a)}function ye(){const a=Ve.useNestedProp({userConfig:L.config,defaultConfig:_});let s={};return a.theme?s={...Ve.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[a.theme]||L.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:s=a,L.config&&i.hasDeepProperty(L.config,"zoomStartIndex")?s.zoomStartIndex=L.config.zoomStartIndex:s.zoomStartIndex=null,L.config&&i.hasDeepProperty(L.config,"zoomEndIndex")?s.zoomEndIndex=L.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>L.config,a=>{t.value=ye(),k.value.width=t.value.width,k.value.height=t.value.height,ae.value=!t.value.showUserOptionsOnChartHover,be(),J.value.showTooltip=t.value.showTooltip},{deep:!0}),e.watch(()=>L.dataset,a=>{f.value=Z.value,g.value.start=0,g.value.end=f.value.maxSeriesLength,le.value+=1},{deep:!0});const Y=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),q=h,Z=e.computed(()=>{const a=et({dataset:i.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return a||console.error("VueUiQuickChart : Dataset is not processable"),a}),f=e.ref(Z.value),Oe=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,a=>{a||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:oe,isImaging:ne,generatePdf:xe,generateImage:Se}=Ne.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),k=e.ref({width:t.value.width,height:t.value.height}),J=e.ref({showTooltip:t.value.showTooltip}),re=e.ref(null);e.onMounted(()=>{be()});function be(){if(t.value.responsive){const a=ze.throttle(()=>{const{width:s,height:l}=ze.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?G.value:null,source:he.value,noTitle:fe.value});requestAnimationFrame(()=>{k.value.width=s,k.value.height=l})});re.value=new ResizeObserver(a),re.value.observe(V.value.parentNode)}Ce()}e.onBeforeUnmount(()=>{re.value&&re.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.BAR:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.DONUT:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;default:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`}});function Be(a){return[...a].map(s=>s.value).reduce((s,l)=>s+l,0)}function Q(a){return t.value.blurOnHover&&![null,void 0].includes($.value)&&$.value!==a?`url(#blur_${E.value})`:""}function we(a,s){x.value.includes(a)?x.value=x.value.filter(l=>l!==a):x.value.length<s&&x.value.push(a)}const Ee=e.ref(null),Ae=e.ref(null),ie=e.ref(!1);function Me(a,s){ie.value=!0;let l=a.value;const r=Z.value.dataset.find((u,m)=>a.id===`donut_${m}`).VALUE;if(x.value.includes(a.id)){let u=function(){l>r?(ie.value=!1,cancelAnimationFrame(Ae.value),f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Ae.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==a.id),u()}else if(s.length>1){let u=function(){l<r/100?(ie.value=!1,cancelAnimationFrame(Ee.value),x.value.push(a.id),f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((m,C)=>a.id===`donut_${C}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(a){I.value=a}const Le=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const a=f.value.dataset.map((o,n)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`donut_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,n){return i.dataLabel({v:isNaN(o.value/Be(n))?0:o.value/Be(n)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function r(o,n){const y=Z.value.dataset.find((A,z)=>`donut_${z}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(n.toFixed(0))).length)}function u({datapoint:o,seriesIndex:n}){X.value={datapoint:o,seriesIndex:n,config:t.value,dataset:a},$.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:n,series:a,config:t.value})))T.value=y({datapoint:o,seriesIndex:n,series:a,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,p+=`<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="${o.color}"/></svg>`,p+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:n})}</b>`,p+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}F.value=!0}function m(){F.value=!1,$.value=null,I.value=null}const C={centerX:k.value.width/2,centerY:k.value.height/2},N=a.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,n)=>o+n,0),W=a.map((o,n)=>({...o,proportion:(o.value||0)/N,value:o.value||0,absoluteValue:Z.value.dataset.find((y,p)=>`donut_${p}`===o.id).VALUE})),O=k.value.width/2,j=k.value.height/2,R=k.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(o=>!x.value.includes(o.id)),legend:W,drawingArea:C,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:N,cx:O,cy:j,radius:R,chart:i.makeDonut({series:a.filter(o=>!x.value.includes(o.id))},O,j,R,R,1.99999,2,1,360,105.25,k.value.height*Le.value)}}),g=e.ref({start:0,end:f.value.maxSeriesLength});function qe(){Ce()}const H=e.ref(null);async function Ce(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&H.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),H.value&&H.value.setEndValue(He(t.value.zoomEndIndex+1)))):(g.value={start:0,end:f.value.maxSeriesLength},le.value+=1)}function He(a){const s=f.value.maxSeriesLength;return a>s?s:a<0||t.value.zoomStartIndex!==null&&a<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:a}const We=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let a=[];P(f.value.dataset)&&(a=f.value.dataset),de(f.value.dataset)&&(a=f.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=P(a)?a.length:Math.max(...a.map(u=>u.values.length));let l=[];if(P(a))l=a;else for(let u=0;u<s;u+=1)l.push(a.map(m=>m.values[u]||0).reduce((m,C)=>(m||0)+(C||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const a={height:k.value.height,width:k.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:f.value.dataset.map((o,n)=>n).slice(g.value.start,g.value.end),name:t.value.title,color:Y.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),de(f.value.dataset)&&(l=f.value.dataset.map((o,n)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`line_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):Y.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((y,p)=>p).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.map(o=>o.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,C=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,N=s.width/r.maxSeries,W=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=l.map((o,n)=>({...o,coordinates:o.values.map((y,p)=>({x:s.left+N*(p+1)-N/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let n=[];return o.coordinates.forEach(y=>{n.push(`${y.x},${y.y} `)}),{...o,linePath:n.join(" ")}});function j(o){$.value=o,I.value=o;const n=l.map(p=>({...p,value:p.values[o],absoluteIndex:p.absoluteIndices[o]})).filter(p=>!x.value.includes(p.id));X.value={datapoint:n,seriesIndex:o,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:n,seriesIndex:o,series:l,config:t.value})))T.value=y({datapoint:n,seriesIndex:o,series:l,config:t.value});else{let p="";t.value.xyPeriods[n[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[n[0].absoluteIndex]}</div>`),n.forEach((A,z)=>{p+=`
2
2
  <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
3
  <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${A.color}"/></svg>
4
4
  <span>${A.name}:</span>