v-float 0.2.0 → 0.3.1

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 (41) hide show
  1. package/README.md +249 -109
  2. package/dist/composables/interactions/index.d.ts +2 -1
  3. package/dist/composables/interactions/index.d.ts.map +1 -1
  4. package/dist/composables/interactions/polygon.d.ts +38 -0
  5. package/dist/composables/interactions/polygon.d.ts.map +1 -0
  6. package/dist/composables/interactions/use-click.d.ts +78 -10
  7. package/dist/composables/interactions/use-click.d.ts.map +1 -1
  8. package/dist/composables/interactions/use-client-point.d.ts +1 -1
  9. package/dist/composables/interactions/use-client-point.d.ts.map +1 -1
  10. package/dist/composables/interactions/use-escape-key.d.ts +24 -0
  11. package/dist/composables/interactions/use-escape-key.d.ts.map +1 -0
  12. package/dist/composables/interactions/use-focus.d.ts +28 -3
  13. package/dist/composables/interactions/use-focus.d.ts.map +1 -1
  14. package/dist/composables/interactions/use-hover.d.ts +32 -18
  15. package/dist/composables/interactions/use-hover.d.ts.map +1 -1
  16. package/dist/composables/interactions/utils/browser-detection.d.ts +23 -0
  17. package/dist/composables/interactions/utils/browser-detection.d.ts.map +1 -0
  18. package/dist/composables/interactions/utils/element-detection.d.ts +53 -0
  19. package/dist/composables/interactions/utils/element-detection.d.ts.map +1 -0
  20. package/dist/composables/interactions/utils/event-utils.d.ts +30 -0
  21. package/dist/composables/interactions/utils/event-utils.d.ts.map +1 -0
  22. package/dist/composables/interactions/utils/index.d.ts +11 -0
  23. package/dist/composables/interactions/utils/index.d.ts.map +1 -0
  24. package/dist/composables/interactions/utils/tree-context.d.ts +32 -0
  25. package/dist/composables/interactions/utils/tree-context.d.ts.map +1 -0
  26. package/dist/composables/middlewares/index.d.ts +0 -1
  27. package/dist/composables/middlewares/index.d.ts.map +1 -1
  28. package/dist/composables/use-arrow.d.ts +10 -3
  29. package/dist/composables/use-arrow.d.ts.map +1 -1
  30. package/dist/composables/use-floating-tree.d.ts +13 -13
  31. package/dist/composables/use-floating-tree.d.ts.map +1 -1
  32. package/dist/composables/use-floating.d.ts +12 -20
  33. package/dist/composables/use-floating.d.ts.map +1 -1
  34. package/dist/composables/use-tree.d.ts.map +1 -1
  35. package/dist/utils.d.ts +1 -0
  36. package/dist/utils.d.ts.map +1 -1
  37. package/dist/v-float.es.js +1457 -1061
  38. package/dist/v-float.umd.js +1 -1
  39. package/package.json +34 -21
  40. package/dist/composables/interactions/use-dismiss.d.ts +0 -68
  41. package/dist/composables/interactions/use-dismiss.d.ts.map +0 -1
