vue-data-ui 3.23.13 → 3.24.0

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 (184) hide show
  1. package/README.md +14 -13
  2. package/dist/{Arrow-DrF4NNJO.js → Arrow-CJuuMivt.js} +1 -1
  3. package/dist/{BaseDraggableDialog-Dr_Q6Yt5.js → BaseDraggableDialog-9RMU4zIz.js} +2 -2
  4. package/dist/{BaseIcon-BbElSC8_.js → BaseIcon-U0y1Y7dC.js} +1 -1
  5. package/dist/{BaseLegendToggle-CtEdLr4R.js → BaseLegendToggle-B_wibe7d.js} +1 -1
  6. package/dist/{BaseZoomControls-Cvq4UmNG.js → BaseZoomControls-DXDTBATh.js} +2 -2
  7. package/dist/{ColorPicker-ChOgAmCi.js → ColorPicker-Diee0Pe9.js} +2 -2
  8. package/dist/{DataTable-CmyEubtT.js → DataTable-1Lsn9w61.js} +2 -2
  9. package/dist/{HillActions-3HneGJhS.js → HillActions-DntqVj-0.js} +1 -1
  10. package/dist/{Legend-BJtY2RA9.js → Legend-Cg1jtWxv.js} +2 -2
  11. package/dist/{NonSvgPenAndPaper-DmxzHJtV.js → NonSvgPenAndPaper-aCu8CNkj.js} +4 -4
  12. package/dist/{PackageVersion-DH9mKo1i.js → PackageVersion-CrLLZ567.js} +1 -1
  13. package/dist/{PenAndPaper-CIa1F5Jq.js → PenAndPaper-ktbpEc-t.js} +4 -4
  14. package/dist/{Shape-BAL5bQmA.js → Shape-BV_BCG2F.js} +1 -1
  15. package/dist/{SlicerPreview-lCGvUNUH.js → SlicerPreview-CsFT236o.js} +8 -8
  16. package/dist/{SparkTooltip-Bou05CV_.js → SparkTooltip-BqzJa3h2.js} +1 -1
  17. package/dist/{Title-CaVA8EIw.js → Title-C5ytqOnj.js} +1 -1
  18. package/dist/{Tooltip-CVxJe3UW.js → Tooltip-CTgk02J6.js} +1 -1
  19. package/dist/{UserOptions-WH7-49V0.js → UserOptions-DJt-e5q0.js} +2 -2
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-label.js +2 -0
  52. package/dist/components/vue-ui-mini-loader.js +1 -1
  53. package/dist/components/vue-ui-molecule.js +1 -1
  54. package/dist/components/vue-ui-mood-radar.js +1 -1
  55. package/dist/components/vue-ui-nested-donuts.js +1 -1
  56. package/dist/components/vue-ui-onion.js +1 -1
  57. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  58. package/dist/components/vue-ui-quadrant.js +1 -1
  59. package/dist/components/vue-ui-quick-chart.js +1 -1
  60. package/dist/components/vue-ui-radar.js +1 -1
  61. package/dist/components/vue-ui-rating.js +1 -1
  62. package/dist/components/vue-ui-relation-circle.js +1 -1
  63. package/dist/components/vue-ui-ridgeline.js +1 -1
  64. package/dist/components/vue-ui-rings.js +1 -1
  65. package/dist/components/vue-ui-scatter.js +1 -1
  66. package/dist/components/vue-ui-skeleton.js +1 -1
  67. package/dist/components/vue-ui-smiley.js +1 -1
  68. package/dist/components/vue-ui-spark-trend.js +1 -1
  69. package/dist/components/vue-ui-sparkbar.js +1 -1
  70. package/dist/components/vue-ui-sparkgauge.js +1 -1
  71. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  72. package/dist/components/vue-ui-sparkline.js +1 -1
  73. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  74. package/dist/components/vue-ui-stackbar.js +1 -1
  75. package/dist/components/vue-ui-stackline.js +1 -1
  76. package/dist/components/vue-ui-strip-plot.js +1 -1
  77. package/dist/components/vue-ui-table-heatmap.js +1 -1
  78. package/dist/components/vue-ui-table-sparkline.js +1 -1
  79. package/dist/components/vue-ui-table.js +1 -1
  80. package/dist/components/vue-ui-thermometer.js +1 -1
  81. package/dist/components/vue-ui-timer.js +1 -1
  82. package/dist/components/vue-ui-tiremarks.js +1 -1
  83. package/dist/components/vue-ui-treemap.js +1 -1
  84. package/dist/components/vue-ui-vertical-bar.js +1 -1
  85. package/dist/components/vue-ui-waffle.js +1 -1
  86. package/dist/components/vue-ui-wheel.js +1 -1
  87. package/dist/components/vue-ui-word-cloud.js +1 -1
  88. package/dist/components/vue-ui-world.js +1 -1
  89. package/dist/components/vue-ui-xy-canvas.js +1 -1
  90. package/dist/components/vue-ui-xy.js +1 -1
  91. package/dist/{dom-to-png-COvyU2SG.js → dom-to-png-K9hvrmBm.js} +1 -1
  92. package/dist/{exposedLib-DrUEXSyf.js → exposedLib-CNHCqGuG.js} +1 -1
  93. package/dist/{img-Bkzj3lDD.js → img-DRq3Equ5.js} +1 -1
  94. package/dist/{labelUtils-iX76cA2-.js → labelUtils-CSh956Gz.js} +1 -1
  95. package/dist/{lib-Dqr_-I6Y.js → lib-DfMn_3jf.js} +6 -5
  96. package/dist/{package-LqzHoybL.js → package-DwX5gXIb.js} +1 -1
  97. package/dist/{pdf-Bk_9lTdQ.js → pdf-CglSdC4O.js} +1 -1
  98. package/dist/{render-common-w-CDlMO6.js → render-common-DruozHP7.js} +2 -2
  99. package/dist/ssr/vue-ui-donut.js +1 -1
  100. package/dist/ssr/vue-ui-xy.js +1 -1
  101. package/dist/ssr.js +2 -2
  102. package/dist/style.css +1 -1
  103. package/dist/types/vue-data-ui.d.ts +153 -3
  104. package/dist/types/vue-ui-label.d.ts +50 -0
  105. package/dist/{useChartExport-DNiwdPmb.js → useChartExport-iwOqiIWX.js} +9 -8
  106. package/dist/{useConfig-DwdGsXTx.js → useConfig-BtJSJ6AK.js} +69 -1
  107. package/dist/{useNestedProp-CulPqtou.js → useNestedProp-CLEe1P5W.js} +1 -1
  108. package/dist/{useObjectBindings-BKkmFRiI.js → useObjectBindings-CgRKOMSB.js} +3 -2
  109. package/dist/{usePrinter-CEiH1b6R.js → usePrinter-Daqyj6c7.js} +2 -2
  110. package/dist/utils.js +3 -3
  111. package/dist/{vue-data-ui-D9mXY0al.js → vue-data-ui-C37q2rbt.js} +78 -76
  112. package/dist/vue-data-ui.js +76 -75
  113. package/dist/{vue-ui-3d-bar-DRPuSQ4e.js → vue-ui-3d-bar-B_z643_d.js} +8 -8
  114. package/dist/{vue-ui-accordion-C6L7glHU.js → vue-ui-accordion-BhOSscZB.js} +4 -4
  115. package/dist/{vue-ui-age-pyramid-B8vOvI_t.js → vue-ui-age-pyramid-CS1J-mHZ.js} +8 -8
  116. package/dist/{vue-ui-annotator-BwIu0JUV.js → vue-ui-annotator-DmTbmRrw.js} +7 -7
  117. package/dist/{vue-ui-bullet-DVNmzl4P.js → vue-ui-bullet-BUuF_-rE.js} +9 -9
  118. package/dist/{vue-ui-bump-DWh2Z5YJ.js → vue-ui-bump-Dt13LCR2.js} +24 -23
  119. package/dist/{vue-ui-candlestick-CsNB1k8H.js → vue-ui-candlestick-CgvK082R.js} +22 -21
  120. package/dist/{vue-ui-carousel-table-CoVW5Fdg.js → vue-ui-carousel-table-C6IZZLpG.js} +5 -5
  121. package/dist/{vue-ui-chestnut-HfJunSSz.js → vue-ui-chestnut-B03dTYpe.js} +7 -7
  122. package/dist/{vue-ui-chord-BN8GOPjO.js → vue-ui-chord-R7YLYkOS.js} +10 -10
  123. package/dist/{vue-ui-circle-pack-CADmtvmt.js → vue-ui-circle-pack-CxIJbXSK.js} +8 -8
  124. package/dist/{vue-ui-cursor-BBTOC9ZH.js → vue-ui-cursor-Bqm8zbqD.js} +4 -4
  125. package/dist/{vue-ui-dag-CwscLfEg.js → vue-ui-dag-TqlqeLgZ.js} +9 -9
  126. package/dist/{vue-ui-dashboard-Cp7LV9rM.js → vue-ui-dashboard-W0PV1gGV.js} +70 -70
  127. package/dist/{vue-ui-digits-C1ZVKDGy.js → vue-ui-digits-D3VKW9O0.js} +4 -4
  128. package/dist/{vue-ui-donut-CqRDChWd.js → vue-ui-donut-8W7ZV_hU.js} +3 -3
  129. package/dist/{vue-ui-donut-DCWdRYf0.js → vue-ui-donut-C_CUqRdv.js} +12 -12
  130. package/dist/{vue-ui-donut-evolution-DXxpjREd.js → vue-ui-donut-evolution-CHQHSkpq.js} +27 -26
  131. package/dist/{vue-ui-dumbbell-MghLKpiu.js → vue-ui-dumbbell-D3G5uL-P.js} +9 -9
  132. package/dist/{vue-ui-flow-DXzy_ciZ.js → vue-ui-flow-CjvO8Fsp.js} +25 -24
  133. package/dist/{vue-ui-funnel-BwDy1TQS.js → vue-ui-funnel-eHR9hTpj.js} +8 -8
  134. package/dist/{vue-ui-galaxy-yv4i3B6M.js → vue-ui-galaxy-DBarvxFP.js} +11 -11
  135. package/dist/{vue-ui-gauge-BL4r7lrw.js → vue-ui-gauge-Cz6PC_H5.js} +8 -8
  136. package/dist/{vue-ui-geo-BRAAm6-Y.js → vue-ui-geo-BmjzP6NK.js} +9 -9
  137. package/dist/{vue-ui-gizmo-D_jY1FrX.js → vue-ui-gizmo-BChwImvX.js} +4 -4
  138. package/dist/{vue-ui-heatmap-DVDTivK7.js → vue-ui-heatmap-h0_V5jv6.js} +22 -21
  139. package/dist/{vue-ui-hill-DAvWt1UH.js → vue-ui-hill-D_2DFdNy.js} +8 -8
  140. package/dist/{vue-ui-history-plot-DZWZLj6d.js → vue-ui-history-plot-Bis3f9Ub.js} +26 -25
  141. package/dist/{vue-ui-horizontal-bar-BWJ0Dj9K.js → vue-ui-horizontal-bar-2AOgQ694.js} +28 -27
  142. package/dist/{vue-ui-kpi-BNHQb-0T.js → vue-ui-kpi-k0yLSsqF.js} +4 -4
  143. package/dist/vue-ui-label-aHnVFvfK.js +1455 -0
  144. package/dist/{vue-ui-mini-loader-BVSIAFYi.js → vue-ui-mini-loader-DUsSEO5b.js} +3 -3
  145. package/dist/{vue-ui-molecule-2eqpaNzM.js → vue-ui-molecule--1J4__BY.js} +7 -7
  146. package/dist/{vue-ui-mood-radar-9UgxqJAM.js → vue-ui-mood-radar-BEruKK_i.js} +9 -9
  147. package/dist/{vue-ui-nested-donuts-DT37jVnx.js → vue-ui-nested-donuts-MBeHoc-t.js} +27 -26
  148. package/dist/{vue-ui-onion-DFYQimLN.js → vue-ui-onion-j0eEGvru.js} +11 -11
  149. package/dist/{vue-ui-parallel-coordinate-plot-DMMp9SSg.js → vue-ui-parallel-coordinate-plot-BvuYSu3N.js} +11 -11
  150. package/dist/{vue-ui-quadrant-CLQkz37n.js → vue-ui-quadrant-DWtwr7JT.js} +59 -57
  151. package/dist/{vue-ui-quick-chart-BHURITQ2.js → vue-ui-quick-chart-vhICAvQe.js} +25 -24
  152. package/dist/{vue-ui-radar-BQDSBbBl.js → vue-ui-radar-e9eoRxOC.js} +10 -10
  153. package/dist/{vue-ui-rating-dBCk6ECe.js → vue-ui-rating-WsMfVsJN.js} +3 -3
  154. package/dist/{vue-ui-relation-circle-D7Jomt1J.js → vue-ui-relation-circle-NgJ8121q.js} +8 -8
  155. package/dist/{vue-ui-ridgeline-OnHk7xFR.js → vue-ui-ridgeline-BZ1Czz8V.js} +11 -11
  156. package/dist/{vue-ui-rings-BysAPudl.js → vue-ui-rings-grgJPuxE.js} +12 -12
  157. package/dist/{vue-ui-scatter-DyxIiCT5.js → vue-ui-scatter-DuqZxbZD.js} +13 -13
  158. package/dist/{vue-ui-skeleton-BQSKB3hE.js → vue-ui-skeleton-CnexlOV6.js} +4 -4
  159. package/dist/{vue-ui-smiley-D1pW2Fdy.js → vue-ui-smiley-Bvs5RJtM.js} +3 -3
  160. package/dist/{vue-ui-spark-trend-RxPrDIxb.js → vue-ui-spark-trend-C2knAS0F.js} +4 -4
  161. package/dist/{vue-ui-sparkbar-BocQ3skK.js → vue-ui-sparkbar-Daxkni2h.js} +4 -4
  162. package/dist/{vue-ui-sparkgauge-YrGOiB_b.js → vue-ui-sparkgauge-CCkcq4Wh.js} +4 -4
  163. package/dist/{vue-ui-sparkhistogram-BlyPOiWe.js → vue-ui-sparkhistogram-B-fzheQo.js} +5 -5
  164. package/dist/{vue-ui-sparkline-DSXRUonI.js → vue-ui-sparkline-DVYlqELY.js} +27 -24
  165. package/dist/{vue-ui-sparkstackbar-CKhn03L6.js → vue-ui-sparkstackbar-pip0BOeZ.js} +5 -5
  166. package/dist/{vue-ui-stackbar-Cf9sJP68.js → vue-ui-stackbar-CIUS0xkc.js} +28 -27
  167. package/dist/{vue-ui-stackline-Tcfr3gJO.js → vue-ui-stackline-Dy4tIQwk.js} +28 -27
  168. package/dist/{vue-ui-strip-plot-CrDJXSM_.js → vue-ui-strip-plot-Sshmlk9v.js} +9 -9
  169. package/dist/{vue-ui-table-iheXH88R.js → vue-ui-table-DSUvcqI9.js} +6 -6
  170. package/dist/{vue-ui-table-heatmap-CglQqfWH.js → vue-ui-table-heatmap-btnDozZ-.js} +6 -6
  171. package/dist/{vue-ui-table-sparkline-LEjMz8F4.js → vue-ui-table-sparkline-C12IgrZG.js} +5 -5
  172. package/dist/{vue-ui-thermometer-D8TwvkuL.js → vue-ui-thermometer-3ZSPCE1q.js} +8 -8
  173. package/dist/{vue-ui-timer-CmWhKatt.js → vue-ui-timer-Birf1RVz.js} +6 -6
  174. package/dist/{vue-ui-tiremarks-DQS-i-Sx.js → vue-ui-tiremarks-BuzKLW5l.js} +8 -8
  175. package/dist/{vue-ui-treemap-CjxYVEzN.js → vue-ui-treemap-DMwq5MYv.js} +11 -11
  176. package/dist/{vue-ui-waffle-BxMdiOcp.js → vue-ui-waffle-wjn4e1mz.js} +12 -12
  177. package/dist/{vue-ui-wheel-CLyRoRSt.js → vue-ui-wheel-BS6f8xC-.js} +8 -8
  178. package/dist/{vue-ui-word-cloud-CqP1ohPS.js → vue-ui-word-cloud-BH1JB5hg.js} +9 -9
  179. package/dist/{vue-ui-world-TUOWS-qf.js → vue-ui-world-DtNML6Oz.js} +9 -9
  180. package/dist/{vue-ui-xy-zgQAxUgJ.js → vue-ui-xy-B9S7cAhC.js} +249 -240
  181. package/dist/{vue-ui-xy-DwiTsq1m.js → vue-ui-xy-DNvRGCN_.js} +3 -3
  182. package/dist/{vue-ui-xy-canvas-D0ox__3z.js → vue-ui-xy-canvas-Hk0x8dd_.js} +28 -27
  183. package/dist/vue_ui_label-B0QoxQrJ.js +115 -0
  184. package/package.json +2 -2
