@tempots/ui 10.4.0 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +838 -772
- package/package.json +2 -2
- package/renderables/router/navigation-service.d.ts +23 -0
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var De = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { getWindow as
|
|
5
|
-
import { delayed as me, AsyncResult as
|
|
2
|
+
var He = (t, e, n) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var mt = (t, e, n) => He(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { getWindow as ot, prop as M, makeProviderMark as Mt, computedOf as Nt, Signal as ce, Use as ct, html as Lt, on as le, Value as C, attr as Vt, Empty as Et, OneOfType as ue, WithElement as _, OnDispose as N, Fragment as Y, Portal as fe, renderableOfTNode as $t, When as he, previousSignal as We, effectOf as Fe, WithBrowserCtx as Me, Provide as Ne, OneOfTuple as de, Prop as Ve } from "@tempots/dom";
|
|
5
|
+
import { delayed as me, AsyncResult as S, nearEqual as gt, interval as $e } from "@tempots/std";
|
|
6
6
|
const ze = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
|
-
const
|
|
10
|
-
return
|
|
9
|
+
const n = e.split(".") || [];
|
|
10
|
+
return n.length > 1 ? "." + n.pop() : void 0;
|
|
11
11
|
}, Be = (t, e) => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
}, _e = (t, e,
|
|
12
|
+
const n = ze(e);
|
|
13
|
+
return n != null && (t.length === 0 || !t.some((s) => n == s));
|
|
14
|
+
}, _e = (t, e, n, s) => {
|
|
15
15
|
let r = t.target;
|
|
16
16
|
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
17
17
|
r = r.parentElement;
|
|
@@ -20,45 +20,45 @@ const ze = (t) => {
|
|
|
20
20
|
const i = r;
|
|
21
21
|
if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
|
-
const { pathname:
|
|
24
|
-
if (
|
|
25
|
-
const l =
|
|
23
|
+
const { pathname: o, search: a, hash: c } = i;
|
|
24
|
+
if (s) {
|
|
25
|
+
const l = o + a + c, u = i.getAttribute("href");
|
|
26
26
|
if (!(u != null && u.startsWith("#")) && u !== l)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 : Be(
|
|
29
|
+
return e ? !1 : Be(n, o);
|
|
30
30
|
}, Ue = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
34
34
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
(
|
|
35
|
+
const n = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
|
|
36
|
+
(s) => s.startsWith(".") ? s : "." + s
|
|
37
37
|
) : [];
|
|
38
|
-
return (
|
|
38
|
+
return (s) => {
|
|
39
39
|
_e(
|
|
40
|
-
|
|
40
|
+
s,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
|
-
|
|
42
|
+
n,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
|
-
) || t() &&
|
|
44
|
+
) || t() && s.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash,
|
|
47
|
-
var i,
|
|
48
|
-
const
|
|
49
|
-
let r =
|
|
46
|
+
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, kt = (t, e) => {
|
|
47
|
+
var i, o;
|
|
48
|
+
const n = new URL(t, e ?? ((i = ot()) == null ? void 0 : i.location.toString())), s = Object.fromEntries(((o = n.searchParams) == null ? void 0 : o.entries()) ?? []);
|
|
49
|
+
let r = n.hash;
|
|
50
50
|
return r.startsWith("#") && (r = r.substring(1)), {
|
|
51
|
-
pathname:
|
|
52
|
-
search:
|
|
51
|
+
pathname: n.pathname,
|
|
52
|
+
search: s,
|
|
53
53
|
hash: r === "" ? void 0 : r
|
|
54
54
|
};
|
|
55
55
|
}, et = (t) => {
|
|
56
|
-
const
|
|
57
|
-
return `${t.pathname}${
|
|
56
|
+
const n = new URLSearchParams(t.search).toString(), s = t.hash;
|
|
57
|
+
return `${t.pathname}${n ? `?${n}` : ""}${s ? `#${s}` : ""}`;
|
|
58
58
|
}, je = (t) => {
|
|
59
59
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
60
60
|
}, Yt = () => {
|
|
61
|
-
const t =
|
|
61
|
+
const t = ot(), e = (t == null ? void 0 : t.location.hash) ?? "";
|
|
62
62
|
return {
|
|
63
63
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
64
64
|
search: Object.fromEntries(
|
|
@@ -69,103 +69,103 @@ const ze = (t) => {
|
|
|
69
69
|
}, qt = (t) => {
|
|
70
70
|
if ((t == null ? void 0 : t.scroll) !== "auto")
|
|
71
71
|
return;
|
|
72
|
-
const e =
|
|
72
|
+
const e = ot();
|
|
73
73
|
e && e.requestAnimationFrame(
|
|
74
74
|
() => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
|
|
75
75
|
);
|
|
76
76
|
}, Xt = (t, e) => {
|
|
77
77
|
e != null && e.viewTransition ? je(t) : t();
|
|
78
78
|
}, Ie = () => {
|
|
79
|
-
const t =
|
|
79
|
+
const t = M(Yt(), Ke), e = ot(), n = () => {
|
|
80
80
|
t.set(Yt());
|
|
81
81
|
};
|
|
82
|
-
e == null || e.addEventListener("popstate",
|
|
83
|
-
const
|
|
82
|
+
e == null || e.addEventListener("popstate", n), e == null || e.addEventListener("hashchange", n);
|
|
83
|
+
const s = (c, l, u) => {
|
|
84
84
|
Xt(() => {
|
|
85
85
|
if (e) {
|
|
86
|
-
const h = et(
|
|
86
|
+
const h = et(c), p = (l == null ? void 0 : l.state) ?? {};
|
|
87
87
|
u === "replaceState" || l != null && l.replace ? e.history.replaceState(p, "", h) : e.history.pushState(p, "", h);
|
|
88
88
|
}
|
|
89
|
-
t.set(
|
|
89
|
+
t.set(c);
|
|
90
90
|
}, l), qt(l);
|
|
91
|
-
}, r = (
|
|
91
|
+
}, r = (c, l) => {
|
|
92
92
|
Xt(() => {
|
|
93
|
-
e == null || e.history.go(
|
|
93
|
+
e == null || e.history.go(c);
|
|
94
94
|
}, l), qt(l);
|
|
95
95
|
};
|
|
96
96
|
return {
|
|
97
97
|
location: t,
|
|
98
|
-
commit:
|
|
98
|
+
commit: s,
|
|
99
99
|
go: r,
|
|
100
|
-
back: (
|
|
101
|
-
forward: (
|
|
102
|
-
resolve: (
|
|
100
|
+
back: (c) => r(-1, c),
|
|
101
|
+
forward: (c) => r(1, c),
|
|
102
|
+
resolve: (c) => kt(c),
|
|
103
103
|
dispose: () => {
|
|
104
|
-
e == null || e.removeEventListener("popstate",
|
|
104
|
+
e == null || e.removeEventListener("popstate", n), e == null || e.removeEventListener("hashchange", n), t.dispose();
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
}, Ye = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), qe = (t) => {
|
|
108
|
-
const e = t.container.currentURL,
|
|
109
|
-
(
|
|
110
|
-
(
|
|
111
|
-
if (Ye(
|
|
112
|
-
return et(
|
|
113
|
-
const
|
|
114
|
-
return et({ ...
|
|
108
|
+
const e = t.container.currentURL, n = e.iso(
|
|
109
|
+
(o) => kt(o, e.value),
|
|
110
|
+
(o) => {
|
|
111
|
+
if (Ye(o.pathname))
|
|
112
|
+
return et(o);
|
|
113
|
+
const a = new URL(o.pathname, e.value), c = a.origin + a.pathname;
|
|
114
|
+
return et({ ...o, pathname: c });
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
return {
|
|
118
|
-
location:
|
|
118
|
+
location: n,
|
|
119
119
|
dispose: () => {
|
|
120
|
-
|
|
120
|
+
n.dispose();
|
|
121
121
|
},
|
|
122
|
-
commit: (
|
|
123
|
-
|
|
122
|
+
commit: (o, a, c) => {
|
|
123
|
+
n.set(o);
|
|
124
124
|
},
|
|
125
|
-
go: (
|
|
125
|
+
go: (o, a) => {
|
|
126
126
|
},
|
|
127
127
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
128
|
-
back: (
|
|
128
|
+
back: (o) => {
|
|
129
129
|
},
|
|
130
130
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
131
|
-
forward: (
|
|
131
|
+
forward: (o) => {
|
|
132
132
|
},
|
|
133
|
-
resolve: (
|
|
133
|
+
resolve: (o) => kt(o, e.value)
|
|
134
134
|
};
|
|
135
135
|
}, it = (t) => ({
|
|
136
136
|
pathname: t.pathname,
|
|
137
137
|
search: { ...t.search },
|
|
138
138
|
hash: t.hash ?? void 0
|
|
139
|
-
}),
|
|
139
|
+
}), Tt = (t) => {
|
|
140
140
|
if (t == null) return;
|
|
141
141
|
const e = `${t}`;
|
|
142
142
|
return e === "" ? void 0 : e;
|
|
143
143
|
}, ge = (t, e) => {
|
|
144
|
-
const
|
|
145
|
-
for (const [
|
|
146
|
-
r == null ? delete
|
|
147
|
-
return
|
|
144
|
+
const n = { ...t };
|
|
145
|
+
for (const [s, r] of Object.entries(e))
|
|
146
|
+
r == null ? delete n[s] : n[s] = r;
|
|
147
|
+
return n;
|
|
148
148
|
}, Xe = (t, e) => {
|
|
149
|
-
const
|
|
149
|
+
const n = (e == null ? void 0 : e.includeSearch) ?? !0, s = (e == null ? void 0 : e.includeHash) ?? !0, r = (e == null ? void 0 : e.ignoreSearchParams) ?? [];
|
|
150
150
|
let i;
|
|
151
|
-
if (!
|
|
151
|
+
if (!n)
|
|
152
152
|
i = {};
|
|
153
153
|
else if (r.length === 0)
|
|
154
154
|
i = { ...t.search };
|
|
155
155
|
else {
|
|
156
|
-
const
|
|
156
|
+
const o = new Set(r);
|
|
157
157
|
i = {};
|
|
158
|
-
for (const [
|
|
159
|
-
|
|
158
|
+
for (const [a, c] of Object.entries(t.search))
|
|
159
|
+
o.has(a) || (i[a] = c);
|
|
160
160
|
}
|
|
161
161
|
return {
|
|
162
162
|
pathname: t.pathname,
|
|
163
163
|
search: i,
|
|
164
|
-
hash:
|
|
164
|
+
hash: s ? t.hash : void 0
|
|
165
165
|
};
|
|
166
|
-
}, Qt = (t, e,
|
|
167
|
-
const
|
|
168
|
-
return typeof e == "string" ? et(
|
|
166
|
+
}, Qt = (t, e, n) => {
|
|
167
|
+
const s = Xe(t, n);
|
|
168
|
+
return typeof e == "string" ? et(s) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(s))) : e(s);
|
|
169
169
|
};
|
|
170
170
|
class Qe {
|
|
171
171
|
constructor(e) {
|
|
@@ -184,20 +184,20 @@ class Qe {
|
|
|
184
184
|
}, this;
|
|
185
185
|
}
|
|
186
186
|
setHash(e) {
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
const { hash:
|
|
187
|
+
const n = Tt(e);
|
|
188
|
+
if (n == null) {
|
|
189
|
+
const { hash: s, ...r } = this.current;
|
|
190
190
|
this.current = r;
|
|
191
191
|
} else
|
|
192
192
|
this.current = {
|
|
193
193
|
...this.current,
|
|
194
|
-
hash:
|
|
194
|
+
hash: n
|
|
195
195
|
};
|
|
196
196
|
return this;
|
|
197
197
|
}
|
|
198
198
|
clearHash() {
|
|
199
|
-
const { hash: e, ...
|
|
200
|
-
return this.current =
|
|
199
|
+
const { hash: e, ...n } = this.current;
|
|
200
|
+
return this.current = n, this;
|
|
201
201
|
}
|
|
202
202
|
setSearch(e) {
|
|
203
203
|
return this.current = {
|
|
@@ -205,8 +205,8 @@ class Qe {
|
|
|
205
205
|
search: ge(this.current.search, e)
|
|
206
206
|
}, this;
|
|
207
207
|
}
|
|
208
|
-
setSearchParam(e,
|
|
209
|
-
return this.setSearch({ [e]:
|
|
208
|
+
setSearchParam(e, n) {
|
|
209
|
+
return this.setSearch({ [e]: n });
|
|
210
210
|
}
|
|
211
211
|
updateSearch(e) {
|
|
212
212
|
return this.current = {
|
|
@@ -216,20 +216,20 @@ class Qe {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
219
|
-
const e = t.location,
|
|
219
|
+
const e = t.location, n = e.map(et), s = e.map((g) => g.pathname), r = e.map((g) => ({ ...g.search })), i = e.map((g) => g.hash), o = (g, x) => Qt(t.location.value, g, x), a = (g, x) => Nt(
|
|
220
220
|
e,
|
|
221
221
|
g
|
|
222
222
|
)(
|
|
223
|
-
(O,
|
|
224
|
-
),
|
|
225
|
-
const
|
|
223
|
+
(O, L) => Qt(O, L, x)
|
|
224
|
+
), c = (g, x, O) => {
|
|
225
|
+
const L = it({
|
|
226
226
|
...g,
|
|
227
|
-
hash:
|
|
227
|
+
hash: Tt(g.hash ?? void 0)
|
|
228
228
|
});
|
|
229
|
-
t.commit(
|
|
229
|
+
t.commit(L, x, O);
|
|
230
230
|
}, l = (g, x) => {
|
|
231
231
|
const O = Je(x, "pushState");
|
|
232
|
-
|
|
232
|
+
c(g, x, O);
|
|
233
233
|
}, u = (g, x) => {
|
|
234
234
|
const O = g(it(t.location.value));
|
|
235
235
|
l(O, x);
|
|
@@ -246,8 +246,8 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
246
246
|
}, w = (g) => {
|
|
247
247
|
t.forward(g);
|
|
248
248
|
}, m = (g, x) => u((O) => ({ ...O, pathname: g }), x), v = (g, x) => u((O) => {
|
|
249
|
-
const
|
|
250
|
-
return K == null ? delete
|
|
249
|
+
const L = { ...O }, K = Tt(g);
|
|
250
|
+
return K == null ? delete L.hash : L.hash = K, L;
|
|
251
251
|
}, x), b = (g) => v(void 0, g), y = (g, x) => u(
|
|
252
252
|
(O) => ({
|
|
253
253
|
...O,
|
|
@@ -258,8 +258,8 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
258
258
|
return {
|
|
259
259
|
handle: {
|
|
260
260
|
location: e,
|
|
261
|
-
url:
|
|
262
|
-
pathname:
|
|
261
|
+
url: n,
|
|
262
|
+
pathname: s,
|
|
263
263
|
search: r,
|
|
264
264
|
hash: i,
|
|
265
265
|
setLocation: l,
|
|
@@ -288,11 +288,11 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
288
288
|
);
|
|
289
289
|
g(O), l(it(O.location), x);
|
|
290
290
|
},
|
|
291
|
-
match:
|
|
292
|
-
matchSignal:
|
|
291
|
+
match: o,
|
|
292
|
+
matchSignal: a
|
|
293
293
|
},
|
|
294
294
|
dispose: () => {
|
|
295
|
-
t.dispose(),
|
|
295
|
+
t.dispose(), n.dispose(), s.dispose(), r.dispose(), i.dispose();
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
}, Ze = (t) => {
|
|
@@ -302,35 +302,35 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
302
302
|
return qe(t);
|
|
303
303
|
throw new Error("Unknown context");
|
|
304
304
|
}, zt = {
|
|
305
|
-
mark:
|
|
305
|
+
mark: Mt("Location"),
|
|
306
306
|
create: (t, e) => {
|
|
307
|
-
const
|
|
307
|
+
const n = Ze(e), { handle: s, dispose: r } = Ge(n);
|
|
308
308
|
return {
|
|
309
|
-
value:
|
|
309
|
+
value: s,
|
|
310
310
|
dispose: r
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
}, tn = (t, ...e) => {
|
|
314
|
-
if (typeof t == "string" ||
|
|
314
|
+
if (typeof t == "string" || ce.is(t))
|
|
315
315
|
return tn({ href: t }, ...e);
|
|
316
|
-
const { href:
|
|
317
|
-
return
|
|
316
|
+
const { href: n, state: s, scroll: r, viewTransition: i, replace: o, ...a } = t;
|
|
317
|
+
return ct(zt, (c) => Lt.a(
|
|
318
318
|
le.click(
|
|
319
319
|
Ue(() => {
|
|
320
320
|
let l = !1;
|
|
321
321
|
const u = {};
|
|
322
|
-
return
|
|
323
|
-
C.get(
|
|
322
|
+
return s !== void 0 && (u.state = s, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), o !== void 0 && (u.replace = o, l = !0), c.navigate(
|
|
323
|
+
C.get(n),
|
|
324
324
|
l ? u : void 0
|
|
325
325
|
), !0;
|
|
326
|
-
},
|
|
326
|
+
}, a)
|
|
327
327
|
),
|
|
328
|
-
Vt.href(
|
|
328
|
+
Vt.href(n),
|
|
329
329
|
...e
|
|
330
330
|
/* c8 ignore next 2 */
|
|
331
331
|
));
|
|
332
|
-
},
|
|
333
|
-
mark:
|
|
332
|
+
}, cs = {
|
|
333
|
+
mark: Mt("Appearance"),
|
|
334
334
|
create: () => {
|
|
335
335
|
const t = en();
|
|
336
336
|
return {
|
|
@@ -340,37 +340,37 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
|
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
342
|
function en() {
|
|
343
|
-
const t =
|
|
344
|
-
return e == null || e.addEventListener("change", r),
|
|
343
|
+
const t = ot(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, s = M(n ? "dark" : "light"), r = (i) => s.set(i.matches ? "dark" : "light");
|
|
344
|
+
return e == null || e.addEventListener("change", r), s.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), s;
|
|
345
345
|
}
|
|
346
346
|
const pe = (t, e) => {
|
|
347
347
|
if (typeof e == "function")
|
|
348
348
|
return pe(t, { success: e });
|
|
349
|
-
const
|
|
349
|
+
const n = e.failure ?? ((o) => o.map((a) => `Error: ${a}`)), s = e.success, r = e.loading ?? (() => Et), i = e.notAsked ?? (() => Et);
|
|
350
350
|
return ue(C.toSignal(t), {
|
|
351
|
-
AsyncSuccess: (
|
|
352
|
-
AsyncFailure: (
|
|
353
|
-
Loading: (
|
|
351
|
+
AsyncSuccess: (o) => s(o.$.value),
|
|
352
|
+
AsyncFailure: (o) => n(o.$.error),
|
|
353
|
+
Loading: (o) => r(o.map((a) => a.previousValue)),
|
|
354
354
|
NotAsked: i
|
|
355
355
|
});
|
|
356
|
-
},
|
|
357
|
-
const
|
|
358
|
-
return
|
|
356
|
+
}, ls = (t = 10) => _((e) => N(me(() => e == null ? void 0 : e.focus(), t))), us = (t = 10) => _((e) => {
|
|
357
|
+
const n = me(() => e.select(), t);
|
|
358
|
+
return N(n);
|
|
359
359
|
});
|
|
360
|
-
function
|
|
360
|
+
function fs(t) {
|
|
361
361
|
const e = Object.entries(t);
|
|
362
362
|
return Y(
|
|
363
363
|
...e.map(
|
|
364
|
-
([
|
|
364
|
+
([n, s]) => Vt.class(C.map(s, (r) => r ? n : void 0))
|
|
365
365
|
)
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const hs = _((t) => {
|
|
369
369
|
const e = t.style.getPropertyValue(":empty");
|
|
370
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
371
|
-
|
|
370
|
+
return t.style.setProperty(":empty", "display:none"), N((n) => {
|
|
371
|
+
n && t.style.setProperty(":empty", e);
|
|
372
372
|
});
|
|
373
|
-
}),
|
|
373
|
+
}), ds = (t) => fe("head > title", Vt.innerText(t)), nn = {
|
|
374
374
|
partial: {
|
|
375
375
|
root: null,
|
|
376
376
|
rootMargin: "0px",
|
|
@@ -381,53 +381,53 @@ const uo = _((t) => {
|
|
|
381
381
|
rootMargin: "0px",
|
|
382
382
|
threshold: 1
|
|
383
383
|
}
|
|
384
|
-
},
|
|
384
|
+
}, wt = {
|
|
385
385
|
partial: /* @__PURE__ */ new Map(),
|
|
386
386
|
full: /* @__PURE__ */ new Map()
|
|
387
|
-
},
|
|
387
|
+
}, at = {
|
|
388
388
|
partial: null,
|
|
389
389
|
full: null
|
|
390
390
|
};
|
|
391
|
-
function
|
|
392
|
-
return
|
|
393
|
-
e.forEach((
|
|
394
|
-
const
|
|
395
|
-
|
|
391
|
+
function sn(t) {
|
|
392
|
+
return at[t] == null && (at[t] = new IntersectionObserver((e) => {
|
|
393
|
+
e.forEach((n) => {
|
|
394
|
+
const s = wt[t].get(n.target);
|
|
395
|
+
s == null || s.set(n.isIntersecting);
|
|
396
396
|
});
|
|
397
|
-
}, nn[t])),
|
|
397
|
+
}, nn[t])), at[t];
|
|
398
398
|
}
|
|
399
|
-
const
|
|
400
|
-
const
|
|
399
|
+
const on = ({ mode: t = "partial", once: e = !1 }, n) => {
|
|
400
|
+
const s = M(!1);
|
|
401
401
|
return Y(
|
|
402
402
|
_((r) => {
|
|
403
|
-
const i = typeof IntersectionObserver < "u" ?
|
|
404
|
-
|
|
405
|
-
function
|
|
406
|
-
var
|
|
407
|
-
i == null || i.unobserve(r),
|
|
403
|
+
const i = typeof IntersectionObserver < "u" ? sn(t) : null;
|
|
404
|
+
wt[t].set(r, s), i == null || i.observe(r);
|
|
405
|
+
function o() {
|
|
406
|
+
var c;
|
|
407
|
+
i == null || i.unobserve(r), wt[t].delete(r), wt[t].size === 0 && ((c = at[t]) == null || c.disconnect(), at[t] = null);
|
|
408
408
|
}
|
|
409
|
-
let
|
|
410
|
-
return e && (
|
|
411
|
-
|
|
412
|
-
})),
|
|
413
|
-
|
|
409
|
+
let a = null;
|
|
410
|
+
return e && (a = s.on((c) => {
|
|
411
|
+
c && o();
|
|
412
|
+
})), N(() => {
|
|
413
|
+
s.dispose(), o(), a == null || a();
|
|
414
414
|
});
|
|
415
415
|
}),
|
|
416
|
-
$t(
|
|
416
|
+
$t(n(s))
|
|
417
417
|
);
|
|
418
|
-
},
|
|
418
|
+
}, ms = (t, e, n) => on(t, (s) => he(s, e, n ?? (() => Et)));
|
|
419
419
|
function rn(t) {
|
|
420
420
|
return _((e) => {
|
|
421
|
-
const
|
|
422
|
-
e.contains(
|
|
421
|
+
const n = (s) => {
|
|
422
|
+
e.contains(s.target) || t(s);
|
|
423
423
|
};
|
|
424
|
-
return document.addEventListener("click",
|
|
425
|
-
document.removeEventListener("click",
|
|
424
|
+
return document.addEventListener("click", n), N(() => {
|
|
425
|
+
document.removeEventListener("click", n);
|
|
426
426
|
});
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
const Z = (t, e) => t === void 0 || t === e, Jt = (t, e) => t === void 0 || t === e;
|
|
430
|
-
function
|
|
430
|
+
function an(t, e) {
|
|
431
431
|
return typeof t == "string" ? e.key === t : Jt(t.key, e.key) && Jt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
|
|
432
432
|
t.commandOrControlKey,
|
|
433
433
|
e.metaKey || e.ctrlKey
|
|
@@ -437,97 +437,97 @@ function we({
|
|
|
437
437
|
allowedKeys: t,
|
|
438
438
|
handler: e
|
|
439
439
|
}) {
|
|
440
|
-
return _((
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
440
|
+
return _((n) => {
|
|
441
|
+
const s = (r) => {
|
|
442
|
+
if (n.contains(r.target)) {
|
|
443
443
|
for (const i of t)
|
|
444
|
-
if (
|
|
444
|
+
if (an(i, r)) {
|
|
445
445
|
e(r);
|
|
446
446
|
break;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
|
-
return document.addEventListener("keydown",
|
|
451
|
-
document.removeEventListener("keydown",
|
|
450
|
+
return document.addEventListener("keydown", s), N(() => {
|
|
451
|
+
document.removeEventListener("keydown", s);
|
|
452
452
|
});
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function gs(t) {
|
|
456
456
|
return we({ allowedKeys: ["Enter"], handler: t });
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ps(t) {
|
|
459
459
|
return we({ allowedKeys: ["Escape"], handler: t });
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const cn = ({
|
|
462
462
|
mutate: t,
|
|
463
463
|
convertError: e,
|
|
464
|
-
onSuccess:
|
|
465
|
-
onError:
|
|
464
|
+
onSuccess: n,
|
|
465
|
+
onError: s,
|
|
466
466
|
onSettled: r
|
|
467
467
|
}) => {
|
|
468
468
|
let i;
|
|
469
|
-
const
|
|
470
|
-
(d) =>
|
|
471
|
-
),
|
|
472
|
-
(d) =>
|
|
473
|
-
), l =
|
|
469
|
+
const o = M(S.notAsked), a = o.map(
|
|
470
|
+
(d) => S.isSuccess(d) ? d.value : void 0
|
|
471
|
+
), c = o.map(
|
|
472
|
+
(d) => S.isFailure(d) ? d.error : void 0
|
|
473
|
+
), l = o.map((d) => S.isLoading(d)), u = () => {
|
|
474
474
|
i == null || i.abort(), i = void 0;
|
|
475
475
|
};
|
|
476
476
|
return {
|
|
477
|
-
status:
|
|
478
|
-
value:
|
|
479
|
-
error:
|
|
477
|
+
status: o,
|
|
478
|
+
value: a,
|
|
479
|
+
error: c,
|
|
480
480
|
pending: l,
|
|
481
481
|
execute: async (d, w) => {
|
|
482
482
|
u(), i = new AbortController();
|
|
483
|
-
const m = i.signal, v =
|
|
484
|
-
b != null ?
|
|
483
|
+
const m = i.signal, v = o.get(), b = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
|
|
484
|
+
b != null ? o.set(S.loading(b)) : o.set(S.loading(S.getOrUndefined(v)));
|
|
485
485
|
try {
|
|
486
486
|
const y = await t({ request: d, abortSignal: m, previous: v });
|
|
487
|
-
i = void 0,
|
|
487
|
+
i = void 0, o.set(S.success(y)), n == null || n(y, d);
|
|
488
488
|
} catch (y) {
|
|
489
|
-
i = void 0,
|
|
489
|
+
i = void 0, o.set(S.failure(e(y))), s == null || s(e(y), d);
|
|
490
490
|
}
|
|
491
|
-
r == null || r(
|
|
491
|
+
r == null || r(o.get(), d);
|
|
492
492
|
},
|
|
493
493
|
cancel: (d) => {
|
|
494
|
-
u(),
|
|
494
|
+
u(), o.set(d ?? S.notAsked);
|
|
495
495
|
},
|
|
496
496
|
dispose: () => {
|
|
497
|
-
i == null || i.abort(), i = void 0,
|
|
497
|
+
i == null || i.abort(), i = void 0, o.dispose();
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
500
|
}, ln = (t, e) => {
|
|
501
|
-
const { status:
|
|
501
|
+
const { status: n, dispose: s, execute: r, cancel: i, pending: o, error: a, value: c } = t, { content: l } = e, u = We(c);
|
|
502
502
|
return Y(
|
|
503
|
-
|
|
503
|
+
N(s),
|
|
504
504
|
l({
|
|
505
505
|
previous: u,
|
|
506
506
|
execute: r,
|
|
507
507
|
cancel: i,
|
|
508
|
-
pending:
|
|
509
|
-
error:
|
|
510
|
-
value:
|
|
511
|
-
status:
|
|
508
|
+
pending: o,
|
|
509
|
+
error: a,
|
|
510
|
+
value: c,
|
|
511
|
+
status: n
|
|
512
512
|
})
|
|
513
513
|
);
|
|
514
|
-
},
|
|
514
|
+
}, ws = ({
|
|
515
515
|
mutate: t,
|
|
516
|
-
convertError: e = (
|
|
517
|
-
onSuccess:
|
|
518
|
-
onError:
|
|
516
|
+
convertError: e = (o) => o,
|
|
517
|
+
onSuccess: n,
|
|
518
|
+
onError: s,
|
|
519
519
|
onSettled: r,
|
|
520
520
|
content: i
|
|
521
521
|
}) => {
|
|
522
|
-
const
|
|
522
|
+
const o = cn({
|
|
523
523
|
mutate: t,
|
|
524
524
|
convertError: e,
|
|
525
|
-
onSuccess:
|
|
526
|
-
onError:
|
|
525
|
+
onSuccess: n,
|
|
526
|
+
onError: s,
|
|
527
527
|
onSettled: r
|
|
528
528
|
});
|
|
529
|
-
return ln(
|
|
530
|
-
}, nt = Math.min, Q = Math.max,
|
|
529
|
+
return ln(o, { content: i });
|
|
530
|
+
}, nt = Math.min, Q = Math.max, yt = Math.round, pt = Math.floor, V = (t) => ({
|
|
531
531
|
x: t,
|
|
532
532
|
y: t
|
|
533
533
|
}), un = {
|
|
@@ -539,8 +539,8 @@ const an = ({
|
|
|
539
539
|
start: "end",
|
|
540
540
|
end: "start"
|
|
541
541
|
};
|
|
542
|
-
function Ct(t, e,
|
|
543
|
-
return Q(t, nt(e,
|
|
542
|
+
function Ct(t, e, n) {
|
|
543
|
+
return Q(t, nt(e, n));
|
|
544
544
|
}
|
|
545
545
|
function ft(t, e) {
|
|
546
546
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -563,38 +563,38 @@ function I(t) {
|
|
|
563
563
|
function _t(t) {
|
|
564
564
|
return ye(I(t));
|
|
565
565
|
}
|
|
566
|
-
function hn(t, e,
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
let
|
|
570
|
-
return e.reference[i] > e.floating[i] && (
|
|
566
|
+
function hn(t, e, n) {
|
|
567
|
+
n === void 0 && (n = !1);
|
|
568
|
+
const s = ht(t), r = _t(t), i = Bt(r);
|
|
569
|
+
let o = r === "x" ? s === (n ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
570
|
+
return e.reference[i] > e.floating[i] && (o = vt(o)), [o, vt(o)];
|
|
571
571
|
}
|
|
572
572
|
function dn(t) {
|
|
573
|
-
const e =
|
|
573
|
+
const e = vt(t);
|
|
574
574
|
return [Dt(t), e, Dt(e)];
|
|
575
575
|
}
|
|
576
576
|
function Dt(t) {
|
|
577
577
|
return t.replace(/start|end/g, (e) => fn[e]);
|
|
578
578
|
}
|
|
579
|
-
function mn(t, e,
|
|
580
|
-
const
|
|
579
|
+
function mn(t, e, n) {
|
|
580
|
+
const s = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], o = ["bottom", "top"];
|
|
581
581
|
switch (t) {
|
|
582
582
|
case "top":
|
|
583
583
|
case "bottom":
|
|
584
|
-
return
|
|
584
|
+
return n ? e ? r : s : e ? s : r;
|
|
585
585
|
case "left":
|
|
586
586
|
case "right":
|
|
587
|
-
return e ? i :
|
|
587
|
+
return e ? i : o;
|
|
588
588
|
default:
|
|
589
589
|
return [];
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
function gn(t, e,
|
|
592
|
+
function gn(t, e, n, s) {
|
|
593
593
|
const r = ht(t);
|
|
594
|
-
let i = mn(J(t),
|
|
595
|
-
return r && (i = i.map((
|
|
594
|
+
let i = mn(J(t), n === "start", s);
|
|
595
|
+
return r && (i = i.map((o) => o + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function vt(t) {
|
|
598
598
|
return t.replace(/left|right|bottom|top/g, (e) => un[e]);
|
|
599
599
|
}
|
|
600
600
|
function pn(t) {
|
|
@@ -614,92 +614,92 @@ function ve(t) {
|
|
|
614
614
|
left: t
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function xt(t) {
|
|
618
618
|
const {
|
|
619
619
|
x: e,
|
|
620
|
-
y:
|
|
621
|
-
width:
|
|
620
|
+
y: n,
|
|
621
|
+
width: s,
|
|
622
622
|
height: r
|
|
623
623
|
} = t;
|
|
624
624
|
return {
|
|
625
|
-
width:
|
|
625
|
+
width: s,
|
|
626
626
|
height: r,
|
|
627
|
-
top:
|
|
627
|
+
top: n,
|
|
628
628
|
left: e,
|
|
629
|
-
right: e +
|
|
630
|
-
bottom:
|
|
629
|
+
right: e + s,
|
|
630
|
+
bottom: n + r,
|
|
631
631
|
x: e,
|
|
632
|
-
y:
|
|
632
|
+
y: n
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function Gt(t, e,
|
|
635
|
+
function Gt(t, e, n) {
|
|
636
636
|
let {
|
|
637
|
-
reference:
|
|
637
|
+
reference: s,
|
|
638
638
|
floating: r
|
|
639
639
|
} = t;
|
|
640
|
-
const i = I(e),
|
|
640
|
+
const i = I(e), o = _t(e), a = Bt(o), c = J(e), l = i === "y", u = s.x + s.width / 2 - r.width / 2, h = s.y + s.height / 2 - r.height / 2, p = s[a] / 2 - r[a] / 2;
|
|
641
641
|
let f;
|
|
642
|
-
switch (
|
|
642
|
+
switch (c) {
|
|
643
643
|
case "top":
|
|
644
644
|
f = {
|
|
645
645
|
x: u,
|
|
646
|
-
y:
|
|
646
|
+
y: s.y - r.height
|
|
647
647
|
};
|
|
648
648
|
break;
|
|
649
649
|
case "bottom":
|
|
650
650
|
f = {
|
|
651
651
|
x: u,
|
|
652
|
-
y:
|
|
652
|
+
y: s.y + s.height
|
|
653
653
|
};
|
|
654
654
|
break;
|
|
655
655
|
case "right":
|
|
656
656
|
f = {
|
|
657
|
-
x:
|
|
657
|
+
x: s.x + s.width,
|
|
658
658
|
y: h
|
|
659
659
|
};
|
|
660
660
|
break;
|
|
661
661
|
case "left":
|
|
662
662
|
f = {
|
|
663
|
-
x:
|
|
663
|
+
x: s.x - r.width,
|
|
664
664
|
y: h
|
|
665
665
|
};
|
|
666
666
|
break;
|
|
667
667
|
default:
|
|
668
668
|
f = {
|
|
669
|
-
x:
|
|
670
|
-
y:
|
|
669
|
+
x: s.x,
|
|
670
|
+
y: s.y
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
673
|
switch (ht(e)) {
|
|
674
674
|
case "start":
|
|
675
|
-
f[
|
|
675
|
+
f[o] -= p * (n && l ? -1 : 1);
|
|
676
676
|
break;
|
|
677
677
|
case "end":
|
|
678
|
-
f[
|
|
678
|
+
f[o] += p * (n && l ? -1 : 1);
|
|
679
679
|
break;
|
|
680
680
|
}
|
|
681
681
|
return f;
|
|
682
682
|
}
|
|
683
|
-
const wn = async (t, e,
|
|
683
|
+
const wn = async (t, e, n) => {
|
|
684
684
|
const {
|
|
685
|
-
placement:
|
|
685
|
+
placement: s = "bottom",
|
|
686
686
|
strategy: r = "absolute",
|
|
687
687
|
middleware: i = [],
|
|
688
|
-
platform:
|
|
689
|
-
} =
|
|
690
|
-
let l = await
|
|
688
|
+
platform: o
|
|
689
|
+
} = n, a = i.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(e));
|
|
690
|
+
let l = await o.getElementRects({
|
|
691
691
|
reference: t,
|
|
692
692
|
floating: e,
|
|
693
693
|
strategy: r
|
|
694
694
|
}), {
|
|
695
695
|
x: u,
|
|
696
696
|
y: h
|
|
697
|
-
} = Gt(l,
|
|
698
|
-
for (let w = 0; w <
|
|
697
|
+
} = Gt(l, s, c), p = s, f = {}, d = 0;
|
|
698
|
+
for (let w = 0; w < a.length; w++) {
|
|
699
699
|
const {
|
|
700
700
|
name: m,
|
|
701
701
|
fn: v
|
|
702
|
-
} =
|
|
702
|
+
} = a[w], {
|
|
703
703
|
x: b,
|
|
704
704
|
y,
|
|
705
705
|
data: R,
|
|
@@ -707,12 +707,12 @@ const wn = async (t, e, o) => {
|
|
|
707
707
|
} = await v({
|
|
708
708
|
x: u,
|
|
709
709
|
y: h,
|
|
710
|
-
initialPlacement:
|
|
710
|
+
initialPlacement: s,
|
|
711
711
|
placement: p,
|
|
712
712
|
strategy: r,
|
|
713
713
|
middlewareData: f,
|
|
714
714
|
rects: l,
|
|
715
|
-
platform:
|
|
715
|
+
platform: o,
|
|
716
716
|
elements: {
|
|
717
717
|
reference: t,
|
|
718
718
|
floating: e
|
|
@@ -724,14 +724,14 @@ const wn = async (t, e, o) => {
|
|
|
724
724
|
...f[m],
|
|
725
725
|
...R
|
|
726
726
|
}
|
|
727
|
-
}, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await
|
|
727
|
+
}, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await o.getElementRects({
|
|
728
728
|
reference: t,
|
|
729
729
|
floating: e,
|
|
730
730
|
strategy: r
|
|
731
731
|
}) : A.rects), {
|
|
732
732
|
x: u,
|
|
733
733
|
y: h
|
|
734
|
-
} = Gt(l, p,
|
|
734
|
+
} = Gt(l, p, c)), w = -1);
|
|
735
735
|
}
|
|
736
736
|
return {
|
|
737
737
|
x: u,
|
|
@@ -742,42 +742,42 @@ const wn = async (t, e, o) => {
|
|
|
742
742
|
};
|
|
743
743
|
};
|
|
744
744
|
async function xe(t, e) {
|
|
745
|
-
var
|
|
745
|
+
var n;
|
|
746
746
|
e === void 0 && (e = {});
|
|
747
747
|
const {
|
|
748
|
-
x:
|
|
748
|
+
x: s,
|
|
749
749
|
y: r,
|
|
750
750
|
platform: i,
|
|
751
|
-
rects:
|
|
752
|
-
elements:
|
|
753
|
-
strategy:
|
|
751
|
+
rects: o,
|
|
752
|
+
elements: a,
|
|
753
|
+
strategy: c
|
|
754
754
|
} = t, {
|
|
755
755
|
boundary: l = "clippingAncestors",
|
|
756
756
|
rootBoundary: u = "viewport",
|
|
757
757
|
elementContext: h = "floating",
|
|
758
758
|
altBoundary: p = !1,
|
|
759
759
|
padding: f = 0
|
|
760
|
-
} = ft(e, t), d = ve(f), m =
|
|
761
|
-
element: (
|
|
760
|
+
} = ft(e, t), d = ve(f), m = a[p ? h === "floating" ? "reference" : "floating" : h], v = xt(await i.getClippingRect({
|
|
761
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(m))) == null || n ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
762
762
|
boundary: l,
|
|
763
763
|
rootBoundary: u,
|
|
764
|
-
strategy:
|
|
764
|
+
strategy: c
|
|
765
765
|
})), b = h === "floating" ? {
|
|
766
|
-
x:
|
|
766
|
+
x: s,
|
|
767
767
|
y: r,
|
|
768
|
-
width:
|
|
769
|
-
height:
|
|
770
|
-
} :
|
|
768
|
+
width: o.floating.width,
|
|
769
|
+
height: o.floating.height
|
|
770
|
+
} : o.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), R = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
|
|
771
771
|
x: 1,
|
|
772
772
|
y: 1
|
|
773
773
|
} : {
|
|
774
774
|
x: 1,
|
|
775
775
|
y: 1
|
|
776
|
-
}, A =
|
|
777
|
-
elements:
|
|
776
|
+
}, A = xt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
777
|
+
elements: a,
|
|
778
778
|
rect: b,
|
|
779
779
|
offsetParent: y,
|
|
780
|
-
strategy:
|
|
780
|
+
strategy: c
|
|
781
781
|
}) : b);
|
|
782
782
|
return {
|
|
783
783
|
top: (v.top - A.top + d.top) / R.y,
|
|
@@ -791,13 +791,13 @@ const yn = (t) => ({
|
|
|
791
791
|
options: t,
|
|
792
792
|
async fn(e) {
|
|
793
793
|
const {
|
|
794
|
-
x:
|
|
795
|
-
y:
|
|
794
|
+
x: n,
|
|
795
|
+
y: s,
|
|
796
796
|
placement: r,
|
|
797
797
|
rects: i,
|
|
798
|
-
platform:
|
|
799
|
-
elements:
|
|
800
|
-
middlewareData:
|
|
798
|
+
platform: o,
|
|
799
|
+
elements: a,
|
|
800
|
+
middlewareData: c
|
|
801
801
|
} = e, {
|
|
802
802
|
element: l,
|
|
803
803
|
padding: u = 0
|
|
@@ -805,17 +805,17 @@ const yn = (t) => ({
|
|
|
805
805
|
if (l == null)
|
|
806
806
|
return {};
|
|
807
807
|
const h = ve(u), p = {
|
|
808
|
-
x:
|
|
809
|
-
y:
|
|
810
|
-
}, f = _t(r), d = Bt(f), w = await
|
|
811
|
-
let P =
|
|
812
|
-
(!P || !await (
|
|
813
|
-
const U = R / 2 - A / 2, g = P / 2 - w[d] / 2 - 1, x = nt(h[v], g), O = nt(h[b], g),
|
|
808
|
+
x: n,
|
|
809
|
+
y: s
|
|
810
|
+
}, f = _t(r), d = Bt(f), w = await o.getDimensions(l), m = f === "y", v = m ? "top" : "left", b = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], A = p[f] - i.reference[f], T = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l));
|
|
811
|
+
let P = T ? T[y] : 0;
|
|
812
|
+
(!P || !await (o.isElement == null ? void 0 : o.isElement(T))) && (P = a.floating[y] || i.floating[d]);
|
|
813
|
+
const U = R / 2 - A / 2, g = P / 2 - w[d] / 2 - 1, x = nt(h[v], g), O = nt(h[b], g), L = x, K = P - w[d] - O, E = P / 2 - w[d] / 2 + U, X = Ct(L, E, K), B = !c.arrow && ht(r) != null && E !== X && i.reference[d] / 2 - (E < L ? x : O) - w[d] / 2 < 0, D = B ? E < L ? E - L : E - K : 0;
|
|
814
814
|
return {
|
|
815
815
|
[f]: p[f] + D,
|
|
816
816
|
data: {
|
|
817
817
|
[f]: X,
|
|
818
|
-
centerOffset:
|
|
818
|
+
centerOffset: E - X - D,
|
|
819
819
|
...B && {
|
|
820
820
|
alignmentOffset: D
|
|
821
821
|
}
|
|
@@ -828,13 +828,13 @@ const yn = (t) => ({
|
|
|
828
828
|
name: "flip",
|
|
829
829
|
options: t,
|
|
830
830
|
async fn(e) {
|
|
831
|
-
var
|
|
831
|
+
var n, s;
|
|
832
832
|
const {
|
|
833
833
|
placement: r,
|
|
834
834
|
middlewareData: i,
|
|
835
|
-
rects:
|
|
836
|
-
initialPlacement:
|
|
837
|
-
platform:
|
|
835
|
+
rects: o,
|
|
836
|
+
initialPlacement: a,
|
|
837
|
+
platform: c,
|
|
838
838
|
elements: l
|
|
839
839
|
} = e, {
|
|
840
840
|
mainAxis: u = !0,
|
|
@@ -845,53 +845,53 @@ const yn = (t) => ({
|
|
|
845
845
|
flipAlignment: w = !0,
|
|
846
846
|
...m
|
|
847
847
|
} = ft(t, e);
|
|
848
|
-
if ((
|
|
848
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
849
849
|
return {};
|
|
850
|
-
const v = J(r), b = I(
|
|
851
|
-
!p &&
|
|
852
|
-
const P = [
|
|
853
|
-
let x = ((
|
|
850
|
+
const v = J(r), b = I(a), y = J(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = p || (y || !w ? [vt(a)] : dn(a)), T = d !== "none";
|
|
851
|
+
!p && T && A.push(...gn(a, w, d, R));
|
|
852
|
+
const P = [a, ...A], U = await xe(e, m), g = [];
|
|
853
|
+
let x = ((s = i.flip) == null ? void 0 : s.overflows) || [];
|
|
854
854
|
if (u && g.push(U[v]), h) {
|
|
855
|
-
const
|
|
856
|
-
g.push(U[
|
|
855
|
+
const E = hn(r, o, R);
|
|
856
|
+
g.push(U[E[0]], U[E[1]]);
|
|
857
857
|
}
|
|
858
858
|
if (x = [...x, {
|
|
859
859
|
placement: r,
|
|
860
860
|
overflows: g
|
|
861
|
-
}], !g.every((
|
|
862
|
-
var O,
|
|
863
|
-
const
|
|
861
|
+
}], !g.every((E) => E <= 0)) {
|
|
862
|
+
var O, L;
|
|
863
|
+
const E = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, X = P[E];
|
|
864
864
|
if (X && (!(h === "alignment" ? b !== I(X) : !1) || // We leave the current main axis only if every placement on that axis
|
|
865
865
|
// overflows the main axis.
|
|
866
|
-
x.every((
|
|
866
|
+
x.every((H) => H.overflows[0] > 0 && I(H.placement) === b)))
|
|
867
867
|
return {
|
|
868
868
|
data: {
|
|
869
|
-
index:
|
|
869
|
+
index: E,
|
|
870
870
|
overflows: x
|
|
871
871
|
},
|
|
872
872
|
reset: {
|
|
873
873
|
placement: X
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
|
-
let B = (
|
|
876
|
+
let B = (L = x.filter((D) => D.overflows[0] <= 0).sort((D, H) => D.overflows[1] - H.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
877
877
|
if (!B)
|
|
878
878
|
switch (f) {
|
|
879
879
|
case "bestFit": {
|
|
880
880
|
var K;
|
|
881
|
-
const D = (K = x.filter((
|
|
882
|
-
if (
|
|
883
|
-
const j = I(
|
|
881
|
+
const D = (K = x.filter((H) => {
|
|
882
|
+
if (T) {
|
|
883
|
+
const j = I(H.placement);
|
|
884
884
|
return j === b || // Create a bias to the `y` side axis due to horizontal
|
|
885
885
|
// reading directions favoring greater width.
|
|
886
886
|
j === "y";
|
|
887
887
|
}
|
|
888
888
|
return !0;
|
|
889
|
-
}).map((
|
|
889
|
+
}).map((H) => [H.placement, H.overflows.filter((j) => j > 0).reduce((j, Ce) => j + Ce, 0)]).sort((H, j) => H[1] - j[1])[0]) == null ? void 0 : K[0];
|
|
890
890
|
D && (B = D);
|
|
891
891
|
break;
|
|
892
892
|
}
|
|
893
893
|
case "initialPlacement":
|
|
894
|
-
B =
|
|
894
|
+
B = a;
|
|
895
895
|
break;
|
|
896
896
|
}
|
|
897
897
|
if (r !== B)
|
|
@@ -907,10 +907,10 @@ const yn = (t) => ({
|
|
|
907
907
|
};
|
|
908
908
|
async function xn(t, e) {
|
|
909
909
|
const {
|
|
910
|
-
placement:
|
|
911
|
-
platform:
|
|
910
|
+
placement: n,
|
|
911
|
+
platform: s,
|
|
912
912
|
elements: r
|
|
913
|
-
} = t, i = await (
|
|
913
|
+
} = t, i = await (s.isRTL == null ? void 0 : s.isRTL(r.floating)), o = J(n), a = ht(n), c = I(n) === "y", l = ["left", "top"].includes(o) ? -1 : 1, u = i && c ? -1 : 1, h = ft(e, t);
|
|
914
914
|
let {
|
|
915
915
|
mainAxis: p,
|
|
916
916
|
crossAxis: f,
|
|
@@ -924,7 +924,7 @@ async function xn(t, e) {
|
|
|
924
924
|
crossAxis: h.crossAxis || 0,
|
|
925
925
|
alignmentAxis: h.alignmentAxis
|
|
926
926
|
};
|
|
927
|
-
return
|
|
927
|
+
return a && typeof d == "number" && (f = a === "end" ? d * -1 : d), c ? {
|
|
928
928
|
x: f * u,
|
|
929
929
|
y: p * l
|
|
930
930
|
} : {
|
|
@@ -937,19 +937,19 @@ const bn = function(t) {
|
|
|
937
937
|
name: "offset",
|
|
938
938
|
options: t,
|
|
939
939
|
async fn(e) {
|
|
940
|
-
var
|
|
940
|
+
var n, s;
|
|
941
941
|
const {
|
|
942
942
|
x: r,
|
|
943
943
|
y: i,
|
|
944
|
-
placement:
|
|
945
|
-
middlewareData:
|
|
946
|
-
} = e,
|
|
947
|
-
return
|
|
948
|
-
x: r +
|
|
949
|
-
y: i +
|
|
944
|
+
placement: o,
|
|
945
|
+
middlewareData: a
|
|
946
|
+
} = e, c = await xn(e, t);
|
|
947
|
+
return o === ((n = a.offset) == null ? void 0 : n.placement) && (s = a.arrow) != null && s.alignmentOffset ? {} : {
|
|
948
|
+
x: r + c.x,
|
|
949
|
+
y: i + c.y,
|
|
950
950
|
data: {
|
|
951
|
-
...
|
|
952
|
-
placement:
|
|
951
|
+
...c,
|
|
952
|
+
placement: o
|
|
953
953
|
}
|
|
954
954
|
};
|
|
955
955
|
}
|
|
@@ -960,13 +960,13 @@ const bn = function(t) {
|
|
|
960
960
|
options: t,
|
|
961
961
|
async fn(e) {
|
|
962
962
|
const {
|
|
963
|
-
x:
|
|
964
|
-
y:
|
|
963
|
+
x: n,
|
|
964
|
+
y: s,
|
|
965
965
|
placement: r
|
|
966
966
|
} = e, {
|
|
967
967
|
mainAxis: i = !0,
|
|
968
|
-
crossAxis:
|
|
969
|
-
limiter:
|
|
968
|
+
crossAxis: o = !1,
|
|
969
|
+
limiter: a = {
|
|
970
970
|
fn: (m) => {
|
|
971
971
|
let {
|
|
972
972
|
x: v,
|
|
@@ -978,21 +978,21 @@ const bn = function(t) {
|
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
980
|
},
|
|
981
|
-
...
|
|
981
|
+
...c
|
|
982
982
|
} = ft(t, e), l = {
|
|
983
|
-
x:
|
|
984
|
-
y:
|
|
985
|
-
}, u = await xe(e,
|
|
983
|
+
x: n,
|
|
984
|
+
y: s
|
|
985
|
+
}, u = await xe(e, c), h = I(J(r)), p = ye(h);
|
|
986
986
|
let f = l[p], d = l[h];
|
|
987
987
|
if (i) {
|
|
988
988
|
const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", b = f + u[m], y = f - u[v];
|
|
989
989
|
f = Ct(b, f, y);
|
|
990
990
|
}
|
|
991
|
-
if (
|
|
991
|
+
if (o) {
|
|
992
992
|
const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], y = d - u[v];
|
|
993
993
|
d = Ct(b, d, y);
|
|
994
994
|
}
|
|
995
|
-
const w =
|
|
995
|
+
const w = a.fn({
|
|
996
996
|
...e,
|
|
997
997
|
[p]: f,
|
|
998
998
|
[h]: d
|
|
@@ -1000,24 +1000,24 @@ const bn = function(t) {
|
|
|
1000
1000
|
return {
|
|
1001
1001
|
...w,
|
|
1002
1002
|
data: {
|
|
1003
|
-
x: w.x -
|
|
1004
|
-
y: w.y -
|
|
1003
|
+
x: w.x - n,
|
|
1004
|
+
y: w.y - s,
|
|
1005
1005
|
enabled: {
|
|
1006
1006
|
[p]: i,
|
|
1007
|
-
[h]:
|
|
1007
|
+
[h]: o
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
};
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
};
|
|
1014
|
-
function
|
|
1014
|
+
function Ot() {
|
|
1015
1015
|
return typeof window < "u";
|
|
1016
1016
|
}
|
|
1017
1017
|
function rt(t) {
|
|
1018
1018
|
return be(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function k(t) {
|
|
1021
1021
|
var e;
|
|
1022
1022
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1023
1023
|
}
|
|
@@ -1026,30 +1026,30 @@ function z(t) {
|
|
|
1026
1026
|
return (e = (be(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1027
1027
|
}
|
|
1028
1028
|
function be(t) {
|
|
1029
|
-
return
|
|
1029
|
+
return Ot() ? t instanceof Node || t instanceof k(t).Node : !1;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1031
|
+
function W(t) {
|
|
1032
|
+
return Ot() ? t instanceof Element || t instanceof k(t).Element : !1;
|
|
1033
1033
|
}
|
|
1034
1034
|
function $(t) {
|
|
1035
|
-
return
|
|
1035
|
+
return Ot() ? t instanceof HTMLElement || t instanceof k(t).HTMLElement : !1;
|
|
1036
1036
|
}
|
|
1037
1037
|
function Zt(t) {
|
|
1038
|
-
return !
|
|
1038
|
+
return !Ot() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof k(t).ShadowRoot;
|
|
1039
1039
|
}
|
|
1040
1040
|
function dt(t) {
|
|
1041
1041
|
const {
|
|
1042
1042
|
overflow: e,
|
|
1043
|
-
overflowX:
|
|
1044
|
-
overflowY:
|
|
1043
|
+
overflowX: n,
|
|
1044
|
+
overflowY: s,
|
|
1045
1045
|
display: r
|
|
1046
|
-
} =
|
|
1047
|
-
return /auto|scroll|overlay|hidden|clip/.test(e +
|
|
1046
|
+
} = F(t);
|
|
1047
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + s + n) && !["inline", "contents"].includes(r);
|
|
1048
1048
|
}
|
|
1049
1049
|
function An(t) {
|
|
1050
1050
|
return ["table", "td", "th"].includes(rt(t));
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function At(t) {
|
|
1053
1053
|
return [":popover-open", ":modal"].some((e) => {
|
|
1054
1054
|
try {
|
|
1055
1055
|
return t.matches(e);
|
|
@@ -1059,15 +1059,15 @@ function Ot(t) {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
1061
|
function Ut(t) {
|
|
1062
|
-
const e = Kt(),
|
|
1063
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((
|
|
1062
|
+
const e = Kt(), n = W(t) ? F(t) : t;
|
|
1063
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((s) => n[s] ? n[s] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((s) => (n.willChange || "").includes(s)) || ["paint", "layout", "strict", "content"].some((s) => (n.contain || "").includes(s));
|
|
1064
1064
|
}
|
|
1065
1065
|
function Rn(t) {
|
|
1066
1066
|
let e = q(t);
|
|
1067
|
-
for (; $(e) && !
|
|
1067
|
+
for (; $(e) && !st(e); ) {
|
|
1068
1068
|
if (Ut(e))
|
|
1069
1069
|
return e;
|
|
1070
|
-
if (
|
|
1070
|
+
if (At(e))
|
|
1071
1071
|
return null;
|
|
1072
1072
|
e = q(e);
|
|
1073
1073
|
}
|
|
@@ -1076,14 +1076,14 @@ function Rn(t) {
|
|
|
1076
1076
|
function Kt() {
|
|
1077
1077
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function st(t) {
|
|
1080
1080
|
return ["html", "body", "#document"].includes(rt(t));
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return
|
|
1082
|
+
function F(t) {
|
|
1083
|
+
return k(t).getComputedStyle(t);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1085
|
+
function Rt(t) {
|
|
1086
|
+
return W(t) ? {
|
|
1087
1087
|
scrollLeft: t.scrollLeft,
|
|
1088
1088
|
scrollTop: t.scrollTop
|
|
1089
1089
|
} : {
|
|
@@ -1105,404 +1105,404 @@ function q(t) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
function Oe(t) {
|
|
1107
1107
|
const e = q(t);
|
|
1108
|
-
return
|
|
1108
|
+
return st(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
|
|
1109
1109
|
}
|
|
1110
|
-
function lt(t, e,
|
|
1111
|
-
var
|
|
1112
|
-
e === void 0 && (e = []),
|
|
1113
|
-
const r = Oe(t), i = r === ((
|
|
1110
|
+
function lt(t, e, n) {
|
|
1111
|
+
var s;
|
|
1112
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1113
|
+
const r = Oe(t), i = r === ((s = t.ownerDocument) == null ? void 0 : s.body), o = k(r);
|
|
1114
1114
|
if (i) {
|
|
1115
|
-
const
|
|
1116
|
-
return e.concat(
|
|
1115
|
+
const a = Ht(o);
|
|
1116
|
+
return e.concat(o, o.visualViewport || [], dt(r) ? r : [], a && n ? lt(a) : []);
|
|
1117
1117
|
}
|
|
1118
|
-
return e.concat(r, lt(r, [],
|
|
1118
|
+
return e.concat(r, lt(r, [], n));
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Ht(t) {
|
|
1121
1121
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1122
1122
|
}
|
|
1123
1123
|
function Ae(t) {
|
|
1124
|
-
const e =
|
|
1125
|
-
let
|
|
1126
|
-
const r = $(t), i = r ? t.offsetWidth :
|
|
1127
|
-
return
|
|
1128
|
-
width:
|
|
1129
|
-
height:
|
|
1130
|
-
$:
|
|
1124
|
+
const e = F(t);
|
|
1125
|
+
let n = parseFloat(e.width) || 0, s = parseFloat(e.height) || 0;
|
|
1126
|
+
const r = $(t), i = r ? t.offsetWidth : n, o = r ? t.offsetHeight : s, a = yt(n) !== i || yt(s) !== o;
|
|
1127
|
+
return a && (n = i, s = o), {
|
|
1128
|
+
width: n,
|
|
1129
|
+
height: s,
|
|
1130
|
+
$: a
|
|
1131
1131
|
};
|
|
1132
1132
|
}
|
|
1133
1133
|
function jt(t) {
|
|
1134
|
-
return
|
|
1134
|
+
return W(t) ? t : t.contextElement;
|
|
1135
1135
|
}
|
|
1136
1136
|
function tt(t) {
|
|
1137
1137
|
const e = jt(t);
|
|
1138
1138
|
if (!$(e))
|
|
1139
1139
|
return V(1);
|
|
1140
|
-
const
|
|
1141
|
-
width:
|
|
1140
|
+
const n = e.getBoundingClientRect(), {
|
|
1141
|
+
width: s,
|
|
1142
1142
|
height: r,
|
|
1143
1143
|
$: i
|
|
1144
1144
|
} = Ae(e);
|
|
1145
|
-
let
|
|
1146
|
-
return (!
|
|
1147
|
-
x:
|
|
1148
|
-
y:
|
|
1145
|
+
let o = (i ? yt(n.width) : n.width) / s, a = (i ? yt(n.height) : n.height) / r;
|
|
1146
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1147
|
+
x: o,
|
|
1148
|
+
y: a
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1151
|
+
const Sn = /* @__PURE__ */ V(0);
|
|
1152
1152
|
function Re(t) {
|
|
1153
|
-
const e =
|
|
1154
|
-
return !Kt() || !e.visualViewport ?
|
|
1153
|
+
const e = k(t);
|
|
1154
|
+
return !Kt() || !e.visualViewport ? Sn : {
|
|
1155
1155
|
x: e.visualViewport.offsetLeft,
|
|
1156
1156
|
y: e.visualViewport.offsetTop
|
|
1157
1157
|
};
|
|
1158
1158
|
}
|
|
1159
|
-
function Pn(t, e,
|
|
1160
|
-
return e === void 0 && (e = !1), !
|
|
1159
|
+
function Pn(t, e, n) {
|
|
1160
|
+
return e === void 0 && (e = !1), !n || e && n !== k(t) ? !1 : e;
|
|
1161
1161
|
}
|
|
1162
|
-
function G(t, e,
|
|
1163
|
-
e === void 0 && (e = !1),
|
|
1162
|
+
function G(t, e, n, s) {
|
|
1163
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1164
1164
|
const r = t.getBoundingClientRect(), i = jt(t);
|
|
1165
|
-
let
|
|
1166
|
-
e && (
|
|
1167
|
-
const
|
|
1168
|
-
let
|
|
1165
|
+
let o = V(1);
|
|
1166
|
+
e && (s ? W(s) && (o = tt(s)) : o = tt(t));
|
|
1167
|
+
const a = Pn(i, n, s) ? Re(i) : V(0);
|
|
1168
|
+
let c = (r.left + a.x) / o.x, l = (r.top + a.y) / o.y, u = r.width / o.x, h = r.height / o.y;
|
|
1169
1169
|
if (i) {
|
|
1170
|
-
const p =
|
|
1171
|
-
let d = p, w =
|
|
1172
|
-
for (; w &&
|
|
1173
|
-
const m = tt(w), v = w.getBoundingClientRect(), b =
|
|
1174
|
-
|
|
1170
|
+
const p = k(i), f = s && W(s) ? k(s) : s;
|
|
1171
|
+
let d = p, w = Ht(d);
|
|
1172
|
+
for (; w && s && f !== d; ) {
|
|
1173
|
+
const m = tt(w), v = w.getBoundingClientRect(), b = F(w), y = v.left + (w.clientLeft + parseFloat(b.paddingLeft)) * m.x, R = v.top + (w.clientTop + parseFloat(b.paddingTop)) * m.y;
|
|
1174
|
+
c *= m.x, l *= m.y, u *= m.x, h *= m.y, c += y, l += R, d = k(w), w = Ht(d);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
-
return
|
|
1177
|
+
return xt({
|
|
1178
1178
|
width: u,
|
|
1179
1179
|
height: h,
|
|
1180
|
-
x:
|
|
1180
|
+
x: c,
|
|
1181
1181
|
y: l
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
1184
|
function It(t, e) {
|
|
1185
|
-
const
|
|
1186
|
-
return e ? e.left +
|
|
1185
|
+
const n = Rt(t).scrollLeft;
|
|
1186
|
+
return e ? e.left + n : G(z(t)).left + n;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1190
|
-
const
|
|
1188
|
+
function Se(t, e, n) {
|
|
1189
|
+
n === void 0 && (n = !1);
|
|
1190
|
+
const s = t.getBoundingClientRect(), r = s.left + e.scrollLeft - (n ? 0 : (
|
|
1191
1191
|
// RTL <body> scrollbar.
|
|
1192
|
-
It(t,
|
|
1193
|
-
)), i =
|
|
1192
|
+
It(t, s)
|
|
1193
|
+
)), i = s.top + e.scrollTop;
|
|
1194
1194
|
return {
|
|
1195
1195
|
x: r,
|
|
1196
1196
|
y: i
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Ln(t) {
|
|
1200
1200
|
let {
|
|
1201
1201
|
elements: e,
|
|
1202
|
-
rect:
|
|
1203
|
-
offsetParent:
|
|
1202
|
+
rect: n,
|
|
1203
|
+
offsetParent: s,
|
|
1204
1204
|
strategy: r
|
|
1205
1205
|
} = t;
|
|
1206
|
-
const i = r === "fixed",
|
|
1207
|
-
if (
|
|
1208
|
-
return
|
|
1209
|
-
let
|
|
1206
|
+
const i = r === "fixed", o = z(s), a = e ? At(e.floating) : !1;
|
|
1207
|
+
if (s === o || a && i)
|
|
1208
|
+
return n;
|
|
1209
|
+
let c = {
|
|
1210
1210
|
scrollLeft: 0,
|
|
1211
1211
|
scrollTop: 0
|
|
1212
1212
|
}, l = V(1);
|
|
1213
|
-
const u = V(0), h = $(
|
|
1214
|
-
if ((h || !h && !i) && ((rt(
|
|
1215
|
-
const f = G(
|
|
1216
|
-
l = tt(
|
|
1213
|
+
const u = V(0), h = $(s);
|
|
1214
|
+
if ((h || !h && !i) && ((rt(s) !== "body" || dt(o)) && (c = Rt(s)), $(s))) {
|
|
1215
|
+
const f = G(s);
|
|
1216
|
+
l = tt(s), u.x = f.x + s.clientLeft, u.y = f.y + s.clientTop;
|
|
1217
1217
|
}
|
|
1218
|
-
const p =
|
|
1218
|
+
const p = o && !h && !i ? Se(o, c, !0) : V(0);
|
|
1219
1219
|
return {
|
|
1220
|
-
width:
|
|
1221
|
-
height:
|
|
1222
|
-
x:
|
|
1223
|
-
y:
|
|
1220
|
+
width: n.width * l.x,
|
|
1221
|
+
height: n.height * l.y,
|
|
1222
|
+
x: n.x * l.x - c.scrollLeft * l.x + u.x + p.x,
|
|
1223
|
+
y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function En(t) {
|
|
1227
1227
|
return Array.from(t.getClientRects());
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
const e = z(t),
|
|
1231
|
-
let
|
|
1232
|
-
const
|
|
1233
|
-
return
|
|
1229
|
+
function kn(t) {
|
|
1230
|
+
const e = z(t), n = Rt(t), s = t.ownerDocument.body, r = Q(e.scrollWidth, e.clientWidth, s.scrollWidth, s.clientWidth), i = Q(e.scrollHeight, e.clientHeight, s.scrollHeight, s.clientHeight);
|
|
1231
|
+
let o = -n.scrollLeft + It(t);
|
|
1232
|
+
const a = -n.scrollTop;
|
|
1233
|
+
return F(s).direction === "rtl" && (o += Q(e.clientWidth, s.clientWidth) - r), {
|
|
1234
1234
|
width: r,
|
|
1235
1235
|
height: i,
|
|
1236
|
-
x:
|
|
1237
|
-
y:
|
|
1236
|
+
x: o,
|
|
1237
|
+
y: a
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const
|
|
1242
|
-
let i =
|
|
1240
|
+
function Tn(t, e) {
|
|
1241
|
+
const n = k(t), s = z(t), r = n.visualViewport;
|
|
1242
|
+
let i = s.clientWidth, o = s.clientHeight, a = 0, c = 0;
|
|
1243
1243
|
if (r) {
|
|
1244
|
-
i = r.width,
|
|
1244
|
+
i = r.width, o = r.height;
|
|
1245
1245
|
const l = Kt();
|
|
1246
|
-
(!l || l && e === "fixed") && (
|
|
1246
|
+
(!l || l && e === "fixed") && (a = r.offsetLeft, c = r.offsetTop);
|
|
1247
1247
|
}
|
|
1248
1248
|
return {
|
|
1249
1249
|
width: i,
|
|
1250
|
-
height:
|
|
1251
|
-
x:
|
|
1252
|
-
y:
|
|
1250
|
+
height: o,
|
|
1251
|
+
x: a,
|
|
1252
|
+
y: c
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
1255
|
function Cn(t, e) {
|
|
1256
|
-
const
|
|
1256
|
+
const n = G(t, !0, e === "fixed"), s = n.top + t.clientTop, r = n.left + t.clientLeft, i = $(t) ? tt(t) : V(1), o = t.clientWidth * i.x, a = t.clientHeight * i.y, c = r * i.x, l = s * i.y;
|
|
1257
1257
|
return {
|
|
1258
|
-
width:
|
|
1259
|
-
height:
|
|
1260
|
-
x:
|
|
1258
|
+
width: o,
|
|
1259
|
+
height: a,
|
|
1260
|
+
x: c,
|
|
1261
1261
|
y: l
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
function te(t, e,
|
|
1265
|
-
let
|
|
1264
|
+
function te(t, e, n) {
|
|
1265
|
+
let s;
|
|
1266
1266
|
if (e === "viewport")
|
|
1267
|
-
|
|
1267
|
+
s = Tn(t, n);
|
|
1268
1268
|
else if (e === "document")
|
|
1269
|
-
|
|
1270
|
-
else if (
|
|
1271
|
-
|
|
1269
|
+
s = kn(z(t));
|
|
1270
|
+
else if (W(e))
|
|
1271
|
+
s = Cn(e, n);
|
|
1272
1272
|
else {
|
|
1273
1273
|
const r = Re(t);
|
|
1274
|
-
|
|
1274
|
+
s = {
|
|
1275
1275
|
x: e.x - r.x,
|
|
1276
1276
|
y: e.y - r.y,
|
|
1277
1277
|
width: e.width,
|
|
1278
1278
|
height: e.height
|
|
1279
1279
|
};
|
|
1280
1280
|
}
|
|
1281
|
-
return
|
|
1281
|
+
return xt(s);
|
|
1282
1282
|
}
|
|
1283
1283
|
function Pe(t, e) {
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1284
|
+
const n = q(t);
|
|
1285
|
+
return n === e || !W(n) || st(n) ? !1 : F(n).position === "fixed" || Pe(n, e);
|
|
1286
1286
|
}
|
|
1287
1287
|
function Dn(t, e) {
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
return
|
|
1291
|
-
let
|
|
1292
|
-
const i =
|
|
1293
|
-
let
|
|
1294
|
-
for (;
|
|
1295
|
-
const
|
|
1296
|
-
!
|
|
1297
|
-
}
|
|
1298
|
-
return e.set(t,
|
|
1288
|
+
const n = e.get(t);
|
|
1289
|
+
if (n)
|
|
1290
|
+
return n;
|
|
1291
|
+
let s = lt(t, [], !1).filter((a) => W(a) && rt(a) !== "body"), r = null;
|
|
1292
|
+
const i = F(t).position === "fixed";
|
|
1293
|
+
let o = i ? q(t) : t;
|
|
1294
|
+
for (; W(o) && !st(o); ) {
|
|
1295
|
+
const a = F(o), c = Ut(o);
|
|
1296
|
+
!c && a.position === "fixed" && (r = null), (i ? !c && !r : !c && a.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || dt(o) && !c && Pe(t, o)) ? s = s.filter((u) => u !== o) : r = a, o = q(o);
|
|
1297
|
+
}
|
|
1298
|
+
return e.set(t, s), s;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Hn(t) {
|
|
1301
1301
|
let {
|
|
1302
1302
|
element: e,
|
|
1303
|
-
boundary:
|
|
1304
|
-
rootBoundary:
|
|
1303
|
+
boundary: n,
|
|
1304
|
+
rootBoundary: s,
|
|
1305
1305
|
strategy: r
|
|
1306
1306
|
} = t;
|
|
1307
|
-
const
|
|
1307
|
+
const o = [...n === "clippingAncestors" ? At(e) ? [] : Dn(e, this._c) : [].concat(n), s], a = o[0], c = o.reduce((l, u) => {
|
|
1308
1308
|
const h = te(e, u, r);
|
|
1309
1309
|
return l.top = Q(h.top, l.top), l.right = nt(h.right, l.right), l.bottom = nt(h.bottom, l.bottom), l.left = Q(h.left, l.left), l;
|
|
1310
|
-
}, te(e,
|
|
1310
|
+
}, te(e, a, r));
|
|
1311
1311
|
return {
|
|
1312
|
-
width:
|
|
1313
|
-
height:
|
|
1314
|
-
x:
|
|
1315
|
-
y:
|
|
1312
|
+
width: c.right - c.left,
|
|
1313
|
+
height: c.bottom - c.top,
|
|
1314
|
+
x: c.left,
|
|
1315
|
+
y: c.top
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function Wn(t) {
|
|
1319
1319
|
const {
|
|
1320
1320
|
width: e,
|
|
1321
|
-
height:
|
|
1321
|
+
height: n
|
|
1322
1322
|
} = Ae(t);
|
|
1323
1323
|
return {
|
|
1324
1324
|
width: e,
|
|
1325
|
-
height:
|
|
1325
|
+
height: n
|
|
1326
1326
|
};
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
const
|
|
1330
|
-
let
|
|
1328
|
+
function Fn(t, e, n) {
|
|
1329
|
+
const s = $(e), r = z(e), i = n === "fixed", o = G(t, !0, i, e);
|
|
1330
|
+
let a = {
|
|
1331
1331
|
scrollLeft: 0,
|
|
1332
1332
|
scrollTop: 0
|
|
1333
1333
|
};
|
|
1334
|
-
const
|
|
1334
|
+
const c = V(0);
|
|
1335
1335
|
function l() {
|
|
1336
|
-
|
|
1336
|
+
c.x = It(r);
|
|
1337
1337
|
}
|
|
1338
|
-
if (
|
|
1339
|
-
if ((rt(e) !== "body" || dt(r)) && (
|
|
1338
|
+
if (s || !s && !i)
|
|
1339
|
+
if ((rt(e) !== "body" || dt(r)) && (a = Rt(e)), s) {
|
|
1340
1340
|
const f = G(e, !0, i, e);
|
|
1341
|
-
|
|
1341
|
+
c.x = f.x + e.clientLeft, c.y = f.y + e.clientTop;
|
|
1342
1342
|
} else r && l();
|
|
1343
|
-
i && !
|
|
1344
|
-
const u = r && !
|
|
1343
|
+
i && !s && r && l();
|
|
1344
|
+
const u = r && !s && !i ? Se(r, a) : V(0), h = o.left + a.scrollLeft - c.x - u.x, p = o.top + a.scrollTop - c.y - u.y;
|
|
1345
1345
|
return {
|
|
1346
1346
|
x: h,
|
|
1347
1347
|
y: p,
|
|
1348
|
-
width:
|
|
1349
|
-
height:
|
|
1348
|
+
width: o.width,
|
|
1349
|
+
height: o.height
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
1352
|
function Pt(t) {
|
|
1353
|
-
return
|
|
1353
|
+
return F(t).position === "static";
|
|
1354
1354
|
}
|
|
1355
1355
|
function ee(t, e) {
|
|
1356
|
-
if (!$(t) ||
|
|
1356
|
+
if (!$(t) || F(t).position === "fixed")
|
|
1357
1357
|
return null;
|
|
1358
1358
|
if (e)
|
|
1359
1359
|
return e(t);
|
|
1360
|
-
let
|
|
1361
|
-
return z(t) ===
|
|
1360
|
+
let n = t.offsetParent;
|
|
1361
|
+
return z(t) === n && (n = n.ownerDocument.body), n;
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1364
|
-
const
|
|
1365
|
-
if (
|
|
1366
|
-
return
|
|
1363
|
+
function Le(t, e) {
|
|
1364
|
+
const n = k(t);
|
|
1365
|
+
if (At(t))
|
|
1366
|
+
return n;
|
|
1367
1367
|
if (!$(t)) {
|
|
1368
1368
|
let r = q(t);
|
|
1369
|
-
for (; r && !
|
|
1370
|
-
if (
|
|
1369
|
+
for (; r && !st(r); ) {
|
|
1370
|
+
if (W(r) && !Pt(r))
|
|
1371
1371
|
return r;
|
|
1372
1372
|
r = q(r);
|
|
1373
1373
|
}
|
|
1374
|
-
return
|
|
1374
|
+
return n;
|
|
1375
1375
|
}
|
|
1376
|
-
let
|
|
1377
|
-
for (;
|
|
1378
|
-
|
|
1379
|
-
return
|
|
1376
|
+
let s = ee(t, e);
|
|
1377
|
+
for (; s && An(s) && Pt(s); )
|
|
1378
|
+
s = ee(s, e);
|
|
1379
|
+
return s && st(s) && Pt(s) && !Ut(s) ? n : s || Rn(t) || n;
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1382
|
-
const e = this.getOffsetParent ||
|
|
1381
|
+
const Mn = async function(t) {
|
|
1382
|
+
const e = this.getOffsetParent || Le, n = this.getDimensions, s = await n(t.floating);
|
|
1383
1383
|
return {
|
|
1384
|
-
reference:
|
|
1384
|
+
reference: Fn(t.reference, await e(t.floating), t.strategy),
|
|
1385
1385
|
floating: {
|
|
1386
1386
|
x: 0,
|
|
1387
1387
|
y: 0,
|
|
1388
|
-
width:
|
|
1389
|
-
height:
|
|
1388
|
+
width: s.width,
|
|
1389
|
+
height: s.height
|
|
1390
1390
|
}
|
|
1391
1391
|
};
|
|
1392
1392
|
};
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1393
|
+
function Nn(t) {
|
|
1394
|
+
return F(t).direction === "rtl";
|
|
1395
1395
|
}
|
|
1396
1396
|
const Vn = {
|
|
1397
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1397
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
|
|
1398
1398
|
getDocumentElement: z,
|
|
1399
|
-
getClippingRect:
|
|
1400
|
-
getOffsetParent:
|
|
1401
|
-
getElementRects:
|
|
1402
|
-
getClientRects:
|
|
1403
|
-
getDimensions:
|
|
1399
|
+
getClippingRect: Hn,
|
|
1400
|
+
getOffsetParent: Le,
|
|
1401
|
+
getElementRects: Mn,
|
|
1402
|
+
getClientRects: En,
|
|
1403
|
+
getDimensions: Wn,
|
|
1404
1404
|
getScale: tt,
|
|
1405
|
-
isElement:
|
|
1406
|
-
isRTL:
|
|
1405
|
+
isElement: W,
|
|
1406
|
+
isRTL: Nn
|
|
1407
1407
|
};
|
|
1408
|
-
function
|
|
1408
|
+
function Ee(t, e) {
|
|
1409
1409
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1410
1410
|
}
|
|
1411
1411
|
function $n(t, e) {
|
|
1412
|
-
let
|
|
1412
|
+
let n = null, s;
|
|
1413
1413
|
const r = z(t);
|
|
1414
1414
|
function i() {
|
|
1415
|
-
var
|
|
1416
|
-
clearTimeout(
|
|
1415
|
+
var a;
|
|
1416
|
+
clearTimeout(s), (a = n) == null || a.disconnect(), n = null;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
|
|
1418
|
+
function o(a, c) {
|
|
1419
|
+
a === void 0 && (a = !1), c === void 0 && (c = 1), i();
|
|
1420
1420
|
const l = t.getBoundingClientRect(), {
|
|
1421
1421
|
left: u,
|
|
1422
1422
|
top: h,
|
|
1423
1423
|
width: p,
|
|
1424
1424
|
height: f
|
|
1425
1425
|
} = l;
|
|
1426
|
-
if (
|
|
1426
|
+
if (a || e(), !p || !f)
|
|
1427
1427
|
return;
|
|
1428
|
-
const d =
|
|
1428
|
+
const d = pt(h), w = pt(r.clientWidth - (u + p)), m = pt(r.clientHeight - (h + f)), v = pt(u), y = {
|
|
1429
1429
|
rootMargin: -d + "px " + -w + "px " + -m + "px " + -v + "px",
|
|
1430
|
-
threshold: Q(0, nt(1,
|
|
1430
|
+
threshold: Q(0, nt(1, c)) || 1
|
|
1431
1431
|
};
|
|
1432
1432
|
let R = !0;
|
|
1433
|
-
function A(
|
|
1434
|
-
const P =
|
|
1435
|
-
if (P !==
|
|
1433
|
+
function A(T) {
|
|
1434
|
+
const P = T[0].intersectionRatio;
|
|
1435
|
+
if (P !== c) {
|
|
1436
1436
|
if (!R)
|
|
1437
|
-
return
|
|
1438
|
-
P ?
|
|
1439
|
-
|
|
1437
|
+
return o();
|
|
1438
|
+
P ? o(!1, P) : s = setTimeout(() => {
|
|
1439
|
+
o(!1, 1e-7);
|
|
1440
1440
|
}, 1e3);
|
|
1441
1441
|
}
|
|
1442
|
-
P === 1 && !
|
|
1442
|
+
P === 1 && !Ee(l, t.getBoundingClientRect()) && o(), R = !1;
|
|
1443
1443
|
}
|
|
1444
1444
|
try {
|
|
1445
|
-
|
|
1445
|
+
n = new IntersectionObserver(A, {
|
|
1446
1446
|
...y,
|
|
1447
1447
|
// Handle <iframe>s
|
|
1448
1448
|
root: r.ownerDocument
|
|
1449
1449
|
});
|
|
1450
1450
|
} catch {
|
|
1451
|
-
|
|
1451
|
+
n = new IntersectionObserver(A, y);
|
|
1452
1452
|
}
|
|
1453
|
-
|
|
1453
|
+
n.observe(t);
|
|
1454
1454
|
}
|
|
1455
|
-
return
|
|
1455
|
+
return o(!0), i;
|
|
1456
1456
|
}
|
|
1457
|
-
function zn(t, e,
|
|
1458
|
-
|
|
1457
|
+
function zn(t, e, n, s) {
|
|
1458
|
+
s === void 0 && (s = {});
|
|
1459
1459
|
const {
|
|
1460
1460
|
ancestorScroll: r = !0,
|
|
1461
1461
|
ancestorResize: i = !0,
|
|
1462
|
-
elementResize:
|
|
1463
|
-
layoutShift:
|
|
1464
|
-
animationFrame:
|
|
1465
|
-
} =
|
|
1462
|
+
elementResize: o = typeof ResizeObserver == "function",
|
|
1463
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1464
|
+
animationFrame: c = !1
|
|
1465
|
+
} = s, l = jt(t), u = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
|
|
1466
1466
|
u.forEach((v) => {
|
|
1467
|
-
r && v.addEventListener("scroll",
|
|
1467
|
+
r && v.addEventListener("scroll", n, {
|
|
1468
1468
|
passive: !0
|
|
1469
|
-
}), i && v.addEventListener("resize",
|
|
1469
|
+
}), i && v.addEventListener("resize", n);
|
|
1470
1470
|
});
|
|
1471
|
-
const h = l &&
|
|
1471
|
+
const h = l && a ? $n(l, n) : null;
|
|
1472
1472
|
let p = -1, f = null;
|
|
1473
|
-
|
|
1473
|
+
o && (f = new ResizeObserver((v) => {
|
|
1474
1474
|
let [b] = v;
|
|
1475
1475
|
b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1476
1476
|
var y;
|
|
1477
1477
|
(y = f) == null || y.observe(e);
|
|
1478
|
-
})),
|
|
1479
|
-
}), l && !
|
|
1480
|
-
let d, w =
|
|
1481
|
-
|
|
1478
|
+
})), n();
|
|
1479
|
+
}), l && !c && f.observe(l), f.observe(e));
|
|
1480
|
+
let d, w = c ? G(t) : null;
|
|
1481
|
+
c && m();
|
|
1482
1482
|
function m() {
|
|
1483
1483
|
const v = G(t);
|
|
1484
|
-
w && !
|
|
1484
|
+
w && !Ee(w, v) && n(), w = v, d = requestAnimationFrame(m);
|
|
1485
1485
|
}
|
|
1486
|
-
return
|
|
1486
|
+
return n(), () => {
|
|
1487
1487
|
var v;
|
|
1488
1488
|
u.forEach((b) => {
|
|
1489
|
-
r && b.removeEventListener("scroll",
|
|
1490
|
-
}), h == null || h(), (v = f) == null || v.disconnect(), f = null,
|
|
1489
|
+
r && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
|
|
1490
|
+
}), h == null || h(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(d);
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
|
-
const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e,
|
|
1494
|
-
const
|
|
1493
|
+
const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, n) => {
|
|
1494
|
+
const s = /* @__PURE__ */ new Map(), r = {
|
|
1495
1495
|
platform: Vn,
|
|
1496
|
-
...
|
|
1496
|
+
...n
|
|
1497
1497
|
}, i = {
|
|
1498
1498
|
...r.platform,
|
|
1499
|
-
_c:
|
|
1499
|
+
_c: s
|
|
1500
1500
|
};
|
|
1501
1501
|
return wn(t, e, {
|
|
1502
1502
|
...r,
|
|
1503
1503
|
platform: i
|
|
1504
1504
|
});
|
|
1505
|
-
},
|
|
1505
|
+
}, ys = [
|
|
1506
1506
|
"top",
|
|
1507
1507
|
"top-start",
|
|
1508
1508
|
"top-end",
|
|
@@ -1515,42 +1515,42 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1515
1515
|
"left",
|
|
1516
1516
|
"left-start",
|
|
1517
1517
|
"left-end"
|
|
1518
|
-
],
|
|
1519
|
-
const
|
|
1520
|
-
let
|
|
1518
|
+
], vs = (t, e = { isOpen: !1 }) => {
|
|
1519
|
+
const n = [];
|
|
1520
|
+
let s = null;
|
|
1521
1521
|
const r = C.deriveProp(e.isOpen);
|
|
1522
|
-
function i(
|
|
1523
|
-
|
|
1522
|
+
function i(a) {
|
|
1523
|
+
s = a, r.set(!0);
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1526
|
-
r.set(!1),
|
|
1525
|
+
function o() {
|
|
1526
|
+
r.set(!1), n.forEach((a) => a()), n.length = 0;
|
|
1527
1527
|
}
|
|
1528
1528
|
return Y(
|
|
1529
|
-
t(i,
|
|
1529
|
+
t(i, o),
|
|
1530
1530
|
he(
|
|
1531
1531
|
r,
|
|
1532
1532
|
() => Y(
|
|
1533
|
-
(
|
|
1533
|
+
(s == null ? void 0 : s.onClickOutside) != null ? rn(s.onClickOutside) : null,
|
|
1534
1534
|
_(
|
|
1535
|
-
(
|
|
1535
|
+
(a) => fe(
|
|
1536
1536
|
"body",
|
|
1537
|
-
|
|
1538
|
-
_((
|
|
1539
|
-
|
|
1540
|
-
const l = typeof (
|
|
1541
|
-
|
|
1542
|
-
) : (
|
|
1537
|
+
Lt.div(
|
|
1538
|
+
_((c) => {
|
|
1539
|
+
c.style.position = "absolute";
|
|
1540
|
+
const l = typeof (s == null ? void 0 : s.target) == "string" ? a.querySelector(
|
|
1541
|
+
s.target
|
|
1542
|
+
) : (s == null ? void 0 : s.target) ?? a;
|
|
1543
1543
|
if (l == null)
|
|
1544
|
-
throw new Error(`Target not found: ${
|
|
1544
|
+
throw new Error(`Target not found: ${s == null ? void 0 : s.target}`);
|
|
1545
1545
|
let u = null;
|
|
1546
|
-
const h = C.toSignal((
|
|
1547
|
-
(
|
|
1546
|
+
const h = C.toSignal((s == null ? void 0 : s.mainAxisOffset) ?? 0), p = C.toSignal(
|
|
1547
|
+
(s == null ? void 0 : s.crossAxisOffset) ?? 0
|
|
1548
1548
|
), f = C.toSignal(
|
|
1549
1549
|
/* c8 ignore next 3 */
|
|
1550
|
-
(
|
|
1550
|
+
(s == null ? void 0 : s.placement) ?? "top"
|
|
1551
1551
|
), d = C.toSignal(
|
|
1552
|
-
(
|
|
1553
|
-
), w =
|
|
1552
|
+
(s == null ? void 0 : s.arrowPadding) ?? 0
|
|
1553
|
+
), w = s == null ? void 0 : s.arrow, m = M({
|
|
1554
1554
|
centerOffset: 0,
|
|
1555
1555
|
alignmentOffset: 0,
|
|
1556
1556
|
containerWidth: 0,
|
|
@@ -1574,12 +1574,12 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1574
1574
|
padding: d.get()
|
|
1575
1575
|
})
|
|
1576
1576
|
);
|
|
1577
|
-
const R = await Kn(l,
|
|
1577
|
+
const R = await Kn(l, c, {
|
|
1578
1578
|
placement: f.get(),
|
|
1579
1579
|
strategy: "absolute",
|
|
1580
1580
|
middleware: y
|
|
1581
|
-
}), { x: A, y:
|
|
1582
|
-
if (
|
|
1581
|
+
}), { x: A, y: T, middlewareData: P } = R;
|
|
1582
|
+
if (c.style.top = `${T}px`, c.style.left = `${A}px`, u != null && P.arrow != null) {
|
|
1583
1583
|
const {
|
|
1584
1584
|
x: U,
|
|
1585
1585
|
y: g,
|
|
@@ -1591,21 +1591,21 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1591
1591
|
y: g,
|
|
1592
1592
|
centerOffset: x,
|
|
1593
1593
|
alignmentOffset: O,
|
|
1594
|
-
containerWidth:
|
|
1595
|
-
containerHeight:
|
|
1594
|
+
containerWidth: c.offsetWidth,
|
|
1595
|
+
containerHeight: c.offsetHeight
|
|
1596
1596
|
});
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
|
-
const b =
|
|
1599
|
+
const b = Fe(
|
|
1600
1600
|
h,
|
|
1601
1601
|
p,
|
|
1602
1602
|
f
|
|
1603
1603
|
)(v);
|
|
1604
1604
|
return Y(
|
|
1605
|
-
|
|
1606
|
-
(
|
|
1607
|
-
|
|
1608
|
-
|
|
1605
|
+
s == null ? void 0 : s.content,
|
|
1606
|
+
(s == null ? void 0 : s.arrow) != null ? Lt.div(
|
|
1607
|
+
s == null ? void 0 : s.arrow(
|
|
1608
|
+
Nt(
|
|
1609
1609
|
m,
|
|
1610
1610
|
f
|
|
1611
1611
|
)((y, R) => ({
|
|
@@ -1617,9 +1617,9 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1617
1617
|
u = y, v();
|
|
1618
1618
|
})
|
|
1619
1619
|
) : null,
|
|
1620
|
-
|
|
1620
|
+
N(
|
|
1621
1621
|
m.dispose,
|
|
1622
|
-
zn(l,
|
|
1622
|
+
zn(l, c, v),
|
|
1623
1623
|
b
|
|
1624
1624
|
)
|
|
1625
1625
|
);
|
|
@@ -1633,37 +1633,37 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1633
1633
|
}, jn = ({
|
|
1634
1634
|
request: t,
|
|
1635
1635
|
load: e,
|
|
1636
|
-
convertError:
|
|
1637
|
-
onSuccess:
|
|
1636
|
+
convertError: n,
|
|
1637
|
+
onSuccess: s,
|
|
1638
1638
|
onError: r,
|
|
1639
1639
|
onSettled: i
|
|
1640
1640
|
}) => {
|
|
1641
|
-
let
|
|
1642
|
-
const
|
|
1643
|
-
(m) =>
|
|
1644
|
-
), l =
|
|
1645
|
-
(m) =>
|
|
1646
|
-
), u =
|
|
1647
|
-
|
|
1641
|
+
let o;
|
|
1642
|
+
const a = M(S.notAsked), c = a.map(
|
|
1643
|
+
(m) => S.isSuccess(m) ? m.value : void 0
|
|
1644
|
+
), l = a.map(
|
|
1645
|
+
(m) => S.isFailure(m) ? m.error : void 0
|
|
1646
|
+
), u = a.map((m) => S.isLoading(m)), h = () => {
|
|
1647
|
+
o == null || o.abort(), o = void 0;
|
|
1648
1648
|
}, p = (m) => {
|
|
1649
|
-
h(),
|
|
1649
|
+
h(), a.set(m ?? S.notAsked);
|
|
1650
1650
|
}, f = async (m) => {
|
|
1651
|
-
h(),
|
|
1652
|
-
const v =
|
|
1653
|
-
|
|
1651
|
+
h(), o = new AbortController();
|
|
1652
|
+
const v = o.signal, b = a.get();
|
|
1653
|
+
a.set(S.loading(S.getOrUndefined(b)));
|
|
1654
1654
|
try {
|
|
1655
1655
|
const y = await e({ request: m, abortSignal: v, previous: b });
|
|
1656
|
-
await Promise.resolve(),
|
|
1656
|
+
await Promise.resolve(), o = void 0, a.set(S.success(y)), s == null || s(y, m);
|
|
1657
1657
|
} catch (y) {
|
|
1658
|
-
|
|
1658
|
+
o = void 0, a.set(S.failure(n(y))), r == null || r(n(y), m);
|
|
1659
1659
|
}
|
|
1660
|
-
i == null || i(
|
|
1660
|
+
i == null || i(a.get(), m);
|
|
1661
1661
|
}, d = () => f(C.get(t)), w = () => {
|
|
1662
|
-
|
|
1662
|
+
o == null || o.abort(), o = void 0, a.dispose();
|
|
1663
1663
|
};
|
|
1664
|
-
return
|
|
1665
|
-
status:
|
|
1666
|
-
value:
|
|
1664
|
+
return a.onDispose(C.on(t, f)), {
|
|
1665
|
+
status: a,
|
|
1666
|
+
value: c,
|
|
1667
1667
|
error: l,
|
|
1668
1668
|
loading: u,
|
|
1669
1669
|
cancel: p,
|
|
@@ -1671,51 +1671,51 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, o) => {
|
|
|
1671
1671
|
dispose: w
|
|
1672
1672
|
};
|
|
1673
1673
|
}, In = (t, e) => {
|
|
1674
|
-
const { status:
|
|
1674
|
+
const { status: n, dispose: s, reload: r } = t, { pending: i, failure: o, success: a } = e;
|
|
1675
1675
|
return Y(
|
|
1676
|
-
|
|
1677
|
-
pe(
|
|
1678
|
-
loading: i != null ? (
|
|
1679
|
-
failure:
|
|
1680
|
-
success: (
|
|
1676
|
+
N(s),
|
|
1677
|
+
pe(n, {
|
|
1678
|
+
loading: i != null ? (c) => i({ previous: c, reload: r, cancel: t.cancel }) : void 0,
|
|
1679
|
+
failure: o != null ? (c) => o({ error: c, reload: r }) : void 0,
|
|
1680
|
+
success: (c) => a({ value: c, reload: r })
|
|
1681
1681
|
})
|
|
1682
1682
|
);
|
|
1683
|
-
},
|
|
1683
|
+
}, xs = ({
|
|
1684
1684
|
request: t,
|
|
1685
1685
|
load: e,
|
|
1686
|
-
convertError:
|
|
1687
|
-
onSuccess:
|
|
1686
|
+
convertError: n = (l) => l,
|
|
1687
|
+
onSuccess: s,
|
|
1688
1688
|
onError: r,
|
|
1689
1689
|
onSettled: i,
|
|
1690
|
-
success:
|
|
1691
|
-
pending:
|
|
1692
|
-
failure:
|
|
1690
|
+
success: o,
|
|
1691
|
+
pending: a,
|
|
1692
|
+
failure: c
|
|
1693
1693
|
}) => {
|
|
1694
1694
|
const l = jn({
|
|
1695
1695
|
request: t,
|
|
1696
1696
|
load: e,
|
|
1697
|
-
convertError:
|
|
1698
|
-
onSuccess:
|
|
1697
|
+
convertError: n,
|
|
1698
|
+
onSuccess: s,
|
|
1699
1699
|
onError: r,
|
|
1700
1700
|
onSettled: i
|
|
1701
1701
|
});
|
|
1702
|
-
return In(l, { success:
|
|
1702
|
+
return In(l, { success: o, pending: a, failure: c });
|
|
1703
1703
|
}, Yn = (t, e) => {
|
|
1704
1704
|
if (typeof e == "function")
|
|
1705
1705
|
return Yn(t, { success: e });
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1706
|
+
const n = e.failure ?? ((r) => Y(
|
|
1707
|
+
N(r.on(console.error)),
|
|
1708
1708
|
r.map((i) => `Error: ${i}`)
|
|
1709
|
-
)),
|
|
1709
|
+
)), s = e.success;
|
|
1710
1710
|
return ue(C.toSignal(t), {
|
|
1711
|
-
Success: (r) =>
|
|
1712
|
-
Failure: (r) =>
|
|
1711
|
+
Success: (r) => s(r.$.value),
|
|
1712
|
+
Failure: (r) => n(r.$.error)
|
|
1713
1713
|
});
|
|
1714
|
-
},
|
|
1714
|
+
}, bs = () => le.focus((t) => {
|
|
1715
1715
|
var e;
|
|
1716
1716
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1717
1717
|
});
|
|
1718
|
-
class
|
|
1718
|
+
class St {
|
|
1719
1719
|
/**
|
|
1720
1720
|
* Creates a new Rect instance.
|
|
1721
1721
|
*
|
|
@@ -1733,7 +1733,7 @@ class Rt {
|
|
|
1733
1733
|
* console.log(rect.height); // 50
|
|
1734
1734
|
* ```
|
|
1735
1735
|
*/
|
|
1736
|
-
constructor(e,
|
|
1736
|
+
constructor(e, n, s, r, i, o) {
|
|
1737
1737
|
/**
|
|
1738
1738
|
* Compares this rectangle with another rectangle for equality.
|
|
1739
1739
|
*
|
|
@@ -1754,8 +1754,8 @@ class Rt {
|
|
|
1754
1754
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1755
1755
|
* ```
|
|
1756
1756
|
*/
|
|
1757
|
-
|
|
1758
|
-
this.left = e, this.top =
|
|
1757
|
+
mt(this, "equals", (e) => gt(this.left, e.left) && gt(this.top, e.top) && gt(this.width, e.width) && gt(this.height, e.height));
|
|
1758
|
+
this.left = e, this.top = n, this.width = s, this.height = r, this.localLeft = i, this.localTop = o;
|
|
1759
1759
|
}
|
|
1760
1760
|
/**
|
|
1761
1761
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1784,13 +1784,13 @@ class Rt {
|
|
|
1784
1784
|
*/
|
|
1785
1785
|
static of({
|
|
1786
1786
|
left: e = 0,
|
|
1787
|
-
top:
|
|
1788
|
-
width:
|
|
1787
|
+
top: n = 0,
|
|
1788
|
+
width: s = 0,
|
|
1789
1789
|
height: r = 0,
|
|
1790
1790
|
localLeft: i = 0,
|
|
1791
|
-
localTop:
|
|
1791
|
+
localTop: o = 0
|
|
1792
1792
|
}) {
|
|
1793
|
-
return new
|
|
1793
|
+
return new St(e, n, s, r, i, o);
|
|
1794
1794
|
}
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1903,9 +1903,9 @@ class Rt {
|
|
|
1903
1903
|
return { width: this.width, height: this.height };
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1906
|
+
function se(t) {
|
|
1907
1907
|
const e = t.getBoundingClientRect();
|
|
1908
|
-
return
|
|
1908
|
+
return St.of({
|
|
1909
1909
|
top: e.top + window.scrollY,
|
|
1910
1910
|
left: e.left + window.scrollX,
|
|
1911
1911
|
width: e.width,
|
|
@@ -1914,30 +1914,30 @@ function oe(t) {
|
|
|
1914
1914
|
localTop: t.offsetTop
|
|
1915
1915
|
});
|
|
1916
1916
|
}
|
|
1917
|
-
const
|
|
1918
|
-
const { element:
|
|
1919
|
-
let
|
|
1920
|
-
return typeof ResizeObserver < "u" && (
|
|
1921
|
-
|
|
1917
|
+
const Os = (t) => Me((e) => {
|
|
1918
|
+
const { element: n } = e, s = M(se(n), (a, c) => a.equals(c)), r = $t(t(s))(e), i = () => s.set(St.of(se(n)));
|
|
1919
|
+
let o = null;
|
|
1920
|
+
return typeof ResizeObserver < "u" && (o = new ResizeObserver(i)), o == null || o.observe(n), N((a) => {
|
|
1921
|
+
o == null || o.disconnect(), r(a);
|
|
1922
1922
|
});
|
|
1923
1923
|
});
|
|
1924
|
-
function
|
|
1924
|
+
function oe(t) {
|
|
1925
1925
|
return {
|
|
1926
1926
|
/* c8 ignore next 6 */
|
|
1927
1927
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1928
1928
|
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1929
1929
|
};
|
|
1930
1930
|
}
|
|
1931
|
-
const
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
(
|
|
1935
|
-
), r = $t(t(
|
|
1936
|
-
return
|
|
1937
|
-
|
|
1931
|
+
const As = (t) => (e) => {
|
|
1932
|
+
const n = ot(), s = M(
|
|
1933
|
+
oe(n),
|
|
1934
|
+
(o, a) => o.width === a.width && o.height === a.height
|
|
1935
|
+
), r = $t(t(s))(e), i = () => s.set(oe(n));
|
|
1936
|
+
return n == null || n.addEventListener("resize", i), (o) => {
|
|
1937
|
+
n == null || n.removeEventListener("resize", i), r(o);
|
|
1938
1938
|
};
|
|
1939
1939
|
}, qn = (t, e) => {
|
|
1940
|
-
const
|
|
1940
|
+
const n = e.split("/").filter((i) => i !== ""), s = (i) => {
|
|
1941
1941
|
try {
|
|
1942
1942
|
return decodeURIComponent(i);
|
|
1943
1943
|
} catch {
|
|
@@ -1945,69 +1945,134 @@ const Oo = (t) => (e) => {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
}, r = {};
|
|
1947
1947
|
for (let i = 0; i < t.length; i++) {
|
|
1948
|
-
const
|
|
1949
|
-
if (!
|
|
1948
|
+
const o = t[i], a = n[i];
|
|
1949
|
+
if (!a && o.type !== "catch-all")
|
|
1950
1950
|
return null;
|
|
1951
|
-
if (
|
|
1952
|
-
if (
|
|
1951
|
+
if (o.type === "literal") {
|
|
1952
|
+
if (o.value !== a)
|
|
1953
1953
|
return null;
|
|
1954
|
-
} else if (
|
|
1955
|
-
r[
|
|
1956
|
-
else if (
|
|
1957
|
-
if (
|
|
1958
|
-
const
|
|
1959
|
-
r[
|
|
1954
|
+
} else if (o.type === "param")
|
|
1955
|
+
r[o.name] = s(a);
|
|
1956
|
+
else if (o.type === "catch-all") {
|
|
1957
|
+
if (o.name) {
|
|
1958
|
+
const c = n.slice(i).join("/");
|
|
1959
|
+
r[o.name] = s(c);
|
|
1960
1960
|
}
|
|
1961
1961
|
return { params: r, path: e };
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
return
|
|
1965
|
-
},
|
|
1964
|
+
return n.length !== t.length ? null : { params: r, path: e };
|
|
1965
|
+
}, ke = (t) => t.split("/").map((e) => {
|
|
1966
1966
|
if (e.startsWith(":"))
|
|
1967
1967
|
return { type: "param", name: e.slice(1) };
|
|
1968
1968
|
if (e.startsWith("*")) {
|
|
1969
|
-
const
|
|
1970
|
-
return
|
|
1969
|
+
const n = e.slice(1);
|
|
1970
|
+
return n != "" ? { type: "catch-all", name: n } : { type: "catch-all" };
|
|
1971
1971
|
} else
|
|
1972
1972
|
return { type: "literal", value: e };
|
|
1973
|
-
}).filter((e) => e.type !== "literal" || e.value !== ""),
|
|
1974
|
-
const e = t.map((
|
|
1975
|
-
const
|
|
1976
|
-
return { route:
|
|
1973
|
+
}).filter((e) => e.type !== "literal" || e.value !== ""), Rs = (t) => {
|
|
1974
|
+
const e = t.map((n) => {
|
|
1975
|
+
const s = ke(n);
|
|
1976
|
+
return { route: n, segments: s };
|
|
1977
1977
|
});
|
|
1978
|
-
return function(
|
|
1978
|
+
return function(s) {
|
|
1979
1979
|
for (const { segments: r, route: i } of e) {
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
1982
|
-
return { ...
|
|
1980
|
+
const o = qn(r, s);
|
|
1981
|
+
if (o)
|
|
1982
|
+
return { ...o, route: i };
|
|
1983
1983
|
}
|
|
1984
1984
|
return null;
|
|
1985
1985
|
};
|
|
1986
|
-
},
|
|
1987
|
-
|
|
1986
|
+
}, Xn = (t) => {
|
|
1987
|
+
if (t == null)
|
|
1988
|
+
throw new Error(
|
|
1989
|
+
"NavigationService: no Location handle attached. Make sure to attach one before calling navigation helpers."
|
|
1990
|
+
);
|
|
1991
|
+
return t;
|
|
1992
|
+
};
|
|
1993
|
+
class Qn {
|
|
1994
|
+
constructor() {
|
|
1995
|
+
mt(this, "handles", []);
|
|
1996
|
+
}
|
|
1997
|
+
attach(e) {
|
|
1998
|
+
const n = this.handles.lastIndexOf(e);
|
|
1999
|
+
return n !== -1 && this.handles.splice(n, 1), this.handles.push(e), () => this.detach(e);
|
|
2000
|
+
}
|
|
2001
|
+
detach(e) {
|
|
2002
|
+
for (let n = this.handles.length - 1; n >= 0; n--)
|
|
2003
|
+
if (this.handles[n] === e) {
|
|
2004
|
+
this.handles.splice(n, 1);
|
|
2005
|
+
break;
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
get current() {
|
|
2009
|
+
return this.handles[this.handles.length - 1];
|
|
2010
|
+
}
|
|
2011
|
+
getHandle() {
|
|
2012
|
+
return Xn(this.current);
|
|
2013
|
+
}
|
|
2014
|
+
navigate(e, n) {
|
|
2015
|
+
this.getHandle().navigate(e, n);
|
|
2016
|
+
}
|
|
2017
|
+
replace(e, n) {
|
|
2018
|
+
this.getHandle().replace(e, n);
|
|
2019
|
+
}
|
|
2020
|
+
go(e, n) {
|
|
2021
|
+
this.getHandle().go(e, n);
|
|
2022
|
+
}
|
|
2023
|
+
back(e) {
|
|
2024
|
+
this.getHandle().back(e);
|
|
2025
|
+
}
|
|
2026
|
+
forward(e) {
|
|
2027
|
+
this.getHandle().forward(e);
|
|
2028
|
+
}
|
|
2029
|
+
setPathname(e, n) {
|
|
2030
|
+
this.getHandle().setPathname(e, n);
|
|
2031
|
+
}
|
|
2032
|
+
setSearch(e, n) {
|
|
2033
|
+
this.getHandle().setSearch(e, n);
|
|
2034
|
+
}
|
|
2035
|
+
setSearchParam(e, n, s) {
|
|
2036
|
+
this.getHandle().setSearchParam(e, n, s);
|
|
2037
|
+
}
|
|
2038
|
+
updateSearch(e, n) {
|
|
2039
|
+
this.getHandle().updateSearch(e, n);
|
|
2040
|
+
}
|
|
2041
|
+
setHash(e, n) {
|
|
2042
|
+
this.getHandle().setHash(e, n);
|
|
2043
|
+
}
|
|
2044
|
+
clearHash(e) {
|
|
2045
|
+
this.getHandle().clearHash(e);
|
|
2046
|
+
}
|
|
2047
|
+
run(e, n) {
|
|
2048
|
+
this.getHandle().run(e, n);
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
const Ss = new Qn(), Wt = {
|
|
2052
|
+
mark: Mt("RouterContext"),
|
|
1988
2053
|
create: () => {
|
|
1989
|
-
const t =
|
|
2054
|
+
const t = M([]);
|
|
1990
2055
|
return {
|
|
1991
2056
|
value: t,
|
|
1992
2057
|
dispose: () => t.dispose()
|
|
1993
2058
|
};
|
|
1994
2059
|
}
|
|
1995
|
-
},
|
|
1996
|
-
const
|
|
2060
|
+
}, Jn = (t, e, n) => {
|
|
2061
|
+
const s = n.split("/").filter((o) => o !== ""), r = {};
|
|
1997
2062
|
let i = 0;
|
|
1998
|
-
for (let
|
|
1999
|
-
const
|
|
2000
|
-
if (!
|
|
2063
|
+
for (let o = 0; o < t.length; o++) {
|
|
2064
|
+
const a = t[o], c = s[o];
|
|
2065
|
+
if (!c && a.type !== "catch-all")
|
|
2001
2066
|
return null;
|
|
2002
|
-
if (
|
|
2003
|
-
if (
|
|
2067
|
+
if (a.type === "literal") {
|
|
2068
|
+
if (a.value !== c)
|
|
2004
2069
|
return null;
|
|
2005
2070
|
i++;
|
|
2006
|
-
} else if (
|
|
2007
|
-
r[
|
|
2008
|
-
else if (
|
|
2009
|
-
|
|
2010
|
-
const l = "/" +
|
|
2071
|
+
} else if (a.type === "param")
|
|
2072
|
+
r[a.name] = c, i++;
|
|
2073
|
+
else if (a.type === "catch-all") {
|
|
2074
|
+
a.name && (r[a.name] = s.slice(i).join("/"));
|
|
2075
|
+
const l = "/" + s.slice(0, i).join("/"), u = "/" + s.slice(i).join("/");
|
|
2011
2076
|
return {
|
|
2012
2077
|
params: r,
|
|
2013
2078
|
matchedPath: l === "/" ? "" : l,
|
|
@@ -2016,49 +2081,49 @@ const Oo = (t) => (e) => {
|
|
|
2016
2081
|
};
|
|
2017
2082
|
}
|
|
2018
2083
|
}
|
|
2019
|
-
if (
|
|
2020
|
-
const
|
|
2084
|
+
if (s.length === t.length) {
|
|
2085
|
+
const o = "/" + s.join("/");
|
|
2021
2086
|
return {
|
|
2022
2087
|
params: r,
|
|
2023
|
-
matchedPath:
|
|
2088
|
+
matchedPath: o === "/" ? "" : o,
|
|
2024
2089
|
remainingPath: "",
|
|
2025
2090
|
route: e
|
|
2026
2091
|
};
|
|
2027
2092
|
}
|
|
2028
2093
|
return null;
|
|
2029
|
-
},
|
|
2030
|
-
const e = t.map((
|
|
2031
|
-
const
|
|
2032
|
-
return { route:
|
|
2094
|
+
}, Te = (t) => {
|
|
2095
|
+
const e = t.map((n) => {
|
|
2096
|
+
const s = ke(n);
|
|
2097
|
+
return { route: n, segments: s };
|
|
2033
2098
|
});
|
|
2034
|
-
return function(
|
|
2099
|
+
return function(s) {
|
|
2035
2100
|
for (const { segments: r, route: i } of e) {
|
|
2036
|
-
const
|
|
2037
|
-
if (
|
|
2038
|
-
return
|
|
2101
|
+
const o = Jn(r, i, s);
|
|
2102
|
+
if (o)
|
|
2103
|
+
return o;
|
|
2039
2104
|
}
|
|
2040
2105
|
return null;
|
|
2041
2106
|
};
|
|
2042
|
-
},
|
|
2043
|
-
const e =
|
|
2044
|
-
return
|
|
2045
|
-
|
|
2107
|
+
}, Ps = (t) => {
|
|
2108
|
+
const e = Te(Object.keys(t));
|
|
2109
|
+
return Ne(
|
|
2110
|
+
Wt,
|
|
2046
2111
|
{},
|
|
2047
|
-
() =>
|
|
2048
|
-
const r =
|
|
2049
|
-
const
|
|
2050
|
-
if (
|
|
2112
|
+
() => ct(zt, (n) => ct(Wt, (s) => {
|
|
2113
|
+
const r = n.location.map((i) => {
|
|
2114
|
+
const o = e(i.pathname);
|
|
2115
|
+
if (o == null)
|
|
2051
2116
|
throw console.error("No route found for", i), new Error("No route found");
|
|
2052
|
-
const
|
|
2053
|
-
matchedPath:
|
|
2054
|
-
remainingPath:
|
|
2117
|
+
const a = {
|
|
2118
|
+
matchedPath: o.matchedPath,
|
|
2119
|
+
remainingPath: o.remainingPath,
|
|
2055
2120
|
fullPath: i.pathname,
|
|
2056
|
-
params:
|
|
2121
|
+
params: o.params
|
|
2057
2122
|
};
|
|
2058
|
-
return
|
|
2059
|
-
params:
|
|
2060
|
-
route:
|
|
2061
|
-
path:
|
|
2123
|
+
return s.value = [...s.value, a], {
|
|
2124
|
+
params: o.params,
|
|
2125
|
+
route: o.route,
|
|
2126
|
+
path: o.matchedPath || i.pathname,
|
|
2062
2127
|
search: i.search,
|
|
2063
2128
|
hash: i.hash
|
|
2064
2129
|
};
|
|
@@ -2070,23 +2135,23 @@ const Oo = (t) => (e) => {
|
|
|
2070
2135
|
);
|
|
2071
2136
|
}))
|
|
2072
2137
|
);
|
|
2073
|
-
},
|
|
2074
|
-
const e =
|
|
2075
|
-
return
|
|
2076
|
-
const r =
|
|
2077
|
-
const
|
|
2078
|
-
if (
|
|
2138
|
+
}, Ls = (t) => {
|
|
2139
|
+
const e = Te(Object.keys(t));
|
|
2140
|
+
return ct(Wt, (n) => ct(zt, (s) => {
|
|
2141
|
+
const r = n.map((i) => {
|
|
2142
|
+
const o = i[i.length - 1];
|
|
2143
|
+
if (o == null)
|
|
2079
2144
|
throw console.error("No router context available for ChildRouter", i), new Error("No router context available for ChildRouter");
|
|
2080
|
-
const
|
|
2081
|
-
if (
|
|
2082
|
-
throw console.error("No route found for remaining path",
|
|
2145
|
+
const a = o.remainingPath ?? "", c = e(a);
|
|
2146
|
+
if (c == null)
|
|
2147
|
+
throw console.error("No route found for remaining path", a), new Error("No route found");
|
|
2083
2148
|
return {
|
|
2084
|
-
params:
|
|
2149
|
+
params: c.params,
|
|
2085
2150
|
// Only this router's parameters
|
|
2086
|
-
route:
|
|
2087
|
-
path:
|
|
2088
|
-
search:
|
|
2089
|
-
hash:
|
|
2151
|
+
route: c.route,
|
|
2152
|
+
path: c.matchedPath,
|
|
2153
|
+
search: s.location.value.search,
|
|
2154
|
+
hash: s.location.value.hash
|
|
2090
2155
|
};
|
|
2091
2156
|
});
|
|
2092
2157
|
return de(
|
|
@@ -2095,17 +2160,17 @@ const Oo = (t) => (e) => {
|
|
|
2095
2160
|
t
|
|
2096
2161
|
);
|
|
2097
2162
|
}));
|
|
2098
|
-
},
|
|
2163
|
+
}, bt = 60 * 1e3, Ft = 60 * bt, ut = 24 * Ft, re = 7 * ut, ie = 30 * ut, Gn = 365 * ut, Zn = [
|
|
2099
2164
|
{
|
|
2100
|
-
max:
|
|
2101
|
-
value:
|
|
2165
|
+
max: bt * 90,
|
|
2166
|
+
value: bt,
|
|
2102
2167
|
name: "minute",
|
|
2103
2168
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
2104
2169
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
2105
2170
|
},
|
|
2106
2171
|
{
|
|
2107
|
-
max:
|
|
2108
|
-
value:
|
|
2172
|
+
max: Ft * 36,
|
|
2173
|
+
value: Ft,
|
|
2109
2174
|
name: "hour",
|
|
2110
2175
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
2111
2176
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
@@ -2133,15 +2198,15 @@ const Oo = (t) => (e) => {
|
|
|
2133
2198
|
},
|
|
2134
2199
|
{
|
|
2135
2200
|
max: 1 / 0,
|
|
2136
|
-
value:
|
|
2201
|
+
value: Gn,
|
|
2137
2202
|
name: "year",
|
|
2138
2203
|
past: { singular: "last year", plural: "{} years ago" },
|
|
2139
2204
|
future: { singular: "in a year", plural: "in {} years" }
|
|
2140
2205
|
}
|
|
2141
2206
|
];
|
|
2142
|
-
function
|
|
2207
|
+
function ae(t, e, n, s) {
|
|
2143
2208
|
const r = Math.round(t / e);
|
|
2144
|
-
return r <= 1 ?
|
|
2209
|
+
return r <= 1 ? n : s.replace(
|
|
2145
2210
|
"{}",
|
|
2146
2211
|
r.toLocaleString(void 0, {
|
|
2147
2212
|
maximumFractionDigits: 0,
|
|
@@ -2149,88 +2214,89 @@ function ce(t, e, o, n) {
|
|
|
2149
2214
|
})
|
|
2150
2215
|
);
|
|
2151
2216
|
}
|
|
2152
|
-
const
|
|
2153
|
-
const e =
|
|
2154
|
-
return e.onDispose(
|
|
2155
|
-
},
|
|
2217
|
+
const ts = (t = 1e3) => {
|
|
2218
|
+
const e = M(/* @__PURE__ */ new Date()), n = $e(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
2219
|
+
return e.onDispose(n), e;
|
|
2220
|
+
}, es = (t) => {
|
|
2156
2221
|
const e = Math.abs(t);
|
|
2157
|
-
if (e <
|
|
2222
|
+
if (e < bt)
|
|
2158
2223
|
return t < 0 ? "just now" : "in a moment";
|
|
2159
|
-
for (const
|
|
2160
|
-
if (e <
|
|
2161
|
-
return t < 0 ?
|
|
2224
|
+
for (const n of Zn)
|
|
2225
|
+
if (e < n.max)
|
|
2226
|
+
return t < 0 ? ae(e, n.value, n.past.singular, n.past.plural) : ae(e, n.value, n.future.singular, n.future.plural);
|
|
2162
2227
|
throw new Error("unreachable");
|
|
2163
|
-
},
|
|
2164
|
-
const
|
|
2228
|
+
}, ns = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
2229
|
+
const s = e != null ? ce.is(e) ? e.derive() : M(e) : ts(n), r = Nt(
|
|
2165
2230
|
t,
|
|
2166
|
-
|
|
2167
|
-
)((i,
|
|
2168
|
-
return r.onDispose(() => C.dispose(
|
|
2169
|
-
},
|
|
2170
|
-
const
|
|
2171
|
-
return
|
|
2172
|
-
},
|
|
2173
|
-
class
|
|
2231
|
+
s
|
|
2232
|
+
)((i, o) => i.getTime() - o.getTime());
|
|
2233
|
+
return r.onDispose(() => C.dispose(s)), r;
|
|
2234
|
+
}, ss = (t, e = {}) => {
|
|
2235
|
+
const n = ns(t, e), s = n.map(es);
|
|
2236
|
+
return s.onDispose(n.dispose), s;
|
|
2237
|
+
}, Es = (t, e = {}) => ss(t, e);
|
|
2238
|
+
class os extends Ve {
|
|
2174
2239
|
constructor() {
|
|
2175
2240
|
super(...arguments);
|
|
2176
2241
|
/**
|
|
2177
2242
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
2178
2243
|
* @returns void
|
|
2179
2244
|
*/
|
|
2180
|
-
|
|
2245
|
+
mt(this, "tick", () => this.update((n) => n + 1));
|
|
2181
2246
|
}
|
|
2182
2247
|
}
|
|
2183
|
-
const
|
|
2248
|
+
const ks = (t = 0) => new os(t, (e, n) => e === n);
|
|
2184
2249
|
export {
|
|
2185
2250
|
tn as Anchor,
|
|
2186
|
-
|
|
2251
|
+
cs as Appearance,
|
|
2187
2252
|
pe as AsyncResultView,
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2253
|
+
ls as AutoFocus,
|
|
2254
|
+
us as AutoSelect,
|
|
2255
|
+
Ls as ChildRouter,
|
|
2256
|
+
Os as ElementRect,
|
|
2257
|
+
ds as HTMLTitle,
|
|
2258
|
+
hs as HiddenWhenEmpty,
|
|
2259
|
+
on as InViewport,
|
|
2195
2260
|
zt as Location,
|
|
2196
|
-
|
|
2261
|
+
ws as Mutation,
|
|
2197
2262
|
ln as MutationDisplay,
|
|
2263
|
+
Ss as NavigationService,
|
|
2198
2264
|
rn as OnClickOutside,
|
|
2199
|
-
|
|
2200
|
-
|
|
2265
|
+
gs as OnEnterKey,
|
|
2266
|
+
ps as OnEscapeKey,
|
|
2201
2267
|
we as OnKeyPressed,
|
|
2202
|
-
|
|
2203
|
-
|
|
2268
|
+
vs as PopOver,
|
|
2269
|
+
xs as Query,
|
|
2204
2270
|
In as QueryDisplay,
|
|
2205
|
-
|
|
2271
|
+
St as Rect,
|
|
2206
2272
|
Yn as ResultView,
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2273
|
+
Ps as RootRouter,
|
|
2274
|
+
Wt as RouterContextProvider,
|
|
2275
|
+
bs as SelectOnFocus,
|
|
2276
|
+
os as Ticker,
|
|
2277
|
+
ms as WhenInViewport,
|
|
2278
|
+
As as WindowSize,
|
|
2213
2279
|
Be as _checkExtensionCondition,
|
|
2214
2280
|
ze as _getExtension,
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2281
|
+
Rs as _makeRouteMatcher,
|
|
2282
|
+
ke as _parseRouteSegments,
|
|
2283
|
+
ys as allPlacements,
|
|
2218
2284
|
Ke as areLocationsEqual,
|
|
2219
|
-
|
|
2285
|
+
fs as classes,
|
|
2220
2286
|
Qt as evaluateLocationMatch,
|
|
2221
|
-
|
|
2287
|
+
se as getAbsoluteRect,
|
|
2222
2288
|
Ue as handleAnchorClick,
|
|
2223
|
-
|
|
2224
|
-
|
|
2289
|
+
kt as locationFromURL,
|
|
2290
|
+
cn as makeMutationResource,
|
|
2225
2291
|
jn as makeQueryResource,
|
|
2226
|
-
|
|
2292
|
+
an as matchesKeyCombo,
|
|
2227
2293
|
qn as matchesRoute,
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2294
|
+
ts as nowSignal,
|
|
2295
|
+
Es as relativeTime,
|
|
2296
|
+
ns as relativeTimeMillisSignal,
|
|
2297
|
+
ss as relativeTimeSignal,
|
|
2298
|
+
ks as ticker,
|
|
2299
|
+
es as timeDiffToString,
|
|
2234
2300
|
et as urlFromLocation,
|
|
2235
2301
|
en as useAppearance
|
|
2236
2302
|
};
|