@tempots/ui 8.0.1 → 9.0.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/index.cjs +1 -1
- package/index.js +382 -398
- package/package.json +3 -3
- package/renderables/mutation.d.ts +6 -17
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var Ee = Object.defineProperty;
|
|
2
2
|
var Pe = (t, e, o) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
3
|
var At = (t, e, o) => Pe(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
-
import { getWindow as at, prop as W, makeProviderMark as Wt, Signal as
|
|
5
|
-
import { delayed as
|
|
6
|
-
const
|
|
4
|
+
import { getWindow as at, prop as W, makeProviderMark as Wt, Signal as ee, Use as it, html as Lt, on as ne, Value as L, attr as Ft, Empty as Et, OneOfType as oe, WithElement as H, OnDispose as F, Fragment as K, Portal as se, renderableOfTNode as Mt, When as ie, previousSignal as Te, effectOf as ke, computedOf as re, WithBrowserCtx as Se, Provide as Ce, OneOfTuple as ce, Prop as De } from "@tempots/dom";
|
|
5
|
+
import { delayed as ae, AsyncResult as R, nearEqual as ht, interval as We } from "@tempots/std";
|
|
6
|
+
const Fe = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
9
|
const o = e.split(".") || [];
|
|
10
10
|
return o.length > 1 ? "." + o.pop() : void 0;
|
|
11
|
-
},
|
|
12
|
-
const o =
|
|
11
|
+
}, Me = (t, e) => {
|
|
12
|
+
const o = Fe(e);
|
|
13
13
|
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
|
-
},
|
|
14
|
+
}, Ne = (t, e, o, n) => {
|
|
15
15
|
let s = t.target;
|
|
16
16
|
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
17
17
|
s = s.parentElement;
|
|
@@ -26,8 +26,8 @@ const We = (t) => {
|
|
|
26
26
|
if (!(f != null && f.startsWith("#")) && f !== l)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : Me(o, i);
|
|
30
|
+
}, Ve = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,14 +36,14 @@ const We = (t) => {
|
|
|
36
36
|
(n) => n.startsWith(".") ? n : "." + n
|
|
37
37
|
) : [];
|
|
38
38
|
return (n) => {
|
|
39
|
-
|
|
39
|
+
Ne(
|
|
40
40
|
n,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
o,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && n.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
46
|
+
}, $e = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, le = (t, e) => {
|
|
47
47
|
var r, i;
|
|
48
48
|
const o = new URL(t, e ?? ((r = at()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(((i = o.searchParams) == null ? void 0 : i.entries()) ?? []);
|
|
49
49
|
let s = o.hash;
|
|
@@ -52,24 +52,24 @@ const We = (t) => {
|
|
|
52
52
|
search: n,
|
|
53
53
|
hash: s === "" ? void 0 : s
|
|
54
54
|
};
|
|
55
|
-
},
|
|
56
|
-
const o =
|
|
55
|
+
}, Kt = (t, e) => {
|
|
56
|
+
const o = le(e);
|
|
57
57
|
return t.set(o), t;
|
|
58
58
|
}, Pt = (t) => {
|
|
59
59
|
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
60
60
|
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
61
|
-
},
|
|
61
|
+
}, Be = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), He = (t) => {
|
|
62
62
|
const e = t.container.currentURL, o = e.iso(
|
|
63
|
-
(n) =>
|
|
63
|
+
(n) => le(n),
|
|
64
64
|
(n) => {
|
|
65
|
-
if (
|
|
65
|
+
if (Be(n.pathname))
|
|
66
66
|
return Pt(n);
|
|
67
67
|
const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
|
|
68
68
|
return Pt({ ...n, pathname: r });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
return { value: o, dispose: o.dispose };
|
|
72
|
-
},
|
|
72
|
+
}, Ue = () => {
|
|
73
73
|
const t = at(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
|
|
74
74
|
return {
|
|
75
75
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
@@ -78,8 +78,8 @@ const We = (t) => {
|
|
|
78
78
|
),
|
|
79
79
|
hash: e
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const t = W(
|
|
81
|
+
}, ze = () => {
|
|
82
|
+
const t = W(Ue(), $e), e = at(), o = () => {
|
|
83
83
|
let n = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
84
|
n.startsWith("#") && (n = n.substring(1));
|
|
85
85
|
const s = {
|
|
@@ -103,60 +103,60 @@ const We = (t) => {
|
|
|
103
103
|
mark: Wt("Location"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
106
|
-
return
|
|
106
|
+
return ze();
|
|
107
107
|
if (e.isHeadless())
|
|
108
|
-
return
|
|
108
|
+
return He(e);
|
|
109
109
|
throw new Error("Unknown context");
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ke = (t) => {
|
|
112
112
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
113
|
-
},
|
|
114
|
-
if (typeof t == "string" ||
|
|
115
|
-
return
|
|
113
|
+
}, je = (t, ...e) => {
|
|
114
|
+
if (typeof t == "string" || ee.is(t))
|
|
115
|
+
return je({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
117
|
href: o,
|
|
118
118
|
withViewTransition: n,
|
|
119
119
|
...s
|
|
120
120
|
} = t;
|
|
121
121
|
return it(Nt, (r) => Lt.a(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}) :
|
|
122
|
+
ne.click(
|
|
123
|
+
Ve(() => (n === !0 ? Ke(() => {
|
|
124
|
+
Kt(r, L.get(o));
|
|
125
|
+
}) : Kt(r, L.get(o)), !0), s)
|
|
126
126
|
),
|
|
127
127
|
Ft.href(o),
|
|
128
128
|
...e
|
|
129
129
|
/* c8 ignore next 2 */
|
|
130
130
|
));
|
|
131
|
-
},
|
|
131
|
+
}, Qn = {
|
|
132
132
|
mark: Wt("Appearance"),
|
|
133
133
|
create: () => {
|
|
134
|
-
const t =
|
|
134
|
+
const t = _e();
|
|
135
135
|
return {
|
|
136
136
|
value: t,
|
|
137
137
|
dispose: t.dispose
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function _e() {
|
|
142
142
|
const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = W(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
|
|
143
143
|
return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const ue = (t, e) => {
|
|
146
146
|
if (typeof e == "function")
|
|
147
|
-
return
|
|
147
|
+
return ue(t, { success: e });
|
|
148
148
|
const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Et), r = e.notAsked ?? (() => Et);
|
|
149
|
-
return
|
|
149
|
+
return oe(L.toSignal(t), {
|
|
150
150
|
AsyncSuccess: (i) => n(i.$.value),
|
|
151
151
|
AsyncFailure: (i) => o(i.$.error),
|
|
152
152
|
Loading: (i) => s(i.map((c) => c.previousValue)),
|
|
153
153
|
NotAsked: r
|
|
154
154
|
});
|
|
155
|
-
},
|
|
156
|
-
const o =
|
|
155
|
+
}, Jn = (t = 10) => H((e) => F(ae(() => e == null ? void 0 : e.focus(), t))), Gn = (t = 10) => H((e) => {
|
|
156
|
+
const o = ae(() => e.select(), t);
|
|
157
157
|
return F(o);
|
|
158
158
|
});
|
|
159
|
-
function
|
|
159
|
+
function Zn(t) {
|
|
160
160
|
const e = Object.entries(t);
|
|
161
161
|
return K(
|
|
162
162
|
...e.map(
|
|
@@ -164,12 +164,12 @@ function Gn(t) {
|
|
|
164
164
|
)
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const to = H((t) => {
|
|
168
168
|
const e = t.style.getPropertyValue(":empty");
|
|
169
169
|
return t.style.setProperty(":empty", "display:none"), F((o) => {
|
|
170
170
|
o && t.style.setProperty(":empty", e);
|
|
171
171
|
});
|
|
172
|
-
}),
|
|
172
|
+
}), eo = (t) => se("head > title", Ft.innerText(t)), Ie = {
|
|
173
173
|
partial: {
|
|
174
174
|
root: null,
|
|
175
175
|
rootMargin: "0px",
|
|
@@ -187,19 +187,19 @@ const Zn = H((t) => {
|
|
|
187
187
|
partial: null,
|
|
188
188
|
full: null
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function Ye(t) {
|
|
191
191
|
return st[t] == null && (st[t] = new IntersectionObserver((e) => {
|
|
192
192
|
e.forEach((o) => {
|
|
193
193
|
const n = mt[t].get(o.target);
|
|
194
194
|
n == null || n.set(o.isIntersecting);
|
|
195
195
|
});
|
|
196
|
-
},
|
|
196
|
+
}, Ie[t])), st[t];
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const Xe = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
199
199
|
const n = W(!1);
|
|
200
200
|
return K(
|
|
201
201
|
H((s) => {
|
|
202
|
-
const r = typeof IntersectionObserver < "u" ?
|
|
202
|
+
const r = typeof IntersectionObserver < "u" ? Ye(t) : null;
|
|
203
203
|
mt[t].set(s, n), r == null || r.observe(s);
|
|
204
204
|
function i() {
|
|
205
205
|
var a;
|
|
@@ -214,8 +214,8 @@ const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
|
214
214
|
}),
|
|
215
215
|
Mt(o(n))
|
|
216
216
|
);
|
|
217
|
-
},
|
|
218
|
-
function
|
|
217
|
+
}, no = (t, e, o) => Xe(t, (n) => ie(n, e, o ?? (() => Et)));
|
|
218
|
+
function qe(t) {
|
|
219
219
|
return H((e) => {
|
|
220
220
|
const o = (n) => {
|
|
221
221
|
e.contains(n.target) || t(n);
|
|
@@ -225,9 +225,9 @@ function Xe(t) {
|
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
const G = (t, e) => t === void 0 || t === e,
|
|
229
|
-
function
|
|
230
|
-
return typeof t == "string" ? e.key === t :
|
|
228
|
+
const G = (t, e) => t === void 0 || t === e, jt = (t, e) => t === void 0 || t === e;
|
|
229
|
+
function Qe(t, e) {
|
|
230
|
+
return typeof t == "string" ? e.key === t : jt(t.key, e.key) && jt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
|
|
231
231
|
t.commandOrControlKey,
|
|
232
232
|
e.metaKey || e.ctrlKey
|
|
233
233
|
);
|
|
@@ -240,7 +240,7 @@ function fe({
|
|
|
240
240
|
const n = (s) => {
|
|
241
241
|
if (o.contains(s.target)) {
|
|
242
242
|
for (const r of t)
|
|
243
|
-
if (
|
|
243
|
+
if (Qe(r, s)) {
|
|
244
244
|
e(s);
|
|
245
245
|
break;
|
|
246
246
|
}
|
|
@@ -251,13 +251,13 @@ function fe({
|
|
|
251
251
|
});
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function oo(t) {
|
|
255
255
|
return fe({ allowedKeys: ["Enter"], handler: t });
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function so(t) {
|
|
258
258
|
return fe({ allowedKeys: ["Escape"], handler: t });
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const Je = ({
|
|
261
261
|
mutate: t,
|
|
262
262
|
convertError: e,
|
|
263
263
|
onSuccess: o,
|
|
@@ -266,10 +266,10 @@ const Qe = ({
|
|
|
266
266
|
}) => {
|
|
267
267
|
let r;
|
|
268
268
|
const i = W(R.notAsked), c = i.map(
|
|
269
|
-
(
|
|
269
|
+
(h) => R.isSuccess(h) ? h.value : void 0
|
|
270
270
|
), a = i.map(
|
|
271
|
-
(
|
|
272
|
-
), l = i.map((
|
|
271
|
+
(h) => R.isFailure(h) ? h.error : void 0
|
|
272
|
+
), l = i.map((h) => R.isLoading(h)), f = () => {
|
|
273
273
|
r == null || r.abort(), r = void 0;
|
|
274
274
|
};
|
|
275
275
|
return {
|
|
@@ -277,80 +277,64 @@ const Qe = ({
|
|
|
277
277
|
value: c,
|
|
278
278
|
error: a,
|
|
279
279
|
pending: l,
|
|
280
|
-
execute: async (
|
|
280
|
+
execute: async (h, p) => {
|
|
281
281
|
f(), r = new AbortController();
|
|
282
|
-
const
|
|
282
|
+
const m = r.signal, y = i.get(), v = (p == null ? void 0 : p.optimisticValue) ?? ((p == null ? void 0 : p.optimisticFromRequest) != null ? p.optimisticFromRequest(h) : void 0);
|
|
283
283
|
v != null ? i.set(R.loading(v)) : i.set(R.loading(R.getOrUndefined(y)));
|
|
284
284
|
try {
|
|
285
|
-
const w = await t({ request:
|
|
286
|
-
r = void 0, i.set(R.success(w)), o == null || o(w,
|
|
285
|
+
const w = await t({ request: h, abortSignal: m, previous: y });
|
|
286
|
+
r = void 0, i.set(R.success(w)), o == null || o(w, h);
|
|
287
287
|
} catch (w) {
|
|
288
|
-
r = void 0, i.set(R.failure(e(w))), n == null || n(e(w),
|
|
288
|
+
r = void 0, i.set(R.failure(e(w))), n == null || n(e(w), h);
|
|
289
289
|
}
|
|
290
|
-
s == null || s(i.get(),
|
|
290
|
+
s == null || s(i.get(), h);
|
|
291
291
|
},
|
|
292
|
-
cancel: (
|
|
293
|
-
f(), i.set(
|
|
292
|
+
cancel: (h) => {
|
|
293
|
+
f(), i.set(h ?? R.notAsked);
|
|
294
294
|
},
|
|
295
295
|
dispose: () => {
|
|
296
296
|
r == null || r.abort(), r = void 0, i.dispose();
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
|
-
},
|
|
300
|
-
const { status: o, dispose: n, execute: s
|
|
301
|
-
let l;
|
|
302
|
-
const f = () => {
|
|
303
|
-
l != null && s(l);
|
|
304
|
-
}, h = (m) => {
|
|
305
|
-
l = m, s(m);
|
|
306
|
-
};
|
|
299
|
+
}, Ge = (t, e) => {
|
|
300
|
+
const { status: o, dispose: n, execute: s, cancel: r, pending: i, error: c, value: a } = t, { content: l } = e, f = Te(a);
|
|
307
301
|
return K(
|
|
308
302
|
F(n),
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
success: (m) => c({ value: m, execute: h }),
|
|
318
|
-
notAsked: () => a({ execute: h })
|
|
303
|
+
l({
|
|
304
|
+
previous: f,
|
|
305
|
+
execute: s,
|
|
306
|
+
cancel: r,
|
|
307
|
+
pending: i,
|
|
308
|
+
error: c,
|
|
309
|
+
value: a,
|
|
310
|
+
status: o
|
|
319
311
|
})
|
|
320
312
|
);
|
|
321
|
-
},
|
|
313
|
+
}, io = ({
|
|
322
314
|
mutate: t,
|
|
323
|
-
convertError: e = (
|
|
315
|
+
convertError: e = (i) => i,
|
|
324
316
|
onSuccess: o,
|
|
325
317
|
onError: n,
|
|
326
318
|
onSettled: s,
|
|
327
|
-
|
|
328
|
-
failure: i,
|
|
329
|
-
success: c,
|
|
330
|
-
notAsked: a
|
|
319
|
+
content: r
|
|
331
320
|
}) => {
|
|
332
|
-
const
|
|
321
|
+
const i = Je({
|
|
333
322
|
mutate: t,
|
|
334
323
|
convertError: e,
|
|
335
324
|
onSuccess: o,
|
|
336
325
|
onError: n,
|
|
337
326
|
onSettled: s
|
|
338
327
|
});
|
|
339
|
-
return
|
|
340
|
-
pending: r,
|
|
341
|
-
failure: i,
|
|
342
|
-
success: c,
|
|
343
|
-
notAsked: a
|
|
344
|
-
});
|
|
328
|
+
return Ge(i, { content: r });
|
|
345
329
|
}, tt = Math.min, q = Math.max, gt = Math.round, dt = Math.floor, M = (t) => ({
|
|
346
330
|
x: t,
|
|
347
331
|
y: t
|
|
348
|
-
}),
|
|
332
|
+
}), Ze = {
|
|
349
333
|
left: "right",
|
|
350
334
|
right: "left",
|
|
351
335
|
bottom: "top",
|
|
352
336
|
top: "bottom"
|
|
353
|
-
},
|
|
337
|
+
}, tn = {
|
|
354
338
|
start: "end",
|
|
355
339
|
end: "start"
|
|
356
340
|
};
|
|
@@ -369,29 +353,29 @@ function ut(t) {
|
|
|
369
353
|
function he(t) {
|
|
370
354
|
return t === "x" ? "y" : "x";
|
|
371
355
|
}
|
|
372
|
-
function
|
|
356
|
+
function Vt(t) {
|
|
373
357
|
return t === "y" ? "height" : "width";
|
|
374
358
|
}
|
|
375
359
|
function z(t) {
|
|
376
360
|
return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
|
|
377
361
|
}
|
|
378
|
-
function
|
|
362
|
+
function $t(t) {
|
|
379
363
|
return he(z(t));
|
|
380
364
|
}
|
|
381
|
-
function
|
|
365
|
+
function en(t, e, o) {
|
|
382
366
|
o === void 0 && (o = !1);
|
|
383
|
-
const n = ut(t), s =
|
|
367
|
+
const n = ut(t), s = $t(t), r = Vt(s);
|
|
384
368
|
let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
385
369
|
return e.reference[r] > e.floating[r] && (i = pt(i)), [i, pt(i)];
|
|
386
370
|
}
|
|
387
|
-
function
|
|
371
|
+
function nn(t) {
|
|
388
372
|
const e = pt(t);
|
|
389
373
|
return [kt(t), e, kt(e)];
|
|
390
374
|
}
|
|
391
375
|
function kt(t) {
|
|
392
|
-
return t.replace(/start|end/g, (e) =>
|
|
376
|
+
return t.replace(/start|end/g, (e) => tn[e]);
|
|
393
377
|
}
|
|
394
|
-
function
|
|
378
|
+
function on(t, e, o) {
|
|
395
379
|
const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
396
380
|
switch (t) {
|
|
397
381
|
case "top":
|
|
@@ -404,15 +388,15 @@ function nn(t, e, o) {
|
|
|
404
388
|
return [];
|
|
405
389
|
}
|
|
406
390
|
}
|
|
407
|
-
function
|
|
391
|
+
function sn(t, e, o, n) {
|
|
408
392
|
const s = ut(t);
|
|
409
|
-
let r =
|
|
393
|
+
let r = on(Q(t), o === "start", n);
|
|
410
394
|
return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(kt)))), r;
|
|
411
395
|
}
|
|
412
396
|
function pt(t) {
|
|
413
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
397
|
+
return t.replace(/left|right|bottom|top/g, (e) => Ze[e]);
|
|
414
398
|
}
|
|
415
|
-
function
|
|
399
|
+
function rn(t) {
|
|
416
400
|
return {
|
|
417
401
|
top: 0,
|
|
418
402
|
right: 0,
|
|
@@ -422,7 +406,7 @@ function sn(t) {
|
|
|
422
406
|
};
|
|
423
407
|
}
|
|
424
408
|
function de(t) {
|
|
425
|
-
return typeof t != "number" ?
|
|
409
|
+
return typeof t != "number" ? rn(t) : {
|
|
426
410
|
top: t,
|
|
427
411
|
right: t,
|
|
428
412
|
bottom: t,
|
|
@@ -447,12 +431,12 @@ function wt(t) {
|
|
|
447
431
|
y: o
|
|
448
432
|
};
|
|
449
433
|
}
|
|
450
|
-
function
|
|
434
|
+
function _t(t, e, o) {
|
|
451
435
|
let {
|
|
452
436
|
reference: n,
|
|
453
437
|
floating: s
|
|
454
438
|
} = t;
|
|
455
|
-
const r = z(e), i =
|
|
439
|
+
const r = z(e), i = $t(e), c = Vt(i), a = Q(e), l = r === "y", f = n.x + n.width / 2 - s.width / 2, d = n.y + n.height / 2 - s.height / 2, g = n[c] / 2 - s[c] / 2;
|
|
456
440
|
let u;
|
|
457
441
|
switch (a) {
|
|
458
442
|
case "top":
|
|
@@ -470,13 +454,13 @@ function It(t, e, o) {
|
|
|
470
454
|
case "right":
|
|
471
455
|
u = {
|
|
472
456
|
x: n.x + n.width,
|
|
473
|
-
y:
|
|
457
|
+
y: d
|
|
474
458
|
};
|
|
475
459
|
break;
|
|
476
460
|
case "left":
|
|
477
461
|
u = {
|
|
478
462
|
x: n.x - s.width,
|
|
479
|
-
y:
|
|
463
|
+
y: d
|
|
480
464
|
};
|
|
481
465
|
break;
|
|
482
466
|
default:
|
|
@@ -487,15 +471,15 @@ function It(t, e, o) {
|
|
|
487
471
|
}
|
|
488
472
|
switch (ut(e)) {
|
|
489
473
|
case "start":
|
|
490
|
-
u[i] -=
|
|
474
|
+
u[i] -= g * (o && l ? -1 : 1);
|
|
491
475
|
break;
|
|
492
476
|
case "end":
|
|
493
|
-
u[i] +=
|
|
477
|
+
u[i] += g * (o && l ? -1 : 1);
|
|
494
478
|
break;
|
|
495
479
|
}
|
|
496
480
|
return u;
|
|
497
481
|
}
|
|
498
|
-
const
|
|
482
|
+
const cn = async (t, e, o) => {
|
|
499
483
|
const {
|
|
500
484
|
placement: n = "bottom",
|
|
501
485
|
strategy: s = "absolute",
|
|
@@ -508,11 +492,11 @@ const rn = async (t, e, o) => {
|
|
|
508
492
|
strategy: s
|
|
509
493
|
}), {
|
|
510
494
|
x: f,
|
|
511
|
-
y:
|
|
512
|
-
} =
|
|
495
|
+
y: d
|
|
496
|
+
} = _t(l, n, a), g = n, u = {}, h = 0;
|
|
513
497
|
for (let p = 0; p < c.length; p++) {
|
|
514
498
|
const {
|
|
515
|
-
name:
|
|
499
|
+
name: m,
|
|
516
500
|
fn: y
|
|
517
501
|
} = c[p], {
|
|
518
502
|
x: v,
|
|
@@ -521,9 +505,9 @@ const rn = async (t, e, o) => {
|
|
|
521
505
|
reset: x
|
|
522
506
|
} = await y({
|
|
523
507
|
x: f,
|
|
524
|
-
y:
|
|
508
|
+
y: d,
|
|
525
509
|
initialPlacement: n,
|
|
526
|
-
placement:
|
|
510
|
+
placement: g,
|
|
527
511
|
strategy: s,
|
|
528
512
|
middlewareData: u,
|
|
529
513
|
rects: l,
|
|
@@ -533,25 +517,25 @@ const rn = async (t, e, o) => {
|
|
|
533
517
|
floating: e
|
|
534
518
|
}
|
|
535
519
|
});
|
|
536
|
-
f = v ?? f,
|
|
520
|
+
f = v ?? f, d = w ?? d, u = {
|
|
537
521
|
...u,
|
|
538
|
-
[
|
|
539
|
-
...u[
|
|
522
|
+
[m]: {
|
|
523
|
+
...u[m],
|
|
540
524
|
...b
|
|
541
525
|
}
|
|
542
|
-
}, x &&
|
|
526
|
+
}, x && h <= 50 && (h++, typeof x == "object" && (x.placement && (g = x.placement), x.rects && (l = x.rects === !0 ? await i.getElementRects({
|
|
543
527
|
reference: t,
|
|
544
528
|
floating: e,
|
|
545
529
|
strategy: s
|
|
546
530
|
}) : x.rects), {
|
|
547
531
|
x: f,
|
|
548
|
-
y:
|
|
549
|
-
} =
|
|
532
|
+
y: d
|
|
533
|
+
} = _t(l, g, a)), p = -1);
|
|
550
534
|
}
|
|
551
535
|
return {
|
|
552
536
|
x: f,
|
|
553
|
-
y:
|
|
554
|
-
placement:
|
|
537
|
+
y: d,
|
|
538
|
+
placement: g,
|
|
555
539
|
strategy: s,
|
|
556
540
|
middlewareData: u
|
|
557
541
|
};
|
|
@@ -569,15 +553,15 @@ async function me(t, e) {
|
|
|
569
553
|
} = t, {
|
|
570
554
|
boundary: l = "clippingAncestors",
|
|
571
555
|
rootBoundary: f = "viewport",
|
|
572
|
-
elementContext:
|
|
573
|
-
altBoundary:
|
|
556
|
+
elementContext: d = "floating",
|
|
557
|
+
altBoundary: g = !1,
|
|
574
558
|
padding: u = 0
|
|
575
|
-
} = lt(e, t),
|
|
576
|
-
element: (o = await (r.isElement == null ? void 0 : r.isElement(
|
|
559
|
+
} = lt(e, t), h = de(u), m = c[g ? d === "floating" ? "reference" : "floating" : d], y = wt(await r.getClippingRect({
|
|
560
|
+
element: (o = await (r.isElement == null ? void 0 : r.isElement(m))) == null || o ? m : m.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
577
561
|
boundary: l,
|
|
578
562
|
rootBoundary: f,
|
|
579
563
|
strategy: a
|
|
580
|
-
})), v =
|
|
564
|
+
})), v = d === "floating" ? {
|
|
581
565
|
x: n,
|
|
582
566
|
y: s,
|
|
583
567
|
width: i.floating.width,
|
|
@@ -595,13 +579,13 @@ async function me(t, e) {
|
|
|
595
579
|
strategy: a
|
|
596
580
|
}) : v);
|
|
597
581
|
return {
|
|
598
|
-
top: (y.top - x.top +
|
|
599
|
-
bottom: (x.bottom - y.bottom +
|
|
600
|
-
left: (y.left - x.left +
|
|
601
|
-
right: (x.right - y.right +
|
|
582
|
+
top: (y.top - x.top + h.top) / b.y,
|
|
583
|
+
bottom: (x.bottom - y.bottom + h.bottom) / b.y,
|
|
584
|
+
left: (y.left - x.left + h.left) / b.x,
|
|
585
|
+
right: (x.right - y.right + h.right) / b.x
|
|
602
586
|
};
|
|
603
587
|
}
|
|
604
|
-
const
|
|
588
|
+
const an = (t) => ({
|
|
605
589
|
name: "arrow",
|
|
606
590
|
options: t,
|
|
607
591
|
async fn(e) {
|
|
@@ -619,15 +603,15 @@ const cn = (t) => ({
|
|
|
619
603
|
} = lt(t, e) || {};
|
|
620
604
|
if (l == null)
|
|
621
605
|
return {};
|
|
622
|
-
const
|
|
606
|
+
const d = de(f), g = {
|
|
623
607
|
x: o,
|
|
624
608
|
y: n
|
|
625
|
-
}, u =
|
|
609
|
+
}, u = $t(s), h = Vt(u), p = await i.getDimensions(l), m = u === "y", y = m ? "top" : "left", v = m ? "bottom" : "right", w = m ? "clientHeight" : "clientWidth", b = r.reference[h] + r.reference[u] - g[u] - r.floating[h], x = g[u] - r.reference[u], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
626
610
|
let A = P ? P[w] : 0;
|
|
627
|
-
(!A || !await (i.isElement == null ? void 0 : i.isElement(P))) && (A = c.floating[w] || r.floating[
|
|
628
|
-
const _ = b / 2 - x / 2, $ = A / 2 - p[
|
|
611
|
+
(!A || !await (i.isElement == null ? void 0 : i.isElement(P))) && (A = c.floating[w] || r.floating[h]);
|
|
612
|
+
const _ = b / 2 - x / 2, $ = A / 2 - p[h] / 2 - 1, T = tt(d[y], $), I = tt(d[v], $), Y = T, ot = A - p[h] - I, O = A / 2 - p[h] / 2 + _, X = Tt(Y, O, ot), B = !a.arrow && ut(s) != null && O !== X && r.reference[h] / 2 - (O < Y ? T : I) - p[h] / 2 < 0, k = B ? O < Y ? O - Y : O - ot : 0;
|
|
629
613
|
return {
|
|
630
|
-
[u]:
|
|
614
|
+
[u]: g[u] + k,
|
|
631
615
|
data: {
|
|
632
616
|
[u]: X,
|
|
633
617
|
centerOffset: O - X - k,
|
|
@@ -638,7 +622,7 @@ const cn = (t) => ({
|
|
|
638
622
|
reset: B
|
|
639
623
|
};
|
|
640
624
|
}
|
|
641
|
-
}),
|
|
625
|
+
}), ln = function(t) {
|
|
642
626
|
return t === void 0 && (t = {}), {
|
|
643
627
|
name: "flip",
|
|
644
628
|
options: t,
|
|
@@ -653,21 +637,21 @@ const cn = (t) => ({
|
|
|
653
637
|
elements: l
|
|
654
638
|
} = e, {
|
|
655
639
|
mainAxis: f = !0,
|
|
656
|
-
crossAxis:
|
|
657
|
-
fallbackPlacements:
|
|
640
|
+
crossAxis: d = !0,
|
|
641
|
+
fallbackPlacements: g,
|
|
658
642
|
fallbackStrategy: u = "bestFit",
|
|
659
|
-
fallbackAxisSideDirection:
|
|
643
|
+
fallbackAxisSideDirection: h = "none",
|
|
660
644
|
flipAlignment: p = !0,
|
|
661
|
-
...
|
|
645
|
+
...m
|
|
662
646
|
} = lt(t, e);
|
|
663
647
|
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
664
648
|
return {};
|
|
665
|
-
const y = Q(s), v = z(c), w = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x =
|
|
666
|
-
!
|
|
667
|
-
const A = [c, ...x], _ = await me(e,
|
|
649
|
+
const y = Q(s), v = z(c), w = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = g || (w || !p ? [pt(c)] : nn(c)), P = h !== "none";
|
|
650
|
+
!g && P && x.push(...sn(c, p, h, b));
|
|
651
|
+
const A = [c, ...x], _ = await me(e, m), $ = [];
|
|
668
652
|
let T = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
669
|
-
if (f && $.push(_[y]),
|
|
670
|
-
const O =
|
|
653
|
+
if (f && $.push(_[y]), d) {
|
|
654
|
+
const O = en(s, i, b);
|
|
671
655
|
$.push(_[O[0]], _[O[1]]);
|
|
672
656
|
}
|
|
673
657
|
if (T = [...T, {
|
|
@@ -676,7 +660,7 @@ const cn = (t) => ({
|
|
|
676
660
|
}], !$.every((O) => O <= 0)) {
|
|
677
661
|
var I, Y;
|
|
678
662
|
const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, X = A[O];
|
|
679
|
-
if (X && (!(
|
|
663
|
+
if (X && (!(d === "alignment" ? v !== z(X) : !1) || // We leave the current main axis only if every placement on that axis
|
|
680
664
|
// overflows the main axis.
|
|
681
665
|
T.every((S) => S.overflows[0] > 0 && z(S.placement) === v)))
|
|
682
666
|
return {
|
|
@@ -720,34 +704,34 @@ const cn = (t) => ({
|
|
|
720
704
|
}
|
|
721
705
|
};
|
|
722
706
|
};
|
|
723
|
-
async function
|
|
707
|
+
async function un(t, e) {
|
|
724
708
|
const {
|
|
725
709
|
placement: o,
|
|
726
710
|
platform: n,
|
|
727
711
|
elements: s
|
|
728
|
-
} = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, f = r && a ? -1 : 1,
|
|
712
|
+
} = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, f = r && a ? -1 : 1, d = lt(e, t);
|
|
729
713
|
let {
|
|
730
|
-
mainAxis:
|
|
714
|
+
mainAxis: g,
|
|
731
715
|
crossAxis: u,
|
|
732
|
-
alignmentAxis:
|
|
733
|
-
} = typeof
|
|
734
|
-
mainAxis:
|
|
716
|
+
alignmentAxis: h
|
|
717
|
+
} = typeof d == "number" ? {
|
|
718
|
+
mainAxis: d,
|
|
735
719
|
crossAxis: 0,
|
|
736
720
|
alignmentAxis: null
|
|
737
721
|
} : {
|
|
738
|
-
mainAxis:
|
|
739
|
-
crossAxis:
|
|
740
|
-
alignmentAxis:
|
|
722
|
+
mainAxis: d.mainAxis || 0,
|
|
723
|
+
crossAxis: d.crossAxis || 0,
|
|
724
|
+
alignmentAxis: d.alignmentAxis
|
|
741
725
|
};
|
|
742
|
-
return c && typeof
|
|
726
|
+
return c && typeof h == "number" && (u = c === "end" ? h * -1 : h), a ? {
|
|
743
727
|
x: u * f,
|
|
744
|
-
y:
|
|
728
|
+
y: g * l
|
|
745
729
|
} : {
|
|
746
|
-
x:
|
|
730
|
+
x: g * l,
|
|
747
731
|
y: u * f
|
|
748
732
|
};
|
|
749
733
|
}
|
|
750
|
-
const
|
|
734
|
+
const fn = function(t) {
|
|
751
735
|
return t === void 0 && (t = 0), {
|
|
752
736
|
name: "offset",
|
|
753
737
|
options: t,
|
|
@@ -758,7 +742,7 @@ const un = function(t) {
|
|
|
758
742
|
y: r,
|
|
759
743
|
placement: i,
|
|
760
744
|
middlewareData: c
|
|
761
|
-
} = e, a = await
|
|
745
|
+
} = e, a = await un(e, t);
|
|
762
746
|
return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
763
747
|
x: s + a.x,
|
|
764
748
|
y: r + a.y,
|
|
@@ -769,7 +753,7 @@ const un = function(t) {
|
|
|
769
753
|
};
|
|
770
754
|
}
|
|
771
755
|
};
|
|
772
|
-
},
|
|
756
|
+
}, hn = function(t) {
|
|
773
757
|
return t === void 0 && (t = {}), {
|
|
774
758
|
name: "shift",
|
|
775
759
|
options: t,
|
|
@@ -782,11 +766,11 @@ const un = function(t) {
|
|
|
782
766
|
mainAxis: r = !0,
|
|
783
767
|
crossAxis: i = !1,
|
|
784
768
|
limiter: c = {
|
|
785
|
-
fn: (
|
|
769
|
+
fn: (m) => {
|
|
786
770
|
let {
|
|
787
771
|
x: y,
|
|
788
772
|
y: v
|
|
789
|
-
} =
|
|
773
|
+
} = m;
|
|
790
774
|
return {
|
|
791
775
|
x: y,
|
|
792
776
|
y: v
|
|
@@ -797,20 +781,20 @@ const un = function(t) {
|
|
|
797
781
|
} = lt(t, e), l = {
|
|
798
782
|
x: o,
|
|
799
783
|
y: n
|
|
800
|
-
}, f = await me(e, a),
|
|
801
|
-
let u = l[
|
|
784
|
+
}, f = await me(e, a), d = z(Q(s)), g = he(d);
|
|
785
|
+
let u = l[g], h = l[d];
|
|
802
786
|
if (r) {
|
|
803
|
-
const
|
|
787
|
+
const m = g === "y" ? "top" : "left", y = g === "y" ? "bottom" : "right", v = u + f[m], w = u - f[y];
|
|
804
788
|
u = Tt(v, u, w);
|
|
805
789
|
}
|
|
806
790
|
if (i) {
|
|
807
|
-
const
|
|
808
|
-
|
|
791
|
+
const m = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", v = h + f[m], w = h - f[y];
|
|
792
|
+
h = Tt(v, h, w);
|
|
809
793
|
}
|
|
810
794
|
const p = c.fn({
|
|
811
795
|
...e,
|
|
812
|
-
[
|
|
813
|
-
[
|
|
796
|
+
[g]: u,
|
|
797
|
+
[d]: h
|
|
814
798
|
});
|
|
815
799
|
return {
|
|
816
800
|
...p,
|
|
@@ -818,8 +802,8 @@ const un = function(t) {
|
|
|
818
802
|
x: p.x - o,
|
|
819
803
|
y: p.y - n,
|
|
820
804
|
enabled: {
|
|
821
|
-
[
|
|
822
|
-
[
|
|
805
|
+
[g]: r,
|
|
806
|
+
[d]: i
|
|
823
807
|
}
|
|
824
808
|
}
|
|
825
809
|
};
|
|
@@ -849,7 +833,7 @@ function C(t) {
|
|
|
849
833
|
function N(t) {
|
|
850
834
|
return vt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
|
|
851
835
|
}
|
|
852
|
-
function
|
|
836
|
+
function It(t) {
|
|
853
837
|
return !vt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
|
|
854
838
|
}
|
|
855
839
|
function ft(t) {
|
|
@@ -861,7 +845,7 @@ function ft(t) {
|
|
|
861
845
|
} = D(t);
|
|
862
846
|
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
|
|
863
847
|
}
|
|
864
|
-
function
|
|
848
|
+
function dn(t) {
|
|
865
849
|
return ["table", "td", "th"].includes(nt(t));
|
|
866
850
|
}
|
|
867
851
|
function xt(t) {
|
|
@@ -873,14 +857,14 @@ function xt(t) {
|
|
|
873
857
|
}
|
|
874
858
|
});
|
|
875
859
|
}
|
|
876
|
-
function
|
|
877
|
-
const e =
|
|
860
|
+
function Bt(t) {
|
|
861
|
+
const e = Ht(), o = C(t) ? D(t) : t;
|
|
878
862
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
879
863
|
}
|
|
880
|
-
function
|
|
864
|
+
function mn(t) {
|
|
881
865
|
let e = j(t);
|
|
882
866
|
for (; N(e) && !et(e); ) {
|
|
883
|
-
if (
|
|
867
|
+
if (Bt(e))
|
|
884
868
|
return e;
|
|
885
869
|
if (xt(e))
|
|
886
870
|
return null;
|
|
@@ -888,7 +872,7 @@ function dn(t) {
|
|
|
888
872
|
}
|
|
889
873
|
return null;
|
|
890
874
|
}
|
|
891
|
-
function
|
|
875
|
+
function Ht() {
|
|
892
876
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
893
877
|
}
|
|
894
878
|
function et(t) {
|
|
@@ -913,10 +897,10 @@ function j(t) {
|
|
|
913
897
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
914
898
|
t.assignedSlot || // DOM Element detected.
|
|
915
899
|
t.parentNode || // ShadowRoot detected.
|
|
916
|
-
|
|
900
|
+
It(t) && t.host || // Fallback.
|
|
917
901
|
V(t)
|
|
918
902
|
);
|
|
919
|
-
return
|
|
903
|
+
return It(e) ? e.host : e;
|
|
920
904
|
}
|
|
921
905
|
function pe(t) {
|
|
922
906
|
const e = j(t);
|
|
@@ -945,11 +929,11 @@ function we(t) {
|
|
|
945
929
|
$: c
|
|
946
930
|
};
|
|
947
931
|
}
|
|
948
|
-
function
|
|
932
|
+
function Ut(t) {
|
|
949
933
|
return C(t) ? t : t.contextElement;
|
|
950
934
|
}
|
|
951
935
|
function Z(t) {
|
|
952
|
-
const e =
|
|
936
|
+
const e = Ut(t);
|
|
953
937
|
if (!N(e))
|
|
954
938
|
return M(1);
|
|
955
939
|
const o = e.getBoundingClientRect(), {
|
|
@@ -963,40 +947,40 @@ function Z(t) {
|
|
|
963
947
|
y: c
|
|
964
948
|
};
|
|
965
949
|
}
|
|
966
|
-
const
|
|
950
|
+
const gn = /* @__PURE__ */ M(0);
|
|
967
951
|
function ye(t) {
|
|
968
952
|
const e = E(t);
|
|
969
|
-
return !
|
|
953
|
+
return !Ht() || !e.visualViewport ? gn : {
|
|
970
954
|
x: e.visualViewport.offsetLeft,
|
|
971
955
|
y: e.visualViewport.offsetTop
|
|
972
956
|
};
|
|
973
957
|
}
|
|
974
|
-
function
|
|
958
|
+
function pn(t, e, o) {
|
|
975
959
|
return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
|
|
976
960
|
}
|
|
977
961
|
function J(t, e, o, n) {
|
|
978
962
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
979
|
-
const s = t.getBoundingClientRect(), r =
|
|
963
|
+
const s = t.getBoundingClientRect(), r = Ut(t);
|
|
980
964
|
let i = M(1);
|
|
981
965
|
e && (n ? C(n) && (i = Z(n)) : i = Z(t));
|
|
982
|
-
const c =
|
|
983
|
-
let a = (s.left + c.x) / i.x, l = (s.top + c.y) / i.y, f = s.width / i.x,
|
|
966
|
+
const c = pn(r, o, n) ? ye(r) : M(0);
|
|
967
|
+
let a = (s.left + c.x) / i.x, l = (s.top + c.y) / i.y, f = s.width / i.x, d = s.height / i.y;
|
|
984
968
|
if (r) {
|
|
985
|
-
const
|
|
986
|
-
let
|
|
987
|
-
for (; p && n && u !==
|
|
988
|
-
const
|
|
989
|
-
a *=
|
|
969
|
+
const g = E(r), u = n && C(n) ? E(n) : n;
|
|
970
|
+
let h = g, p = St(h);
|
|
971
|
+
for (; p && n && u !== h; ) {
|
|
972
|
+
const m = Z(p), y = p.getBoundingClientRect(), v = D(p), w = y.left + (p.clientLeft + parseFloat(v.paddingLeft)) * m.x, b = y.top + (p.clientTop + parseFloat(v.paddingTop)) * m.y;
|
|
973
|
+
a *= m.x, l *= m.y, f *= m.x, d *= m.y, a += w, l += b, h = E(p), p = St(h);
|
|
990
974
|
}
|
|
991
975
|
}
|
|
992
976
|
return wt({
|
|
993
977
|
width: f,
|
|
994
|
-
height:
|
|
978
|
+
height: d,
|
|
995
979
|
x: a,
|
|
996
980
|
y: l
|
|
997
981
|
});
|
|
998
982
|
}
|
|
999
|
-
function
|
|
983
|
+
function zt(t, e) {
|
|
1000
984
|
const o = bt(t).scrollLeft;
|
|
1001
985
|
return e ? e.left + o : J(V(t)).left + o;
|
|
1002
986
|
}
|
|
@@ -1004,14 +988,14 @@ function ve(t, e, o) {
|
|
|
1004
988
|
o === void 0 && (o = !1);
|
|
1005
989
|
const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
|
|
1006
990
|
// RTL <body> scrollbar.
|
|
1007
|
-
|
|
991
|
+
zt(t, n)
|
|
1008
992
|
)), r = n.top + e.scrollTop;
|
|
1009
993
|
return {
|
|
1010
994
|
x: s,
|
|
1011
995
|
y: r
|
|
1012
996
|
};
|
|
1013
997
|
}
|
|
1014
|
-
function
|
|
998
|
+
function wn(t) {
|
|
1015
999
|
let {
|
|
1016
1000
|
elements: e,
|
|
1017
1001
|
rect: o,
|
|
@@ -1025,25 +1009,25 @@ function pn(t) {
|
|
|
1025
1009
|
scrollLeft: 0,
|
|
1026
1010
|
scrollTop: 0
|
|
1027
1011
|
}, l = M(1);
|
|
1028
|
-
const f = M(0),
|
|
1029
|
-
if ((
|
|
1012
|
+
const f = M(0), d = N(n);
|
|
1013
|
+
if ((d || !d && !r) && ((nt(n) !== "body" || ft(i)) && (a = bt(n)), N(n))) {
|
|
1030
1014
|
const u = J(n);
|
|
1031
1015
|
l = Z(n), f.x = u.x + n.clientLeft, f.y = u.y + n.clientTop;
|
|
1032
1016
|
}
|
|
1033
|
-
const
|
|
1017
|
+
const g = i && !d && !r ? ve(i, a, !0) : M(0);
|
|
1034
1018
|
return {
|
|
1035
1019
|
width: o.width * l.x,
|
|
1036
1020
|
height: o.height * l.y,
|
|
1037
|
-
x: o.x * l.x - a.scrollLeft * l.x + f.x +
|
|
1038
|
-
y: o.y * l.y - a.scrollTop * l.y + f.y +
|
|
1021
|
+
x: o.x * l.x - a.scrollLeft * l.x + f.x + g.x,
|
|
1022
|
+
y: o.y * l.y - a.scrollTop * l.y + f.y + g.y
|
|
1039
1023
|
};
|
|
1040
1024
|
}
|
|
1041
|
-
function
|
|
1025
|
+
function yn(t) {
|
|
1042
1026
|
return Array.from(t.getClientRects());
|
|
1043
1027
|
}
|
|
1044
|
-
function
|
|
1028
|
+
function vn(t) {
|
|
1045
1029
|
const e = V(t), o = bt(t), n = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1046
|
-
let i = -o.scrollLeft +
|
|
1030
|
+
let i = -o.scrollLeft + zt(t);
|
|
1047
1031
|
const c = -o.scrollTop;
|
|
1048
1032
|
return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
|
|
1049
1033
|
width: s,
|
|
@@ -1052,12 +1036,12 @@ function yn(t) {
|
|
|
1052
1036
|
y: c
|
|
1053
1037
|
};
|
|
1054
1038
|
}
|
|
1055
|
-
function
|
|
1039
|
+
function xn(t, e) {
|
|
1056
1040
|
const o = E(t), n = V(t), s = o.visualViewport;
|
|
1057
1041
|
let r = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
|
|
1058
1042
|
if (s) {
|
|
1059
1043
|
r = s.width, i = s.height;
|
|
1060
|
-
const l =
|
|
1044
|
+
const l = Ht();
|
|
1061
1045
|
(!l || l && e === "fixed") && (c = s.offsetLeft, a = s.offsetTop);
|
|
1062
1046
|
}
|
|
1063
1047
|
return {
|
|
@@ -1067,7 +1051,7 @@ function vn(t, e) {
|
|
|
1067
1051
|
y: a
|
|
1068
1052
|
};
|
|
1069
1053
|
}
|
|
1070
|
-
function
|
|
1054
|
+
function bn(t, e) {
|
|
1071
1055
|
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = N(t) ? Z(t) : M(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, a = s * r.x, l = n * r.y;
|
|
1072
1056
|
return {
|
|
1073
1057
|
width: i,
|
|
@@ -1076,14 +1060,14 @@ function xn(t, e) {
|
|
|
1076
1060
|
y: l
|
|
1077
1061
|
};
|
|
1078
1062
|
}
|
|
1079
|
-
function
|
|
1063
|
+
function Yt(t, e, o) {
|
|
1080
1064
|
let n;
|
|
1081
1065
|
if (e === "viewport")
|
|
1082
|
-
n =
|
|
1066
|
+
n = xn(t, o);
|
|
1083
1067
|
else if (e === "document")
|
|
1084
|
-
n =
|
|
1068
|
+
n = vn(V(t));
|
|
1085
1069
|
else if (C(e))
|
|
1086
|
-
n =
|
|
1070
|
+
n = bn(e, o);
|
|
1087
1071
|
else {
|
|
1088
1072
|
const s = ye(t);
|
|
1089
1073
|
n = {
|
|
@@ -1099,7 +1083,7 @@ function xe(t, e) {
|
|
|
1099
1083
|
const o = j(t);
|
|
1100
1084
|
return o === e || !C(o) || et(o) ? !1 : D(o).position === "fixed" || xe(o, e);
|
|
1101
1085
|
}
|
|
1102
|
-
function
|
|
1086
|
+
function Rn(t, e) {
|
|
1103
1087
|
const o = e.get(t);
|
|
1104
1088
|
if (o)
|
|
1105
1089
|
return o;
|
|
@@ -1107,22 +1091,22 @@ function bn(t, e) {
|
|
|
1107
1091
|
const r = D(t).position === "fixed";
|
|
1108
1092
|
let i = r ? j(t) : t;
|
|
1109
1093
|
for (; C(i) && !et(i); ) {
|
|
1110
|
-
const c = D(i), a =
|
|
1094
|
+
const c = D(i), a = Bt(i);
|
|
1111
1095
|
!a && c.position === "fixed" && (s = null), (r ? !a && !s : !a && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ft(i) && !a && xe(t, i)) ? n = n.filter((f) => f !== i) : s = c, i = j(i);
|
|
1112
1096
|
}
|
|
1113
1097
|
return e.set(t, n), n;
|
|
1114
1098
|
}
|
|
1115
|
-
function
|
|
1099
|
+
function An(t) {
|
|
1116
1100
|
let {
|
|
1117
1101
|
element: e,
|
|
1118
1102
|
boundary: o,
|
|
1119
1103
|
rootBoundary: n,
|
|
1120
1104
|
strategy: s
|
|
1121
1105
|
} = t;
|
|
1122
|
-
const i = [...o === "clippingAncestors" ? xt(e) ? [] :
|
|
1123
|
-
const
|
|
1124
|
-
return l.top = q(
|
|
1125
|
-
},
|
|
1106
|
+
const i = [...o === "clippingAncestors" ? xt(e) ? [] : Rn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, f) => {
|
|
1107
|
+
const d = Yt(e, f, s);
|
|
1108
|
+
return l.top = q(d.top, l.top), l.right = tt(d.right, l.right), l.bottom = tt(d.bottom, l.bottom), l.left = q(d.left, l.left), l;
|
|
1109
|
+
}, Yt(e, c, s));
|
|
1126
1110
|
return {
|
|
1127
1111
|
width: a.right - a.left,
|
|
1128
1112
|
height: a.bottom - a.top,
|
|
@@ -1130,7 +1114,7 @@ function Rn(t) {
|
|
|
1130
1114
|
y: a.top
|
|
1131
1115
|
};
|
|
1132
1116
|
}
|
|
1133
|
-
function
|
|
1117
|
+
function On(t) {
|
|
1134
1118
|
const {
|
|
1135
1119
|
width: e,
|
|
1136
1120
|
height: o
|
|
@@ -1140,7 +1124,7 @@ function An(t) {
|
|
|
1140
1124
|
height: o
|
|
1141
1125
|
};
|
|
1142
1126
|
}
|
|
1143
|
-
function
|
|
1127
|
+
function Ln(t, e, o) {
|
|
1144
1128
|
const n = N(e), s = V(e), r = o === "fixed", i = J(t, !0, r, e);
|
|
1145
1129
|
let c = {
|
|
1146
1130
|
scrollLeft: 0,
|
|
@@ -1148,7 +1132,7 @@ function On(t, e, o) {
|
|
|
1148
1132
|
};
|
|
1149
1133
|
const a = M(0);
|
|
1150
1134
|
function l() {
|
|
1151
|
-
a.x =
|
|
1135
|
+
a.x = zt(s);
|
|
1152
1136
|
}
|
|
1153
1137
|
if (n || !n && !r)
|
|
1154
1138
|
if ((nt(e) !== "body" || ft(s)) && (c = bt(e)), n) {
|
|
@@ -1156,10 +1140,10 @@ function On(t, e, o) {
|
|
|
1156
1140
|
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
1157
1141
|
} else s && l();
|
|
1158
1142
|
r && !n && s && l();
|
|
1159
|
-
const f = s && !n && !r ? ve(s, c) : M(0),
|
|
1143
|
+
const f = s && !n && !r ? ve(s, c) : M(0), d = i.left + c.scrollLeft - a.x - f.x, g = i.top + c.scrollTop - a.y - f.y;
|
|
1160
1144
|
return {
|
|
1161
|
-
x:
|
|
1162
|
-
y:
|
|
1145
|
+
x: d,
|
|
1146
|
+
y: g,
|
|
1163
1147
|
width: i.width,
|
|
1164
1148
|
height: i.height
|
|
1165
1149
|
};
|
|
@@ -1167,7 +1151,7 @@ function On(t, e, o) {
|
|
|
1167
1151
|
function Ot(t) {
|
|
1168
1152
|
return D(t).position === "static";
|
|
1169
1153
|
}
|
|
1170
|
-
function
|
|
1154
|
+
function Xt(t, e) {
|
|
1171
1155
|
if (!N(t) || D(t).position === "fixed")
|
|
1172
1156
|
return null;
|
|
1173
1157
|
if (e)
|
|
@@ -1188,15 +1172,15 @@ function be(t, e) {
|
|
|
1188
1172
|
}
|
|
1189
1173
|
return o;
|
|
1190
1174
|
}
|
|
1191
|
-
let n =
|
|
1192
|
-
for (; n &&
|
|
1193
|
-
n =
|
|
1194
|
-
return n && et(n) && Ot(n) && !
|
|
1175
|
+
let n = Xt(t, e);
|
|
1176
|
+
for (; n && dn(n) && Ot(n); )
|
|
1177
|
+
n = Xt(n, e);
|
|
1178
|
+
return n && et(n) && Ot(n) && !Bt(n) ? o : n || mn(t) || o;
|
|
1195
1179
|
}
|
|
1196
|
-
const
|
|
1180
|
+
const En = async function(t) {
|
|
1197
1181
|
const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
|
|
1198
1182
|
return {
|
|
1199
|
-
reference:
|
|
1183
|
+
reference: Ln(t.reference, await e(t.floating), t.strategy),
|
|
1200
1184
|
floating: {
|
|
1201
1185
|
x: 0,
|
|
1202
1186
|
y: 0,
|
|
@@ -1205,25 +1189,25 @@ const Ln = async function(t) {
|
|
|
1205
1189
|
}
|
|
1206
1190
|
};
|
|
1207
1191
|
};
|
|
1208
|
-
function
|
|
1192
|
+
function Pn(t) {
|
|
1209
1193
|
return D(t).direction === "rtl";
|
|
1210
1194
|
}
|
|
1211
|
-
const
|
|
1212
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1195
|
+
const Tn = {
|
|
1196
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: wn,
|
|
1213
1197
|
getDocumentElement: V,
|
|
1214
|
-
getClippingRect:
|
|
1198
|
+
getClippingRect: An,
|
|
1215
1199
|
getOffsetParent: be,
|
|
1216
|
-
getElementRects:
|
|
1217
|
-
getClientRects:
|
|
1218
|
-
getDimensions:
|
|
1200
|
+
getElementRects: En,
|
|
1201
|
+
getClientRects: yn,
|
|
1202
|
+
getDimensions: On,
|
|
1219
1203
|
getScale: Z,
|
|
1220
1204
|
isElement: C,
|
|
1221
|
-
isRTL:
|
|
1205
|
+
isRTL: Pn
|
|
1222
1206
|
};
|
|
1223
1207
|
function Re(t, e) {
|
|
1224
1208
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1225
1209
|
}
|
|
1226
|
-
function
|
|
1210
|
+
function kn(t, e) {
|
|
1227
1211
|
let o = null, n;
|
|
1228
1212
|
const s = V(t);
|
|
1229
1213
|
function r() {
|
|
@@ -1234,14 +1218,14 @@ function Tn(t, e) {
|
|
|
1234
1218
|
c === void 0 && (c = !1), a === void 0 && (a = 1), r();
|
|
1235
1219
|
const l = t.getBoundingClientRect(), {
|
|
1236
1220
|
left: f,
|
|
1237
|
-
top:
|
|
1238
|
-
width:
|
|
1221
|
+
top: d,
|
|
1222
|
+
width: g,
|
|
1239
1223
|
height: u
|
|
1240
1224
|
} = l;
|
|
1241
|
-
if (c || e(), !
|
|
1225
|
+
if (c || e(), !g || !u)
|
|
1242
1226
|
return;
|
|
1243
|
-
const
|
|
1244
|
-
rootMargin: -
|
|
1227
|
+
const h = dt(d), p = dt(s.clientWidth - (f + g)), m = dt(s.clientHeight - (d + u)), y = dt(f), w = {
|
|
1228
|
+
rootMargin: -h + "px " + -p + "px " + -m + "px " + -y + "px",
|
|
1245
1229
|
threshold: q(0, tt(1, a)) || 1
|
|
1246
1230
|
};
|
|
1247
1231
|
let b = !0;
|
|
@@ -1269,7 +1253,7 @@ function Tn(t, e) {
|
|
|
1269
1253
|
}
|
|
1270
1254
|
return i(!0), r;
|
|
1271
1255
|
}
|
|
1272
|
-
function
|
|
1256
|
+
function Sn(t, e, o, n) {
|
|
1273
1257
|
n === void 0 && (n = {});
|
|
1274
1258
|
const {
|
|
1275
1259
|
ancestorScroll: s = !0,
|
|
@@ -1277,47 +1261,47 @@ function kn(t, e, o, n) {
|
|
|
1277
1261
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1278
1262
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1279
1263
|
animationFrame: a = !1
|
|
1280
|
-
} = n, l =
|
|
1264
|
+
} = n, l = Ut(t), f = s || r ? [...l ? rt(l) : [], ...rt(e)] : [];
|
|
1281
1265
|
f.forEach((y) => {
|
|
1282
1266
|
s && y.addEventListener("scroll", o, {
|
|
1283
1267
|
passive: !0
|
|
1284
1268
|
}), r && y.addEventListener("resize", o);
|
|
1285
1269
|
});
|
|
1286
|
-
const
|
|
1287
|
-
let
|
|
1270
|
+
const d = l && c ? kn(l, o) : null;
|
|
1271
|
+
let g = -1, u = null;
|
|
1288
1272
|
i && (u = new ResizeObserver((y) => {
|
|
1289
1273
|
let [v] = y;
|
|
1290
|
-
v && v.target === l && u && (u.unobserve(e), cancelAnimationFrame(
|
|
1274
|
+
v && v.target === l && u && (u.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
1291
1275
|
var w;
|
|
1292
1276
|
(w = u) == null || w.observe(e);
|
|
1293
1277
|
})), o();
|
|
1294
1278
|
}), l && !a && u.observe(l), u.observe(e));
|
|
1295
|
-
let
|
|
1296
|
-
a &&
|
|
1297
|
-
function
|
|
1279
|
+
let h, p = a ? J(t) : null;
|
|
1280
|
+
a && m();
|
|
1281
|
+
function m() {
|
|
1298
1282
|
const y = J(t);
|
|
1299
|
-
p && !Re(p, y) && o(), p = y,
|
|
1283
|
+
p && !Re(p, y) && o(), p = y, h = requestAnimationFrame(m);
|
|
1300
1284
|
}
|
|
1301
1285
|
return o(), () => {
|
|
1302
1286
|
var y;
|
|
1303
1287
|
f.forEach((v) => {
|
|
1304
1288
|
s && v.removeEventListener("scroll", o), r && v.removeEventListener("resize", o);
|
|
1305
|
-
}),
|
|
1289
|
+
}), d == null || d(), (y = u) == null || y.disconnect(), u = null, a && cancelAnimationFrame(h);
|
|
1306
1290
|
};
|
|
1307
1291
|
}
|
|
1308
|
-
const
|
|
1292
|
+
const Cn = fn, Dn = hn, qt = ln, Wn = an, Fn = (t, e, o) => {
|
|
1309
1293
|
const n = /* @__PURE__ */ new Map(), s = {
|
|
1310
|
-
platform:
|
|
1294
|
+
platform: Tn,
|
|
1311
1295
|
...o
|
|
1312
1296
|
}, r = {
|
|
1313
1297
|
...s.platform,
|
|
1314
1298
|
_c: n
|
|
1315
1299
|
};
|
|
1316
|
-
return
|
|
1300
|
+
return cn(t, e, {
|
|
1317
1301
|
...s,
|
|
1318
1302
|
platform: r
|
|
1319
1303
|
});
|
|
1320
|
-
},
|
|
1304
|
+
}, ro = [
|
|
1321
1305
|
"top",
|
|
1322
1306
|
"top-start",
|
|
1323
1307
|
"top-end",
|
|
@@ -1330,7 +1314,7 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1330
1314
|
"left",
|
|
1331
1315
|
"left-start",
|
|
1332
1316
|
"left-end"
|
|
1333
|
-
],
|
|
1317
|
+
], co = (t, e = { isOpen: !1 }) => {
|
|
1334
1318
|
const o = [];
|
|
1335
1319
|
let n = null;
|
|
1336
1320
|
const s = L.deriveProp(e.isOpen);
|
|
@@ -1342,12 +1326,12 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1342
1326
|
}
|
|
1343
1327
|
return K(
|
|
1344
1328
|
t(r, i),
|
|
1345
|
-
|
|
1329
|
+
ie(
|
|
1346
1330
|
s,
|
|
1347
1331
|
() => K(
|
|
1348
|
-
(n == null ? void 0 : n.onClickOutside) != null ?
|
|
1332
|
+
(n == null ? void 0 : n.onClickOutside) != null ? qe(n.onClickOutside) : null,
|
|
1349
1333
|
H(
|
|
1350
|
-
(c) =>
|
|
1334
|
+
(c) => se(
|
|
1351
1335
|
"body",
|
|
1352
1336
|
Lt.div(
|
|
1353
1337
|
H((a) => {
|
|
@@ -1358,14 +1342,14 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1358
1342
|
if (l == null)
|
|
1359
1343
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1360
1344
|
let f = null;
|
|
1361
|
-
const
|
|
1345
|
+
const d = L.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), g = L.toSignal(
|
|
1362
1346
|
(n == null ? void 0 : n.crossAxisOffset) ?? 0
|
|
1363
1347
|
), u = L.toSignal(
|
|
1364
1348
|
/* c8 ignore next 3 */
|
|
1365
1349
|
(n == null ? void 0 : n.placement) ?? "top"
|
|
1366
|
-
),
|
|
1350
|
+
), h = L.toSignal(
|
|
1367
1351
|
(n == null ? void 0 : n.arrowPadding) ?? 0
|
|
1368
|
-
), p = n == null ? void 0 : n.arrow,
|
|
1352
|
+
), p = n == null ? void 0 : n.arrow, m = W({
|
|
1369
1353
|
centerOffset: 0,
|
|
1370
1354
|
alignmentOffset: 0,
|
|
1371
1355
|
containerWidth: 0,
|
|
@@ -1375,21 +1359,21 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1375
1359
|
});
|
|
1376
1360
|
async function y() {
|
|
1377
1361
|
const w = [
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
mainAxis:
|
|
1381
|
-
crossAxis:
|
|
1362
|
+
qt(),
|
|
1363
|
+
Cn({
|
|
1364
|
+
mainAxis: d.get(),
|
|
1365
|
+
crossAxis: g.get()
|
|
1382
1366
|
}),
|
|
1383
|
-
|
|
1384
|
-
|
|
1367
|
+
Dn(),
|
|
1368
|
+
qt()
|
|
1385
1369
|
];
|
|
1386
1370
|
p != null && f != null && w.push(
|
|
1387
|
-
|
|
1371
|
+
Wn({
|
|
1388
1372
|
element: f,
|
|
1389
|
-
padding:
|
|
1373
|
+
padding: h.get()
|
|
1390
1374
|
})
|
|
1391
1375
|
);
|
|
1392
|
-
const b = await
|
|
1376
|
+
const b = await Fn(l, a, {
|
|
1393
1377
|
placement: u.get(),
|
|
1394
1378
|
strategy: "absolute",
|
|
1395
1379
|
middleware: w
|
|
@@ -1401,7 +1385,7 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1401
1385
|
centerOffset: T,
|
|
1402
1386
|
alignmentOffset: I
|
|
1403
1387
|
} = A.arrow;
|
|
1404
|
-
|
|
1388
|
+
m.set({
|
|
1405
1389
|
x: _,
|
|
1406
1390
|
y: $,
|
|
1407
1391
|
centerOffset: T,
|
|
@@ -1411,17 +1395,17 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1411
1395
|
});
|
|
1412
1396
|
}
|
|
1413
1397
|
}
|
|
1414
|
-
const v =
|
|
1415
|
-
|
|
1416
|
-
|
|
1398
|
+
const v = ke(
|
|
1399
|
+
d,
|
|
1400
|
+
g,
|
|
1417
1401
|
u
|
|
1418
1402
|
)(y);
|
|
1419
1403
|
return K(
|
|
1420
1404
|
n == null ? void 0 : n.content,
|
|
1421
1405
|
(n == null ? void 0 : n.arrow) != null ? Lt.div(
|
|
1422
1406
|
n == null ? void 0 : n.arrow(
|
|
1423
|
-
|
|
1424
|
-
|
|
1407
|
+
re(
|
|
1408
|
+
m,
|
|
1425
1409
|
u
|
|
1426
1410
|
)((w, b) => ({
|
|
1427
1411
|
...w,
|
|
@@ -1433,8 +1417,8 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1433
1417
|
})
|
|
1434
1418
|
) : null,
|
|
1435
1419
|
F(
|
|
1436
|
-
|
|
1437
|
-
|
|
1420
|
+
m.dispose,
|
|
1421
|
+
Sn(l, a, y),
|
|
1438
1422
|
v
|
|
1439
1423
|
)
|
|
1440
1424
|
);
|
|
@@ -1445,7 +1429,7 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1445
1429
|
)
|
|
1446
1430
|
)
|
|
1447
1431
|
);
|
|
1448
|
-
},
|
|
1432
|
+
}, Mn = ({
|
|
1449
1433
|
request: t,
|
|
1450
1434
|
load: e,
|
|
1451
1435
|
convertError: o,
|
|
@@ -1455,25 +1439,25 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1455
1439
|
}) => {
|
|
1456
1440
|
let i;
|
|
1457
1441
|
const c = W(R.notAsked), a = c.map(
|
|
1458
|
-
(
|
|
1442
|
+
(m) => R.isSuccess(m) ? m.value : void 0
|
|
1459
1443
|
), l = c.map(
|
|
1460
|
-
(
|
|
1461
|
-
), f = c.map((
|
|
1444
|
+
(m) => R.isFailure(m) ? m.error : void 0
|
|
1445
|
+
), f = c.map((m) => R.isLoading(m)), d = () => {
|
|
1462
1446
|
i == null || i.abort(), i = void 0;
|
|
1463
|
-
},
|
|
1464
|
-
|
|
1465
|
-
}, u = async (
|
|
1466
|
-
|
|
1447
|
+
}, g = (m) => {
|
|
1448
|
+
d(), c.set(m ?? R.notAsked);
|
|
1449
|
+
}, u = async (m) => {
|
|
1450
|
+
d(), i = new AbortController();
|
|
1467
1451
|
const y = i.signal, v = c.get();
|
|
1468
1452
|
c.set(R.loading(R.getOrUndefined(v)));
|
|
1469
1453
|
try {
|
|
1470
|
-
const w = await e({ request:
|
|
1471
|
-
await Promise.resolve(), i = void 0, c.set(R.success(w)), n == null || n(w,
|
|
1454
|
+
const w = await e({ request: m, abortSignal: y, previous: v });
|
|
1455
|
+
await Promise.resolve(), i = void 0, c.set(R.success(w)), n == null || n(w, m);
|
|
1472
1456
|
} catch (w) {
|
|
1473
|
-
i = void 0, c.set(R.failure(o(w))), s == null || s(o(w),
|
|
1457
|
+
i = void 0, c.set(R.failure(o(w))), s == null || s(o(w), m);
|
|
1474
1458
|
}
|
|
1475
|
-
r == null || r(c.get(),
|
|
1476
|
-
},
|
|
1459
|
+
r == null || r(c.get(), m);
|
|
1460
|
+
}, h = () => u(L.get(t)), p = () => {
|
|
1477
1461
|
i == null || i.abort(), i = void 0, c.dispose();
|
|
1478
1462
|
};
|
|
1479
1463
|
return c.onDispose(L.on(t, u)), {
|
|
@@ -1481,21 +1465,21 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1481
1465
|
value: a,
|
|
1482
1466
|
error: l,
|
|
1483
1467
|
loading: f,
|
|
1484
|
-
cancel:
|
|
1485
|
-
reload:
|
|
1468
|
+
cancel: g,
|
|
1469
|
+
reload: h,
|
|
1486
1470
|
dispose: p
|
|
1487
1471
|
};
|
|
1488
|
-
},
|
|
1472
|
+
}, Nn = (t, e) => {
|
|
1489
1473
|
const { status: o, dispose: n, reload: s } = t, { pending: r, failure: i, success: c } = e;
|
|
1490
1474
|
return K(
|
|
1491
1475
|
F(n),
|
|
1492
|
-
|
|
1476
|
+
ue(o, {
|
|
1493
1477
|
loading: r != null ? (a) => r({ previous: a, reload: s, cancel: t.cancel }) : void 0,
|
|
1494
1478
|
failure: i != null ? (a) => i({ error: a, reload: s }) : void 0,
|
|
1495
1479
|
success: (a) => c({ value: a, reload: s })
|
|
1496
1480
|
})
|
|
1497
1481
|
);
|
|
1498
|
-
},
|
|
1482
|
+
}, ao = ({
|
|
1499
1483
|
request: t,
|
|
1500
1484
|
load: e,
|
|
1501
1485
|
convertError: o = (l) => l,
|
|
@@ -1506,7 +1490,7 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1506
1490
|
pending: c,
|
|
1507
1491
|
failure: a
|
|
1508
1492
|
}) => {
|
|
1509
|
-
const l =
|
|
1493
|
+
const l = Mn({
|
|
1510
1494
|
request: t,
|
|
1511
1495
|
load: e,
|
|
1512
1496
|
convertError: o,
|
|
@@ -1514,19 +1498,19 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1514
1498
|
onError: s,
|
|
1515
1499
|
onSettled: r
|
|
1516
1500
|
});
|
|
1517
|
-
return
|
|
1518
|
-
},
|
|
1501
|
+
return Nn(l, { success: i, pending: c, failure: a });
|
|
1502
|
+
}, Vn = (t, e) => {
|
|
1519
1503
|
if (typeof e == "function")
|
|
1520
|
-
return
|
|
1504
|
+
return Vn(t, { success: e });
|
|
1521
1505
|
const o = e.failure ?? ((s) => K(
|
|
1522
1506
|
F(s.on(console.error)),
|
|
1523
1507
|
s.map((r) => `Error: ${r}`)
|
|
1524
1508
|
)), n = e.success;
|
|
1525
|
-
return
|
|
1509
|
+
return oe(L.toSignal(t), {
|
|
1526
1510
|
Success: (s) => n(s.$.value),
|
|
1527
1511
|
Failure: (s) => o(s.$.error)
|
|
1528
1512
|
});
|
|
1529
|
-
},
|
|
1513
|
+
}, lo = () => ne.focus((t) => {
|
|
1530
1514
|
var e;
|
|
1531
1515
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1532
1516
|
});
|
|
@@ -1718,7 +1702,7 @@ class Rt {
|
|
|
1718
1702
|
return { width: this.width, height: this.height };
|
|
1719
1703
|
}
|
|
1720
1704
|
}
|
|
1721
|
-
function
|
|
1705
|
+
function Qt(t) {
|
|
1722
1706
|
const e = t.getBoundingClientRect();
|
|
1723
1707
|
return Rt.of({
|
|
1724
1708
|
top: e.top + window.scrollY,
|
|
@@ -1729,29 +1713,29 @@ function Jt(t) {
|
|
|
1729
1713
|
localTop: t.offsetTop
|
|
1730
1714
|
});
|
|
1731
1715
|
}
|
|
1732
|
-
const
|
|
1733
|
-
const { element: o } = e, n = W(
|
|
1716
|
+
const uo = (t) => Se((e) => {
|
|
1717
|
+
const { element: o } = e, n = W(Qt(o), (c, a) => c.equals(a)), s = Mt(t(n))(e), r = () => n.set(Rt.of(Qt(o)));
|
|
1734
1718
|
let i = null;
|
|
1735
1719
|
return typeof ResizeObserver < "u" && (i = new ResizeObserver(r)), i == null || i.observe(o), F((c) => {
|
|
1736
1720
|
i == null || i.disconnect(), s(c);
|
|
1737
1721
|
});
|
|
1738
1722
|
});
|
|
1739
|
-
function
|
|
1723
|
+
function Jt(t) {
|
|
1740
1724
|
return {
|
|
1741
1725
|
/* c8 ignore next 6 */
|
|
1742
1726
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1743
1727
|
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1744
1728
|
};
|
|
1745
1729
|
}
|
|
1746
|
-
const
|
|
1730
|
+
const fo = (t) => (e) => {
|
|
1747
1731
|
const o = at(), n = W(
|
|
1748
|
-
|
|
1732
|
+
Jt(o),
|
|
1749
1733
|
(i, c) => i.width === c.width && i.height === c.height
|
|
1750
|
-
), s = Mt(t(n))(e), r = () => n.set(
|
|
1734
|
+
), s = Mt(t(n))(e), r = () => n.set(Jt(o));
|
|
1751
1735
|
return o == null || o.addEventListener("resize", r), (i) => {
|
|
1752
1736
|
o == null || o.removeEventListener("resize", r), s(i);
|
|
1753
1737
|
};
|
|
1754
|
-
},
|
|
1738
|
+
}, $n = (t, e) => {
|
|
1755
1739
|
const o = e.split("/").filter((s) => s !== ""), n = {};
|
|
1756
1740
|
for (let s = 0; s < t.length; s++) {
|
|
1757
1741
|
const r = t[s], i = o[s];
|
|
@@ -1766,14 +1750,14 @@ const uo = (t) => (e) => {
|
|
|
1766
1750
|
return { params: n, path: e };
|
|
1767
1751
|
}
|
|
1768
1752
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1769
|
-
}, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""),
|
|
1753
|
+
}, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), ho = (t) => {
|
|
1770
1754
|
const e = t.map((o) => {
|
|
1771
1755
|
const n = Ae(o);
|
|
1772
1756
|
return { route: o, segments: n };
|
|
1773
1757
|
});
|
|
1774
1758
|
return function(n) {
|
|
1775
1759
|
for (const { segments: s, route: r } of e) {
|
|
1776
|
-
const i =
|
|
1760
|
+
const i = $n(s, n);
|
|
1777
1761
|
if (i)
|
|
1778
1762
|
return { ...i, route: r };
|
|
1779
1763
|
}
|
|
@@ -1788,7 +1772,7 @@ const uo = (t) => (e) => {
|
|
|
1788
1772
|
dispose: () => t.dispose()
|
|
1789
1773
|
};
|
|
1790
1774
|
}
|
|
1791
|
-
},
|
|
1775
|
+
}, Bn = (t, e, o) => {
|
|
1792
1776
|
const n = o.split("/").filter((i) => i !== ""), s = {};
|
|
1793
1777
|
let r = 0;
|
|
1794
1778
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -1828,15 +1812,15 @@ const uo = (t) => (e) => {
|
|
|
1828
1812
|
});
|
|
1829
1813
|
return function(n) {
|
|
1830
1814
|
for (const { segments: s, route: r } of e) {
|
|
1831
|
-
const i =
|
|
1815
|
+
const i = Bn(s, r, n);
|
|
1832
1816
|
if (i)
|
|
1833
1817
|
return i;
|
|
1834
1818
|
}
|
|
1835
1819
|
return null;
|
|
1836
1820
|
};
|
|
1837
|
-
},
|
|
1821
|
+
}, mo = (t) => {
|
|
1838
1822
|
const e = Oe(Object.keys(t));
|
|
1839
|
-
return
|
|
1823
|
+
return Ce(
|
|
1840
1824
|
Ct,
|
|
1841
1825
|
{},
|
|
1842
1826
|
() => it(Nt, (o) => it(Ct, (n) => {
|
|
@@ -1858,14 +1842,14 @@ const uo = (t) => (e) => {
|
|
|
1858
1842
|
hash: r.hash
|
|
1859
1843
|
};
|
|
1860
1844
|
});
|
|
1861
|
-
return
|
|
1845
|
+
return ce(
|
|
1862
1846
|
s.map((r) => [r.route, r]),
|
|
1863
1847
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1864
1848
|
t
|
|
1865
1849
|
);
|
|
1866
1850
|
}))
|
|
1867
1851
|
);
|
|
1868
|
-
},
|
|
1852
|
+
}, go = (t) => {
|
|
1869
1853
|
const e = Oe(Object.keys(t));
|
|
1870
1854
|
return it(Ct, (o) => it(Nt, (n) => {
|
|
1871
1855
|
const s = o.map((r) => {
|
|
@@ -1884,13 +1868,13 @@ const uo = (t) => (e) => {
|
|
|
1884
1868
|
hash: n.value.hash
|
|
1885
1869
|
};
|
|
1886
1870
|
});
|
|
1887
|
-
return
|
|
1871
|
+
return ce(
|
|
1888
1872
|
s.map((r) => [r.route, r]),
|
|
1889
1873
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1890
1874
|
t
|
|
1891
1875
|
);
|
|
1892
1876
|
}));
|
|
1893
|
-
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt,
|
|
1877
|
+
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Gt = 7 * ct, Zt = 30 * ct, Hn = 365 * ct, Un = [
|
|
1894
1878
|
{
|
|
1895
1879
|
max: yt * 90,
|
|
1896
1880
|
value: yt,
|
|
@@ -1913,28 +1897,28 @@ const uo = (t) => (e) => {
|
|
|
1913
1897
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1914
1898
|
},
|
|
1915
1899
|
{
|
|
1916
|
-
max:
|
|
1917
|
-
value:
|
|
1900
|
+
max: Gt * 6,
|
|
1901
|
+
value: Gt,
|
|
1918
1902
|
name: "week",
|
|
1919
1903
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1920
1904
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1921
1905
|
},
|
|
1922
1906
|
{
|
|
1923
|
-
max:
|
|
1924
|
-
value:
|
|
1907
|
+
max: Zt * 18,
|
|
1908
|
+
value: Zt,
|
|
1925
1909
|
name: "month",
|
|
1926
1910
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1927
1911
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1928
1912
|
},
|
|
1929
1913
|
{
|
|
1930
1914
|
max: 1 / 0,
|
|
1931
|
-
value:
|
|
1915
|
+
value: Hn,
|
|
1932
1916
|
name: "year",
|
|
1933
1917
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1934
1918
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1935
1919
|
}
|
|
1936
1920
|
];
|
|
1937
|
-
function
|
|
1921
|
+
function te(t, e, o, n) {
|
|
1938
1922
|
const s = Math.round(t / e);
|
|
1939
1923
|
return s <= 1 ? o : n.replace(
|
|
1940
1924
|
"{}",
|
|
@@ -1944,28 +1928,28 @@ function ee(t, e, o, n) {
|
|
|
1944
1928
|
})
|
|
1945
1929
|
);
|
|
1946
1930
|
}
|
|
1947
|
-
const
|
|
1948
|
-
const e = W(/* @__PURE__ */ new Date()), o =
|
|
1931
|
+
const zn = (t = 1e3) => {
|
|
1932
|
+
const e = W(/* @__PURE__ */ new Date()), o = We(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1949
1933
|
return e.onDispose(o), e;
|
|
1950
|
-
},
|
|
1934
|
+
}, Kn = (t) => {
|
|
1951
1935
|
const e = Math.abs(t);
|
|
1952
1936
|
if (e < yt)
|
|
1953
1937
|
return t < 0 ? "just now" : "in a moment";
|
|
1954
|
-
for (const o of
|
|
1938
|
+
for (const o of Un)
|
|
1955
1939
|
if (e < o.max)
|
|
1956
|
-
return t < 0 ?
|
|
1940
|
+
return t < 0 ? te(e, o.value, o.past.singular, o.past.plural) : te(e, o.value, o.future.singular, o.future.plural);
|
|
1957
1941
|
throw new Error("unreachable");
|
|
1958
|
-
},
|
|
1959
|
-
const n = e != null ?
|
|
1942
|
+
}, jn = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1943
|
+
const n = e != null ? ee.is(e) ? e.derive() : W(e) : zn(o), s = re(
|
|
1960
1944
|
t,
|
|
1961
1945
|
n
|
|
1962
1946
|
)((r, i) => r.getTime() - i.getTime());
|
|
1963
1947
|
return s.onDispose(() => L.dispose(n)), s;
|
|
1964
|
-
},
|
|
1965
|
-
const o =
|
|
1948
|
+
}, _n = (t, e = {}) => {
|
|
1949
|
+
const o = jn(t, e), n = o.map(Kn);
|
|
1966
1950
|
return n.onDispose(o.dispose), n;
|
|
1967
|
-
},
|
|
1968
|
-
class
|
|
1951
|
+
}, po = (t, e = {}) => _n(t, e);
|
|
1952
|
+
class In extends De {
|
|
1969
1953
|
constructor() {
|
|
1970
1954
|
super(...arguments);
|
|
1971
1955
|
/**
|
|
@@ -1975,57 +1959,57 @@ class _n extends Ce {
|
|
|
1975
1959
|
At(this, "tick", () => this.update((o) => o + 1));
|
|
1976
1960
|
}
|
|
1977
1961
|
}
|
|
1978
|
-
const
|
|
1962
|
+
const wo = (t = 0) => new In(t, (e, o) => e === o);
|
|
1979
1963
|
export {
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1964
|
+
je as Anchor,
|
|
1965
|
+
Qn as Appearance,
|
|
1966
|
+
ue as AsyncResultView,
|
|
1967
|
+
Jn as AutoFocus,
|
|
1968
|
+
Gn as AutoSelect,
|
|
1969
|
+
go as ChildRouter,
|
|
1970
|
+
uo as ElementRect,
|
|
1971
|
+
eo as HTMLTitle,
|
|
1972
|
+
to as HiddenWhenEmpty,
|
|
1973
|
+
Xe as InViewport,
|
|
1990
1974
|
Nt as Location,
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1975
|
+
io as Mutation,
|
|
1976
|
+
Ge as MutationDisplay,
|
|
1977
|
+
qe as OnClickOutside,
|
|
1978
|
+
oo as OnEnterKey,
|
|
1979
|
+
so as OnEscapeKey,
|
|
1996
1980
|
fe as OnKeyPressed,
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1981
|
+
co as PopOver,
|
|
1982
|
+
ao as Query,
|
|
1983
|
+
Nn as QueryDisplay,
|
|
2000
1984
|
Rt as Rect,
|
|
2001
|
-
|
|
2002
|
-
|
|
1985
|
+
Vn as ResultView,
|
|
1986
|
+
mo as RootRouter,
|
|
2003
1987
|
Ct as RouterContextProvider,
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1988
|
+
lo as SelectOnFocus,
|
|
1989
|
+
In as Ticker,
|
|
1990
|
+
no as WhenInViewport,
|
|
1991
|
+
fo as WindowSize,
|
|
1992
|
+
Me as _checkExtensionCondition,
|
|
1993
|
+
Fe as _getExtension,
|
|
1994
|
+
ho as _makeRouteMatcher,
|
|
2011
1995
|
Ae as _parseRouteSegments,
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
1996
|
+
ro as allPlacements,
|
|
1997
|
+
$e as areLocationsEqual,
|
|
1998
|
+
Zn as classes,
|
|
1999
|
+
Qt as getAbsoluteRect,
|
|
2000
|
+
Ve as handleAnchorClick,
|
|
2001
|
+
le as locationFromURL,
|
|
2002
|
+
Je as makeMutationResource,
|
|
2003
|
+
Mn as makeQueryResource,
|
|
2004
|
+
Qe as matchesKeyCombo,
|
|
2005
|
+
$n as matchesRoute,
|
|
2006
|
+
zn as nowSignal,
|
|
2007
|
+
po as relativeTime,
|
|
2008
|
+
jn as relativeTimeMillisSignal,
|
|
2009
|
+
_n as relativeTimeSignal,
|
|
2010
|
+
Kt as setLocationFromUrl,
|
|
2011
|
+
wo as ticker,
|
|
2012
|
+
Kn as timeDiffToString,
|
|
2029
2013
|
Pt as urlFromLocation,
|
|
2030
|
-
|
|
2014
|
+
_e as useAppearance
|
|
2031
2015
|
};
|