vue-data-ui 2.6.39 → 2.6.41

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 (160) hide show
  1. package/dist/{Arrow-B97dY5c5.js → Arrow-CzwnuhQC.js} +1 -1
  2. package/dist/{Arrow-5ip5m31y.cjs → Arrow-j4Npojhv.cjs} +1 -1
  3. package/dist/{BaseIcon-CPtTZ5gm.js → BaseIcon-DyOT6PYJ.js} +1 -1
  4. package/dist/{BaseIcon-CnmrKVrD.cjs → BaseIcon-lwGFy7CI.cjs} +1 -1
  5. package/dist/{ColorPicker-anuoNM-p.cjs → ColorPicker-BiTtlEx1.cjs} +1 -1
  6. package/dist/{ColorPicker-DDG5q9jR.js → ColorPicker-DHXRDP2o.js} +3 -3
  7. package/dist/{DataTable-pO-dTL2C.js → DataTable-B8Vnlflz.js} +2 -2
  8. package/dist/{DataTable-DYeuLcih.cjs → DataTable-CX-Mdafj.cjs} +1 -1
  9. package/dist/{Legend-BNLVnEGq.js → Legend-Bw9vX_fW.js} +2 -2
  10. package/dist/{Legend-qp4VAykH.cjs → Legend-DgyuPw1G.cjs} +1 -1
  11. package/dist/{PackageVersion-DuXUuz0O.js → PackageVersion-C6hdi5vE.js} +1 -1
  12. package/dist/{PackageVersion-BzhafpGr.cjs → PackageVersion-CvpIoiav.cjs} +1 -1
  13. package/dist/{PenAndPaper-ZkRFCit4.cjs → PenAndPaper-5L5c2K-j.cjs} +1 -1
  14. package/dist/{PenAndPaper-CoDyTQsZ.js → PenAndPaper-DBNdemyU.js} +3 -3
  15. package/dist/{Shape-DH4XF-dc.js → Shape-CcQr04tT.js} +1 -1
  16. package/dist/{Shape-DroaKLIm.cjs → Shape-my_oX1r-.cjs} +1 -1
  17. package/dist/{Slicer-C854GBKY.js → Slicer-CJT21pOl.js} +2 -2
  18. package/dist/{Slicer-Bo7bO5E5.cjs → Slicer-Dpuspld0.cjs} +1 -1
  19. package/dist/{Title-CcDml6Zf.cjs → Title-CnyZaLp0.cjs} +1 -1
  20. package/dist/{Title-C223TJ6C.js → Title-Dfjx2pT6.js} +1 -1
  21. package/dist/{Tooltip-BvROZcv0.js → Tooltip-C3kzKkai.js} +1 -1
  22. package/dist/{Tooltip-lj99sBKN.cjs → Tooltip-V6vr6k8X.cjs} +1 -1
  23. package/dist/{index-CVHop7bB.js → index-BAPUY6BW.js} +409 -382
  24. package/dist/index-CVZp-EFm.cjs +9 -0
  25. package/dist/style.css +1 -1
  26. package/dist/types/vue-data-ui.d.cts +1 -0
  27. package/dist/types/vue-data-ui.d.ts +1 -0
  28. package/dist/{useNestedProp-DVSKLFhF.cjs → useNestedProp-Ch_Tbu0f.cjs} +1 -1
  29. package/dist/{useNestedProp-DB5XMx_s.js → useNestedProp-X5u-cjpn.js} +1 -1
  30. package/dist/{usePrinter-D3Sb5fSb.cjs → usePrinter-BJ8ChcXf.cjs} +1 -1
  31. package/dist/{usePrinter-CXjj2NA9.js → usePrinter-BsXYrX84.js} +1 -1
  32. package/dist/{vue-data-ui-Bv_90b2c.cjs → vue-data-ui-CZG3ODq3.cjs} +1 -1
  33. package/dist/{vue-data-ui-C7FFFFUg.js → vue-data-ui-OBrcs0EY.js} +61 -61
  34. package/dist/vue-data-ui.cjs +1 -1
  35. package/dist/vue-data-ui.js +8 -8
  36. package/dist/{vue-ui-3d-bar-DQaDfIEU.cjs → vue-ui-3d-bar-BOUSglv4.cjs} +1 -1
  37. package/dist/{vue-ui-3d-bar-BkaPHEfQ.js → vue-ui-3d-bar-BRhfbpJd.js} +9 -9
  38. package/dist/{vue-ui-accordion-Ds-8LBd7.cjs → vue-ui-accordion-BS_katXk.cjs} +1 -1
  39. package/dist/{vue-ui-accordion-DZkJGmcV.js → vue-ui-accordion-Dm7ZlylJ.js} +3 -3
  40. package/dist/{vue-ui-age-pyramid-CklczrE2.cjs → vue-ui-age-pyramid-Bt_wuZiO.cjs} +1 -1
  41. package/dist/{vue-ui-age-pyramid-_QqaTWL9.js → vue-ui-age-pyramid-CBtPdObD.js} +10 -10
  42. package/dist/{vue-ui-annotator-DvTfQVeB.cjs → vue-ui-annotator-B8HvCy1u.cjs} +1 -1
  43. package/dist/{vue-ui-annotator-CkYus97l.js → vue-ui-annotator-Rb7-Ig4d.js} +1 -1
  44. package/dist/{vue-ui-bullet-7XbqAz6z.cjs → vue-ui-bullet-BlYz0H5Q.cjs} +1 -1
  45. package/dist/{vue-ui-bullet-D_VtAlvO.js → vue-ui-bullet-C7ftUjYQ.js} +8 -8
  46. package/dist/{vue-ui-candlestick-B423J4Df.cjs → vue-ui-candlestick-DY4EKJPX.cjs} +1 -1
  47. package/dist/{vue-ui-candlestick-RzjBpRWa.js → vue-ui-candlestick-D_osh2qN.js} +11 -11
  48. package/dist/{vue-ui-carousel-table-CDGpVNBq.cjs → vue-ui-carousel-table-DHN5NuUS.cjs} +1 -1
  49. package/dist/{vue-ui-carousel-table-BcKE75Fr.js → vue-ui-carousel-table-M72bzy85.js} +4 -4
  50. package/dist/{vue-ui-chestnut-BpqaO6Ki.cjs → vue-ui-chestnut-BdHd-Juu.cjs} +1 -1
  51. package/dist/{vue-ui-chestnut-DlJ4UHAd.js → vue-ui-chestnut-i7EtBpLY.js} +8 -8
  52. package/dist/{vue-ui-circle-pack-C75Ig7Ot.js → vue-ui-circle-pack-BC1uScHe.js} +9 -9
  53. package/dist/{vue-ui-circle-pack-HI9e7B2K.cjs → vue-ui-circle-pack-rf-DQQuM.cjs} +1 -1
  54. package/dist/{vue-ui-cursor-9UG_5YM1.cjs → vue-ui-cursor-B06MWQUK.cjs} +1 -1
  55. package/dist/{vue-ui-cursor-DQRdy4kP.js → vue-ui-cursor-eJ2ExkFm.js} +2 -2
  56. package/dist/{vue-ui-dashboard-LImeuX9g.js → vue-ui-dashboard-BAwwet8B.js} +2 -2
  57. package/dist/{vue-ui-dashboard-J0p7RHcR.cjs → vue-ui-dashboard-m-sB4TXH.cjs} +1 -1
  58. package/dist/{vue-ui-digits-BCj_Px9b.js → vue-ui-digits-B6ivU7b9.js} +2 -2
  59. package/dist/{vue-ui-digits-DfnixiIy.cjs → vue-ui-digits-C5jmpiTL.cjs} +1 -1
  60. package/dist/{vue-ui-donut-DaqG2jcW.js → vue-ui-donut-DtZ-n8vd.js} +12 -12
  61. package/dist/{vue-ui-donut-CvxOiV5F.cjs → vue-ui-donut-GBs-eAbp.cjs} +1 -1
  62. package/dist/{vue-ui-donut-evolution-QJnKCDWk.cjs → vue-ui-donut-evolution-DdDVkeuH.cjs} +1 -1
  63. package/dist/{vue-ui-donut-evolution-BFn-J1jp.js → vue-ui-donut-evolution-VJpinb_g.js} +11 -11
  64. package/dist/{vue-ui-dumbbell-C_nCYtcd.cjs → vue-ui-dumbbell-94nsg3t1.cjs} +1 -1
  65. package/dist/{vue-ui-dumbbell-DD8_k_pA.js → vue-ui-dumbbell-EoH10k2D.js} +10 -10
  66. package/dist/{vue-ui-flow-Dls16uj4.js → vue-ui-flow-B-xWkgVv.js} +9 -9
  67. package/dist/{vue-ui-flow-CCXQ4mYO.cjs → vue-ui-flow-Ddn2S7NR.cjs} +1 -1
  68. package/dist/{vue-ui-funnel-ClCnyvUX.cjs → vue-ui-funnel-Iawza5lZ.cjs} +1 -1
  69. package/dist/{vue-ui-funnel-X6bFgq1Z.js → vue-ui-funnel-hdajl9CD.js} +9 -9
  70. package/dist/{vue-ui-galaxy-CRDleJUe.cjs → vue-ui-galaxy-BoiBmzst.cjs} +1 -1
  71. package/dist/{vue-ui-galaxy-Boa9gjJV.js → vue-ui-galaxy-CeqCjd4V.js} +11 -11
  72. package/dist/{vue-ui-gauge-DzjMmBFe.cjs → vue-ui-gauge-B4aBDTfP.cjs} +1 -1
  73. package/dist/{vue-ui-gauge-DAwO2xJz.js → vue-ui-gauge-BSuGWZEY.js} +7 -7
  74. package/dist/{vue-ui-gizmo-BvGlHcHy.cjs → vue-ui-gizmo-D_J2R5JU.cjs} +1 -1
  75. package/dist/{vue-ui-gizmo-ChFEuLno.js → vue-ui-gizmo-VFwChXXf.js} +3 -3
  76. package/dist/vue-ui-heatmap-BNlBRWi1.cjs +1 -0
  77. package/dist/{vue-ui-heatmap-D2mH3GRc.js → vue-ui-heatmap-DAeCu-iM.js} +53 -53
  78. package/dist/{vue-ui-history-plot-CsjNiSkK.cjs → vue-ui-history-plot-BcjI3J96.cjs} +1 -1
  79. package/dist/{vue-ui-history-plot-C2ynFIiK.js → vue-ui-history-plot-Caty-SWt.js} +11 -11
  80. package/dist/{vue-ui-kpi-C8kidDY0.js → vue-ui-kpi-B2WcjLWP.js} +3 -3
  81. package/dist/{vue-ui-kpi-BuojbCip.cjs → vue-ui-kpi-Bu24xnG8.cjs} +1 -1
  82. package/dist/{vue-ui-mini-loader-32UNlDDN.js → vue-ui-mini-loader-B8QzxySW.js} +2 -2
  83. package/dist/{vue-ui-mini-loader-BBLK1NYq.cjs → vue-ui-mini-loader-BgW5M00P.cjs} +1 -1
  84. package/dist/vue-ui-molecule-Ds0uou9B.js +829 -0
  85. package/dist/vue-ui-molecule-WPdx8i08.cjs +1 -0
  86. package/dist/{vue-ui-mood-radar-UpFKESLA.cjs → vue-ui-mood-radar-D45uj8xo.cjs} +1 -1
  87. package/dist/{vue-ui-mood-radar-DibQpZ4m.js → vue-ui-mood-radar-DMrAwNQa.js} +11 -11
  88. package/dist/{vue-ui-nested-donuts-CH0on2fU.cjs → vue-ui-nested-donuts-3orKF1Fi.cjs} +1 -1
  89. package/dist/{vue-ui-nested-donuts-C30jFP2v.js → vue-ui-nested-donuts-FSCi4a9f.js} +11 -11
  90. package/dist/{vue-ui-onion-C_lRLYfI.cjs → vue-ui-onion-CiXgGubD.cjs} +1 -1
  91. package/dist/{vue-ui-onion-BvKTXaMU.js → vue-ui-onion-YWVe7eaq.js} +11 -11
  92. package/dist/{vue-ui-parallel-coordinate-plot-C9V9mpG7.js → vue-ui-parallel-coordinate-plot-C8vxLtTa.js} +12 -12
  93. package/dist/{vue-ui-parallel-coordinate-plot-3Y3tw-xu.cjs → vue-ui-parallel-coordinate-plot-DeZ2tt1O.cjs} +1 -1
  94. package/dist/{vue-ui-quadrant-BJbfTZHj.js → vue-ui-quadrant-DmDoysAq.js} +40 -40
  95. package/dist/{vue-ui-quadrant-Bdfj6rMa.cjs → vue-ui-quadrant-LTIGWJiO.cjs} +1 -1
  96. package/dist/{vue-ui-quick-chart-CQetx6nm.cjs → vue-ui-quick-chart-BgSeWNxv.cjs} +1 -1
  97. package/dist/{vue-ui-quick-chart-DVzpgYpH.js → vue-ui-quick-chart-CwJe7rJt.js} +9 -9
  98. package/dist/{vue-ui-radar-DNhe9CJp.js → vue-ui-radar-Bo9SbfBN.js} +12 -12
  99. package/dist/{vue-ui-radar-uL_2DFoA.cjs → vue-ui-radar-CblS9X1n.cjs} +1 -1
  100. package/dist/{vue-ui-rating-Dl5EXfoM.cjs → vue-ui-rating-CqY6A4WX.cjs} +1 -1
  101. package/dist/{vue-ui-rating-CScqTeBz.js → vue-ui-rating-DPs6BKf1.js} +10 -10
  102. package/dist/{vue-ui-relation-circle-CMfcB2y4.js → vue-ui-relation-circle-3Al_2yf1.js} +7 -7
  103. package/dist/{vue-ui-relation-circle-BOAv03ET.cjs → vue-ui-relation-circle-COYe9dsQ.cjs} +1 -1
  104. package/dist/{vue-ui-rings-Ct4IZrwW.js → vue-ui-rings-D9_ClLdg.js} +12 -12
  105. package/dist/{vue-ui-rings-1guUWjBV.cjs → vue-ui-rings-DOlqslSN.cjs} +1 -1
  106. package/dist/{vue-ui-scatter-C2lZcn5O.js → vue-ui-scatter-DFDHrRyc.js} +42 -42
  107. package/dist/{vue-ui-scatter-D-llNCbW.cjs → vue-ui-scatter-DQhoY0TK.cjs} +1 -1
  108. package/dist/{vue-ui-screenshot-D7K40IXf.cjs → vue-ui-screenshot-BWVTxKN_.cjs} +1 -1
  109. package/dist/{vue-ui-screenshot-BBazxOqC.js → vue-ui-screenshot-R1IzXCqt.js} +1 -1
  110. package/dist/{vue-ui-skeleton-BUNaR9Kg.js → vue-ui-skeleton-DBfQG5lC.js} +57 -57
  111. package/dist/{vue-ui-skeleton-cQoXWosg.cjs → vue-ui-skeleton-Dn9J8aVW.cjs} +1 -1
  112. package/dist/{vue-ui-smiley-CCDBWRTa.js → vue-ui-smiley-CLv8dmnr.js} +2 -2
  113. package/dist/{vue-ui-smiley-_gyL-r4c.cjs → vue-ui-smiley-DQ7I4CcQ.cjs} +1 -1
  114. package/dist/{vue-ui-spark-trend-B9xYWR4x.js → vue-ui-spark-trend-B0qbQaxj.js} +5 -5
  115. package/dist/{vue-ui-spark-trend-D5M7L8Nn.cjs → vue-ui-spark-trend-Drp1E7DH.cjs} +1 -1
  116. package/dist/{vue-ui-sparkbar-B9q9xGj6.js → vue-ui-sparkbar-Bz_QHNKp.js} +4 -4
  117. package/dist/{vue-ui-sparkbar-B9_aTFqL.cjs → vue-ui-sparkbar-DYW_BgkY.cjs} +1 -1
  118. package/dist/{vue-ui-sparkgauge-DlJWcy62.js → vue-ui-sparkgauge-5EIHFUiW.js} +4 -4
  119. package/dist/{vue-ui-sparkgauge-BIVUXWRg.cjs → vue-ui-sparkgauge-C6tB0nl4.cjs} +1 -1
  120. package/dist/{vue-ui-sparkhistogram-gn3DIsxZ.js → vue-ui-sparkhistogram-COdCqBiI.js} +5 -5
  121. package/dist/{vue-ui-sparkhistogram-Dm0Vtvn1.cjs → vue-ui-sparkhistogram-KIw7nvKd.cjs} +1 -1
  122. package/dist/{vue-ui-sparkline-Ch2QWsMO.cjs → vue-ui-sparkline-CXIdKGso.cjs} +1 -1
  123. package/dist/{vue-ui-sparkline-9MoD7O9K.js → vue-ui-sparkline-DgUc7CMn.js} +15 -15
  124. package/dist/{vue-ui-sparkstackbar-BACwbjpj.js → vue-ui-sparkstackbar-BUqauQMd.js} +5 -5
  125. package/dist/{vue-ui-sparkstackbar-aFnfjz2u.cjs → vue-ui-sparkstackbar-MrQzEVeh.cjs} +1 -1
  126. package/dist/{vue-ui-stackbar-DcXIU7MJ.cjs → vue-ui-stackbar-BUJpFyA3.cjs} +1 -1
  127. package/dist/{vue-ui-stackbar-B4gbMSfv.js → vue-ui-stackbar-C-i36fcc.js} +13 -13
  128. package/dist/{vue-ui-strip-plot-g3BjFUT5.cjs → vue-ui-strip-plot-BLECfP0D.cjs} +1 -1
  129. package/dist/{vue-ui-strip-plot-2H2e_73D.js → vue-ui-strip-plot-Dc82V8Qo.js} +11 -11
  130. package/dist/{vue-ui-table-Do6l-NwY.cjs → vue-ui-table-0E7zmWIW.cjs} +1 -1
  131. package/dist/{vue-ui-table-a03YNGcq.js → vue-ui-table-DnAzCFyM.js} +1 -1
  132. package/dist/{vue-ui-table-heatmap-CNjY0h0g.cjs → vue-ui-table-heatmap-BHSksmMn.cjs} +1 -1
  133. package/dist/{vue-ui-table-heatmap-CeF3qQ6v.js → vue-ui-table-heatmap-CzwyhRmp.js} +4 -4
  134. package/dist/{vue-ui-table-sparkline-dISGVncg.js → vue-ui-table-sparkline-BU4he5wL.js} +5 -5
  135. package/dist/{vue-ui-table-sparkline-BpQv4cWI.cjs → vue-ui-table-sparkline-BoVrzVok.cjs} +1 -1
  136. package/dist/{vue-ui-thermometer-C25rhVvw.cjs → vue-ui-thermometer-DeJpqEix.cjs} +1 -1
  137. package/dist/{vue-ui-thermometer-Cc343GDr.js → vue-ui-thermometer-uShXro0_.js} +7 -7
  138. package/dist/{vue-ui-timer-TeAbWeT2.cjs → vue-ui-timer-C8qXGSrQ.cjs} +1 -1
  139. package/dist/{vue-ui-timer-ByQXGLpD.js → vue-ui-timer-D6L29mt9.js} +5 -5
  140. package/dist/{vue-ui-tiremarks-zdNTuR2J.js → vue-ui-tiremarks-BcjGqJn-.js} +7 -7
  141. package/dist/{vue-ui-tiremarks-CG0Da6_3.cjs → vue-ui-tiremarks-CQ4yESxv.cjs} +1 -1
  142. package/dist/{vue-ui-treemap-B_xkm-3z.js → vue-ui-treemap-BpB4ofIX.js} +11 -11
  143. package/dist/{vue-ui-treemap-Cqx_LVJx.cjs → vue-ui-treemap-DbTCrAmK.cjs} +1 -1
  144. package/dist/{vue-ui-vertical-bar-BlOQzW7s.js → vue-ui-vertical-bar-CEIg-_SG.js} +12 -12
  145. package/dist/{vue-ui-vertical-bar-CR1hPIJS.cjs → vue-ui-vertical-bar-Q5ArQTC0.cjs} +1 -1
  146. package/dist/{vue-ui-waffle-CnvaOKK_.cjs → vue-ui-waffle-B61yE93N.cjs} +1 -1
  147. package/dist/{vue-ui-waffle-DELAI7_M.js → vue-ui-waffle-h8UbPcuC.js} +12 -12
  148. package/dist/{vue-ui-wheel-CLP2SMB4.js → vue-ui-wheel-BhLEyhW_.js} +7 -7
  149. package/dist/{vue-ui-wheel-DONILlPN.cjs → vue-ui-wheel-Chc9pVEu.cjs} +1 -1
  150. package/dist/{vue-ui-word-cloud-D4oJGtfH.cjs → vue-ui-word-cloud-Cq6mmJVo.cjs} +1 -1
  151. package/dist/{vue-ui-word-cloud-DTxLmJhe.js → vue-ui-word-cloud-oa6Tnt3L.js} +10 -10
  152. package/dist/{vue-ui-xy-CNBUMris.cjs → vue-ui-xy-Brt11wmo.cjs} +1 -1
  153. package/dist/{vue-ui-xy-QB9D95yQ.js → vue-ui-xy-CXY00bkP.js} +46 -46
  154. package/dist/{vue-ui-xy-canvas-4rdG5Bzv.cjs → vue-ui-xy-canvas-Ce4kC0Xz.cjs} +1 -1
  155. package/dist/{vue-ui-xy-canvas-DrVvMTQo.js → vue-ui-xy-canvas-DapzRtyI.js} +40 -40
  156. package/package.json +1 -1
  157. package/dist/index-CuhZ_hul.cjs +0 -9
  158. package/dist/vue-ui-heatmap-DiKzEnfD.cjs +0 -1
  159. package/dist/vue-ui-molecule-C_giWPuq.cjs +0 -1
  160. package/dist/vue-ui-molecule-DWJWHwg9.js +0 -826