@@ -1,82 +1,83 @@
1
- var gt = Object.defineProperty;
2
- var Ie = (e) => {
1
+ var Qt = Object.defineProperty;
2
+ var mt = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var wt = (e, t, n) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var U = (e, t, n) => wt(e, typeof t != "symbol" ? t + "" : t, n), Ee = (e, t, n) => t.has(e) || Ie("Cannot " + n);
7
- var Te = (e, t, n) => (Ee(e, t, "read from private field"), n ? n.call(e) : t.get(e)), de = (e, t, n) => t.has(e) ? Ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Le = (e, t, n, o) => (Ee(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n), Oe = (e, t, n) => (Ee(e, t, "access private method"), n);
8
- import { ref as j, computed as O, toValue as T, shallowRef as Me, watch as ve, onWatcherCleanup as q, onScopeDispose as ae, watchPostEffect as re, getCurrentScope as yt, unref as xt, onMounted as bt, watchEffect as Ae, readonly as Et, shallowReactive as Tt } from "vue";
9
- const Lt = ["top", "right", "bottom", "left"], ee = Math.min, G = Math.max, pe = Math.round, he = Math.floor, F = (e) => ({
5
+ var Zt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var ce = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n), $e = (e, t, n) => t.has(e) || mt("Cannot " + n);
7
+ var Xe = (e, t, n) => ($e(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ne = (e, t, n) => t.has(e) ? mt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ye = (e, t, n, o) => ($e(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n), je = (e, t, n) => ($e(e, t, "access private method"), n);
8
+ import { toValue as S, ref as U, computed as I, shallowRef as qe, watch as pe, onWatcherCleanup as ue, onScopeDispose as ge, watchPostEffect as Te, getCurrentScope as en, unref as tn, onMounted as nn, watchEffect as pt, readonly as on, shallowReactive as rn } from "vue";
9
+ const sn = ["top", "right", "bottom", "left"], we = Math.min, fe = Math.max, Re = Math.round, De = Math.floor, K = (e) => ({
10
10
  x: e,
11
11
  y: e
12
- }), Ot = {
12
+ }), ln = {
13
13
  left: "right",
14
14
  right: "left",
15
15
  bottom: "top",
16
16
  top: "bottom"
17
- }, Rt = {
17
+ }, an = {
18
18
  start: "end",
19
19
  end: "start"
20
20
  };
21
- function De(e, t, n) {
22
- return G(e, ee(t, n));
21
+ function Ke(e, t, n) {
22
+ return fe(e, we(t, n));
23
23
  }
24
- function oe(e, t) {
24
+ function be(e, t) {
25
25
  return typeof e == "function" ? e(t) : e;
26
26
  }
27
- function J(e) {
27
+ function de(e) {
28
28
  return e.split("-")[0];
29
29
  }
30
- function ue(e) {
30
+ function Me(e) {
31
31
  return e.split("-")[1];
32
32
  }
33
- function it(e) {
33
+ function It(e) {
34
34
  return e === "x" ? "y" : "x";
35
35
  }
36
- function He(e) {
36
+ function et(e) {
37
37
  return e === "y" ? "height" : "width";
38
38
  }
39
- function te(e) {
40
- return ["top", "bottom"].includes(J(e)) ? "y" : "x";
39
+ const cn = /* @__PURE__ */ new Set(["top", "bottom"]);
40
+ function ne(e) {
41
+ return cn.has(de(e)) ? "y" : "x";
41
42
  }
42
- function Fe(e) {
43
- return it(te(e));
43
+ function tt(e) {
44
+ return It(ne(e));
44
45
  }
45
- function Pt(e, t, n) {
46
+ function un(e, t, n) {
46
47
  n === void 0 && (n = !1);
47
- const o = ue(e), i = Fe(e), s = He(i);
48
- let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
49
- return t.reference[s] > t.floating[s] && (r = me(r)), [r, me(r)];
48
+ const o = Me(e), i = tt(e), r = et(i);
49
+ let l = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
50
+ return t.reference[r] > t.floating[r] && (l = ke(l)), [l, ke(l)];
50
51
  }
51
- function Ct(e) {
52
- const t = me(e);
53
- return [Ne(e), t, Ne(t)];
52
+ function fn(e) {
53
+ const t = ke(e);
54
+ return [Ge(e), t, Ge(t)];
54
55
  }
55
- function Ne(e) {
56
- return e.replace(/start|end/g, (t) => Rt[t]);
56
+ function Ge(e) {
57
+ return e.replace(/start|end/g, (t) => an[t]);
57
58
  }
58
- function Mt(e, t, n) {
59
- const o = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
59
+ const vt = ["left", "right"], gt = ["right", "left"], dn = ["top", "bottom"], hn = ["bottom", "top"];
60
+ function mn(e, t, n) {
60
61
  switch (e) {
61
62
  case "top":
62
63
  case "bottom":
63
- return n ? t ? i : o : t ? o : i;
64
+ return n ? t ? gt : vt : t ? vt : gt;
64
65
  case "left":
65
66
  case "right":
66
- return t ? s : r;
67
+ return t ? dn : hn;
67
68
  default:
68
69
  return [];
69
70
  }
70
71
  }
71
- function At(e, t, n, o) {
72
- const i = ue(e);
73
- let s = Mt(J(e), n === "start", o);
74
- return i && (s = s.map((r) => r + "-" + i), t && (s = s.concat(s.map(Ne)))), s;
72
+ function pn(e, t, n, o) {
73
+ const i = Me(e);
74
+ let r = mn(de(e), n === "start", o);
75
+ return i && (r = r.map((l) => l + "-" + i), t && (r = r.concat(r.map(Ge)))), r;
75
76
  }
76
- function me(e) {
77
- return e.replace(/left|right|bottom|top/g, (t) => Ot[t]);
77
+ function ke(e) {
78
+ return e.replace(/left|right|bottom|top/g, (t) => ln[t]);
78
79
  }
79
- function Dt(e) {
80
+ function vn(e) {
80
81
  return {
81
82
  top: 0,
82
83
  right: 0,
@@ -85,15 +86,15 @@ function Dt(e) {
85
86
  ...e
86
87
  };
87
88
  }
88
- function rt(e) {
89
- return typeof e != "number" ? Dt(e) : {
89
+ function Wt(e) {
90
+ return typeof e != "number" ? vn(e) : {
90
91
  top: e,
91
92
  right: e,
92
93
  bottom: e,
93
94
  left: e
94
95
  };
95
96
  }
96
- function ge(e) {
97
+ function Fe(e) {
97
98
  const {
98
99
  x: t,
99
100
  y: n,
@@ -111,161 +112,161 @@ function ge(e) {
111
112
  y: n
112
113
  };
113
114
  }
114
- function Ye(e, t, n) {
115
+ function wt(e, t, n) {
115
116
  let {
116
117
  reference: o,
117
118
  floating: i
118
119
  } = e;
119
- const s = te(t), r = Fe(t), l = He(r), a = J(t), c = s === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[l] / 2 - i[l] / 2;
120
- let h;
121
- switch (a) {
120
+ const r = ne(t), l = tt(t), a = et(l), u = de(t), c = r === "y", h = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
121
+ let d;
122
+ switch (u) {
122
123
  case "top":
123
- h = {
124
- x: f,
124
+ d = {
125
+ x: h,
125
126
  y: o.y - i.height
126
127
  };
127
128
  break;
128
129
  case "bottom":
129
- h = {
130
- x: f,
130
+ d = {
131
+ x: h,
131
132
  y: o.y + o.height
132
133
  };
133
134
  break;
134
135
  case "right":
135
- h = {
136
+ d = {
136
137
  x: o.x + o.width,
137
- y: u
138
+ y: f
138
139
  };
139
140
  break;
140
141
  case "left":
141
- h = {
142
+ d = {
142
143
  x: o.x - i.width,
143
- y: u
144
+ y: f
144
145
  };
145
146
  break;
146
147
  default:
147
- h = {
148
+ d = {
148
149
  x: o.x,
149
150
  y: o.y
150
151
  };
151
152
  }
152
- switch (ue(t)) {
153
+ switch (Me(t)) {
153
154
  case "start":
154
- h[r] -= m * (n && c ? -1 : 1);
155
+ d[l] -= p * (n && c ? -1 : 1);
155
156
  break;
156
157
  case "end":
157
- h[r] += m * (n && c ? -1 : 1);
158
+ d[l] += p * (n && c ? -1 : 1);
158
159
  break;
159
160
  }
160
- return h;
161
+ return d;
161
162
  }
162
- const Nt = async (e, t, n) => {
163
+ const gn = async (e, t, n) => {
163
164
  const {
164
165
  placement: o = "bottom",
165
166
  strategy: i = "absolute",
166
- middleware: s = [],
167
- platform: r
168
- } = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(t));
169
- let c = await r.getElementRects({
167
+ middleware: r = [],
168
+ platform: l
169
+ } = n, a = r.filter(Boolean), u = await (l.isRTL == null ? void 0 : l.isRTL(t));
170
+ let c = await l.getElementRects({
170
171
  reference: e,
171
172
  floating: t,
172
173
  strategy: i
173
174
  }), {
174
- x: f,
175
- y: u
176
- } = Ye(c, o, a), m = o, h = {}, p = 0;
177
- for (let d = 0; d < l.length; d++) {
175
+ x: h,
176
+ y: f
177
+ } = wt(c, o, u), p = o, d = {}, g = 0;
178
+ for (let m = 0; m < a.length; m++) {
178
179
  const {
179
- name: v,
180
+ name: b,
180
181
  fn: w
181
- } = l[d], {
182
- x: E,
183
- y: x,
184
- data: g,
185
- reset: b
182
+ } = a[m], {
183
+ x: y,
184
+ y: C,
185
+ data: P,
186
+ reset: E
186
187
  } = await w({
187
- x: f,
188
- y: u,
188
+ x: h,
189
+ y: f,
189
190
  initialPlacement: o,
190
- placement: m,
191
+ placement: p,
191
192
  strategy: i,
192
- middlewareData: h,
193
+ middlewareData: d,
193
194
  rects: c,
194
- platform: r,
195
+ platform: l,
195
196
  elements: {
196
197
  reference: e,
197
198
  floating: t
198
199
  }
199
200
  });
200
- f = E ?? f, u = x ?? u, h = {
201
- ...h,
202
- [v]: {
203
- ...h[v],
204
- ...g
201
+ h = y ?? h, f = C ?? f, d = {
202
+ ...d,
203
+ [b]: {
204
+ ...d[b],
205
+ ...P
205
206
  }
206
- }, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (m = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
207
+ }, E && g <= 50 && (g++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (c = E.rects === !0 ? await l.getElementRects({
207
208
  reference: e,
208
209
  floating: t,
209
210
  strategy: i
210
- }) : b.rects), {
211
- x: f,
212
- y: u
213
- } = Ye(c, m, a)), d = -1);
211
+ }) : E.rects), {
212
+ x: h,
213
+ y: f
214
+ } = wt(c, p, u)), m = -1);
214
215
  }
215
216
  return {
216
- x: f,
217
- y: u,
218
- placement: m,
217
+ x: h,
218
+ y: f,
219
+ placement: p,
219
220
  strategy: i,
220
- middlewareData: h
221
+ middlewareData: d
221
222
  };
222
223
  };
223
- async function we(e, t) {
224
+ async function He(e, t) {
224
225
  var n;
225
226
  t === void 0 && (t = {});
226
227
  const {
227
228
  x: o,
228
229
  y: i,
229
- platform: s,
230
- rects: r,
231
- elements: l,
232
- strategy: a
230
+ platform: r,
231
+ rects: l,
232
+ elements: a,
233
+ strategy: u
233
234
  } = e, {
234
235
  boundary: c = "clippingAncestors",
235
- rootBoundary: f = "viewport",
236
- elementContext: u = "floating",
237
- altBoundary: m = !1,
238
- padding: h = 0
239
- } = oe(t, e), p = rt(h), v = l[m ? u === "floating" ? "reference" : "floating" : u], w = ge(await s.getClippingRect({
240
- element: (n = await (s.isElement == null ? void 0 : s.isElement(v))) == null || n ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
236
+ rootBoundary: h = "viewport",
237
+ elementContext: f = "floating",
238
+ altBoundary: p = !1,
239
+ padding: d = 0
240
+ } = be(t, e), g = Wt(d), b = a[p ? f === "floating" ? "reference" : "floating" : f], w = Fe(await r.getClippingRect({
241
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(b))) == null || n ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
241
242
  boundary: c,
242
- rootBoundary: f,
243
- strategy: a
244
- })), E = u === "floating" ? {
243
+ rootBoundary: h,
244
+ strategy: u
245
+ })), y = f === "floating" ? {
245
246
  x: o,
246
247
  y: i,
247
- width: r.floating.width,
248
- height: r.floating.height
249
- } : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), g = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
248
+ width: l.floating.width,
249
+ height: l.floating.height
250
+ } : l.reference, C = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), P = await (r.isElement == null ? void 0 : r.isElement(C)) ? await (r.getScale == null ? void 0 : r.getScale(C)) || {
250
251
  x: 1,
251
252
  y: 1
252
253
  } : {
253
254
  x: 1,
254
255
  y: 1
255
- }, b = ge(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
256
- elements: l,
257
- rect: E,
258
- offsetParent: x,
259
- strategy: a
260
- }) : E);
256
+ }, E = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
257
+ elements: a,
258
+ rect: y,
259
+ offsetParent: C,
260
+ strategy: u
261
+ }) : y);
261
262
  return {
262
- top: (w.top - b.top + p.top) / g.y,
263
- bottom: (b.bottom - w.bottom + p.bottom) / g.y,
264
- left: (w.left - b.left + p.left) / g.x,
265
- right: (b.right - w.right + p.right) / g.x
263
+ top: (w.top - E.top + g.top) / P.y,
264
+ bottom: (E.bottom - w.bottom + g.bottom) / P.y,
265
+ left: (w.left - E.left + g.left) / P.x,
266
+ right: (E.right - w.right + g.right) / P.x
266
267
  };
267
268
  }
268
- const St = (e) => ({
269
+ const wn = (e) => ({
269
270
  name: "arrow",
270
271
  options: e,
271
272
  async fn(t) {
@@ -273,36 +274,36 @@ const St = (e) => ({
273
274
  x: n,
274
275
  y: o,
275
276
  placement: i,
276
- rects: s,
277
- platform: r,
278
- elements: l,
279
- middlewareData: a
277
+ rects: r,
278
+ platform: l,
279
+ elements: a,
280
+ middlewareData: u
280
281
  } = t, {
281
282
  element: c,
282
- padding: f = 0
283
- } = oe(e, t) || {};
283
+ padding: h = 0
284
+ } = be(e, t) || {};
284
285
  if (c == null)
285
286
  return {};
286
- const u = rt(f), m = {
287
+ const f = Wt(h), p = {
287
288
  x: n,
288
289
  y: o
289
- }, h = Fe(i), p = He(h), d = await r.getDimensions(c), v = h === "y", w = v ? "top" : "left", E = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", g = s.reference[p] + s.reference[h] - m[h] - s.floating[p], b = m[h] - s.reference[h], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
290
- let L = R ? R[x] : 0;
291
- (!L || !await (r.isElement == null ? void 0 : r.isElement(R))) && (L = l.floating[x] || s.floating[p]);
292
- const W = g / 2 - b / 2, k = L / 2 - d[p] / 2 - 1, A = ee(u[w], k), I = ee(u[E], k), y = A, C = L - d[p] - I, P = L / 2 - d[p] / 2 + W, Y = De(y, P, C), V = !a.arrow && ue(i) != null && P !== Y && s.reference[p] / 2 - (P < y ? A : I) - d[p] / 2 < 0, H = V ? P < y ? P - y : P - C : 0;
290
+ }, d = tt(i), g = et(d), m = await l.getDimensions(c), b = d === "y", w = b ? "top" : "left", y = b ? "bottom" : "right", C = b ? "clientHeight" : "clientWidth", P = r.reference[g] + r.reference[d] - p[d] - r.floating[g], E = p[d] - r.reference[d], T = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(c));
291
+ let A = T ? T[C] : 0;
292
+ (!A || !await (l.isElement == null ? void 0 : l.isElement(T))) && (A = a.floating[C] || r.floating[g]);
293
+ const D = P / 2 - E / 2, R = A / 2 - m[g] / 2 - 1, N = we(f[w], R), M = we(f[y], R), k = N, V = A - m[g] - M, F = A / 2 - m[g] / 2 + D, Y = Ke(k, F, V), x = !u.arrow && Me(i) != null && F !== Y && r.reference[g] / 2 - (F < k ? N : M) - m[g] / 2 < 0, s = x ? F < k ? F - k : F - V : 0;
293
294
  return {
294
- [h]: m[h] + H,
295
+ [d]: p[d] + s,
295
296
  data: {
296
- [h]: Y,
297
- centerOffset: P - Y - H,
298
- ...V && {
299
- alignmentOffset: H
297
+ [d]: Y,
298
+ centerOffset: F - Y - s,
299
+ ...x && {
300
+ alignmentOffset: s
300
301
  }
301
302
  },
302
- reset: V
303
+ reset: x
303
304
  };
304
305
  }
305
- }), kt = function(e) {
306
+ }), yn = function(e) {
306
307
  return e === void 0 && (e = {}), {
307
308
  name: "flip",
308
309
  options: e,
@@ -310,71 +311,73 @@ const St = (e) => ({
310
311
  var n, o;
311
312
  const {
312
313
  placement: i,
313
- middlewareData: s,
314
- rects: r,
315
- initialPlacement: l,
316
- platform: a,
314
+ middlewareData: r,
315
+ rects: l,
316
+ initialPlacement: a,
317
+ platform: u,
317
318
  elements: c
318
319
  } = t, {
319
- mainAxis: f = !0,
320
- crossAxis: u = !0,
321
- fallbackPlacements: m,
322
- fallbackStrategy: h = "bestFit",
323
- fallbackAxisSideDirection: p = "none",
324
- flipAlignment: d = !0,
325
- ...v
326
- } = oe(e, t);
327
- if ((n = s.arrow) != null && n.alignmentOffset)
320
+ mainAxis: h = !0,
321
+ crossAxis: f = !0,
322
+ fallbackPlacements: p,
323
+ fallbackStrategy: d = "bestFit",
324
+ fallbackAxisSideDirection: g = "none",
325
+ flipAlignment: m = !0,
326
+ ...b
327
+ } = be(e, t);
328
+ if ((n = r.arrow) != null && n.alignmentOffset)
328
329
  return {};
329
- const w = J(i), E = te(l), x = J(l) === l, g = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = m || (x || !d ? [me(l)] : Ct(l)), R = p !== "none";
330
- !m && R && b.push(...At(l, d, p, g));
331
- const L = [l, ...b], W = await we(t, v), k = [];
332
- let A = ((o = s.flip) == null ? void 0 : o.overflows) || [];
333
- if (f && k.push(W[w]), u) {
334
- const P = Pt(i, r, g);
335
- k.push(W[P[0]], W[P[1]]);
330
+ const w = de(i), y = ne(a), C = de(a) === a, P = await (u.isRTL == null ? void 0 : u.isRTL(c.floating)), E = p || (C || !m ? [ke(a)] : fn(a)), T = g !== "none";
331
+ !p && T && E.push(...pn(a, m, g, P));
332
+ const A = [a, ...E], D = await He(t, b), R = [];
333
+ let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
334
+ if (h && R.push(D[w]), f) {
335
+ const F = un(i, l, P);
336
+ R.push(D[F[0]], D[F[1]]);
336
337
  }
337
- if (A = [...A, {
338
+ if (N = [...N, {
338
339
  placement: i,
339
- overflows: k
340
- }], !k.every((P) => P <= 0)) {
341
- var I, y;
342
- const P = (((I = s.flip) == null ? void 0 : I.index) || 0) + 1, Y = L[P];
343
- if (Y)
340
+ overflows: R
341
+ }], !R.every((F) => F <= 0)) {
342
+ var M, k;
343
+ const F = (((M = r.flip) == null ? void 0 : M.index) || 0) + 1, Y = A[F];
344
+ if (Y && (!(f === "alignment" ? y !== ne(Y) : !1) || // We leave the current main axis only if every placement on that axis
345
+ // overflows the main axis.
346
+ N.every((v) => ne(v.placement) === y ? v.overflows[0] > 0 : !0)))
344
347
  return {
345
348
  data: {
346
- index: P,
347
- overflows: A
349
+ index: F,
350
+ overflows: N
348
351
  },
349
352
  reset: {
350
353
  placement: Y
351
354
  }
352
355
  };
353
- let V = (y = A.filter((H) => H.overflows[0] <= 0).sort((H, X) => H.overflows[1] - X.overflows[1])[0]) == null ? void 0 : y.placement;
354
- if (!V)
355
- switch (h) {
356
+ let x = (k = N.filter((s) => s.overflows[0] <= 0).sort((s, v) => s.overflows[1] - v.overflows[1])[0]) == null ? void 0 : k.placement;
357
+ if (!x)
358
+ switch (d) {
356
359
  case "bestFit": {
357
- var C;
358
- const H = (C = A.filter((X) => {
359
- if (R) {
360
- const _ = te(X.placement);
361
- return _ === E || // Create a bias to the `y` side axis due to horizontal
360
+ var V;
361
+ const s = (V = N.filter((v) => {
362
+ if (T) {
363
+ const H = ne(v.placement);
364
+ return H === y || // Create a bias to the `y` side axis due to horizontal
362
365
  // reading directions favoring greater width.
363
- _ === "y";
366
+ H === "y";
364
367
  }
365
368
  return !0;
366
- }).map((X) => [X.placement, X.overflows.filter((_) => _ > 0).reduce((_, mt) => _ + mt, 0)]).sort((X, _) => X[1] - _[1])[0]) == null ? void 0 : C[0];
367
- H && (V = H);
369
+ }).map((v) => [v.placement, v.overflows.filter((H) => H > 0).reduce((H, X) => H + X, 0)]).sort((v, H) => v[1] - H[1])[0]) == null ? void 0 : V[0];
370
+ s && (x = s);
368
371
  break;
369
372
  }
370
373
  case "initialPlacement":
371
- V = l;
374
+ x = a;
372
375
  break;
373
376
  }
374
- if (i !== V)
377
+ if (i !== x)
375
378
  return {
376
379
  reset: {
377
- placement: V
380
+ placement: x
378
381
  }
379
382
  };
380
383
  }
@@ -382,7 +385,7 @@ const St = (e) => ({
382
385
  }
383
386
  };
384
387
  };
385
- function Xe(e, t) {
388
+ function yt(e, t) {
386
389
  return {
387
390
  top: e.top - t.height,
388
391
  right: e.right - t.width,
@@ -390,10 +393,10 @@ function Xe(e, t) {
390
393
  left: e.left - t.width
391
394
  };
392
395
  }
393
- function _e(e) {
394
- return Lt.some((t) => e[t] >= 0);
396
+ function bt(e) {
397
+ return sn.some((t) => e[t] >= 0);
395
398
  }
396
- const Ht = function(e) {
399
+ const bn = function(e) {
397
400
  return e === void 0 && (e = {}), {
398
401
  name: "hide",
399
402
  options: e,
@@ -403,29 +406,29 @@ const Ht = function(e) {
403
406
  } = t, {
404
407
  strategy: o = "referenceHidden",
405
408
  ...i
406
- } = oe(e, t);
409
+ } = be(e, t);
407
410
  switch (o) {
408
411
  case "referenceHidden": {
409
- const s = await we(t, {
412
+ const r = await He(t, {
410
413
  ...i,
411
414
  elementContext: "reference"
412
- }), r = Xe(s, n.reference);
415
+ }), l = yt(r, n.reference);
413
416
  return {
414
417
  data: {
415
- referenceHiddenOffsets: r,
416
- referenceHidden: _e(r)
418
+ referenceHiddenOffsets: l,
419
+ referenceHidden: bt(l)
417
420
  }
418
421
  };
419
422
  }
420
423
  case "escaped": {
421
- const s = await we(t, {
424
+ const r = await He(t, {
422
425
  ...i,
423
426
  altBoundary: !0
424
- }), r = Xe(s, n.floating);
427
+ }), l = yt(r, n.floating);
425
428
  return {
426
429
  data: {
427
- escapedOffsets: r,
428
- escaped: _e(r)
430
+ escapedOffsets: l,
431
+ escaped: bt(l)
429
432
  }
430
433
  };
431
434
  }
@@ -434,35 +437,35 @@ const Ht = function(e) {
434
437
  }
435
438
  }
436
439
  };
437
- };
438
- async function Ft(e, t) {
440
+ }, xn = /* @__PURE__ */ new Set(["left", "top"]);
441
+ async function En(e, t) {
439
442
  const {
440
443
  placement: n,
441
444
  platform: o,
442
445
  elements: i
443
- } = e, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = J(n), l = ue(n), a = te(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, f = s && a ? -1 : 1, u = oe(t, e);
446
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), l = de(n), a = Me(n), u = ne(n) === "y", c = xn.has(l) ? -1 : 1, h = r && u ? -1 : 1, f = be(t, e);
444
447
  let {
445
- mainAxis: m,
446
- crossAxis: h,
447
- alignmentAxis: p
448
- } = typeof u == "number" ? {
449
- mainAxis: u,
448
+ mainAxis: p,
449
+ crossAxis: d,
450
+ alignmentAxis: g
451
+ } = typeof f == "number" ? {
452
+ mainAxis: f,
450
453
  crossAxis: 0,
451
454
  alignmentAxis: null
452
455
  } : {
453
- mainAxis: u.mainAxis || 0,
454
- crossAxis: u.crossAxis || 0,
455
- alignmentAxis: u.alignmentAxis
456
+ mainAxis: f.mainAxis || 0,
457
+ crossAxis: f.crossAxis || 0,
458
+ alignmentAxis: f.alignmentAxis
456
459
  };
457
- return l && typeof p == "number" && (h = l === "end" ? p * -1 : p), a ? {
458
- x: h * f,
459
- y: m * c
460
+ return a && typeof g == "number" && (d = a === "end" ? g * -1 : g), u ? {
461
+ x: d * h,
462
+ y: p * c
460
463
  } : {
461
- x: m * c,
462
- y: h * f
464
+ x: p * c,
465
+ y: d * h
463
466
  };
464
467
  }
465
- const Bt = function(e) {
468
+ const Tn = function(e) {
466
469
  return e === void 0 && (e = 0), {
467
470
  name: "offset",
468
471
  options: e,
@@ -470,21 +473,21 @@ const Bt = function(e) {
470
473
  var n, o;
471
474
  const {
472
475
  x: i,
473
- y: s,
474
- placement: r,
475
- middlewareData: l
476
- } = t, a = await Ft(t, e);
477
- return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
478
- x: i + a.x,
479
- y: s + a.y,
476
+ y: r,
477
+ placement: l,
478
+ middlewareData: a
479
+ } = t, u = await En(t, e);
480
+ return l === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
481
+ x: i + u.x,
482
+ y: r + u.y,
480
483
  data: {
481
- ...a,
482
- placement: r
484
+ ...u,
485
+ placement: l
483
486
  }
484
487
  };
485
488
  }
486
489
  };
487
- }, $t = function(e) {
490
+ }, Cn = function(e) {
488
491
  return e === void 0 && (e = {}), {
489
492
  name: "shift",
490
493
  options: e,
@@ -494,93 +497,96 @@ const Bt = function(e) {
494
497
  y: o,
495
498
  placement: i
496
499
  } = t, {
497
- mainAxis: s = !0,
498
- crossAxis: r = !1,
499
- limiter: l = {
500
- fn: (v) => {
500
+ mainAxis: r = !0,
501
+ crossAxis: l = !1,
502
+ limiter: a = {
503
+ fn: (b) => {
501
504
  let {
502
505
  x: w,
503
- y: E
504
- } = v;
506
+ y
507
+ } = b;
505
508
  return {
506
509
  x: w,
507
- y: E
510
+ y
508
511
  };
509
512
  }
510
513
  },
511
- ...a
512
- } = oe(e, t), c = {
514
+ ...u
515
+ } = be(e, t), c = {
513
516
  x: n,
514
517
  y: o
515
- }, f = await we(t, a), u = te(J(i)), m = it(u);
516
- let h = c[m], p = c[u];
517
- if (s) {
518
- const v = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", E = h + f[v], x = h - f[w];
519
- h = De(E, h, x);
520
- }
518
+ }, h = await He(t, u), f = ne(de(i)), p = It(f);
519
+ let d = c[p], g = c[f];
521
520
  if (r) {
522
- const v = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", E = p + f[v], x = p - f[w];
523
- p = De(E, p, x);
521
+ const b = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", y = d + h[b], C = d - h[w];
522
+ d = Ke(y, d, C);
523
+ }
524
+ if (l) {
525
+ const b = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", y = g + h[b], C = g - h[w];
526
+ g = Ke(y, g, C);
524
527
  }
525
- const d = l.fn({
528
+ const m = a.fn({
526
529
  ...t,
527
- [m]: h,
528
- [u]: p
530
+ [p]: d,
531
+ [f]: g
529
532
  });
530
533
  return {
531
- ...d,
534
+ ...m,
532
535
  data: {
533
- x: d.x - n,
534
- y: d.y - o,
536
+ x: m.x - n,
537
+ y: m.y - o,
535
538
  enabled: {
536
- [m]: s,
537
- [u]: r
539
+ [p]: r,
540
+ [f]: l
538
541
  }
539
542
  }
540
543
  };
541
544
  }
542
545
  };
543
546
  };
544
- function ye() {
547
+ function Be() {
545
548
  return typeof window < "u";
546
549
  }
547
- function ie(e) {
548
- return st(e) ? (e.nodeName || "").toLowerCase() : "#document";
550
+ function xe(e) {
551
+ return Vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
549
552
  }
550
- function M(e) {
553
+ function j(e) {
551
554
  var t;
552
555
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
553
556
  }
554
- function $(e) {
557
+ function Q(e) {
555
558
  var t;
556
- return (t = (st(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
559
+ return (t = (Vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
557
560
  }
558
- function st(e) {
559
- return ye() ? e instanceof Node || e instanceof M(e).Node : !1;
561
+ function Vt(e) {
562
+ return Be() ? e instanceof Node || e instanceof j(e).Node : !1;
560
563
  }
561
- function N(e) {
562
- return ye() ? e instanceof Element || e instanceof M(e).Element : !1;
564
+ function _(e) {
565
+ return Be() ? e instanceof Element || e instanceof j(e).Element : !1;
563
566
  }
564
- function B(e) {
565
- return ye() ? e instanceof HTMLElement || e instanceof M(e).HTMLElement : !1;
567
+ function G(e) {
568
+ return Be() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
566
569
  }
567
- function je(e) {
568
- return !ye() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof M(e).ShadowRoot;
570
+ function xt(e) {
571
+ return !Be() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof j(e).ShadowRoot;
569
572
  }
570
- function fe(e) {
573
+ const Ln = /* @__PURE__ */ new Set(["inline", "contents"]);
574
+ function Se(e) {
571
575
  const {
572
576
  overflow: t,
573
577
  overflowX: n,
574
578
  overflowY: o,
575
579
  display: i
576
- } = S(e);
577
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
580
+ } = z(e);
581
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Ln.has(i);
578
582
  }
579
- function Vt(e) {
580
- return ["table", "td", "th"].includes(ie(e));
583
+ const Pn = /* @__PURE__ */ new Set(["table", "td", "th"]);
584
+ function On(e) {
585
+ return Pn.has(xe(e));
581
586
  }
582
- function xe(e) {
583
- return [":popover-open", ":modal"].some((t) => {
587
+ const Mn = [":popover-open", ":modal"];
588
+ function Ie(e) {
589
+ return Mn.some((t) => {
584
590
  try {
585
591
  return e.matches(t);
586
592
  } catch {
@@ -588,32 +594,34 @@ function xe(e) {
588
594
  }
589
595
  });
590
596
  }
591
- function Be(e) {
592
- const t = $e(), n = N(e) ? S(e) : e;
593
- return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
597
+ const Sn = ["transform", "translate", "scale", "rotate", "perspective"], An = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Nn = ["paint", "layout", "strict", "content"];
598
+ function nt(e) {
599
+ const t = ot(), n = _(e) ? z(e) : e;
600
+ return Sn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || An.some((o) => (n.willChange || "").includes(o)) || Nn.some((o) => (n.contain || "").includes(o));
594
601
  }
595
- function Wt(e) {
596
- let t = K(e);
597
- for (; B(t) && !ne(t); ) {
598
- if (Be(t))
602
+ function Dn(e) {
603
+ let t = oe(e);
604
+ for (; G(t) && !ye(t); ) {
605
+ if (nt(t))
599
606
  return t;
600
- if (xe(t))
607
+ if (Ie(t))
601
608
  return null;
602
- t = K(t);
609
+ t = oe(t);
603
610
  }
604
611
  return null;
605
612
  }
606
- function $e() {
613
+ function ot() {
607
614
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
608
615
  }
609
- function ne(e) {
610
- return ["html", "body", "#document"].includes(ie(e));
616
+ const Rn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
617
+ function ye(e) {
618
+ return Rn.has(xe(e));
611
619
  }
612
- function S(e) {
613
- return M(e).getComputedStyle(e);
620
+ function z(e) {
621
+ return j(e).getComputedStyle(e);
614
622
  }
615
- function be(e) {
616
- return N(e) ? {
623
+ function We(e) {
624
+ return _(e) ? {
617
625
  scrollLeft: e.scrollLeft,
618
626
  scrollTop: e.scrollTop
619
627
  } : {
@@ -621,186 +629,189 @@ function be(e) {
621
629
  scrollTop: e.scrollY
622
630
  };
623
631
  }
624
- function K(e) {
625
- if (ie(e) === "html")
632
+ function oe(e) {
633
+ if (xe(e) === "html")
626
634
  return e;
627
635
  const t = (
628
636
  // Step into the shadow DOM of the parent of a slotted node.
629
637
  e.assignedSlot || // DOM Element detected.
630
638
  e.parentNode || // ShadowRoot detected.
631
- je(e) && e.host || // Fallback.
632
- $(e)
639
+ xt(e) && e.host || // Fallback.
640
+ Q(e)
633
641
  );
634
- return je(t) ? t.host : t;
642
+ return xt(t) ? t.host : t;
635
643
  }
636
- function lt(e) {
637
- const t = K(e);
638
- return ne(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : B(t) && fe(t) ? t : lt(t);
644
+ function $t(e) {
645
+ const t = oe(e);
646
+ return ye(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : G(t) && Se(t) ? t : $t(t);
639
647
  }
640
- function Q(e, t, n) {
648
+ function Ce(e, t, n) {
641
649
  var o;
642
650
  t === void 0 && (t = []), n === void 0 && (n = !0);
643
- const i = lt(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = M(i);
644
- if (s) {
645
- const l = Se(r);
646
- return t.concat(r, r.visualViewport || [], fe(i) ? i : [], l && n ? Q(l) : []);
651
+ const i = $t(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = j(i);
652
+ if (r) {
653
+ const a = Je(l);
654
+ return t.concat(l, l.visualViewport || [], Se(i) ? i : [], a && n ? Ce(a) : []);
647
655
  }
648
- return t.concat(i, Q(i, [], n));
656
+ return t.concat(i, Ce(i, [], n));
649
657
  }
650
- function Se(e) {
658
+ function Je(e) {
651
659
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
652
660
  }
653
- function ct(e) {
654
- const t = S(e);
661
+ function Xt(e) {
662
+ const t = z(e);
655
663
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
656
- const i = B(e), s = i ? e.offsetWidth : n, r = i ? e.offsetHeight : o, l = pe(n) !== s || pe(o) !== r;
657
- return l && (n = s, o = r), {
664
+ const i = G(e), r = i ? e.offsetWidth : n, l = i ? e.offsetHeight : o, a = Re(n) !== r || Re(o) !== l;
665
+ return a && (n = r, o = l), {
658
666
  width: n,
659
667
  height: o,
660
- $: l
668
+ $: a
661
669
  };
662
670
  }
663
- function Ve(e) {
664
- return N(e) ? e : e.contextElement;
671
+ function it(e) {
672
+ return _(e) ? e : e.contextElement;
665
673
  }
666
- function z(e) {
667
- const t = Ve(e);
668
- if (!B(t))
669
- return F(1);
674
+ function ve(e) {
675
+ const t = it(e);
676
+ if (!G(t))
677
+ return K(1);
670
678
  const n = t.getBoundingClientRect(), {
671
679
  width: o,
672
680
  height: i,
673
- $: s
674
- } = ct(t);
675
- let r = (s ? pe(n.width) : n.width) / o, l = (s ? pe(n.height) : n.height) / i;
676
- return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
677
- x: r,
678
- y: l
681
+ $: r
682
+ } = Xt(t);
683
+ let l = (r ? Re(n.width) : n.width) / o, a = (r ? Re(n.height) : n.height) / i;
684
+ return (!l || !Number.isFinite(l)) && (l = 1), (!a || !Number.isFinite(a)) && (a = 1), {
685
+ x: l,
686
+ y: a
679
687
  };
680
688
  }
681
- const It = /* @__PURE__ */ F(0);
682
- function at(e) {
683
- const t = M(e);
684
- return !$e() || !t.visualViewport ? It : {
689
+ const kn = /* @__PURE__ */ K(0);
690
+ function Yt(e) {
691
+ const t = j(e);
692
+ return !ot() || !t.visualViewport ? kn : {
685
693
  x: t.visualViewport.offsetLeft,
686
694
  y: t.visualViewport.offsetTop
687
695
  };
688
696
  }
689
- function Yt(e, t, n) {
690
- return t === void 0 && (t = !1), !n || t && n !== M(e) ? !1 : t;
697
+ function Fn(e, t, n) {
698
+ return t === void 0 && (t = !1), !n || t && n !== j(e) ? !1 : t;
691
699
  }
692
- function Z(e, t, n, o) {
700
+ function he(e, t, n, o) {
693
701
  t === void 0 && (t = !1), n === void 0 && (n = !1);
694
- const i = e.getBoundingClientRect(), s = Ve(e);
695
- let r = F(1);
696
- t && (o ? N(o) && (r = z(o)) : r = z(e));
697
- const l = Yt(s, n, o) ? at(s) : F(0);
698
- let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, f = i.width / r.x, u = i.height / r.y;
699
- if (s) {
700
- const m = M(s), h = o && N(o) ? M(o) : o;
701
- let p = m, d = Se(p);
702
- for (; d && o && h !== p; ) {
703
- const v = z(d), w = d.getBoundingClientRect(), E = S(d), x = w.left + (d.clientLeft + parseFloat(E.paddingLeft)) * v.x, g = w.top + (d.clientTop + parseFloat(E.paddingTop)) * v.y;
704
- a *= v.x, c *= v.y, f *= v.x, u *= v.y, a += x, c += g, p = M(d), d = Se(p);
702
+ const i = e.getBoundingClientRect(), r = it(e);
703
+ let l = K(1);
704
+ t && (o ? _(o) && (l = ve(o)) : l = ve(e));
705
+ const a = Fn(r, n, o) ? Yt(r) : K(0);
706
+ let u = (i.left + a.x) / l.x, c = (i.top + a.y) / l.y, h = i.width / l.x, f = i.height / l.y;
707
+ if (r) {
708
+ const p = j(r), d = o && _(o) ? j(o) : o;
709
+ let g = p, m = Je(g);
710
+ for (; m && o && d !== g; ) {
711
+ const b = ve(m), w = m.getBoundingClientRect(), y = z(m), C = w.left + (m.clientLeft + parseFloat(y.paddingLeft)) * b.x, P = w.top + (m.clientTop + parseFloat(y.paddingTop)) * b.y;
712
+ u *= b.x, c *= b.y, h *= b.x, f *= b.y, u += C, c += P, g = j(m), m = Je(g);
705
713
  }
706
714
  }
707
- return ge({
708
- width: f,
709
- height: u,
710
- x: a,
715
+ return Fe({
716
+ width: h,
717
+ height: f,
718
+ x: u,
711
719
  y: c
712
720
  });
713
721
  }
714
- function We(e, t) {
715
- const n = be(e).scrollLeft;
716
- return t ? t.left + n : Z($(e)).left + n;
722
+ function Ve(e, t) {
723
+ const n = We(e).scrollLeft;
724
+ return t ? t.left + n : he(Q(e)).left + n;
717
725
  }
718
- function ut(e, t, n) {
719
- n === void 0 && (n = !1);
720
- const o = e.getBoundingClientRect(), i = o.left + t.scrollLeft - (n ? 0 : (
721
- // RTL <body> scrollbar.
722
- We(e, o)
723
- )), s = o.top + t.scrollTop;
726
+ function jt(e, t) {
727
+ const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ve(e, n), i = n.top + t.scrollTop;
724
728
  return {
725
- x: i,
726
- y: s
729
+ x: o,
730
+ y: i
727
731
  };
728
732
  }
729
- function Xt(e) {
733
+ function Hn(e) {
730
734
  let {
731
735
  elements: t,
732
736
  rect: n,
733
737
  offsetParent: o,
734
738
  strategy: i
735
739
  } = e;
736
- const s = i === "fixed", r = $(o), l = t ? xe(t.floating) : !1;
737
- if (o === r || l && s)
740
+ const r = i === "fixed", l = Q(o), a = t ? Ie(t.floating) : !1;
741
+ if (o === l || a && r)
738
742
  return n;
739
- let a = {
743
+ let u = {
740
744
  scrollLeft: 0,
741
745
  scrollTop: 0
742
- }, c = F(1);
743
- const f = F(0), u = B(o);
744
- if ((u || !u && !s) && ((ie(o) !== "body" || fe(r)) && (a = be(o)), B(o))) {
745
- const h = Z(o);
746
- c = z(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
746
+ }, c = K(1);
747
+ const h = K(0), f = G(o);
748
+ if ((f || !f && !r) && ((xe(o) !== "body" || Se(l)) && (u = We(o)), G(o))) {
749
+ const d = he(o);
750
+ c = ve(o), h.x = d.x + o.clientLeft, h.y = d.y + o.clientTop;
747
751
  }
748
- const m = r && !u && !s ? ut(r, a, !0) : F(0);
752
+ const p = l && !f && !r ? jt(l, u) : K(0);
749
753
  return {
750
754
  width: n.width * c.x,
751
755
  height: n.height * c.y,
752
- x: n.x * c.x - a.scrollLeft * c.x + f.x + m.x,
753
- y: n.y * c.y - a.scrollTop * c.y + f.y + m.y
756
+ x: n.x * c.x - u.scrollLeft * c.x + h.x + p.x,
757
+ y: n.y * c.y - u.scrollTop * c.y + h.y + p.y
754
758
  };
755
759
  }
756
- function _t(e) {
760
+ function Bn(e) {
757
761
  return Array.from(e.getClientRects());
758
762
  }
759
- function jt(e) {
760
- const t = $(e), n = be(e), o = e.ownerDocument.body, i = G(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = G(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
761
- let r = -n.scrollLeft + We(e);
762
- const l = -n.scrollTop;
763
- return S(o).direction === "rtl" && (r += G(t.clientWidth, o.clientWidth) - i), {
763
+ function In(e) {
764
+ const t = Q(e), n = We(e), o = e.ownerDocument.body, i = fe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = fe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
765
+ let l = -n.scrollLeft + Ve(e);
766
+ const a = -n.scrollTop;
767
+ return z(o).direction === "rtl" && (l += fe(t.clientWidth, o.clientWidth) - i), {
764
768
  width: i,
765
- height: s,
766
- x: r,
767
- y: l
768
- };
769
- }
770
- function Kt(e, t) {
771
- const n = M(e), o = $(e), i = n.visualViewport;
772
- let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
773
- if (i) {
774
- s = i.width, r = i.height;
775
- const c = $e();
776
- (!c || c && t === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
777
- }
778
- return {
779
- width: s,
780
769
  height: r,
781
770
  x: l,
782
771
  y: a
783
772
  };
784
773
  }
785
- function Ut(e, t) {
786
- const n = Z(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, s = B(e) ? z(e) : F(1), r = e.clientWidth * s.x, l = e.clientHeight * s.y, a = i * s.x, c = o * s.y;
774
+ const Et = 25;
775
+ function Wn(e, t) {
776
+ const n = j(e), o = Q(e), i = n.visualViewport;
777
+ let r = o.clientWidth, l = o.clientHeight, a = 0, u = 0;
778
+ if (i) {
779
+ r = i.width, l = i.height;
780
+ const h = ot();
781
+ (!h || h && t === "fixed") && (a = i.offsetLeft, u = i.offsetTop);
782
+ }
783
+ const c = Ve(o);
784
+ if (c <= 0) {
785
+ const h = o.ownerDocument, f = h.body, p = getComputedStyle(f), d = h.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, g = Math.abs(o.clientWidth - f.clientWidth - d);
786
+ g <= Et && (r -= g);
787
+ } else c <= Et && (r += c);
787
788
  return {
788
789
  width: r,
789
790
  height: l,
790
791
  x: a,
792
+ y: u
793
+ };
794
+ }
795
+ const Vn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
796
+ function $n(e, t) {
797
+ const n = he(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = G(e) ? ve(e) : K(1), l = e.clientWidth * r.x, a = e.clientHeight * r.y, u = i * r.x, c = o * r.y;
798
+ return {
799
+ width: l,
800
+ height: a,
801
+ x: u,
791
802
  y: c
792
803
  };
793
804
  }
794
- function Ke(e, t, n) {
805
+ function Tt(e, t, n) {
795
806
  let o;
796
807
  if (t === "viewport")
797
- o = Kt(e, n);
808
+ o = Wn(e, n);
798
809
  else if (t === "document")
799
- o = jt($(e));
800
- else if (N(t))
801
- o = Ut(t, n);
810
+ o = In(Q(e));
811
+ else if (_(t))
812
+ o = $n(t, n);
802
813
  else {
803
- const i = at(e);
814
+ const i = Yt(e);
804
815
  o = {
805
816
  x: t.x - i.x,
806
817
  y: t.y - i.y,
@@ -808,106 +819,110 @@ function Ke(e, t, n) {
808
819
  height: t.height
809
820
  };
810
821
  }
811
- return ge(o);
822
+ return Fe(o);
812
823
  }
813
- function ft(e, t) {
814
- const n = K(e);
815
- return n === t || !N(n) || ne(n) ? !1 : S(n).position === "fixed" || ft(n, t);
824
+ function _t(e, t) {
825
+ const n = oe(e);
826
+ return n === t || !_(n) || ye(n) ? !1 : z(n).position === "fixed" || _t(n, t);
816
827
  }
817
- function qt(e, t) {
828
+ function Xn(e, t) {
818
829
  const n = t.get(e);
819
830
  if (n)
820
831
  return n;
821
- let o = Q(e, [], !1).filter((l) => N(l) && ie(l) !== "body"), i = null;
822
- const s = S(e).position === "fixed";
823
- let r = s ? K(e) : e;
824
- for (; N(r) && !ne(r); ) {
825
- const l = S(r), a = Be(r);
826
- !a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || fe(r) && !a && ft(e, r)) ? o = o.filter((f) => f !== r) : i = l, r = K(r);
832
+ let o = Ce(e, [], !1).filter((a) => _(a) && xe(a) !== "body"), i = null;
833
+ const r = z(e).position === "fixed";
834
+ let l = r ? oe(e) : e;
835
+ for (; _(l) && !ye(l); ) {
836
+ const a = z(l), u = nt(l);
837
+ !u && a.position === "fixed" && (i = null), (r ? !u && !i : !u && a.position === "static" && !!i && Vn.has(i.position) || Se(l) && !u && _t(e, l)) ? o = o.filter((h) => h !== l) : i = a, l = oe(l);
827
838
  }
828
839
  return t.set(e, o), o;
829
840
  }
830
- function Gt(e) {
841
+ function Yn(e) {
831
842
  let {
832
843
  element: t,
833
844
  boundary: n,
834
845
  rootBoundary: o,
835
846
  strategy: i
836
847
  } = e;
837
- const r = [...n === "clippingAncestors" ? xe(t) ? [] : qt(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, f) => {
838
- const u = Ke(t, f, i);
839
- return c.top = G(u.top, c.top), c.right = ee(u.right, c.right), c.bottom = ee(u.bottom, c.bottom), c.left = G(u.left, c.left), c;
840
- }, Ke(t, l, i));
848
+ const l = [...n === "clippingAncestors" ? Ie(t) ? [] : Xn(t, this._c) : [].concat(n), o], a = l[0], u = l.reduce((c, h) => {
849
+ const f = Tt(t, h, i);
850
+ return c.top = fe(f.top, c.top), c.right = we(f.right, c.right), c.bottom = we(f.bottom, c.bottom), c.left = fe(f.left, c.left), c;
851
+ }, Tt(t, a, i));
841
852
  return {
842
- width: a.right - a.left,
843
- height: a.bottom - a.top,
844
- x: a.left,
845
- y: a.top
853
+ width: u.right - u.left,
854
+ height: u.bottom - u.top,
855
+ x: u.left,
856
+ y: u.top
846
857
  };
847
858
  }
848
- function Jt(e) {
859
+ function jn(e) {
849
860
  const {
850
861
  width: t,
851
862
  height: n
852
- } = ct(e);
863
+ } = Xt(e);
853
864
  return {
854
865
  width: t,
855
866
  height: n
856
867
  };
857
868
  }
858
- function Qt(e, t, n) {
859
- const o = B(t), i = $(t), s = n === "fixed", r = Z(e, !0, s, t);
860
- let l = {
869
+ function _n(e, t, n) {
870
+ const o = G(t), i = Q(t), r = n === "fixed", l = he(e, !0, r, t);
871
+ let a = {
861
872
  scrollLeft: 0,
862
873
  scrollTop: 0
863
874
  };
864
- const a = F(0);
865
- if (o || !o && !s)
866
- if ((ie(t) !== "body" || fe(i)) && (l = be(t)), o) {
867
- const m = Z(t, !0, s, t);
868
- a.x = m.x + t.clientLeft, a.y = m.y + t.clientTop;
869
- } else i && (a.x = We(i));
870
- const c = i && !o && !s ? ut(i, l) : F(0), f = r.left + l.scrollLeft - a.x - c.x, u = r.top + l.scrollTop - a.y - c.y;
875
+ const u = K(0);
876
+ function c() {
877
+ u.x = Ve(i);
878
+ }
879
+ if (o || !o && !r)
880
+ if ((xe(t) !== "body" || Se(i)) && (a = We(t)), o) {
881
+ const d = he(t, !0, r, t);
882
+ u.x = d.x + t.clientLeft, u.y = d.y + t.clientTop;
883
+ } else i && c();
884
+ r && !o && i && c();
885
+ const h = i && !o && !r ? jt(i, a) : K(0), f = l.left + a.scrollLeft - u.x - h.x, p = l.top + a.scrollTop - u.y - h.y;
871
886
  return {
872
887
  x: f,
873
- y: u,
874
- width: r.width,
875
- height: r.height
888
+ y: p,
889
+ width: l.width,
890
+ height: l.height
876
891
  };
877
892
  }
878
- function Re(e) {
879
- return S(e).position === "static";
893
+ function _e(e) {
894
+ return z(e).position === "static";
880
895
  }
881
- function Ue(e, t) {
882
- if (!B(e) || S(e).position === "fixed")
896
+ function Ct(e, t) {
897
+ if (!G(e) || z(e).position === "fixed")
883
898
  return null;
884
899
  if (t)
885
900
  return t(e);
886
901
  let n = e.offsetParent;
887
- return $(e) === n && (n = n.ownerDocument.body), n;
902
+ return Q(e) === n && (n = n.ownerDocument.body), n;
888
903
  }
889
- function dt(e, t) {
890
- const n = M(e);
891
- if (xe(e))
904
+ function zt(e, t) {
905
+ const n = j(e);
906
+ if (Ie(e))
892
907
  return n;
893
- if (!B(e)) {
894
- let i = K(e);
895
- for (; i && !ne(i); ) {
896
- if (N(i) && !Re(i))
908
+ if (!G(e)) {
909
+ let i = oe(e);
910
+ for (; i && !ye(i); ) {
911
+ if (_(i) && !_e(i))
897
912
  return i;
898
- i = K(i);
913
+ i = oe(i);
899
914
  }
900
915
  return n;
901
916
  }
902
- let o = Ue(e, t);
903
- for (; o && Vt(o) && Re(o); )
904
- o = Ue(o, t);
905
- return o && ne(o) && Re(o) && !Be(o) ? n : o || Wt(e) || n;
917
+ let o = Ct(e, t);
918
+ for (; o && On(o) && _e(o); )
919
+ o = Ct(o, t);
920
+ return o && ye(o) && _e(o) && !nt(o) ? n : o || Dn(e) || n;
906
921
  }
907
- const Zt = async function(e) {
908
- const t = this.getOffsetParent || dt, n = this.getDimensions, o = await n(e.floating);
922
+ const zn = async function(e) {
923
+ const t = this.getOffsetParent || zt, n = this.getDimensions, o = await n(e.floating);
909
924
  return {
910
- reference: Qt(e.reference, await t(e.floating), e.strategy),
925
+ reference: _n(e.reference, await t(e.floating), e.strategy),
911
926
  floating: {
912
927
  x: 0,
913
928
  y: 0,
@@ -916,348 +931,734 @@ const Zt = async function(e) {
916
931
  }
917
932
  };
918
933
  };
919
- function zt(e) {
920
- return S(e).direction === "rtl";
921
- }
922
- const en = {
923
- convertOffsetParentRelativeRectToViewportRelativeRect: Xt,
924
- getDocumentElement: $,
925
- getClippingRect: Gt,
926
- getOffsetParent: dt,
927
- getElementRects: Zt,
928
- getClientRects: _t,
929
- getDimensions: Jt,
930
- getScale: z,
931
- isElement: N,
932
- isRTL: zt
934
+ function Un(e) {
935
+ return z(e).direction === "rtl";
936
+ }
937
+ const qn = {
938
+ convertOffsetParentRelativeRectToViewportRelativeRect: Hn,
939
+ getDocumentElement: Q,
940
+ getClippingRect: Yn,
941
+ getOffsetParent: zt,
942
+ getElementRects: zn,
943
+ getClientRects: Bn,
944
+ getDimensions: jn,
945
+ getScale: ve,
946
+ isElement: _,
947
+ isRTL: Un
933
948
  };
934
- function ht(e, t) {
949
+ function Ut(e, t) {
935
950
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
936
951
  }
937
- function tn(e, t) {
952
+ function Kn(e, t) {
938
953
  let n = null, o;
939
- const i = $(e);
940
- function s() {
941
- var l;
942
- clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
954
+ const i = Q(e);
955
+ function r() {
956
+ var a;
957
+ clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
943
958
  }
944
- function r(l, a) {
945
- l === void 0 && (l = !1), a === void 0 && (a = 1), s();
959
+ function l(a, u) {
960
+ a === void 0 && (a = !1), u === void 0 && (u = 1), r();
946
961
  const c = e.getBoundingClientRect(), {
947
- left: f,
948
- top: u,
949
- width: m,
950
- height: h
962
+ left: h,
963
+ top: f,
964
+ width: p,
965
+ height: d
951
966
  } = c;
952
- if (l || t(), !m || !h)
967
+ if (a || t(), !p || !d)
953
968
  return;
954
- const p = he(u), d = he(i.clientWidth - (f + m)), v = he(i.clientHeight - (u + h)), w = he(f), x = {
955
- rootMargin: -p + "px " + -d + "px " + -v + "px " + -w + "px",
956
- threshold: G(0, ee(1, a)) || 1
969
+ const g = De(f), m = De(i.clientWidth - (h + p)), b = De(i.clientHeight - (f + d)), w = De(h), C = {
970
+ rootMargin: -g + "px " + -m + "px " + -b + "px " + -w + "px",
971
+ threshold: fe(0, we(1, u)) || 1
957
972
  };
958
- let g = !0;
959
- function b(R) {
960
- const L = R[0].intersectionRatio;
961
- if (L !== a) {
962
- if (!g)
963
- return r();
964
- L ? r(!1, L) : o = setTimeout(() => {
965
- r(!1, 1e-7);
973
+ let P = !0;
974
+ function E(T) {
975
+ const A = T[0].intersectionRatio;
976
+ if (A !== u) {
977
+ if (!P)
978
+ return l();
979
+ A ? l(!1, A) : o = setTimeout(() => {
980
+ l(!1, 1e-7);
966
981
  }, 1e3);
967
982
  }
968
- L === 1 && !ht(c, e.getBoundingClientRect()) && r(), g = !1;
983
+ A === 1 && !Ut(c, e.getBoundingClientRect()) && l(), P = !1;
969
984
  }
970
985
  try {
971
- n = new IntersectionObserver(b, {
972
- ...x,
986
+ n = new IntersectionObserver(E, {
987
+ ...C,
973
988
  // Handle <iframe>s
974
989
  root: i.ownerDocument
975
990
  });
976
991
  } catch {
977
- n = new IntersectionObserver(b, x);
992
+ n = new IntersectionObserver(E, C);
978
993
  }
979
994
  n.observe(e);
980
995
  }
981
- return r(!0), s;
996
+ return l(!0), r;
982
997
  }
983
- function vt(e, t, n, o) {
998
+ function Gn(e, t, n, o) {
984
999
  o === void 0 && (o = {});
985
1000
  const {
986
1001
  ancestorScroll: i = !0,
987
- ancestorResize: s = !0,
988
- elementResize: r = typeof ResizeObserver == "function",
989
- layoutShift: l = typeof IntersectionObserver == "function",
990
- animationFrame: a = !1
991
- } = o, c = Ve(e), f = i || s ? [...c ? Q(c) : [], ...Q(t)] : [];
992
- f.forEach((w) => {
1002
+ ancestorResize: r = !0,
1003
+ elementResize: l = typeof ResizeObserver == "function",
1004
+ layoutShift: a = typeof IntersectionObserver == "function",
1005
+ animationFrame: u = !1
1006
+ } = o, c = it(e), h = i || r ? [...c ? Ce(c) : [], ...Ce(t)] : [];
1007
+ h.forEach((w) => {
993
1008
  i && w.addEventListener("scroll", n, {
994
1009
  passive: !0
995
- }), s && w.addEventListener("resize", n);
1010
+ }), r && w.addEventListener("resize", n);
996
1011
  });
997
- const u = c && l ? tn(c, n) : null;
998
- let m = -1, h = null;
999
- r && (h = new ResizeObserver((w) => {
1000
- let [E] = w;
1001
- E && E.target === c && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1002
- var x;
1003
- (x = h) == null || x.observe(t);
1012
+ const f = c && a ? Kn(c, n) : null;
1013
+ let p = -1, d = null;
1014
+ l && (d = new ResizeObserver((w) => {
1015
+ let [y] = w;
1016
+ y && y.target === c && d && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1017
+ var C;
1018
+ (C = d) == null || C.observe(t);
1004
1019
  })), n();
1005
- }), c && !a && h.observe(c), h.observe(t));
1006
- let p, d = a ? Z(e) : null;
1007
- a && v();
1008
- function v() {
1009
- const w = Z(e);
1010
- d && !ht(d, w) && n(), d = w, p = requestAnimationFrame(v);
1020
+ }), c && !u && d.observe(c), d.observe(t));
1021
+ let g, m = u ? he(e) : null;
1022
+ u && b();
1023
+ function b() {
1024
+ const w = he(e);
1025
+ m && !Ut(m, w) && n(), m = w, g = requestAnimationFrame(b);
1011
1026
  }
1012
1027
  return n(), () => {
1013
1028
  var w;
1014
- f.forEach((E) => {
1015
- i && E.removeEventListener("scroll", n), s && E.removeEventListener("resize", n);
1016
- }), u == null || u(), (w = h) == null || w.disconnect(), h = null, a && cancelAnimationFrame(p);
1029
+ h.forEach((y) => {
1030
+ i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
1031
+ }), f == null || f(), (w = d) == null || w.disconnect(), d = null, u && cancelAnimationFrame(g);
1017
1032
  };
1018
1033
  }
1019
- const Rn = Bt, Pn = $t, Cn = kt, Mn = Ht, nn = St, on = (e, t, n) => {
1034
+ const Oo = Tn, Mo = Cn, So = yn, Ao = bn, Jn = wn, Qn = (e, t, n) => {
1020
1035
  const o = /* @__PURE__ */ new Map(), i = {
1021
- platform: en,
1036
+ platform: qn,
1022
1037
  ...n
1023
- }, s = {
1038
+ }, r = {
1024
1039
  ...i.platform,
1025
1040
  _c: o
1026
1041
  };
1027
- return Nt(e, t, {
1042
+ return gn(e, t, {
1028
1043
  ...i,
1029
- platform: s
1044
+ platform: r
1030
1045
  });
1031
1046
  };
1032
- function An(e, t, n = {}) {
1047
+ function Zn(e) {
1048
+ return {
1049
+ name: "arrow",
1050
+ options: e,
1051
+ fn(t) {
1052
+ const n = S(e.element);
1053
+ return n == null ? {} : Jn({ element: n, padding: e.padding }).fn(t);
1054
+ }
1055
+ };
1056
+ }
1057
+ function Lt(e, t, n = {}) {
1033
1058
  const {
1034
1059
  transform: o = !0,
1035
1060
  middlewares: i,
1036
- whileElementsMounted: s,
1037
- open: r = j(!1),
1038
- setOpen: l = (x) => {
1039
- r.value = x;
1040
- }
1041
- } = n, a = O(() => T(n.placement) ?? "bottom"), c = O(() => T(n.strategy) ?? "absolute"), f = j(0), u = j(0), m = j(a.value), h = j(c.value), p = Me({}), d = j(!1), v = async () => {
1061
+ autoUpdate: r = !0,
1062
+ open: l = U(!1)
1063
+ } = n, a = (E) => {
1064
+ l.value = E;
1065
+ }, u = I(() => S(n.placement) ?? "bottom"), c = I(() => S(n.strategy) ?? "absolute"), h = U(0), f = U(0), p = U(u.value), d = U(c.value), g = qe({}), m = U(!1), b = U(null), w = I(() => {
1066
+ const E = i || [];
1067
+ return b.value && !E.some((A) => A.name === "arrow") ? [...E, Zn({ element: b })] : E;
1068
+ }), y = async () => {
1042
1069
  if (!e.value || !t.value) return;
1043
- const x = await on(e.value, t.value, {
1044
- placement: a.value,
1070
+ const E = await Qn(e.value, t.value, {
1071
+ placement: u.value,
1045
1072
  strategy: c.value,
1046
- middleware: i
1073
+ middleware: w.value
1047
1074
  });
1048
- f.value = x.x, u.value = x.y, m.value = x.placement, h.value = x.strategy, p.value = x.middlewareData, d.value = r.value;
1075
+ h.value = E.x, f.value = E.y, p.value = E.placement, d.value = E.strategy, g.value = E.middlewareData, m.value = l.value;
1049
1076
  };
1050
- ve([a, c], () => {
1051
- r.value && v();
1077
+ pe([u, c], () => {
1078
+ l.value && y();
1052
1079
  });
1053
- let w;
1054
- ve(
1055
- [e, t, r],
1056
- ([x, g, b]) => {
1057
- !b || !x || !g || (s ? w = s(x, g, v) : w = vt(x, g, v), q(() => {
1058
- w == null || w(), w = void 0;
1080
+ let C;
1081
+ pe(
1082
+ [e, t, l],
1083
+ ([E, T, A]) => {
1084
+ !A || !E || !T || (r && (C = Gn(
1085
+ E,
1086
+ T,
1087
+ y,
1088
+ typeof r == "object" ? r : void 0
1089
+ )), ue(() => {
1090
+ C == null || C(), C = void 0;
1059
1091
  }));
1060
1092
  },
1061
1093
  { immediate: !0 }
1062
- ), ae(() => w == null ? void 0 : w()), ve(r, (x) => {
1063
- x || (d.value = !1);
1094
+ ), ge(() => C == null ? void 0 : C()), pe(l, (E) => {
1095
+ E || (m.value = !1);
1064
1096
  });
1065
- const E = O(() => {
1066
- const x = {
1067
- position: h.value,
1068
- left: "0",
1069
- top: "0"
1070
- };
1071
- if (!d.value || !t.value)
1072
- return x;
1073
- const g = qe(t.value, f.value), b = qe(t.value, u.value);
1074
- return T(o) ? {
1075
- ...x,
1076
- transform: `translate(${g}px, ${b}px)`,
1077
- ...pt(t.value) >= 1.5 && {
1078
- willChange: "transform"
1079
- }
1080
- } : {
1081
- ...x,
1082
- left: `${g}px`,
1083
- top: `${b}px`
1084
- };
1097
+ const P = U({
1098
+ position: c.value,
1099
+ left: "0",
1100
+ top: "0"
1085
1101
  });
1086
- return {
1087
- x: f,
1088
- y: u,
1089
- strategy: h,
1090
- placement: m,
1091
- middlewareData: p,
1092
- isPositioned: d,
1093
- floatingStyles: E,
1094
- update: v,
1102
+ return pe(
1103
+ [h, f, () => S(o)],
1104
+ ([E, T, A]) => {
1105
+ const D = t.value;
1106
+ if (!D) return;
1107
+ const R = {
1108
+ position: d.value,
1109
+ left: "0",
1110
+ top: "0"
1111
+ }, N = Pt(D, E), M = Pt(D, T);
1112
+ A ? P.value = {
1113
+ ...R,
1114
+ transform: `translate(${N}px, ${M}px)`,
1115
+ ...qt(D) >= 1.5 && {
1116
+ "will-change": "transform"
1117
+ }
1118
+ } : P.value = {
1119
+ ...R,
1120
+ left: `${N}px`,
1121
+ top: `${M}px`
1122
+ };
1123
+ },
1124
+ { immediate: !0 }
1125
+ ), {
1126
+ x: h,
1127
+ y: f,
1128
+ strategy: d,
1129
+ placement: p,
1130
+ middlewareData: g,
1131
+ isPositioned: m,
1132
+ floatingStyles: P,
1133
+ update: y,
1095
1134
  refs: {
1096
1135
  anchorEl: e,
1097
- floatingEl: t
1136
+ floatingEl: t,
1137
+ arrowEl: b
1098
1138
  },
1099
- open: r,
1100
- setOpen: l
1139
+ open: l,
1140
+ setOpen: a
1101
1141
  };
1102
1142
  }
1103
- function qe(e, t) {
1104
- const n = pt(e);
1143
+ function Pt(e, t) {
1144
+ const n = qt(e);
1105
1145
  return Math.round(t * n) / n;
1106
1146
  }
1107
- function pt(e) {
1147
+ function qt(e) {
1108
1148
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1109
1149
  }
1110
- function Dn(e, t, n, o = {}) {
1111
- return vt(e, t, n, o);
1112
- }
1113
- function Nn(e, t = {}) {
1114
- const { middlewareData: n, placement: o } = e, { offset: i = "-4px" } = t, s = O(() => {
1115
- var a;
1116
- return ((a = n.value.arrow) == null ? void 0 : a.x) ?? 0;
1117
- }), r = O(() => {
1118
- var a;
1119
- return ((a = n.value.arrow) == null ? void 0 : a.y) ?? 0;
1120
- }), l = O(() => {
1121
- const a = T(o).split("-")[0], c = s.value, f = r.value;
1122
- return a === "bottom" ? {
1123
- "inset-inline-start": `${c}px`,
1124
- "inset-block-start": i
1125
- } : a === "top" ? {
1126
- "inset-inline-start": `${c}px`,
1127
- "inset-block-end": i
1128
- } : a === "right" ? {
1129
- "inset-block-start": `${f}px`,
1130
- "inset-inline-start": i
1131
- } : a === "left" ? {
1132
- "inset-block-start": `${f}px`,
1133
- "inset-inline-end": i
1150
+ function No(e, t, n = {}) {
1151
+ const { offset: o = "-4px", padding: i } = n, { middlewareData: r, placement: l, refs: a } = t;
1152
+ pe(e, (f) => {
1153
+ a.arrowEl.value = f;
1154
+ });
1155
+ const u = I(() => {
1156
+ var f;
1157
+ return ((f = r.value.arrow) == null ? void 0 : f.x) ?? 0;
1158
+ }), c = I(() => {
1159
+ var f;
1160
+ return ((f = r.value.arrow) == null ? void 0 : f.y) ?? 0;
1161
+ }), h = I(() => {
1162
+ if (!(e.value || a.arrowEl.value) || !r.value.arrow)
1163
+ return {};
1164
+ const p = S(l).split("-")[0], d = u.value, g = c.value;
1165
+ return p === "bottom" ? {
1166
+ "inset-inline-start": `${d}px`,
1167
+ "inset-block-start": o
1168
+ } : p === "top" ? {
1169
+ "inset-inline-start": `${d}px`,
1170
+ "inset-block-end": o
1171
+ } : p === "right" ? {
1172
+ "inset-block-start": `${g}px`,
1173
+ "inset-inline-start": o
1174
+ } : p === "left" ? {
1175
+ "inset-block-start": `${g}px`,
1176
+ "inset-inline-end": o
1134
1177
  } : {};
1135
1178
  });
1136
1179
  return {
1137
- arrowX: s,
1138
- arrowY: r,
1139
- arrowStyles: l
1180
+ arrowX: u,
1181
+ arrowY: c,
1182
+ arrowStyles: h
1183
+ };
1184
+ }
1185
+ let eo = 0;
1186
+ function to() {
1187
+ return `vfloat-id-${eo++}`;
1188
+ }
1189
+ function Ot(e) {
1190
+ return typeof e == "object" && e instanceof HTMLElement;
1191
+ }
1192
+ function no(e) {
1193
+ return e !== null && typeof e == "object" && "data" in e && "id" in e && "children" in e && "parent" in e;
1194
+ }
1195
+ function rt(e) {
1196
+ return no(e) ? {
1197
+ floatingContext: e.data,
1198
+ treeContext: e
1199
+ } : {
1200
+ floatingContext: e,
1201
+ treeContext: null
1140
1202
  };
1141
1203
  }
1142
- const Ge = 10;
1143
- function rn(e) {
1144
- return e === "mouse" || e === "pen";
1204
+ function J(e, t) {
1205
+ if (!t) return !1;
1206
+ if (typeof t == "object" && t !== null && "contextElement" in t) {
1207
+ const n = t.contextElement;
1208
+ return n instanceof Element ? n.contains(e) : !1;
1209
+ }
1210
+ return t instanceof Element ? t.contains(e) : !1;
1211
+ }
1212
+ function st(e, t) {
1213
+ for (const n of e.children.value)
1214
+ if (n.data.open.value) {
1215
+ if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
1216
+ return n;
1217
+ const o = st(n, t);
1218
+ if (o) return o;
1219
+ }
1220
+ return null;
1221
+ }
1222
+ function Qe(e, t) {
1223
+ if (e === void 0) return !1;
1224
+ const n = e === "mouse";
1225
+ return t ? n : n || e === "pen";
1226
+ }
1227
+ function Kt(e) {
1228
+ return !e || !(e instanceof HTMLElement) ? !1 : e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e.isContentEditable && e.contentEditable !== "false";
1229
+ }
1230
+ function Mt(e) {
1231
+ const t = e.target;
1232
+ return t instanceof HTMLElement ? t.tagName === "BUTTON" || t.tagName === "INPUT" && t.getAttribute("type") === "button" || t.getAttribute("role") === "button" : !1;
1233
+ }
1234
+ function St(e) {
1235
+ return Kt(e);
1236
+ }
1237
+ function oo(e) {
1238
+ return e instanceof Element && e instanceof HTMLElement;
1239
+ }
1240
+ function io(e) {
1241
+ return typeof e == "object" && e !== null && "contextElement" in e;
1242
+ }
1243
+ function At(e, t) {
1244
+ return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
1245
+ }
1246
+ function ro(e, t) {
1247
+ const n = t.getBoundingClientRect(), o = t.offsetWidth - t.clientWidth, i = t.offsetHeight - t.clientHeight, r = e.clientX - n.left, l = e.clientY - n.top;
1248
+ if (o > 0) {
1249
+ const a = t.clientWidth;
1250
+ if (r >= a && r <= t.offsetWidth)
1251
+ return !0;
1252
+ }
1253
+ if (i > 0) {
1254
+ const a = t.clientHeight;
1255
+ if (l >= a && l <= t.offsetHeight)
1256
+ return !0;
1257
+ }
1258
+ return !1;
1259
+ }
1260
+ function Nt() {
1261
+ return typeof navigator > "u" ? !1 : navigator.platform.toUpperCase().indexOf("MAC") >= 0;
1262
+ }
1263
+ function Dt() {
1264
+ return typeof navigator > "u" ? !1 : /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1265
+ }
1266
+ function so(e) {
1267
+ return typeof (e == null ? void 0 : e.matches) != "function" ? !1 : e.matches(":focus-visible");
1268
+ }
1269
+ function ze(e, t) {
1270
+ return e.contains(t);
1271
+ }
1272
+ function lo(e) {
1273
+ return e.target;
1274
+ }
1275
+ function Rt() {
1276
+ return typeof performance < "u" ? performance.now() : Date.now();
1277
+ }
1278
+ function kt(e) {
1279
+ e !== -1 && clearTimeout(e);
1280
+ }
1281
+ function Gt(e) {
1282
+ return e.children.value.some(
1283
+ (t) => t.data.open.value || Gt(t)
1284
+ );
1285
+ }
1286
+ function ao(e, t) {
1287
+ return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
1145
1288
  }
1146
- function sn(e, t, n) {
1147
- const { delay: o } = n, i = O(() => {
1148
- const c = T(o);
1289
+ function Ft(e, t) {
1290
+ const [n, o] = e;
1291
+ let i = !1;
1292
+ const r = t.length;
1293
+ for (let l = 0, a = r - 1; l < r; a = l++) {
1294
+ const [u, c] = t[l] || [0, 0], [h, f] = t[a] || [0, 0];
1295
+ c >= o != f >= o && n <= (h - u) * (o - c) / (f - c) + u && (i = !i);
1296
+ }
1297
+ return i;
1298
+ }
1299
+ function co(e = {}) {
1300
+ const { buffer: t = 0.5, blockPointerEvents: n = !1, requireIntent: o = !0 } = e;
1301
+ let i = -1, r = !1;
1302
+ function l(u, c, h, f, p) {
1303
+ const d = Rt(), g = d - p;
1304
+ if (h === null || f === null || g === 0)
1305
+ return {
1306
+ speed: null,
1307
+ lastX: u,
1308
+ lastY: c,
1309
+ lastCursorTime: d
1310
+ };
1311
+ const m = u - h, b = c - f;
1312
+ return {
1313
+ speed: Math.sqrt(m * m + b * b) / g,
1314
+ lastX: u,
1315
+ lastY: c,
1316
+ lastCursorTime: d
1317
+ };
1318
+ }
1319
+ const a = function(c) {
1320
+ const { x: h, y: f, placement: p, elements: d, buffer: g, onClose: m, nodeId: b, tree: w } = c, y = I(() => {
1321
+ const T = d.domReference;
1322
+ return Ot(T) ? T : (T == null ? void 0 : T.contextElement) ?? null;
1323
+ });
1324
+ let C = null, P = null, E = Rt();
1325
+ return function(A) {
1326
+ var lt, at, ct, ut, ft, dt, ht;
1327
+ function D() {
1328
+ kt(i), i = -1, m();
1329
+ }
1330
+ if (kt(i), i = -1, !d.domReference || !d.floating || p == null || h == null || f == null)
1331
+ return;
1332
+ const { clientX: R, clientY: N } = A, M = [R, N], k = lo(A), V = A.type === "mouseleave", F = d.floating && ze(d.floating, k), Y = y.value && ze(y.value, k), x = (lt = y.value) == null ? void 0 : lt.getBoundingClientRect(), s = (at = d.floating) == null ? void 0 : at.getBoundingClientRect(), v = p.split("-")[0], H = h > ((s == null ? void 0 : s.right) ?? 0) - ((s == null ? void 0 : s.width) ?? 0) / 2, X = f > ((s == null ? void 0 : s.bottom) ?? 0) - ((s == null ? void 0 : s.height) ?? 0) / 2, Z = x ? ao(M, x) : !1, L = ((s == null ? void 0 : s.width) ?? 0) > ((x == null ? void 0 : x.width) ?? 0), W = ((s == null ? void 0 : s.height) ?? 0) > ((x == null ? void 0 : x.height) ?? 0), ie = ((ct = L ? x : s) == null ? void 0 : ct.left) ?? 0, ee = ((ut = L ? x : s) == null ? void 0 : ut.right) ?? 0, re = ((ft = W ? x : s) == null ? void 0 : ft.top) ?? 0, se = ((dt = W ? x : s) == null ? void 0 : dt.bottom) ?? 0;
1333
+ if (F && (r = !0, !V))
1334
+ return;
1335
+ if (Y && (r = !1), Y && !V) {
1336
+ r = !0;
1337
+ return;
1338
+ }
1339
+ if (V && Ot(A.relatedTarget) && d.floating && ze(d.floating, A.relatedTarget))
1340
+ return;
1341
+ if (w && b) {
1342
+ const B = w.nodes.get(b);
1343
+ if (B && Gt(B))
1344
+ return;
1345
+ }
1346
+ if (v === "top" && f >= ((x == null ? void 0 : x.bottom) ?? 0) - 1 || v === "bottom" && f <= ((x == null ? void 0 : x.top) ?? 0) + 1 || v === "left" && h >= ((x == null ? void 0 : x.right) ?? 0) - 1 || v === "right" && h <= ((x == null ? void 0 : x.left) ?? 0) + 1)
1347
+ return D();
1348
+ let te = [];
1349
+ switch (v) {
1350
+ case "top":
1351
+ te = [
1352
+ [ie, ((x == null ? void 0 : x.top) ?? 0) + 1],
1353
+ [ie, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
1354
+ [ee, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
1355
+ [ee, ((x == null ? void 0 : x.top) ?? 0) + 1]
1356
+ ];
1357
+ break;
1358
+ case "bottom":
1359
+ te = [
1360
+ [ie, ((s == null ? void 0 : s.top) ?? 0) + 1],
1361
+ [ie, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
1362
+ [ee, ((x == null ? void 0 : x.bottom) ?? 0) - 1],
1363
+ [ee, ((s == null ? void 0 : s.top) ?? 0) + 1]
1364
+ ];
1365
+ break;
1366
+ case "left":
1367
+ te = [
1368
+ [((s == null ? void 0 : s.right) ?? 0) - 1, se],
1369
+ [((s == null ? void 0 : s.right) ?? 0) - 1, re],
1370
+ [((x == null ? void 0 : x.left) ?? 0) + 1, re],
1371
+ [((x == null ? void 0 : x.left) ?? 0) + 1, se]
1372
+ ];
1373
+ break;
1374
+ case "right":
1375
+ te = [
1376
+ [((x == null ? void 0 : x.right) ?? 0) - 1, se],
1377
+ [((x == null ? void 0 : x.right) ?? 0) - 1, re],
1378
+ [((s == null ? void 0 : s.left) ?? 0) + 1, re],
1379
+ [((s == null ? void 0 : s.left) ?? 0) + 1, se]
1380
+ ];
1381
+ break;
1382
+ }
1383
+ function Ee([B, $]) {
1384
+ const O = g;
1385
+ switch (v) {
1386
+ case "top": {
1387
+ const le = [
1388
+ L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
1389
+ $ + O + 1
1390
+ ], ae = [
1391
+ L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
1392
+ $ + O + 1
1393
+ ], me = [
1394
+ [
1395
+ (s == null ? void 0 : s.left) ?? 0,
1396
+ H || L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0
1397
+ ],
1398
+ [
1399
+ (s == null ? void 0 : s.right) ?? 0,
1400
+ H ? L ? ((s == null ? void 0 : s.bottom) ?? 0) - O : (s == null ? void 0 : s.top) ?? 0 : ((s == null ? void 0 : s.bottom) ?? 0) - O
1401
+ ]
1402
+ ];
1403
+ return [le, ae, ...me];
1404
+ }
1405
+ case "bottom": {
1406
+ const le = [
1407
+ L ? B + O / 2 : H ? B + O * 4 : B - O * 4,
1408
+ $ - O
1409
+ ], ae = [
1410
+ L ? B - O / 2 : H ? B + O * 4 : B - O * 4,
1411
+ $ - O
1412
+ ], me = [
1413
+ [
1414
+ (s == null ? void 0 : s.left) ?? 0,
1415
+ H || L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0
1416
+ ],
1417
+ [
1418
+ (s == null ? void 0 : s.right) ?? 0,
1419
+ H ? L ? ((s == null ? void 0 : s.top) ?? 0) + O : (s == null ? void 0 : s.bottom) ?? 0 : ((s == null ? void 0 : s.top) ?? 0) + O
1420
+ ]
1421
+ ];
1422
+ return [le, ae, ...me];
1423
+ }
1424
+ case "left": {
1425
+ const le = [
1426
+ B + O + 1,
1427
+ W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
1428
+ ], ae = [
1429
+ B + O + 1,
1430
+ W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
1431
+ ];
1432
+ return [...[
1433
+ [
1434
+ X || W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0,
1435
+ (s == null ? void 0 : s.top) ?? 0
1436
+ ],
1437
+ [
1438
+ X ? W ? ((s == null ? void 0 : s.right) ?? 0) - O : (s == null ? void 0 : s.left) ?? 0 : ((s == null ? void 0 : s.right) ?? 0) - O,
1439
+ (s == null ? void 0 : s.bottom) ?? 0
1440
+ ]
1441
+ ], le, ae];
1442
+ }
1443
+ case "right": {
1444
+ const le = [
1445
+ B - O,
1446
+ W ? $ + O / 2 : X ? $ + O * 4 : $ - O * 4
1447
+ ], ae = [
1448
+ B - O,
1449
+ W ? $ - O / 2 : X ? $ + O * 4 : $ - O * 4
1450
+ ], me = [
1451
+ [
1452
+ X || W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0,
1453
+ (s == null ? void 0 : s.top) ?? 0
1454
+ ],
1455
+ [
1456
+ X ? W ? ((s == null ? void 0 : s.left) ?? 0) + O : (s == null ? void 0 : s.right) ?? 0 : ((s == null ? void 0 : s.left) ?? 0) + O,
1457
+ (s == null ? void 0 : s.bottom) ?? 0
1458
+ ]
1459
+ ];
1460
+ return [le, ae, ...me];
1461
+ }
1462
+ }
1463
+ }
1464
+ const Ae = Ee([h, f]);
1465
+ if ((ht = e.onPolygonChange) == null || ht.call(e, Ae), !Ft(M, te)) {
1466
+ if (Ft(M, Ae)) {
1467
+ if (!r && o) {
1468
+ const B = l(
1469
+ A.clientX,
1470
+ A.clientY,
1471
+ C,
1472
+ P,
1473
+ E
1474
+ );
1475
+ C = B.lastX, P = B.lastY, E = B.lastCursorTime, B.speed !== null && B.speed < 0.1 && (i = window.setTimeout(D, 40));
1476
+ }
1477
+ return;
1478
+ }
1479
+ if (r && !Z)
1480
+ return D();
1481
+ D();
1482
+ }
1483
+ };
1484
+ };
1485
+ return a.__options = {
1486
+ blockPointerEvents: n
1487
+ }, a;
1488
+ }
1489
+ const Ht = 10;
1490
+ function uo(e, t, n) {
1491
+ const { delay: o } = n, i = I(() => {
1492
+ const c = S(o);
1149
1493
  return (typeof c == "number" ? c : c.open) ?? 0;
1150
- }), s = O(() => {
1151
- const c = T(o);
1494
+ }), r = I(() => {
1495
+ const c = S(o);
1152
1496
  return (typeof c == "number" ? c : c.close) ?? 0;
1153
1497
  });
1154
- let r, l;
1155
- const a = () => {
1156
- clearTimeout(r), clearTimeout(l);
1498
+ let l, a;
1499
+ const u = () => {
1500
+ clearTimeout(l), clearTimeout(a);
1157
1501
  };
1158
- return ae(a), {
1502
+ return ge(u), {
1159
1503
  show: (c) => {
1160
- a();
1161
- const f = c ?? i.value;
1162
- f === 0 ? e() : r = setTimeout(e, f);
1504
+ u();
1505
+ const h = c ?? i.value;
1506
+ h === 0 ? e() : l = setTimeout(e, h);
1163
1507
  },
1164
1508
  hide: (c) => {
1165
- a();
1166
- const f = c ?? s.value;
1167
- f === 0 ? t() : l = setTimeout(t, f);
1509
+ u();
1510
+ const h = c ?? r.value;
1511
+ h === 0 ? t() : a = setTimeout(t, h);
1168
1512
  },
1169
1513
  showDelay: i,
1170
- hideDelay: s,
1171
- clearTimeouts: a
1514
+ hideDelay: r,
1515
+ clearTimeouts: u
1172
1516
  };
1173
1517
  }
1174
- function Sn(e, t = {}) {
1175
- const {
1176
- open: n,
1177
- setOpen: o,
1178
- refs: { anchorEl: i, floatingEl: s }
1179
- } = e, {
1180
- enabled: r = !0,
1181
- delay: l = 0,
1182
- restMs: a = 0,
1183
- mouseOnly: c = !1
1184
- } = t, f = O(() => T(r)), u = O(() => T(a)), m = O(() => {
1185
- const y = i.value;
1186
- return !y || y instanceof HTMLElement ? y : y.contextElement ?? null;
1187
- }), { hide: h, show: p, showDelay: d, clearTimeouts: v } = sn(
1518
+ function Do(e, t = {}) {
1519
+ const { floatingContext: n, treeContext: o } = rt(e), {
1520
+ open: i,
1521
+ setOpen: r,
1522
+ refs: { anchorEl: l, floatingEl: a }
1523
+ } = n, {
1524
+ enabled: u = !0,
1525
+ delay: c = 0,
1526
+ restMs: h = 0,
1527
+ mouseOnly: f = !1,
1528
+ safePolygon: p = !1
1529
+ } = t, d = I(() => S(u)), g = I(() => S(h)), m = I(() => {
1530
+ const v = l.value;
1531
+ return !v || v instanceof HTMLElement ? v : v.contextElement ?? null;
1532
+ }), { hide: b, show: w, showDelay: y, clearTimeouts: C } = uo(
1188
1533
  () => {
1189
- n.value || o(!0);
1534
+ i.value || r(!0);
1190
1535
  },
1191
1536
  () => {
1192
- n.value && o(!1);
1537
+ i.value && r(!1);
1193
1538
  },
1194
- { delay: l }
1539
+ { delay: c }
1195
1540
  );
1196
- let w = null, E;
1197
- const x = O(() => d.value === 0 && u.value > 0);
1198
- function g(y) {
1199
- if (!f.value || !L(y) || !x.value || !w) return;
1200
- const C = { x: y.clientX, y: y.clientY }, P = Math.abs(C.x - w.x), Y = Math.abs(C.y - w.y);
1201
- (P > Ge || Y > Ge) && (w = C, clearTimeout(E), E = setTimeout(() => {
1202
- p(0);
1203
- }, u.value));
1541
+ let P = null, E;
1542
+ const T = I(() => y.value === 0 && g.value > 0);
1543
+ function A(v) {
1544
+ if (!d.value || !N(v) || !T.value || !P) return;
1545
+ const H = { x: v.clientX, y: v.clientY }, X = Math.abs(H.x - P.x), Z = Math.abs(H.y - P.y);
1546
+ (X > Ht || Z > Ht) && (P = H, clearTimeout(E), E = setTimeout(() => {
1547
+ w(0);
1548
+ }, g.value));
1204
1549
  }
1205
- function b(y) {
1206
- !f.value || !L(y) || !x.value || (w = { x: y.clientX, y: y.clientY }, E = setTimeout(() => {
1207
- p(0);
1208
- }, u.value));
1550
+ function D(v) {
1551
+ !d.value || !N(v) || !T.value || (P = { x: v.clientX, y: v.clientY }, E = setTimeout(() => {
1552
+ w(0);
1553
+ }, g.value));
1209
1554
  }
1210
1555
  function R() {
1211
- clearTimeout(E), w = null;
1556
+ clearTimeout(E), P = null;
1212
1557
  }
1213
- re(() => {
1214
- const y = m.value;
1215
- !y || !f.value || !x.value || (y.addEventListener("pointerenter", b), y.addEventListener("pointermove", g), y.addEventListener("pointerleave", R), q(() => {
1216
- y.removeEventListener("pointerenter", b), y.removeEventListener("pointermove", g), y.removeEventListener("pointerleave", R);
1558
+ Te(() => {
1559
+ const v = m.value;
1560
+ !v || !d.value || !T.value || (v.addEventListener("pointerenter", D), v.addEventListener("pointermove", A), v.addEventListener("pointerleave", R), ue(() => {
1561
+ v.removeEventListener("pointerenter", D), v.removeEventListener("pointermove", A), v.removeEventListener("pointerleave", R);
1217
1562
  }));
1218
- }), ae(() => {
1563
+ }), ge(() => {
1219
1564
  clearTimeout(E);
1220
1565
  });
1221
- function L(y) {
1222
- return !(T(c) && !rn(y.pointerType));
1566
+ function N(v) {
1567
+ return S(f) ? v.pointerType === "mouse" : !0;
1223
1568
  }
1224
- function W(y) {
1225
- !f.value || !L(y) || x.value || p();
1569
+ function M(v) {
1570
+ !d.value || !N(v) || T.value || (F(), w());
1226
1571
  }
1227
- function k(y) {
1228
- !f.value || !L(y) || v();
1572
+ function k(v) {
1573
+ !d.value || !N(v) || (C(), F());
1229
1574
  }
1230
- function A(y) {
1231
- var C;
1232
- !f.value || !L(y) || (C = s.value) != null && C.contains(y.relatedTarget) || h();
1575
+ let V = null;
1576
+ function F() {
1577
+ V && (document.removeEventListener("pointermove", V), V = null);
1578
+ const v = x.value;
1579
+ v != null && v.onPolygonChange && v.onPolygonChange([]);
1233
1580
  }
1234
- function I(y) {
1235
- var C;
1236
- !f.value || !L(y) || (C = m.value) != null && C.contains(y.relatedTarget) || h();
1581
+ const Y = I(() => !!S(p)), x = I(() => {
1582
+ const v = S(p);
1583
+ if (typeof v == "object" && v) return v;
1584
+ if (v === !0) return {};
1585
+ });
1586
+ function s(v) {
1587
+ var L;
1588
+ if (!d.value || !N(v)) return;
1589
+ const { clientX: H, clientY: X } = v, Z = v.relatedTarget;
1590
+ if (Y.value)
1591
+ setTimeout(() => {
1592
+ var se;
1593
+ F();
1594
+ const W = m.value, ie = a.value;
1595
+ if (!W || !ie) {
1596
+ b();
1597
+ return;
1598
+ }
1599
+ let ee, re;
1600
+ if (o) {
1601
+ ee = /* @__PURE__ */ new Map();
1602
+ const te = (Ee) => {
1603
+ ee.set(Ee.id, Ee);
1604
+ for (const Ae of Ee.children.value)
1605
+ te(Ae);
1606
+ };
1607
+ te(o), re = o.id;
1608
+ }
1609
+ V = co(x.value)({
1610
+ x: H,
1611
+ y: X,
1612
+ placement: n.placement.value,
1613
+ elements: {
1614
+ domReference: W,
1615
+ floating: ie
1616
+ },
1617
+ buffer: ((se = x.value) == null ? void 0 : se.buffer) ?? 1,
1618
+ onClose: () => {
1619
+ F(), b();
1620
+ },
1621
+ nodeId: re,
1622
+ tree: ee ? { nodes: ee } : void 0
1623
+ }), V && document.addEventListener("pointermove", V);
1624
+ }, 0);
1625
+ else {
1626
+ if (o) {
1627
+ if (!fo(o, Z))
1628
+ return;
1629
+ } else if ((L = a.value) != null && L.contains(Z))
1630
+ return;
1631
+ b();
1632
+ }
1237
1633
  }
1238
- re(() => {
1239
- const y = m.value;
1240
- !y || !f.value || (y.addEventListener("pointerenter", W), y.addEventListener("pointerleave", A), q(() => {
1241
- y.removeEventListener("pointerenter", W), y.removeEventListener("pointerleave", A);
1634
+ Te(() => {
1635
+ const v = m.value;
1636
+ !v || !d.value || (v.addEventListener("pointerenter", M), v.addEventListener("pointerleave", s), ue(() => {
1637
+ v.removeEventListener("pointerenter", M), v.removeEventListener("pointerleave", s);
1242
1638
  }));
1243
- }), re(() => {
1244
- const y = s.value;
1245
- !y || !f.value || (y.addEventListener("pointerenter", k), y.addEventListener("pointerleave", I), q(() => {
1246
- y.removeEventListener("pointerenter", k), y.removeEventListener("pointerleave", I);
1639
+ }), Te(() => {
1640
+ const v = a.value;
1641
+ !v || !d.value || (v.addEventListener("pointerenter", k), v.addEventListener("pointerleave", s), ue(() => {
1642
+ v.removeEventListener("pointerenter", k), v.removeEventListener("pointerleave", s);
1247
1643
  }));
1644
+ }), ge(() => {
1645
+ F();
1248
1646
  });
1249
1647
  }
1250
- function ln(e) {
1251
- return yt() ? (ae(e), !0) : !1;
1648
+ function fo(e, t) {
1649
+ return t ? !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || st(e, t)) : !0;
1252
1650
  }
1253
- const cn = typeof window < "u" && typeof document < "u";
1651
+ function ho(e) {
1652
+ return en() ? (ge(e), !0) : !1;
1653
+ }
1654
+ const mo = typeof window < "u" && typeof document < "u";
1254
1655
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1255
- const an = Object.prototype.toString, un = (e) => an.call(e) === "[object Object]";
1256
- function Pe(e) {
1656
+ const po = Object.prototype.toString, vo = (e) => po.call(e) === "[object Object]";
1657
+ function Ue(e) {
1257
1658
  return Array.isArray(e) ? e : [e];
1258
1659
  }
1259
- function fn(e, t, n) {
1260
- return ve(
1660
+ function go(e, t, n) {
1661
+ return pe(
1261
1662
  e,
1262
1663
  t,
1263
1664
  {
@@ -1266,358 +1667,334 @@ function fn(e, t, n) {
1266
1667
  }
1267
1668
  );
1268
1669
  }
1269
- const dn = cn ? window : void 0;
1270
- function hn(e) {
1670
+ const wo = mo ? window : void 0;
1671
+ function yo(e) {
1271
1672
  var t;
1272
- const n = T(e);
1673
+ const n = S(e);
1273
1674
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
1274
1675
  }
1275
- function D(...e) {
1676
+ function q(...e) {
1276
1677
  const t = [], n = () => {
1277
- t.forEach((l) => l()), t.length = 0;
1278
- }, o = (l, a, c, f) => (l.addEventListener(a, c, f), () => l.removeEventListener(a, c, f)), i = O(() => {
1279
- const l = Pe(T(e[0])).filter((a) => a != null);
1280
- return l.every((a) => typeof a != "string") ? l : void 0;
1281
- }), s = fn(
1678
+ t.forEach((a) => a()), t.length = 0;
1679
+ }, o = (a, u, c, h) => (a.addEventListener(u, c, h), () => a.removeEventListener(u, c, h)), i = I(() => {
1680
+ const a = Ue(S(e[0])).filter((u) => u != null);
1681
+ return a.every((u) => typeof u != "string") ? a : void 0;
1682
+ }), r = go(
1282
1683
  () => {
1283
- var l, a;
1684
+ var a, u;
1284
1685
  return [
1285
- (a = (l = i.value) == null ? void 0 : l.map((c) => hn(c))) != null ? a : [dn].filter((c) => c != null),
1286
- Pe(T(i.value ? e[1] : e[0])),
1287
- Pe(xt(i.value ? e[2] : e[1])),
1686
+ (u = (a = i.value) == null ? void 0 : a.map((c) => yo(c))) != null ? u : [wo].filter((c) => c != null),
1687
+ Ue(S(i.value ? e[1] : e[0])),
1688
+ Ue(tn(i.value ? e[2] : e[1])),
1288
1689
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
1289
- T(i.value ? e[3] : e[2])
1690
+ S(i.value ? e[3] : e[2])
1290
1691
  ];
1291
1692
  },
1292
- ([l, a, c, f]) => {
1293
- if (n(), !(l != null && l.length) || !(a != null && a.length) || !(c != null && c.length))
1693
+ ([a, u, c, h]) => {
1694
+ if (n(), !(a != null && a.length) || !(u != null && u.length) || !(c != null && c.length))
1294
1695
  return;
1295
- const u = un(f) ? { ...f } : f;
1696
+ const f = vo(h) ? { ...h } : h;
1296
1697
  t.push(
1297
- ...l.flatMap(
1298
- (m) => a.flatMap(
1299
- (h) => c.map((p) => o(m, h, p, u))
1698
+ ...a.flatMap(
1699
+ (p) => u.flatMap(
1700
+ (d) => c.map((g) => o(p, d, g, f))
1300
1701
  )
1301
1702
  )
1302
1703
  );
1303
1704
  },
1304
1705
  { flush: "post" }
1305
- ), r = () => {
1306
- s(), n();
1706
+ ), l = () => {
1707
+ r(), n();
1307
1708
  };
1308
- return ln(n), r;
1309
- }
1310
- function kn(e, t = {}) {
1311
- const {
1312
- open: n,
1313
- setOpen: o,
1314
- refs: { floatingEl: i, anchorEl: s }
1315
- } = e, { enabled: r = !0, requireFocusVisible: l = !0 } = t, a = O(() => s.value ? s.value instanceof HTMLElement ? s.value : s.value.contextElement : null);
1316
- let c = !1, f = !0, u;
1317
- D(window, "blur", () => {
1318
- !n.value && a.value && a.value === document.activeElement && (c = !0);
1319
- }), D(window, "focus", () => {
1320
- c = !1;
1321
- }), bt(() => {
1322
- Je() && Qe() && (D(
1709
+ return ho(n), l;
1710
+ }
1711
+ function Ro(e, t = {}) {
1712
+ const { floatingContext: n, treeContext: o } = rt(e), {
1713
+ open: i,
1714
+ setOpen: r,
1715
+ refs: { floatingEl: l, anchorEl: a }
1716
+ } = n, { enabled: u = !0, requireFocusVisible: c = !0 } = t, h = I(() => a.value ? a.value instanceof HTMLElement ? a.value : a.value.contextElement : null);
1717
+ let f = !1, p = !0, d;
1718
+ q(window, "blur", () => {
1719
+ !i.value && h.value && h.value === document.activeElement && (f = !0);
1720
+ }), q(window, "focus", () => {
1721
+ f = !1;
1722
+ }), nn(() => {
1723
+ Nt() && Dt() && (q(
1323
1724
  window,
1324
1725
  "keydown",
1325
1726
  () => {
1326
- f = !0;
1727
+ p = !0;
1327
1728
  },
1328
1729
  { capture: !0 }
1329
- ), D(
1730
+ ), q(
1330
1731
  window,
1331
1732
  "pointerdown",
1332
1733
  () => {
1333
- f = !1;
1734
+ p = !1;
1334
1735
  },
1335
1736
  { capture: !0 }
1336
1737
  ));
1337
1738
  });
1338
- function m(p) {
1339
- if (c) {
1340
- c = !1;
1739
+ function g(b) {
1740
+ if (f) {
1741
+ f = !1;
1341
1742
  return;
1342
1743
  }
1343
- const d = p.target;
1344
- if (T(l) && d) {
1345
- if (Je() && Qe() && !p.relatedTarget) {
1346
- if (!f && !vn(d))
1744
+ const w = b.target;
1745
+ if (S(c) && w) {
1746
+ if (Nt() && Dt() && !b.relatedTarget) {
1747
+ if (!p && !Kt(w))
1347
1748
  return;
1348
- } else if (!pn(d))
1749
+ } else if (!so(w))
1349
1750
  return;
1350
1751
  }
1351
- o(!0);
1752
+ r(!0);
1352
1753
  }
1353
- function h(p) {
1354
- clearTimeout(u), u = window.setTimeout(() => {
1355
- var w;
1356
- const v = (((w = a.value) == null ? void 0 : w.ownerDocument) ?? document).activeElement;
1357
- !p.relatedTarget && v === a.value || i.value && v && i.value.contains(v) || o(!1);
1754
+ function m(b) {
1755
+ clearTimeout(d), d = window.setTimeout(() => {
1756
+ var C;
1757
+ const y = (((C = h.value) == null ? void 0 : C.ownerDocument) ?? document).activeElement;
1758
+ if (!(!b.relatedTarget && y === h.value)) {
1759
+ if (o) {
1760
+ if (y && bo(o, y))
1761
+ return;
1762
+ } else if (l.value && y && l.value.contains(y))
1763
+ return;
1764
+ r(!1);
1765
+ }
1358
1766
  }, 0);
1359
1767
  }
1360
- re(() => {
1361
- if (!T(r)) return;
1362
- const p = a.value;
1363
- !p || !(p instanceof HTMLElement) || (p.addEventListener("focus", m), p.addEventListener("blur", h), q(() => {
1364
- p.removeEventListener("focus", m), p.removeEventListener("blur", h);
1768
+ Te(() => {
1769
+ if (!S(u)) return;
1770
+ const b = h.value;
1771
+ !b || !(b instanceof HTMLElement) || (b.addEventListener("focus", g), b.addEventListener("blur", m), ue(() => {
1772
+ b.removeEventListener("focus", g), b.removeEventListener("blur", m);
1365
1773
  }));
1366
- }), ae(() => {
1367
- clearTimeout(u);
1774
+ }), ge(() => {
1775
+ clearTimeout(d);
1368
1776
  });
1369
1777
  }
1370
- function Je() {
1371
- return navigator.platform.toUpperCase().indexOf("MAC") >= 0;
1778
+ function bo(e, t) {
1779
+ return J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) ? !0 : Jt(e, t) !== null;
1372
1780
  }
1373
- function Qe() {
1374
- return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1781
+ function Jt(e, t) {
1782
+ for (const n of e.children.value)
1783
+ if (n.data.open.value) {
1784
+ if (J(t, n.data.refs.anchorEl.value) || J(t, n.data.refs.floatingEl.value))
1785
+ return n;
1786
+ const o = Jt(n, t);
1787
+ if (o) return o;
1788
+ }
1789
+ return null;
1375
1790
  }
1376
- function vn(e) {
1377
- return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement;
1378
- }
1379
- function pn(e) {
1380
- return e.matches(":focus-visible");
1381
- }
1382
- function Hn(e, t = {}) {
1383
- const { open: n, setOpen: o, refs: i } = e, {
1384
- enabled: s = !0,
1385
- event: r = "click",
1386
- toggle: l = !0,
1387
- ignoreMouse: a = !1,
1388
- keyboardHandlers: c = !0
1791
+ function ko(e, t = {}) {
1792
+ const { floatingContext: n, treeContext: o } = rt(e), { open: i, setOpen: r, refs: l } = n, {
1793
+ enabled: a = !0,
1794
+ event: u = "click",
1795
+ toggle: c = !0,
1796
+ ignoreMouse: h = !1,
1797
+ ignoreKeyboard: f = !1,
1798
+ ignoreTouch: p = !1,
1799
+ // Outside click options
1800
+ outsideClick: d = !1,
1801
+ outsideEvent: g = "pointerdown",
1802
+ outsideCapture: m = !0,
1803
+ onOutsideClick: b,
1804
+ preventScrollbarClick: w = !0,
1805
+ handleDragEvents: y = !0
1389
1806
  } = t;
1390
- let f, u = !1;
1391
- const m = O(() => T(s)), h = O(
1392
- () => i.anchorEl.value instanceof HTMLElement ? i.anchorEl.value : null
1393
- );
1394
- function p() {
1395
- n.value ? T(l) && o(!1) : o(!0);
1807
+ let C, P = !1, E = !1, T = !1;
1808
+ const A = I(() => S(a)), D = I(() => S(d)), R = I(() => {
1809
+ const L = l.anchorEl.value;
1810
+ return L ? L instanceof HTMLElement ? L : io(L) && L.contextElement instanceof HTMLElement ? L.contextElement : null : null;
1811
+ }), N = I(() => l.floatingEl.value);
1812
+ function M() {
1813
+ T = !0;
1814
+ try {
1815
+ i.value ? S(c) && r(!1) : r(!0);
1816
+ } finally {
1817
+ Promise.resolve().then(() => {
1818
+ T = !1;
1819
+ });
1820
+ }
1821
+ }
1822
+ function k() {
1823
+ C = void 0, P = !1, E = !1;
1396
1824
  }
1397
- function d(g) {
1398
- f = g.pointerType;
1825
+ function V(L) {
1826
+ C = L.pointerType;
1399
1827
  }
1400
- function v(g) {
1401
- if (g.button !== 0 || T(r) === "click" || Ze(f) && T(a)) return;
1402
- const b = g.target;
1403
- !n.value && b === h.value && g.preventDefault(), p();
1828
+ function F(L) {
1829
+ L.button === 0 && S(u) !== "click" && (Z(C) || M());
1404
1830
  }
1405
- function w() {
1406
- if (T(r) === "mousedown" && f) {
1407
- f = void 0;
1831
+ function Y() {
1832
+ if (S(u) === "mousedown" && C) {
1833
+ k();
1408
1834
  return;
1409
1835
  }
1410
- if (Ze(f) && T(a)) {
1411
- f = void 0;
1836
+ if (Z(C)) {
1837
+ k();
1412
1838
  return;
1413
1839
  }
1414
- p(), f = void 0;
1840
+ M(), k();
1415
1841
  }
1416
- function E(g) {
1417
- if (f = void 0, g.defaultPrevented || !T(c) || ze(g))
1842
+ function x(L) {
1843
+ if (C = void 0, L.defaultPrevented || S(f) || Mt(L))
1418
1844
  return;
1419
- const b = h.value;
1420
- b && (g.key === " " && !et(b) && (g.preventDefault(), u = !0), g.key === "Enter" && p());
1845
+ const W = R.value;
1846
+ W && (L.key === " " && !St(W) && (L.preventDefault(), P = !0), L.key === "Enter" && M());
1421
1847
  }
1422
- function x(g) {
1423
- const b = h.value;
1424
- b && (g.defaultPrevented || !T(c) || ze(g) || et(b) || g.key === " " && u && (u = !1, p()));
1848
+ function s(L) {
1849
+ const W = R.value;
1850
+ W && (L.defaultPrevented || S(f) || Mt(L) || St(W) || L.key === " " && P && (P = !1, M()));
1425
1851
  }
1426
- re(() => {
1427
- const g = h.value;
1428
- !m.value || !g || (g.addEventListener("pointerdown", d), g.addEventListener("mousedown", v), g.addEventListener("click", w), g.addEventListener("keydown", E), g.addEventListener("keyup", x), q(() => {
1429
- g.removeEventListener("pointerdown", d), g.removeEventListener("mousedown", v), g.removeEventListener("click", w), g.removeEventListener("keydown", E), g.removeEventListener("keyup", x);
1430
- }));
1431
- });
1432
- }
1433
- function Ze(e, t) {
1434
- return e === void 0 ? !1 : e === "mouse";
1435
- }
1436
- function ze(e) {
1437
- return e.target instanceof HTMLElement && e.target.tagName === "BUTTON";
1438
- }
1439
- function mn(e) {
1440
- return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1441
- }
1442
- function et(e) {
1443
- return mn(e);
1444
- }
1445
- function Fn(e, t = {}) {
1446
- const {
1447
- enabled: n = !0,
1448
- escapeKey: o = !0,
1449
- outsidePress: i = !0,
1450
- outsidePressEvent: s = "pointerdown",
1451
- anchorPress: r = !1,
1452
- anchorPressEvent: l = "pointerdown",
1453
- ancestorScroll: a = !1,
1454
- capture: c
1455
- } = t, f = O(() => T(n)), u = e.refs.floatingEl, m = O(() => {
1456
- const g = e.refs.anchorEl.value;
1457
- return g ? g instanceof HTMLElement ? g : g.contextElement instanceof HTMLElement ? g.contextElement : null : null;
1458
- }), { isComposing: h } = yn(), { escapeKey: p, outsidePress: d } = gn(c);
1459
- let v = !1;
1460
- const w = (g) => {
1461
- !f.value || !e.open.value || !T(o) || g.key !== "Escape" || h() || e.setOpen(!1);
1462
- }, E = (g) => {
1463
- if (!f.value || !e.open.value)
1852
+ function v(L) {
1853
+ if (!A.value || !D.value || !i.value)
1464
1854
  return;
1465
- if (s === "click" && v) {
1466
- v = !1;
1855
+ if (S(g) === "click" && S(y) && E) {
1856
+ E = !1;
1467
1857
  return;
1468
1858
  }
1469
- const b = T(i);
1470
- if (!b || typeof b == "function" && !b(g))
1859
+ if (T)
1471
1860
  return;
1472
- const R = g.target;
1473
- R && (Ce(R) && u.value && wn(g, R) || tt(g, m.value) || tt(g, u.value) || e.setOpen(!1));
1474
- }, x = () => {
1475
- f.value && e.open.value && T(r) && e.setOpen(!1);
1476
- };
1477
- Ae((g) => {
1478
- if (!f.value || !e.open.value || !T(a))
1479
- return;
1480
- const b = () => {
1481
- e.open.value && e.setOpen(!1);
1482
- }, R = [];
1483
- m.value && R.push(...Q(m.value).filter(Ce)), u.value && R.push(...Q(u.value).filter(Ce));
1484
- for (const L of R)
1485
- L.addEventListener("scroll", b, { passive: !0 });
1486
- g(() => {
1487
- for (const L of R)
1488
- L.removeEventListener("scroll", b);
1489
- });
1490
- }), D(document, "keydown", w, T(p)), D(document, s, E, T(d)), D(m, l, x), D(
1491
- u,
1861
+ const W = L.target;
1862
+ if (W && !(S(w) && oo(W) && N.value && ro(L, W))) {
1863
+ if (o) {
1864
+ if (!xo(o, W))
1865
+ return;
1866
+ } else if (At(L, R.value) || At(L, N.value))
1867
+ return;
1868
+ b ? b(L, n) : r(!1);
1869
+ }
1870
+ }
1871
+ function H() {
1872
+ E = !0;
1873
+ }
1874
+ function X() {
1875
+ setTimeout(() => {
1876
+ E = !1;
1877
+ }, 0);
1878
+ }
1879
+ function Z(L) {
1880
+ return !!(Qe(L, !0) && S(h) || L === "touch" && S(p));
1881
+ }
1882
+ Te(() => {
1883
+ const L = R.value;
1884
+ !A.value || !L || (L.addEventListener("pointerdown", V), L.addEventListener("mousedown", F), L.addEventListener("click", Y), L.addEventListener("keydown", x), L.addEventListener("keyup", s), ue(() => {
1885
+ L.removeEventListener("pointerdown", V), L.removeEventListener("mousedown", F), L.removeEventListener("click", Y), L.removeEventListener("keydown", x), L.removeEventListener("keyup", s), k();
1886
+ }));
1887
+ }), q(
1888
+ () => A.value && D.value ? document : null,
1889
+ () => S(g),
1890
+ v,
1891
+ { capture: S(m) }
1892
+ ), q(
1893
+ () => A.value && D.value && S(y) ? N.value : null,
1492
1894
  "mousedown",
1493
- () => {
1494
- v = !0;
1495
- },
1895
+ H,
1496
1896
  { capture: !0 }
1497
- ), D(
1498
- u,
1897
+ ), q(
1898
+ () => A.value && D.value && S(y) ? N.value : null,
1499
1899
  "mouseup",
1500
- () => {
1501
- v = !0;
1502
- },
1900
+ X,
1503
1901
  { capture: !0 }
1504
1902
  );
1505
1903
  }
1506
- function gn(e) {
1507
- return {
1508
- escapeKey: typeof e == "boolean" ? e : (e == null ? void 0 : e.escapeKey) ?? !1,
1509
- outsidePress: typeof e == "boolean" ? e : (e == null ? void 0 : e.outsidePress) ?? !0
1510
- };
1511
- }
1512
- function Ce(e) {
1513
- return e instanceof Element && e instanceof HTMLElement;
1514
- }
1515
- function tt(e, t) {
1516
- return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
1517
- }
1518
- function wn(e, t) {
1519
- const n = t.offsetWidth - t.clientWidth, o = t.offsetHeight - t.clientHeight;
1520
- return n > 0 && e.clientX > t.clientWidth || o > 0 && e.clientY > t.clientHeight;
1521
- }
1522
- function yn() {
1523
- const e = j(!1);
1524
- return D(document, "compositionstart", () => {
1525
- e.value = !0;
1526
- }), D(document, "compositionend", () => {
1527
- e.value = !1;
1528
- }), {
1529
- isComposing: () => e.value
1530
- };
1904
+ function xo(e, t) {
1905
+ return !(J(t, e.data.refs.anchorEl.value) || J(t, e.data.refs.floatingEl.value) || st(e, t));
1531
1906
  }
1532
- function Bn(e, t, n = {}) {
1907
+ function Fo(e, t, n = {}) {
1533
1908
  const { open: o, refs: i } = t;
1534
- let s;
1535
- const r = j({ x: null, y: null }), l = O(() => T(n.axis ?? "both")), a = O(() => T(n.enabled ?? !0)), c = O(() => T(n.x ?? null)), f = O(() => T(n.y ?? null)), u = (d, v) => {
1536
- r.value = {
1537
- x: d,
1538
- y: v
1539
- }, o.value && (i.anchorEl.value = xn(
1909
+ let r;
1910
+ const l = U({ x: null, y: null }), a = I(() => S(n.axis ?? "both")), u = I(() => S(n.enabled ?? !0)), c = I(() => S(n.x ?? null)), h = I(() => S(n.y ?? null)), f = (m, b) => {
1911
+ l.value = {
1912
+ x: m,
1913
+ y: b
1914
+ }, o.value && (i.anchorEl.value = Eo(
1540
1915
  e.value,
1541
- l.value,
1542
- r.value
1916
+ a.value,
1917
+ l.value
1543
1918
  ));
1544
1919
  };
1545
- Ae(() => {
1546
- const d = c.value, v = f.value;
1547
- a.value && d != null && v != null && u(d, v);
1920
+ pt(() => {
1921
+ const m = c.value, b = h.value;
1922
+ u.value && m != null && b != null && f(m, b);
1548
1923
  });
1549
- const m = (d) => {
1550
- s = d.pointerType, u(d.clientX, d.clientY);
1551
- }, h = (d) => {
1552
- s = d.pointerType, !o.value && nt(s, !0) && u(d.clientX, d.clientY);
1553
- }, p = (d) => {
1554
- o.value && nt(s, !0) && u(d.clientX, d.clientY);
1924
+ const p = (m) => {
1925
+ r = m.pointerType, f(m.clientX, m.clientY);
1926
+ }, d = (m) => {
1927
+ r = m.pointerType, !o.value && Qe(r, !0) && f(m.clientX, m.clientY);
1928
+ }, g = (m) => {
1929
+ o.value && Qe(r, !0) && f(m.clientX, m.clientY);
1555
1930
  };
1556
- return Ae(() => {
1557
- if (c.value != null || f.value != null) return;
1558
- const d = e.value;
1559
- !d || !a.value || (d.addEventListener("pointerenter", h), d.addEventListener("pointerdown", m), d.addEventListener("pointermove", p), q(() => {
1560
- d == null || d.removeEventListener("pointerenter", h), d == null || d.removeEventListener("pointerdown", m), d == null || d.removeEventListener("pointermove", p);
1931
+ return pt(() => {
1932
+ if (c.value != null || h.value != null) return;
1933
+ const m = e.value;
1934
+ !m || !u.value || (m.addEventListener("pointerenter", d), m.addEventListener("pointerdown", p), m.addEventListener("pointermove", g), ue(() => {
1935
+ m == null || m.removeEventListener("pointerenter", d), m == null || m.removeEventListener("pointerdown", p), m == null || m.removeEventListener("pointermove", g);
1561
1936
  }));
1562
1937
  }), {
1563
- coordinates: Et(r),
1564
- updatePosition: u
1938
+ coordinates: on(l),
1939
+ updatePosition: f
1565
1940
  };
1566
1941
  }
1567
- function xn(e, t, n) {
1942
+ function Eo(e, t, n) {
1568
1943
  let o = null, i = null;
1569
- const s = e;
1944
+ const r = e;
1570
1945
  return {
1571
- contextElement: s || void 0,
1946
+ contextElement: r || void 0,
1572
1947
  getBoundingClientRect: () => {
1573
- const r = (s == null ? void 0 : s.getBoundingClientRect()) ?? {
1948
+ const l = (r == null ? void 0 : r.getBoundingClientRect()) ?? {
1574
1949
  width: 0,
1575
1950
  height: 0,
1576
1951
  x: 0,
1577
1952
  y: 0
1578
- }, l = t === "x" || t === "both", a = t === "y" || t === "both";
1579
- let c = 0, f = 0, u = r.x, m = r.y;
1580
- return s && (o == null && n.x != null && l && (o = r.x - n.x), i == null && n.y != null && a && (i = r.y - n.y), u -= o || 0, m -= i || 0), l && n.x != null ? u = n.x : (o = null, c = r.width), a && n.y != null ? m = n.y : (i = null, f = r.height), t === "both" && (c = 0, f = 0), {
1953
+ }, a = t === "x" || t === "both", u = t === "y" || t === "both";
1954
+ let c = 0, h = 0, f = l.x, p = l.y;
1955
+ return r && (o == null && n.x != null && a && (o = l.x - n.x), i == null && n.y != null && u && (i = l.y - n.y), f -= o || 0, p -= i || 0), a && n.x != null ? f = n.x : (o = null, c = l.width), u && n.y != null ? p = n.y : (i = null, h = l.height), t === "both" && (c = 0, h = 0), {
1581
1956
  width: c,
1582
- height: f,
1583
- x: u,
1584
- y: m,
1585
- top: m,
1586
- right: u + c,
1587
- bottom: m + f,
1588
- left: u
1957
+ height: h,
1958
+ x: f,
1959
+ y: p,
1960
+ top: p,
1961
+ right: f + c,
1962
+ bottom: p + h,
1963
+ left: f
1589
1964
  };
1590
1965
  }
1591
1966
  };
1592
1967
  }
1593
- function nt(e, t) {
1594
- if (e === void 0) return !1;
1595
- const n = e === "mouse";
1596
- return t ? n : n || e === "pen";
1968
+ function Ho(e) {
1969
+ const { enabled: t = !0, onEscape: n, capture: o } = e, { isComposing: i } = To();
1970
+ q(
1971
+ document,
1972
+ "keydown",
1973
+ (r) => {
1974
+ r.key !== "Escape" || !S(t) || i() || n(r);
1975
+ },
1976
+ o
1977
+ );
1597
1978
  }
1598
- function $n(e) {
1599
- return {
1600
- name: "arrow",
1601
- options: e,
1602
- fn(t) {
1603
- const n = T(e.element);
1604
- return n == null ? {} : nn({ element: n, padding: e.padding }).fn(t);
1605
- }
1979
+ function To() {
1980
+ const e = U(!1);
1981
+ return q(document, "compositionstart", () => {
1982
+ e.value = !0;
1983
+ }), q(document, "compositionend", () => {
1984
+ e.value = !1;
1985
+ }), {
1986
+ isComposing: () => e.value
1606
1987
  };
1607
1988
  }
1608
- let bn = 0;
1609
- function En() {
1610
- return `vfloat-id-${bn++}`;
1611
- }
1612
- var se;
1613
- class ot {
1989
+ var Le;
1990
+ class Bt {
1614
1991
  constructor(t, n = null, o = {}, i = !1) {
1615
- U(this, "id");
1616
- U(this, "data");
1617
- U(this, "parent");
1618
- U(this, "children");
1619
- de(this, se);
1620
- this.id = o.id ?? En(), this.data = t, this.parent = Me(n), this.children = Me([]), Le(this, se, i);
1992
+ ce(this, "id");
1993
+ ce(this, "data");
1994
+ ce(this, "parent");
1995
+ ce(this, "children");
1996
+ Ne(this, Le);
1997
+ this.id = o.id ?? to(), this.data = t, this.parent = qe(n), this.children = qe([]), Ye(this, Le, i);
1621
1998
  }
1622
1999
  /**
1623
2000
  * Adds an existing node instance to this node's children array.
@@ -1688,16 +2065,16 @@ class ot {
1688
2065
  }
1689
2066
  /** Checks if the node is the true root of the tree, distinct from an orphaned node. */
1690
2067
  get isRoot() {
1691
- return Te(this, se);
2068
+ return Xe(this, Le);
1692
2069
  }
1693
2070
  /** Checks if the node is a leaf node (has no children). */
1694
2071
  get isLeaf() {
1695
2072
  return this.children.value.length === 0;
1696
2073
  }
1697
2074
  }
1698
- se = new WeakMap();
1699
- var le, ce, ke;
1700
- class Tn {
2075
+ Le = new WeakMap();
2076
+ var Pe, Oe, Ze;
2077
+ class Co {
1701
2078
  /**
1702
2079
  * Creates a new Tree instance.
1703
2080
  * @param initialRootData Data for the root node.
@@ -1710,13 +2087,13 @@ class Tn {
1710
2087
  * ```
1711
2088
  */
1712
2089
  constructor(t, n) {
1713
- de(this, ce);
2090
+ Ne(this, Oe);
1714
2091
  /** The root node of the tree. */
1715
- U(this, "root");
2092
+ ce(this, "root");
1716
2093
  /** Readonly reactive map of node IDs to TreeNode instances for quick lookups. */
1717
- U(this, "nodeMap");
1718
- de(this, le);
1719
- Le(this, le, (n == null ? void 0 : n.deleteStrategy) ?? "recursive"), this.nodeMap = Tt(/* @__PURE__ */ new Map()), this.root = new ot(t, null, {}, !0), this.nodeMap.set(this.root.id, this.root);
2094
+ ce(this, "nodeMap");
2095
+ Ne(this, Pe);
2096
+ Ye(this, Pe, (n == null ? void 0 : n.deleteStrategy) ?? "recursive"), this.nodeMap = rn(/* @__PURE__ */ new Map()), this.root = new Bt(t, null, {}, !0), this.nodeMap.set(this.root.id, this.root);
1720
2097
  }
1721
2098
  /**
1722
2099
  * Finds a node anywhere in the tree by its ID.
@@ -1738,8 +2115,8 @@ class Tn {
1738
2115
  if (!i)
1739
2116
  return console.error(`Tree addNode: Parent node with ID ${n} not found.`), null;
1740
2117
  o.id && this.nodeMap.has(o.id) && (o.id = void 0);
1741
- const s = new ot(t, i, o);
1742
- return this.nodeMap.set(s.id, s), i.addChild(s), s;
2118
+ const r = new Bt(t, i, o);
2119
+ return this.nodeMap.set(r.id, r), i.addChild(r), r;
1743
2120
  }
1744
2121
  /**
1745
2122
  * Removes a node from the tree by its ID.
@@ -1749,20 +2126,20 @@ class Tn {
1749
2126
  * @returns True if the node was successfully removed, false otherwise.
1750
2127
  */
1751
2128
  removeNode(t, n) {
1752
- const o = n ?? Te(this, le), i = this.findNodeById(t);
2129
+ const o = n ?? Xe(this, Pe), i = this.findNodeById(t);
1753
2130
  if (!i)
1754
2131
  return !1;
1755
2132
  if (i.isRoot)
1756
2133
  return console.error("Tree removeNode: Cannot remove the root node."), !1;
1757
- const s = i.parent.value;
2134
+ const r = i.parent.value;
1758
2135
  if (o === "recursive")
1759
- Oe(this, ce, ke).call(this, i);
2136
+ je(this, Oe, Ze).call(this, i);
1760
2137
  else {
1761
- for (const r of i.children.value)
1762
- r.parent.value = null;
2138
+ for (const l of i.children.value)
2139
+ l.parent.value = null;
1763
2140
  i.children.value = [], this.nodeMap.delete(i.id);
1764
2141
  }
1765
- return s._removeChildInstance(i);
2142
+ return r._removeChildInstance(i);
1766
2143
  }
1767
2144
  /**
1768
2145
  * Moves a node to become a child of a new parent.
@@ -1783,9 +2160,9 @@ class Tn {
1783
2160
  return console.error(`Tree moveNode: New parent node with ID ${n} not found.`), !1;
1784
2161
  if (i.isDescendantOf(o))
1785
2162
  return console.error("Tree moveNode: Cannot move a node to become its own descendant."), !1;
1786
- const s = o.parent.value;
1787
- if (s) {
1788
- if (!s._removeChildInstance(o))
2163
+ const r = o.parent.value;
2164
+ if (r) {
2165
+ if (!r._removeChildInstance(o))
1789
2166
  return console.error("Tree moveNode: Failed to remove node from its original parent."), !1;
1790
2167
  } else if (o.isRoot) {
1791
2168
  if (o.isRoot)
@@ -1806,18 +2183,18 @@ class Tn {
1806
2183
  if (t === "dfs") {
1807
2184
  const i = [n];
1808
2185
  for (; i.length > 0; ) {
1809
- const s = i.pop();
1810
- o.push(s);
1811
- for (let r = s.children.value.length - 1; r >= 0; r--)
1812
- i.push(s.children.value[r]);
2186
+ const r = i.pop();
2187
+ o.push(r);
2188
+ for (let l = r.children.value.length - 1; l >= 0; l--)
2189
+ i.push(r.children.value[l]);
1813
2190
  }
1814
2191
  } else {
1815
2192
  const i = [n];
1816
2193
  for (; i.length > 0; ) {
1817
- const s = i.shift();
1818
- o.push(s);
1819
- for (const r of s.children.value)
1820
- i.push(r);
2194
+ const r = i.shift();
2195
+ o.push(r);
2196
+ for (const l of r.children.value)
2197
+ i.push(l);
1821
2198
  }
1822
2199
  }
1823
2200
  return o;
@@ -1832,118 +2209,137 @@ class Tn {
1832
2209
  this.nodeMap.clear();
1833
2210
  }
1834
2211
  }
1835
- le = new WeakMap(), ce = new WeakSet(), // --- Internal Recursive Helper for Deletion/Cleanup ---
1836
- ke = function(t) {
2212
+ Pe = new WeakMap(), Oe = new WeakSet(), // --- Internal Recursive Helper for Deletion/Cleanup ---
2213
+ Ze = function(t) {
1837
2214
  const n = [...t.children.value];
1838
2215
  for (const o of n)
1839
- Oe(this, ce, ke).call(this, o);
2216
+ je(this, Oe, Ze).call(this, o);
1840
2217
  this.nodeMap.delete(t.id), t.children.value = [];
1841
2218
  };
1842
- function Vn(e, t = {}) {
1843
- const n = new Tn(e, t);
2219
+ function Bo(e, t, n = {}, o = {}) {
2220
+ const { parentId: i, ...r } = n, l = Lt(e, t, r), a = new Co(l, o);
1844
2221
  return {
1845
2222
  // Wrap original Tree methods in arrow functions to preserve context
1846
2223
  get nodeMap() {
1847
- return n.nodeMap;
2224
+ return a.nodeMap;
1848
2225
  },
1849
2226
  get root() {
1850
- return n.root;
2227
+ return a.root;
1851
2228
  },
1852
- findNodeById: (r) => n.findNodeById(r),
1853
- moveNode: (r, l) => n.moveNode(r, l),
1854
- dispose: () => n.dispose(),
1855
- addNode: (r, l) => n.addNode(r, l),
1856
- removeNode: (r, l) => n.removeNode(r, l),
1857
- traverse: (r, l) => n.traverse(r, l),
1858
- isTopmost: (r) => {
1859
- const l = n.findNodeById(r);
1860
- if (!l || !l.data.open.value)
1861
- return !1;
1862
- let a = l.parent.value;
1863
- for (; a; ) {
1864
- if (a.data.open.value)
1865
- return !1;
1866
- a = a.parent.value;
1867
- }
1868
- return !0;
2229
+ findNodeById: (w) => a.findNodeById(w),
2230
+ moveNode: (w, y) => a.moveNode(w, y),
2231
+ dispose: () => {
2232
+ a.dispose();
1869
2233
  },
2234
+ addNode: (w, y, C = {}) => {
2235
+ const { parentId: P, ...E } = C, T = Lt(w, y, E);
2236
+ return a.addNode(T, P);
2237
+ },
2238
+ removeNode: (w, y) => a.removeNode(w, y),
2239
+ traverse: (w, y) => a.traverse(w, y),
1870
2240
  getAllOpenNodes: () => {
1871
- const r = [];
1872
- for (const l of n.nodeMap.values())
1873
- l.data.open.value && r.push(l);
1874
- return r;
2241
+ const w = [];
2242
+ for (const y of a.nodeMap.values())
2243
+ y.data.open.value && w.push(y);
2244
+ return w;
2245
+ },
2246
+ getTopmostOpenNode: () => {
2247
+ let w = null, y = -1;
2248
+ for (const C of a.nodeMap.values())
2249
+ if (C.data.open.value) {
2250
+ const P = C.getPath().length;
2251
+ P > y && (y = P, w = C);
2252
+ }
2253
+ return w;
1875
2254
  },
1876
- forEach: (r, l, a = {}) => {
1877
- const { relationship: c = "self-and-children", applyToMatching: f = !0 } = a, u = n.findNodeById(r);
1878
- if (!u)
2255
+ forEach: (w, y, C = {}) => {
2256
+ const { relationship: P = "self-and-children", applyToMatching: E = !0 } = C, T = a.findNodeById(w);
2257
+ if (!T)
1879
2258
  return;
1880
- const m = [], h = /* @__PURE__ */ new Set(), p = (v) => {
1881
- v && !h.has(v.id) && (m.push(v), h.add(v.id));
1882
- }, d = (v) => {
1883
- for (const w of v)
1884
- p(w);
2259
+ const A = [], D = /* @__PURE__ */ new Set(), R = (M) => {
2260
+ M && !D.has(M.id) && (A.push(M), D.add(M.id));
2261
+ }, N = (M) => {
2262
+ for (const k of M)
2263
+ R(k);
1885
2264
  };
1886
- if (c === "ancestors-only")
1887
- for (const v of u.getPath())
1888
- v.id !== u.id && p(v);
1889
- else if (c === "siblings-only") {
1890
- if (u.parent.value)
1891
- for (const v of u.parent.value.children.value)
1892
- v.id !== u.id && p(v);
1893
- } else if (c === "descendants-only")
1894
- for (const v of n.traverse("dfs", u))
1895
- v.id !== u.id && p(v);
1896
- else if (c === "children-only")
1897
- d(u.children.value);
1898
- else if (c === "self-and-ancestors")
1899
- d(u.getPath());
1900
- else if (c === "self-and-children")
1901
- p(u), d(u.children.value);
1902
- else if (c === "self-and-descendants")
1903
- d(n.traverse("dfs", u));
1904
- else if (c === "self-and-siblings")
1905
- p(u), u.parent.value && d(u.parent.value.children.value);
1906
- else if (c === "self-ancestors-and-children")
1907
- d(u.getPath()), d(u.children.value);
1908
- else if (c === "full-branch")
1909
- d(u.getPath()), d(n.traverse("dfs", u));
1910
- else if (c === "all-except-branch") {
1911
- const v = /* @__PURE__ */ new Set();
1912
- for (const w of u.getPath())
1913
- v.add(w.id);
1914
- for (const w of n.traverse("dfs", u))
1915
- v.add(w.id);
1916
- for (const w of n.nodeMap.values())
1917
- !v.has(w.id) === f && l(w);
2265
+ if (P === "ancestors-only")
2266
+ for (const M of T.getPath())
2267
+ M.id !== T.id && R(M);
2268
+ else if (P === "siblings-only") {
2269
+ if (T.parent.value)
2270
+ for (const M of T.parent.value.children.value)
2271
+ M.id !== T.id && R(M);
2272
+ } else if (P === "descendants-only")
2273
+ for (const M of a.traverse("dfs", T))
2274
+ M.id !== T.id && R(M);
2275
+ else if (P === "children-only")
2276
+ N(T.children.value);
2277
+ else if (P === "self-and-ancestors")
2278
+ N(T.getPath());
2279
+ else if (P === "self-and-children")
2280
+ R(T), N(T.children.value);
2281
+ else if (P === "self-and-descendants")
2282
+ N(a.traverse("dfs", T));
2283
+ else if (P === "self-and-siblings")
2284
+ R(T), T.parent.value && N(T.parent.value.children.value);
2285
+ else if (P === "self-ancestors-and-children")
2286
+ N(T.getPath()), N(T.children.value);
2287
+ else if (P === "full-branch")
2288
+ N(T.getPath()), N(a.traverse("dfs", T));
2289
+ else if (P === "all-except-branch") {
2290
+ const M = /* @__PURE__ */ new Set();
2291
+ for (const k of T.getPath())
2292
+ M.add(k.id);
2293
+ for (const k of a.traverse("dfs", T))
2294
+ M.add(k.id);
2295
+ for (const k of a.nodeMap.values())
2296
+ !M.has(k.id) === E && y(k);
1918
2297
  return;
1919
2298
  } else {
1920
- console.warn(`forEach: Unknown relationship "${c}".`);
2299
+ console.warn(`forEach: Unknown relationship "${P}".`);
1921
2300
  return;
1922
2301
  }
1923
- if (f)
1924
- for (const v of m)
1925
- l(v);
2302
+ if (E)
2303
+ for (const M of A)
2304
+ y(M);
1926
2305
  else
1927
- for (const v of n.nodeMap.values())
1928
- h.has(v.id) || l(v);
2306
+ for (const M of a.nodeMap.values())
2307
+ D.has(M.id) || y(M);
1929
2308
  }
1930
2309
  };
1931
2310
  }
1932
2311
  export {
1933
- Tn as Tree,
1934
- ot as TreeNode,
1935
- $n as arrow,
1936
- Dn as autoUpdate,
1937
- Cn as flip,
1938
- Mn as hide,
1939
- Rn as offset,
1940
- Pn as shift,
1941
- Nn as useArrow,
1942
- Hn as useClick,
1943
- Bn as useClientPoint,
1944
- Fn as useDismiss,
1945
- An as useFloating,
1946
- Vn as useFloatingTree,
1947
- kn as useFocus,
1948
- Sn as useHover
2312
+ Co as Tree,
2313
+ Bt as TreeNode,
2314
+ kt as clearTimeoutIfSet,
2315
+ ze as contains,
2316
+ st as findDescendantContainingTarget,
2317
+ So as flip,
2318
+ rt as getContextFromParameter,
2319
+ Rt as getCurrentTime,
2320
+ lo as getTarget,
2321
+ Ao as hide,
2322
+ Mt as isButtonTarget,
2323
+ ro as isClickOnScrollbar,
2324
+ At as isEventTargetWithin,
2325
+ oo as isHTMLElement,
2326
+ Nt as isMac,
2327
+ Qe as isMouseLikePointerType,
2328
+ Dt as isSafari,
2329
+ St as isSpaceIgnored,
2330
+ J as isTargetWithinElement,
2331
+ no as isTreeNode,
2332
+ Kt as isTypeableElement,
2333
+ io as isVirtualElement,
2334
+ so as matchesFocusVisible,
2335
+ Oo as offset,
2336
+ Mo as shift,
2337
+ No as useArrow,
2338
+ ko as useClick,
2339
+ Fo as useClientPoint,
2340
+ Ho as useEscapeKey,
2341
+ Lt as useFloating,
2342
+ Bo as useFloatingTree,
2343
+ Ro as useFocus,
2344
+ Do as useHover
1949
2345
  };