@@ -0,0 +1,1455 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { q as t, wt as n, x as r } from "./lib-DfMn_3jf.js";
3
+ import { t as i } from "./useConfig-BtJSJ6AK.js";
4
+ import { t as a } from "./useNestedProp-CLEe1P5W.js";
5
+ import { t as o } from "./useThemeCheck-C43Tcqmk.js";
6
+ import { t as s } from "./Shape-BV_BCG2F.js";
7
+ import { t as c } from "./_plugin-vue_export-helper-B3ysoDQm.js";
8
+ import { t as l } from "./vue_ui_label-B0QoxQrJ.js";
9
+ import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as ee, getCurrentInstance as te, guardReactiveProps as ne, nextTick as h, normalizeClass as re, normalizeProps as ie, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, openBlock as g, ref as _, renderList as ce, renderSlot as le, toDisplayString as ue, unref as de, useTemplateRef as v, watch as fe, withModifiers as pe } from "vue";
10
+ //#region src/components/vue-ui-label.vue
11
+ var me = /* @__PURE__ */ e({ default: () => D }), he = [
12
+ "d",
13
+ "stroke",
14
+ "stroke-width",
15
+ "stroke-dasharray"
16
+ ], ge = [
17
+ "cx",
18
+ "cy",
19
+ "r",
20
+ "fill",
21
+ "stroke",
22
+ "stroke-width"
23
+ ], _e = [
24
+ "id",
25
+ "data-position",
26
+ "data-overflow",
27
+ "data-overlap",
28
+ "data-target-x",
29
+ "data-target-y",
30
+ "data-box-position-x",
31
+ "data-box-position-y",
32
+ "data-link-length",
33
+ "data-box-show",
34
+ "data-box-max-width",
35
+ "data-box-padding-top",
36
+ "data-box-padding-right",
37
+ "data-box-padding-bottom",
38
+ "data-box-padding-left",
39
+ "data-drag-enabled",
40
+ "data-drag-handle-position",
41
+ "data-drag-handle-size"
42
+ ], ve = [
43
+ "x",
44
+ "y",
45
+ "width",
46
+ "height",
47
+ "rx",
48
+ "fill",
49
+ "stroke",
50
+ "stroke-width"
51
+ ], ye = [
52
+ "x",
53
+ "y",
54
+ "width",
55
+ "height",
56
+ "rx",
57
+ "aria-label"
58
+ ], be = [
59
+ "font-size",
60
+ "font-weight",
61
+ "text-anchor",
62
+ "fill"
63
+ ], xe = ["x", "y"], Se = [
64
+ "font-size",
65
+ "font-weight",
66
+ "text-anchor",
67
+ "fill"
68
+ ], Ce = ["x", "y"], we = ["aria-label"], Te = [
69
+ "x",
70
+ "y",
71
+ "width",
72
+ "height"
73
+ ], Ee = [
74
+ "x",
75
+ "y",
76
+ "width",
77
+ "height",
78
+ "rx"
79
+ ], De = [
80
+ "d",
81
+ "stroke",
82
+ "stroke-width"
83
+ ], Oe = [
84
+ "d",
85
+ "stroke",
86
+ "stroke-width",
87
+ "opacity"
88
+ ], ke = 8, y = 4, Ae = 12, je = 24, Me = 1, Ne = 10, b = "__vueUiLabelLayoutOrder", Pe = "__vueUiLabelNextLayoutOrder", x = "__vueUiLabelLayoutRaf", Fe = "__vueUiLabelSetLayoutRect", Ie = "__vueUiLabelMeasureElement", Le = "__vueUiLabelEmitDragEnd", S = "__vueUiLabelPersistedOffset", C = "__vueUiLabelDragRequestedOffset", w = "__vueUiLabelDragging", Re = "__vueUiLabelDragPriority", ze = "__vueUiLabelNextDragPriority", Be = "__vueUiLabelLastLayoutRect", T = "__vueUiLabelLastLayoutOffset", E = "__vueUiLabelDisplacedLabels", D = /*#__PURE__*/ c({
89
+ __name: "vue-ui-label",
90
+ props: {
91
+ dataset: {
92
+ type: Object,
93
+ default() {
94
+ return {
95
+ x: null,
96
+ y: null,
97
+ position: {
98
+ x: null,
99
+ y: null
100
+ }
101
+ };
102
+ }
103
+ },
104
+ config: {
105
+ type: Object,
106
+ default() {
107
+ return {};
108
+ }
109
+ }
110
+ },
111
+ emits: [
112
+ "dragStart",
113
+ "drag",
114
+ "dragEnd",
115
+ "click",
116
+ "mouseenter",
117
+ "mouseleave",
118
+ "focus",
119
+ "blur"
120
+ ],
121
+ setup(e, { expose: c, emit: me }) {
122
+ let D = e, O = me, { vue_ui_label: Ve } = i(), { isThemeValid: He, warnInvalidTheme: Ue } = o();
123
+ function We() {
124
+ let e = a({
125
+ userConfig: D.config,
126
+ defaultConfig: Ve
127
+ }), t = {}, n = e.theme;
128
+ return n ? He.value(e) ? t = a({
129
+ userConfig: l[n] || D.config,
130
+ defaultConfig: e
131
+ }) : (Ue(e), t = e) : t = e, t;
132
+ }
133
+ let k = d(() => We()), Ge = te(), Ke = t(), A = v("wrapperRef"), j = v("labelRef"), qe = v("contentRef"), Je = v("boxRef"), Ye = v("titleTextRef"), Xe = v("contentTextRef"), M = _(null), N = _(null), P = _(null), F = _({
134
+ x: 0,
135
+ y: 0
136
+ }), Ze = _(!1), I = _(!1), Qe = _("pointer"), $e = d(() => k.value.title.fontSize), et = d(() => k.value.title.lineHeight), tt = d(() => k.value.content.fontSize), nt = d(() => k.value.content.lineHeight), rt = d(() => k.value.title.gap), it = d(() => k.value.drag.handleWidth), at = d(() => k.value.collisionGap), ot = null, st = null, L = null, R = {
137
+ inputType: null,
138
+ touchId: null,
139
+ startPointer: null,
140
+ startOffset: null,
141
+ lastRequestedOffset: null
142
+ }, ct = d(() => ({
143
+ x: D.dataset?.x ?? null,
144
+ y: D.dataset?.y ?? null
145
+ })), z = d(() => n(ct.value.x) && n(ct.value.y)), B = d(() => Number(ct.value.x)), V = d(() => Number(ct.value.y)), H = d(() => k.value.link), U = d(() => k.value.box), lt = d(() => k.value.drag), W = d(() => k.value.title.marker), ut = d(() => k.value.overlap === !0), G = d(() => lt.value?.enable === !0), dt = d(() => !!(Ge?.vnode?.props ?? {}).onClick), ft = d(() => dt.value), pt = d(() => [String(k.value.title?.text ?? "").trim(), String(k.value.content?.text ?? "").trim()].filter(Boolean).join(", ") || "Label"), mt = d(() => `Move ${pt.value}`), ht = `label_${Ke}_drag_instructions`, gt = d(() => k.value.a11y.translations.keyboardNavigation), _t = d(() => n(lt.value?.iconSize) ? Math.max(0, Number(lt.value.iconSize)) : 0), vt = d(() => _t.value * .15), yt = d(() => {
146
+ let e = lt.value?.handlePosition;
147
+ return [
148
+ "left",
149
+ "right",
150
+ "top",
151
+ "bottom"
152
+ ].includes(e) ? e : "left";
153
+ }), bt = d(() => {
154
+ let e = D.dataset?.position;
155
+ return !e || !n(e.x) || !n(e.y) ? null : {
156
+ x: Number(e.x),
157
+ y: Number(e.y)
158
+ };
159
+ }), xt = d(() => Ze.value ? null : bt.value), St = d(() => n(H.value.length) ? Math.max(0, Number(H.value.length)) : ke), Ct = d(() => Un(k.value.title.textAlign)), wt = d(() => Un(k.value.content.textAlign)), Tt = d(() => Wn(Ct.value)), Et = d(() => Wn(wt.value)), Dt = d(() => W.value?.color !== null && W.value?.color !== void 0 && String(k.value.title.text ?? "") !== ""), Ot = d(() => Dt.value && n(W.value?.size) ? Math.max(0, Number(W.value.size)) : 0), kt = d(() => Ot.value / 2), At = d(() => W.value?.beforeText !== !1), jt = d(() => Dt.value && Ot.value > 0 ? 6 : 0), Mt = d(() => Ot.value > 0 ? Ot.value + jt.value : 0), K = d(() => {
160
+ let e = U.value.padding ?? {};
161
+ return {
162
+ top: n(e.top) ? Math.max(0, Number(e.top)) : 0,
163
+ right: n(e.right) ? Math.max(0, Number(e.right)) : 0,
164
+ bottom: n(e.bottom) ? Math.max(0, Number(e.bottom)) : 0,
165
+ left: n(e.left) ? Math.max(0, Number(e.left)) : 0
166
+ };
167
+ }), Nt = d(() => n(U.value.borderWidth) ? Math.max(0, Number(U.value.borderWidth)) : 0), Pt = d(() => n(U.value.borderRadius) ? Math.max(0, Number(U.value.borderRadius)) : 0), q = d(() => n(U.value.maxWidth) ? Math.max(0, Number(U.value.maxWidth)) : null), Ft = d(() => G.value && U.value.show ? it.value : 0), It = d(() => ["left", "right"].includes(yt.value)), Lt = d(() => {
168
+ if (!U.value.show || !n(q.value) || q.value <= 0) return null;
169
+ let e = It.value ? Ft.value : 0;
170
+ return Math.max(1, q.value - K.value.left - K.value.right - e);
171
+ }), Rt = d(() => Lt.value ? Math.max(1, Lt.value - Mt.value) : null), J = d(() => {
172
+ if (!U.value.show || !P.value) return null;
173
+ let e = Nt.value / 2, t = Math.max(0, P.value.width - Nt.value), n = Math.max(0, P.value.height - Nt.value);
174
+ return {
175
+ x: P.value.x + e,
176
+ y: P.value.y + e,
177
+ width: t,
178
+ height: n,
179
+ rx: Math.min(Pt.value, t / 2, n / 2)
180
+ };
181
+ }), zt = d(() => {
182
+ if (!G.value || !J.value) return null;
183
+ let e = yt.value, t = ["left", "right"].includes(e), n = Math.min(it.value, Math.max(0, t ? J.value.width : J.value.height));
184
+ if (n <= 0 || J.value.width <= 0 || J.value.height <= 0) return null;
185
+ let r = J.value.x, i = J.value.y, a = J.value.width, o = J.value.height, s = "", c = "";
186
+ if (e === "left" || e === "right") {
187
+ a = n, r = e === "left" ? J.value.x : J.value.x + J.value.width - n;
188
+ let t = e === "left" ? r + n : r, l = r + n / 2, u = i + o / 2;
189
+ s = `
190
+ M ${t} ${i}
191
+ V ${i + o}
192
+ `;
193
+ let d = _t.value, f = vt.value / 2, p = Math.max(0, d / 2 - f), m = d * .14;
194
+ c = [
195
+ -.7,
196
+ 0,
197
+ .7
198
+ ].flatMap((e) => {
199
+ let t = u + p * e;
200
+ return [`M ${l - m} ${t} h 0`, `M ${l + m} ${t} h 0`];
201
+ }).join(" ");
202
+ } else {
203
+ o = n, i = e === "top" ? J.value.y : J.value.y + J.value.height - n;
204
+ let t = e === "top" ? i + n : i, l = r + a / 2, u = i + n / 2;
205
+ s = `
206
+ M ${r} ${t}
207
+ H ${r + a}
208
+ `;
209
+ let d = _t.value, f = vt.value / 2, p = Math.max(0, d / 2 - f), m = d * .14;
210
+ c = [
211
+ -.7,
212
+ 0,
213
+ .7
214
+ ].flatMap((e) => {
215
+ let t = l + p * e;
216
+ return [`M ${t} ${u - m} h 0`, `M ${t} ${u + m} h 0`];
217
+ }).join(" ");
218
+ }
219
+ return {
220
+ x: r,
221
+ y: i,
222
+ width: a,
223
+ height: o,
224
+ separatorPath: s,
225
+ gripPath: c,
226
+ position: e
227
+ };
228
+ }), Y = d(() => {
229
+ let e = zt.value;
230
+ if (!e) return null;
231
+ let t = Math.max(je, e.width), n = Math.max(je, e.height), r = e.x, i = e.y;
232
+ return e.position === "left" ? r = e.x + e.width - t : e.position === "top" && (i = e.y + e.height - n), e.position === "left" || e.position === "right" ? i = e.y + e.height / 2 - n / 2 : r = e.x + e.width / 2 - t / 2, {
233
+ x: r,
234
+ y: i,
235
+ width: t,
236
+ height: n
237
+ };
238
+ }), X = d(() => {
239
+ if (!ft.value) return null;
240
+ let e = null;
241
+ if (J.value ? e = { ...J.value } : N.value && (e = {
242
+ x: N.value.x - F.value.x,
243
+ y: N.value.y - F.value.y,
244
+ width: N.value.width,
245
+ height: N.value.height,
246
+ rx: 0
247
+ }), !e) return null;
248
+ let t = zt.value;
249
+ return t && (t.position === "left" ? (e.x += t.width, e.width -= t.width) : t.position === "right" ? e.width -= t.width : (t.position === "top" && (e.y += t.height), e.height -= t.height)), e.width <= 0 || e.height <= 0 ? null : e;
250
+ }), Z = _(Kn(k.value.title.text)), Bt = _(Kn(k.value.content.text)), Vt = _(0), Ht = _(0), Ut = _(0), Wt = d(() => Vt.value + Mt.value), Gt = d(() => B.value - Ut.value / 2), Kt = d(() => B.value + Ut.value / 2), qt = d(() => Ct.value === "left" ? Gt.value : Ct.value === "right" ? Kt.value - Wt.value : B.value - Wt.value / 2), Jt = d(() => {
251
+ let e = qt.value + (At.value ? Mt.value : 0);
252
+ return Ct.value === "left" ? e : Ct.value === "right" ? e + Vt.value : e + Vt.value / 2;
253
+ }), Yt = d(() => !Dt.value || kt.value <= 0 ? null : {
254
+ x: At.value ? qt.value + kt.value : qt.value + Vt.value + jt.value + kt.value,
255
+ y: V.value - $e.value * .35 + W.value.offsetY
256
+ }), Xt = d(() => Gn(wt.value)), Zt = d(() => Z.value.length ? V.value + Z.value.length * et.value + rt.value : V.value), Qt = d(() => {
257
+ if (!H.value.show || !z.value || !N.value) return null;
258
+ let e = N.value, t = B.value, n = V.value, i = e.x + e.width / 2, a = e.y + e.height / 2, o = i - t, s = a - n, c, l, u, d = U.value.show ? Math.min(Pt.value, e.width / 2, e.height / 2) : 0, f = Math.abs(i - t) < .001, p = Math.abs(a - n) < .001;
259
+ return Math.abs(o) >= Math.abs(s) ? (o >= 0 ? (u = "left", c = e.x) : (u = "right", c = e.x + e.width), l = p ? a : r(n, e.y + d, e.y + e.height - d)) : (s >= 0 ? (u = "top", l = e.y) : (u = "bottom", l = e.y + e.height), c = f ? i : r(t, e.x + d, e.x + e.width - d)), {
260
+ d: `M ${t} ${n} L ${c} ${l}`,
261
+ side: u,
262
+ start: {
263
+ x: t,
264
+ y: n
265
+ },
266
+ end: {
267
+ x: c,
268
+ y: l
269
+ }
270
+ };
271
+ });
272
+ function $t(e, t) {
273
+ let n = M.value;
274
+ if (!n?.createSVGPoint || !Number.isFinite(e) || !Number.isFinite(t)) return null;
275
+ let r = n.getScreenCTM?.();
276
+ if (!r) return null;
277
+ let i = n.createSVGPoint();
278
+ i.x = e, i.y = t;
279
+ try {
280
+ let e = i.matrixTransform(r.inverse());
281
+ return !Number.isFinite(e.x) || !Number.isFinite(e.y) ? null : {
282
+ x: e.x,
283
+ y: e.y
284
+ };
285
+ } catch {
286
+ return null;
287
+ }
288
+ }
289
+ function en(e = F.value) {
290
+ return {
291
+ dataset: D.dataset,
292
+ offset: {
293
+ x: Number(e?.x) || 0,
294
+ y: Number(e?.y) || 0
295
+ },
296
+ rect: N.value ? { ...N.value } : null
297
+ };
298
+ }
299
+ function tn(e) {
300
+ let t = M.value;
301
+ !t || !e || (Number.isFinite(t[ze]) || (t[ze] = 0), t[ze] += 1, e[Re] = t[ze]);
302
+ }
303
+ function nn() {
304
+ window.addEventListener("mousemove", gn, !0), window.addEventListener("mouseup", _n, !0);
305
+ }
306
+ function rn() {
307
+ window.removeEventListener("mousemove", gn, !0), window.removeEventListener("mouseup", _n, !0);
308
+ }
309
+ function an() {
310
+ window.addEventListener("touchmove", yn, {
311
+ capture: !0,
312
+ passive: !1
313
+ }), window.addEventListener("touchend", bn, !0), window.addEventListener("touchcancel", xn, !0);
314
+ }
315
+ function on() {
316
+ window.removeEventListener("touchmove", yn, !0), window.removeEventListener("touchend", bn, !0), window.removeEventListener("touchcancel", xn, !0);
317
+ }
318
+ function sn() {
319
+ rn(), on();
320
+ }
321
+ function cn({ event: e, inputType: t, touchId: n = null, pointer: r }) {
322
+ if (I.value || !G.value || !j.value || !M.value || !r) return;
323
+ e.preventDefault(), e.stopPropagation();
324
+ let i = j.value, a = {
325
+ x: Number(F.value?.x) || 0,
326
+ y: Number(F.value?.y) || 0
327
+ };
328
+ R.inputType = t, R.touchId = n, R.startPointer = r, R.startOffset = a, R.lastRequestedOffset = a, I.value = !0, i[w] = !0, i[S] = { ...a }, i[C] = { ...a }, M.value[E] = /* @__PURE__ */ new Map(), tn(i), t === "mouse" ? nn() : an(), O("dragStart", en(a));
329
+ }
330
+ function ln(e) {
331
+ e.button === 0 && cn({
332
+ event: e,
333
+ inputType: "mouse",
334
+ pointer: $t(e.clientX, e.clientY)
335
+ });
336
+ }
337
+ function un(e) {
338
+ let t = e.changedTouches?.[0] ?? e.touches?.[0];
339
+ t && cn({
340
+ event: e,
341
+ inputType: "touch",
342
+ touchId: t.identifier,
343
+ pointer: $t(t.clientX, t.clientY)
344
+ });
345
+ }
346
+ function dn() {
347
+ if (L || typeof document > "u") return L;
348
+ let e = document.createElement("div");
349
+ return e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.setAttribute("aria-atomic", "true"), e.style.position = "fixed", e.style.width = "1px", e.style.height = "1px", e.style.padding = "0", e.style.margin = "-1px", e.style.overflow = "hidden", e.style.clip = "rect(0, 0, 0, 0)", e.style.whiteSpace = "nowrap", e.style.border = "0", document.body.append(e), L = e, L;
350
+ }
351
+ function fn(e) {
352
+ let t = dn();
353
+ if (!t) return;
354
+ let n = Number(e?.x) || 0, r = Number(e?.y) || 0, i = (e) => Number.isInteger(e) ? String(e) : e.toFixed(2);
355
+ t.textContent = "", requestAnimationFrame(() => {
356
+ L && (L.textContent = `${pt.value} moved to x ${i(n)}, y ${i(r)}.`);
357
+ });
358
+ }
359
+ function pn(e, t) {
360
+ let n = j.value, r = M.value;
361
+ if (I.value || !G.value || !n || !r?.isConnected) return;
362
+ let i = {
363
+ x: Number(F.value?.x) || 0,
364
+ y: Number(F.value?.y) || 0
365
+ }, a = {
366
+ x: i.x + e,
367
+ y: i.y + t
368
+ };
369
+ R.inputType = "keyboard", R.touchId = null, R.startPointer = null, R.startOffset = i, R.lastRequestedOffset = a, I.value = !0, n[w] = !0, n[S] = { ...i }, n[C] = { ...a }, r[E] = /* @__PURE__ */ new Map(), tn(n), O("dragStart", en(i)), O("drag", en(a)), wr(r), Sn();
370
+ }
371
+ function mn(e) {
372
+ if (!G.value) return;
373
+ let t = {
374
+ ArrowUp: [0, -1],
375
+ ArrowDown: [0, 1],
376
+ ArrowLeft: [-1, 0],
377
+ ArrowRight: [1, 0]
378
+ }[e.key];
379
+ if (!t) return;
380
+ e.preventDefault(), e.stopPropagation();
381
+ let n = e.shiftKey ? Ne : Me;
382
+ pn(t[0] * n, t[1] * n);
383
+ }
384
+ function hn(e, t = null) {
385
+ if (!I.value || !R.startPointer || !R.startOffset || !j.value || !e) return;
386
+ t?.cancelable && t.preventDefault();
387
+ let n = {
388
+ x: R.startOffset.x + (e.x - R.startPointer.x),
389
+ y: R.startOffset.y + (e.y - R.startPointer.y)
390
+ };
391
+ R.lastRequestedOffset = n, j.value[C] = { ...n }, $(M.value), O("drag", en(n));
392
+ }
393
+ function gn(e) {
394
+ !I.value || R.inputType !== "mouse" || hn($t(e.clientX, e.clientY), e);
395
+ }
396
+ function _n(e) {
397
+ !I.value || R.inputType !== "mouse" || Sn(e);
398
+ }
399
+ function vn(e) {
400
+ if (!e || R.touchId === null) return null;
401
+ for (let t of e) if (t.identifier === R.touchId) return t;
402
+ return null;
403
+ }
404
+ function yn(e) {
405
+ if (!I.value || R.inputType !== "touch") return;
406
+ let t = vn(e.touches);
407
+ t && hn($t(t.clientX, t.clientY), e);
408
+ }
409
+ function bn(e) {
410
+ !I.value || R.inputType !== "touch" || vn(e.changedTouches) && Sn(e);
411
+ }
412
+ function xn(e) {
413
+ !I.value || R.inputType !== "touch" || vn(e.changedTouches) && Sn(e);
414
+ }
415
+ function Sn(e = null) {
416
+ if (!I.value) return;
417
+ e?.cancelable && e.preventDefault();
418
+ let t = j.value, n = M.value, r = R.inputType;
419
+ n?.[x] && (cancelAnimationFrame(n[x]), n[x] = null), n?.isConnected && t && wr(n);
420
+ let i = t ? pr(t) ?? {
421
+ x: Number(F.value?.x) || 0,
422
+ y: Number(F.value?.y) || 0
423
+ } : {
424
+ x: Number(F.value?.x) || 0,
425
+ y: Number(F.value?.y) || 0
426
+ }, a = N.value ? {
427
+ x: N.value.x,
428
+ y: N.value.y
429
+ } : P.value ? {
430
+ x: P.value.x + i.x,
431
+ y: P.value.y + i.y
432
+ } : {
433
+ x: B.value + i.x,
434
+ y: V.value + i.y
435
+ }, o = Sr(n, t);
436
+ t && (t[S] = {
437
+ x: i.x,
438
+ y: i.y
439
+ }, t[w] = !1, delete t[C]), F.value = {
440
+ x: i.x,
441
+ y: i.y
442
+ }, sn(), I.value = !1, R.inputType = null, R.touchId = null, R.startPointer = null, R.startOffset = null, R.lastRequestedOffset = null, requestAnimationFrame(() => {
443
+ r !== "keyboard" && In(), O("dragEnd", wn(a)), r === "keyboard" && fn(a);
444
+ for (let e of o) e.emitDragEnd(e.position);
445
+ });
446
+ }
447
+ function Cn(e = F.value) {
448
+ return N.value ? {
449
+ x: N.value.x,
450
+ y: N.value.y
451
+ } : P.value ? {
452
+ x: P.value.x + (Number(e?.x) || 0),
453
+ y: P.value.y + (Number(e?.y) || 0)
454
+ } : {
455
+ x: B.value + (Number(e?.x) || 0),
456
+ y: V.value + (Number(e?.y) || 0)
457
+ };
458
+ }
459
+ function wn(e = Cn()) {
460
+ return {
461
+ ...D.dataset,
462
+ position: {
463
+ x: Number(e?.x) || 0,
464
+ y: Number(e?.y) || 0
465
+ }
466
+ };
467
+ }
468
+ function Tn(e) {
469
+ O(e, wn());
470
+ }
471
+ function En() {
472
+ In(), Tn("mouseenter");
473
+ }
474
+ function Dn() {
475
+ Tn("mouseleave");
476
+ }
477
+ function On() {
478
+ if (Qe.value !== "pointer") return;
479
+ let e = document.activeElement;
480
+ (e === j.value || e === A.value) && e.blur?.();
481
+ }
482
+ function kn() {
483
+ In(), On(), Tn("click");
484
+ }
485
+ function An() {
486
+ Qe.value = "keyboard";
487
+ }
488
+ function jn() {
489
+ Qe.value = "pointer";
490
+ }
491
+ function Mn() {
492
+ Qe.value = "pointer";
493
+ let e = document.activeElement, t = A.value;
494
+ t && e && t.contains(e) && typeof e.blur == "function" && e.blur();
495
+ }
496
+ function Nn(e) {
497
+ ft.value && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), Tn("click"));
498
+ }
499
+ function Pn(e) {
500
+ let t = A.value;
501
+ !t || t.contains(e.relatedTarget) || Tn("focus");
502
+ }
503
+ function Fn(e) {
504
+ let t = A.value;
505
+ !t || t.contains(e.relatedTarget) || Tn("blur");
506
+ }
507
+ function In() {
508
+ if (I.value || !A.value) return;
509
+ let e = A.value, t = e.parentElement;
510
+ !t || t.lastElementChild === e || t.appendChild(e);
511
+ }
512
+ function Ln(e) {
513
+ let t = e.viewBox?.baseVal;
514
+ if (t?.width > 0 && t?.height > 0) return {
515
+ x: t.x,
516
+ y: t.y,
517
+ width: t.width,
518
+ height: t.height
519
+ };
520
+ let n = e.getBoundingClientRect();
521
+ return {
522
+ x: 0,
523
+ y: 0,
524
+ width: e.clientWidth || n.width,
525
+ height: e.clientHeight || n.height
526
+ };
527
+ }
528
+ function Rn(e) {
529
+ return {
530
+ x: e.x,
531
+ y: e.y,
532
+ width: e.width,
533
+ height: e.height
534
+ };
535
+ }
536
+ function zn(e, { top: t = 0, right: n = 0, bottom: r = 0, left: i = 0 } = {}) {
537
+ return {
538
+ x: e.x - i,
539
+ y: e.y - t,
540
+ width: e.width + i + n,
541
+ height: e.height + t + r
542
+ };
543
+ }
544
+ function Q(e, t) {
545
+ return {
546
+ x: e.x + t.x,
547
+ y: e.y + t.y,
548
+ width: e.width,
549
+ height: e.height
550
+ };
551
+ }
552
+ function Bn(e, t, n = 0) {
553
+ return e.x < t.x + t.width + n && e.x + e.width + n > t.x && e.y < t.y + t.height + n && e.y + e.height + n > t.y;
554
+ }
555
+ function Vn(e, t) {
556
+ return Math.max(0, Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x)) * Math.max(0, Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y));
557
+ }
558
+ function Hn(e, t, n = 0) {
559
+ return e.x >= t.x + n && e.y >= t.y + n && e.x + e.width <= t.x + t.width - n && e.y + e.height <= t.y + t.height - n;
560
+ }
561
+ function Un(e) {
562
+ return [
563
+ "left",
564
+ "center",
565
+ "right"
566
+ ].includes(e) ? e : "center";
567
+ }
568
+ function Wn(e) {
569
+ return e === "left" ? "start" : e === "right" ? "end" : "middle";
570
+ }
571
+ function Gn(e) {
572
+ return e === "left" ? Gt.value : e === "right" ? Kt.value : B.value;
573
+ }
574
+ function Kn(e) {
575
+ return e ? String(e).split(/\r?\n/) : [];
576
+ }
577
+ function qn(e, t) {
578
+ let n = String(e ?? "");
579
+ if (!n) return 0;
580
+ let r = Number(t?.getAttribute?.("font-size"));
581
+ if (!Number.isFinite(r) || r <= 0) try {
582
+ r = Number.parseFloat(window.getComputedStyle(t).fontSize);
583
+ } catch {
584
+ r = 0;
585
+ }
586
+ return (!Number.isFinite(r) || r <= 0) && (r = 12), Array.from(n).reduce((e, t) => {
587
+ if (/\s/u.test(t)) return e + r * .33;
588
+ if (/[ilI1.,'`:;|!]/u.test(t)) return e + r * .3;
589
+ if (/[MW@#%&]/u.test(t)) return e + r * .9;
590
+ let n = t.codePointAt(0) ?? 0;
591
+ return e + r * (n >= 4352 && n <= 4607 || n >= 11904 && n <= 40959 || n >= 44032 && n <= 55215 || n >= 63744 && n <= 64255 || n >= 127744 && n <= 129791 ? 1 : .56);
592
+ }, 0);
593
+ }
594
+ function Jn(e, t = "", n = null) {
595
+ if (!e) return qn(t, n);
596
+ try {
597
+ let t = e.getComputedTextLength?.();
598
+ if (Number.isFinite(t) && t > 0) return t;
599
+ } catch {}
600
+ try {
601
+ let t = e.getBBox?.().width;
602
+ if (Number.isFinite(t) && t > 0) return t;
603
+ } catch {}
604
+ try {
605
+ let t = e.getBoundingClientRect?.().width, n = e.getScreenCTM?.(), r = n ? Math.hypot(n.a, n.b) : 0;
606
+ if (Number.isFinite(t) && t > 0 && Number.isFinite(r) && r > 0) return t / r;
607
+ } catch {}
608
+ return qn(t, n);
609
+ }
610
+ function Yn(e) {
611
+ if (!e?.isConnected) return null;
612
+ let t = e.parentNode;
613
+ if (!t) return null;
614
+ let n = e.cloneNode(!1);
615
+ return n.removeAttribute("id"), n.setAttribute("opacity", "0"), n.setAttribute("pointer-events", "none"), n.setAttribute("text-anchor", "start"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("aria-hidden", "true"), t.append(n), {
616
+ measure(t) {
617
+ let r = String(t ?? "");
618
+ return r ? (n.textContent = r, Jn(n, r, e)) : 0;
619
+ },
620
+ destroy() {
621
+ n.remove();
622
+ }
623
+ };
624
+ }
625
+ function Xn(e, t, n) {
626
+ if (!e) return [""];
627
+ if (n(e) <= t) return [e];
628
+ let r = [], i = "";
629
+ for (let a of Array.from(e)) {
630
+ let e = i + a;
631
+ i && n(e) > t ? (r.push(i), i = a) : i = e;
632
+ }
633
+ return i && r.push(i), r.length ? r : [e];
634
+ }
635
+ function Zn(e, t, n) {
636
+ if (e === "") return [""];
637
+ if (n(e) <= t) return [e];
638
+ let r = e.trim().split(/\s+/).filter(Boolean);
639
+ if (!r.length) return [""];
640
+ let i = [], a = "";
641
+ for (let e of r) {
642
+ let r = Xn(e, t, n);
643
+ for (let e of r) {
644
+ let r = a ? `${a} ${e}` : e;
645
+ if (!a || n(r) <= t) {
646
+ a = r;
647
+ continue;
648
+ }
649
+ i.push(a), a = e;
650
+ }
651
+ }
652
+ return a && i.push(a), i.length ? i : [""];
653
+ }
654
+ function Qn(e, t, r) {
655
+ let i = Kn(e);
656
+ if (!i.length || !n(t) || t <= 0) return i;
657
+ let a = Yn(r);
658
+ if (!a) return i;
659
+ try {
660
+ return i.flatMap((e) => Zn(e, t, a.measure));
661
+ } finally {
662
+ a.destroy();
663
+ }
664
+ }
665
+ function $n(e, t) {
666
+ if (!e.length) return 0;
667
+ let n = Yn(t);
668
+ if (!n) return 0;
669
+ try {
670
+ return e.reduce((e, t) => Math.max(e, n.measure(t)), 0);
671
+ } finally {
672
+ n.destroy();
673
+ }
674
+ }
675
+ function er(e) {
676
+ if (!e) return 0;
677
+ let t = Array.from(e.querySelectorAll("tspan"));
678
+ return t.length ? t.reduce((t, n) => Math.max(t, Jn(n, n.textContent ?? "", e)), 0) : Jn(e, e.textContent ?? "", e);
679
+ }
680
+ function tr(e, t, r) {
681
+ if (!n(e) || !n(t) || !n(r) || e <= 0 || t <= r) return e;
682
+ let i = r / t;
683
+ return Math.max(1, e * i * .985);
684
+ }
685
+ function nr() {
686
+ let e = er(Ye.value), t = er(Xe.value);
687
+ Vt.value = e || $n(Z.value, Ye.value), Ht.value = t || $n(Bt.value, Xe.value), Ut.value = Math.max(Vt.value + Mt.value, Ht.value, 0);
688
+ }
689
+ async function rr() {
690
+ await h();
691
+ let e = Lt.value;
692
+ if (!e) {
693
+ Z.value = Kn(k.value.title.text), Bt.value = Kn(k.value.content.text), await h(), nr(), await h(), $();
694
+ return;
695
+ }
696
+ let t = Rt.value ?? e, n = e, r = t, i = n;
697
+ for (let e = 0; e < 8; e += 1) {
698
+ Z.value = Qn(k.value.title.text, r, Ye.value), Bt.value = Qn(k.value.content.text, i, Xe.value), await h();
699
+ let e = er(Ye.value), a = er(Xe.value), o = !k.value.title.text || e <= t + .25, s = !k.value.content.text || a <= n + .25;
700
+ if (o && s) break;
701
+ o || (r = tr(r, e, t)), s || (i = tr(i, a, n));
702
+ }
703
+ nr(), await h(), $();
704
+ }
705
+ function ir(e, t, n) {
706
+ let i = n.x + y - e.x, a = n.x + n.width - y - (e.x + e.width), o = n.y + y - e.y, s = n.y + n.height - y - (e.y + e.height), c, l;
707
+ return c = i <= a ? r(t.x, i, a) : n.x + n.width / 2 - (e.x + e.width / 2), l = o <= s ? r(t.y, o, s) : n.y + n.height / 2 - (e.y + e.height / 2), {
708
+ x: c,
709
+ y: l
710
+ };
711
+ }
712
+ function ar(e, t) {
713
+ let r = [{
714
+ x: 0,
715
+ y: 0,
716
+ direction: "none"
717
+ }], i = e.x + e.width / 2, a = e.y + e.height / 2;
718
+ for (let o of t) {
719
+ let t = n(o.gap) ? Math.max(0, Number(o.gap)) : at.value, s = o.x + o.width / 2, c = o.y + o.height / 2, l = o.y - t - (e.y + e.height), u = o.y + o.height + t - e.y, d = o.x - t - (e.x + e.width), f = o.x + o.width + t - e.x;
720
+ r.push({
721
+ x: 0,
722
+ y: l,
723
+ direction: "top"
724
+ }, {
725
+ x: 0,
726
+ y: u,
727
+ direction: "bottom"
728
+ }, {
729
+ x: d,
730
+ y: 0,
731
+ direction: "left"
732
+ }, {
733
+ x: f,
734
+ y: 0,
735
+ direction: "right"
736
+ }, {
737
+ x: s - i,
738
+ y: l,
739
+ direction: "top"
740
+ }, {
741
+ x: s - i,
742
+ y: u,
743
+ direction: "bottom"
744
+ }, {
745
+ x: d,
746
+ y: c - a,
747
+ direction: "left"
748
+ }, {
749
+ x: f,
750
+ y: c - a,
751
+ direction: "right"
752
+ });
753
+ }
754
+ let o = Math.max(e.width * .5 + at.value, 12), s = Math.max(e.height * .5 + at.value, 12);
755
+ for (let e = 1; e <= Ae; e += 1) {
756
+ let t = o * e, n = s * e;
757
+ r.push({
758
+ x: 0,
759
+ y: -n,
760
+ direction: "top"
761
+ }, {
762
+ x: -t,
763
+ y: -n,
764
+ direction: "top"
765
+ }, {
766
+ x: t,
767
+ y: -n,
768
+ direction: "top"
769
+ }, {
770
+ x: 0,
771
+ y: n,
772
+ direction: "bottom"
773
+ }, {
774
+ x: -t,
775
+ y: n,
776
+ direction: "bottom"
777
+ }, {
778
+ x: t,
779
+ y: n,
780
+ direction: "bottom"
781
+ }, {
782
+ x: -t,
783
+ y: 0,
784
+ direction: "left"
785
+ }, {
786
+ x: -t,
787
+ y: -n,
788
+ direction: "left"
789
+ }, {
790
+ x: -t,
791
+ y: n,
792
+ direction: "left"
793
+ }, {
794
+ x: t,
795
+ y: 0,
796
+ direction: "right"
797
+ }, {
798
+ x: t,
799
+ y: -n,
800
+ direction: "right"
801
+ }, {
802
+ x: t,
803
+ y: n,
804
+ direction: "right"
805
+ });
806
+ }
807
+ return r;
808
+ }
809
+ function or(e) {
810
+ let t = /* @__PURE__ */ new Set();
811
+ return e.filter((e) => {
812
+ let n = [e.x.toFixed(3), e.y.toFixed(3)].join(":");
813
+ return !t.has(n) && (t.add(n), !0);
814
+ });
815
+ }
816
+ function sr(e, t, n) {
817
+ if (e.preferred) return -(2 ** 53 - 1);
818
+ let r = Math.hypot(e.x, e.y);
819
+ return t === "auto" || e.direction === "none" || e.direction === t ? r : r + Math.max(n.width, n.height) * 2;
820
+ }
821
+ function cr(e, t) {
822
+ return t.some((t) => Bn(e, t, n(t.gap) ? Math.max(0, Number(t.gap)) : ke));
823
+ }
824
+ function lr(e) {
825
+ let t = n(e?.gap) ? Math.max(0, Number(e.gap)) : ke;
826
+ return {
827
+ x: e.x - t,
828
+ y: e.y - t,
829
+ width: e.width + t * 2,
830
+ height: e.height + t * 2
831
+ };
832
+ }
833
+ function ur({ baseRect: e, requestedOffset: t, previousOffset: r = null, hardObstacles: i, bounds: a, overflow: o }) {
834
+ let s = {
835
+ x: n(t?.x) ? Number(t.x) : 0,
836
+ y: n(t?.y) ? Number(t.y) : 0
837
+ };
838
+ o || (s = ir(e, s, a));
839
+ for (let t of i) {
840
+ let n = lr(t), i = Q(e, s);
841
+ if (!Bn(i, n)) continue;
842
+ let c = [
843
+ {
844
+ x: s.x + n.x - (i.x + i.width),
845
+ y: s.y
846
+ },
847
+ {
848
+ x: s.x + n.x + n.width - i.x,
849
+ y: s.y
850
+ },
851
+ {
852
+ x: s.x,
853
+ y: s.y + n.y - (i.y + i.height)
854
+ },
855
+ {
856
+ x: s.x,
857
+ y: s.y + n.y + n.height - i.y
858
+ }
859
+ ], l = o ? c : c.filter((t) => Hn(Q(e, t), a, y)), u = l.length ? l : c;
860
+ u.sort((e, t) => {
861
+ let n = Math.hypot(e.x - s.x, e.y - s.y), i = Math.hypot(t.x - s.x, t.y - s.y);
862
+ return n === i ? r ? Math.hypot(e.x - r.x, e.y - r.y) - Math.hypot(t.x - r.x, t.y - r.y) : 0 : n - i;
863
+ }), s = u[0] ?? s;
864
+ }
865
+ return s;
866
+ }
867
+ function dr({ baseRect: e, occupiedRects: t, hardObstacles: r, bounds: i, position: a, overflow: o, preferredOffset: s = null, ignoreOccupied: c = !1 }) {
868
+ let l = ar(e, c ? [...r] : [...t, ...r]);
869
+ s && n(s.x) && n(s.y) && l.unshift({
870
+ x: Number(s.x),
871
+ y: Number(s.y),
872
+ direction: "manual",
873
+ preferred: !0
874
+ }), o || (l = l.map((t) => {
875
+ let n = ir(e, t, i);
876
+ return {
877
+ ...t,
878
+ x: n.x,
879
+ y: n.y
880
+ };
881
+ })), l = or(l), l.sort((e, t) => sr(e, a, i) - sr(t, a, i));
882
+ function u(n) {
883
+ let a = Q(e, n);
884
+ return !(!o && !Hn(a, i, y) || cr(a, r) || !c && t.some((e) => Bn(a, e, at.value)));
885
+ }
886
+ for (let t of l) if (u(t)) {
887
+ if (!t.preferred && [
888
+ "top",
889
+ "bottom",
890
+ "left",
891
+ "right"
892
+ ].includes(t.direction) && r.length) {
893
+ let n = r[0], i = n.x + n.width / 2, a = n.y + n.height / 2, o = e.x + e.width / 2, s = e.y + e.height / 2, c = { ...t };
894
+ if (t.direction === "top" || t.direction === "bottom" ? c.x = i - o : c.y = a - s, u(c)) return c;
895
+ }
896
+ return t;
897
+ }
898
+ let d = null, f = Infinity, p = Infinity;
899
+ for (let n of l) {
900
+ let s = Q(e, n);
901
+ if (!o && !Hn(s, i, y) || cr(s, r)) continue;
902
+ let l = c ? 0 : t.reduce((e, t) => e + Vn(s, t), 0), u = sr(n, a, i);
903
+ (l < f || l === f && u < p) && (f = l, p = u, d = n);
904
+ }
905
+ if (d) return d;
906
+ let m = or(ar(e, r)).sort((e, t) => sr(e, a, i) - sr(t, a, i));
907
+ for (let t of m) if (!cr(Q(e, t), r)) return t;
908
+ return {
909
+ x: 0,
910
+ y: 0,
911
+ direction: "none"
912
+ };
913
+ }
914
+ function fr(e, t) {
915
+ let r = e?.[t];
916
+ return !r || !n(r.x) || !n(r.y) ? null : {
917
+ x: Number(r.x),
918
+ y: Number(r.y)
919
+ };
920
+ }
921
+ function pr(e) {
922
+ return fr(e, S);
923
+ }
924
+ function mr(e) {
925
+ return fr(e, C);
926
+ }
927
+ function hr(e) {
928
+ let t = e?.dataset?.boxPositionX, r = e?.dataset?.boxPositionY;
929
+ return t === "" || r === "" || !n(t) || !n(r) ? null : {
930
+ x: Number(t),
931
+ y: Number(r)
932
+ };
933
+ }
934
+ function gr(e) {
935
+ return Number.isFinite(e?.[Re]) ? e[Re] : -1;
936
+ }
937
+ function _r(e) {
938
+ let t = [...e.querySelectorAll(".vue-ui-label")].filter((t) => t.ownerSVGElement === e);
939
+ Number.isFinite(e[Pe]) || (e[Pe] = 0);
940
+ for (let n of t) Number.isFinite(n[b]) || (n[b] = e[Pe], e[Pe] += 1);
941
+ return t.sort((e, t) => e[b] - t[b]);
942
+ }
943
+ function vr(e) {
944
+ let t = Number(e.dataset.targetX), r = Number(e.dataset.targetY);
945
+ return !Number.isFinite(t) || !Number.isFinite(r) ? null : {
946
+ x: t,
947
+ y: r,
948
+ width: 0,
949
+ height: 0,
950
+ gap: n(e.dataset.linkLength) ? Math.max(0, Number(e.dataset.linkLength)) : ke
951
+ };
952
+ }
953
+ function yr(e, t, n = null, r = null) {
954
+ let i = e?.[Fe];
955
+ typeof i == "function" && i({
956
+ layoutRect: t,
957
+ boxRect: n,
958
+ offset: r
959
+ });
960
+ }
961
+ function br(e, t, n = .001) {
962
+ return !e || !t ? !1 : Math.abs(Number(e.x) - Number(t.x)) > n || Math.abs(Number(e.y) - Number(t.y)) > n;
963
+ }
964
+ function xr(e, t, n, r, i) {
965
+ if (!e || !t || !n || !r || !br(n, r)) return;
966
+ let a = e[E];
967
+ a instanceof Map || (a = /* @__PURE__ */ new Map(), e[E] = a), a.has(t) || a.set(t, {
968
+ x: n.x,
969
+ y: n.y
970
+ }), t[T] = {
971
+ x: Number(i?.x) || 0,
972
+ y: Number(i?.y) || 0
973
+ };
974
+ }
975
+ function Sr(e, t) {
976
+ let n = e?.[E];
977
+ if (!(n instanceof Map)) return [];
978
+ let r = [];
979
+ for (let [e, i] of n.entries()) {
980
+ if (!e?.isConnected || e === t) continue;
981
+ let n = e[Be], a = e[T], o = e[Le];
982
+ !n || !br(i, n) || typeof o != "function" || (a && (e[S] = {
983
+ x: Number(a.x) || 0,
984
+ y: Number(a.y) || 0
985
+ }), r.push({
986
+ emitDragEnd: o,
987
+ position: {
988
+ x: n.x,
989
+ y: n.y
990
+ }
991
+ }));
992
+ }
993
+ return n.clear(), delete e[E], r;
994
+ }
995
+ function Cr({ baseRect: e, offset: t, occupiedRects: n, hardObstacles: r, bounds: i, overflow: a, ignoreOccupied: o = !1 }) {
996
+ if (!t) return !1;
997
+ let s = Q(e, t);
998
+ return !(!a && !Hn(s, i, y) || cr(s, r) || !o && n.some((e) => Bn(s, e, 0)));
999
+ }
1000
+ function wr(e) {
1001
+ if (!e?.isConnected) return;
1002
+ let t = _r(e);
1003
+ if (!t.length) return;
1004
+ let r = Ln(e);
1005
+ for (let e of t) e.setAttribute("transform", "translate(0 0)");
1006
+ let i = [];
1007
+ for (let e of t) {
1008
+ let t = e[Ie] ?? e, r;
1009
+ try {
1010
+ r = t.getBBox();
1011
+ } catch {
1012
+ yr(e, null, null, null);
1013
+ continue;
1014
+ }
1015
+ if (!Number.isFinite(r.x) || !Number.isFinite(r.y) || !Number.isFinite(r.width) || !Number.isFinite(r.height) || r.width <= 0 || r.height <= 0) {
1016
+ yr(e, null, null, null);
1017
+ continue;
1018
+ }
1019
+ let a = Rn(r), o = e.dataset.boxShow === "true", s = {
1020
+ top: n(e.dataset.boxPaddingTop) ? Math.max(0, Number(e.dataset.boxPaddingTop)) : 0,
1021
+ right: n(e.dataset.boxPaddingRight) ? Math.max(0, Number(e.dataset.boxPaddingRight)) : 0,
1022
+ bottom: n(e.dataset.boxPaddingBottom) ? Math.max(0, Number(e.dataset.boxPaddingBottom)) : 0,
1023
+ left: n(e.dataset.boxPaddingLeft) ? Math.max(0, Number(e.dataset.boxPaddingLeft)) : 0
1024
+ }, c = o ? zn(a, s) : a, l = o && n(e.dataset.boxMaxWidth) && Number(e.dataset.boxMaxWidth) > 0 ? Number(e.dataset.boxMaxWidth) : null, u = e.dataset.dragEnabled === "true", d = e.dataset.dragHandlePosition, f = [
1025
+ "left",
1026
+ "right",
1027
+ "top",
1028
+ "bottom"
1029
+ ].includes(d) ? d : "right", p = o && u && n(e.dataset.dragHandleSize) ? Math.max(0, Number(e.dataset.dragHandleSize)) : 0;
1030
+ if (p > 0 && (c = f === "left" ? {
1031
+ ...c,
1032
+ x: c.x - p,
1033
+ width: c.width + p
1034
+ } : f === "right" ? {
1035
+ ...c,
1036
+ width: c.width + p
1037
+ } : f === "top" ? {
1038
+ ...c,
1039
+ y: c.y - p,
1040
+ height: c.height + p
1041
+ } : {
1042
+ ...c,
1043
+ height: c.height + p
1044
+ }), l !== null && c.width > l) {
1045
+ let e = c.x + c.width / 2;
1046
+ c = {
1047
+ ...c,
1048
+ x: e - l / 2,
1049
+ width: l
1050
+ };
1051
+ }
1052
+ i.push({
1053
+ label: e,
1054
+ baseRect: c,
1055
+ boxShow: o,
1056
+ position: e.dataset.position || "auto",
1057
+ overflow: e.dataset.overflow === "true",
1058
+ overlap: e.dataset.overlap === "true",
1059
+ dragHandlePosition: f,
1060
+ dragHandleSize: p,
1061
+ targetObstacle: vr(e),
1062
+ persistedOffset: pr(e),
1063
+ datasetPosition: hr(e),
1064
+ requestedDragOffset: mr(e),
1065
+ dragging: e[w] === !0,
1066
+ dragPriority: gr(e)
1067
+ });
1068
+ }
1069
+ i.sort((e, t) => {
1070
+ if (e.dragging !== t.dragging) return e.dragging ? -1 : 1;
1071
+ let n = !!e.datasetPosition || !!e.persistedOffset, r = !!t.datasetPosition || !!t.persistedOffset;
1072
+ return n === r ? n && r && e.dragPriority !== t.dragPriority ? t.dragPriority - e.dragPriority : e.label[b] - t.label[b] : n ? -1 : 1;
1073
+ });
1074
+ let a = i.some((e) => e.dragging), o = i.some((e) => e.dragging && e.overlap), s = [];
1075
+ for (let t of i) {
1076
+ let n = t.targetObstacle ? [t.targetObstacle] : [], i;
1077
+ if (t.dragging) i = ur({
1078
+ baseRect: t.baseRect,
1079
+ requestedOffset: t.requestedDragOffset ?? t.persistedOffset,
1080
+ previousOffset: t.persistedOffset,
1081
+ hardObstacles: n,
1082
+ bounds: r,
1083
+ overflow: t.overflow
1084
+ });
1085
+ else if (a && (o || t.overlap) && t.label[T]) i = {
1086
+ x: Number(t.label[T].x) || 0,
1087
+ y: Number(t.label[T].y) || 0,
1088
+ direction: "overlap"
1089
+ };
1090
+ else if (!a && t.datasetPosition) i = {
1091
+ x: t.datasetPosition.x - t.baseRect.x,
1092
+ y: t.datasetPosition.y - t.baseRect.y,
1093
+ direction: "manual"
1094
+ };
1095
+ else if (!a && t.persistedOffset) i = {
1096
+ x: Number(t.persistedOffset.x) || 0,
1097
+ y: Number(t.persistedOffset.y) || 0,
1098
+ direction: "manual"
1099
+ };
1100
+ else {
1101
+ let e = t.label[T];
1102
+ i = a && e && Cr({
1103
+ baseRect: t.baseRect,
1104
+ offset: e,
1105
+ occupiedRects: s,
1106
+ hardObstacles: n,
1107
+ bounds: r,
1108
+ overflow: t.overflow,
1109
+ ignoreOccupied: t.overlap
1110
+ }) ? {
1111
+ x: Number(e.x) || 0,
1112
+ y: Number(e.y) || 0,
1113
+ direction: "stable"
1114
+ } : dr({
1115
+ baseRect: t.baseRect,
1116
+ occupiedRects: s,
1117
+ hardObstacles: n,
1118
+ bounds: r,
1119
+ position: t.position,
1120
+ overflow: t.overflow,
1121
+ preferredOffset: t.persistedOffset ?? (t.datasetPosition ? {
1122
+ x: t.datasetPosition.x - t.baseRect.x,
1123
+ y: t.datasetPosition.y - t.baseRect.y
1124
+ } : e ?? null),
1125
+ ignoreOccupied: t.overlap
1126
+ });
1127
+ }
1128
+ t.label.setAttribute("transform", `translate(${i.x} ${i.y})`);
1129
+ let c = Q(t.baseRect, i), l = t.label[Be];
1130
+ a && !o && !t.dragging && !t.overlap && xr(e, t.label, l, c, i), (t.datasetPosition || t.persistedOffset || t.dragging) && (t.label[S] = {
1131
+ x: i.x,
1132
+ y: i.y
1133
+ }), t.label[Be] = {
1134
+ x: c.x,
1135
+ y: c.y,
1136
+ width: c.width,
1137
+ height: c.height
1138
+ }, t.label[T] = {
1139
+ x: Number(i.x) || 0,
1140
+ y: Number(i.y) || 0
1141
+ }, yr(t.label, c, t.boxShow ? t.baseRect : null, i), t.overlap || s.push(c);
1142
+ }
1143
+ }
1144
+ function $(e = M.value) {
1145
+ e?.isConnected && (e[x] || (e[x] = requestAnimationFrame(() => {
1146
+ e[x] = null, wr(e);
1147
+ })));
1148
+ }
1149
+ function Tr() {
1150
+ let e = j.value, t = M.value;
1151
+ Ze.value = !0, F.value = {
1152
+ x: 0,
1153
+ y: 0
1154
+ }, e && (I.value && (t?.[x] && (cancelAnimationFrame(t[x]), t[x] = null), sn(), I.value = !1, R.inputType = null, R.touchId = null, R.startPointer = null, R.startOffset = null, R.lastRequestedOffset = null), e[w] = !1, delete e[S], delete e[C], delete e[Be], delete e[T], delete e[Re], e.dataset.boxPositionX = "", e.dataset.boxPositionY = "", e.setAttribute("transform", "translate(0 0)"), t?.isConnected && (t[E] = /* @__PURE__ */ new Map(), $(t)));
1155
+ }
1156
+ return c({ reorder: Tr }), fe(() => [D.dataset?.position?.x, D.dataset?.position?.y], (e, t) => {
1157
+ t && (e[0] !== t[0] || e[1] !== t[1]) && (Ze.value = !1);
1158
+ }), fe(() => [
1159
+ D.dataset?.x,
1160
+ D.dataset?.y,
1161
+ D.dataset?.position?.x,
1162
+ D.dataset?.position?.y
1163
+ ], () => {
1164
+ if (!bt.value && j.value && !I.value) {
1165
+ let e = D.dataset?.position;
1166
+ e && (e.x === null || e.x === void 0 || e.y === null || e.y === void 0) && (delete j.value[S], F.value = {
1167
+ x: 0,
1168
+ y: 0
1169
+ });
1170
+ }
1171
+ rr();
1172
+ }, { flush: "post" }), fe(() => D.config, () => {
1173
+ !G.value && I.value && Sn(), rr();
1174
+ }, {
1175
+ deep: !0,
1176
+ flush: "post"
1177
+ }), se(async () => {
1178
+ await h(), window.addEventListener("keydown", An, !0), window.addEventListener("pointerdown", jn, !0), M.value = j.value?.ownerSVGElement ?? null;
1179
+ let e = M.value, t = j.value, n = qe.value;
1180
+ !e || !t || !n || (t[Ie] = n, t[Fe] = ({ layoutRect: e, boxRect: t, offset: n }) => {
1181
+ N.value = e, P.value = t, n && (F.value = {
1182
+ x: Number(n.x) || 0,
1183
+ y: Number(n.y) || 0
1184
+ });
1185
+ }, t[Le] = (e) => {
1186
+ O("dragEnd", {
1187
+ ...D.dataset,
1188
+ position: {
1189
+ x: Number(e?.x) || 0,
1190
+ y: Number(e?.y) || 0
1191
+ }
1192
+ });
1193
+ }, ot = new MutationObserver((n) => {
1194
+ n.some((e) => !(e.type === "attributes" && e.target === t && e.attributeName === "transform" || e.type === "attributes" && e.target === Je.value)) && $(e);
1195
+ }), ot.observe(t, {
1196
+ subtree: !0,
1197
+ childList: !0,
1198
+ characterData: !0,
1199
+ attributes: !0
1200
+ }), "ResizeObserver" in window && (st = new ResizeObserver(() => {
1201
+ $(e);
1202
+ }), st.observe(e)), document.fonts?.ready?.then(() => {
1203
+ rr();
1204
+ }), rr());
1205
+ }), oe(() => {
1206
+ sn(), window.removeEventListener("keydown", An, !0), window.removeEventListener("pointerdown", jn, !0), ot?.disconnect(), st?.disconnect(), L?.remove(), L = null, j.value && (delete j.value[Fe], delete j.value[Ie], delete j.value[Le], delete j.value[Be], delete j.value[T], delete j.value[S], delete j.value[C], delete j.value[w], delete j.value[Re]), I.value = !1, R.inputType = null, R.touchId = null, R.startPointer = null, R.startOffset = null, R.lastRequestedOffset = null, N.value = null, P.value = null, F.value = {
1207
+ x: 0,
1208
+ y: 0
1209
+ };
1210
+ let e = M.value;
1211
+ if (e) {
1212
+ let t = e[E];
1213
+ t instanceof Map && j.value && t.delete(j.value), requestAnimationFrame(() => {
1214
+ $(e);
1215
+ });
1216
+ }
1217
+ }), (e, t) => (g(), m("g", {
1218
+ ref_key: "wrapperRef",
1219
+ ref: A,
1220
+ class: re(["vue-ui-label-wrapper", { "vue-ui-label-wrapper--keyboard-focus": Qe.value === "keyboard" }]),
1221
+ focusable: "false",
1222
+ onPointerdownCapture: Mn,
1223
+ onMouseenter: En,
1224
+ onMouseleave: Dn,
1225
+ onFocusin: Pn,
1226
+ onFocusout: Fn
1227
+ }, [
1228
+ Qt.value ? (g(), m("path", {
1229
+ key: 0,
1230
+ class: "vue-ui-label__link",
1231
+ d: Qt.value.d,
1232
+ fill: "none",
1233
+ stroke: H.value.stroke,
1234
+ "stroke-width": H.value.strokeWidth,
1235
+ "stroke-dasharray": H.value.strokeDasharray,
1236
+ "stroke-linecap": "round",
1237
+ "pointer-events": "none",
1238
+ "aria-hidden": "true",
1239
+ focusable: "false"
1240
+ }, null, 8, he)) : p("", !0),
1241
+ H.value.targetPlot.show ? (g(), m("circle", {
1242
+ key: 1,
1243
+ cx: B.value,
1244
+ cy: V.value,
1245
+ r: H.value.targetPlot.radius,
1246
+ fill: H.value.stroke,
1247
+ stroke: H.value.targetPlot.stroke,
1248
+ "stroke-width": H.value.strokeWidth,
1249
+ "paint-order": "stroke fill"
1250
+ }, null, 8, ge)) : p("", !0),
1251
+ ee("g", {
1252
+ ref_key: "labelRef",
1253
+ ref: j,
1254
+ class: "vue-ui-label",
1255
+ focusable: "false",
1256
+ id: `label_${de(Ke)}`,
1257
+ "data-position": k.value.position,
1258
+ "data-overflow": String(k.value.overflow),
1259
+ "data-overlap": String(ut.value),
1260
+ "data-target-x": z.value ? B.value : "",
1261
+ "data-target-y": z.value ? V.value : "",
1262
+ "data-box-position-x": xt.value ? xt.value.x : "",
1263
+ "data-box-position-y": xt.value ? xt.value.y : "",
1264
+ "data-link-length": H.value.show ? St.value : ke,
1265
+ "data-box-show": String(U.value.show),
1266
+ "data-box-max-width": q.value !== null && q.value > 0 ? q.value : "",
1267
+ "data-box-padding-top": K.value.top,
1268
+ "data-box-padding-right": K.value.right,
1269
+ "data-box-padding-bottom": K.value.bottom,
1270
+ "data-box-padding-left": K.value.left,
1271
+ "data-drag-enabled": String(G.value),
1272
+ "data-drag-handle-position": yt.value,
1273
+ "data-drag-handle-size": Ft.value,
1274
+ onClick: kn
1275
+ }, [
1276
+ J.value ? (g(), m("rect", {
1277
+ key: 0,
1278
+ ref_key: "boxRef",
1279
+ ref: Je,
1280
+ class: "vue-ui-label__box",
1281
+ x: J.value.x,
1282
+ y: J.value.y,
1283
+ width: J.value.width,
1284
+ height: J.value.height,
1285
+ rx: J.value.rx,
1286
+ fill: U.value.backgroundColor,
1287
+ stroke: U.value.borderColor,
1288
+ "stroke-width": Nt.value,
1289
+ "aria-hidden": "true",
1290
+ focusable: "false"
1291
+ }, null, 8, ve)) : p("", !0),
1292
+ X.value ? (g(), m("rect", {
1293
+ key: 1,
1294
+ class: "vue-ui-label__action-target",
1295
+ x: X.value.x,
1296
+ y: X.value.y,
1297
+ width: X.value.width,
1298
+ height: X.value.height,
1299
+ rx: X.value.rx,
1300
+ fill: "transparent",
1301
+ "pointer-events": "none",
1302
+ role: "button",
1303
+ tabindex: "0",
1304
+ "aria-label": pt.value,
1305
+ onKeydown: Nn
1306
+ }, null, 40, ye)) : p("", !0),
1307
+ le(e.$slots, "before", ie(ne({
1308
+ ...D,
1309
+ box: J.value
1310
+ })), void 0, !0),
1311
+ ee("g", {
1312
+ ref_key: "contentRef",
1313
+ ref: qe,
1314
+ class: "vue-ui-label__body"
1315
+ }, [le(e.$slots, "title", ie(ne({
1316
+ ...D,
1317
+ box: J.value
1318
+ })), () => [
1319
+ At.value && Yt.value && z.value ? (g(), f(s, {
1320
+ key: 0,
1321
+ class: "vue-ui-label__marker",
1322
+ plot: Yt.value,
1323
+ radius: kt.value,
1324
+ shape: W.value.shape,
1325
+ color: W.value.color,
1326
+ "pointer-events": "none",
1327
+ "aria-hidden": "true",
1328
+ focusable: "false"
1329
+ }, null, 8, [
1330
+ "plot",
1331
+ "radius",
1332
+ "shape",
1333
+ "color"
1334
+ ])) : p("", !0),
1335
+ k.value.title.text && z.value ? (g(), m("text", {
1336
+ key: 1,
1337
+ ref_key: "titleTextRef",
1338
+ ref: Ye,
1339
+ class: "vue-ui-label__title",
1340
+ "font-size": $e.value,
1341
+ "font-weight": k.value.title.bold ? "bold" : "normal",
1342
+ "text-anchor": Tt.value,
1343
+ fill: k.value.title.color
1344
+ }, [(g(!0), m(u, null, ce(Z.value, (e, t) => (g(), m("tspan", {
1345
+ key: `title_${t}`,
1346
+ x: Jt.value,
1347
+ y: V.value + t * et.value
1348
+ }, ue(e), 9, xe))), 128))], 8, be)) : p("", !0),
1349
+ !At.value && Yt.value && z.value ? (g(), f(s, {
1350
+ key: 2,
1351
+ class: "vue-ui-label__marker",
1352
+ plot: Yt.value,
1353
+ radius: kt.value,
1354
+ shape: W.value.shape,
1355
+ color: W.value.color,
1356
+ "pointer-events": "none",
1357
+ "aria-hidden": "true",
1358
+ focusable: "false"
1359
+ }, null, 8, [
1360
+ "plot",
1361
+ "radius",
1362
+ "shape",
1363
+ "color"
1364
+ ])) : p("", !0)
1365
+ ], !0), le(e.$slots, "content", ie(ne({
1366
+ ...D,
1367
+ box: J.value
1368
+ })), () => [k.value.content.text && z.value ? (g(), m("text", {
1369
+ key: 0,
1370
+ ref_key: "contentTextRef",
1371
+ ref: Xe,
1372
+ class: "vue-ui-label__content",
1373
+ "font-size": tt.value,
1374
+ "font-weight": k.value.content.bold ? "bold" : "normal",
1375
+ "text-anchor": Et.value,
1376
+ fill: k.value.content.color
1377
+ }, [(g(!0), m(u, null, ce(Bt.value, (e, t) => (g(), m("tspan", {
1378
+ key: `content_${t}`,
1379
+ x: Xt.value,
1380
+ y: Zt.value + t * nt.value
1381
+ }, ue(e), 9, Ce))), 128))], 8, Se)) : p("", !0)], !0)], 512),
1382
+ le(e.$slots, "after", ie(ne({
1383
+ ...D,
1384
+ box: J.value
1385
+ })), void 0, !0),
1386
+ zt.value ? (g(), m("g", {
1387
+ key: 2,
1388
+ class: "vue-ui-label__drag-handle",
1389
+ style: ae({
1390
+ cursor: I.value ? "grabbing" : "grab",
1391
+ touchAction: "none"
1392
+ }),
1393
+ role: "button",
1394
+ tabindex: "0",
1395
+ "aria-label": mt.value,
1396
+ "aria-describedby": ht,
1397
+ "aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight",
1398
+ onKeydown: mn,
1399
+ onClick: t[0] ||= pe(() => {}, ["stop"]),
1400
+ onMousedown: pe(ln, ["stop", "prevent"]),
1401
+ onTouchstart: pe(un, ["stop", "prevent"])
1402
+ }, [
1403
+ ee("desc", { id: ht }, ue(gt.value), 1),
1404
+ Y.value ? (g(), m("rect", {
1405
+ key: 0,
1406
+ x: Y.value.x,
1407
+ y: Y.value.y,
1408
+ width: Y.value.width,
1409
+ height: Y.value.height,
1410
+ fill: "transparent",
1411
+ "pointer-events": "all",
1412
+ "aria-hidden": "true",
1413
+ focusable: "false"
1414
+ }, null, 8, Te)) : p("", !0),
1415
+ Y.value ? (g(), m("rect", {
1416
+ key: 1,
1417
+ class: "vue-ui-label__focus-ring",
1418
+ x: Y.value.x,
1419
+ y: Y.value.y,
1420
+ width: Y.value.width,
1421
+ height: Y.value.height,
1422
+ rx: Math.min(4, Y.value.width / 2, Y.value.height / 2),
1423
+ fill: "none",
1424
+ stroke: "currentColor",
1425
+ "stroke-width": "2",
1426
+ "pointer-events": "none",
1427
+ "aria-hidden": "true",
1428
+ focusable: "false"
1429
+ }, null, 8, Ee)) : p("", !0),
1430
+ k.value.drag.showSeparator ? (g(), m("path", {
1431
+ key: 2,
1432
+ d: zt.value.separatorPath,
1433
+ stroke: U.value.borderColor,
1434
+ "stroke-width": Math.max(.5, Nt.value),
1435
+ "pointer-events": "none",
1436
+ "aria-hidden": "true",
1437
+ focusable: "false"
1438
+ }, null, 8, De)) : p("", !0),
1439
+ ee("path", {
1440
+ d: zt.value.gripPath,
1441
+ stroke: k.value.drag.iconColor,
1442
+ "stroke-width": vt.value,
1443
+ "stroke-linecap": "round",
1444
+ opacity: k.value.drag.iconOpacity,
1445
+ "pointer-events": "none",
1446
+ "aria-hidden": "true",
1447
+ focusable: "false"
1448
+ }, null, 8, Oe)
1449
+ ], 44, we)) : p("", !0)
1450
+ ], 8, _e)
1451
+ ], 34));
1452
+ }
1453
+ }, [["__scopeId", "data-v-bc3a8b8a"]]);
1454
+ //#endregion
1455
+ export { me as n, D as t };