@@ -1,21 +1,21 @@
1
- import { computed as x, ref as h, watch as at, onMounted as ot, onBeforeUnmount as st, createElementBlock as r, openBlock as o, unref as n, normalizeStyle as Y, normalizeClass as Re, createBlock as V, createCommentVNode as c, createElementVNode as d, createVNode as pe, createSlots as ut, withCtx as _, renderSlot as $, normalizeProps as J, guardReactiveProps as K, Fragment as P, renderList as X, toDisplayString as C, createTextVNode as rt, nextTick as it } from "vue";
2
- import { u as nt, c as vt, t as yt, p as q, a as ct, o as dt, e as fe, b as ht, g as Ee, U as pt, Z as ft, S as gt, X as mt, s as ge, V as xt, i as j, v as A, f as W, q as bt, r as kt, x as wt, y as _t } from "./index-CVHop7bB.js";
1
+ import { computed as x, ref as h, watch as at, onMounted as ot, onBeforeUnmount as st, createElementBlock as r, openBlock as o, unref as n, normalizeStyle as Y, normalizeClass as Re, createBlock as V, createCommentVNode as c, createElementVNode as d, createVNode as pe, createSlots as ut, withCtx as _, renderSlot as $, normalizeProps as K, guardReactiveProps as Q, Fragment as P, renderList as X, toDisplayString as C, createTextVNode as rt, nextTick as it } from "vue";
2
+ import { u as nt, c as vt, t as yt, p as q, a as ct, o as dt, e as fe, b as ht, g as Ee, V as pt, _ as ft, T as gt, X as mt, s as ge, W as xt, i as j, v as A, f as W, q as bt, r as kt, x as wt, y as _t } from "./index-BAPUY6BW.js";
3
3
  import { t as $t, u as Mt } from "./useResponsive-vZgZwV-S.js";
