v-float 0.4.0 → 0.5.0

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