v-float 0.6.0 → 0.7.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.
package/dist/v-float.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { watch as
|
|
5
|
-
function
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
const
|
|
1
|
+
var Kt = Object.defineProperty;
|
|
2
|
+
var qt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ye = (e, t, n) => qt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { watch as se, getCurrentScope as Gt, onScopeDispose as xe, computed as N, toValue as D, unref as Jt, watchPostEffect as Oe, onWatcherCleanup as ve, ref as U, watchEffect as Qt, readonly as Zt, onMounted as en, shallowRef as Ye, shallowReactive as tn } from "vue";
|
|
5
|
+
function nn(e) {
|
|
6
|
+
return Gt() ? (xe(e), !0) : !1;
|
|
7
|
+
}
|
|
8
|
+
const on = typeof window < "u" && typeof document < "u";
|
|
9
9
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const rn = Object.prototype.toString, sn = (e) => rn.call(e) === "[object Object]";
|
|
11
|
+
function Ve(e) {
|
|
12
12
|
return Array.isArray(e) ? e : [e];
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function ln(e, t, n) {
|
|
15
|
+
return se(
|
|
16
16
|
e,
|
|
17
17
|
t,
|
|
18
18
|
{
|
|
@@ -21,37 +21,37 @@ function nn(e, t, n) {
|
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
24
|
+
const an = on ? window : void 0;
|
|
25
|
+
function cn(e) {
|
|
26
26
|
var t;
|
|
27
|
-
const n =
|
|
27
|
+
const n = D(e);
|
|
28
28
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function J(...e) {
|
|
31
31
|
const t = [], n = () => {
|
|
32
32
|
t.forEach((a) => a()), t.length = 0;
|
|
33
33
|
}, o = (a, f, c, u) => (a.addEventListener(f, c, u), () => a.removeEventListener(f, c, u)), i = N(() => {
|
|
34
|
-
const a =
|
|
34
|
+
const a = Ve(D(e[0])).filter((f) => f != null);
|
|
35
35
|
return a.every((f) => typeof f != "string") ? a : void 0;
|
|
36
|
-
}), l =
|
|
36
|
+
}), l = ln(
|
|
37
37
|
() => {
|
|
38
38
|
var a, f;
|
|
39
39
|
return [
|
|
40
|
-
(f = (a = i.value) == null ? void 0 : a.map((c) =>
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
(f = (a = i.value) == null ? void 0 : a.map((c) => cn(c))) != null ? f : [an].filter((c) => c != null),
|
|
41
|
+
Ve(D(i.value ? e[1] : e[0])),
|
|
42
|
+
Ve(Jt(i.value ? e[2] : e[1])),
|
|
43
43
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
44
|
-
|
|
44
|
+
D(i.value ? e[3] : e[2])
|
|
45
45
|
];
|
|
46
46
|
},
|
|
47
47
|
([a, f, c, u]) => {
|
|
48
48
|
if (n(), !(a != null && a.length) || !(f != null && f.length) || !(c != null && c.length))
|
|
49
49
|
return;
|
|
50
|
-
const
|
|
50
|
+
const v = sn(u) ? { ...u } : u;
|
|
51
51
|
t.push(
|
|
52
52
|
...a.flatMap(
|
|
53
53
|
(h) => f.flatMap(
|
|
54
|
-
(d) => c.map((m) => o(h, d, m,
|
|
54
|
+
(d) => c.map((m) => o(h, d, m, v))
|
|
55
55
|
)
|
|
56
56
|
)
|
|
57
57
|
);
|
|
@@ -60,7 +60,7 @@ function q(...e) {
|
|
|
60
60
|
), r = () => {
|
|
61
61
|
l(), n();
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return nn(n), r;
|
|
64
64
|
}
|
|
65
65
|
function st() {
|
|
66
66
|
return typeof navigator > "u" ? !1 : navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
@@ -68,15 +68,15 @@ function st() {
|
|
|
68
68
|
function lt() {
|
|
69
69
|
return typeof navigator > "u" ? !1 : /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function un(e) {
|
|
72
72
|
return typeof (e == null ? void 0 : e.matches) != "function" ? !1 : e.matches(":focus-visible");
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Dt(e, t) {
|
|
75
75
|
if (e === void 0) return !1;
|
|
76
76
|
const n = e === "mouse";
|
|
77
77
|
return t ? n : n || e === "pen";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Mt(e) {
|
|
80
80
|
return !e || !(e instanceof HTMLElement) ? !1 : e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e.isContentEditable && e.contentEditable !== "false";
|
|
81
81
|
}
|
|
82
82
|
function at(e) {
|
|
@@ -84,18 +84,18 @@ function at(e) {
|
|
|
84
84
|
return t instanceof HTMLElement ? t.tagName === "BUTTON" || t.tagName === "INPUT" && t.getAttribute("type") === "button" || t.getAttribute("role") === "button" : !1;
|
|
85
85
|
}
|
|
86
86
|
function ct(e) {
|
|
87
|
-
return
|
|
87
|
+
return Mt(e);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function fn(e) {
|
|
90
90
|
return e instanceof Element && e instanceof HTMLElement;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Po(e) {
|
|
93
93
|
return typeof e == "object" && e !== null && "contextElement" in e;
|
|
94
94
|
}
|
|
95
95
|
function ut(e, t) {
|
|
96
96
|
return t ? "composedPath" in e && typeof e.composedPath == "function" ? e.composedPath().includes(t) : t.contains(e.target) : !1;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function dn(e, t) {
|
|
99
99
|
const n = t.getBoundingClientRect(), o = t.offsetWidth - t.clientWidth, i = t.offsetHeight - t.clientHeight, l = e.clientX - n.left, r = e.clientY - n.top;
|
|
100
100
|
if (o > 0) {
|
|
101
101
|
const a = t.clientWidth;
|
|
@@ -109,10 +109,10 @@ function an(e, t) {
|
|
|
109
109
|
}
|
|
110
110
|
return !1;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Xe(e, t) {
|
|
113
113
|
return e.contains(t);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function hn(e) {
|
|
116
116
|
return e.target;
|
|
117
117
|
}
|
|
118
118
|
function ft() {
|
|
@@ -121,11 +121,11 @@ function ft() {
|
|
|
121
121
|
function dt(e) {
|
|
122
122
|
e !== -1 && clearTimeout(e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function mn(e) {
|
|
125
125
|
return e !== null && typeof e == "object" && "data" in e && "id" in e && "children" in e && "parent" in e;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
return
|
|
127
|
+
function He(e) {
|
|
128
|
+
return mn(e) ? {
|
|
129
129
|
floatingContext: e.data,
|
|
130
130
|
treeContext: e
|
|
131
131
|
} : {
|
|
@@ -133,7 +133,7 @@ function Fe(e) {
|
|
|
133
133
|
treeContext: null
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Z(e, t) {
|
|
137
137
|
if (!t) return !1;
|
|
138
138
|
if (typeof t == "object" && t !== null && "contextElement" in t) {
|
|
139
139
|
const n = t.contextElement;
|
|
@@ -144,130 +144,130 @@ function J(e, t) {
|
|
|
144
144
|
function Ke(e, t) {
|
|
145
145
|
for (const n of e.children.value)
|
|
146
146
|
if (n.data.open.value) {
|
|
147
|
-
if (
|
|
147
|
+
if (Z(t, n.data.refs.anchorEl.value) || Z(t, n.data.refs.floatingEl.value))
|
|
148
148
|
return n;
|
|
149
149
|
const o = Ke(n, t);
|
|
150
150
|
if (o) return o;
|
|
151
151
|
}
|
|
152
152
|
return null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
const { floatingContext: n, treeContext: o } =
|
|
154
|
+
function Lo(e, t = {}) {
|
|
155
|
+
const { floatingContext: n, treeContext: o } = He(e), { open: i, setOpen: l, refs: r } = n, {
|
|
156
156
|
enabled: a = !0,
|
|
157
157
|
event: f = "click",
|
|
158
158
|
toggle: c = !0,
|
|
159
159
|
ignoreMouse: u = !1,
|
|
160
|
-
ignoreKeyboard:
|
|
160
|
+
ignoreKeyboard: v = !1,
|
|
161
161
|
ignoreTouch: h = !1,
|
|
162
162
|
// Outside click options
|
|
163
163
|
outsideClick: d = !1,
|
|
164
164
|
outsideEvent: m = "pointerdown",
|
|
165
165
|
outsideCapture: g = !0,
|
|
166
|
-
onOutsideClick:
|
|
167
|
-
preventScrollbarClick:
|
|
168
|
-
handleDragEvents:
|
|
166
|
+
onOutsideClick: p,
|
|
167
|
+
preventScrollbarClick: b = !0,
|
|
168
|
+
handleDragEvents: E = !0
|
|
169
169
|
} = t;
|
|
170
|
-
let C,
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
}),
|
|
175
|
-
function
|
|
176
|
-
|
|
170
|
+
let C, P = !1, w = !1, x = !1;
|
|
171
|
+
const O = N(() => D(a)), R = N(() => D(d)), M = N(() => {
|
|
172
|
+
const L = r.anchorEl.value;
|
|
173
|
+
return L instanceof HTMLElement ? L : null;
|
|
174
|
+
}), A = N(() => r.floatingEl.value);
|
|
175
|
+
function k() {
|
|
176
|
+
x = !0;
|
|
177
177
|
try {
|
|
178
|
-
i.value ?
|
|
178
|
+
i.value ? D(c) && l(!1) : l(!0);
|
|
179
179
|
} finally {
|
|
180
180
|
Promise.resolve().then(() => {
|
|
181
|
-
|
|
181
|
+
x = !1;
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
function W() {
|
|
186
|
-
C = void 0,
|
|
186
|
+
C = void 0, P = !1, w = !1;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
C =
|
|
188
|
+
function $(L) {
|
|
189
|
+
C = L.pointerType;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
191
|
+
function F(L) {
|
|
192
|
+
L.button === 0 && D(f) !== "click" && (V(C) || k());
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
if (
|
|
194
|
+
function T() {
|
|
195
|
+
if (D(f) === "mousedown" && C) {
|
|
196
196
|
W();
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
if (
|
|
199
|
+
if (V(C)) {
|
|
200
200
|
W();
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
k(), W();
|
|
204
204
|
}
|
|
205
|
-
function s(
|
|
206
|
-
if (C = void 0,
|
|
205
|
+
function s(L) {
|
|
206
|
+
if (C = void 0, L.defaultPrevented || D(v) || at(L))
|
|
207
207
|
return;
|
|
208
|
-
const
|
|
209
|
-
|
|
208
|
+
const X = M.value;
|
|
209
|
+
X && (L.key === " " && !ct(X) && (L.preventDefault(), P = !0), L.key === "Enter" && k());
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
const
|
|
213
|
-
|
|
211
|
+
function H(L) {
|
|
212
|
+
const X = M.value;
|
|
213
|
+
X && (L.defaultPrevented || D(v) || at(L) || ct(X) || L.key === " " && P && (P = !1, k()));
|
|
214
214
|
}
|
|
215
|
-
function y(
|
|
216
|
-
if (!
|
|
215
|
+
function y(L) {
|
|
216
|
+
if (!O.value || !R.value || !i.value)
|
|
217
217
|
return;
|
|
218
|
-
if (
|
|
218
|
+
if (D(m) === "click" && D(E) && w) {
|
|
219
219
|
w = !1;
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
222
|
+
if (x)
|
|
223
223
|
return;
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
224
|
+
const X = L.target;
|
|
225
|
+
if (X && !(D(b) && fn(X) && A.value && dn(L, X))) {
|
|
226
226
|
if (o) {
|
|
227
|
-
if (!
|
|
227
|
+
if (!vn(o, X))
|
|
228
228
|
return;
|
|
229
|
-
} else if (ut(
|
|
229
|
+
} else if (ut(L, M.value) || ut(L, A.value))
|
|
230
230
|
return;
|
|
231
|
-
|
|
231
|
+
p ? p(L, n) : l(!1);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function I() {
|
|
235
235
|
w = !0;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function oe() {
|
|
238
238
|
setTimeout(() => {
|
|
239
239
|
w = !1;
|
|
240
240
|
}, 0);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
return !!(
|
|
242
|
+
function V(L) {
|
|
243
|
+
return !!(Dt(L, !0) && D(u) || L === "touch" && D(h));
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
!
|
|
248
|
-
|
|
245
|
+
Oe(() => {
|
|
246
|
+
const L = M.value;
|
|
247
|
+
!O.value || !L || (L.addEventListener("pointerdown", $), L.addEventListener("mousedown", F), L.addEventListener("click", T), L.addEventListener("keydown", s), L.addEventListener("keyup", H), ve(() => {
|
|
248
|
+
L.removeEventListener("pointerdown", $), L.removeEventListener("mousedown", F), L.removeEventListener("click", T), L.removeEventListener("keydown", s), L.removeEventListener("keyup", H), W();
|
|
249
249
|
}));
|
|
250
|
-
}),
|
|
251
|
-
() =>
|
|
252
|
-
() =>
|
|
250
|
+
}), J(
|
|
251
|
+
() => O.value && R.value ? document : null,
|
|
252
|
+
() => D(m),
|
|
253
253
|
y,
|
|
254
|
-
{ capture:
|
|
255
|
-
),
|
|
256
|
-
() =>
|
|
254
|
+
{ capture: D(g) }
|
|
255
|
+
), J(
|
|
256
|
+
() => O.value && R.value && D(E) ? A.value : null,
|
|
257
257
|
"mousedown",
|
|
258
|
-
|
|
258
|
+
I,
|
|
259
259
|
{ capture: !0 }
|
|
260
|
-
),
|
|
261
|
-
() =>
|
|
260
|
+
), J(
|
|
261
|
+
() => O.value && R.value && D(E) ? A.value : null,
|
|
262
262
|
"mouseup",
|
|
263
|
-
|
|
263
|
+
oe,
|
|
264
264
|
{ capture: !0 }
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
return !(
|
|
267
|
+
function vn(e, t) {
|
|
268
|
+
return !(Z(t, e.data.refs.anchorEl.value) || Z(t, e.data.refs.floatingEl.value) || Ke(e, t));
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const De = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, me = class me {
|
|
271
271
|
/**
|
|
272
272
|
* Create a virtual anchor element
|
|
273
273
|
*/
|
|
@@ -314,8 +314,8 @@ const Ae = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, ce = cl
|
|
|
314
314
|
return this.buildDOMRect({
|
|
315
315
|
x: 0,
|
|
316
316
|
y: 0,
|
|
317
|
-
width:
|
|
318
|
-
height:
|
|
317
|
+
width: me.DEFAULT_DIMENSIONS.width,
|
|
318
|
+
height: me.DEFAULT_DIMENSIONS.height
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
/**
|
|
@@ -357,7 +357,7 @@ const Ae = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, ce = cl
|
|
|
357
357
|
return {
|
|
358
358
|
width: o(
|
|
359
359
|
n.width,
|
|
360
|
-
|
|
360
|
+
me.DEFAULT_DIMENSIONS.width
|
|
361
361
|
),
|
|
362
362
|
height: 0
|
|
363
363
|
};
|
|
@@ -366,7 +366,7 @@ const Ae = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, ce = cl
|
|
|
366
366
|
width: 0,
|
|
367
367
|
height: o(
|
|
368
368
|
n.height,
|
|
369
|
-
|
|
369
|
+
me.DEFAULT_DIMENSIONS.height
|
|
370
370
|
)
|
|
371
371
|
};
|
|
372
372
|
}
|
|
@@ -389,12 +389,12 @@ const Ae = (e) => typeof e == "number" && Number.isFinite(e) ? e : null, ce = cl
|
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
};
|
|
392
|
-
|
|
393
|
-
let
|
|
394
|
-
class
|
|
392
|
+
ye(me, "DEFAULT_DIMENSIONS", { width: 100, height: 30 });
|
|
393
|
+
let _e = me;
|
|
394
|
+
class Rt {
|
|
395
395
|
constructor() {
|
|
396
396
|
// The core state every strategy needs: the last known good coordinates
|
|
397
|
-
|
|
397
|
+
ye(this, "lastKnownCoordinates", null);
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
400
400
|
* Get coordinates to use when the floating element opens
|
|
@@ -417,10 +417,10 @@ class Mt {
|
|
|
417
417
|
this.lastKnownCoordinates = null;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class pn extends Rt {
|
|
421
421
|
constructor() {
|
|
422
422
|
super(...arguments);
|
|
423
|
-
|
|
423
|
+
ye(this, "name", "follow");
|
|
424
424
|
}
|
|
425
425
|
/**
|
|
426
426
|
* Follow strategy needs all pointer events for continuous tracking
|
|
@@ -438,7 +438,7 @@ class dn extends Mt {
|
|
|
438
438
|
case "pointerdown":
|
|
439
439
|
return i;
|
|
440
440
|
case "pointermove":
|
|
441
|
-
return o.isOpen &&
|
|
441
|
+
return o.isOpen && Dt(n.originalEvent.pointerType, !0) ? i : null;
|
|
442
442
|
case "pointerenter":
|
|
443
443
|
return i;
|
|
444
444
|
default:
|
|
@@ -446,13 +446,13 @@ class dn extends Mt {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
class
|
|
449
|
+
class gn extends Rt {
|
|
450
450
|
constructor() {
|
|
451
451
|
super(...arguments);
|
|
452
|
-
|
|
452
|
+
ye(this, "name", "static");
|
|
453
453
|
// Static strategy needs to remember the "trigger" coordinates from clicks
|
|
454
454
|
// These take priority over hover coordinates for positioning
|
|
455
|
-
|
|
455
|
+
ye(this, "triggerCoordinates", null);
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* Static strategy only needs click events, not hover or continuous movement
|
|
@@ -485,40 +485,40 @@ class hn extends Mt {
|
|
|
485
485
|
this.triggerCoordinates = null;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const { open: o, refs: i } = t, l = new
|
|
490
|
-
() => u.value !== null &&
|
|
488
|
+
function So(e, t, n = {}) {
|
|
489
|
+
const { open: o, refs: i } = t, l = new _e(), r = U({ x: null, y: null }), a = U(null), f = N(() => D(n.axis ?? "both")), c = N(() => D(n.enabled ?? !0)), u = N(() => De(D(n.x ?? null))), v = N(() => De(D(n.y ?? null))), h = N(
|
|
490
|
+
() => u.value !== null && v.value !== null
|
|
491
491
|
), d = N(() => h.value ? {
|
|
492
492
|
x: u.value,
|
|
493
|
-
y:
|
|
493
|
+
y: v.value
|
|
494
494
|
} : r.value), m = N(() => {
|
|
495
|
-
const
|
|
495
|
+
const x = d.value;
|
|
496
496
|
switch (f.value) {
|
|
497
497
|
case "x":
|
|
498
|
-
return { x:
|
|
498
|
+
return { x: x.x, y: null };
|
|
499
499
|
case "y":
|
|
500
|
-
return { x: null, y:
|
|
500
|
+
return { x: null, y: x.y };
|
|
501
501
|
case "both":
|
|
502
|
-
return
|
|
502
|
+
return x;
|
|
503
503
|
}
|
|
504
|
-
}), g = (n.trackingMode ?? "follow") === "follow" ? new
|
|
504
|
+
}), g = (n.trackingMode ?? "follow") === "follow" ? new pn() : new gn(), p = (x, O) => {
|
|
505
505
|
h.value || (r.value = {
|
|
506
|
-
x:
|
|
507
|
-
y:
|
|
506
|
+
x: De(x),
|
|
507
|
+
y: De(O)
|
|
508
508
|
});
|
|
509
|
-
},
|
|
509
|
+
}, b = () => {
|
|
510
510
|
h.value || (r.value = { x: null, y: null });
|
|
511
|
-
},
|
|
512
|
-
const
|
|
513
|
-
type:
|
|
514
|
-
coordinates: { x:
|
|
515
|
-
originalEvent:
|
|
516
|
-
},
|
|
511
|
+
}, E = (x, O) => {
|
|
512
|
+
const R = {
|
|
513
|
+
type: O,
|
|
514
|
+
coordinates: { x: x.clientX, y: x.clientY },
|
|
515
|
+
originalEvent: x
|
|
516
|
+
}, M = g.process(R, {
|
|
517
517
|
isOpen: o.value
|
|
518
518
|
});
|
|
519
|
-
|
|
519
|
+
M && p(M.x, M.y);
|
|
520
520
|
};
|
|
521
|
-
|
|
521
|
+
se(
|
|
522
522
|
[m, a, f, e],
|
|
523
523
|
() => {
|
|
524
524
|
i.anchorEl.value = l.create({
|
|
@@ -529,61 +529,61 @@ function Co(e, t, n = {}) {
|
|
|
529
529
|
});
|
|
530
530
|
},
|
|
531
531
|
{ immediate: !0 }
|
|
532
|
-
),
|
|
532
|
+
), se(o, (x) => {
|
|
533
533
|
if (!(!c.value || h.value))
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
|
|
534
|
+
if (x) {
|
|
535
|
+
const O = g.getCoordinatesForOpening();
|
|
536
|
+
O ? (p(O.x, O.y), a.value = { ...O }) : a.value = { ...r.value };
|
|
537
537
|
} else
|
|
538
|
-
g.onClose(),
|
|
538
|
+
g.onClose(), b(), a.value = null;
|
|
539
539
|
});
|
|
540
|
-
const C = (
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
|
|
544
|
-
}, w = (
|
|
545
|
-
|
|
540
|
+
const C = (x) => {
|
|
541
|
+
E(x, "pointerdown");
|
|
542
|
+
}, P = (x) => {
|
|
543
|
+
E(x, "pointerenter");
|
|
544
|
+
}, w = (x) => {
|
|
545
|
+
E(x, "pointermove");
|
|
546
546
|
};
|
|
547
|
-
return
|
|
547
|
+
return Qt(() => {
|
|
548
548
|
if (h.value || !c.value) return;
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
551
|
-
const
|
|
552
|
-
pointerenter:
|
|
549
|
+
const x = e.value;
|
|
550
|
+
if (!x) return;
|
|
551
|
+
const O = g.getRequiredEvents(), R = {
|
|
552
|
+
pointerenter: P,
|
|
553
553
|
pointerdown: C,
|
|
554
554
|
pointermove: w
|
|
555
555
|
};
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
}),
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
|
|
556
|
+
O.forEach((M) => {
|
|
557
|
+
const A = R[M];
|
|
558
|
+
A && x.addEventListener(M, A);
|
|
559
|
+
}), ve(() => {
|
|
560
|
+
O.forEach((M) => {
|
|
561
|
+
const A = R[M];
|
|
562
|
+
A && x.removeEventListener(M, A);
|
|
563
563
|
});
|
|
564
564
|
});
|
|
565
565
|
}), {
|
|
566
|
-
coordinates:
|
|
567
|
-
updatePosition: (
|
|
566
|
+
coordinates: Zt(m),
|
|
567
|
+
updatePosition: (x, O) => p(x, O)
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
const { floatingContext: n, treeContext: o } =
|
|
572
|
-
|
|
573
|
-
if (!(c.key !== "Escape" || !
|
|
570
|
+
function Ao(e, t = {}) {
|
|
571
|
+
const { floatingContext: n, treeContext: o } = He(e), { enabled: i = !0, capture: l = !1, onEscape: r } = t, { isComposing: a } = yn();
|
|
572
|
+
J(document, "keydown", (c) => {
|
|
573
|
+
if (!(c.key !== "Escape" || !D(i) || a())) {
|
|
574
574
|
if (r) {
|
|
575
575
|
r(c);
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
578
|
if (o) {
|
|
579
|
-
const u =
|
|
579
|
+
const u = wn(o);
|
|
580
580
|
u && u.data.setOpen(!1);
|
|
581
581
|
} else
|
|
582
582
|
n.setOpen(!1);
|
|
583
583
|
}
|
|
584
584
|
}, l);
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function wn(e) {
|
|
587
587
|
let t = e;
|
|
588
588
|
for (; t.parent.value && !t.isRoot; )
|
|
589
589
|
t = t.parent.value;
|
|
@@ -598,36 +598,36 @@ function mn(e) {
|
|
|
598
598
|
};
|
|
599
599
|
return i(t), n;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
const e =
|
|
603
|
-
return
|
|
601
|
+
function yn() {
|
|
602
|
+
const e = U(!1);
|
|
603
|
+
return J(document, "compositionstart", () => {
|
|
604
604
|
e.value = !0;
|
|
605
|
-
}),
|
|
605
|
+
}), J(document, "compositionend", () => {
|
|
606
606
|
e.value = !1;
|
|
607
607
|
}), {
|
|
608
608
|
isComposing: () => e.value
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
const { floatingContext: n, treeContext: o } =
|
|
611
|
+
function Do(e, t = {}) {
|
|
612
|
+
const { floatingContext: n, treeContext: o } = He(e), {
|
|
613
613
|
open: i,
|
|
614
614
|
setOpen: l,
|
|
615
615
|
refs: { floatingEl: r, anchorEl: a }
|
|
616
616
|
} = n, { enabled: f = !0, requireFocusVisible: c = !0 } = t, u = N(() => a.value ? a.value instanceof HTMLElement ? a.value : a.value.contextElement : null);
|
|
617
|
-
let
|
|
618
|
-
|
|
619
|
-
!i.value && u.value && u.value === document.activeElement && (
|
|
620
|
-
}),
|
|
621
|
-
|
|
622
|
-
}),
|
|
623
|
-
st() && lt() && (
|
|
617
|
+
let v = !1, h = !0, d;
|
|
618
|
+
J(window, "blur", () => {
|
|
619
|
+
!i.value && u.value && u.value === document.activeElement && (v = !0);
|
|
620
|
+
}), J(window, "focus", () => {
|
|
621
|
+
v = !1;
|
|
622
|
+
}), en(() => {
|
|
623
|
+
st() && lt() && (J(
|
|
624
624
|
window,
|
|
625
625
|
"keydown",
|
|
626
626
|
() => {
|
|
627
627
|
h = !0;
|
|
628
628
|
},
|
|
629
629
|
{ capture: !0 }
|
|
630
|
-
),
|
|
630
|
+
), J(
|
|
631
631
|
window,
|
|
632
632
|
"pointerdown",
|
|
633
633
|
() => {
|
|
@@ -636,71 +636,71 @@ function Oo(e, t = {}) {
|
|
|
636
636
|
{ capture: !0 }
|
|
637
637
|
));
|
|
638
638
|
});
|
|
639
|
-
function m(
|
|
640
|
-
if (
|
|
641
|
-
|
|
639
|
+
function m(p) {
|
|
640
|
+
if (v) {
|
|
641
|
+
v = !1;
|
|
642
642
|
return;
|
|
643
643
|
}
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
646
|
-
if (st() && lt() && !
|
|
647
|
-
if (!h && !
|
|
644
|
+
const b = p.target;
|
|
645
|
+
if (D(c) && b) {
|
|
646
|
+
if (st() && lt() && !p.relatedTarget) {
|
|
647
|
+
if (!h && !Mt(b))
|
|
648
648
|
return;
|
|
649
|
-
} else if (!
|
|
649
|
+
} else if (!un(b))
|
|
650
650
|
return;
|
|
651
651
|
}
|
|
652
652
|
l(!0);
|
|
653
653
|
}
|
|
654
|
-
function g(
|
|
654
|
+
function g(p) {
|
|
655
655
|
clearTimeout(d), d = window.setTimeout(() => {
|
|
656
656
|
var C;
|
|
657
|
-
const
|
|
658
|
-
if (!(!
|
|
657
|
+
const E = (((C = u.value) == null ? void 0 : C.ownerDocument) ?? document).activeElement;
|
|
658
|
+
if (!(!p.relatedTarget && E === u.value)) {
|
|
659
659
|
if (o) {
|
|
660
|
-
if (
|
|
660
|
+
if (E && bn(o, E))
|
|
661
661
|
return;
|
|
662
|
-
} else if (r.value &&
|
|
662
|
+
} else if (r.value && E && r.value.contains(E))
|
|
663
663
|
return;
|
|
664
664
|
l(!1);
|
|
665
665
|
}
|
|
666
666
|
}, 0);
|
|
667
667
|
}
|
|
668
|
-
|
|
669
|
-
if (!
|
|
670
|
-
const
|
|
671
|
-
!
|
|
672
|
-
|
|
668
|
+
Oe(() => {
|
|
669
|
+
if (!D(f)) return;
|
|
670
|
+
const p = u.value;
|
|
671
|
+
!p || !(p instanceof HTMLElement) || (p.addEventListener("focus", m), p.addEventListener("blur", g), ve(() => {
|
|
672
|
+
p.removeEventListener("focus", m), p.removeEventListener("blur", g);
|
|
673
673
|
}));
|
|
674
|
-
}),
|
|
674
|
+
}), xe(() => {
|
|
675
675
|
clearTimeout(d);
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
return
|
|
678
|
+
function bn(e, t) {
|
|
679
|
+
return Z(t, e.data.refs.anchorEl.value) || Z(t, e.data.refs.floatingEl.value) ? !0 : Nt(e, t) !== null;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function Nt(e, t) {
|
|
682
682
|
for (const n of e.children.value)
|
|
683
683
|
if (n.data.open.value) {
|
|
684
|
-
if (
|
|
684
|
+
if (Z(t, n.data.refs.anchorEl.value) || Z(t, n.data.refs.floatingEl.value))
|
|
685
685
|
return n;
|
|
686
|
-
const o =
|
|
686
|
+
const o = Nt(n, t);
|
|
687
687
|
if (o) return o;
|
|
688
688
|
}
|
|
689
689
|
return null;
|
|
690
690
|
}
|
|
691
|
-
let
|
|
692
|
-
function
|
|
693
|
-
return `vfloat-id-${
|
|
691
|
+
let xn = 0;
|
|
692
|
+
function En() {
|
|
693
|
+
return `vfloat-id-${xn++}`;
|
|
694
694
|
}
|
|
695
695
|
function ht(e) {
|
|
696
696
|
return typeof e == "object" && e instanceof HTMLElement;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function kt(e) {
|
|
699
699
|
return e.children.value.some(
|
|
700
|
-
(t) => t.data.open.value ||
|
|
700
|
+
(t) => t.data.open.value || kt(t)
|
|
701
701
|
);
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Cn(e, t) {
|
|
704
704
|
return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
|
|
705
705
|
}
|
|
706
706
|
function mt(e, t) {
|
|
@@ -708,16 +708,16 @@ function mt(e, t) {
|
|
|
708
708
|
let i = !1;
|
|
709
709
|
const l = t.length;
|
|
710
710
|
for (let r = 0, a = l - 1; r < l; a = r++) {
|
|
711
|
-
const [f, c] = t[r] || [0, 0], [u,
|
|
712
|
-
c >= o !=
|
|
711
|
+
const [f, c] = t[r] || [0, 0], [u, v] = t[a] || [0, 0];
|
|
712
|
+
c >= o != v >= o && n <= (u - f) * (o - c) / (v - c) + f && (i = !i);
|
|
713
713
|
}
|
|
714
714
|
return i;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function Tn(e = {}) {
|
|
717
717
|
const { blockPointerEvents: t = !1, requireIntent: n = !0 } = e;
|
|
718
718
|
let o = -1, i = !1;
|
|
719
|
-
function l(a, f, c, u,
|
|
720
|
-
const h = ft(), d = h -
|
|
719
|
+
function l(a, f, c, u, v) {
|
|
720
|
+
const h = ft(), d = h - v;
|
|
721
721
|
if (c === null || u === null || d === 0)
|
|
722
722
|
return {
|
|
723
723
|
speed: null,
|
|
@@ -734,168 +734,168 @@ function bn(e = {}) {
|
|
|
734
734
|
};
|
|
735
735
|
}
|
|
736
736
|
const r = function(f) {
|
|
737
|
-
const { x: c, y: u, placement:
|
|
737
|
+
const { x: c, y: u, placement: v, elements: h, buffer: d, onClose: m, nodeId: g, tree: p } = f, b = N(() => {
|
|
738
738
|
const w = h.domReference;
|
|
739
739
|
return ht(w) ? w : (w == null ? void 0 : w.contextElement) ?? null;
|
|
740
740
|
});
|
|
741
|
-
let
|
|
742
|
-
return function(
|
|
743
|
-
var
|
|
744
|
-
function
|
|
741
|
+
let E = null, C = null, P = ft();
|
|
742
|
+
return function(x) {
|
|
743
|
+
var Ae, et, tt, nt, ot, it, rt;
|
|
744
|
+
function O() {
|
|
745
745
|
dt(o), o = -1, m();
|
|
746
746
|
}
|
|
747
|
-
if (dt(o), o = -1, !h.domReference || !h.floating ||
|
|
747
|
+
if (dt(o), o = -1, !h.domReference || !h.floating || v == null || c == null || u == null)
|
|
748
748
|
return;
|
|
749
|
-
const { clientX:
|
|
750
|
-
if (
|
|
749
|
+
const { clientX: R, clientY: M } = x, A = [R, M], k = hn(x), W = x.type === "mouseleave", $ = h.floating && Xe(h.floating, k), F = b.value && Xe(b.value, k), T = (Ae = b.value) == null ? void 0 : Ae.getBoundingClientRect(), s = (et = h.floating) == null ? void 0 : et.getBoundingClientRect(), H = v.split("-")[0], y = c > ((s == null ? void 0 : s.right) ?? 0) - ((s == null ? void 0 : s.width) ?? 0) / 2, I = u > ((s == null ? void 0 : s.bottom) ?? 0) - ((s == null ? void 0 : s.height) ?? 0) / 2, oe = T ? Cn(A, T) : !1, V = ((s == null ? void 0 : s.width) ?? 0) > ((T == null ? void 0 : T.width) ?? 0), L = ((s == null ? void 0 : s.height) ?? 0) > ((T == null ? void 0 : T.height) ?? 0), X = ((tt = V ? T : s) == null ? void 0 : tt.left) ?? 0, ue = ((nt = V ? T : s) == null ? void 0 : nt.right) ?? 0, z = ((ot = L ? T : s) == null ? void 0 : ot.top) ?? 0, fe = ((it = L ? T : s) == null ? void 0 : it.bottom) ?? 0;
|
|
750
|
+
if ($ && (i = !0, !W))
|
|
751
751
|
return;
|
|
752
|
-
if (
|
|
752
|
+
if (F && (i = !1), F && !W) {
|
|
753
753
|
i = !0;
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
if (W && ht(
|
|
756
|
+
if (W && ht(x.relatedTarget) && h.floating && Xe(h.floating, x.relatedTarget))
|
|
757
757
|
return;
|
|
758
|
-
if (
|
|
759
|
-
const
|
|
760
|
-
if (
|
|
758
|
+
if (p && g) {
|
|
759
|
+
const B = p.nodes.get(g);
|
|
760
|
+
if (B && kt(B))
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
|
-
if (
|
|
764
|
-
return
|
|
765
|
-
let
|
|
766
|
-
switch (
|
|
763
|
+
if (H === "top" && u >= ((T == null ? void 0 : T.bottom) ?? 0) - 1 || H === "bottom" && u <= ((T == null ? void 0 : T.top) ?? 0) + 1 || H === "left" && c >= ((T == null ? void 0 : T.right) ?? 0) - 1 || H === "right" && c <= ((T == null ? void 0 : T.left) ?? 0) + 1)
|
|
764
|
+
return O();
|
|
765
|
+
let re = [];
|
|
766
|
+
switch (H) {
|
|
767
767
|
case "top":
|
|
768
|
-
|
|
769
|
-
[
|
|
770
|
-
[
|
|
771
|
-
[
|
|
772
|
-
[
|
|
768
|
+
re = [
|
|
769
|
+
[X, ((T == null ? void 0 : T.top) ?? 0) + 1],
|
|
770
|
+
[X, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
771
|
+
[ue, ((s == null ? void 0 : s.bottom) ?? 0) - 1],
|
|
772
|
+
[ue, ((T == null ? void 0 : T.top) ?? 0) + 1]
|
|
773
773
|
];
|
|
774
774
|
break;
|
|
775
775
|
case "bottom":
|
|
776
|
-
|
|
777
|
-
[
|
|
778
|
-
[
|
|
779
|
-
[
|
|
780
|
-
[
|
|
776
|
+
re = [
|
|
777
|
+
[X, ((s == null ? void 0 : s.top) ?? 0) + 1],
|
|
778
|
+
[X, ((T == null ? void 0 : T.bottom) ?? 0) - 1],
|
|
779
|
+
[ue, ((T == null ? void 0 : T.bottom) ?? 0) - 1],
|
|
780
|
+
[ue, ((s == null ? void 0 : s.top) ?? 0) + 1]
|
|
781
781
|
];
|
|
782
782
|
break;
|
|
783
783
|
case "left":
|
|
784
|
-
|
|
785
|
-
[((s == null ? void 0 : s.right) ?? 0) - 1,
|
|
784
|
+
re = [
|
|
785
|
+
[((s == null ? void 0 : s.right) ?? 0) - 1, fe],
|
|
786
786
|
[((s == null ? void 0 : s.right) ?? 0) - 1, z],
|
|
787
|
-
[((
|
|
788
|
-
[((
|
|
787
|
+
[((T == null ? void 0 : T.left) ?? 0) + 1, z],
|
|
788
|
+
[((T == null ? void 0 : T.left) ?? 0) + 1, fe]
|
|
789
789
|
];
|
|
790
790
|
break;
|
|
791
791
|
case "right":
|
|
792
|
-
|
|
793
|
-
[((
|
|
794
|
-
[((
|
|
792
|
+
re = [
|
|
793
|
+
[((T == null ? void 0 : T.right) ?? 0) - 1, fe],
|
|
794
|
+
[((T == null ? void 0 : T.right) ?? 0) - 1, z],
|
|
795
795
|
[((s == null ? void 0 : s.left) ?? 0) + 1, z],
|
|
796
|
-
[((s == null ? void 0 : s.left) ?? 0) + 1,
|
|
796
|
+
[((s == null ? void 0 : s.left) ?? 0) + 1, fe]
|
|
797
797
|
];
|
|
798
798
|
break;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
const
|
|
802
|
-
switch (
|
|
800
|
+
function Se([B, j]) {
|
|
801
|
+
const S = d;
|
|
802
|
+
switch (H) {
|
|
803
803
|
case "top": {
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
j +
|
|
807
|
-
],
|
|
808
|
-
|
|
809
|
-
j +
|
|
810
|
-
],
|
|
804
|
+
const de = [
|
|
805
|
+
V ? B + S / 2 : y ? B + S * 4 : B - S * 4,
|
|
806
|
+
j + S + 1
|
|
807
|
+
], he = [
|
|
808
|
+
V ? B - S / 2 : y ? B + S * 4 : B - S * 4,
|
|
809
|
+
j + S + 1
|
|
810
|
+
], we = [
|
|
811
811
|
[
|
|
812
812
|
(s == null ? void 0 : s.left) ?? 0,
|
|
813
|
-
y ||
|
|
813
|
+
y || V ? ((s == null ? void 0 : s.bottom) ?? 0) - S : (s == null ? void 0 : s.top) ?? 0
|
|
814
814
|
],
|
|
815
815
|
[
|
|
816
816
|
(s == null ? void 0 : s.right) ?? 0,
|
|
817
|
-
y ?
|
|
817
|
+
y ? V ? ((s == null ? void 0 : s.bottom) ?? 0) - S : (s == null ? void 0 : s.top) ?? 0 : ((s == null ? void 0 : s.bottom) ?? 0) - S
|
|
818
818
|
]
|
|
819
819
|
];
|
|
820
|
-
return [
|
|
820
|
+
return [de, he, ...we];
|
|
821
821
|
}
|
|
822
822
|
case "bottom": {
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
j -
|
|
826
|
-
],
|
|
827
|
-
|
|
828
|
-
j -
|
|
829
|
-
],
|
|
823
|
+
const de = [
|
|
824
|
+
V ? B + S / 2 : y ? B + S * 4 : B - S * 4,
|
|
825
|
+
j - S
|
|
826
|
+
], he = [
|
|
827
|
+
V ? B - S / 2 : y ? B + S * 4 : B - S * 4,
|
|
828
|
+
j - S
|
|
829
|
+
], we = [
|
|
830
830
|
[
|
|
831
831
|
(s == null ? void 0 : s.left) ?? 0,
|
|
832
|
-
y ||
|
|
832
|
+
y || V ? ((s == null ? void 0 : s.top) ?? 0) + S : (s == null ? void 0 : s.bottom) ?? 0
|
|
833
833
|
],
|
|
834
834
|
[
|
|
835
835
|
(s == null ? void 0 : s.right) ?? 0,
|
|
836
|
-
y ?
|
|
836
|
+
y ? V ? ((s == null ? void 0 : s.top) ?? 0) + S : (s == null ? void 0 : s.bottom) ?? 0 : ((s == null ? void 0 : s.top) ?? 0) + S
|
|
837
837
|
]
|
|
838
838
|
];
|
|
839
|
-
return [
|
|
839
|
+
return [de, he, ...we];
|
|
840
840
|
}
|
|
841
841
|
case "left": {
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
],
|
|
846
|
-
|
|
847
|
-
|
|
842
|
+
const de = [
|
|
843
|
+
B + S + 1,
|
|
844
|
+
L ? j + S / 2 : I ? j + S * 4 : j - S * 4
|
|
845
|
+
], he = [
|
|
846
|
+
B + S + 1,
|
|
847
|
+
L ? j - S / 2 : I ? j + S * 4 : j - S * 4
|
|
848
848
|
];
|
|
849
849
|
return [...[
|
|
850
850
|
[
|
|
851
|
-
|
|
851
|
+
I || L ? ((s == null ? void 0 : s.right) ?? 0) - S : (s == null ? void 0 : s.left) ?? 0,
|
|
852
852
|
(s == null ? void 0 : s.top) ?? 0
|
|
853
853
|
],
|
|
854
854
|
[
|
|
855
|
-
|
|
855
|
+
I ? L ? ((s == null ? void 0 : s.right) ?? 0) - S : (s == null ? void 0 : s.left) ?? 0 : ((s == null ? void 0 : s.right) ?? 0) - S,
|
|
856
856
|
(s == null ? void 0 : s.bottom) ?? 0
|
|
857
857
|
]
|
|
858
|
-
],
|
|
858
|
+
], de, he];
|
|
859
859
|
}
|
|
860
860
|
case "right": {
|
|
861
|
-
const
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
],
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
],
|
|
861
|
+
const de = [
|
|
862
|
+
B - S,
|
|
863
|
+
L ? j + S / 2 : I ? j + S * 4 : j - S * 4
|
|
864
|
+
], he = [
|
|
865
|
+
B - S,
|
|
866
|
+
L ? j - S / 2 : I ? j + S * 4 : j - S * 4
|
|
867
|
+
], we = [
|
|
868
868
|
[
|
|
869
|
-
|
|
869
|
+
I || L ? ((s == null ? void 0 : s.left) ?? 0) + S : (s == null ? void 0 : s.right) ?? 0,
|
|
870
870
|
(s == null ? void 0 : s.top) ?? 0
|
|
871
871
|
],
|
|
872
872
|
[
|
|
873
|
-
|
|
873
|
+
I ? L ? ((s == null ? void 0 : s.left) ?? 0) + S : (s == null ? void 0 : s.right) ?? 0 : ((s == null ? void 0 : s.left) ?? 0) + S,
|
|
874
874
|
(s == null ? void 0 : s.bottom) ?? 0
|
|
875
875
|
]
|
|
876
876
|
];
|
|
877
|
-
return [
|
|
877
|
+
return [de, he, ...we];
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
const
|
|
882
|
-
if ((rt = e.onPolygonChange) == null || rt.call(e,
|
|
883
|
-
if (mt(
|
|
881
|
+
const ge = Se([c, u]);
|
|
882
|
+
if ((rt = e.onPolygonChange) == null || rt.call(e, ge), !mt(A, re)) {
|
|
883
|
+
if (mt(A, ge)) {
|
|
884
884
|
if (!i && n) {
|
|
885
|
-
const
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
885
|
+
const B = l(
|
|
886
|
+
x.clientX,
|
|
887
|
+
x.clientY,
|
|
888
|
+
E,
|
|
889
889
|
C,
|
|
890
|
-
|
|
890
|
+
P
|
|
891
891
|
);
|
|
892
|
-
|
|
892
|
+
E = B.lastX, C = B.lastY, P = B.lastCursorTime, B.speed !== null && B.speed < 0.1 && (o = window.setTimeout(O, 40));
|
|
893
893
|
}
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
if (i && !
|
|
897
|
-
return
|
|
898
|
-
|
|
896
|
+
if (i && !oe)
|
|
897
|
+
return O();
|
|
898
|
+
O();
|
|
899
899
|
}
|
|
900
900
|
};
|
|
901
901
|
};
|
|
@@ -903,20 +903,20 @@ function bn(e = {}) {
|
|
|
903
903
|
blockPointerEvents: t
|
|
904
904
|
}, r;
|
|
905
905
|
}
|
|
906
|
-
const
|
|
907
|
-
function
|
|
906
|
+
const vt = 10;
|
|
907
|
+
function On(e, t, n) {
|
|
908
908
|
const { delay: o } = n, i = N(() => {
|
|
909
|
-
const c =
|
|
909
|
+
const c = D(o);
|
|
910
910
|
return (typeof c == "number" ? c : c.open) ?? 0;
|
|
911
911
|
}), l = N(() => {
|
|
912
|
-
const c =
|
|
912
|
+
const c = D(o);
|
|
913
913
|
return (typeof c == "number" ? c : c.close) ?? 0;
|
|
914
914
|
});
|
|
915
915
|
let r, a;
|
|
916
916
|
const f = () => {
|
|
917
917
|
clearTimeout(r), clearTimeout(a);
|
|
918
918
|
};
|
|
919
|
-
return
|
|
919
|
+
return xe(f), {
|
|
920
920
|
show: (c) => {
|
|
921
921
|
f();
|
|
922
922
|
const u = c ?? i.value;
|
|
@@ -932,8 +932,8 @@ function xn(e, t, n) {
|
|
|
932
932
|
clearTimeouts: f
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
const { floatingContext: n, treeContext: o } =
|
|
935
|
+
function Mo(e, t = {}) {
|
|
936
|
+
const { floatingContext: n, treeContext: o } = He(e), {
|
|
937
937
|
open: i,
|
|
938
938
|
setOpen: l,
|
|
939
939
|
refs: { anchorEl: r, floatingEl: a }
|
|
@@ -941,12 +941,12 @@ function Po(e, t = {}) {
|
|
|
941
941
|
enabled: f = !0,
|
|
942
942
|
delay: c = 0,
|
|
943
943
|
restMs: u = 0,
|
|
944
|
-
mouseOnly:
|
|
944
|
+
mouseOnly: v = !1,
|
|
945
945
|
safePolygon: h = !1
|
|
946
|
-
} = t, d = N(() =>
|
|
946
|
+
} = t, d = N(() => D(f)), m = N(() => D(u)), g = N(() => {
|
|
947
947
|
const y = r.value;
|
|
948
948
|
return !y || y instanceof HTMLElement ? y : y.contextElement ?? null;
|
|
949
|
-
}), { hide:
|
|
949
|
+
}), { hide: p, show: b, showDelay: E, clearTimeouts: C } = On(
|
|
950
950
|
() => {
|
|
951
951
|
i.value || l(!0);
|
|
952
952
|
},
|
|
@@ -955,188 +955,188 @@ function Po(e, t = {}) {
|
|
|
955
955
|
},
|
|
956
956
|
{ delay: c }
|
|
957
957
|
);
|
|
958
|
-
let
|
|
959
|
-
const
|
|
960
|
-
function
|
|
961
|
-
if (!d.value || !
|
|
962
|
-
const
|
|
963
|
-
(
|
|
964
|
-
|
|
958
|
+
let P = null, w;
|
|
959
|
+
const x = N(() => E.value === 0 && m.value > 0);
|
|
960
|
+
function O(y) {
|
|
961
|
+
if (!d.value || !A(y) || !x.value || !P) return;
|
|
962
|
+
const I = { x: y.clientX, y: y.clientY }, oe = Math.abs(I.x - P.x), V = Math.abs(I.y - P.y);
|
|
963
|
+
(oe > vt || V > vt) && (P = I, clearTimeout(w), w = setTimeout(() => {
|
|
964
|
+
b(0);
|
|
965
965
|
}, m.value));
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
!d.value || !
|
|
969
|
-
|
|
967
|
+
function R(y) {
|
|
968
|
+
!d.value || !A(y) || !x.value || (P = { x: y.clientX, y: y.clientY }, w = setTimeout(() => {
|
|
969
|
+
b(0);
|
|
970
970
|
}, m.value));
|
|
971
971
|
}
|
|
972
|
-
function
|
|
973
|
-
clearTimeout(w),
|
|
972
|
+
function M() {
|
|
973
|
+
clearTimeout(w), P = null;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
Oe(() => {
|
|
976
976
|
const y = g.value;
|
|
977
|
-
!y || !d.value || !
|
|
978
|
-
y.removeEventListener("pointerenter",
|
|
977
|
+
!y || !d.value || !x.value || (y.addEventListener("pointerenter", R), y.addEventListener("pointermove", O), y.addEventListener("pointerleave", M), ve(() => {
|
|
978
|
+
y.removeEventListener("pointerenter", R), y.removeEventListener("pointermove", O), y.removeEventListener("pointerleave", M);
|
|
979
979
|
}));
|
|
980
|
-
}),
|
|
980
|
+
}), xe(() => {
|
|
981
981
|
clearTimeout(w);
|
|
982
982
|
});
|
|
983
|
-
function
|
|
984
|
-
return
|
|
983
|
+
function A(y) {
|
|
984
|
+
return D(v) ? y.pointerType === "mouse" : !0;
|
|
985
985
|
}
|
|
986
|
-
function
|
|
987
|
-
!d.value || !
|
|
986
|
+
function k(y) {
|
|
987
|
+
!d.value || !A(y) || x.value || (F(), b());
|
|
988
988
|
}
|
|
989
989
|
function W(y) {
|
|
990
|
-
!d.value || !
|
|
990
|
+
!d.value || !A(y) || (C(), F());
|
|
991
991
|
}
|
|
992
|
-
let
|
|
993
|
-
function
|
|
994
|
-
|
|
992
|
+
let $ = null;
|
|
993
|
+
function F() {
|
|
994
|
+
$ && (document.removeEventListener("pointermove", $), $ = null);
|
|
995
995
|
const y = s.value;
|
|
996
996
|
y != null && y.onPolygonChange && y.onPolygonChange([]);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
999
|
-
const y =
|
|
998
|
+
const T = N(() => !!D(h)), s = N(() => {
|
|
999
|
+
const y = D(h);
|
|
1000
1000
|
if (typeof y == "object" && y) return y;
|
|
1001
1001
|
if (y === !0) return {};
|
|
1002
1002
|
});
|
|
1003
|
-
function
|
|
1004
|
-
var
|
|
1005
|
-
if (!d.value || !
|
|
1006
|
-
const { clientX:
|
|
1007
|
-
if (
|
|
1003
|
+
function H(y) {
|
|
1004
|
+
var L;
|
|
1005
|
+
if (!d.value || !A(y)) return;
|
|
1006
|
+
const { clientX: I, clientY: oe } = y, V = y.relatedTarget;
|
|
1007
|
+
if (T.value)
|
|
1008
1008
|
setTimeout(() => {
|
|
1009
|
-
var
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
if (!
|
|
1013
|
-
|
|
1009
|
+
var re;
|
|
1010
|
+
F();
|
|
1011
|
+
const X = g.value, ue = a.value;
|
|
1012
|
+
if (!X || !ue) {
|
|
1013
|
+
p();
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
|
-
let z,
|
|
1016
|
+
let z, fe;
|
|
1017
1017
|
if (o) {
|
|
1018
1018
|
z = /* @__PURE__ */ new Map();
|
|
1019
|
-
const
|
|
1020
|
-
z == null || z.set(
|
|
1021
|
-
for (const
|
|
1022
|
-
|
|
1019
|
+
const Se = (ge) => {
|
|
1020
|
+
z == null || z.set(ge.id, ge);
|
|
1021
|
+
for (const Ae of ge.children.value)
|
|
1022
|
+
Se(Ae);
|
|
1023
1023
|
};
|
|
1024
|
-
|
|
1024
|
+
Se(o), fe = o.id;
|
|
1025
1025
|
}
|
|
1026
|
-
|
|
1027
|
-
x:
|
|
1028
|
-
y:
|
|
1026
|
+
$ = Tn(s.value)({
|
|
1027
|
+
x: I,
|
|
1028
|
+
y: oe,
|
|
1029
1029
|
placement: n.placement.value,
|
|
1030
1030
|
elements: {
|
|
1031
|
-
domReference:
|
|
1032
|
-
floating:
|
|
1031
|
+
domReference: X,
|
|
1032
|
+
floating: ue
|
|
1033
1033
|
},
|
|
1034
|
-
buffer: ((
|
|
1034
|
+
buffer: ((re = s.value) == null ? void 0 : re.buffer) ?? 1,
|
|
1035
1035
|
onClose: () => {
|
|
1036
|
-
|
|
1036
|
+
F(), p();
|
|
1037
1037
|
},
|
|
1038
|
-
nodeId:
|
|
1038
|
+
nodeId: fe,
|
|
1039
1039
|
tree: z ? { nodes: z } : void 0
|
|
1040
|
-
}),
|
|
1040
|
+
}), $ && document.addEventListener("pointermove", $);
|
|
1041
1041
|
}, 0);
|
|
1042
1042
|
else {
|
|
1043
1043
|
if (o) {
|
|
1044
|
-
if (!
|
|
1044
|
+
if (!Pn(o, V))
|
|
1045
1045
|
return;
|
|
1046
|
-
} else if ((
|
|
1046
|
+
} else if ((L = a.value) != null && L.contains(V))
|
|
1047
1047
|
return;
|
|
1048
|
-
|
|
1048
|
+
p();
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1051
|
+
Oe(() => {
|
|
1052
1052
|
const y = g.value;
|
|
1053
|
-
!y || !d.value || (y.addEventListener("pointerenter",
|
|
1054
|
-
y.removeEventListener("pointerenter",
|
|
1053
|
+
!y || !d.value || (y.addEventListener("pointerenter", k), y.addEventListener("pointerleave", H), ve(() => {
|
|
1054
|
+
y.removeEventListener("pointerenter", k), y.removeEventListener("pointerleave", H);
|
|
1055
1055
|
}));
|
|
1056
|
-
}),
|
|
1056
|
+
}), Oe(() => {
|
|
1057
1057
|
const y = a.value;
|
|
1058
|
-
!y || !d.value || (y.addEventListener("pointerenter", W), y.addEventListener("pointerleave",
|
|
1059
|
-
y.removeEventListener("pointerenter", W), y.removeEventListener("pointerleave",
|
|
1058
|
+
!y || !d.value || (y.addEventListener("pointerenter", W), y.addEventListener("pointerleave", H), ve(() => {
|
|
1059
|
+
y.removeEventListener("pointerenter", W), y.removeEventListener("pointerleave", H);
|
|
1060
1060
|
}));
|
|
1061
|
-
}),
|
|
1062
|
-
|
|
1061
|
+
}), xe(() => {
|
|
1062
|
+
F();
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return t ? !(
|
|
1065
|
+
function Pn(e, t) {
|
|
1066
|
+
return t ? !(Z(t, e.data.refs.anchorEl.value) || Z(t, e.data.refs.floatingEl.value) || Ke(e, t)) : !0;
|
|
1067
1067
|
}
|
|
1068
|
-
const
|
|
1068
|
+
const Ft = ["top", "right", "bottom", "left"], pt = ["start", "end"], gt = /* @__PURE__ */ Ft.reduce((e, t) => e.concat(t, t + "-" + pt[0], t + "-" + pt[1]), []), le = Math.min, Y = Math.max, Re = Math.round, Me = Math.floor, Q = (e) => ({
|
|
1069
1069
|
x: e,
|
|
1070
1070
|
y: e
|
|
1071
|
-
}),
|
|
1071
|
+
}), Ln = {
|
|
1072
1072
|
left: "right",
|
|
1073
1073
|
right: "left",
|
|
1074
1074
|
bottom: "top",
|
|
1075
1075
|
top: "bottom"
|
|
1076
|
-
},
|
|
1076
|
+
}, Sn = {
|
|
1077
1077
|
start: "end",
|
|
1078
1078
|
end: "start"
|
|
1079
1079
|
};
|
|
1080
1080
|
function ze(e, t, n) {
|
|
1081
|
-
return
|
|
1081
|
+
return Y(e, le(t, n));
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function ce(e, t) {
|
|
1084
1084
|
return typeof e == "function" ? e(t) : e;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function ee(e) {
|
|
1087
1087
|
return e.split("-")[0];
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function K(e) {
|
|
1090
1090
|
return e.split("-")[1];
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Ht(e) {
|
|
1093
1093
|
return e === "x" ? "y" : "x";
|
|
1094
1094
|
}
|
|
1095
1095
|
function qe(e) {
|
|
1096
1096
|
return e === "y" ? "height" : "width";
|
|
1097
1097
|
}
|
|
1098
|
-
const
|
|
1099
|
-
function
|
|
1100
|
-
return
|
|
1098
|
+
const An = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1099
|
+
function ie(e) {
|
|
1100
|
+
return An.has(ee(e)) ? "y" : "x";
|
|
1101
1101
|
}
|
|
1102
1102
|
function Ge(e) {
|
|
1103
|
-
return
|
|
1103
|
+
return Ht(ie(e));
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function It(e, t, n) {
|
|
1106
1106
|
n === void 0 && (n = !1);
|
|
1107
|
-
const o =
|
|
1107
|
+
const o = K(e), i = Ge(e), l = qe(i);
|
|
1108
1108
|
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1109
|
-
return t.reference[l] > t.floating[l] && (r =
|
|
1109
|
+
return t.reference[l] > t.floating[l] && (r = ke(r)), [r, ke(r)];
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
const t =
|
|
1113
|
-
return [
|
|
1111
|
+
function Dn(e) {
|
|
1112
|
+
const t = ke(e);
|
|
1113
|
+
return [Ne(e), t, Ne(t)];
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return e.replace(/start|end/g, (t) =>
|
|
1115
|
+
function Ne(e) {
|
|
1116
|
+
return e.replace(/start|end/g, (t) => Sn[t]);
|
|
1117
1117
|
}
|
|
1118
|
-
const
|
|
1119
|
-
function
|
|
1118
|
+
const wt = ["left", "right"], yt = ["right", "left"], Mn = ["top", "bottom"], Rn = ["bottom", "top"];
|
|
1119
|
+
function Nn(e, t, n) {
|
|
1120
1120
|
switch (e) {
|
|
1121
1121
|
case "top":
|
|
1122
1122
|
case "bottom":
|
|
1123
|
-
return n ? t ?
|
|
1123
|
+
return n ? t ? yt : wt : t ? wt : yt;
|
|
1124
1124
|
case "left":
|
|
1125
1125
|
case "right":
|
|
1126
|
-
return t ?
|
|
1126
|
+
return t ? Mn : Rn;
|
|
1127
1127
|
default:
|
|
1128
1128
|
return [];
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1132
|
-
const i =
|
|
1133
|
-
let l =
|
|
1134
|
-
return i && (l = l.map((r) => r + "-" + i), t && (l = l.concat(l.map(
|
|
1131
|
+
function kn(e, t, n, o) {
|
|
1132
|
+
const i = K(e);
|
|
1133
|
+
let l = Nn(ee(e), n === "start", o);
|
|
1134
|
+
return i && (l = l.map((r) => r + "-" + i), t && (l = l.concat(l.map(Ne)))), l;
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
1136
|
+
function ke(e) {
|
|
1137
|
+
return e.replace(/left|right|bottom|top/g, (t) => Ln[t]);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function Fn(e) {
|
|
1140
1140
|
return {
|
|
1141
1141
|
top: 0,
|
|
1142
1142
|
right: 0,
|
|
@@ -1145,15 +1145,15 @@ function Rn(e) {
|
|
|
1145
1145
|
...e
|
|
1146
1146
|
};
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return typeof e != "number" ?
|
|
1148
|
+
function Bt(e) {
|
|
1149
|
+
return typeof e != "number" ? Fn(e) : {
|
|
1150
1150
|
top: e,
|
|
1151
1151
|
right: e,
|
|
1152
1152
|
bottom: e,
|
|
1153
1153
|
left: e
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function Fe(e) {
|
|
1157
1157
|
const {
|
|
1158
1158
|
x: t,
|
|
1159
1159
|
y: n,
|
|
@@ -1171,12 +1171,12 @@ function Re(e) {
|
|
|
1171
1171
|
y: n
|
|
1172
1172
|
};
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function bt(e, t, n) {
|
|
1175
1175
|
let {
|
|
1176
1176
|
reference: o,
|
|
1177
1177
|
floating: i
|
|
1178
1178
|
} = e;
|
|
1179
|
-
const l =
|
|
1179
|
+
const l = ie(t), r = Ge(t), a = qe(r), f = ee(t), c = l === "y", u = o.x + o.width / 2 - i.width / 2, v = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
1180
1180
|
let d;
|
|
1181
1181
|
switch (f) {
|
|
1182
1182
|
case "top":
|
|
@@ -1194,13 +1194,13 @@ function wt(e, t, n) {
|
|
|
1194
1194
|
case "right":
|
|
1195
1195
|
d = {
|
|
1196
1196
|
x: o.x + o.width,
|
|
1197
|
-
y:
|
|
1197
|
+
y: v
|
|
1198
1198
|
};
|
|
1199
1199
|
break;
|
|
1200
1200
|
case "left":
|
|
1201
1201
|
d = {
|
|
1202
1202
|
x: o.x - i.width,
|
|
1203
|
-
y:
|
|
1203
|
+
y: v
|
|
1204
1204
|
};
|
|
1205
1205
|
break;
|
|
1206
1206
|
default:
|
|
@@ -1209,7 +1209,7 @@ function wt(e, t, n) {
|
|
|
1209
1209
|
y: o.y
|
|
1210
1210
|
};
|
|
1211
1211
|
}
|
|
1212
|
-
switch (
|
|
1212
|
+
switch (K(t)) {
|
|
1213
1213
|
case "start":
|
|
1214
1214
|
d[r] -= h * (n && c ? -1 : 1);
|
|
1215
1215
|
break;
|
|
@@ -1219,7 +1219,7 @@ function wt(e, t, n) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
return d;
|
|
1221
1221
|
}
|
|
1222
|
-
const
|
|
1222
|
+
const Hn = async (e, t, n) => {
|
|
1223
1223
|
const {
|
|
1224
1224
|
placement: o = "bottom",
|
|
1225
1225
|
strategy: i = "absolute",
|
|
@@ -1232,20 +1232,20 @@ const kn = async (e, t, n) => {
|
|
|
1232
1232
|
strategy: i
|
|
1233
1233
|
}), {
|
|
1234
1234
|
x: u,
|
|
1235
|
-
y:
|
|
1236
|
-
} =
|
|
1235
|
+
y: v
|
|
1236
|
+
} = bt(c, o, f), h = o, d = {}, m = 0;
|
|
1237
1237
|
for (let g = 0; g < a.length; g++) {
|
|
1238
1238
|
const {
|
|
1239
|
-
name:
|
|
1240
|
-
fn:
|
|
1239
|
+
name: p,
|
|
1240
|
+
fn: b
|
|
1241
1241
|
} = a[g], {
|
|
1242
|
-
x:
|
|
1242
|
+
x: E,
|
|
1243
1243
|
y: C,
|
|
1244
|
-
data:
|
|
1244
|
+
data: P,
|
|
1245
1245
|
reset: w
|
|
1246
|
-
} = await
|
|
1246
|
+
} = await b({
|
|
1247
1247
|
x: u,
|
|
1248
|
-
y:
|
|
1248
|
+
y: v,
|
|
1249
1249
|
initialPlacement: o,
|
|
1250
1250
|
placement: h,
|
|
1251
1251
|
strategy: i,
|
|
@@ -1257,11 +1257,11 @@ const kn = async (e, t, n) => {
|
|
|
1257
1257
|
floating: t
|
|
1258
1258
|
}
|
|
1259
1259
|
});
|
|
1260
|
-
u =
|
|
1260
|
+
u = E ?? u, v = C ?? v, d = {
|
|
1261
1261
|
...d,
|
|
1262
|
-
[
|
|
1263
|
-
...d[
|
|
1264
|
-
...
|
|
1262
|
+
[p]: {
|
|
1263
|
+
...d[p],
|
|
1264
|
+
...P
|
|
1265
1265
|
}
|
|
1266
1266
|
}, w && m <= 50 && (m++, typeof w == "object" && (w.placement && (h = w.placement), w.rects && (c = w.rects === !0 ? await r.getElementRects({
|
|
1267
1267
|
reference: e,
|
|
@@ -1269,18 +1269,18 @@ const kn = async (e, t, n) => {
|
|
|
1269
1269
|
strategy: i
|
|
1270
1270
|
}) : w.rects), {
|
|
1271
1271
|
x: u,
|
|
1272
|
-
y:
|
|
1273
|
-
} =
|
|
1272
|
+
y: v
|
|
1273
|
+
} = bt(c, h, f)), g = -1);
|
|
1274
1274
|
}
|
|
1275
1275
|
return {
|
|
1276
1276
|
x: u,
|
|
1277
|
-
y:
|
|
1277
|
+
y: v,
|
|
1278
1278
|
placement: h,
|
|
1279
1279
|
strategy: i,
|
|
1280
1280
|
middlewareData: d
|
|
1281
1281
|
};
|
|
1282
1282
|
};
|
|
1283
|
-
async function
|
|
1283
|
+
async function Ee(e, t) {
|
|
1284
1284
|
var n;
|
|
1285
1285
|
t === void 0 && (t = {});
|
|
1286
1286
|
const {
|
|
@@ -1293,39 +1293,39 @@ async function ke(e, t) {
|
|
|
1293
1293
|
} = e, {
|
|
1294
1294
|
boundary: c = "clippingAncestors",
|
|
1295
1295
|
rootBoundary: u = "viewport",
|
|
1296
|
-
elementContext:
|
|
1296
|
+
elementContext: v = "floating",
|
|
1297
1297
|
altBoundary: h = !1,
|
|
1298
1298
|
padding: d = 0
|
|
1299
|
-
} =
|
|
1300
|
-
element: (n = await (l.isElement == null ? void 0 : l.isElement(
|
|
1299
|
+
} = ce(t, e), m = Bt(d), p = a[h ? v === "floating" ? "reference" : "floating" : v], b = Fe(await l.getClippingRect({
|
|
1300
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(p))) == null || n ? p : p.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(a.floating)),
|
|
1301
1301
|
boundary: c,
|
|
1302
1302
|
rootBoundary: u,
|
|
1303
1303
|
strategy: f
|
|
1304
|
-
})),
|
|
1304
|
+
})), E = v === "floating" ? {
|
|
1305
1305
|
x: o,
|
|
1306
1306
|
y: i,
|
|
1307
1307
|
width: r.floating.width,
|
|
1308
1308
|
height: r.floating.height
|
|
1309
|
-
} : r.reference, C = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a.floating)),
|
|
1309
|
+
} : r.reference, C = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a.floating)), P = await (l.isElement == null ? void 0 : l.isElement(C)) ? await (l.getScale == null ? void 0 : l.getScale(C)) || {
|
|
1310
1310
|
x: 1,
|
|
1311
1311
|
y: 1
|
|
1312
1312
|
} : {
|
|
1313
1313
|
x: 1,
|
|
1314
1314
|
y: 1
|
|
1315
|
-
}, w =
|
|
1315
|
+
}, w = Fe(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1316
1316
|
elements: a,
|
|
1317
|
-
rect:
|
|
1317
|
+
rect: E,
|
|
1318
1318
|
offsetParent: C,
|
|
1319
1319
|
strategy: f
|
|
1320
|
-
}) :
|
|
1320
|
+
}) : E);
|
|
1321
1321
|
return {
|
|
1322
|
-
top: (
|
|
1323
|
-
bottom: (w.bottom -
|
|
1324
|
-
left: (
|
|
1325
|
-
right: (w.right -
|
|
1322
|
+
top: (b.top - w.top + m.top) / P.y,
|
|
1323
|
+
bottom: (w.bottom - b.bottom + m.bottom) / P.y,
|
|
1324
|
+
left: (b.left - w.left + m.left) / P.x,
|
|
1325
|
+
right: (w.right - b.right + m.right) / P.x
|
|
1326
1326
|
};
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const In = (e) => ({
|
|
1329
1329
|
name: "arrow",
|
|
1330
1330
|
options: e,
|
|
1331
1331
|
async fn(t) {
|
|
@@ -1340,29 +1340,101 @@ const Fn = (e) => ({
|
|
|
1340
1340
|
} = t, {
|
|
1341
1341
|
element: c,
|
|
1342
1342
|
padding: u = 0
|
|
1343
|
-
} =
|
|
1343
|
+
} = ce(e, t) || {};
|
|
1344
1344
|
if (c == null)
|
|
1345
1345
|
return {};
|
|
1346
|
-
const
|
|
1346
|
+
const v = Bt(u), h = {
|
|
1347
1347
|
x: n,
|
|
1348
1348
|
y: o
|
|
1349
|
-
}, d = Ge(i), m = qe(d), g = await r.getDimensions(c),
|
|
1350
|
-
let
|
|
1351
|
-
(!
|
|
1352
|
-
const
|
|
1349
|
+
}, d = Ge(i), m = qe(d), g = await r.getDimensions(c), p = d === "y", b = p ? "top" : "left", E = p ? "bottom" : "right", C = p ? "clientHeight" : "clientWidth", P = l.reference[m] + l.reference[d] - h[d] - l.floating[m], w = h[d] - l.reference[d], x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
1350
|
+
let O = x ? x[C] : 0;
|
|
1351
|
+
(!O || !await (r.isElement == null ? void 0 : r.isElement(x))) && (O = a.floating[C] || l.floating[m]);
|
|
1352
|
+
const R = P / 2 - w / 2, M = O / 2 - g[m] / 2 - 1, A = le(v[b], M), k = le(v[E], M), W = A, $ = O - g[m] - k, F = O / 2 - g[m] / 2 + R, T = ze(W, F, $), s = !f.arrow && K(i) != null && F !== T && l.reference[m] / 2 - (F < W ? A : k) - g[m] / 2 < 0, H = s ? F < W ? F - W : F - $ : 0;
|
|
1353
1353
|
return {
|
|
1354
|
-
[d]: h[d] +
|
|
1354
|
+
[d]: h[d] + H,
|
|
1355
1355
|
data: {
|
|
1356
|
-
[d]:
|
|
1357
|
-
centerOffset:
|
|
1356
|
+
[d]: T,
|
|
1357
|
+
centerOffset: F - T - H,
|
|
1358
1358
|
...s && {
|
|
1359
|
-
alignmentOffset:
|
|
1359
|
+
alignmentOffset: H
|
|
1360
1360
|
}
|
|
1361
1361
|
},
|
|
1362
1362
|
reset: s
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
|
-
})
|
|
1365
|
+
});
|
|
1366
|
+
function Bn(e, t, n) {
|
|
1367
|
+
return (e ? [...n.filter((i) => K(i) === e), ...n.filter((i) => K(i) !== e)] : n.filter((i) => ee(i) === i)).filter((i) => e ? K(i) === e || (t ? Ne(i) !== i : !1) : !0);
|
|
1368
|
+
}
|
|
1369
|
+
const Wn = function(e) {
|
|
1370
|
+
return e === void 0 && (e = {}), {
|
|
1371
|
+
name: "autoPlacement",
|
|
1372
|
+
options: e,
|
|
1373
|
+
async fn(t) {
|
|
1374
|
+
var n, o, i;
|
|
1375
|
+
const {
|
|
1376
|
+
rects: l,
|
|
1377
|
+
middlewareData: r,
|
|
1378
|
+
placement: a,
|
|
1379
|
+
platform: f,
|
|
1380
|
+
elements: c
|
|
1381
|
+
} = t, {
|
|
1382
|
+
crossAxis: u = !1,
|
|
1383
|
+
alignment: v,
|
|
1384
|
+
allowedPlacements: h = gt,
|
|
1385
|
+
autoAlignment: d = !0,
|
|
1386
|
+
...m
|
|
1387
|
+
} = ce(e, t), g = v !== void 0 || h === gt ? Bn(v || null, d, h) : h, p = await Ee(t, m), b = ((n = r.autoPlacement) == null ? void 0 : n.index) || 0, E = g[b];
|
|
1388
|
+
if (E == null)
|
|
1389
|
+
return {};
|
|
1390
|
+
const C = It(E, l, await (f.isRTL == null ? void 0 : f.isRTL(c.floating)));
|
|
1391
|
+
if (a !== E)
|
|
1392
|
+
return {
|
|
1393
|
+
reset: {
|
|
1394
|
+
placement: g[0]
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
const P = [p[ee(E)], p[C[0]], p[C[1]]], w = [...((o = r.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
1398
|
+
placement: E,
|
|
1399
|
+
overflows: P
|
|
1400
|
+
}], x = g[b + 1];
|
|
1401
|
+
if (x)
|
|
1402
|
+
return {
|
|
1403
|
+
data: {
|
|
1404
|
+
index: b + 1,
|
|
1405
|
+
overflows: w
|
|
1406
|
+
},
|
|
1407
|
+
reset: {
|
|
1408
|
+
placement: x
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
const O = w.map((A) => {
|
|
1412
|
+
const k = K(A.placement);
|
|
1413
|
+
return [A.placement, k && u ? (
|
|
1414
|
+
// Check along the mainAxis and main crossAxis side.
|
|
1415
|
+
A.overflows.slice(0, 2).reduce((W, $) => W + $, 0)
|
|
1416
|
+
) : (
|
|
1417
|
+
// Check only the mainAxis.
|
|
1418
|
+
A.overflows[0]
|
|
1419
|
+
), A.overflows];
|
|
1420
|
+
}).sort((A, k) => A[1] - k[1]), M = ((i = O.filter((A) => A[2].slice(
|
|
1421
|
+
0,
|
|
1422
|
+
// Aligned placements should not check their opposite crossAxis
|
|
1423
|
+
// side.
|
|
1424
|
+
K(A[0]) ? 2 : 3
|
|
1425
|
+
).every((k) => k <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
|
|
1426
|
+
return M !== a ? {
|
|
1427
|
+
data: {
|
|
1428
|
+
index: b + 1,
|
|
1429
|
+
overflows: w
|
|
1430
|
+
},
|
|
1431
|
+
reset: {
|
|
1432
|
+
placement: M
|
|
1433
|
+
}
|
|
1434
|
+
} : {};
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
}, $n = function(e) {
|
|
1366
1438
|
return e === void 0 && (e = {}), {
|
|
1367
1439
|
name: "flip",
|
|
1368
1440
|
options: e,
|
|
@@ -1377,56 +1449,56 @@ const Fn = (e) => ({
|
|
|
1377
1449
|
elements: c
|
|
1378
1450
|
} = t, {
|
|
1379
1451
|
mainAxis: u = !0,
|
|
1380
|
-
crossAxis:
|
|
1452
|
+
crossAxis: v = !0,
|
|
1381
1453
|
fallbackPlacements: h,
|
|
1382
1454
|
fallbackStrategy: d = "bestFit",
|
|
1383
1455
|
fallbackAxisSideDirection: m = "none",
|
|
1384
1456
|
flipAlignment: g = !0,
|
|
1385
|
-
...
|
|
1386
|
-
} =
|
|
1457
|
+
...p
|
|
1458
|
+
} = ce(e, t);
|
|
1387
1459
|
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
1388
1460
|
return {};
|
|
1389
|
-
const
|
|
1390
|
-
!h &&
|
|
1391
|
-
const
|
|
1392
|
-
let
|
|
1393
|
-
if (u &&
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1461
|
+
const b = ee(i), E = ie(a), C = ee(a) === a, P = await (f.isRTL == null ? void 0 : f.isRTL(c.floating)), w = h || (C || !g ? [ke(a)] : Dn(a)), x = m !== "none";
|
|
1462
|
+
!h && x && w.push(...kn(a, g, m, P));
|
|
1463
|
+
const O = [a, ...w], R = await Ee(t, p), M = [];
|
|
1464
|
+
let A = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
1465
|
+
if (u && M.push(R[b]), v) {
|
|
1466
|
+
const F = It(i, r, P);
|
|
1467
|
+
M.push(R[F[0]], R[F[1]]);
|
|
1396
1468
|
}
|
|
1397
|
-
if (
|
|
1469
|
+
if (A = [...A, {
|
|
1398
1470
|
placement: i,
|
|
1399
|
-
overflows:
|
|
1400
|
-
}], !
|
|
1401
|
-
var
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1471
|
+
overflows: M
|
|
1472
|
+
}], !M.every((F) => F <= 0)) {
|
|
1473
|
+
var k, W;
|
|
1474
|
+
const F = (((k = l.flip) == null ? void 0 : k.index) || 0) + 1, T = O[F];
|
|
1475
|
+
if (T && (!(v === "alignment" ? E !== ie(T) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1404
1476
|
// overflows the main axis.
|
|
1405
|
-
|
|
1477
|
+
A.every((y) => ie(y.placement) === E ? y.overflows[0] > 0 : !0)))
|
|
1406
1478
|
return {
|
|
1407
1479
|
data: {
|
|
1408
|
-
index:
|
|
1409
|
-
overflows:
|
|
1480
|
+
index: F,
|
|
1481
|
+
overflows: A
|
|
1410
1482
|
},
|
|
1411
1483
|
reset: {
|
|
1412
|
-
placement:
|
|
1484
|
+
placement: T
|
|
1413
1485
|
}
|
|
1414
1486
|
};
|
|
1415
|
-
let s = (W =
|
|
1487
|
+
let s = (W = A.filter((H) => H.overflows[0] <= 0).sort((H, y) => H.overflows[1] - y.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
1416
1488
|
if (!s)
|
|
1417
1489
|
switch (d) {
|
|
1418
1490
|
case "bestFit": {
|
|
1419
|
-
var
|
|
1420
|
-
const
|
|
1421
|
-
if (
|
|
1422
|
-
const
|
|
1423
|
-
return
|
|
1491
|
+
var $;
|
|
1492
|
+
const H = ($ = A.filter((y) => {
|
|
1493
|
+
if (x) {
|
|
1494
|
+
const I = ie(y.placement);
|
|
1495
|
+
return I === E || // Create a bias to the `y` side axis due to horizontal
|
|
1424
1496
|
// reading directions favoring greater width.
|
|
1425
|
-
|
|
1497
|
+
I === "y";
|
|
1426
1498
|
}
|
|
1427
1499
|
return !0;
|
|
1428
|
-
}).map((y) => [y.placement, y.overflows.filter((
|
|
1429
|
-
|
|
1500
|
+
}).map((y) => [y.placement, y.overflows.filter((I) => I > 0).reduce((I, oe) => I + oe, 0)]).sort((y, I) => y[1] - I[1])[0]) == null ? void 0 : $[0];
|
|
1501
|
+
H && (s = H);
|
|
1430
1502
|
break;
|
|
1431
1503
|
}
|
|
1432
1504
|
case "initialPlacement":
|
|
@@ -1444,7 +1516,7 @@ const Fn = (e) => ({
|
|
|
1444
1516
|
}
|
|
1445
1517
|
};
|
|
1446
1518
|
};
|
|
1447
|
-
function
|
|
1519
|
+
function xt(e, t) {
|
|
1448
1520
|
return {
|
|
1449
1521
|
top: e.top - t.height,
|
|
1450
1522
|
right: e.right - t.width,
|
|
@@ -1452,10 +1524,10 @@ function yt(e, t) {
|
|
|
1452
1524
|
left: e.left - t.width
|
|
1453
1525
|
};
|
|
1454
1526
|
}
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1527
|
+
function Et(e) {
|
|
1528
|
+
return Ft.some((t) => e[t] >= 0);
|
|
1457
1529
|
}
|
|
1458
|
-
const
|
|
1530
|
+
const Vn = function(e) {
|
|
1459
1531
|
return e === void 0 && (e = {}), {
|
|
1460
1532
|
name: "hide",
|
|
1461
1533
|
options: e,
|
|
@@ -1465,29 +1537,29 @@ const In = function(e) {
|
|
|
1465
1537
|
} = t, {
|
|
1466
1538
|
strategy: o = "referenceHidden",
|
|
1467
1539
|
...i
|
|
1468
|
-
} =
|
|
1540
|
+
} = ce(e, t);
|
|
1469
1541
|
switch (o) {
|
|
1470
1542
|
case "referenceHidden": {
|
|
1471
|
-
const l = await
|
|
1543
|
+
const l = await Ee(t, {
|
|
1472
1544
|
...i,
|
|
1473
1545
|
elementContext: "reference"
|
|
1474
|
-
}), r =
|
|
1546
|
+
}), r = xt(l, n.reference);
|
|
1475
1547
|
return {
|
|
1476
1548
|
data: {
|
|
1477
1549
|
referenceHiddenOffsets: r,
|
|
1478
|
-
referenceHidden:
|
|
1550
|
+
referenceHidden: Et(r)
|
|
1479
1551
|
}
|
|
1480
1552
|
};
|
|
1481
1553
|
}
|
|
1482
1554
|
case "escaped": {
|
|
1483
|
-
const l = await
|
|
1555
|
+
const l = await Ee(t, {
|
|
1484
1556
|
...i,
|
|
1485
1557
|
altBoundary: !0
|
|
1486
|
-
}), r =
|
|
1558
|
+
}), r = xt(l, n.floating);
|
|
1487
1559
|
return {
|
|
1488
1560
|
data: {
|
|
1489
1561
|
escapedOffsets: r,
|
|
1490
|
-
escaped:
|
|
1562
|
+
escaped: Et(r)
|
|
1491
1563
|
}
|
|
1492
1564
|
};
|
|
1493
1565
|
}
|
|
@@ -1496,25 +1568,25 @@ const In = function(e) {
|
|
|
1496
1568
|
}
|
|
1497
1569
|
}
|
|
1498
1570
|
};
|
|
1499
|
-
},
|
|
1500
|
-
async function
|
|
1571
|
+
}, Xn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1572
|
+
async function jn(e, t) {
|
|
1501
1573
|
const {
|
|
1502
1574
|
placement: n,
|
|
1503
1575
|
platform: o,
|
|
1504
1576
|
elements: i
|
|
1505
|
-
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r =
|
|
1577
|
+
} = e, l = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = ee(n), a = K(n), f = ie(n) === "y", c = Xn.has(r) ? -1 : 1, u = l && f ? -1 : 1, v = ce(t, e);
|
|
1506
1578
|
let {
|
|
1507
1579
|
mainAxis: h,
|
|
1508
1580
|
crossAxis: d,
|
|
1509
1581
|
alignmentAxis: m
|
|
1510
|
-
} = typeof
|
|
1511
|
-
mainAxis:
|
|
1582
|
+
} = typeof v == "number" ? {
|
|
1583
|
+
mainAxis: v,
|
|
1512
1584
|
crossAxis: 0,
|
|
1513
1585
|
alignmentAxis: null
|
|
1514
1586
|
} : {
|
|
1515
|
-
mainAxis:
|
|
1516
|
-
crossAxis:
|
|
1517
|
-
alignmentAxis:
|
|
1587
|
+
mainAxis: v.mainAxis || 0,
|
|
1588
|
+
crossAxis: v.crossAxis || 0,
|
|
1589
|
+
alignmentAxis: v.alignmentAxis
|
|
1518
1590
|
};
|
|
1519
1591
|
return a && typeof m == "number" && (d = a === "end" ? m * -1 : m), f ? {
|
|
1520
1592
|
x: d * u,
|
|
@@ -1524,7 +1596,7 @@ async function Wn(e, t) {
|
|
|
1524
1596
|
y: d * u
|
|
1525
1597
|
};
|
|
1526
1598
|
}
|
|
1527
|
-
const
|
|
1599
|
+
const Yn = function(e) {
|
|
1528
1600
|
return e === void 0 && (e = 0), {
|
|
1529
1601
|
name: "offset",
|
|
1530
1602
|
options: e,
|
|
@@ -1535,7 +1607,7 @@ const $n = function(e) {
|
|
|
1535
1607
|
y: l,
|
|
1536
1608
|
placement: r,
|
|
1537
1609
|
middlewareData: a
|
|
1538
|
-
} = t, f = await
|
|
1610
|
+
} = t, f = await jn(t, e);
|
|
1539
1611
|
return r === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
1540
1612
|
x: i + f.x,
|
|
1541
1613
|
y: l + f.y,
|
|
@@ -1546,7 +1618,7 @@ const $n = function(e) {
|
|
|
1546
1618
|
};
|
|
1547
1619
|
}
|
|
1548
1620
|
};
|
|
1549
|
-
},
|
|
1621
|
+
}, _n = function(e) {
|
|
1550
1622
|
return e === void 0 && (e = {}), {
|
|
1551
1623
|
name: "shift",
|
|
1552
1624
|
options: e,
|
|
@@ -1559,35 +1631,35 @@ const $n = function(e) {
|
|
|
1559
1631
|
mainAxis: l = !0,
|
|
1560
1632
|
crossAxis: r = !1,
|
|
1561
1633
|
limiter: a = {
|
|
1562
|
-
fn: (
|
|
1634
|
+
fn: (p) => {
|
|
1563
1635
|
let {
|
|
1564
|
-
x,
|
|
1565
|
-
y:
|
|
1566
|
-
} =
|
|
1636
|
+
x: b,
|
|
1637
|
+
y: E
|
|
1638
|
+
} = p;
|
|
1567
1639
|
return {
|
|
1568
|
-
x,
|
|
1569
|
-
y:
|
|
1640
|
+
x: b,
|
|
1641
|
+
y: E
|
|
1570
1642
|
};
|
|
1571
1643
|
}
|
|
1572
1644
|
},
|
|
1573
1645
|
...f
|
|
1574
|
-
} =
|
|
1646
|
+
} = ce(e, t), c = {
|
|
1575
1647
|
x: n,
|
|
1576
1648
|
y: o
|
|
1577
|
-
}, u = await
|
|
1578
|
-
let d = c[h], m = c[
|
|
1649
|
+
}, u = await Ee(t, f), v = ie(ee(i)), h = Ht(v);
|
|
1650
|
+
let d = c[h], m = c[v];
|
|
1579
1651
|
if (l) {
|
|
1580
|
-
const
|
|
1581
|
-
d = ze(
|
|
1652
|
+
const p = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", E = d + u[p], C = d - u[b];
|
|
1653
|
+
d = ze(E, d, C);
|
|
1582
1654
|
}
|
|
1583
1655
|
if (r) {
|
|
1584
|
-
const
|
|
1585
|
-
m = ze(
|
|
1656
|
+
const p = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", E = m + u[p], C = m - u[b];
|
|
1657
|
+
m = ze(E, m, C);
|
|
1586
1658
|
}
|
|
1587
1659
|
const g = a.fn({
|
|
1588
1660
|
...t,
|
|
1589
1661
|
[h]: d,
|
|
1590
|
-
[
|
|
1662
|
+
[v]: m
|
|
1591
1663
|
});
|
|
1592
1664
|
return {
|
|
1593
1665
|
...g,
|
|
@@ -1596,56 +1668,96 @@ const $n = function(e) {
|
|
|
1596
1668
|
y: g.y - o,
|
|
1597
1669
|
enabled: {
|
|
1598
1670
|
[h]: l,
|
|
1599
|
-
[
|
|
1671
|
+
[v]: r
|
|
1600
1672
|
}
|
|
1601
1673
|
}
|
|
1602
1674
|
};
|
|
1603
1675
|
}
|
|
1604
1676
|
};
|
|
1677
|
+
}, zn = function(e) {
|
|
1678
|
+
return e === void 0 && (e = {}), {
|
|
1679
|
+
name: "size",
|
|
1680
|
+
options: e,
|
|
1681
|
+
async fn(t) {
|
|
1682
|
+
var n, o;
|
|
1683
|
+
const {
|
|
1684
|
+
placement: i,
|
|
1685
|
+
rects: l,
|
|
1686
|
+
platform: r,
|
|
1687
|
+
elements: a
|
|
1688
|
+
} = t, {
|
|
1689
|
+
apply: f = () => {
|
|
1690
|
+
},
|
|
1691
|
+
...c
|
|
1692
|
+
} = ce(e, t), u = await Ee(t, c), v = ee(i), h = K(i), d = ie(i) === "y", {
|
|
1693
|
+
width: m,
|
|
1694
|
+
height: g
|
|
1695
|
+
} = l.floating;
|
|
1696
|
+
let p, b;
|
|
1697
|
+
v === "top" || v === "bottom" ? (p = v, b = h === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (b = v, p = h === "end" ? "top" : "bottom");
|
|
1698
|
+
const E = g - u.top - u.bottom, C = m - u.left - u.right, P = le(g - u[p], E), w = le(m - u[b], C), x = !t.middlewareData.shift;
|
|
1699
|
+
let O = P, R = w;
|
|
1700
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = C), (o = t.middlewareData.shift) != null && o.enabled.y && (O = E), x && !h) {
|
|
1701
|
+
const A = Y(u.left, 0), k = Y(u.right, 0), W = Y(u.top, 0), $ = Y(u.bottom, 0);
|
|
1702
|
+
d ? R = m - 2 * (A !== 0 || k !== 0 ? A + k : Y(u.left, u.right)) : O = g - 2 * (W !== 0 || $ !== 0 ? W + $ : Y(u.top, u.bottom));
|
|
1703
|
+
}
|
|
1704
|
+
await f({
|
|
1705
|
+
...t,
|
|
1706
|
+
availableWidth: R,
|
|
1707
|
+
availableHeight: O
|
|
1708
|
+
});
|
|
1709
|
+
const M = await r.getDimensions(a.floating);
|
|
1710
|
+
return m !== M.width || g !== M.height ? {
|
|
1711
|
+
reset: {
|
|
1712
|
+
rects: !0
|
|
1713
|
+
}
|
|
1714
|
+
} : {};
|
|
1715
|
+
}
|
|
1716
|
+
};
|
|
1605
1717
|
};
|
|
1606
|
-
function
|
|
1718
|
+
function Ie() {
|
|
1607
1719
|
return typeof window < "u";
|
|
1608
1720
|
}
|
|
1609
|
-
function
|
|
1610
|
-
return
|
|
1721
|
+
function Te(e) {
|
|
1722
|
+
return Wt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1611
1723
|
}
|
|
1612
|
-
function
|
|
1724
|
+
function _(e) {
|
|
1613
1725
|
var t;
|
|
1614
1726
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1615
1727
|
}
|
|
1616
|
-
function
|
|
1728
|
+
function ne(e) {
|
|
1617
1729
|
var t;
|
|
1618
|
-
return (t = (
|
|
1730
|
+
return (t = (Wt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1619
1731
|
}
|
|
1620
|
-
function
|
|
1621
|
-
return
|
|
1732
|
+
function Wt(e) {
|
|
1733
|
+
return Ie() ? e instanceof Node || e instanceof _(e).Node : !1;
|
|
1622
1734
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return
|
|
1735
|
+
function q(e) {
|
|
1736
|
+
return Ie() ? e instanceof Element || e instanceof _(e).Element : !1;
|
|
1625
1737
|
}
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1738
|
+
function te(e) {
|
|
1739
|
+
return Ie() ? e instanceof HTMLElement || e instanceof _(e).HTMLElement : !1;
|
|
1628
1740
|
}
|
|
1629
|
-
function
|
|
1630
|
-
return !
|
|
1741
|
+
function Ct(e) {
|
|
1742
|
+
return !Ie() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof _(e).ShadowRoot;
|
|
1631
1743
|
}
|
|
1632
|
-
const
|
|
1633
|
-
function
|
|
1744
|
+
const Un = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1745
|
+
function Le(e) {
|
|
1634
1746
|
const {
|
|
1635
1747
|
overflow: t,
|
|
1636
1748
|
overflowX: n,
|
|
1637
1749
|
overflowY: o,
|
|
1638
1750
|
display: i
|
|
1639
|
-
} =
|
|
1640
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
1751
|
+
} = G(e);
|
|
1752
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Un.has(i);
|
|
1641
1753
|
}
|
|
1642
|
-
const
|
|
1643
|
-
function
|
|
1644
|
-
return
|
|
1754
|
+
const Kn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1755
|
+
function qn(e) {
|
|
1756
|
+
return Kn.has(Te(e));
|
|
1645
1757
|
}
|
|
1646
|
-
const
|
|
1647
|
-
function
|
|
1648
|
-
return
|
|
1758
|
+
const Gn = [":popover-open", ":modal"];
|
|
1759
|
+
function Be(e) {
|
|
1760
|
+
return Gn.some((t) => {
|
|
1649
1761
|
try {
|
|
1650
1762
|
return e.matches(t);
|
|
1651
1763
|
} catch {
|
|
@@ -1653,34 +1765,34 @@ function Ie(e) {
|
|
|
1653
1765
|
}
|
|
1654
1766
|
});
|
|
1655
1767
|
}
|
|
1656
|
-
const
|
|
1768
|
+
const Jn = ["transform", "translate", "scale", "rotate", "perspective"], Qn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Zn = ["paint", "layout", "strict", "content"];
|
|
1657
1769
|
function Je(e) {
|
|
1658
|
-
const t = Qe(), n =
|
|
1659
|
-
return
|
|
1770
|
+
const t = Qe(), n = q(e) ? G(e) : e;
|
|
1771
|
+
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));
|
|
1660
1772
|
}
|
|
1661
|
-
function
|
|
1662
|
-
let t =
|
|
1663
|
-
for (;
|
|
1773
|
+
function eo(e) {
|
|
1774
|
+
let t = ae(e);
|
|
1775
|
+
for (; te(t) && !Ce(t); ) {
|
|
1664
1776
|
if (Je(t))
|
|
1665
1777
|
return t;
|
|
1666
|
-
if (
|
|
1778
|
+
if (Be(t))
|
|
1667
1779
|
return null;
|
|
1668
|
-
t =
|
|
1780
|
+
t = ae(t);
|
|
1669
1781
|
}
|
|
1670
1782
|
return null;
|
|
1671
1783
|
}
|
|
1672
1784
|
function Qe() {
|
|
1673
1785
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1674
1786
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1677
|
-
return
|
|
1787
|
+
const to = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1788
|
+
function Ce(e) {
|
|
1789
|
+
return to.has(Te(e));
|
|
1678
1790
|
}
|
|
1679
|
-
function
|
|
1680
|
-
return
|
|
1791
|
+
function G(e) {
|
|
1792
|
+
return _(e).getComputedStyle(e);
|
|
1681
1793
|
}
|
|
1682
|
-
function
|
|
1683
|
-
return
|
|
1794
|
+
function We(e) {
|
|
1795
|
+
return q(e) ? {
|
|
1684
1796
|
scrollLeft: e.scrollLeft,
|
|
1685
1797
|
scrollTop: e.scrollTop
|
|
1686
1798
|
} : {
|
|
@@ -1688,39 +1800,39 @@ function Be(e) {
|
|
|
1688
1800
|
scrollTop: e.scrollY
|
|
1689
1801
|
};
|
|
1690
1802
|
}
|
|
1691
|
-
function
|
|
1692
|
-
if (
|
|
1803
|
+
function ae(e) {
|
|
1804
|
+
if (Te(e) === "html")
|
|
1693
1805
|
return e;
|
|
1694
1806
|
const t = (
|
|
1695
1807
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1696
1808
|
e.assignedSlot || // DOM Element detected.
|
|
1697
1809
|
e.parentNode || // ShadowRoot detected.
|
|
1698
|
-
|
|
1699
|
-
|
|
1810
|
+
Ct(e) && e.host || // Fallback.
|
|
1811
|
+
ne(e)
|
|
1700
1812
|
);
|
|
1701
|
-
return
|
|
1813
|
+
return Ct(t) ? t.host : t;
|
|
1702
1814
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const t =
|
|
1705
|
-
return
|
|
1815
|
+
function $t(e) {
|
|
1816
|
+
const t = ae(e);
|
|
1817
|
+
return Ce(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : te(t) && Le(t) ? t : $t(t);
|
|
1706
1818
|
}
|
|
1707
|
-
function
|
|
1819
|
+
function Pe(e, t, n) {
|
|
1708
1820
|
var o;
|
|
1709
1821
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1710
|
-
const i =
|
|
1822
|
+
const i = $t(e), l = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = _(i);
|
|
1711
1823
|
if (l) {
|
|
1712
1824
|
const a = Ue(r);
|
|
1713
|
-
return t.concat(r, r.visualViewport || [],
|
|
1825
|
+
return t.concat(r, r.visualViewport || [], Le(i) ? i : [], a && n ? Pe(a) : []);
|
|
1714
1826
|
}
|
|
1715
|
-
return t.concat(i,
|
|
1827
|
+
return t.concat(i, Pe(i, [], n));
|
|
1716
1828
|
}
|
|
1717
1829
|
function Ue(e) {
|
|
1718
1830
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1719
1831
|
}
|
|
1720
|
-
function
|
|
1721
|
-
const t =
|
|
1832
|
+
function Vt(e) {
|
|
1833
|
+
const t = G(e);
|
|
1722
1834
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1723
|
-
const i =
|
|
1835
|
+
const i = te(e), l = i ? e.offsetWidth : n, r = i ? e.offsetHeight : o, a = Re(n) !== l || Re(o) !== r;
|
|
1724
1836
|
return a && (n = l, o = r), {
|
|
1725
1837
|
width: n,
|
|
1726
1838
|
height: o,
|
|
@@ -1728,87 +1840,87 @@ function It(e) {
|
|
|
1728
1840
|
};
|
|
1729
1841
|
}
|
|
1730
1842
|
function Ze(e) {
|
|
1731
|
-
return
|
|
1843
|
+
return q(e) ? e : e.contextElement;
|
|
1732
1844
|
}
|
|
1733
|
-
function
|
|
1845
|
+
function be(e) {
|
|
1734
1846
|
const t = Ze(e);
|
|
1735
|
-
if (!
|
|
1736
|
-
return
|
|
1847
|
+
if (!te(t))
|
|
1848
|
+
return Q(1);
|
|
1737
1849
|
const n = t.getBoundingClientRect(), {
|
|
1738
1850
|
width: o,
|
|
1739
1851
|
height: i,
|
|
1740
1852
|
$: l
|
|
1741
|
-
} =
|
|
1742
|
-
let r = (l ?
|
|
1853
|
+
} = Vt(t);
|
|
1854
|
+
let r = (l ? Re(n.width) : n.width) / o, a = (l ? Re(n.height) : n.height) / i;
|
|
1743
1855
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1744
1856
|
x: r,
|
|
1745
1857
|
y: a
|
|
1746
1858
|
};
|
|
1747
1859
|
}
|
|
1748
|
-
const
|
|
1749
|
-
function
|
|
1750
|
-
const t =
|
|
1751
|
-
return !Qe() || !t.visualViewport ?
|
|
1860
|
+
const no = /* @__PURE__ */ Q(0);
|
|
1861
|
+
function Xt(e) {
|
|
1862
|
+
const t = _(e);
|
|
1863
|
+
return !Qe() || !t.visualViewport ? no : {
|
|
1752
1864
|
x: t.visualViewport.offsetLeft,
|
|
1753
1865
|
y: t.visualViewport.offsetTop
|
|
1754
1866
|
};
|
|
1755
1867
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1868
|
+
function oo(e, t, n) {
|
|
1869
|
+
return t === void 0 && (t = !1), !n || t && n !== _(e) ? !1 : t;
|
|
1758
1870
|
}
|
|
1759
|
-
function
|
|
1871
|
+
function pe(e, t, n, o) {
|
|
1760
1872
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1761
1873
|
const i = e.getBoundingClientRect(), l = Ze(e);
|
|
1762
|
-
let r =
|
|
1763
|
-
t && (o ?
|
|
1764
|
-
const a =
|
|
1765
|
-
let f = (i.left + a.x) / r.x, c = (i.top + a.y) / r.y, u = i.width / r.x,
|
|
1874
|
+
let r = Q(1);
|
|
1875
|
+
t && (o ? q(o) && (r = be(o)) : r = be(e));
|
|
1876
|
+
const a = oo(l, n, o) ? Xt(l) : Q(0);
|
|
1877
|
+
let f = (i.left + a.x) / r.x, c = (i.top + a.y) / r.y, u = i.width / r.x, v = i.height / r.y;
|
|
1766
1878
|
if (l) {
|
|
1767
|
-
const h =
|
|
1879
|
+
const h = _(l), d = o && q(o) ? _(o) : o;
|
|
1768
1880
|
let m = h, g = Ue(m);
|
|
1769
1881
|
for (; g && o && d !== m; ) {
|
|
1770
|
-
const
|
|
1771
|
-
f *=
|
|
1882
|
+
const p = be(g), b = g.getBoundingClientRect(), E = G(g), C = b.left + (g.clientLeft + parseFloat(E.paddingLeft)) * p.x, P = b.top + (g.clientTop + parseFloat(E.paddingTop)) * p.y;
|
|
1883
|
+
f *= p.x, c *= p.y, u *= p.x, v *= p.y, f += C, c += P, m = _(g), g = Ue(m);
|
|
1772
1884
|
}
|
|
1773
1885
|
}
|
|
1774
|
-
return
|
|
1886
|
+
return Fe({
|
|
1775
1887
|
width: u,
|
|
1776
|
-
height:
|
|
1888
|
+
height: v,
|
|
1777
1889
|
x: f,
|
|
1778
1890
|
y: c
|
|
1779
1891
|
});
|
|
1780
1892
|
}
|
|
1781
|
-
function
|
|
1782
|
-
const n =
|
|
1783
|
-
return t ? t.left + n :
|
|
1893
|
+
function $e(e, t) {
|
|
1894
|
+
const n = We(e).scrollLeft;
|
|
1895
|
+
return t ? t.left + n : pe(ne(e)).left + n;
|
|
1784
1896
|
}
|
|
1785
|
-
function
|
|
1786
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
1897
|
+
function jt(e, t) {
|
|
1898
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - $e(e, n), i = n.top + t.scrollTop;
|
|
1787
1899
|
return {
|
|
1788
1900
|
x: o,
|
|
1789
1901
|
y: i
|
|
1790
1902
|
};
|
|
1791
1903
|
}
|
|
1792
|
-
function
|
|
1904
|
+
function io(e) {
|
|
1793
1905
|
let {
|
|
1794
1906
|
elements: t,
|
|
1795
1907
|
rect: n,
|
|
1796
1908
|
offsetParent: o,
|
|
1797
1909
|
strategy: i
|
|
1798
1910
|
} = e;
|
|
1799
|
-
const l = i === "fixed", r =
|
|
1911
|
+
const l = i === "fixed", r = ne(o), a = t ? Be(t.floating) : !1;
|
|
1800
1912
|
if (o === r || a && l)
|
|
1801
1913
|
return n;
|
|
1802
1914
|
let f = {
|
|
1803
1915
|
scrollLeft: 0,
|
|
1804
1916
|
scrollTop: 0
|
|
1805
|
-
}, c =
|
|
1806
|
-
const u =
|
|
1807
|
-
if ((
|
|
1808
|
-
const d =
|
|
1809
|
-
c =
|
|
1917
|
+
}, c = Q(1);
|
|
1918
|
+
const u = Q(0), v = te(o);
|
|
1919
|
+
if ((v || !v && !l) && ((Te(o) !== "body" || Le(r)) && (f = We(o)), te(o))) {
|
|
1920
|
+
const d = pe(o);
|
|
1921
|
+
c = be(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
1810
1922
|
}
|
|
1811
|
-
const h = r && !
|
|
1923
|
+
const h = r && !v && !l ? jt(r, f) : Q(0);
|
|
1812
1924
|
return {
|
|
1813
1925
|
width: n.width * c.x,
|
|
1814
1926
|
height: n.height * c.y,
|
|
@@ -1816,34 +1928,34 @@ function Zn(e) {
|
|
|
1816
1928
|
y: n.y * c.y - f.scrollTop * c.y + u.y + h.y
|
|
1817
1929
|
};
|
|
1818
1930
|
}
|
|
1819
|
-
function
|
|
1931
|
+
function ro(e) {
|
|
1820
1932
|
return Array.from(e.getClientRects());
|
|
1821
1933
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const t =
|
|
1824
|
-
let r = -n.scrollLeft +
|
|
1934
|
+
function so(e) {
|
|
1935
|
+
const t = ne(e), n = We(e), o = e.ownerDocument.body, i = Y(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), l = Y(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1936
|
+
let r = -n.scrollLeft + $e(e);
|
|
1825
1937
|
const a = -n.scrollTop;
|
|
1826
|
-
return
|
|
1938
|
+
return G(o).direction === "rtl" && (r += Y(t.clientWidth, o.clientWidth) - i), {
|
|
1827
1939
|
width: i,
|
|
1828
1940
|
height: l,
|
|
1829
1941
|
x: r,
|
|
1830
1942
|
y: a
|
|
1831
1943
|
};
|
|
1832
1944
|
}
|
|
1833
|
-
const
|
|
1834
|
-
function
|
|
1835
|
-
const n =
|
|
1945
|
+
const Tt = 25;
|
|
1946
|
+
function lo(e, t) {
|
|
1947
|
+
const n = _(e), o = ne(e), i = n.visualViewport;
|
|
1836
1948
|
let l = o.clientWidth, r = o.clientHeight, a = 0, f = 0;
|
|
1837
1949
|
if (i) {
|
|
1838
1950
|
l = i.width, r = i.height;
|
|
1839
1951
|
const u = Qe();
|
|
1840
1952
|
(!u || u && t === "fixed") && (a = i.offsetLeft, f = i.offsetTop);
|
|
1841
1953
|
}
|
|
1842
|
-
const c =
|
|
1954
|
+
const c = $e(o);
|
|
1843
1955
|
if (c <= 0) {
|
|
1844
|
-
const u = o.ownerDocument,
|
|
1845
|
-
m <=
|
|
1846
|
-
} else c <=
|
|
1956
|
+
const u = o.ownerDocument, v = u.body, h = getComputedStyle(v), d = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - v.clientWidth - d);
|
|
1957
|
+
m <= Tt && (l -= m);
|
|
1958
|
+
} else c <= Tt && (l += c);
|
|
1847
1959
|
return {
|
|
1848
1960
|
width: l,
|
|
1849
1961
|
height: r,
|
|
@@ -1851,9 +1963,9 @@ function no(e, t) {
|
|
|
1851
1963
|
y: f
|
|
1852
1964
|
};
|
|
1853
1965
|
}
|
|
1854
|
-
const
|
|
1855
|
-
function
|
|
1856
|
-
const n =
|
|
1966
|
+
const ao = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1967
|
+
function co(e, t) {
|
|
1968
|
+
const n = pe(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, l = te(e) ? be(e) : Q(1), r = e.clientWidth * l.x, a = e.clientHeight * l.y, f = i * l.x, c = o * l.y;
|
|
1857
1969
|
return {
|
|
1858
1970
|
width: r,
|
|
1859
1971
|
height: a,
|
|
@@ -1861,16 +1973,16 @@ function io(e, t) {
|
|
|
1861
1973
|
y: c
|
|
1862
1974
|
};
|
|
1863
1975
|
}
|
|
1864
|
-
function
|
|
1976
|
+
function Ot(e, t, n) {
|
|
1865
1977
|
let o;
|
|
1866
1978
|
if (t === "viewport")
|
|
1867
|
-
o =
|
|
1979
|
+
o = lo(e, n);
|
|
1868
1980
|
else if (t === "document")
|
|
1869
|
-
o =
|
|
1870
|
-
else if (
|
|
1871
|
-
o =
|
|
1981
|
+
o = so(ne(e));
|
|
1982
|
+
else if (q(t))
|
|
1983
|
+
o = co(t, n);
|
|
1872
1984
|
else {
|
|
1873
|
-
const i =
|
|
1985
|
+
const i = Xt(e);
|
|
1874
1986
|
o = {
|
|
1875
1987
|
x: t.x - i.x,
|
|
1876
1988
|
y: t.y - i.y,
|
|
@@ -1878,36 +1990,36 @@ function Ct(e, t, n) {
|
|
|
1878
1990
|
height: t.height
|
|
1879
1991
|
};
|
|
1880
1992
|
}
|
|
1881
|
-
return
|
|
1993
|
+
return Fe(o);
|
|
1882
1994
|
}
|
|
1883
|
-
function
|
|
1884
|
-
const n =
|
|
1885
|
-
return n === t || !
|
|
1995
|
+
function Yt(e, t) {
|
|
1996
|
+
const n = ae(e);
|
|
1997
|
+
return n === t || !q(n) || Ce(n) ? !1 : G(n).position === "fixed" || Yt(n, t);
|
|
1886
1998
|
}
|
|
1887
|
-
function
|
|
1999
|
+
function uo(e, t) {
|
|
1888
2000
|
const n = t.get(e);
|
|
1889
2001
|
if (n)
|
|
1890
2002
|
return n;
|
|
1891
|
-
let o =
|
|
1892
|
-
const l =
|
|
1893
|
-
let r = l ?
|
|
1894
|
-
for (;
|
|
1895
|
-
const a =
|
|
1896
|
-
!f && a.position === "fixed" && (i = null), (l ? !f && !i : !f && a.position === "static" && !!i &&
|
|
2003
|
+
let o = Pe(e, [], !1).filter((a) => q(a) && Te(a) !== "body"), i = null;
|
|
2004
|
+
const l = G(e).position === "fixed";
|
|
2005
|
+
let r = l ? ae(e) : e;
|
|
2006
|
+
for (; q(r) && !Ce(r); ) {
|
|
2007
|
+
const a = G(r), f = Je(r);
|
|
2008
|
+
!f && a.position === "fixed" && (i = null), (l ? !f && !i : !f && a.position === "static" && !!i && ao.has(i.position) || Le(r) && !f && Yt(e, r)) ? o = o.filter((u) => u !== r) : i = a, r = ae(r);
|
|
1897
2009
|
}
|
|
1898
2010
|
return t.set(e, o), o;
|
|
1899
2011
|
}
|
|
1900
|
-
function
|
|
2012
|
+
function fo(e) {
|
|
1901
2013
|
let {
|
|
1902
2014
|
element: t,
|
|
1903
2015
|
boundary: n,
|
|
1904
2016
|
rootBoundary: o,
|
|
1905
2017
|
strategy: i
|
|
1906
2018
|
} = e;
|
|
1907
|
-
const r = [...n === "clippingAncestors" ?
|
|
1908
|
-
const
|
|
1909
|
-
return c.top =
|
|
1910
|
-
},
|
|
2019
|
+
const r = [...n === "clippingAncestors" ? Be(t) ? [] : uo(t, this._c) : [].concat(n), o], a = r[0], f = r.reduce((c, u) => {
|
|
2020
|
+
const v = Ot(t, u, i);
|
|
2021
|
+
return c.top = Y(v.top, c.top), c.right = le(v.right, c.right), c.bottom = le(v.bottom, c.bottom), c.left = Y(v.left, c.left), c;
|
|
2022
|
+
}, Ot(t, a, i));
|
|
1911
2023
|
return {
|
|
1912
2024
|
width: f.right - f.left,
|
|
1913
2025
|
height: f.bottom - f.top,
|
|
@@ -1915,73 +2027,73 @@ function so(e) {
|
|
|
1915
2027
|
y: f.top
|
|
1916
2028
|
};
|
|
1917
2029
|
}
|
|
1918
|
-
function
|
|
2030
|
+
function ho(e) {
|
|
1919
2031
|
const {
|
|
1920
2032
|
width: t,
|
|
1921
2033
|
height: n
|
|
1922
|
-
} =
|
|
2034
|
+
} = Vt(e);
|
|
1923
2035
|
return {
|
|
1924
2036
|
width: t,
|
|
1925
2037
|
height: n
|
|
1926
2038
|
};
|
|
1927
2039
|
}
|
|
1928
|
-
function
|
|
1929
|
-
const o =
|
|
2040
|
+
function mo(e, t, n) {
|
|
2041
|
+
const o = te(t), i = ne(t), l = n === "fixed", r = pe(e, !0, l, t);
|
|
1930
2042
|
let a = {
|
|
1931
2043
|
scrollLeft: 0,
|
|
1932
2044
|
scrollTop: 0
|
|
1933
2045
|
};
|
|
1934
|
-
const f =
|
|
2046
|
+
const f = Q(0);
|
|
1935
2047
|
function c() {
|
|
1936
|
-
f.x =
|
|
2048
|
+
f.x = $e(i);
|
|
1937
2049
|
}
|
|
1938
2050
|
if (o || !o && !l)
|
|
1939
|
-
if ((
|
|
1940
|
-
const d =
|
|
2051
|
+
if ((Te(t) !== "body" || Le(i)) && (a = We(t)), o) {
|
|
2052
|
+
const d = pe(t, !0, l, t);
|
|
1941
2053
|
f.x = d.x + t.clientLeft, f.y = d.y + t.clientTop;
|
|
1942
2054
|
} else i && c();
|
|
1943
2055
|
l && !o && i && c();
|
|
1944
|
-
const u = i && !o && !l ?
|
|
2056
|
+
const u = i && !o && !l ? jt(i, a) : Q(0), v = r.left + a.scrollLeft - f.x - u.x, h = r.top + a.scrollTop - f.y - u.y;
|
|
1945
2057
|
return {
|
|
1946
|
-
x:
|
|
2058
|
+
x: v,
|
|
1947
2059
|
y: h,
|
|
1948
2060
|
width: r.width,
|
|
1949
2061
|
height: r.height
|
|
1950
2062
|
};
|
|
1951
2063
|
}
|
|
1952
|
-
function
|
|
1953
|
-
return
|
|
2064
|
+
function je(e) {
|
|
2065
|
+
return G(e).position === "static";
|
|
1954
2066
|
}
|
|
1955
|
-
function
|
|
1956
|
-
if (!
|
|
2067
|
+
function Pt(e, t) {
|
|
2068
|
+
if (!te(e) || G(e).position === "fixed")
|
|
1957
2069
|
return null;
|
|
1958
2070
|
if (t)
|
|
1959
2071
|
return t(e);
|
|
1960
2072
|
let n = e.offsetParent;
|
|
1961
|
-
return
|
|
2073
|
+
return ne(e) === n && (n = n.ownerDocument.body), n;
|
|
1962
2074
|
}
|
|
1963
|
-
function
|
|
1964
|
-
const n =
|
|
1965
|
-
if (
|
|
2075
|
+
function _t(e, t) {
|
|
2076
|
+
const n = _(e);
|
|
2077
|
+
if (Be(e))
|
|
1966
2078
|
return n;
|
|
1967
|
-
if (!
|
|
1968
|
-
let i =
|
|
1969
|
-
for (; i && !
|
|
1970
|
-
if (
|
|
2079
|
+
if (!te(e)) {
|
|
2080
|
+
let i = ae(e);
|
|
2081
|
+
for (; i && !Ce(i); ) {
|
|
2082
|
+
if (q(i) && !je(i))
|
|
1971
2083
|
return i;
|
|
1972
|
-
i =
|
|
2084
|
+
i = ae(i);
|
|
1973
2085
|
}
|
|
1974
2086
|
return n;
|
|
1975
2087
|
}
|
|
1976
|
-
let o =
|
|
1977
|
-
for (; o &&
|
|
1978
|
-
o =
|
|
1979
|
-
return o &&
|
|
2088
|
+
let o = Pt(e, t);
|
|
2089
|
+
for (; o && qn(o) && je(o); )
|
|
2090
|
+
o = Pt(o, t);
|
|
2091
|
+
return o && Ce(o) && je(o) && !Je(o) ? n : o || eo(e) || n;
|
|
1980
2092
|
}
|
|
1981
|
-
const
|
|
1982
|
-
const t = this.getOffsetParent ||
|
|
2093
|
+
const vo = async function(e) {
|
|
2094
|
+
const t = this.getOffsetParent || _t, n = this.getDimensions, o = await n(e.floating);
|
|
1983
2095
|
return {
|
|
1984
|
-
reference:
|
|
2096
|
+
reference: mo(e.reference, await t(e.floating), e.strategy),
|
|
1985
2097
|
floating: {
|
|
1986
2098
|
x: 0,
|
|
1987
2099
|
y: 0,
|
|
@@ -1990,27 +2102,27 @@ const co = async function(e) {
|
|
|
1990
2102
|
}
|
|
1991
2103
|
};
|
|
1992
2104
|
};
|
|
1993
|
-
function
|
|
1994
|
-
return
|
|
1995
|
-
}
|
|
1996
|
-
const
|
|
1997
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1998
|
-
getDocumentElement:
|
|
1999
|
-
getClippingRect:
|
|
2000
|
-
getOffsetParent:
|
|
2001
|
-
getElementRects:
|
|
2002
|
-
getClientRects:
|
|
2003
|
-
getDimensions:
|
|
2004
|
-
getScale:
|
|
2005
|
-
isElement:
|
|
2006
|
-
isRTL:
|
|
2105
|
+
function po(e) {
|
|
2106
|
+
return G(e).direction === "rtl";
|
|
2107
|
+
}
|
|
2108
|
+
const go = {
|
|
2109
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: io,
|
|
2110
|
+
getDocumentElement: ne,
|
|
2111
|
+
getClippingRect: fo,
|
|
2112
|
+
getOffsetParent: _t,
|
|
2113
|
+
getElementRects: vo,
|
|
2114
|
+
getClientRects: ro,
|
|
2115
|
+
getDimensions: ho,
|
|
2116
|
+
getScale: be,
|
|
2117
|
+
isElement: q,
|
|
2118
|
+
isRTL: po
|
|
2007
2119
|
};
|
|
2008
|
-
function
|
|
2120
|
+
function zt(e, t) {
|
|
2009
2121
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2010
2122
|
}
|
|
2011
|
-
function
|
|
2123
|
+
function wo(e, t) {
|
|
2012
2124
|
let n = null, o;
|
|
2013
|
-
const i =
|
|
2125
|
+
const i = ne(e);
|
|
2014
2126
|
function l() {
|
|
2015
2127
|
var a;
|
|
2016
2128
|
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
@@ -2019,27 +2131,27 @@ function ho(e, t) {
|
|
|
2019
2131
|
a === void 0 && (a = !1), f === void 0 && (f = 1), l();
|
|
2020
2132
|
const c = e.getBoundingClientRect(), {
|
|
2021
2133
|
left: u,
|
|
2022
|
-
top:
|
|
2134
|
+
top: v,
|
|
2023
2135
|
width: h,
|
|
2024
2136
|
height: d
|
|
2025
2137
|
} = c;
|
|
2026
2138
|
if (a || t(), !h || !d)
|
|
2027
2139
|
return;
|
|
2028
|
-
const m = Me(
|
|
2029
|
-
rootMargin: -m + "px " + -g + "px " + -
|
|
2030
|
-
threshold:
|
|
2140
|
+
const m = Me(v), g = Me(i.clientWidth - (u + h)), p = Me(i.clientHeight - (v + d)), b = Me(u), C = {
|
|
2141
|
+
rootMargin: -m + "px " + -g + "px " + -p + "px " + -b + "px",
|
|
2142
|
+
threshold: Y(0, le(1, f)) || 1
|
|
2031
2143
|
};
|
|
2032
|
-
let
|
|
2033
|
-
function w(
|
|
2034
|
-
const
|
|
2035
|
-
if (
|
|
2036
|
-
if (!
|
|
2144
|
+
let P = !0;
|
|
2145
|
+
function w(x) {
|
|
2146
|
+
const O = x[0].intersectionRatio;
|
|
2147
|
+
if (O !== f) {
|
|
2148
|
+
if (!P)
|
|
2037
2149
|
return r();
|
|
2038
|
-
|
|
2150
|
+
O ? r(!1, O) : o = setTimeout(() => {
|
|
2039
2151
|
r(!1, 1e-7);
|
|
2040
2152
|
}, 1e3);
|
|
2041
2153
|
}
|
|
2042
|
-
|
|
2154
|
+
O === 1 && !zt(c, e.getBoundingClientRect()) && r(), P = !1;
|
|
2043
2155
|
}
|
|
2044
2156
|
try {
|
|
2045
2157
|
n = new IntersectionObserver(w, {
|
|
@@ -2054,7 +2166,7 @@ function ho(e, t) {
|
|
|
2054
2166
|
}
|
|
2055
2167
|
return r(!0), l;
|
|
2056
2168
|
}
|
|
2057
|
-
function
|
|
2169
|
+
function yo(e, t, n, o) {
|
|
2058
2170
|
o === void 0 && (o = {});
|
|
2059
2171
|
const {
|
|
2060
2172
|
ancestorScroll: i = !0,
|
|
@@ -2062,50 +2174,50 @@ function mo(e, t, n, o) {
|
|
|
2062
2174
|
elementResize: r = typeof ResizeObserver == "function",
|
|
2063
2175
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
2064
2176
|
animationFrame: f = !1
|
|
2065
|
-
} = o, c = Ze(e), u = i || l ? [...c ?
|
|
2066
|
-
u.forEach((
|
|
2067
|
-
i &&
|
|
2177
|
+
} = o, c = Ze(e), u = i || l ? [...c ? Pe(c) : [], ...Pe(t)] : [];
|
|
2178
|
+
u.forEach((b) => {
|
|
2179
|
+
i && b.addEventListener("scroll", n, {
|
|
2068
2180
|
passive: !0
|
|
2069
|
-
}), l &&
|
|
2181
|
+
}), l && b.addEventListener("resize", n);
|
|
2070
2182
|
});
|
|
2071
|
-
const
|
|
2183
|
+
const v = c && a ? wo(c, n) : null;
|
|
2072
2184
|
let h = -1, d = null;
|
|
2073
|
-
r && (d = new ResizeObserver((
|
|
2074
|
-
let [
|
|
2075
|
-
|
|
2185
|
+
r && (d = new ResizeObserver((b) => {
|
|
2186
|
+
let [E] = b;
|
|
2187
|
+
E && E.target === c && d && (d.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
2076
2188
|
var C;
|
|
2077
2189
|
(C = d) == null || C.observe(t);
|
|
2078
2190
|
})), n();
|
|
2079
2191
|
}), c && !f && d.observe(c), d.observe(t));
|
|
2080
|
-
let m, g = f ?
|
|
2081
|
-
f &&
|
|
2082
|
-
function
|
|
2083
|
-
const
|
|
2084
|
-
g && !
|
|
2192
|
+
let m, g = f ? pe(e) : null;
|
|
2193
|
+
f && p();
|
|
2194
|
+
function p() {
|
|
2195
|
+
const b = pe(e);
|
|
2196
|
+
g && !zt(g, b) && n(), g = b, m = requestAnimationFrame(p);
|
|
2085
2197
|
}
|
|
2086
2198
|
return n(), () => {
|
|
2087
|
-
var
|
|
2088
|
-
u.forEach((
|
|
2089
|
-
i &&
|
|
2090
|
-
}),
|
|
2199
|
+
var b;
|
|
2200
|
+
u.forEach((E) => {
|
|
2201
|
+
i && E.removeEventListener("scroll", n), l && E.removeEventListener("resize", n);
|
|
2202
|
+
}), v == null || v(), (b = d) == null || b.disconnect(), d = null, f && cancelAnimationFrame(m);
|
|
2091
2203
|
};
|
|
2092
2204
|
}
|
|
2093
|
-
const
|
|
2205
|
+
const Ro = Yn, No = Wn, ko = _n, Fo = $n, Ho = zn, Io = Vn, bo = In, xo = (e, t, n) => {
|
|
2094
2206
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
2095
|
-
platform:
|
|
2207
|
+
platform: go,
|
|
2096
2208
|
...n
|
|
2097
2209
|
}, l = {
|
|
2098
2210
|
...i.platform,
|
|
2099
2211
|
_c: o
|
|
2100
2212
|
};
|
|
2101
|
-
return
|
|
2213
|
+
return Hn(e, t, {
|
|
2102
2214
|
...i,
|
|
2103
2215
|
platform: l
|
|
2104
2216
|
});
|
|
2105
2217
|
};
|
|
2106
|
-
function
|
|
2218
|
+
function Bo(e, t, n = {}) {
|
|
2107
2219
|
const { offset: o = "-4px" } = n, { middlewareData: i, placement: l, refs: r } = t;
|
|
2108
|
-
|
|
2220
|
+
se(e, (u) => {
|
|
2109
2221
|
r.arrowEl.value = u;
|
|
2110
2222
|
});
|
|
2111
2223
|
const a = N(() => {
|
|
@@ -2117,17 +2229,17 @@ function Do(e, t, n = {}) {
|
|
|
2117
2229
|
}), c = N(() => {
|
|
2118
2230
|
if (!(e.value || r.arrowEl.value) || !i.value.arrow)
|
|
2119
2231
|
return {};
|
|
2120
|
-
const
|
|
2121
|
-
return
|
|
2232
|
+
const v = D(l).split("-")[0], h = a.value, d = f.value;
|
|
2233
|
+
return v === "bottom" ? {
|
|
2122
2234
|
"inset-inline-start": `${h}px`,
|
|
2123
2235
|
"inset-block-start": o
|
|
2124
|
-
} :
|
|
2236
|
+
} : v === "top" ? {
|
|
2125
2237
|
"inset-inline-start": `${h}px`,
|
|
2126
2238
|
"inset-block-end": o
|
|
2127
|
-
} :
|
|
2239
|
+
} : v === "right" ? {
|
|
2128
2240
|
"inset-block-start": `${d}px`,
|
|
2129
2241
|
"inset-inline-start": o
|
|
2130
|
-
} :
|
|
2242
|
+
} : v === "left" ? {
|
|
2131
2243
|
"inset-block-start": `${d}px`,
|
|
2132
2244
|
"inset-inline-end": o
|
|
2133
2245
|
} : {};
|
|
@@ -2138,190 +2250,190 @@ function Do(e, t, n = {}) {
|
|
|
2138
2250
|
arrowStyles: c
|
|
2139
2251
|
};
|
|
2140
2252
|
}
|
|
2141
|
-
function
|
|
2253
|
+
function Eo(e) {
|
|
2142
2254
|
return {
|
|
2143
2255
|
name: "arrow",
|
|
2144
2256
|
options: e,
|
|
2145
2257
|
fn(t) {
|
|
2146
|
-
const n =
|
|
2147
|
-
return n == null ? {} :
|
|
2258
|
+
const n = D(e.element);
|
|
2259
|
+
return n == null ? {} : bo({ element: n, padding: e.padding }).fn(t);
|
|
2148
2260
|
}
|
|
2149
2261
|
};
|
|
2150
2262
|
}
|
|
2151
|
-
function
|
|
2263
|
+
function Lt(e, t, n = {}) {
|
|
2152
2264
|
const {
|
|
2153
2265
|
transform: o = !0,
|
|
2154
2266
|
middlewares: i,
|
|
2155
2267
|
autoUpdate: l = !0,
|
|
2156
|
-
open: r =
|
|
2268
|
+
open: r = U(!1)
|
|
2157
2269
|
} = n, a = (w) => {
|
|
2158
2270
|
r.value = w;
|
|
2159
|
-
}, f = N(() =>
|
|
2160
|
-
const w =
|
|
2161
|
-
return
|
|
2162
|
-
}),
|
|
2271
|
+
}, f = N(() => D(n.placement) ?? "bottom"), c = N(() => D(n.strategy) ?? "absolute"), u = U(0), v = U(0), h = U(f.value), d = U(c.value), m = Ye({}), g = U(!1), p = U(null), b = N(() => {
|
|
2272
|
+
const w = D(i) || [];
|
|
2273
|
+
return p.value && !w.some((O) => O.name === "arrow") ? [...w, Eo({ element: p })] : w;
|
|
2274
|
+
}), E = async () => {
|
|
2163
2275
|
if (!e.value || !t.value) return;
|
|
2164
|
-
const w = await
|
|
2276
|
+
const w = await xo(e.value, t.value, {
|
|
2165
2277
|
placement: f.value,
|
|
2166
2278
|
strategy: c.value,
|
|
2167
|
-
middleware:
|
|
2279
|
+
middleware: b.value
|
|
2168
2280
|
});
|
|
2169
|
-
u.value = w.x,
|
|
2281
|
+
u.value = w.x, v.value = w.y, h.value = w.placement, d.value = w.strategy, m.value = w.middlewareData, g.value = r.value;
|
|
2170
2282
|
};
|
|
2171
|
-
|
|
2172
|
-
r.value &&
|
|
2283
|
+
se([f, c, b], () => {
|
|
2284
|
+
r.value && E();
|
|
2173
2285
|
});
|
|
2174
2286
|
let C;
|
|
2175
|
-
|
|
2287
|
+
se(
|
|
2176
2288
|
[e, t, r],
|
|
2177
|
-
([w,
|
|
2178
|
-
!
|
|
2289
|
+
([w, x, O]) => {
|
|
2290
|
+
!O || !w || !x || (l && (C = yo(
|
|
2179
2291
|
w,
|
|
2180
|
-
|
|
2181
|
-
|
|
2292
|
+
x,
|
|
2293
|
+
E,
|
|
2182
2294
|
typeof l == "object" ? l : void 0
|
|
2183
|
-
)),
|
|
2295
|
+
)), ve(() => {
|
|
2184
2296
|
C == null || C(), C = void 0;
|
|
2185
2297
|
}));
|
|
2186
2298
|
},
|
|
2187
2299
|
{ immediate: !0 }
|
|
2188
|
-
),
|
|
2300
|
+
), xe(() => C == null ? void 0 : C()), se(r, (w) => {
|
|
2189
2301
|
w || (g.value = !1);
|
|
2190
2302
|
});
|
|
2191
|
-
const
|
|
2303
|
+
const P = U({
|
|
2192
2304
|
position: c.value,
|
|
2193
2305
|
left: "0",
|
|
2194
2306
|
top: "0"
|
|
2195
2307
|
});
|
|
2196
|
-
return
|
|
2197
|
-
[u,
|
|
2198
|
-
([w,
|
|
2199
|
-
const
|
|
2200
|
-
if (!
|
|
2201
|
-
const
|
|
2308
|
+
return se(
|
|
2309
|
+
[u, v, () => D(o)],
|
|
2310
|
+
([w, x, O]) => {
|
|
2311
|
+
const R = t.value;
|
|
2312
|
+
if (!R) return;
|
|
2313
|
+
const M = {
|
|
2202
2314
|
position: d.value,
|
|
2203
2315
|
left: "0",
|
|
2204
2316
|
top: "0"
|
|
2205
|
-
},
|
|
2206
|
-
|
|
2207
|
-
...
|
|
2208
|
-
transform: `translate(${
|
|
2209
|
-
...
|
|
2317
|
+
}, A = St(R, w), k = St(R, x);
|
|
2318
|
+
O ? P.value = {
|
|
2319
|
+
...M,
|
|
2320
|
+
transform: `translate(${A}px, ${k}px)`,
|
|
2321
|
+
...Ut(R) >= 1.5 && {
|
|
2210
2322
|
"will-change": "transform"
|
|
2211
2323
|
}
|
|
2212
|
-
} :
|
|
2213
|
-
...
|
|
2214
|
-
left: `${
|
|
2215
|
-
top: `${
|
|
2324
|
+
} : P.value = {
|
|
2325
|
+
...M,
|
|
2326
|
+
left: `${A}px`,
|
|
2327
|
+
top: `${k}px`
|
|
2216
2328
|
};
|
|
2217
2329
|
},
|
|
2218
2330
|
{ immediate: !0 }
|
|
2219
2331
|
), {
|
|
2220
2332
|
x: u,
|
|
2221
|
-
y:
|
|
2333
|
+
y: v,
|
|
2222
2334
|
strategy: d,
|
|
2223
2335
|
placement: h,
|
|
2224
2336
|
middlewareData: m,
|
|
2225
2337
|
isPositioned: g,
|
|
2226
|
-
floatingStyles:
|
|
2227
|
-
update:
|
|
2338
|
+
floatingStyles: P,
|
|
2339
|
+
update: E,
|
|
2228
2340
|
refs: {
|
|
2229
2341
|
anchorEl: e,
|
|
2230
2342
|
floatingEl: t,
|
|
2231
|
-
arrowEl:
|
|
2343
|
+
arrowEl: p
|
|
2232
2344
|
},
|
|
2233
2345
|
open: r,
|
|
2234
2346
|
setOpen: a
|
|
2235
2347
|
};
|
|
2236
2348
|
}
|
|
2237
|
-
function
|
|
2238
|
-
const n =
|
|
2349
|
+
function St(e, t) {
|
|
2350
|
+
const n = Ut(e);
|
|
2239
2351
|
return Math.round(t * n) / n;
|
|
2240
2352
|
}
|
|
2241
|
-
function
|
|
2353
|
+
function Ut(e) {
|
|
2242
2354
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2243
2355
|
}
|
|
2244
|
-
function
|
|
2245
|
-
const { ...i } = n, l =
|
|
2356
|
+
function Wo(e, t, n = {}, o = {}) {
|
|
2357
|
+
const { ...i } = n, l = Lt(e, t, i), r = Co(l, o);
|
|
2246
2358
|
return {
|
|
2247
2359
|
...r,
|
|
2248
|
-
addNode: (
|
|
2249
|
-
const { parentId: m, ...g } = d,
|
|
2250
|
-
return r.addNode(
|
|
2360
|
+
addNode: (v, h, d = {}) => {
|
|
2361
|
+
const { parentId: m, ...g } = d, p = Lt(v, h, g);
|
|
2362
|
+
return r.addNode(p, m);
|
|
2251
2363
|
},
|
|
2252
2364
|
getAllOpenNodes: () => {
|
|
2253
|
-
const
|
|
2365
|
+
const v = [];
|
|
2254
2366
|
for (const h of r.nodeMap.values())
|
|
2255
|
-
h.data.open.value &&
|
|
2256
|
-
return
|
|
2367
|
+
h.data.open.value && v.push(h);
|
|
2368
|
+
return v;
|
|
2257
2369
|
},
|
|
2258
2370
|
getTopmostOpenNode: () => {
|
|
2259
|
-
let
|
|
2371
|
+
let v = null, h = -1;
|
|
2260
2372
|
for (const d of r.nodeMap.values())
|
|
2261
2373
|
if (d.data.open.value) {
|
|
2262
2374
|
const m = d.getPath().length;
|
|
2263
|
-
m > h && (h = m,
|
|
2375
|
+
m > h && (h = m, v = d);
|
|
2264
2376
|
}
|
|
2265
|
-
return
|
|
2377
|
+
return v;
|
|
2266
2378
|
},
|
|
2267
|
-
applyToNodes: (
|
|
2268
|
-
const { relationship: m = "self-and-children", applyToMatching: g = !0 } = d,
|
|
2269
|
-
if (!
|
|
2379
|
+
applyToNodes: (v, h, d = {}) => {
|
|
2380
|
+
const { relationship: m = "self-and-children", applyToMatching: g = !0 } = d, p = r.findNodeById(v);
|
|
2381
|
+
if (!p)
|
|
2270
2382
|
return;
|
|
2271
|
-
const
|
|
2272
|
-
w && !
|
|
2273
|
-
},
|
|
2274
|
-
for (const
|
|
2275
|
-
C(
|
|
2383
|
+
const b = [], E = /* @__PURE__ */ new Set(), C = (w) => {
|
|
2384
|
+
w && !E.has(w.id) && (b.push(w), E.add(w.id));
|
|
2385
|
+
}, P = (w) => {
|
|
2386
|
+
for (const x of w)
|
|
2387
|
+
C(x);
|
|
2276
2388
|
};
|
|
2277
2389
|
if (m === "ancestors-only")
|
|
2278
|
-
for (const w of
|
|
2279
|
-
w.id !==
|
|
2390
|
+
for (const w of p.getPath())
|
|
2391
|
+
w.id !== p.id && C(w);
|
|
2280
2392
|
else if (m === "siblings-only") {
|
|
2281
|
-
if (
|
|
2282
|
-
for (const w of
|
|
2283
|
-
w.id !==
|
|
2393
|
+
if (p.parent.value)
|
|
2394
|
+
for (const w of p.parent.value.children.value)
|
|
2395
|
+
w.id !== p.id && C(w);
|
|
2284
2396
|
} else if (m === "descendants-only")
|
|
2285
|
-
for (const w of r.traverse("dfs",
|
|
2286
|
-
w.id !==
|
|
2397
|
+
for (const w of r.traverse("dfs", p))
|
|
2398
|
+
w.id !== p.id && C(w);
|
|
2287
2399
|
else if (m === "children-only")
|
|
2288
|
-
|
|
2400
|
+
P(p.children.value);
|
|
2289
2401
|
else if (m === "self-and-ancestors")
|
|
2290
|
-
|
|
2402
|
+
P(p.getPath());
|
|
2291
2403
|
else if (m === "self-and-children")
|
|
2292
|
-
C(
|
|
2404
|
+
C(p), P(p.children.value);
|
|
2293
2405
|
else if (m === "self-and-descendants")
|
|
2294
|
-
|
|
2406
|
+
P(r.traverse("dfs", p));
|
|
2295
2407
|
else if (m === "self-and-siblings")
|
|
2296
|
-
C(
|
|
2408
|
+
C(p), p.parent.value && P(p.parent.value.children.value);
|
|
2297
2409
|
else if (m === "self-ancestors-and-children")
|
|
2298
|
-
|
|
2410
|
+
P(p.getPath()), P(p.children.value);
|
|
2299
2411
|
else if (m === "full-branch")
|
|
2300
|
-
|
|
2412
|
+
P(p.getPath()), P(r.traverse("dfs", p));
|
|
2301
2413
|
else if (m === "all-except-branch") {
|
|
2302
2414
|
const w = /* @__PURE__ */ new Set();
|
|
2303
|
-
for (const
|
|
2304
|
-
w.add(
|
|
2305
|
-
for (const
|
|
2306
|
-
w.add(
|
|
2307
|
-
for (const
|
|
2308
|
-
!w.has(
|
|
2415
|
+
for (const x of p.getPath())
|
|
2416
|
+
w.add(x.id);
|
|
2417
|
+
for (const x of r.traverse("dfs", p))
|
|
2418
|
+
w.add(x.id);
|
|
2419
|
+
for (const x of r.nodeMap.values())
|
|
2420
|
+
!w.has(x.id) === g && h(x);
|
|
2309
2421
|
return;
|
|
2310
2422
|
} else {
|
|
2311
2423
|
console.warn(`applyToNodes: Unknown relationship "${m}".`);
|
|
2312
2424
|
return;
|
|
2313
2425
|
}
|
|
2314
2426
|
if (g)
|
|
2315
|
-
for (const w of
|
|
2427
|
+
for (const w of b)
|
|
2316
2428
|
h(w);
|
|
2317
2429
|
else
|
|
2318
2430
|
for (const w of r.nodeMap.values())
|
|
2319
|
-
|
|
2431
|
+
E.has(w.id) || h(w);
|
|
2320
2432
|
}
|
|
2321
2433
|
};
|
|
2322
2434
|
}
|
|
2323
|
-
function
|
|
2324
|
-
const i = n.id ??
|
|
2435
|
+
function At(e, t = null, n = {}, o = !1) {
|
|
2436
|
+
const i = n.id ?? En(), l = Ye(t), r = Ye([]), a = N(() => r.value.length === 0), f = {
|
|
2325
2437
|
id: i,
|
|
2326
2438
|
data: e,
|
|
2327
2439
|
parent: l,
|
|
@@ -2336,11 +2448,11 @@ function Lt(e, t = null, n = {}, o = !1) {
|
|
|
2336
2448
|
findDescendant: (c) => {
|
|
2337
2449
|
const u = [f];
|
|
2338
2450
|
for (; u.length > 0; ) {
|
|
2339
|
-
const
|
|
2340
|
-
if (c(
|
|
2341
|
-
return
|
|
2342
|
-
for (let h =
|
|
2343
|
-
u.push(
|
|
2451
|
+
const v = u.pop();
|
|
2452
|
+
if (c(v))
|
|
2453
|
+
return v;
|
|
2454
|
+
for (let h = v.children.value.length - 1; h >= 0; h--)
|
|
2455
|
+
u.push(v.children.value[h]);
|
|
2344
2456
|
}
|
|
2345
2457
|
return null;
|
|
2346
2458
|
},
|
|
@@ -2363,31 +2475,31 @@ function Lt(e, t = null, n = {}, o = !1) {
|
|
|
2363
2475
|
};
|
|
2364
2476
|
return Object.freeze(f);
|
|
2365
2477
|
}
|
|
2366
|
-
function
|
|
2367
|
-
const n = (t == null ? void 0 : t.deleteStrategy) ?? "recursive", o =
|
|
2478
|
+
function Co(e, t) {
|
|
2479
|
+
const n = (t == null ? void 0 : t.deleteStrategy) ?? "recursive", o = tn(/* @__PURE__ */ new Map()), i = At(e, null, {}, !0);
|
|
2368
2480
|
o.set(i.id, i);
|
|
2369
2481
|
const l = (h) => o.get(h) ?? null, r = (h, d = null, m = {}) => {
|
|
2370
2482
|
const g = d ? l(d) : i;
|
|
2371
2483
|
if (!g)
|
|
2372
2484
|
return console.error(`Tree addNode: Parent node with ID ${d} not found.`), null;
|
|
2373
2485
|
m.id && o.has(m.id) && (m.id = void 0);
|
|
2374
|
-
const
|
|
2375
|
-
return o.set(
|
|
2486
|
+
const p = At(h, g, m);
|
|
2487
|
+
return o.set(p.id, p), g.addChild(p), p;
|
|
2376
2488
|
}, a = (h, d) => {
|
|
2377
2489
|
const m = d ?? n, g = l(h);
|
|
2378
2490
|
if (!g)
|
|
2379
2491
|
return !1;
|
|
2380
2492
|
if (g.isRoot)
|
|
2381
2493
|
return console.error("Tree removeNode: Cannot remove the root node."), !1;
|
|
2382
|
-
const
|
|
2494
|
+
const p = g.parent.value;
|
|
2383
2495
|
if (m === "recursive")
|
|
2384
|
-
|
|
2496
|
+
v(g);
|
|
2385
2497
|
else {
|
|
2386
|
-
for (const
|
|
2387
|
-
|
|
2498
|
+
for (const b of g.children.value)
|
|
2499
|
+
b.parent.value = null;
|
|
2388
2500
|
g.children.value = [], o.delete(g.id);
|
|
2389
2501
|
}
|
|
2390
|
-
return
|
|
2502
|
+
return p._removeChildInstance(g);
|
|
2391
2503
|
}, f = (h, d) => {
|
|
2392
2504
|
const m = l(h);
|
|
2393
2505
|
if (!m)
|
|
@@ -2401,9 +2513,9 @@ function wo(e, t) {
|
|
|
2401
2513
|
return console.error(`Tree moveNode: New parent node with ID ${d} not found.`), !1;
|
|
2402
2514
|
if (g.isDescendantOf(m))
|
|
2403
2515
|
return console.error("Tree moveNode: Cannot move a node to become its own descendant."), !1;
|
|
2404
|
-
const
|
|
2405
|
-
if (
|
|
2406
|
-
if (!
|
|
2516
|
+
const p = m.parent.value;
|
|
2517
|
+
if (p) {
|
|
2518
|
+
if (!p._removeChildInstance(m))
|
|
2407
2519
|
return console.error("Tree moveNode: Failed to remove node from its original parent."), !1;
|
|
2408
2520
|
} else if (m.isRoot) {
|
|
2409
2521
|
if (m.isRoot)
|
|
@@ -2417,27 +2529,27 @@ function wo(e, t) {
|
|
|
2417
2529
|
if (h === "dfs") {
|
|
2418
2530
|
const g = [d];
|
|
2419
2531
|
for (; g.length > 0; ) {
|
|
2420
|
-
const
|
|
2421
|
-
m.push(
|
|
2422
|
-
for (let
|
|
2423
|
-
g.push(
|
|
2532
|
+
const p = g.pop();
|
|
2533
|
+
m.push(p);
|
|
2534
|
+
for (let b = p.children.value.length - 1; b >= 0; b--)
|
|
2535
|
+
g.push(p.children.value[b]);
|
|
2424
2536
|
}
|
|
2425
2537
|
} else {
|
|
2426
2538
|
const g = [d];
|
|
2427
2539
|
for (; g.length > 0; ) {
|
|
2428
|
-
const
|
|
2429
|
-
m.push(
|
|
2430
|
-
for (const
|
|
2431
|
-
g.push(
|
|
2540
|
+
const p = g.shift();
|
|
2541
|
+
m.push(p);
|
|
2542
|
+
for (const b of p.children.value)
|
|
2543
|
+
g.push(b);
|
|
2432
2544
|
}
|
|
2433
2545
|
}
|
|
2434
2546
|
return m;
|
|
2435
2547
|
}, u = () => {
|
|
2436
2548
|
o.clear();
|
|
2437
|
-
},
|
|
2549
|
+
}, v = (h) => {
|
|
2438
2550
|
const d = [...h.children.value];
|
|
2439
2551
|
for (const m of d)
|
|
2440
|
-
|
|
2552
|
+
v(m);
|
|
2441
2553
|
o.delete(h.id), h.children.value = [];
|
|
2442
2554
|
};
|
|
2443
2555
|
return Object.freeze({
|
|
@@ -2456,37 +2568,40 @@ function wo(e, t) {
|
|
|
2456
2568
|
});
|
|
2457
2569
|
}
|
|
2458
2570
|
export {
|
|
2571
|
+
bo as arrow,
|
|
2572
|
+
No as autoPlacement,
|
|
2459
2573
|
dt as clearTimeoutIfSet,
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2574
|
+
Xe as contains,
|
|
2575
|
+
Co as createTree,
|
|
2576
|
+
At as createTreeNode,
|
|
2463
2577
|
Ke as findDescendantContainingTarget,
|
|
2464
|
-
|
|
2465
|
-
|
|
2578
|
+
Fo as flip,
|
|
2579
|
+
He as getContextFromParameter,
|
|
2466
2580
|
ft as getCurrentTime,
|
|
2467
|
-
|
|
2468
|
-
|
|
2581
|
+
hn as getTarget,
|
|
2582
|
+
Io as hide,
|
|
2469
2583
|
at as isButtonTarget,
|
|
2470
|
-
|
|
2584
|
+
dn as isClickOnScrollbar,
|
|
2471
2585
|
ut as isEventTargetWithin,
|
|
2472
|
-
|
|
2586
|
+
fn as isHTMLElement,
|
|
2473
2587
|
st as isMac,
|
|
2474
|
-
|
|
2588
|
+
Dt as isMouseLikePointerType,
|
|
2475
2589
|
lt as isSafari,
|
|
2476
2590
|
ct as isSpaceIgnored,
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2591
|
+
Z as isTargetWithinElement,
|
|
2592
|
+
mn as isTreeNode,
|
|
2593
|
+
Mt as isTypeableElement,
|
|
2594
|
+
Po as isVirtualElement,
|
|
2595
|
+
un as matchesFocusVisible,
|
|
2596
|
+
Ro as offset,
|
|
2597
|
+
ko as shift,
|
|
2598
|
+
Ho as size,
|
|
2599
|
+
Bo as useArrow,
|
|
2600
|
+
Lo as useClick,
|
|
2601
|
+
So as useClientPoint,
|
|
2602
|
+
Ao as useEscapeKey,
|
|
2603
|
+
Lt as useFloating,
|
|
2604
|
+
Wo as useFloatingTree,
|
|
2605
|
+
Do as useFocus,
|
|
2606
|
+
Mo as useHover
|
|
2492
2607
|
};
|