4
- import { _ as Ct } from "./Title-C223TJ6C.js";
5
- import { u as At, U as zt } from "./usePrinter-CXjj2NA9.js";
6
- import { _ as St } from "./Tooltip-BvROZcv0.js";
7
- import { L as Tt } from "./Legend-BNLVnEGq.js";
8
- import { _ as Ue } from "./Shape-DH4XF-dc.js";
9
- import { D as Lt } from "./DataTable-pO-dTL2C.js";
10
- import Bt from "./vue-ui-skeleton-BUNaR9Kg.js";
11
- import Ot from "./vue-ui-accordion-DZkJGmcV.js";
12
- import { u as Ge } from "./useNestedProp-DB5XMx_s.js";
13
- import { _ as Nt } from "./PackageVersion-DuXUuz0O.js";
14
- import { P as Pt } from "./PenAndPaper-CoDyTQsZ.js";
4
+ import { _ as Ct } from "./Title-Dfjx2pT6.js";
5
+ import { u as At, U as zt } from "./usePrinter-BsXYrX84.js";
6
+ import { _ as St } from "./Tooltip-C3kzKkai.js";
7
+ import { L as Tt } from "./Legend-Bw9vX_fW.js";
8
+ import { _ as Ue } from "./Shape-CcQr04tT.js";
9
+ import { D as Lt } from "./DataTable-B8Vnlflz.js";
10
+ import Bt from "./vue-ui-skeleton-DBfQG5lC.js";
11
+ import Ot from "./vue-ui-accordion-Dm7ZlylJ.js";
12
+ import { u as Ge } from "./useNestedProp-X5u-cjpn.js";
13
+ import { _ as Nt } from "./PackageVersion-C6hdi5vE.js";
14
+ import { P as Pt } from "./PenAndPaper-DBNdemyU.js";
15
15
  import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
16
16
  import { u as Ft } from "./useChartAccessibility-BWojgys7.js";
17
17
  import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { key: 1 }, jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 2 }, Ut = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Gt = { key: 0 }, qt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Ht = { key: 1 }, Zt = { key: 3 }, Jt = ["id"], Kt = ["stop-color"], Qt = ["stop-color"], el = ["id"], tl = ["stop-color"], ll = ["stop-color"], al = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], ol = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], sl = { key: 0 }, ul = ["d", "stroke", "stroke-width"], rl = ["d", "stroke", "stroke-width"], il = ["d", "stroke", "stroke-width"], nl = ["d", "stroke", "stroke-width"], vl = {
18
+ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { key: 1 }, jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 2 }, Ut = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Gt = { key: 0 }, qt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], Ht = { key: 1 }, Jt = { key: 3 }, Kt = ["id"], Qt = ["stop-color"], Zt = ["stop-color"], el = ["id"], tl = ["stop-color"], ll = ["stop-color"], al = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], ol = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], sl = { key: 0 }, ul = ["d", "stroke", "stroke-width"], rl = ["d", "stroke", "stroke-width"], il = ["d", "stroke", "stroke-width"], nl = ["d", "stroke", "stroke-width"], vl = {
19
19
  key: 4,
20
20
  style: { "pointer-events": "none !important" }
21
21
  }, yl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], cl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], dl = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], hl = ["x", "y", "font-size", "fill", "font-weight"], pl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], fl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], gl = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], ml = { key: 5 }, xl = ["x", "y", "font-size", "fill"], bl = ["x", "y", "font-size", "fill"], kl = ["id", "transform", "font-size", "font-weight", "fill"], wl = { key: 6 }, _l = ["x", "y", "font-size", "fill"], $l = ["x", "y", "font-size", "fill"], Ml = ["font-size", "font-weight", "fill", "x", "y"], Cl = ["id"], Al = ["x", "y", "width", "height"], zl = { key: 7 }, Sl = ["x1", "x2", "y1", "y2", "stroke-dasharray", "stroke", "stroke-width", "clip-path"], Tl = ["x", "y", "fill", "font-size", "font-weight"], Ll = {
@@ -46,14 +46,14 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
46
46
  }
47
47
  },
48
48
  setup(qe, { expose: He }) {
49
- const { vue_ui_scatter: Ze } = nt(), F = qe, ee = x(() => !!F.dataset && F.dataset.length), z = h(vt()), Je = h(null), ue = h(!1), re = h(""), me = h(0), Q = h(null), xe = h(null), be = h(null), ke = h(null), we = h(null), _e = h(0), $e = h(0), Me = h(0), e = x({
49
+ const { vue_ui_scatter: Je } = nt(), F = qe, ee = x(() => !!F.dataset && F.dataset.length), z = h(vt()), Ke = h(null), ue = h(!1), re = h(""), me = h(0), Z = h(null), xe = h(null), be = h(null), ke = h(null), we = h(null), _e = h(0), $e = h(0), Me = h(0), e = x({
50
50
  get: () => Se(),
51
51
  set: (t) => t
52
52
  }), { userOptionsVisible: ie, setUserOptionsVisibility: Ce, keepUserOptionState: Ae } = Wt({ config: e.value }), { svgRef: ze } = Ft({ config: e.value.style.title });
53
53
  function Se() {
54
54
  const t = Ge({
55
55
  userConfig: F.config,
56
- defaultConfig: Ze
56
+ defaultConfig: Je
57
57
  });
58
58
  return t.theme ? {
59
59
  ...Ge({
@@ -77,7 +77,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
77
77
  }), e.value.responsive) {
78
78
  const t = $t(() => {
79
79
  const { width: u, height: l } = Mt({
80
- chart: Q.value,
80
+ chart: Z.value,
81
81
  title: e.value.style.title.text ? xe.value : null,
82
82
  legend: e.value.style.legend.show ? be.value : null,
83
83
  source: ke.value,
@@ -87,7 +87,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
87
87
  b.value.width = u, b.value.height = l;
88
88
  });
89
89
  });
90
- te.value = new ResizeObserver(t), te.value.observe(Q.value.parentNode);
90
+ te.value = new ResizeObserver(t), te.value.observe(Z.value.parentNode);
91
91
  }
92
92
  }
93
93
  st(() => {
@@ -96,7 +96,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
96
96
  const { isPrinting: Le, isImaging: Be, generatePdf: Oe, generateImage: Ne } = At({
97
97
  elementId: `vue-ui-scatter_${z.value}`,
98
98
  fileName: e.value.style.title.text || "vue-ui-scatter"
99
- }), Ke = x(() => e.value.userOptions.show && !e.value.style.title.text), Pe = x(() => ht(e.value.customPalette)), B = h({
99
+ }), Qe = x(() => e.value.userOptions.show && !e.value.style.title.text), Pe = x(() => ht(e.value.customPalette)), B = h({
100
100
  showTable: e.value.table.show,
101
101
  showTooltip: e.value.style.tooltip.show
102
102
  }), b = h({
@@ -125,11 +125,11 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
125
125
  Ee({
126
126
  datasetObject: k,
127
127
  requiredAttributes: ["x", "y"]
128
- }).forEach((Z) => {
128
+ }).forEach((J) => {
129
129
  fe({
130
130
  componentName: "VueUiScatter",
131
131
  type: "datasetSerieAttribute",
132
- property: `values.${Z}`,
132
+ property: `values.${J}`,
133
133
  index: `${v} - ${E}`
134
134
  });
135
135
  });
@@ -155,7 +155,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
155
155
  segregate: () => De(l),
156
156
  isSegregated: m.value.includes(l)
157
157
  };
158
- })), Qe = x(() => ({
158
+ })), Ze = x(() => ({
159
159
  cy: "scatter-div-legend",
160
160
  backgroundColor: e.value.style.legend.backgroundColor,
161
161
  color: e.value.style.legend.color,
@@ -181,11 +181,11 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
181
181
  let s = 0, a = 0, v = 0;
182
182
  for (const g of t.plots)
183
183
  s += (g.x - u) * (g.y - l), a += (g.x - u) ** 2, v += (g.y - l) ** 2;
184
- const k = s / Math.sqrt(a * v), E = k * (Math.sqrt(v) / Math.sqrt(a)), Z = l - E * u, N = {
184
+ const k = s / Math.sqrt(a * v), E = k * (Math.sqrt(v) / Math.sqrt(a)), J = l - E * u, N = {
185
185
  x1: i.value.left,
186
186
  x2: i.value.right,
187
- y1: E * i.value.left + Z,
188
- y2: E * i.value.right + Z,
187
+ y1: E * i.value.left + J,
188
+ y2: E * i.value.right + J,
189
189
  coefficient: k
190
190
  }, M = (N.y2 - N.y1) / (N.x2 - N.x1), L = N.y1 - M * N.x1, I = Math.min(b.value.width - e.value.style.layout.padding.right, Math.max(e.value.style.layout.padding.left, (i.value.top - L) / M)), se = {
191
191
  x: I,
@@ -221,7 +221,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
221
221
  l.forEach(({ x: w, y: G }) => {
222
222
  s = Math.min(s, w), a = Math.max(a, w), v = Math.min(v, G), k = Math.max(k, G);
223
223
  });
224
- const E = a - s, Z = k - v, N = E / u, M = Z / u, L = Array(u).fill(0), I = Array(u).fill(0);
224
+ const E = a - s, J = k - v, N = E / u, M = J / u, L = Array(u).fill(0), I = Array(u).fill(0);
225
225
  l.forEach(({ x: w, y: G }) => {
226
226
  const de = Math.floor((w - s) / N), he = Math.floor((G - v) / M);
227
227
  L[de] || (L[de] = 0), I[he] || (I[he] = 0), L[de] += 1, I[he] += 1;
@@ -371,7 +371,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
371
371
  }), (t, u) => (o(), r("div", {
372
372
  class: Re(`vue-ui-scatter ${H.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
373
373
  ref_key: "scatterChart",
374
- ref: Q,
374
+ ref: Z,
375
375
  id: `vue-ui-scatter_${z.value}`,
376
376
  style: Y(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
377
377
  onMouseenter: u[2] || (u[2] = () => n(Ce)(!0)),
@@ -385,7 +385,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
385
385
  active: oe.value,
386
386
  onClose: ye
387
387
  }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
388
- Ke.value ? (o(), r("div", {
388
+ Qe.value ? (o(), r("div", {
389
389
  key: 1,
390
390
  ref_key: "noTitle",
391
391
  ref: we,
@@ -414,7 +414,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
414
414
  ], 512)) : c("", !0),
415
415
  e.value.userOptions.show && ee.value && (n(Ae) || n(ie)) ? (o(), V(zt, {
416
416
  ref_key: "details",
417
- ref: Je,
417
+ ref: Ke,
418
418
  key: `user_options_${me.value}`,
419
419
  backgroundColor: e.value.style.backgroundColor,
420
420
  color: e.value.style.color,
@@ -430,7 +430,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
430
430
  isTooltip: B.value.showTooltip,
431
431
  isFullscreen: H.value,
432
432
  titles: { ...e.value.userOptions.buttonTitles },
433
- chartElement: Q.value,
433
+ chartElement: Z.value,
434
434
  position: e.value.userOptions.position,
435
435
  hasAnnotator: e.value.userOptions.buttons.annotator,
436
436
  isAnnotation: oe.value,
@@ -448,7 +448,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
448
448
  t.$slots.menuIcon ? {
449
449
  name: "menuIcon",
450
450
  fn: _(({ isOpen: l, color: s }) => [
451
- $(t.$slots, "menuIcon", J(K({ isOpen: l, color: s })), void 0, !0)
451
+ $(t.$slots, "menuIcon", K(Q({ isOpen: l, color: s })), void 0, !0)
452
452
  ]),
453
453
  key: "0"
454
454
  } : void 0,
@@ -490,14 +490,14 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
490
490
  t.$slots.optionFullscreen ? {
491
491
  name: "optionFullscreen",
492
492
  fn: _(({ toggleFullscreen: l, isFullscreen: s }) => [
493
- $(t.$slots, "optionFullscreen", J(K({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
493
+ $(t.$slots, "optionFullscreen", K(Q({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
494
494
  ]),
495
495
  key: "6"
496
496
  } : void 0,
497
497
  t.$slots.optionAnnotator ? {
498
498
  name: "optionAnnotator",
499
499
  fn: _(({ toggleAnnotator: l, isAnnotator: s }) => [
500
- $(t.$slots, "optionAnnotator", J(K({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
500
+ $(t.$slots, "optionAnnotator", K(Q({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
501
501
  ]),
502
502
  key: "7"
503
503
  } : void 0
@@ -585,7 +585,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
585
585
  }, null, 8, ["plot", "radius", "shape", "color", "stroke", "strokeWidth", "onMouseover", "style"]))), 256))
586
586
  ]))
587
587
  ]))), 256)),
588
- e.value.style.layout.marginalBars.show ? (o(), r("g", Zt, [
588
+ e.value.style.layout.marginalBars.show ? (o(), r("g", Jt, [
589
589
  d("defs", null, [
590
590
  d("linearGradient", {
591
591
  id: `marginal_x_${z.value}`,
@@ -597,12 +597,12 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
597
597
  d("stop", {
598
598
  offset: "0%",
599
599
  "stop-color": e.value.style.layout.marginalBars.fill
600
- }, null, 8, Kt),
600
+ }, null, 8, Qt),
601
601
  d("stop", {
602
602
  offset: "100%",
603
603
  "stop-color": e.value.style.backgroundColor
604
- }, null, 8, Qt)
605
- ], 8, Jt),
604
+ }, null, 8, Zt)
605
+ ], 8, Kt),
606
606
  d("linearGradient", {
607
607
  id: `marginal_y_${z.value}`,
608
608
  x1: "0%",
@@ -898,7 +898,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
898
898
  $(t.$slots, "svg", { svg: b.value }, void 0, !0)
899
899
  ], 14, Dt)) : c("", !0),
900
900
  t.$slots.watermark ? (o(), r("div", Ll, [
901
- $(t.$slots, "watermark", J(K({ isPrinting: n(Le) || n(Be) })), void 0, !0)
901
+ $(t.$slots, "watermark", K(Q({ isPrinting: n(Le) || n(Be) })), void 0, !0)
902
902
  ])) : c("", !0),
903
903
  ee.value ? c("", !0) : (o(), V(Bt, {
904
904
  key: 6,
@@ -925,7 +925,7 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
925
925
  e.value.style.legend.show ? (o(), V(Tt, {
926
926
  key: `legend_${Me.value}`,
927
927
  legendSet: R.value,
928
- config: Qe.value,
928
+ config: Ze.value,
929
929
  onClickMarker: u[0] || (u[0] = ({ legend: l }) => De(l.id))
930
930
  }, {
931
931
  item: _(({ legend: l }) => [
@@ -959,16 +959,16 @@ const Xt = ["id"], Dt = ["xmlns", "viewBox"], Yt = ["width", "height"], Vt = { k
959
959
  backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
960
960
  position: e.value.style.tooltip.position,
961
961
  offsetY: e.value.style.tooltip.offsetY,
962
- parent: Q.value,
962
+ parent: Z.value,
963
963
  content: re.value,
964
964
  isFullscreen: H.value,
965
965
  isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
966
966
  }, {
967
967
  "tooltip-before": _(() => [
968
- $(t.$slots, "tooltip-before", J(K({ ...ve.value })), void 0, !0)
968
+ $(t.$slots, "tooltip-before", K(Q({ ...ve.value })), void 0, !0)
969
969
  ]),
970
970
  "tooltip-after": _(() => [
971
- $(t.$slots, "tooltip-after", J(K({ ...ve.value })), void 0, !0)
971
+ $(t.$slots, "tooltip-after", K(Q({ ...ve.value })), void 0, !0)
972
972
  ]),
973
973
  default: _(() => [
974
974
  e.value.style.tooltip.showShape ? (o(), r("div", Ol, [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CuhZ_hul.cjs"),Be=require("./useResponsive-N8jl0-aC.cjs"),Pe=require("./Title-CcDml6Zf.cjs"),_e=require("./usePrinter-D3Sb5fSb.cjs"),Oe=require("./Tooltip-lj99sBKN.cjs"),De=require("./Legend-qp4VAykH.cjs"),Ce=require("./Shape-DroaKLIm.cjs"),Fe=require("./DataTable-DYeuLcih.cjs"),We=require("./vue-ui-skeleton-cQoXWosg.cjs"),qe=require("./vue-ui-accordion-Ds-8LBd7.cjs"),Ne=require("./useNestedProp-DVSKLFhF.cjs"),Ie=require("./PackageVersion-BzhafpGr.cjs"),Xe=require("./PenAndPaper-ZkRFCit4.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Ge=["xmlns","viewBox"],He=["width","height"],Je={key:1},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:2},et=["points","fill","stroke-width","stroke-dasharray","stroke"],tt={key:0},lt=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],at={key:1},ot={key:3},st=["id"],rt=["stop-color"],nt=["stop-color"],ut=["id"],it=["stop-color"],ct=["stop-color"],yt=["x","y","width","height","fill","stroke","stroke-width","rx"],vt=["x","y","height","width","fill","stroke","stroke-width","rx"],dt={key:0},pt=["d","stroke","stroke-width"],ht=["d","stroke","stroke-width"],ft=["d","stroke","stroke-width"],mt=["d","stroke","stroke-width"],gt={key:4,style:{"pointer-events":"none !important"}},kt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],bt=["x","y","font-size","fill","font-weight","text-anchor"],wt=["x","y","font-size","fill","font-weight"],Bt=["cx","cy","r","fill","stroke","stroke-width"],_t=["cx","cy","r","fill","stroke","stroke-width"],Ct=["x","y","font-size","fill","font-weight","text-anchor"],Nt={key:5},St=["x","y","font-size","fill"],Mt=["x","y","font-size","fill"],$t=["id","transform","font-size","font-weight","fill"],Et={key:6},zt=["x","y","font-size","fill"],Lt=["x","y","font-size","fill"],Vt=["font-size","font-weight","fill","x","y"],At=["id"],Tt=["x","y","width","height"],Pt={key:7},Ot=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Dt=["x","y","fill","font-size","font-weight"],Ft={key:5,class:"vue-data-ui-watermark"},Wt=["onClick"],qt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},It={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},Xt={key:0},Rt=["innerHTML"],Yt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Se,{expose:Me}){const{vue_ui_scatter:$e}=s.useConfig(),N=Se,P=e.computed(()=>!!N.dataset&&N.dataset.length),k=e.ref(s.createUid()),Ee=e.ref(null),I=e.ref(!1),X=e.ref(""),K=e.ref(0),T=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(null),le=e.ref(0),ae=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>ue(),set:l=>l}),{userOptionsVisible:R,setUserOptionsVisibility:se,keepUserOptionState:re}=Re.useUserOptionState({config:t.value}),{svgRef:ne}=Ye.useChartAccessibility({config:t.value.style.title});function ue(){const l=Ne.useNestedProp({userConfig:N.config,defaultConfig:$e});return l.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_scatter[l.theme]||N.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>N.config,l=>{t.value=ue(),R.value=!t.value.userOptions.showOnChartHover,ie(),le.value+=1,ae.value+=1,oe.value+=1,B.value.showTable=t.value.table.show,B.value.showTooltip=t.value.style.tooltip.show},{deep:!0});const O=e.ref(null);e.onMounted(()=>{ie()});function ie(){if(s.objectIsEmpty(N.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const l=Be.throttle(()=>{const{width:n,height:a}=Be.useResponsive({chart:T.value,title:t.value.style.title.text?Q.value:null,legend:t.value.style.legend.show?Z.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{h.value.width=n,h.value.height=a})});O.value=new ResizeObserver(l),O.value.observe(T.value.parentNode)}}e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});const{isPrinting:ce,isImaging:ye,generatePdf:ve,generateImage:de}=_e.usePrinter({elementId:`vue-ui-scatter_${k.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),ze=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),pe=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),h=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),D=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),u=e.computed(()=>({top:t.value.style.layout.padding.top+D.value,right:h.value.width-t.value.style.layout.padding.right-D.value,bottom:h.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-D.value,width:h.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-D.value})),y=e.computed(()=>{N.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(f=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:f,index:i})}),o.values&&o.values.forEach((f,E)=>{s.getMissingDatasetAttributes({datasetObject:f,requiredAttributes:["x","y"]}).forEach(A=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${A}`,index:`${i} - ${E}`})})})});const l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),n=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:l>=0?0:l,xMax:n,yMin:a>=0?0:a,yMax:r}}),v=e.computed(()=>({x:u.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height})),$=e.computed(()=>N.dataset.map((l,n)=>{const a=`cluster_${k.value}_${n}`;return{...l,values:s.largestTriangleThreeBuckets({data:l.values,threshold:t.value.downsample.threshold}),id:a,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],opacity:p.value.includes(a)?.5:1,shape:l.shape??"circle",segregate:()=>ke(a),isSegregated:p.value.includes(a)}})),Le=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),Y=e.computed(()=>$.value.map((l,n)=>({...l,plots:l.values.map(a=>({x:u.value.left+(a.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-(a.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height,v:{...a,name:a.name||""},clusterName:l.name,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],id:`plot_${k.value}_${Math.random()}`,weight:a.weight??t.value.style.layout.plots.radius}))})).filter(l=>!p.value.includes(l.id))),x=e.computed(()=>Y.value.map(l=>{const n=l.plots.reduce((d,z)=>d+z.x,0)/l.plots.length,a=l.plots.reduce((d,z)=>d+z.y,0)/l.plots.length;let r=0,o=0,i=0;for(const d of l.plots)r+=(d.x-n)*(d.y-a),o+=(d.x-n)**2,i+=(d.y-a)**2;const f=r/Math.sqrt(o*i),E=f*(Math.sqrt(i)/Math.sqrt(o)),A=a-E*n,C={x1:u.value.left,x2:u.value.right,y1:E*u.value.left+A,y2:E*u.value.right+A,coefficient:f},g=(C.y2-C.y1)/(C.x2-C.x1),w=C.y1-g*C.x1,S=Math.min(h.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(u.value.top-w)/g)),q={x:S,y:g*S+w<=t.value.style.layout.padding.top?u.value.top:g*S+w};return{...l,correlation:C,label:q,plots:l.plots.map(d=>{const z=(d.x+g*d.y-g*w)/(1+Math.pow(g,2)),G=(g*d.x+Math.pow(g,2)*d.y+w)/(1+Math.pow(g,2)),m=Math.sqrt(Math.pow(d.x-z,2)+Math.pow(d.y-G,2));return{...d,deviation:m,shape:l.shape,color:l.color}})}})),he=e.computed(()=>Math.max(...x.value.flatMap(l=>l.plots.map(n=>Math.abs(n.deviation)))));function Ve(){return x.value}function fe(l,n){const a=Array.isArray(l)?l.flatMap(m=>m.plots.map(L=>({x:L.x,y:L.y}))):l.plots.map(m=>({x:m.x,y:m.y}));let r=1/0,o=-1/0,i=1/0,f=-1/0;a.forEach(({x:m,y:L})=>{r=Math.min(r,m),o=Math.max(o,m),i=Math.min(i,L),f=Math.max(f,L)});const E=o-r,A=f-i,C=E/n,g=A/n,w=Array(n).fill(0),S=Array(n).fill(0);a.forEach(({x:m,y:L})=>{const H=Math.floor((m-r)/C),J=Math.floor((L-i)/g);w[H]||(w[H]=0),S[J]||(S[J]=0),w[H]+=1,S[J]+=1});const q=[],d=[];for(let m=0;m<n;m+=1)q.push(r+(m+.5)*C),d.push(i+(m+.5)*g);const z=Math.max(...w),G=Math.max(...S);return{x:w,y:S,avgX:q,avgY:d,maxX:z,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>fe(Y.value,M.value)),Ae=e.computed(()=>{const l=u.value.top-t.value.style.layout.marginalBars.offset,n=u.value.right+t.value.style.layout.marginalBars.offset;return Y.value.map(a=>{const r=fe(a,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:l-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:n+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:a.color,id:a.id}})}),_=e.ref(void 0),c=e.ref(null),j=e.ref(null);function me(l,n){_.value=l.id,c.value=l;let a="";j.value={datapoint:l,seriesIndex:n,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}))?X.value=r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}):(l.clusterName&&(a+=`<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`),l.v.name&&(a+=`<div>${l.v.name}</div>`),a+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,l.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,l.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:l.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,a+="</div>",X.value=`<div>${a}</div>`),I.value=!0}function ge(){I.value=!1,_.value=void 0,c.value=null}const p=e.ref([]);function ke(l){p.value.includes(l)?p.value=p.value.filter(n=>n!==l):p.value.length<N.dataset.length-1&&p.value.push(l)}function xe(){e.nextTick(()=>{const l=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,f)=>i+f,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,f)=>i+f,0)/o.plots.length]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const F=e.computed(()=>{const l=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:n,config:a,colNames:l}}),V=e.ref(!1);function Te(l){V.value=l,K.value+=1}function be(){B.value.showTable=!B.value.showTable}function we(){B.value.showTooltip=!B.value.showTooltip}const W=e.ref(!1);function U(){W.value=!W.value}return Me({getData:Ve,generatePdf:ve,generateCsv:xe,generateImage:de,toggleTable:be,toggleTooltip:we,toggleAnnotator:U}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:T,id:`vue-ui-scatter_${k.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(se)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(se)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,svgRef:e.unref(ne),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ze.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${le.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(re)||e.unref(R))?(e.openBlock(),e.createBlock(_e.UserOptions,{ref_key:"details",ref:Ee,key:`user_options_${K.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ye),isPrinting:e.unref(ce),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:B.value.showTooltip,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(ve),onGenerateCsv:xe,onGenerateImage:e.unref(de),onToggleTable:be,onToggleTooltip:we,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ne,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${h.value.width<=0?10:h.value.width} ${h.value.height<=0?10:h.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:h.value.width<=0?10:h.value.width,height:h.value.height<=0?10:h.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,He)):e.createCommentVNode("",!0),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:a.plots}),fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:a.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[!a.shape||a.shape==="circle"?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:_.value&&_.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createBlock(Ce._sfc_main,{plot:{x:o.x,y:o.y},radius:_.value&&_.value===o.id?o.weight*2:o.weight,shape:a.shape,color:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${k.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,rt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,nt)],8,st),e.createElementVNode("linearGradient",{id:`marginal_y_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,it),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ct)],8,ut)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-u.value.width/M.value/2,y:u.value.top-t.value.style.layout.marginalBars.offset-a/b.value.maxX*t.value.style.layout.marginalBars.size,width:u.value.width/M.value<=0?1e-4:u.value.width/M.value,height:a/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,yt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:u.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-u.value.height/M.value/2,height:u.value.height/M.value<=0?1e-4:u.value.height/M.value,width:a/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,vt)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,pt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.dX}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ht)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ft)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${a.dY}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,mt))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",gt,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,kt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,xt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,bt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,wt),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,Bt),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,_t),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<u.value.left+100?"start":c.value.x>u.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,Ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("text",{x:u.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,St),e.createElementVNode("text",{x:u.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Mt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${k.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${u.value.top+u.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,$t)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Et,[e.createElementVNode("text",{x:v.value.x,y:u.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,zt),e.createElementVNode("text",{x:v.value.x,y:u.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Lt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:u.value.left+u.value.width/2,y:u.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Vt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${k.value}`},[e.createElementVNode("rect",{x:u.value.left,y:u.value.top,width:u.value.width<=0?1e-4:u.value.width,height:u.value.height<=0?1e-4:u.value.height},null,8,Tt)],8,At),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.correlation.x1,x2:a.correlation.x2,y1:a.correlation.y1,y2:a.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:a.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${k.value})`},null,8,Ot))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.label.x,y:a.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?a.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ce)||e.unref(ye)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[t.value.style.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:$.value,config:Le.value,onClickMarker:n[0]||(n[0]=({legend:a})=>ke(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Wt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Oe._sfc_main,{show:B.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:T.value,content:X.value,isFullscreen:V.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",qt,[(e.openBlock(),e.createElementBlock("svg",It,[e.createVNode(Ce._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),P.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${ae.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>B.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[a.shape?(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("span",null,e.toDisplayString(a.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a},null,8,Rt))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},jt=je._export_sfc(Yt,[["__scopeId","data-v-fef2b0c8"]]);exports.default=jt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CVZp-EFm.cjs"),Be=require("./useResponsive-N8jl0-aC.cjs"),Pe=require("./Title-CnyZaLp0.cjs"),_e=require("./usePrinter-BJ8ChcXf.cjs"),Oe=require("./Tooltip-V6vr6k8X.cjs"),De=require("./Legend-DgyuPw1G.cjs"),Ce=require("./Shape-my_oX1r-.cjs"),Fe=require("./DataTable-CX-Mdafj.cjs"),We=require("./vue-ui-skeleton-Dn9J8aVW.cjs"),qe=require("./vue-ui-accordion-BS_katXk.cjs"),Ne=require("./useNestedProp-Ch_Tbu0f.cjs"),Ie=require("./PackageVersion-CvpIoiav.cjs"),Xe=require("./PenAndPaper-5L5c2K-j.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Ge=["xmlns","viewBox"],He=["width","height"],Je={key:1},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:2},et=["points","fill","stroke-width","stroke-dasharray","stroke"],tt={key:0},lt=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],at={key:1},ot={key:3},st=["id"],rt=["stop-color"],nt=["stop-color"],ut=["id"],it=["stop-color"],ct=["stop-color"],yt=["x","y","width","height","fill","stroke","stroke-width","rx"],vt=["x","y","height","width","fill","stroke","stroke-width","rx"],dt={key:0},pt=["d","stroke","stroke-width"],ht=["d","stroke","stroke-width"],ft=["d","stroke","stroke-width"],mt=["d","stroke","stroke-width"],gt={key:4,style:{"pointer-events":"none !important"}},kt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],xt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],bt=["x","y","font-size","fill","font-weight","text-anchor"],wt=["x","y","font-size","fill","font-weight"],Bt=["cx","cy","r","fill","stroke","stroke-width"],_t=["cx","cy","r","fill","stroke","stroke-width"],Ct=["x","y","font-size","fill","font-weight","text-anchor"],Nt={key:5},St=["x","y","font-size","fill"],Mt=["x","y","font-size","fill"],$t=["id","transform","font-size","font-weight","fill"],Et={key:6},zt=["x","y","font-size","fill"],Lt=["x","y","font-size","fill"],Vt=["font-size","font-weight","fill","x","y"],At=["id"],Tt=["x","y","width","height"],Pt={key:7},Ot=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Dt=["x","y","fill","font-size","font-weight"],Ft={key:5,class:"vue-data-ui-watermark"},Wt=["onClick"],qt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},It={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},Xt={key:0},Rt=["innerHTML"],Yt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(Se,{expose:Me}){const{vue_ui_scatter:$e}=s.useConfig(),N=Se,P=e.computed(()=>!!N.dataset&&N.dataset.length),k=e.ref(s.createUid()),Ee=e.ref(null),I=e.ref(!1),X=e.ref(""),K=e.ref(0),T=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(null),le=e.ref(0),ae=e.ref(0),oe=e.ref(0),t=e.computed({get:()=>ue(),set:l=>l}),{userOptionsVisible:R,setUserOptionsVisibility:se,keepUserOptionState:re}=Re.useUserOptionState({config:t.value}),{svgRef:ne}=Ye.useChartAccessibility({config:t.value.style.title});function ue(){const l=Ne.useNestedProp({userConfig:N.config,defaultConfig:$e});return l.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_scatter[l.theme]||N.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>N.config,l=>{t.value=ue(),R.value=!t.value.userOptions.showOnChartHover,ie(),le.value+=1,ae.value+=1,oe.value+=1,B.value.showTable=t.value.table.show,B.value.showTooltip=t.value.style.tooltip.show},{deep:!0});const O=e.ref(null);e.onMounted(()=>{ie()});function ie(){if(s.objectIsEmpty(N.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const l=Be.throttle(()=>{const{width:n,height:a}=Be.useResponsive({chart:T.value,title:t.value.style.title.text?Q.value:null,legend:t.value.style.legend.show?Z.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{h.value.width=n,h.value.height=a})});O.value=new ResizeObserver(l),O.value.observe(T.value.parentNode)}}e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});const{isPrinting:ce,isImaging:ye,generatePdf:ve,generateImage:de}=_e.usePrinter({elementId:`vue-ui-scatter_${k.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),ze=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),pe=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),h=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),D=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),u=e.computed(()=>({top:t.value.style.layout.padding.top+D.value,right:h.value.width-t.value.style.layout.padding.right-D.value,bottom:h.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:h.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-D.value,width:h.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-D.value})),y=e.computed(()=>{N.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(f=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:f,index:i})}),o.values&&o.values.forEach((f,E)=>{s.getMissingDatasetAttributes({datasetObject:f,requiredAttributes:["x","y"]}).forEach(A=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${A}`,index:`${i} - ${E}`})})})});const l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),n=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:l>=0?0:l,xMax:n,yMin:a>=0?0:a,yMax:r}}),v=e.computed(()=>({x:u.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height})),$=e.computed(()=>N.dataset.map((l,n)=>{const a=`cluster_${k.value}_${n}`;return{...l,values:s.largestTriangleThreeBuckets({data:l.values,threshold:t.value.downsample.threshold}),id:a,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],opacity:p.value.includes(a)?.5:1,shape:l.shape??"circle",segregate:()=>ke(a),isSegregated:p.value.includes(a)}})),Le=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),Y=e.computed(()=>$.value.map((l,n)=>({...l,plots:l.values.map(a=>({x:u.value.left+(a.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*u.value.width,y:u.value.bottom-(a.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*u.value.height,v:{...a,name:a.name||""},clusterName:l.name,color:l.color?l.color:pe.value[n]||s.palette[n]||s.palette[n%s.palette.length],id:`plot_${k.value}_${Math.random()}`,weight:a.weight??t.value.style.layout.plots.radius}))})).filter(l=>!p.value.includes(l.id))),x=e.computed(()=>Y.value.map(l=>{const n=l.plots.reduce((d,z)=>d+z.x,0)/l.plots.length,a=l.plots.reduce((d,z)=>d+z.y,0)/l.plots.length;let r=0,o=0,i=0;for(const d of l.plots)r+=(d.x-n)*(d.y-a),o+=(d.x-n)**2,i+=(d.y-a)**2;const f=r/Math.sqrt(o*i),E=f*(Math.sqrt(i)/Math.sqrt(o)),A=a-E*n,C={x1:u.value.left,x2:u.value.right,y1:E*u.value.left+A,y2:E*u.value.right+A,coefficient:f},g=(C.y2-C.y1)/(C.x2-C.x1),w=C.y1-g*C.x1,S=Math.min(h.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(u.value.top-w)/g)),q={x:S,y:g*S+w<=t.value.style.layout.padding.top?u.value.top:g*S+w};return{...l,correlation:C,label:q,plots:l.plots.map(d=>{const z=(d.x+g*d.y-g*w)/(1+Math.pow(g,2)),G=(g*d.x+Math.pow(g,2)*d.y+w)/(1+Math.pow(g,2)),m=Math.sqrt(Math.pow(d.x-z,2)+Math.pow(d.y-G,2));return{...d,deviation:m,shape:l.shape,color:l.color}})}})),he=e.computed(()=>Math.max(...x.value.flatMap(l=>l.plots.map(n=>Math.abs(n.deviation)))));function Ve(){return x.value}function fe(l,n){const a=Array.isArray(l)?l.flatMap(m=>m.plots.map(L=>({x:L.x,y:L.y}))):l.plots.map(m=>({x:m.x,y:m.y}));let r=1/0,o=-1/0,i=1/0,f=-1/0;a.forEach(({x:m,y:L})=>{r=Math.min(r,m),o=Math.max(o,m),i=Math.min(i,L),f=Math.max(f,L)});const E=o-r,A=f-i,C=E/n,g=A/n,w=Array(n).fill(0),S=Array(n).fill(0);a.forEach(({x:m,y:L})=>{const H=Math.floor((m-r)/C),J=Math.floor((L-i)/g);w[H]||(w[H]=0),S[J]||(S[J]=0),w[H]+=1,S[J]+=1});const q=[],d=[];for(let m=0;m<n;m+=1)q.push(r+(m+.5)*C),d.push(i+(m+.5)*g);const z=Math.max(...w),G=Math.max(...S);return{x:w,y:S,avgX:q,avgY:d,maxX:z,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>fe(Y.value,M.value)),Ae=e.computed(()=>{const l=u.value.top-t.value.style.layout.marginalBars.offset,n=u.value.right+t.value.style.layout.marginalBars.offset;return Y.value.map(a=>{const r=fe(a,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:l-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:n+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:a.color,id:a.id}})}),_=e.ref(void 0),c=e.ref(null),j=e.ref(null);function me(l,n){_.value=l.id,c.value=l;let a="";j.value={datapoint:l,seriesIndex:n,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}))?X.value=r({datapoint:l,seriesIndex:n,series:x.value,config:t.value}):(l.clusterName&&(a+=`<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`),l.v.name&&(a+=`<div>${l.v.name}</div>`),a+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,l.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,l.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:l.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:n})}</b></div>`,a+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:l.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,a+="</div>",X.value=`<div>${a}</div>`),I.value=!0}function ge(){I.value=!1,_.value=void 0,c.value=null}const p=e.ref([]);function ke(l){p.value.includes(l)?p.value=p.value.filter(n=>n!==l):p.value.length<N.dataset.length-1&&p.value.push(l)}function xe(){e.nextTick(()=>{const l=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,f)=>i+f,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,f)=>i+f,0)/o.plots.length]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const F=e.computed(()=>{const l=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:n,config:a,colNames:l}}),V=e.ref(!1);function Te(l){V.value=l,K.value+=1}function be(){B.value.showTable=!B.value.showTable}function we(){B.value.showTooltip=!B.value.showTooltip}const W=e.ref(!1);function U(){W.value=!W.value}return Me({getData:Ve,generatePdf:ve,generateCsv:xe,generateImage:de,toggleTable:be,toggleTooltip:we,toggleAnnotator:U}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:T,id:`vue-ui-scatter_${k.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[2]||(n[2]=()=>e.unref(se)(!0)),onMouseleave:n[3]||(n[3]=()=>e.unref(se)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Xe.PenAndPaper,{key:0,svgRef:e.unref(ne),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:U},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ze.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${le.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(re)||e.unref(R))?(e.openBlock(),e.createBlock(_e.UserOptions,{ref_key:"details",ref:Ee,key:`user_options_${K.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ye),isPrinting:e.unref(ce),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:B.value.showTooltip,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(ve),onGenerateCsv:xe,onGenerateImage:e.unref(de),onToggleTable:be,onToggleTooltip:we,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ne,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${h.value.width<=0?10:h.value.width} ${h.value.height<=0?10:h.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:h.value.width<=0?10:h.value.width,height:h.value.height<=0?10:h.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,He)):e.createCommentVNode("",!0),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:a.plots}),fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:a.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[!a.shape||a.shape==="circle"?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:_.value&&_.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,lt))),256))])):(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(o,i)=>(e.openBlock(),e.createBlock(Ce._sfc_main,{plot:{x:o.x,y:o.y},radius:_.value&&_.value===o.id?o.weight*2:o.weight,shape:a.shape,color:e.unref(s.setOpacity)(a.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:f=>me(o,r),onMouseleave:ge,style:e.normalizeStyle(`opacity:${_.value&&_.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/he.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${k.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,rt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,nt)],8,st),e.createElementVNode("linearGradient",{id:`marginal_y_${k.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,it),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,ct)],8,ut)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-u.value.width/M.value/2,y:u.value.top-t.value.style.layout.marginalBars.offset-a/b.value.maxX*t.value.style.layout.marginalBars.size,width:u.value.width/M.value<=0?1e-4:u.value.width/M.value,height:a/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,yt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[a&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:u.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-u.value.height/M.value/2,height:u.value.height/M.value<=0?1e-4:u.value.height/M.value,width:a/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:a/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${k.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,vt)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ae.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,pt)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${a.dX}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ht)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${a.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ft)),p.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${a.dY}`,stroke:a.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,mt))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",gt,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,kt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,xt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,bt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,wt),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,Bt),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,_t),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<u.value.left+100?"start":c.value.x>u.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,Ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("text",{x:u.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,St),e.createElementVNode("text",{x:u.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,Mt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${k.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${u.value.top+u.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,$t)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Et,[e.createElementVNode("text",{x:v.value.x,y:u.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,zt),e.createElementVNode("text",{x:v.value.x,y:u.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Lt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:u.value.left+u.value.width/2,y:u.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Vt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${k.value}`},[e.createElementVNode("rect",{x:u.value.left,y:u.value.top,width:u.value.width<=0?1e-4:u.value.width,height:u.value.height<=0?1e-4:u.value.height},null,8,Tt)],8,At),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.correlation.x1,x2:a.correlation.x2,y1:a.correlation.y1,y2:a.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:a.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${k.value})`},null,8,Ot))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:a.label.x,y:a.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?a.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(a.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:h.value},void 0,!0)],14,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ce)||e.unref(ye)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[t.value.style.legend.show?(e.openBlock(),e.createBlock(De.Legend,{key:`legend_${oe.value}`,legendSet:$.value,config:Le.value,onClickMarker:n[0]||(n[0]=({legend:a})=>ke(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Wt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Oe._sfc_main,{show:B.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:T.value,content:X.value,isFullscreen:V.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",qt,[(e.openBlock(),e.createElementBlock("svg",It,[e.createVNode(Ce._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),P.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${ae.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=a=>B.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[a.shape?(e.openBlock(),e.createElementBlock("div",Xt,[e.createElementVNode("span",null,e.toDisplayString(a.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a},null,8,Rt))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},jt=je._export_sfc(Yt,[["__scopeId","data-v-fef2b0c8"]]);exports.default=jt;
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-CuhZ_hul.cjs"),U=require("./html2canvas.esm-D53btDlk.cjs"),q={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const{vue_ui_screenshot:C}=k.useConfig(),B=z,$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(B.config||{}).length)return C;const e=k.treeShake({defaultConfig:C,userConfig:B.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),m=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,m.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,m.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))}function f(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}const O=H;function _(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),k=require("./index-CVZp-EFm.cjs"),U=require("./html2canvas.esm-D53btDlk.cjs"),q={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(z,{expose:T,emit:H}){const{vue_ui_screenshot:C}=k.useConfig(),B=z,$=i.ref(`vue-ui-screenshot-${Math.random()}`),n=i.computed(()=>{if(!Object.keys(B.config||{}).length)return C;const e=k.treeShake({defaultConfig:C,userConfig:B.config});return k.convertConfigColors(e)}),a=i.ref(null),d=i.ref(null),v=i.ref(null),M=i.ref(null),S=i.ref(null),y=i.ref(null),h=i.ref(null),p=i.ref(null),m=i.ref(null),b=i.ref(null),x=i.ref(null),w=i.ref(!1),I=i.ref(null);function R(){const e=document.createElement("DIV"),{innerWidth:t,innerHeight:l}=window;return e.style.position="fixed",e.style.top=`${l?l/2-n.value.style.captureArea.initialHeight/2:200}px`,e.style.left=`${t?t/2-n.value.style.captureArea.initialWidth/2:100}px`,e.style.width=`${n.value.style.captureArea.initialWidth}px`,e.style.height=`${n.value.style.captureArea.initialHeight}px`,e.style.background=n.value.style.captureArea.background,e.style.cursor="move",e.style.boxSizing="border-box",e.style.border=n.value.style.captureArea.border,e.style.resize="both",e.style.padding="none !important",e.style.margin="none !important",e.dataset.cy="screenshot-overlay",e}function E(){a.value&&(clearTimeout(I.value),a.value.remove(),a.value=null)}function W(e){const t=document.createElement("DIV");t.classList.add("vue-ui-screenshot-info-text"),t.innerHTML=n.value.translations.info,t.dataset.html2canvasIgnore="true",t.dataset.cy="screenshot-info-text",t.style.background=n.value.style.info.background,t.style.color=n.value.style.info.color,t.style.fontWeight=n.value.style.info.bold?"bold":"normal",t.style.minWidth=`${n.value.style.info.minWidth}px`,t.style.left="50%",t.style.padding=`${n.value.style.info.padding}px`,t.style.position="absolute",t.style.textAlign="center",t.style.top=`${n.value.style.info.top}px`,t.style.transform="translateX(-50%)",t.style.borderRadius=`${n.value.style.info.borderRadius}px`,t.style.boxShadow=n.value.style.info.boxShadow,t.style.fontFamily=n.value.style.info.fontFamily,t.style.fontSize=`${n.value.style.info.fontSize}px`,t.style.border=n.value.style.info.border,t.style.userSelect="none";const l=document.createElement("BUTTON");l.classList.add("vue-ui-screenshot-close-button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',l.style.outline="none",l.dataset.cy="screenshot-close-button",l.style.display="flex",l.style.cursor="pointer",l.style.borderRadius="50%",l.style.alignItems="center",l.style.position="absolute",l.style.justifyContent="center",l.style.transformOrigin="center",l.style.top=`${n.value.style.cancelButton.top}px`,l.style.right=`${n.value.style.cancelButton.right}px`,l.style.background=n.value.style.cancelButton.background,l.style.color=n.value.style.cancelButton.color,l.style.border=n.value.style.cancelButton.border,l.style.borderRadius=`${n.value.style.cancelButton.borderRadius}px`,l.style.height=`${n.value.style.cancelButton.size}px`,l.style.width=`${n.value.style.cancelButton.size}px`,l.addEventListener("click",E),t.appendChild(l),e.appendChild(t)}function X(e){a.value&&(w.value=!0,e.touches?(y.value=e.touches[0].clientX,h.value=e.touches[0].clientY):(y.value=e.clientX,h.value=e.clientY),b.value=a.value.getBoundingClientRect().width,x.value=a.value.getBoundingClientRect().height,e.target.addEventListener("mousemove",L),e.target.addEventListener("touchmove",L))}function L(e){if(!a.value)return;let t,l;e.touches?(p.value=e.touches[0].clientX,t=e.touches[0].clientX,m.value=e.touches[0].clientY,l=e.touches[0].clientY):(p.value=e.clientX,t=e.clientX,m.value=e.clientY,l=e.clientY);const u=e.target.classList[0],o=a.value.style;switch(!0){case u==="vue-ui-screenshot-handle-nw":o.top=`${l}px`,o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-ne":o.top=`${l}px`,o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(h.value-m.value)}px`;break;case u==="vue-ui-screenshot-handle-sw":o.left=`${t}px`,o.width=`${b.value+(y.value-p.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break;case u==="vue-ui-screenshot-handle-se":o.width=`${b.value+(p.value-y.value)}px`,o.height=`${x.value+(m.value-h.value)}px`;break}}function A(e){if(!a.value)return;e.stopPropagation();const t=Array.from(e.target.classList);t.includes("vue-ui-screenshot-handle-se")||t.includes("vue-ui-screenshot-handle-sw")||t.includes("vue-ui-screenshot-handle-nw")||t.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,a.value.style.pointerEvents="auto",e.touches?(d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(d.value=e.clientX,v.value=e.clientY),M.value=d.value,S.value=v.value,document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))}function f(){d.value=null,v.value=null,M.value=null,S.value=null,w.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",f)}function g(e){if(!a.value)return;const t=a.value.getBoundingClientRect();let l,u;e.touches?(l=e.touches[0].clientX-d.value,u=e.touches[0].clientY-v.value,d.value=e.touches[0].clientX,v.value=e.touches[0].clientY):(l=e.clientX-d.value,u=e.clientY-v.value,d.value=e.clientX,v.value=e.clientY),a.value.style.top=`${t.top+u}px`,a.value.style.left=`${t.left+l}px`}function Y(e){e.target.removeEventListener("mousemove",L),e.target.removeEventListener("touchmove",L),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),w.value=!1}function D(){const e=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}const O=H;function _(){const e=document.getElementById(`vue-ui-screenshot-button-${$.value}`);e.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
2
2
  <path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
3
3
  </svg>`,document.getElementById(`vue-ui-screenshot-button-${$.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),e.classList.add("loading"),e.setAttribute("disabled","true")}function F(){if(!a.value)return;_();const e=a.value.getBoundingClientRect();I.value=setTimeout(()=>{U.default(document.body,{allowTaint:!0,width:e.width,height:e.height,x:e.left+window.scrollX,y:e.top+window.scrollY,useCORS:!0,scale:n.value.quality}).then(t=>{const l=t.toDataURL("image/png",1),u=l.split(",")[1],c=atob(u).length/1024;if(n.value.mode==="download"){const s=document.createElement("a");s.download="screenshot.png",s.href=l,s.click()}n.value.mode==="post"&&O("postImage",{createdAt:Date.now(),fileSize:`${c.toFixed(2)} KB`,image:l,x:e.left+window.scrollX,y:e.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:D()})}).finally(E)},10)}function j(e){const t=n.value.style.handles.size/2+4,l=document.createElement("DIV");l.style.top=`${-t}px`,l.style.left=`${-t}px`,l.style.cursor="nw-resize",l.classList.add("vue-ui-screenshot-handle-nw"),l.dataset.cy="screenshot-handle-nw";const u=document.createElement("DIV");u.style.top=`${-t}px`,u.style.left="auto",u.style.right=`${-t}px`,u.style.cursor="ne-resize",u.classList.add("vue-ui-screenshot-handle-ne"),u.dataset.cy="screenshot-handle-ne";const o=document.createElement("DIV");o.style.top="auto",o.style.bottom=`${-t}px`,o.style.left=`${-t}px`,o.style.cursor="sw-resize",o.classList.add("vue-ui-screenshot-handle-sw"),o.dataset.cy="screenshot-handle-sw";const c=document.createElement("DIV");c.style.top="auto",c.style.left="auto",c.style.right=`${-t}px`,c.style.bottom=`${-t}px`,c.style.cursor="se-resize",c.classList.add("vue-ui-screenshot-handle-se"),c.dataset.cy="screenshot-handle-se";const s=document.createElement("BUTTON");s.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${n.value.translations.captureButton}</span>`,s.classList.add("vue-ui-screenshot-capture-button"),s.id=`vue-ui-screenshot-button-${$.value}`,s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.transform="translate(-50%,-50%)",s.style.background=n.value.style.captureButton.background,s.style.color=n.value.style.captureButton.color,s.style.border=n.value.style.captureButton.border,s.style.outline="none",s.style.cursor="pointer",s.style.padding=n.value.style.captureButton.padding,s.style.fontFamily=n.value.style.captureButton.fontFamily,s.style.fontSize=`${n.value.style.captureButton.fontSize}px`,s.style.minHeight=`${n.value.style.captureButton.minHeight}px`,s.style.width="fit-content",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="center",s.style.gap="3px",s.style.borderRadius=`${n.value.style.captureButton.borderRadius}px`,s.style.boxShadow=n.value.style.captureButton.boxShadow,s.style.userSelect="none",s.style.opacity="0.95",s.style.textAlign="left",s.style.fontWeight=n.value.style.captureButton.bold?"bold":"normal",s.dataset.cy="screenshot-save-button",s.addEventListener("mouseenter",()=>{s.style.opacity="1"}),s.addEventListener("mouseleave",()=>{s.style.opacity="0.95"}),s.addEventListener("click",F),e.appendChild(s),[l,u,o,c].forEach((r,V)=>{r.classList.add(`handle-${V}`),r.dataset.html2canvasIgnore="true",r.style.position="absolute",r.style.height=`${n.value.style.handles.size}px`,r.style.width=`${n.value.style.handles.size}px`,r.style.background=n.value.style.handles.background,r.style.border=n.value.style.handles.border,r.style.borderRadius=`${n.value.style.handles.borderRadius}px`,r.style.pointerEvents="auto !important",r.addEventListener("mousedown",X),r.addEventListener("touchstart",X),e.appendChild(r)})}function N(){a.value||i.nextTick(()=>{const e=R();e.dataset.html2canvasIgnore=!0,W(e),j(e),a.value=e,e.addEventListener("touchmove",function(t){t.preventDefault()},{passive:!1}),document.body.appendChild(e),document.addEventListener("mousedown",A),document.addEventListener("touchstart",A),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y)})}return T({shoot:N,close:E}),(e,t)=>(i.openBlock(),i.createElementBlock("div"))}};exports.default=q;
@@ -1,5 +1,5 @@
1
1
  import { ref as i, computed as V, createElementBlock as U, openBlock as G, nextTick as K } from "vue";
2
- import { u as P, A as q, z as J } from "./index-CVHop7bB.js";
2
+ import { u as P, A as q, z as J } from "./index-BAPUY6BW.js";
3
3
  import Q from "./html2canvas.esm-Dr4iCOK6.js";
4
4
  const ne = {
5
5
  __name: "vue-ui-screenshot",