@tempots/ui 9.0.0 → 10.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 +1146 -960
- package/package.json +2 -2
- package/renderables/anchor.d.ts +2 -5
- package/renderables/router/browser-location.d.ts +12 -9
- package/renderables/router/headless-location.d.ts +11 -10
- package/renderables/router/location-data.d.ts +0 -9
- package/renderables/router/location.d.ts +105 -70
- package/renderables/router/navigation-options.d.ts +23 -0
- package/renderables/router/route-info.d.ts +5 -1
package/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { getWindow as
|
|
5
|
-
import { delayed as
|
|
6
|
-
const
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
2
|
+
var De = (t, e, o) => e in t ? Ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var Lt = (t, e, o) => De(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { getWindow as nt, prop as M, makeProviderMark as Nt, Signal as ie, Use as ct, html as Pt, on as ce, Value as k, attr as Vt, Empty as St, OneOfType as ae, WithElement as _, OnDispose as N, Fragment as j, Portal as le, renderableOfTNode as Ht, When as ue, previousSignal as We, effectOf as Fe, computedOf as fe, WithBrowserCtx as Me, Provide as Ne, OneOfTuple as he, Prop as Ve } from "@tempots/dom";
|
|
5
|
+
import { delayed as de, AsyncResult as L, nearEqual as dt, interval as He } from "@tempots/std";
|
|
6
|
+
const $e = (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
|
+
}, ze = (t, e) => {
|
|
12
|
+
const o = $e(e);
|
|
13
13
|
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
for (;
|
|
17
|
-
|
|
18
|
-
if (
|
|
14
|
+
}, Be = (t, e, o, n) => {
|
|
15
|
+
let r = t.target;
|
|
16
|
+
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
17
|
+
r = r.parentElement;
|
|
18
|
+
if (r == null)
|
|
19
19
|
return !0;
|
|
20
|
-
const
|
|
21
|
-
if (t.button !== 0 || t.ctrlKey || t.metaKey ||
|
|
20
|
+
const i = r;
|
|
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:
|
|
23
|
+
const { pathname: s, search: c, hash: a } = i;
|
|
24
24
|
if (n) {
|
|
25
|
-
const l =
|
|
26
|
-
if (!(
|
|
25
|
+
const l = s + c + a, u = i.getAttribute("href");
|
|
26
|
+
if (!(u != null && u.startsWith("#")) && u !== l)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : ze(o, s);
|
|
30
|
+
}, _e = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,140 +36,313 @@ const Fe = (t) => {
|
|
|
36
36
|
(n) => n.startsWith(".") ? n : "." + n
|
|
37
37
|
) : [];
|
|
38
38
|
return (n) => {
|
|
39
|
-
|
|
39
|
+
Be(
|
|
40
40
|
n,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
o,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && n.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
47
|
-
var
|
|
48
|
-
const o = new URL(t, e ?? ((
|
|
49
|
-
let
|
|
50
|
-
return
|
|
46
|
+
}, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Tt = (t, e) => {
|
|
47
|
+
var i, s;
|
|
48
|
+
const o = new URL(t, e ?? ((i = nt()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((s = o.searchParams) == null ? void 0 : s.entries()) ?? []);
|
|
49
|
+
let r = o.hash;
|
|
50
|
+
return r.startsWith("#") && (r = r.substring(1)), {
|
|
51
51
|
pathname: o.pathname,
|
|
52
52
|
search: n,
|
|
53
|
-
hash:
|
|
53
|
+
hash: r === "" ? void 0 : r
|
|
54
54
|
};
|
|
55
|
-
},
|
|
56
|
-
const o = le(e);
|
|
57
|
-
return t.set(o), t;
|
|
58
|
-
}, Pt = (t) => {
|
|
55
|
+
}, pt = (t) => {
|
|
59
56
|
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
60
57
|
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (Be(n.pathname))
|
|
66
|
-
return Pt(n);
|
|
67
|
-
const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
|
|
68
|
-
return Pt({ ...n, pathname: r });
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
return { value: o, dispose: o.dispose };
|
|
72
|
-
}, Ue = () => {
|
|
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;
|
|
58
|
+
}, Ue = (t) => {
|
|
59
|
+
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
60
|
+
}, It = () => {
|
|
61
|
+
const t = nt(), e = (t == null ? void 0 : t.location.hash) ?? "";
|
|
74
62
|
return {
|
|
75
63
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
76
64
|
search: Object.fromEntries(
|
|
77
65
|
new URLSearchParams((t == null ? void 0 : t.location.search) ?? "").entries()
|
|
78
66
|
),
|
|
79
|
-
hash: e
|
|
67
|
+
hash: e.startsWith("#") ? e.substring(1) || void 0 : e === "" ? void 0 : e
|
|
80
68
|
};
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
t.set(
|
|
69
|
+
}, Yt = (t) => {
|
|
70
|
+
if ((t == null ? void 0 : t.scroll) !== "auto")
|
|
71
|
+
return;
|
|
72
|
+
const e = nt();
|
|
73
|
+
e && e.requestAnimationFrame(
|
|
74
|
+
() => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
|
|
75
|
+
);
|
|
76
|
+
}, qt = (t, e) => {
|
|
77
|
+
e != null && e.viewTransition ? Ue(t) : t();
|
|
78
|
+
}, je = () => {
|
|
79
|
+
const t = M(It(), Ke), e = nt(), o = () => {
|
|
80
|
+
t.set(It());
|
|
93
81
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
82
|
+
e == null || e.addEventListener("popstate", o), e == null || e.addEventListener("hashchange", o);
|
|
83
|
+
const n = (a, l, u) => {
|
|
84
|
+
qt(() => {
|
|
85
|
+
if (e) {
|
|
86
|
+
const h = pt(a), p = (l == null ? void 0 : l.state) ?? {};
|
|
87
|
+
u === "replaceState" || l != null && l.replace ? e.history.replaceState(p, "", h) : e.history.pushState(p, "", h);
|
|
88
|
+
}
|
|
89
|
+
t.set(a);
|
|
90
|
+
}, l), Yt(l);
|
|
91
|
+
}, r = (a, l) => {
|
|
92
|
+
qt(() => {
|
|
93
|
+
e == null || e.history.go(a);
|
|
94
|
+
}, l), Yt(l);
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
location: t,
|
|
98
|
+
commit: n,
|
|
99
|
+
go: r,
|
|
100
|
+
back: (a) => r(-1, a),
|
|
101
|
+
forward: (a) => r(1, a),
|
|
102
|
+
resolve: (a) => Tt(a),
|
|
103
|
+
dispose: () => {
|
|
104
|
+
e == null || e.removeEventListener("popstate", o), e == null || e.removeEventListener("hashchange", o), t.dispose();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}, Ie = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ye = (t) => {
|
|
108
|
+
const e = t.container.currentURL, o = e.iso(
|
|
109
|
+
(s) => Tt(s, e.value),
|
|
110
|
+
(s) => {
|
|
111
|
+
if (Ie(s.pathname))
|
|
112
|
+
return pt(s);
|
|
113
|
+
const c = new URL(s.pathname, e.value), a = c.origin + c.pathname;
|
|
114
|
+
return pt({ ...s, pathname: a });
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
return {
|
|
118
|
+
location: o,
|
|
119
|
+
dispose: () => {
|
|
120
|
+
o.dispose();
|
|
121
|
+
},
|
|
122
|
+
commit: (s, c, a) => {
|
|
123
|
+
o.set(s);
|
|
124
|
+
},
|
|
125
|
+
go: (s, c) => {
|
|
126
|
+
},
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
128
|
+
back: (s) => {
|
|
129
|
+
},
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
131
|
+
forward: (s) => {
|
|
132
|
+
},
|
|
133
|
+
resolve: (s) => Tt(s, e.value)
|
|
134
|
+
};
|
|
135
|
+
}, rt = (t) => ({
|
|
136
|
+
pathname: t.pathname,
|
|
137
|
+
search: { ...t.search },
|
|
138
|
+
hash: t.hash ?? void 0
|
|
139
|
+
}), kt = (t) => {
|
|
140
|
+
if (t == null) return;
|
|
141
|
+
const e = `${t}`;
|
|
142
|
+
return e === "" ? void 0 : e;
|
|
143
|
+
}, me = (t, e) => {
|
|
144
|
+
const o = { ...t };
|
|
145
|
+
for (const [n, r] of Object.entries(e))
|
|
146
|
+
r == null ? delete o[n] : o[n] = r;
|
|
147
|
+
return o;
|
|
148
|
+
};
|
|
149
|
+
class qe {
|
|
150
|
+
constructor(e) {
|
|
151
|
+
this.current = e;
|
|
152
|
+
}
|
|
153
|
+
get location() {
|
|
154
|
+
return this.current;
|
|
155
|
+
}
|
|
156
|
+
setLocation(e) {
|
|
157
|
+
return this.current = rt(e), this;
|
|
158
|
+
}
|
|
159
|
+
setPathname(e) {
|
|
160
|
+
return this.current = {
|
|
161
|
+
...this.current,
|
|
162
|
+
pathname: e
|
|
163
|
+
}, this;
|
|
164
|
+
}
|
|
165
|
+
setHash(e) {
|
|
166
|
+
const o = kt(e);
|
|
167
|
+
if (o == null) {
|
|
168
|
+
const { hash: n, ...r } = this.current;
|
|
169
|
+
this.current = r;
|
|
170
|
+
} else
|
|
171
|
+
this.current = {
|
|
172
|
+
...this.current,
|
|
173
|
+
hash: o
|
|
174
|
+
};
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
clearHash() {
|
|
178
|
+
const { hash: e, ...o } = this.current;
|
|
179
|
+
return this.current = o, this;
|
|
180
|
+
}
|
|
181
|
+
setSearch(e) {
|
|
182
|
+
return this.current = {
|
|
183
|
+
...this.current,
|
|
184
|
+
search: me(this.current.search, e)
|
|
185
|
+
}, this;
|
|
186
|
+
}
|
|
187
|
+
setSearchParam(e, o) {
|
|
188
|
+
return this.setSearch({ [e]: o });
|
|
189
|
+
}
|
|
190
|
+
updateSearch(e) {
|
|
191
|
+
return this.current = {
|
|
192
|
+
...this.current,
|
|
193
|
+
search: { ...e({ ...this.current.search }) }
|
|
194
|
+
}, this;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const Xe = (t, e) => t != null && t.replace ? "replaceState" : e, Qe = (t) => {
|
|
198
|
+
const e = t.location, o = e.map(pt), n = e.map((m) => m.pathname), r = e.map((m) => ({ ...m.search })), i = e.map((m) => m.hash), s = (m, b, A) => {
|
|
199
|
+
const E = rt({
|
|
200
|
+
...m,
|
|
201
|
+
hash: kt(m.hash ?? void 0)
|
|
202
|
+
});
|
|
203
|
+
t.commit(E, b, A);
|
|
204
|
+
}, c = (m, b) => {
|
|
205
|
+
const A = Xe(b, "pushState");
|
|
206
|
+
s(m, b, A);
|
|
207
|
+
}, a = (m, b) => {
|
|
208
|
+
const A = m(rt(t.location.value));
|
|
209
|
+
c(A, b);
|
|
210
|
+
}, l = (m, b) => {
|
|
211
|
+
const A = t.resolve(m);
|
|
212
|
+
c(A, b);
|
|
213
|
+
}, u = (m, b) => {
|
|
214
|
+
const A = { ...b, replace: !0 };
|
|
215
|
+
l(m, A);
|
|
216
|
+
}, h = (m, b) => {
|
|
217
|
+
t.go(m, b);
|
|
218
|
+
}, p = (m) => {
|
|
219
|
+
t.back(m);
|
|
220
|
+
}, f = (m) => {
|
|
221
|
+
t.forward(m);
|
|
222
|
+
}, d = (m, b) => a((A) => ({ ...A, pathname: m }), b), w = (m, b) => a((A) => {
|
|
223
|
+
const E = { ...A }, V = kt(m);
|
|
224
|
+
return V == null ? delete E.hash : E.hash = V, E;
|
|
225
|
+
}, b), g = (m) => w(void 0, m), y = (m, b) => a(
|
|
226
|
+
(A) => ({
|
|
227
|
+
...A,
|
|
228
|
+
search: me(A.search, m)
|
|
229
|
+
}),
|
|
230
|
+
b
|
|
231
|
+
);
|
|
232
|
+
return {
|
|
233
|
+
handle: {
|
|
234
|
+
location: e,
|
|
235
|
+
url: o,
|
|
236
|
+
pathname: n,
|
|
237
|
+
search: r,
|
|
238
|
+
hash: i,
|
|
239
|
+
setLocation: c,
|
|
240
|
+
updateLocation: a,
|
|
241
|
+
navigate: l,
|
|
242
|
+
replace: u,
|
|
243
|
+
go: h,
|
|
244
|
+
back: p,
|
|
245
|
+
forward: f,
|
|
246
|
+
setPathname: d,
|
|
247
|
+
setHash: w,
|
|
248
|
+
clearHash: g,
|
|
249
|
+
setSearch: y,
|
|
250
|
+
setSearchParam: (m, b, A) => y({ [m]: b }, A),
|
|
251
|
+
updateSearch: (m, b) => a(
|
|
252
|
+
(A) => ({
|
|
253
|
+
...A,
|
|
254
|
+
search: { ...m({ ...A.search }) }
|
|
255
|
+
}),
|
|
256
|
+
b
|
|
257
|
+
),
|
|
258
|
+
queryParam: (m) => e.map((b) => b.search[m]),
|
|
259
|
+
run: (m, b) => {
|
|
260
|
+
const A = new qe(
|
|
261
|
+
rt(t.location.value)
|
|
262
|
+
);
|
|
263
|
+
m(A), c(rt(A.location), b);
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
dispose: () => {
|
|
267
|
+
t.dispose(), o.dispose(), n.dispose(), r.dispose(), i.dispose();
|
|
268
|
+
}
|
|
101
269
|
};
|
|
102
|
-
},
|
|
103
|
-
|
|
270
|
+
}, Je = (t) => {
|
|
271
|
+
if (t.isBrowser())
|
|
272
|
+
return je();
|
|
273
|
+
if (t.isHeadless())
|
|
274
|
+
return Ye(t);
|
|
275
|
+
throw new Error("Unknown context");
|
|
276
|
+
}, $t = {
|
|
277
|
+
mark: Nt("Location"),
|
|
104
278
|
create: (t, e) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
279
|
+
const o = Je(e), { handle: n, dispose: r } = Qe(o);
|
|
280
|
+
return {
|
|
281
|
+
value: n,
|
|
282
|
+
dispose: r
|
|
283
|
+
};
|
|
110
284
|
}
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}) : Kt(r, L.get(o)), !0), s)
|
|
285
|
+
}, Ge = (t, ...e) => {
|
|
286
|
+
if (typeof t == "string" || ie.is(t))
|
|
287
|
+
return Ge({ href: t }, ...e);
|
|
288
|
+
const { href: o, state: n, scroll: r, viewTransition: i, replace: s, ...c } = t;
|
|
289
|
+
return ct($t, (a) => Pt.a(
|
|
290
|
+
ce.click(
|
|
291
|
+
_e(() => {
|
|
292
|
+
let l = !1;
|
|
293
|
+
const u = {};
|
|
294
|
+
return n !== void 0 && (u.state = n, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), s !== void 0 && (u.replace = s, l = !0), a.navigate(
|
|
295
|
+
k.get(o),
|
|
296
|
+
l ? u : void 0
|
|
297
|
+
), !0;
|
|
298
|
+
}, c)
|
|
126
299
|
),
|
|
127
|
-
|
|
300
|
+
Vt.href(o),
|
|
128
301
|
...e
|
|
129
302
|
/* c8 ignore next 2 */
|
|
130
303
|
));
|
|
131
|
-
},
|
|
132
|
-
mark:
|
|
304
|
+
}, so = {
|
|
305
|
+
mark: Nt("Appearance"),
|
|
133
306
|
create: () => {
|
|
134
|
-
const t =
|
|
307
|
+
const t = Ze();
|
|
135
308
|
return {
|
|
136
309
|
value: t,
|
|
137
310
|
dispose: t.dispose
|
|
138
311
|
};
|
|
139
312
|
}
|
|
140
313
|
};
|
|
141
|
-
function
|
|
142
|
-
const t =
|
|
143
|
-
return e == null || e.addEventListener("change",
|
|
314
|
+
function Ze() {
|
|
315
|
+
const t = nt(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = M(o ? "dark" : "light"), r = (i) => n.set(i.matches ? "dark" : "light");
|
|
316
|
+
return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
|
|
144
317
|
}
|
|
145
|
-
const
|
|
318
|
+
const ge = (t, e) => {
|
|
146
319
|
if (typeof e == "function")
|
|
147
|
-
return
|
|
148
|
-
const o = e.failure ?? ((
|
|
149
|
-
return
|
|
150
|
-
AsyncSuccess: (
|
|
151
|
-
AsyncFailure: (
|
|
152
|
-
Loading: (
|
|
153
|
-
NotAsked:
|
|
320
|
+
return ge(t, { success: e });
|
|
321
|
+
const o = e.failure ?? ((s) => s.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => St), i = e.notAsked ?? (() => St);
|
|
322
|
+
return ae(k.toSignal(t), {
|
|
323
|
+
AsyncSuccess: (s) => n(s.$.value),
|
|
324
|
+
AsyncFailure: (s) => o(s.$.error),
|
|
325
|
+
Loading: (s) => r(s.map((c) => c.previousValue)),
|
|
326
|
+
NotAsked: i
|
|
154
327
|
});
|
|
155
|
-
},
|
|
156
|
-
const o =
|
|
157
|
-
return
|
|
328
|
+
}, ro = (t = 10) => _((e) => N(de(() => e == null ? void 0 : e.focus(), t))), io = (t = 10) => _((e) => {
|
|
329
|
+
const o = de(() => e.select(), t);
|
|
330
|
+
return N(o);
|
|
158
331
|
});
|
|
159
|
-
function
|
|
332
|
+
function co(t) {
|
|
160
333
|
const e = Object.entries(t);
|
|
161
|
-
return
|
|
334
|
+
return j(
|
|
162
335
|
...e.map(
|
|
163
|
-
([o, n]) =>
|
|
336
|
+
([o, n]) => Vt.class(k.map(n, (r) => r ? o : void 0))
|
|
164
337
|
)
|
|
165
338
|
);
|
|
166
339
|
}
|
|
167
|
-
const
|
|
340
|
+
const ao = _((t) => {
|
|
168
341
|
const e = t.style.getPropertyValue(":empty");
|
|
169
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
342
|
+
return t.style.setProperty(":empty", "display:none"), N((o) => {
|
|
170
343
|
o && t.style.setProperty(":empty", e);
|
|
171
344
|
});
|
|
172
|
-
}),
|
|
345
|
+
}), lo = (t) => le("head > title", Vt.innerText(t)), tn = {
|
|
173
346
|
partial: {
|
|
174
347
|
root: null,
|
|
175
348
|
rootMargin: "0px",
|
|
@@ -180,223 +353,223 @@ const to = H((t) => {
|
|
|
180
353
|
rootMargin: "0px",
|
|
181
354
|
threshold: 1
|
|
182
355
|
}
|
|
183
|
-
},
|
|
356
|
+
}, gt = {
|
|
184
357
|
partial: /* @__PURE__ */ new Map(),
|
|
185
358
|
full: /* @__PURE__ */ new Map()
|
|
186
|
-
},
|
|
359
|
+
}, it = {
|
|
187
360
|
partial: null,
|
|
188
361
|
full: null
|
|
189
362
|
};
|
|
190
|
-
function
|
|
191
|
-
return
|
|
363
|
+
function en(t) {
|
|
364
|
+
return it[t] == null && (it[t] = new IntersectionObserver((e) => {
|
|
192
365
|
e.forEach((o) => {
|
|
193
|
-
const n =
|
|
366
|
+
const n = gt[t].get(o.target);
|
|
194
367
|
n == null || n.set(o.isIntersecting);
|
|
195
368
|
});
|
|
196
|
-
},
|
|
197
|
-
}
|
|
198
|
-
const
|
|
199
|
-
const n =
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
function
|
|
369
|
+
}, tn[t])), it[t];
|
|
370
|
+
}
|
|
371
|
+
const nn = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
372
|
+
const n = M(!1);
|
|
373
|
+
return j(
|
|
374
|
+
_((r) => {
|
|
375
|
+
const i = typeof IntersectionObserver < "u" ? en(t) : null;
|
|
376
|
+
gt[t].set(r, n), i == null || i.observe(r);
|
|
377
|
+
function s() {
|
|
205
378
|
var a;
|
|
206
|
-
|
|
379
|
+
i == null || i.unobserve(r), gt[t].delete(r), gt[t].size === 0 && ((a = it[t]) == null || a.disconnect(), it[t] = null);
|
|
207
380
|
}
|
|
208
381
|
let c = null;
|
|
209
382
|
return e && (c = n.on((a) => {
|
|
210
|
-
a &&
|
|
211
|
-
})),
|
|
212
|
-
n.dispose(),
|
|
383
|
+
a && s();
|
|
384
|
+
})), N(() => {
|
|
385
|
+
n.dispose(), s(), c == null || c();
|
|
213
386
|
});
|
|
214
387
|
}),
|
|
215
|
-
|
|
388
|
+
Ht(o(n))
|
|
216
389
|
);
|
|
217
|
-
},
|
|
218
|
-
function
|
|
219
|
-
return
|
|
390
|
+
}, uo = (t, e, o) => nn(t, (n) => ue(n, e, o ?? (() => St)));
|
|
391
|
+
function on(t) {
|
|
392
|
+
return _((e) => {
|
|
220
393
|
const o = (n) => {
|
|
221
394
|
e.contains(n.target) || t(n);
|
|
222
395
|
};
|
|
223
|
-
return document.addEventListener("click", o),
|
|
396
|
+
return document.addEventListener("click", o), N(() => {
|
|
224
397
|
document.removeEventListener("click", o);
|
|
225
398
|
});
|
|
226
399
|
});
|
|
227
400
|
}
|
|
228
|
-
const G = (t, e) => t === void 0 || t === e,
|
|
229
|
-
function
|
|
230
|
-
return typeof t == "string" ? e.key === t :
|
|
401
|
+
const G = (t, e) => t === void 0 || t === e, Xt = (t, e) => t === void 0 || t === e;
|
|
402
|
+
function sn(t, e) {
|
|
403
|
+
return typeof t == "string" ? e.key === t : Xt(t.key, e.key) && Xt(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
404
|
t.commandOrControlKey,
|
|
232
405
|
e.metaKey || e.ctrlKey
|
|
233
406
|
);
|
|
234
407
|
}
|
|
235
|
-
function
|
|
408
|
+
function pe({
|
|
236
409
|
allowedKeys: t,
|
|
237
410
|
handler: e
|
|
238
411
|
}) {
|
|
239
|
-
return
|
|
240
|
-
const n = (
|
|
241
|
-
if (o.contains(
|
|
242
|
-
for (const
|
|
243
|
-
if (
|
|
244
|
-
e(
|
|
412
|
+
return _((o) => {
|
|
413
|
+
const n = (r) => {
|
|
414
|
+
if (o.contains(r.target)) {
|
|
415
|
+
for (const i of t)
|
|
416
|
+
if (sn(i, r)) {
|
|
417
|
+
e(r);
|
|
245
418
|
break;
|
|
246
419
|
}
|
|
247
420
|
}
|
|
248
421
|
};
|
|
249
|
-
return document.addEventListener("keydown", n),
|
|
422
|
+
return document.addEventListener("keydown", n), N(() => {
|
|
250
423
|
document.removeEventListener("keydown", n);
|
|
251
424
|
});
|
|
252
425
|
});
|
|
253
426
|
}
|
|
254
|
-
function
|
|
255
|
-
return
|
|
427
|
+
function fo(t) {
|
|
428
|
+
return pe({ allowedKeys: ["Enter"], handler: t });
|
|
256
429
|
}
|
|
257
|
-
function
|
|
258
|
-
return
|
|
430
|
+
function ho(t) {
|
|
431
|
+
return pe({ allowedKeys: ["Escape"], handler: t });
|
|
259
432
|
}
|
|
260
|
-
const
|
|
433
|
+
const rn = ({
|
|
261
434
|
mutate: t,
|
|
262
435
|
convertError: e,
|
|
263
436
|
onSuccess: o,
|
|
264
437
|
onError: n,
|
|
265
|
-
onSettled:
|
|
438
|
+
onSettled: r
|
|
266
439
|
}) => {
|
|
267
|
-
let
|
|
268
|
-
const
|
|
269
|
-
(
|
|
270
|
-
), a =
|
|
271
|
-
(
|
|
272
|
-
), l =
|
|
273
|
-
|
|
440
|
+
let i;
|
|
441
|
+
const s = M(L.notAsked), c = s.map(
|
|
442
|
+
(d) => L.isSuccess(d) ? d.value : void 0
|
|
443
|
+
), a = s.map(
|
|
444
|
+
(d) => L.isFailure(d) ? d.error : void 0
|
|
445
|
+
), l = s.map((d) => L.isLoading(d)), u = () => {
|
|
446
|
+
i == null || i.abort(), i = void 0;
|
|
274
447
|
};
|
|
275
448
|
return {
|
|
276
|
-
status:
|
|
449
|
+
status: s,
|
|
277
450
|
value: c,
|
|
278
451
|
error: a,
|
|
279
452
|
pending: l,
|
|
280
|
-
execute: async (
|
|
281
|
-
|
|
282
|
-
const
|
|
283
|
-
|
|
453
|
+
execute: async (d, w) => {
|
|
454
|
+
u(), i = new AbortController();
|
|
455
|
+
const g = i.signal, y = s.get(), x = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
|
|
456
|
+
x != null ? s.set(L.loading(x)) : s.set(L.loading(L.getOrUndefined(y)));
|
|
284
457
|
try {
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
} catch (
|
|
288
|
-
|
|
458
|
+
const v = await t({ request: d, abortSignal: g, previous: y });
|
|
459
|
+
i = void 0, s.set(L.success(v)), o == null || o(v, d);
|
|
460
|
+
} catch (v) {
|
|
461
|
+
i = void 0, s.set(L.failure(e(v))), n == null || n(e(v), d);
|
|
289
462
|
}
|
|
290
|
-
|
|
463
|
+
r == null || r(s.get(), d);
|
|
291
464
|
},
|
|
292
|
-
cancel: (
|
|
293
|
-
|
|
465
|
+
cancel: (d) => {
|
|
466
|
+
u(), s.set(d ?? L.notAsked);
|
|
294
467
|
},
|
|
295
468
|
dispose: () => {
|
|
296
|
-
|
|
469
|
+
i == null || i.abort(), i = void 0, s.dispose();
|
|
297
470
|
}
|
|
298
471
|
};
|
|
299
|
-
},
|
|
300
|
-
const { status: o, dispose: n, execute:
|
|
301
|
-
return
|
|
302
|
-
|
|
472
|
+
}, cn = (t, e) => {
|
|
473
|
+
const { status: o, dispose: n, execute: r, cancel: i, pending: s, error: c, value: a } = t, { content: l } = e, u = We(a);
|
|
474
|
+
return j(
|
|
475
|
+
N(n),
|
|
303
476
|
l({
|
|
304
|
-
previous:
|
|
305
|
-
execute:
|
|
306
|
-
cancel:
|
|
307
|
-
pending:
|
|
477
|
+
previous: u,
|
|
478
|
+
execute: r,
|
|
479
|
+
cancel: i,
|
|
480
|
+
pending: s,
|
|
308
481
|
error: c,
|
|
309
482
|
value: a,
|
|
310
483
|
status: o
|
|
311
484
|
})
|
|
312
485
|
);
|
|
313
|
-
},
|
|
486
|
+
}, mo = ({
|
|
314
487
|
mutate: t,
|
|
315
|
-
convertError: e = (
|
|
488
|
+
convertError: e = (s) => s,
|
|
316
489
|
onSuccess: o,
|
|
317
490
|
onError: n,
|
|
318
|
-
onSettled:
|
|
319
|
-
content:
|
|
491
|
+
onSettled: r,
|
|
492
|
+
content: i
|
|
320
493
|
}) => {
|
|
321
|
-
const
|
|
494
|
+
const s = rn({
|
|
322
495
|
mutate: t,
|
|
323
496
|
convertError: e,
|
|
324
497
|
onSuccess: o,
|
|
325
498
|
onError: n,
|
|
326
|
-
onSettled:
|
|
499
|
+
onSettled: r
|
|
327
500
|
});
|
|
328
|
-
return
|
|
329
|
-
}, tt = Math.min,
|
|
501
|
+
return cn(s, { content: i });
|
|
502
|
+
}, tt = Math.min, X = Math.max, wt = Math.round, mt = Math.floor, H = (t) => ({
|
|
330
503
|
x: t,
|
|
331
504
|
y: t
|
|
332
|
-
}),
|
|
505
|
+
}), an = {
|
|
333
506
|
left: "right",
|
|
334
507
|
right: "left",
|
|
335
508
|
bottom: "top",
|
|
336
509
|
top: "bottom"
|
|
337
|
-
},
|
|
510
|
+
}, ln = {
|
|
338
511
|
start: "end",
|
|
339
512
|
end: "start"
|
|
340
513
|
};
|
|
341
|
-
function
|
|
342
|
-
return
|
|
514
|
+
function Ct(t, e, o) {
|
|
515
|
+
return X(t, tt(e, o));
|
|
343
516
|
}
|
|
344
|
-
function
|
|
517
|
+
function ut(t, e) {
|
|
345
518
|
return typeof t == "function" ? t(e) : t;
|
|
346
519
|
}
|
|
347
520
|
function Q(t) {
|
|
348
521
|
return t.split("-")[0];
|
|
349
522
|
}
|
|
350
|
-
function
|
|
523
|
+
function ft(t) {
|
|
351
524
|
return t.split("-")[1];
|
|
352
525
|
}
|
|
353
|
-
function
|
|
526
|
+
function we(t) {
|
|
354
527
|
return t === "x" ? "y" : "x";
|
|
355
528
|
}
|
|
356
|
-
function
|
|
529
|
+
function zt(t) {
|
|
357
530
|
return t === "y" ? "height" : "width";
|
|
358
531
|
}
|
|
359
|
-
function
|
|
532
|
+
function U(t) {
|
|
360
533
|
return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
|
|
361
534
|
}
|
|
362
|
-
function
|
|
363
|
-
return
|
|
535
|
+
function Bt(t) {
|
|
536
|
+
return we(U(t));
|
|
364
537
|
}
|
|
365
|
-
function
|
|
538
|
+
function un(t, e, o) {
|
|
366
539
|
o === void 0 && (o = !1);
|
|
367
|
-
const n =
|
|
368
|
-
let
|
|
369
|
-
return e.reference[
|
|
540
|
+
const n = ft(t), r = Bt(t), i = zt(r);
|
|
541
|
+
let s = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
542
|
+
return e.reference[i] > e.floating[i] && (s = yt(s)), [s, yt(s)];
|
|
370
543
|
}
|
|
371
|
-
function
|
|
372
|
-
const e =
|
|
373
|
-
return [
|
|
544
|
+
function fn(t) {
|
|
545
|
+
const e = yt(t);
|
|
546
|
+
return [Dt(t), e, Dt(e)];
|
|
374
547
|
}
|
|
375
|
-
function
|
|
376
|
-
return t.replace(/start|end/g, (e) =>
|
|
548
|
+
function Dt(t) {
|
|
549
|
+
return t.replace(/start|end/g, (e) => ln[e]);
|
|
377
550
|
}
|
|
378
|
-
function
|
|
379
|
-
const n = ["left", "right"],
|
|
551
|
+
function hn(t, e, o) {
|
|
552
|
+
const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
380
553
|
switch (t) {
|
|
381
554
|
case "top":
|
|
382
555
|
case "bottom":
|
|
383
|
-
return o ? e ?
|
|
556
|
+
return o ? e ? r : n : e ? n : r;
|
|
384
557
|
case "left":
|
|
385
558
|
case "right":
|
|
386
|
-
return e ?
|
|
559
|
+
return e ? i : s;
|
|
387
560
|
default:
|
|
388
561
|
return [];
|
|
389
562
|
}
|
|
390
563
|
}
|
|
391
|
-
function
|
|
392
|
-
const
|
|
393
|
-
let
|
|
394
|
-
return
|
|
564
|
+
function dn(t, e, o, n) {
|
|
565
|
+
const r = ft(t);
|
|
566
|
+
let i = hn(Q(t), o === "start", n);
|
|
567
|
+
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
|
|
395
568
|
}
|
|
396
|
-
function
|
|
397
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
569
|
+
function yt(t) {
|
|
570
|
+
return t.replace(/left|right|bottom|top/g, (e) => an[e]);
|
|
398
571
|
}
|
|
399
|
-
function
|
|
572
|
+
function mn(t) {
|
|
400
573
|
return {
|
|
401
574
|
top: 0,
|
|
402
575
|
right: 0,
|
|
@@ -405,295 +578,295 @@ function rn(t) {
|
|
|
405
578
|
...t
|
|
406
579
|
};
|
|
407
580
|
}
|
|
408
|
-
function
|
|
409
|
-
return typeof t != "number" ?
|
|
581
|
+
function ye(t) {
|
|
582
|
+
return typeof t != "number" ? mn(t) : {
|
|
410
583
|
top: t,
|
|
411
584
|
right: t,
|
|
412
585
|
bottom: t,
|
|
413
586
|
left: t
|
|
414
587
|
};
|
|
415
588
|
}
|
|
416
|
-
function
|
|
589
|
+
function vt(t) {
|
|
417
590
|
const {
|
|
418
591
|
x: e,
|
|
419
592
|
y: o,
|
|
420
593
|
width: n,
|
|
421
|
-
height:
|
|
594
|
+
height: r
|
|
422
595
|
} = t;
|
|
423
596
|
return {
|
|
424
597
|
width: n,
|
|
425
|
-
height:
|
|
598
|
+
height: r,
|
|
426
599
|
top: o,
|
|
427
600
|
left: e,
|
|
428
601
|
right: e + n,
|
|
429
|
-
bottom: o +
|
|
602
|
+
bottom: o + r,
|
|
430
603
|
x: e,
|
|
431
604
|
y: o
|
|
432
605
|
};
|
|
433
606
|
}
|
|
434
|
-
function
|
|
607
|
+
function Qt(t, e, o) {
|
|
435
608
|
let {
|
|
436
609
|
reference: n,
|
|
437
|
-
floating:
|
|
610
|
+
floating: r
|
|
438
611
|
} = t;
|
|
439
|
-
const
|
|
440
|
-
let
|
|
612
|
+
const i = U(e), s = Bt(e), c = zt(s), a = Q(e), l = i === "y", u = n.x + n.width / 2 - r.width / 2, h = n.y + n.height / 2 - r.height / 2, p = n[c] / 2 - r[c] / 2;
|
|
613
|
+
let f;
|
|
441
614
|
switch (a) {
|
|
442
615
|
case "top":
|
|
443
|
-
|
|
444
|
-
x:
|
|
445
|
-
y: n.y -
|
|
616
|
+
f = {
|
|
617
|
+
x: u,
|
|
618
|
+
y: n.y - r.height
|
|
446
619
|
};
|
|
447
620
|
break;
|
|
448
621
|
case "bottom":
|
|
449
|
-
|
|
450
|
-
x:
|
|
622
|
+
f = {
|
|
623
|
+
x: u,
|
|
451
624
|
y: n.y + n.height
|
|
452
625
|
};
|
|
453
626
|
break;
|
|
454
627
|
case "right":
|
|
455
|
-
|
|
628
|
+
f = {
|
|
456
629
|
x: n.x + n.width,
|
|
457
|
-
y:
|
|
630
|
+
y: h
|
|
458
631
|
};
|
|
459
632
|
break;
|
|
460
633
|
case "left":
|
|
461
|
-
|
|
462
|
-
x: n.x -
|
|
463
|
-
y:
|
|
634
|
+
f = {
|
|
635
|
+
x: n.x - r.width,
|
|
636
|
+
y: h
|
|
464
637
|
};
|
|
465
638
|
break;
|
|
466
639
|
default:
|
|
467
|
-
|
|
640
|
+
f = {
|
|
468
641
|
x: n.x,
|
|
469
642
|
y: n.y
|
|
470
643
|
};
|
|
471
644
|
}
|
|
472
|
-
switch (
|
|
645
|
+
switch (ft(e)) {
|
|
473
646
|
case "start":
|
|
474
|
-
|
|
647
|
+
f[s] -= p * (o && l ? -1 : 1);
|
|
475
648
|
break;
|
|
476
649
|
case "end":
|
|
477
|
-
|
|
650
|
+
f[s] += p * (o && l ? -1 : 1);
|
|
478
651
|
break;
|
|
479
652
|
}
|
|
480
|
-
return
|
|
653
|
+
return f;
|
|
481
654
|
}
|
|
482
|
-
const
|
|
655
|
+
const gn = async (t, e, o) => {
|
|
483
656
|
const {
|
|
484
657
|
placement: n = "bottom",
|
|
485
|
-
strategy:
|
|
486
|
-
middleware:
|
|
487
|
-
platform:
|
|
488
|
-
} = o, c =
|
|
489
|
-
let l = await
|
|
658
|
+
strategy: r = "absolute",
|
|
659
|
+
middleware: i = [],
|
|
660
|
+
platform: s
|
|
661
|
+
} = o, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
|
|
662
|
+
let l = await s.getElementRects({
|
|
490
663
|
reference: t,
|
|
491
664
|
floating: e,
|
|
492
|
-
strategy:
|
|
665
|
+
strategy: r
|
|
493
666
|
}), {
|
|
494
|
-
x:
|
|
495
|
-
y:
|
|
496
|
-
} =
|
|
497
|
-
for (let
|
|
667
|
+
x: u,
|
|
668
|
+
y: h
|
|
669
|
+
} = Qt(l, n, a), p = n, f = {}, d = 0;
|
|
670
|
+
for (let w = 0; w < c.length; w++) {
|
|
498
671
|
const {
|
|
499
|
-
name:
|
|
672
|
+
name: g,
|
|
500
673
|
fn: y
|
|
501
|
-
} = c[
|
|
502
|
-
x
|
|
503
|
-
y:
|
|
504
|
-
data:
|
|
505
|
-
reset:
|
|
674
|
+
} = c[w], {
|
|
675
|
+
x,
|
|
676
|
+
y: v,
|
|
677
|
+
data: R,
|
|
678
|
+
reset: O
|
|
506
679
|
} = await y({
|
|
507
|
-
x:
|
|
508
|
-
y:
|
|
680
|
+
x: u,
|
|
681
|
+
y: h,
|
|
509
682
|
initialPlacement: n,
|
|
510
|
-
placement:
|
|
511
|
-
strategy:
|
|
512
|
-
middlewareData:
|
|
683
|
+
placement: p,
|
|
684
|
+
strategy: r,
|
|
685
|
+
middlewareData: f,
|
|
513
686
|
rects: l,
|
|
514
|
-
platform:
|
|
687
|
+
platform: s,
|
|
515
688
|
elements: {
|
|
516
689
|
reference: t,
|
|
517
690
|
floating: e
|
|
518
691
|
}
|
|
519
692
|
});
|
|
520
|
-
|
|
521
|
-
...
|
|
522
|
-
[
|
|
523
|
-
...
|
|
524
|
-
...
|
|
693
|
+
u = x ?? u, h = v ?? h, f = {
|
|
694
|
+
...f,
|
|
695
|
+
[g]: {
|
|
696
|
+
...f[g],
|
|
697
|
+
...R
|
|
525
698
|
}
|
|
526
|
-
},
|
|
699
|
+
}, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (l = O.rects === !0 ? await s.getElementRects({
|
|
527
700
|
reference: t,
|
|
528
701
|
floating: e,
|
|
529
|
-
strategy:
|
|
530
|
-
}) :
|
|
531
|
-
x:
|
|
532
|
-
y:
|
|
533
|
-
} =
|
|
702
|
+
strategy: r
|
|
703
|
+
}) : O.rects), {
|
|
704
|
+
x: u,
|
|
705
|
+
y: h
|
|
706
|
+
} = Qt(l, p, a)), w = -1);
|
|
534
707
|
}
|
|
535
708
|
return {
|
|
536
|
-
x:
|
|
537
|
-
y:
|
|
538
|
-
placement:
|
|
539
|
-
strategy:
|
|
540
|
-
middlewareData:
|
|
709
|
+
x: u,
|
|
710
|
+
y: h,
|
|
711
|
+
placement: p,
|
|
712
|
+
strategy: r,
|
|
713
|
+
middlewareData: f
|
|
541
714
|
};
|
|
542
715
|
};
|
|
543
|
-
async function
|
|
716
|
+
async function ve(t, e) {
|
|
544
717
|
var o;
|
|
545
718
|
e === void 0 && (e = {});
|
|
546
719
|
const {
|
|
547
720
|
x: n,
|
|
548
|
-
y:
|
|
549
|
-
platform:
|
|
550
|
-
rects:
|
|
721
|
+
y: r,
|
|
722
|
+
platform: i,
|
|
723
|
+
rects: s,
|
|
551
724
|
elements: c,
|
|
552
725
|
strategy: a
|
|
553
726
|
} = t, {
|
|
554
727
|
boundary: l = "clippingAncestors",
|
|
555
|
-
rootBoundary:
|
|
556
|
-
elementContext:
|
|
557
|
-
altBoundary:
|
|
558
|
-
padding:
|
|
559
|
-
} =
|
|
560
|
-
element: (o = await (
|
|
728
|
+
rootBoundary: u = "viewport",
|
|
729
|
+
elementContext: h = "floating",
|
|
730
|
+
altBoundary: p = !1,
|
|
731
|
+
padding: f = 0
|
|
732
|
+
} = ut(e, t), d = ye(f), g = c[p ? h === "floating" ? "reference" : "floating" : h], y = vt(await i.getClippingRect({
|
|
733
|
+
element: (o = await (i.isElement == null ? void 0 : i.isElement(g))) == null || o ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
561
734
|
boundary: l,
|
|
562
|
-
rootBoundary:
|
|
735
|
+
rootBoundary: u,
|
|
563
736
|
strategy: a
|
|
564
|
-
})),
|
|
737
|
+
})), x = h === "floating" ? {
|
|
565
738
|
x: n,
|
|
566
|
-
y:
|
|
567
|
-
width:
|
|
568
|
-
height:
|
|
569
|
-
} :
|
|
739
|
+
y: r,
|
|
740
|
+
width: s.floating.width,
|
|
741
|
+
height: s.floating.height
|
|
742
|
+
} : s.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), R = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
570
743
|
x: 1,
|
|
571
744
|
y: 1
|
|
572
745
|
} : {
|
|
573
746
|
x: 1,
|
|
574
747
|
y: 1
|
|
575
|
-
},
|
|
748
|
+
}, O = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
576
749
|
elements: c,
|
|
577
|
-
rect:
|
|
578
|
-
offsetParent:
|
|
750
|
+
rect: x,
|
|
751
|
+
offsetParent: v,
|
|
579
752
|
strategy: a
|
|
580
|
-
}) :
|
|
753
|
+
}) : x);
|
|
581
754
|
return {
|
|
582
|
-
top: (y.top -
|
|
583
|
-
bottom: (
|
|
584
|
-
left: (y.left -
|
|
585
|
-
right: (
|
|
755
|
+
top: (y.top - O.top + d.top) / R.y,
|
|
756
|
+
bottom: (O.bottom - y.bottom + d.bottom) / R.y,
|
|
757
|
+
left: (y.left - O.left + d.left) / R.x,
|
|
758
|
+
right: (O.right - y.right + d.right) / R.x
|
|
586
759
|
};
|
|
587
760
|
}
|
|
588
|
-
const
|
|
761
|
+
const pn = (t) => ({
|
|
589
762
|
name: "arrow",
|
|
590
763
|
options: t,
|
|
591
764
|
async fn(e) {
|
|
592
765
|
const {
|
|
593
766
|
x: o,
|
|
594
767
|
y: n,
|
|
595
|
-
placement:
|
|
596
|
-
rects:
|
|
597
|
-
platform:
|
|
768
|
+
placement: r,
|
|
769
|
+
rects: i,
|
|
770
|
+
platform: s,
|
|
598
771
|
elements: c,
|
|
599
772
|
middlewareData: a
|
|
600
773
|
} = e, {
|
|
601
774
|
element: l,
|
|
602
|
-
padding:
|
|
603
|
-
} =
|
|
775
|
+
padding: u = 0
|
|
776
|
+
} = ut(t, e) || {};
|
|
604
777
|
if (l == null)
|
|
605
778
|
return {};
|
|
606
|
-
const
|
|
779
|
+
const h = ye(u), p = {
|
|
607
780
|
x: o,
|
|
608
781
|
y: n
|
|
609
|
-
},
|
|
610
|
-
let
|
|
611
|
-
(!
|
|
612
|
-
const
|
|
782
|
+
}, f = Bt(r), d = zt(f), w = await s.getDimensions(l), g = f === "y", y = g ? "top" : "left", x = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], O = p[f] - i.reference[f], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
783
|
+
let m = T ? T[v] : 0;
|
|
784
|
+
(!m || !await (s.isElement == null ? void 0 : s.isElement(T))) && (m = c.floating[v] || i.floating[d]);
|
|
785
|
+
const b = R / 2 - O / 2, A = m / 2 - w[d] / 2 - 1, E = tt(h[y], A), V = tt(h[x], A), Y = E, st = m - w[d] - V, P = m / 2 - w[d] / 2 + b, q = Ct(Y, P, st), B = !a.arrow && ft(r) != null && P !== q && i.reference[d] / 2 - (P < Y ? E : V) - w[d] / 2 < 0, C = B ? P < Y ? P - Y : P - st : 0;
|
|
613
786
|
return {
|
|
614
|
-
[
|
|
787
|
+
[f]: p[f] + C,
|
|
615
788
|
data: {
|
|
616
|
-
[
|
|
617
|
-
centerOffset:
|
|
789
|
+
[f]: q,
|
|
790
|
+
centerOffset: P - q - C,
|
|
618
791
|
...B && {
|
|
619
|
-
alignmentOffset:
|
|
792
|
+
alignmentOffset: C
|
|
620
793
|
}
|
|
621
794
|
},
|
|
622
795
|
reset: B
|
|
623
796
|
};
|
|
624
797
|
}
|
|
625
|
-
}),
|
|
798
|
+
}), wn = function(t) {
|
|
626
799
|
return t === void 0 && (t = {}), {
|
|
627
800
|
name: "flip",
|
|
628
801
|
options: t,
|
|
629
802
|
async fn(e) {
|
|
630
803
|
var o, n;
|
|
631
804
|
const {
|
|
632
|
-
placement:
|
|
633
|
-
middlewareData:
|
|
634
|
-
rects:
|
|
805
|
+
placement: r,
|
|
806
|
+
middlewareData: i,
|
|
807
|
+
rects: s,
|
|
635
808
|
initialPlacement: c,
|
|
636
809
|
platform: a,
|
|
637
810
|
elements: l
|
|
638
811
|
} = e, {
|
|
639
|
-
mainAxis:
|
|
640
|
-
crossAxis:
|
|
641
|
-
fallbackPlacements:
|
|
642
|
-
fallbackStrategy:
|
|
643
|
-
fallbackAxisSideDirection:
|
|
644
|
-
flipAlignment:
|
|
645
|
-
...
|
|
646
|
-
} =
|
|
647
|
-
if ((o =
|
|
812
|
+
mainAxis: u = !0,
|
|
813
|
+
crossAxis: h = !0,
|
|
814
|
+
fallbackPlacements: p,
|
|
815
|
+
fallbackStrategy: f = "bestFit",
|
|
816
|
+
fallbackAxisSideDirection: d = "none",
|
|
817
|
+
flipAlignment: w = !0,
|
|
818
|
+
...g
|
|
819
|
+
} = ut(t, e);
|
|
820
|
+
if ((o = i.arrow) != null && o.alignmentOffset)
|
|
648
821
|
return {};
|
|
649
|
-
const y = Q(
|
|
650
|
-
!
|
|
651
|
-
const
|
|
652
|
-
let
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
|
|
822
|
+
const y = Q(r), x = U(c), v = Q(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (v || !w ? [yt(c)] : fn(c)), T = d !== "none";
|
|
823
|
+
!p && T && O.push(...dn(c, w, d, R));
|
|
824
|
+
const m = [c, ...O], b = await ve(e, g), A = [];
|
|
825
|
+
let E = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
826
|
+
if (u && A.push(b[y]), h) {
|
|
827
|
+
const P = un(r, s, R);
|
|
828
|
+
A.push(b[P[0]], b[P[1]]);
|
|
656
829
|
}
|
|
657
|
-
if (
|
|
658
|
-
placement:
|
|
659
|
-
overflows:
|
|
660
|
-
}],
|
|
661
|
-
var
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
830
|
+
if (E = [...E, {
|
|
831
|
+
placement: r,
|
|
832
|
+
overflows: A
|
|
833
|
+
}], !A.every((P) => P <= 0)) {
|
|
834
|
+
var V, Y;
|
|
835
|
+
const P = (((V = i.flip) == null ? void 0 : V.index) || 0) + 1, q = m[P];
|
|
836
|
+
if (q && (!(h === "alignment" ? x !== U(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
664
837
|
// overflows the main axis.
|
|
665
|
-
|
|
838
|
+
E.every((D) => D.overflows[0] > 0 && U(D.placement) === x)))
|
|
666
839
|
return {
|
|
667
840
|
data: {
|
|
668
|
-
index:
|
|
669
|
-
overflows:
|
|
841
|
+
index: P,
|
|
842
|
+
overflows: E
|
|
670
843
|
},
|
|
671
844
|
reset: {
|
|
672
|
-
placement:
|
|
845
|
+
placement: q
|
|
673
846
|
}
|
|
674
847
|
};
|
|
675
|
-
let B = (Y =
|
|
848
|
+
let B = (Y = E.filter((C) => C.overflows[0] <= 0).sort((C, D) => C.overflows[1] - D.overflows[1])[0]) == null ? void 0 : Y.placement;
|
|
676
849
|
if (!B)
|
|
677
|
-
switch (
|
|
850
|
+
switch (f) {
|
|
678
851
|
case "bestFit": {
|
|
679
|
-
var
|
|
680
|
-
const
|
|
681
|
-
if (
|
|
682
|
-
const
|
|
683
|
-
return
|
|
852
|
+
var st;
|
|
853
|
+
const C = (st = E.filter((D) => {
|
|
854
|
+
if (T) {
|
|
855
|
+
const K = U(D.placement);
|
|
856
|
+
return K === x || // Create a bias to the `y` side axis due to horizontal
|
|
684
857
|
// reading directions favoring greater width.
|
|
685
|
-
|
|
858
|
+
K === "y";
|
|
686
859
|
}
|
|
687
860
|
return !0;
|
|
688
|
-
}).map((
|
|
689
|
-
|
|
861
|
+
}).map((D) => [D.placement, D.overflows.filter((K) => K > 0).reduce((K, ke) => K + ke, 0)]).sort((D, K) => D[1] - K[1])[0]) == null ? void 0 : st[0];
|
|
862
|
+
C && (B = C);
|
|
690
863
|
break;
|
|
691
864
|
}
|
|
692
865
|
case "initialPlacement":
|
|
693
866
|
B = c;
|
|
694
867
|
break;
|
|
695
868
|
}
|
|
696
|
-
if (
|
|
869
|
+
if (r !== B)
|
|
697
870
|
return {
|
|
698
871
|
reset: {
|
|
699
872
|
placement: B
|
|
@@ -704,56 +877,56 @@ const an = (t) => ({
|
|
|
704
877
|
}
|
|
705
878
|
};
|
|
706
879
|
};
|
|
707
|
-
async function
|
|
880
|
+
async function yn(t, e) {
|
|
708
881
|
const {
|
|
709
882
|
placement: o,
|
|
710
883
|
platform: n,
|
|
711
|
-
elements:
|
|
712
|
-
} = t,
|
|
884
|
+
elements: r
|
|
885
|
+
} = t, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), s = Q(o), c = ft(o), a = U(o) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = i && a ? -1 : 1, h = ut(e, t);
|
|
713
886
|
let {
|
|
714
|
-
mainAxis:
|
|
715
|
-
crossAxis:
|
|
716
|
-
alignmentAxis:
|
|
717
|
-
} = typeof
|
|
718
|
-
mainAxis:
|
|
887
|
+
mainAxis: p,
|
|
888
|
+
crossAxis: f,
|
|
889
|
+
alignmentAxis: d
|
|
890
|
+
} = typeof h == "number" ? {
|
|
891
|
+
mainAxis: h,
|
|
719
892
|
crossAxis: 0,
|
|
720
893
|
alignmentAxis: null
|
|
721
894
|
} : {
|
|
722
|
-
mainAxis:
|
|
723
|
-
crossAxis:
|
|
724
|
-
alignmentAxis:
|
|
895
|
+
mainAxis: h.mainAxis || 0,
|
|
896
|
+
crossAxis: h.crossAxis || 0,
|
|
897
|
+
alignmentAxis: h.alignmentAxis
|
|
725
898
|
};
|
|
726
|
-
return c && typeof
|
|
727
|
-
x:
|
|
728
|
-
y:
|
|
899
|
+
return c && typeof d == "number" && (f = c === "end" ? d * -1 : d), a ? {
|
|
900
|
+
x: f * u,
|
|
901
|
+
y: p * l
|
|
729
902
|
} : {
|
|
730
|
-
x:
|
|
731
|
-
y:
|
|
903
|
+
x: p * l,
|
|
904
|
+
y: f * u
|
|
732
905
|
};
|
|
733
906
|
}
|
|
734
|
-
const
|
|
907
|
+
const vn = function(t) {
|
|
735
908
|
return t === void 0 && (t = 0), {
|
|
736
909
|
name: "offset",
|
|
737
910
|
options: t,
|
|
738
911
|
async fn(e) {
|
|
739
912
|
var o, n;
|
|
740
913
|
const {
|
|
741
|
-
x:
|
|
742
|
-
y:
|
|
743
|
-
placement:
|
|
914
|
+
x: r,
|
|
915
|
+
y: i,
|
|
916
|
+
placement: s,
|
|
744
917
|
middlewareData: c
|
|
745
|
-
} = e, a = await
|
|
746
|
-
return
|
|
747
|
-
x:
|
|
748
|
-
y:
|
|
918
|
+
} = e, a = await yn(e, t);
|
|
919
|
+
return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
920
|
+
x: r + a.x,
|
|
921
|
+
y: i + a.y,
|
|
749
922
|
data: {
|
|
750
923
|
...a,
|
|
751
|
-
placement:
|
|
924
|
+
placement: s
|
|
752
925
|
}
|
|
753
926
|
};
|
|
754
927
|
}
|
|
755
928
|
};
|
|
756
|
-
},
|
|
929
|
+
}, xn = function(t) {
|
|
757
930
|
return t === void 0 && (t = {}), {
|
|
758
931
|
name: "shift",
|
|
759
932
|
options: t,
|
|
@@ -761,94 +934,94 @@ const fn = function(t) {
|
|
|
761
934
|
const {
|
|
762
935
|
x: o,
|
|
763
936
|
y: n,
|
|
764
|
-
placement:
|
|
937
|
+
placement: r
|
|
765
938
|
} = e, {
|
|
766
|
-
mainAxis:
|
|
767
|
-
crossAxis:
|
|
939
|
+
mainAxis: i = !0,
|
|
940
|
+
crossAxis: s = !1,
|
|
768
941
|
limiter: c = {
|
|
769
|
-
fn: (
|
|
942
|
+
fn: (g) => {
|
|
770
943
|
let {
|
|
771
944
|
x: y,
|
|
772
|
-
y:
|
|
773
|
-
} =
|
|
945
|
+
y: x
|
|
946
|
+
} = g;
|
|
774
947
|
return {
|
|
775
948
|
x: y,
|
|
776
|
-
y:
|
|
949
|
+
y: x
|
|
777
950
|
};
|
|
778
951
|
}
|
|
779
952
|
},
|
|
780
953
|
...a
|
|
781
|
-
} =
|
|
954
|
+
} = ut(t, e), l = {
|
|
782
955
|
x: o,
|
|
783
956
|
y: n
|
|
784
|
-
},
|
|
785
|
-
let
|
|
786
|
-
if (r) {
|
|
787
|
-
const m = g === "y" ? "top" : "left", y = g === "y" ? "bottom" : "right", v = u + f[m], w = u - f[y];
|
|
788
|
-
u = Tt(v, u, w);
|
|
789
|
-
}
|
|
957
|
+
}, u = await ve(e, a), h = U(Q(r)), p = we(h);
|
|
958
|
+
let f = l[p], d = l[h];
|
|
790
959
|
if (i) {
|
|
791
|
-
const
|
|
792
|
-
|
|
960
|
+
const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", x = f + u[g], v = f - u[y];
|
|
961
|
+
f = Ct(x, f, v);
|
|
962
|
+
}
|
|
963
|
+
if (s) {
|
|
964
|
+
const g = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = d + u[g], v = d - u[y];
|
|
965
|
+
d = Ct(x, d, v);
|
|
793
966
|
}
|
|
794
|
-
const
|
|
967
|
+
const w = c.fn({
|
|
795
968
|
...e,
|
|
796
|
-
[
|
|
797
|
-
[
|
|
969
|
+
[p]: f,
|
|
970
|
+
[h]: d
|
|
798
971
|
});
|
|
799
972
|
return {
|
|
800
|
-
...
|
|
973
|
+
...w,
|
|
801
974
|
data: {
|
|
802
|
-
x:
|
|
803
|
-
y:
|
|
975
|
+
x: w.x - o,
|
|
976
|
+
y: w.y - n,
|
|
804
977
|
enabled: {
|
|
805
|
-
[
|
|
806
|
-
[
|
|
978
|
+
[p]: i,
|
|
979
|
+
[h]: s
|
|
807
980
|
}
|
|
808
981
|
}
|
|
809
982
|
};
|
|
810
983
|
}
|
|
811
984
|
};
|
|
812
985
|
};
|
|
813
|
-
function
|
|
986
|
+
function bt() {
|
|
814
987
|
return typeof window < "u";
|
|
815
988
|
}
|
|
816
|
-
function
|
|
817
|
-
return
|
|
989
|
+
function ot(t) {
|
|
990
|
+
return xe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
818
991
|
}
|
|
819
|
-
function
|
|
992
|
+
function S(t) {
|
|
820
993
|
var e;
|
|
821
994
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
822
995
|
}
|
|
823
|
-
function
|
|
996
|
+
function z(t) {
|
|
824
997
|
var e;
|
|
825
|
-
return (e = (
|
|
998
|
+
return (e = (xe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
826
999
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
1000
|
+
function xe(t) {
|
|
1001
|
+
return bt() ? t instanceof Node || t instanceof S(t).Node : !1;
|
|
829
1002
|
}
|
|
830
|
-
function
|
|
831
|
-
return
|
|
1003
|
+
function W(t) {
|
|
1004
|
+
return bt() ? t instanceof Element || t instanceof S(t).Element : !1;
|
|
832
1005
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
1006
|
+
function $(t) {
|
|
1007
|
+
return bt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
|
|
835
1008
|
}
|
|
836
|
-
function
|
|
837
|
-
return !
|
|
1009
|
+
function Jt(t) {
|
|
1010
|
+
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
838
1011
|
}
|
|
839
|
-
function
|
|
1012
|
+
function ht(t) {
|
|
840
1013
|
const {
|
|
841
1014
|
overflow: e,
|
|
842
1015
|
overflowX: o,
|
|
843
1016
|
overflowY: n,
|
|
844
|
-
display:
|
|
845
|
-
} =
|
|
846
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(
|
|
1017
|
+
display: r
|
|
1018
|
+
} = F(t);
|
|
1019
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
|
|
847
1020
|
}
|
|
848
|
-
function
|
|
849
|
-
return ["table", "td", "th"].includes(
|
|
1021
|
+
function bn(t) {
|
|
1022
|
+
return ["table", "td", "th"].includes(ot(t));
|
|
850
1023
|
}
|
|
851
|
-
function
|
|
1024
|
+
function At(t) {
|
|
852
1025
|
return [":popover-open", ":modal"].some((e) => {
|
|
853
1026
|
try {
|
|
854
1027
|
return t.matches(e);
|
|
@@ -857,32 +1030,32 @@ function xt(t) {
|
|
|
857
1030
|
}
|
|
858
1031
|
});
|
|
859
1032
|
}
|
|
860
|
-
function
|
|
861
|
-
const e =
|
|
1033
|
+
function _t(t) {
|
|
1034
|
+
const e = Kt(), o = W(t) ? F(t) : t;
|
|
862
1035
|
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));
|
|
863
1036
|
}
|
|
864
|
-
function
|
|
865
|
-
let e =
|
|
866
|
-
for (;
|
|
867
|
-
if (
|
|
1037
|
+
function An(t) {
|
|
1038
|
+
let e = I(t);
|
|
1039
|
+
for (; $(e) && !et(e); ) {
|
|
1040
|
+
if (_t(e))
|
|
868
1041
|
return e;
|
|
869
|
-
if (
|
|
1042
|
+
if (At(e))
|
|
870
1043
|
return null;
|
|
871
|
-
e =
|
|
1044
|
+
e = I(e);
|
|
872
1045
|
}
|
|
873
1046
|
return null;
|
|
874
1047
|
}
|
|
875
|
-
function
|
|
1048
|
+
function Kt() {
|
|
876
1049
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
877
1050
|
}
|
|
878
1051
|
function et(t) {
|
|
879
|
-
return ["html", "body", "#document"].includes(
|
|
1052
|
+
return ["html", "body", "#document"].includes(ot(t));
|
|
880
1053
|
}
|
|
881
|
-
function
|
|
882
|
-
return
|
|
1054
|
+
function F(t) {
|
|
1055
|
+
return S(t).getComputedStyle(t);
|
|
883
1056
|
}
|
|
884
|
-
function
|
|
885
|
-
return
|
|
1057
|
+
function Ot(t) {
|
|
1058
|
+
return W(t) ? {
|
|
886
1059
|
scrollLeft: t.scrollLeft,
|
|
887
1060
|
scrollTop: t.scrollTop
|
|
888
1061
|
} : {
|
|
@@ -890,223 +1063,223 @@ function bt(t) {
|
|
|
890
1063
|
scrollTop: t.scrollY
|
|
891
1064
|
};
|
|
892
1065
|
}
|
|
893
|
-
function
|
|
894
|
-
if (
|
|
1066
|
+
function I(t) {
|
|
1067
|
+
if (ot(t) === "html")
|
|
895
1068
|
return t;
|
|
896
1069
|
const e = (
|
|
897
1070
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
898
1071
|
t.assignedSlot || // DOM Element detected.
|
|
899
1072
|
t.parentNode || // ShadowRoot detected.
|
|
900
|
-
|
|
901
|
-
|
|
1073
|
+
Jt(t) && t.host || // Fallback.
|
|
1074
|
+
z(t)
|
|
902
1075
|
);
|
|
903
|
-
return
|
|
1076
|
+
return Jt(e) ? e.host : e;
|
|
904
1077
|
}
|
|
905
|
-
function
|
|
906
|
-
const e =
|
|
907
|
-
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body :
|
|
1078
|
+
function be(t) {
|
|
1079
|
+
const e = I(t);
|
|
1080
|
+
return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && ht(e) ? e : be(e);
|
|
908
1081
|
}
|
|
909
|
-
function
|
|
1082
|
+
function at(t, e, o) {
|
|
910
1083
|
var n;
|
|
911
1084
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
912
|
-
const
|
|
913
|
-
if (
|
|
914
|
-
const c =
|
|
915
|
-
return e.concat(
|
|
1085
|
+
const r = be(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), s = S(r);
|
|
1086
|
+
if (i) {
|
|
1087
|
+
const c = Wt(s);
|
|
1088
|
+
return e.concat(s, s.visualViewport || [], ht(r) ? r : [], c && o ? at(c) : []);
|
|
916
1089
|
}
|
|
917
|
-
return e.concat(
|
|
1090
|
+
return e.concat(r, at(r, [], o));
|
|
918
1091
|
}
|
|
919
|
-
function
|
|
1092
|
+
function Wt(t) {
|
|
920
1093
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
921
1094
|
}
|
|
922
|
-
function
|
|
923
|
-
const e =
|
|
1095
|
+
function Ae(t) {
|
|
1096
|
+
const e = F(t);
|
|
924
1097
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
925
|
-
const
|
|
926
|
-
return c && (o =
|
|
1098
|
+
const r = $(t), i = r ? t.offsetWidth : o, s = r ? t.offsetHeight : n, c = wt(o) !== i || wt(n) !== s;
|
|
1099
|
+
return c && (o = i, n = s), {
|
|
927
1100
|
width: o,
|
|
928
1101
|
height: n,
|
|
929
1102
|
$: c
|
|
930
1103
|
};
|
|
931
1104
|
}
|
|
932
1105
|
function Ut(t) {
|
|
933
|
-
return
|
|
1106
|
+
return W(t) ? t : t.contextElement;
|
|
934
1107
|
}
|
|
935
1108
|
function Z(t) {
|
|
936
1109
|
const e = Ut(t);
|
|
937
|
-
if (
|
|
938
|
-
return
|
|
1110
|
+
if (!$(e))
|
|
1111
|
+
return H(1);
|
|
939
1112
|
const o = e.getBoundingClientRect(), {
|
|
940
1113
|
width: n,
|
|
941
|
-
height:
|
|
942
|
-
$:
|
|
943
|
-
} =
|
|
944
|
-
let
|
|
945
|
-
return (!
|
|
946
|
-
x:
|
|
1114
|
+
height: r,
|
|
1115
|
+
$: i
|
|
1116
|
+
} = Ae(e);
|
|
1117
|
+
let s = (i ? wt(o.width) : o.width) / n, c = (i ? wt(o.height) : o.height) / r;
|
|
1118
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1119
|
+
x: s,
|
|
947
1120
|
y: c
|
|
948
1121
|
};
|
|
949
1122
|
}
|
|
950
|
-
const
|
|
951
|
-
function
|
|
952
|
-
const e =
|
|
953
|
-
return !
|
|
1123
|
+
const On = /* @__PURE__ */ H(0);
|
|
1124
|
+
function Oe(t) {
|
|
1125
|
+
const e = S(t);
|
|
1126
|
+
return !Kt() || !e.visualViewport ? On : {
|
|
954
1127
|
x: e.visualViewport.offsetLeft,
|
|
955
1128
|
y: e.visualViewport.offsetTop
|
|
956
1129
|
};
|
|
957
1130
|
}
|
|
958
|
-
function
|
|
959
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
1131
|
+
function Rn(t, e, o) {
|
|
1132
|
+
return e === void 0 && (e = !1), !o || e && o !== S(t) ? !1 : e;
|
|
960
1133
|
}
|
|
961
1134
|
function J(t, e, o, n) {
|
|
962
1135
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
963
|
-
const
|
|
964
|
-
let
|
|
965
|
-
e && (n ?
|
|
966
|
-
const c =
|
|
967
|
-
let a = (
|
|
968
|
-
if (
|
|
969
|
-
const
|
|
970
|
-
let
|
|
971
|
-
for (;
|
|
972
|
-
const
|
|
973
|
-
a *=
|
|
1136
|
+
const r = t.getBoundingClientRect(), i = Ut(t);
|
|
1137
|
+
let s = H(1);
|
|
1138
|
+
e && (n ? W(n) && (s = Z(n)) : s = Z(t));
|
|
1139
|
+
const c = Rn(i, o, n) ? Oe(i) : H(0);
|
|
1140
|
+
let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, u = r.width / s.x, h = r.height / s.y;
|
|
1141
|
+
if (i) {
|
|
1142
|
+
const p = S(i), f = n && W(n) ? S(n) : n;
|
|
1143
|
+
let d = p, w = Wt(d);
|
|
1144
|
+
for (; w && n && f !== d; ) {
|
|
1145
|
+
const g = Z(w), y = w.getBoundingClientRect(), x = F(w), v = y.left + (w.clientLeft + parseFloat(x.paddingLeft)) * g.x, R = y.top + (w.clientTop + parseFloat(x.paddingTop)) * g.y;
|
|
1146
|
+
a *= g.x, l *= g.y, u *= g.x, h *= g.y, a += v, l += R, d = S(w), w = Wt(d);
|
|
974
1147
|
}
|
|
975
1148
|
}
|
|
976
|
-
return
|
|
977
|
-
width:
|
|
978
|
-
height:
|
|
1149
|
+
return vt({
|
|
1150
|
+
width: u,
|
|
1151
|
+
height: h,
|
|
979
1152
|
x: a,
|
|
980
1153
|
y: l
|
|
981
1154
|
});
|
|
982
1155
|
}
|
|
983
|
-
function
|
|
984
|
-
const o =
|
|
985
|
-
return e ? e.left + o : J(
|
|
1156
|
+
function jt(t, e) {
|
|
1157
|
+
const o = Ot(t).scrollLeft;
|
|
1158
|
+
return e ? e.left + o : J(z(t)).left + o;
|
|
986
1159
|
}
|
|
987
|
-
function
|
|
1160
|
+
function Re(t, e, o) {
|
|
988
1161
|
o === void 0 && (o = !1);
|
|
989
|
-
const n = t.getBoundingClientRect(),
|
|
1162
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
|
|
990
1163
|
// RTL <body> scrollbar.
|
|
991
|
-
|
|
992
|
-
)),
|
|
1164
|
+
jt(t, n)
|
|
1165
|
+
)), i = n.top + e.scrollTop;
|
|
993
1166
|
return {
|
|
994
|
-
x:
|
|
995
|
-
y:
|
|
1167
|
+
x: r,
|
|
1168
|
+
y: i
|
|
996
1169
|
};
|
|
997
1170
|
}
|
|
998
|
-
function
|
|
1171
|
+
function Ln(t) {
|
|
999
1172
|
let {
|
|
1000
1173
|
elements: e,
|
|
1001
1174
|
rect: o,
|
|
1002
1175
|
offsetParent: n,
|
|
1003
|
-
strategy:
|
|
1176
|
+
strategy: r
|
|
1004
1177
|
} = t;
|
|
1005
|
-
const
|
|
1006
|
-
if (n ===
|
|
1178
|
+
const i = r === "fixed", s = z(n), c = e ? At(e.floating) : !1;
|
|
1179
|
+
if (n === s || c && i)
|
|
1007
1180
|
return o;
|
|
1008
1181
|
let a = {
|
|
1009
1182
|
scrollLeft: 0,
|
|
1010
1183
|
scrollTop: 0
|
|
1011
|
-
}, l =
|
|
1012
|
-
const
|
|
1013
|
-
if ((
|
|
1014
|
-
const
|
|
1015
|
-
l = Z(n),
|
|
1184
|
+
}, l = H(1);
|
|
1185
|
+
const u = H(0), h = $(n);
|
|
1186
|
+
if ((h || !h && !i) && ((ot(n) !== "body" || ht(s)) && (a = Ot(n)), $(n))) {
|
|
1187
|
+
const f = J(n);
|
|
1188
|
+
l = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
|
|
1016
1189
|
}
|
|
1017
|
-
const
|
|
1190
|
+
const p = s && !h && !i ? Re(s, a, !0) : H(0);
|
|
1018
1191
|
return {
|
|
1019
1192
|
width: o.width * l.x,
|
|
1020
1193
|
height: o.height * l.y,
|
|
1021
|
-
x: o.x * l.x - a.scrollLeft * l.x +
|
|
1022
|
-
y: o.y * l.y - a.scrollTop * l.y +
|
|
1194
|
+
x: o.x * l.x - a.scrollLeft * l.x + u.x + p.x,
|
|
1195
|
+
y: o.y * l.y - a.scrollTop * l.y + u.y + p.y
|
|
1023
1196
|
};
|
|
1024
1197
|
}
|
|
1025
|
-
function
|
|
1198
|
+
function En(t) {
|
|
1026
1199
|
return Array.from(t.getClientRects());
|
|
1027
1200
|
}
|
|
1028
|
-
function
|
|
1029
|
-
const e =
|
|
1030
|
-
let
|
|
1201
|
+
function Pn(t) {
|
|
1202
|
+
const e = z(t), o = Ot(t), n = t.ownerDocument.body, r = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1203
|
+
let s = -o.scrollLeft + jt(t);
|
|
1031
1204
|
const c = -o.scrollTop;
|
|
1032
|
-
return
|
|
1033
|
-
width:
|
|
1034
|
-
height:
|
|
1035
|
-
x:
|
|
1205
|
+
return F(n).direction === "rtl" && (s += X(e.clientWidth, n.clientWidth) - r), {
|
|
1206
|
+
width: r,
|
|
1207
|
+
height: i,
|
|
1208
|
+
x: s,
|
|
1036
1209
|
y: c
|
|
1037
1210
|
};
|
|
1038
1211
|
}
|
|
1039
|
-
function
|
|
1040
|
-
const o =
|
|
1041
|
-
let
|
|
1042
|
-
if (
|
|
1043
|
-
|
|
1044
|
-
const l =
|
|
1045
|
-
(!l || l && e === "fixed") && (c =
|
|
1212
|
+
function Sn(t, e) {
|
|
1213
|
+
const o = S(t), n = z(t), r = o.visualViewport;
|
|
1214
|
+
let i = n.clientWidth, s = n.clientHeight, c = 0, a = 0;
|
|
1215
|
+
if (r) {
|
|
1216
|
+
i = r.width, s = r.height;
|
|
1217
|
+
const l = Kt();
|
|
1218
|
+
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
1046
1219
|
}
|
|
1047
1220
|
return {
|
|
1048
|
-
width:
|
|
1049
|
-
height:
|
|
1221
|
+
width: i,
|
|
1222
|
+
height: s,
|
|
1050
1223
|
x: c,
|
|
1051
1224
|
y: a
|
|
1052
1225
|
};
|
|
1053
1226
|
}
|
|
1054
|
-
function
|
|
1055
|
-
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop,
|
|
1227
|
+
function Tn(t, e) {
|
|
1228
|
+
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, i = $(t) ? Z(t) : H(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = n * i.y;
|
|
1056
1229
|
return {
|
|
1057
|
-
width:
|
|
1230
|
+
width: s,
|
|
1058
1231
|
height: c,
|
|
1059
1232
|
x: a,
|
|
1060
1233
|
y: l
|
|
1061
1234
|
};
|
|
1062
1235
|
}
|
|
1063
|
-
function
|
|
1236
|
+
function Gt(t, e, o) {
|
|
1064
1237
|
let n;
|
|
1065
1238
|
if (e === "viewport")
|
|
1066
|
-
n =
|
|
1239
|
+
n = Sn(t, o);
|
|
1067
1240
|
else if (e === "document")
|
|
1068
|
-
n =
|
|
1069
|
-
else if (
|
|
1070
|
-
n =
|
|
1241
|
+
n = Pn(z(t));
|
|
1242
|
+
else if (W(e))
|
|
1243
|
+
n = Tn(e, o);
|
|
1071
1244
|
else {
|
|
1072
|
-
const
|
|
1245
|
+
const r = Oe(t);
|
|
1073
1246
|
n = {
|
|
1074
|
-
x: e.x -
|
|
1075
|
-
y: e.y -
|
|
1247
|
+
x: e.x - r.x,
|
|
1248
|
+
y: e.y - r.y,
|
|
1076
1249
|
width: e.width,
|
|
1077
1250
|
height: e.height
|
|
1078
1251
|
};
|
|
1079
1252
|
}
|
|
1080
|
-
return
|
|
1253
|
+
return vt(n);
|
|
1081
1254
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const o =
|
|
1084
|
-
return o === e || !
|
|
1255
|
+
function Le(t, e) {
|
|
1256
|
+
const o = I(t);
|
|
1257
|
+
return o === e || !W(o) || et(o) ? !1 : F(o).position === "fixed" || Le(o, e);
|
|
1085
1258
|
}
|
|
1086
|
-
function
|
|
1259
|
+
function kn(t, e) {
|
|
1087
1260
|
const o = e.get(t);
|
|
1088
1261
|
if (o)
|
|
1089
1262
|
return o;
|
|
1090
|
-
let n =
|
|
1091
|
-
const
|
|
1092
|
-
let
|
|
1093
|
-
for (;
|
|
1094
|
-
const c =
|
|
1095
|
-
!a && c.position === "fixed" && (
|
|
1263
|
+
let n = at(t, [], !1).filter((c) => W(c) && ot(c) !== "body"), r = null;
|
|
1264
|
+
const i = F(t).position === "fixed";
|
|
1265
|
+
let s = i ? I(t) : t;
|
|
1266
|
+
for (; W(s) && !et(s); ) {
|
|
1267
|
+
const c = F(s), a = _t(s);
|
|
1268
|
+
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ht(s) && !a && Le(t, s)) ? n = n.filter((u) => u !== s) : r = c, s = I(s);
|
|
1096
1269
|
}
|
|
1097
1270
|
return e.set(t, n), n;
|
|
1098
1271
|
}
|
|
1099
|
-
function
|
|
1272
|
+
function Cn(t) {
|
|
1100
1273
|
let {
|
|
1101
1274
|
element: e,
|
|
1102
1275
|
boundary: o,
|
|
1103
1276
|
rootBoundary: n,
|
|
1104
|
-
strategy:
|
|
1277
|
+
strategy: r
|
|
1105
1278
|
} = t;
|
|
1106
|
-
const
|
|
1107
|
-
const
|
|
1108
|
-
return l.top =
|
|
1109
|
-
},
|
|
1279
|
+
const s = [...o === "clippingAncestors" ? At(e) ? [] : kn(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
|
|
1280
|
+
const h = Gt(e, u, r);
|
|
1281
|
+
return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
|
|
1282
|
+
}, Gt(e, c, r));
|
|
1110
1283
|
return {
|
|
1111
1284
|
width: a.right - a.left,
|
|
1112
1285
|
height: a.bottom - a.top,
|
|
@@ -1114,73 +1287,73 @@ function An(t) {
|
|
|
1114
1287
|
y: a.top
|
|
1115
1288
|
};
|
|
1116
1289
|
}
|
|
1117
|
-
function
|
|
1290
|
+
function Dn(t) {
|
|
1118
1291
|
const {
|
|
1119
1292
|
width: e,
|
|
1120
1293
|
height: o
|
|
1121
|
-
} =
|
|
1294
|
+
} = Ae(t);
|
|
1122
1295
|
return {
|
|
1123
1296
|
width: e,
|
|
1124
1297
|
height: o
|
|
1125
1298
|
};
|
|
1126
1299
|
}
|
|
1127
|
-
function
|
|
1128
|
-
const n =
|
|
1300
|
+
function Wn(t, e, o) {
|
|
1301
|
+
const n = $(e), r = z(e), i = o === "fixed", s = J(t, !0, i, e);
|
|
1129
1302
|
let c = {
|
|
1130
1303
|
scrollLeft: 0,
|
|
1131
1304
|
scrollTop: 0
|
|
1132
1305
|
};
|
|
1133
|
-
const a =
|
|
1306
|
+
const a = H(0);
|
|
1134
1307
|
function l() {
|
|
1135
|
-
a.x =
|
|
1308
|
+
a.x = jt(r);
|
|
1136
1309
|
}
|
|
1137
|
-
if (n || !n && !
|
|
1138
|
-
if ((
|
|
1139
|
-
const
|
|
1140
|
-
a.x =
|
|
1141
|
-
} else
|
|
1142
|
-
|
|
1143
|
-
const
|
|
1310
|
+
if (n || !n && !i)
|
|
1311
|
+
if ((ot(e) !== "body" || ht(r)) && (c = Ot(e)), n) {
|
|
1312
|
+
const f = J(e, !0, i, e);
|
|
1313
|
+
a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
|
|
1314
|
+
} else r && l();
|
|
1315
|
+
i && !n && r && l();
|
|
1316
|
+
const u = r && !n && !i ? Re(r, c) : H(0), h = s.left + c.scrollLeft - a.x - u.x, p = s.top + c.scrollTop - a.y - u.y;
|
|
1144
1317
|
return {
|
|
1145
|
-
x:
|
|
1146
|
-
y:
|
|
1147
|
-
width:
|
|
1148
|
-
height:
|
|
1318
|
+
x: h,
|
|
1319
|
+
y: p,
|
|
1320
|
+
width: s.width,
|
|
1321
|
+
height: s.height
|
|
1149
1322
|
};
|
|
1150
1323
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1324
|
+
function Et(t) {
|
|
1325
|
+
return F(t).position === "static";
|
|
1153
1326
|
}
|
|
1154
|
-
function
|
|
1155
|
-
if (
|
|
1327
|
+
function Zt(t, e) {
|
|
1328
|
+
if (!$(t) || F(t).position === "fixed")
|
|
1156
1329
|
return null;
|
|
1157
1330
|
if (e)
|
|
1158
1331
|
return e(t);
|
|
1159
1332
|
let o = t.offsetParent;
|
|
1160
|
-
return
|
|
1333
|
+
return z(t) === o && (o = o.ownerDocument.body), o;
|
|
1161
1334
|
}
|
|
1162
|
-
function
|
|
1163
|
-
const o =
|
|
1164
|
-
if (
|
|
1335
|
+
function Ee(t, e) {
|
|
1336
|
+
const o = S(t);
|
|
1337
|
+
if (At(t))
|
|
1165
1338
|
return o;
|
|
1166
|
-
if (
|
|
1167
|
-
let
|
|
1168
|
-
for (;
|
|
1169
|
-
if (
|
|
1170
|
-
return
|
|
1171
|
-
|
|
1339
|
+
if (!$(t)) {
|
|
1340
|
+
let r = I(t);
|
|
1341
|
+
for (; r && !et(r); ) {
|
|
1342
|
+
if (W(r) && !Et(r))
|
|
1343
|
+
return r;
|
|
1344
|
+
r = I(r);
|
|
1172
1345
|
}
|
|
1173
1346
|
return o;
|
|
1174
1347
|
}
|
|
1175
|
-
let n =
|
|
1176
|
-
for (; n &&
|
|
1177
|
-
n =
|
|
1178
|
-
return n && et(n) &&
|
|
1348
|
+
let n = Zt(t, e);
|
|
1349
|
+
for (; n && bn(n) && Et(n); )
|
|
1350
|
+
n = Zt(n, e);
|
|
1351
|
+
return n && et(n) && Et(n) && !_t(n) ? o : n || An(t) || o;
|
|
1179
1352
|
}
|
|
1180
|
-
const
|
|
1181
|
-
const e = this.getOffsetParent ||
|
|
1353
|
+
const Fn = async function(t) {
|
|
1354
|
+
const e = this.getOffsetParent || Ee, o = this.getDimensions, n = await o(t.floating);
|
|
1182
1355
|
return {
|
|
1183
|
-
reference:
|
|
1356
|
+
reference: Wn(t.reference, await e(t.floating), t.strategy),
|
|
1184
1357
|
floating: {
|
|
1185
1358
|
x: 0,
|
|
1186
1359
|
y: 0,
|
|
@@ -1189,119 +1362,119 @@ const En = async function(t) {
|
|
|
1189
1362
|
}
|
|
1190
1363
|
};
|
|
1191
1364
|
};
|
|
1192
|
-
function
|
|
1193
|
-
return
|
|
1194
|
-
}
|
|
1195
|
-
const
|
|
1196
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1197
|
-
getDocumentElement:
|
|
1198
|
-
getClippingRect:
|
|
1199
|
-
getOffsetParent:
|
|
1200
|
-
getElementRects:
|
|
1201
|
-
getClientRects:
|
|
1202
|
-
getDimensions:
|
|
1365
|
+
function Mn(t) {
|
|
1366
|
+
return F(t).direction === "rtl";
|
|
1367
|
+
}
|
|
1368
|
+
const Nn = {
|
|
1369
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
|
|
1370
|
+
getDocumentElement: z,
|
|
1371
|
+
getClippingRect: Cn,
|
|
1372
|
+
getOffsetParent: Ee,
|
|
1373
|
+
getElementRects: Fn,
|
|
1374
|
+
getClientRects: En,
|
|
1375
|
+
getDimensions: Dn,
|
|
1203
1376
|
getScale: Z,
|
|
1204
|
-
isElement:
|
|
1205
|
-
isRTL:
|
|
1377
|
+
isElement: W,
|
|
1378
|
+
isRTL: Mn
|
|
1206
1379
|
};
|
|
1207
|
-
function
|
|
1380
|
+
function Pe(t, e) {
|
|
1208
1381
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1209
1382
|
}
|
|
1210
|
-
function
|
|
1383
|
+
function Vn(t, e) {
|
|
1211
1384
|
let o = null, n;
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1385
|
+
const r = z(t);
|
|
1386
|
+
function i() {
|
|
1214
1387
|
var c;
|
|
1215
1388
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1216
1389
|
}
|
|
1217
|
-
function
|
|
1218
|
-
c === void 0 && (c = !1), a === void 0 && (a = 1),
|
|
1390
|
+
function s(c, a) {
|
|
1391
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), i();
|
|
1219
1392
|
const l = t.getBoundingClientRect(), {
|
|
1220
|
-
left:
|
|
1221
|
-
top:
|
|
1222
|
-
width:
|
|
1223
|
-
height:
|
|
1393
|
+
left: u,
|
|
1394
|
+
top: h,
|
|
1395
|
+
width: p,
|
|
1396
|
+
height: f
|
|
1224
1397
|
} = l;
|
|
1225
|
-
if (c || e(), !
|
|
1398
|
+
if (c || e(), !p || !f)
|
|
1226
1399
|
return;
|
|
1227
|
-
const
|
|
1228
|
-
rootMargin: -
|
|
1229
|
-
threshold:
|
|
1400
|
+
const d = mt(h), w = mt(r.clientWidth - (u + p)), g = mt(r.clientHeight - (h + f)), y = mt(u), v = {
|
|
1401
|
+
rootMargin: -d + "px " + -w + "px " + -g + "px " + -y + "px",
|
|
1402
|
+
threshold: X(0, tt(1, a)) || 1
|
|
1230
1403
|
};
|
|
1231
|
-
let
|
|
1232
|
-
function
|
|
1233
|
-
const
|
|
1234
|
-
if (
|
|
1235
|
-
if (!
|
|
1236
|
-
return
|
|
1237
|
-
|
|
1238
|
-
|
|
1404
|
+
let R = !0;
|
|
1405
|
+
function O(T) {
|
|
1406
|
+
const m = T[0].intersectionRatio;
|
|
1407
|
+
if (m !== a) {
|
|
1408
|
+
if (!R)
|
|
1409
|
+
return s();
|
|
1410
|
+
m ? s(!1, m) : n = setTimeout(() => {
|
|
1411
|
+
s(!1, 1e-7);
|
|
1239
1412
|
}, 1e3);
|
|
1240
1413
|
}
|
|
1241
|
-
|
|
1414
|
+
m === 1 && !Pe(l, t.getBoundingClientRect()) && s(), R = !1;
|
|
1242
1415
|
}
|
|
1243
1416
|
try {
|
|
1244
|
-
o = new IntersectionObserver(
|
|
1245
|
-
...
|
|
1417
|
+
o = new IntersectionObserver(O, {
|
|
1418
|
+
...v,
|
|
1246
1419
|
// Handle <iframe>s
|
|
1247
|
-
root:
|
|
1420
|
+
root: r.ownerDocument
|
|
1248
1421
|
});
|
|
1249
1422
|
} catch {
|
|
1250
|
-
o = new IntersectionObserver(
|
|
1423
|
+
o = new IntersectionObserver(O, v);
|
|
1251
1424
|
}
|
|
1252
1425
|
o.observe(t);
|
|
1253
1426
|
}
|
|
1254
|
-
return
|
|
1427
|
+
return s(!0), i;
|
|
1255
1428
|
}
|
|
1256
|
-
function
|
|
1429
|
+
function Hn(t, e, o, n) {
|
|
1257
1430
|
n === void 0 && (n = {});
|
|
1258
1431
|
const {
|
|
1259
|
-
ancestorScroll:
|
|
1260
|
-
ancestorResize:
|
|
1261
|
-
elementResize:
|
|
1432
|
+
ancestorScroll: r = !0,
|
|
1433
|
+
ancestorResize: i = !0,
|
|
1434
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1262
1435
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1263
1436
|
animationFrame: a = !1
|
|
1264
|
-
} = n, l = Ut(t),
|
|
1265
|
-
|
|
1266
|
-
|
|
1437
|
+
} = n, l = Ut(t), u = r || i ? [...l ? at(l) : [], ...at(e)] : [];
|
|
1438
|
+
u.forEach((y) => {
|
|
1439
|
+
r && y.addEventListener("scroll", o, {
|
|
1267
1440
|
passive: !0
|
|
1268
|
-
}),
|
|
1441
|
+
}), i && y.addEventListener("resize", o);
|
|
1269
1442
|
});
|
|
1270
|
-
const
|
|
1271
|
-
let
|
|
1272
|
-
|
|
1273
|
-
let [
|
|
1274
|
-
|
|
1275
|
-
var
|
|
1276
|
-
(
|
|
1443
|
+
const h = l && c ? Vn(l, o) : null;
|
|
1444
|
+
let p = -1, f = null;
|
|
1445
|
+
s && (f = new ResizeObserver((y) => {
|
|
1446
|
+
let [x] = y;
|
|
1447
|
+
x && x.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1448
|
+
var v;
|
|
1449
|
+
(v = f) == null || v.observe(e);
|
|
1277
1450
|
})), o();
|
|
1278
|
-
}), l && !a &&
|
|
1279
|
-
let
|
|
1280
|
-
a &&
|
|
1281
|
-
function
|
|
1451
|
+
}), l && !a && f.observe(l), f.observe(e));
|
|
1452
|
+
let d, w = a ? J(t) : null;
|
|
1453
|
+
a && g();
|
|
1454
|
+
function g() {
|
|
1282
1455
|
const y = J(t);
|
|
1283
|
-
|
|
1456
|
+
w && !Pe(w, y) && o(), w = y, d = requestAnimationFrame(g);
|
|
1284
1457
|
}
|
|
1285
1458
|
return o(), () => {
|
|
1286
1459
|
var y;
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}),
|
|
1460
|
+
u.forEach((x) => {
|
|
1461
|
+
r && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
|
|
1462
|
+
}), h == null || h(), (y = f) == null || y.disconnect(), f = null, a && cancelAnimationFrame(d);
|
|
1290
1463
|
};
|
|
1291
1464
|
}
|
|
1292
|
-
const
|
|
1293
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1294
|
-
platform:
|
|
1465
|
+
const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
|
|
1466
|
+
const n = /* @__PURE__ */ new Map(), r = {
|
|
1467
|
+
platform: Nn,
|
|
1295
1468
|
...o
|
|
1296
|
-
},
|
|
1297
|
-
...
|
|
1469
|
+
}, i = {
|
|
1470
|
+
...r.platform,
|
|
1298
1471
|
_c: n
|
|
1299
1472
|
};
|
|
1300
|
-
return
|
|
1301
|
-
...
|
|
1302
|
-
platform:
|
|
1473
|
+
return gn(t, e, {
|
|
1474
|
+
...r,
|
|
1475
|
+
platform: i
|
|
1303
1476
|
});
|
|
1304
|
-
},
|
|
1477
|
+
}, go = [
|
|
1305
1478
|
"top",
|
|
1306
1479
|
"top-start",
|
|
1307
1480
|
"top-end",
|
|
@@ -1314,42 +1487,42 @@ const Cn = fn, Dn = hn, qt = ln, Wn = an, Fn = (t, e, o) => {
|
|
|
1314
1487
|
"left",
|
|
1315
1488
|
"left-start",
|
|
1316
1489
|
"left-end"
|
|
1317
|
-
],
|
|
1490
|
+
], po = (t, e = { isOpen: !1 }) => {
|
|
1318
1491
|
const o = [];
|
|
1319
1492
|
let n = null;
|
|
1320
|
-
const
|
|
1321
|
-
function
|
|
1322
|
-
n = c,
|
|
1493
|
+
const r = k.deriveProp(e.isOpen);
|
|
1494
|
+
function i(c) {
|
|
1495
|
+
n = c, r.set(!0);
|
|
1323
1496
|
}
|
|
1324
|
-
function
|
|
1325
|
-
|
|
1497
|
+
function s() {
|
|
1498
|
+
r.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1326
1499
|
}
|
|
1327
|
-
return
|
|
1328
|
-
t(
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
() =>
|
|
1332
|
-
(n == null ? void 0 : n.onClickOutside) != null ?
|
|
1333
|
-
|
|
1334
|
-
(c) =>
|
|
1500
|
+
return j(
|
|
1501
|
+
t(i, s),
|
|
1502
|
+
ue(
|
|
1503
|
+
r,
|
|
1504
|
+
() => j(
|
|
1505
|
+
(n == null ? void 0 : n.onClickOutside) != null ? on(n.onClickOutside) : null,
|
|
1506
|
+
_(
|
|
1507
|
+
(c) => le(
|
|
1335
1508
|
"body",
|
|
1336
|
-
|
|
1337
|
-
|
|
1509
|
+
Pt.div(
|
|
1510
|
+
_((a) => {
|
|
1338
1511
|
a.style.position = "absolute";
|
|
1339
1512
|
const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1340
1513
|
n.target
|
|
1341
1514
|
) : (n == null ? void 0 : n.target) ?? c;
|
|
1342
1515
|
if (l == null)
|
|
1343
1516
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1344
|
-
let
|
|
1345
|
-
const
|
|
1517
|
+
let u = null;
|
|
1518
|
+
const h = k.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), p = k.toSignal(
|
|
1346
1519
|
(n == null ? void 0 : n.crossAxisOffset) ?? 0
|
|
1347
|
-
),
|
|
1520
|
+
), f = k.toSignal(
|
|
1348
1521
|
/* c8 ignore next 3 */
|
|
1349
1522
|
(n == null ? void 0 : n.placement) ?? "top"
|
|
1350
|
-
),
|
|
1523
|
+
), d = k.toSignal(
|
|
1351
1524
|
(n == null ? void 0 : n.arrowPadding) ?? 0
|
|
1352
|
-
),
|
|
1525
|
+
), w = n == null ? void 0 : n.arrow, g = M({
|
|
1353
1526
|
centerOffset: 0,
|
|
1354
1527
|
alignmentOffset: 0,
|
|
1355
1528
|
containerWidth: 0,
|
|
@@ -1358,68 +1531,68 @@ const Cn = fn, Dn = hn, qt = ln, Wn = an, Fn = (t, e, o) => {
|
|
|
1358
1531
|
y: void 0
|
|
1359
1532
|
});
|
|
1360
1533
|
async function y() {
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
mainAxis:
|
|
1365
|
-
crossAxis:
|
|
1534
|
+
const v = [
|
|
1535
|
+
te(),
|
|
1536
|
+
$n({
|
|
1537
|
+
mainAxis: h.get(),
|
|
1538
|
+
crossAxis: p.get()
|
|
1366
1539
|
}),
|
|
1367
|
-
|
|
1368
|
-
|
|
1540
|
+
zn(),
|
|
1541
|
+
te()
|
|
1369
1542
|
];
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
element:
|
|
1373
|
-
padding:
|
|
1543
|
+
w != null && u != null && v.push(
|
|
1544
|
+
Bn({
|
|
1545
|
+
element: u,
|
|
1546
|
+
padding: d.get()
|
|
1374
1547
|
})
|
|
1375
1548
|
);
|
|
1376
|
-
const
|
|
1377
|
-
placement:
|
|
1549
|
+
const R = await _n(l, a, {
|
|
1550
|
+
placement: f.get(),
|
|
1378
1551
|
strategy: "absolute",
|
|
1379
|
-
middleware:
|
|
1380
|
-
}), { x, y:
|
|
1381
|
-
if (a.style.top = `${
|
|
1552
|
+
middleware: v
|
|
1553
|
+
}), { x: O, y: T, middlewareData: m } = R;
|
|
1554
|
+
if (a.style.top = `${T}px`, a.style.left = `${O}px`, u != null && m.arrow != null) {
|
|
1382
1555
|
const {
|
|
1383
|
-
x:
|
|
1384
|
-
y:
|
|
1385
|
-
centerOffset:
|
|
1386
|
-
alignmentOffset:
|
|
1387
|
-
} =
|
|
1388
|
-
|
|
1389
|
-
x:
|
|
1390
|
-
y:
|
|
1391
|
-
centerOffset:
|
|
1392
|
-
alignmentOffset:
|
|
1556
|
+
x: b,
|
|
1557
|
+
y: A,
|
|
1558
|
+
centerOffset: E,
|
|
1559
|
+
alignmentOffset: V
|
|
1560
|
+
} = m.arrow;
|
|
1561
|
+
g.set({
|
|
1562
|
+
x: b,
|
|
1563
|
+
y: A,
|
|
1564
|
+
centerOffset: E,
|
|
1565
|
+
alignmentOffset: V,
|
|
1393
1566
|
containerWidth: a.offsetWidth,
|
|
1394
1567
|
containerHeight: a.offsetHeight
|
|
1395
1568
|
});
|
|
1396
1569
|
}
|
|
1397
1570
|
}
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1571
|
+
const x = Fe(
|
|
1572
|
+
h,
|
|
1573
|
+
p,
|
|
1574
|
+
f
|
|
1402
1575
|
)(y);
|
|
1403
|
-
return
|
|
1576
|
+
return j(
|
|
1404
1577
|
n == null ? void 0 : n.content,
|
|
1405
|
-
(n == null ? void 0 : n.arrow) != null ?
|
|
1578
|
+
(n == null ? void 0 : n.arrow) != null ? Pt.div(
|
|
1406
1579
|
n == null ? void 0 : n.arrow(
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
)((
|
|
1411
|
-
...
|
|
1412
|
-
placement:
|
|
1580
|
+
fe(
|
|
1581
|
+
g,
|
|
1582
|
+
f
|
|
1583
|
+
)((v, R) => ({
|
|
1584
|
+
...v,
|
|
1585
|
+
placement: R
|
|
1413
1586
|
}))
|
|
1414
1587
|
),
|
|
1415
|
-
|
|
1416
|
-
|
|
1588
|
+
_((v) => {
|
|
1589
|
+
u = v, y();
|
|
1417
1590
|
})
|
|
1418
1591
|
) : null,
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1592
|
+
N(
|
|
1593
|
+
g.dispose,
|
|
1594
|
+
Hn(l, a, y),
|
|
1595
|
+
x
|
|
1423
1596
|
)
|
|
1424
1597
|
);
|
|
1425
1598
|
})
|
|
@@ -1429,88 +1602,88 @@ const Cn = fn, Dn = hn, qt = ln, Wn = an, Fn = (t, e, o) => {
|
|
|
1429
1602
|
)
|
|
1430
1603
|
)
|
|
1431
1604
|
);
|
|
1432
|
-
},
|
|
1605
|
+
}, Kn = ({
|
|
1433
1606
|
request: t,
|
|
1434
1607
|
load: e,
|
|
1435
1608
|
convertError: o,
|
|
1436
1609
|
onSuccess: n,
|
|
1437
|
-
onError:
|
|
1438
|
-
onSettled:
|
|
1610
|
+
onError: r,
|
|
1611
|
+
onSettled: i
|
|
1439
1612
|
}) => {
|
|
1440
|
-
let
|
|
1441
|
-
const c =
|
|
1442
|
-
(
|
|
1613
|
+
let s;
|
|
1614
|
+
const c = M(L.notAsked), a = c.map(
|
|
1615
|
+
(g) => L.isSuccess(g) ? g.value : void 0
|
|
1443
1616
|
), l = c.map(
|
|
1444
|
-
(
|
|
1445
|
-
),
|
|
1446
|
-
|
|
1447
|
-
},
|
|
1448
|
-
|
|
1449
|
-
},
|
|
1450
|
-
|
|
1451
|
-
const y =
|
|
1452
|
-
c.set(
|
|
1617
|
+
(g) => L.isFailure(g) ? g.error : void 0
|
|
1618
|
+
), u = c.map((g) => L.isLoading(g)), h = () => {
|
|
1619
|
+
s == null || s.abort(), s = void 0;
|
|
1620
|
+
}, p = (g) => {
|
|
1621
|
+
h(), c.set(g ?? L.notAsked);
|
|
1622
|
+
}, f = async (g) => {
|
|
1623
|
+
h(), s = new AbortController();
|
|
1624
|
+
const y = s.signal, x = c.get();
|
|
1625
|
+
c.set(L.loading(L.getOrUndefined(x)));
|
|
1453
1626
|
try {
|
|
1454
|
-
const
|
|
1455
|
-
await Promise.resolve(),
|
|
1456
|
-
} catch (
|
|
1457
|
-
|
|
1627
|
+
const v = await e({ request: g, abortSignal: y, previous: x });
|
|
1628
|
+
await Promise.resolve(), s = void 0, c.set(L.success(v)), n == null || n(v, g);
|
|
1629
|
+
} catch (v) {
|
|
1630
|
+
s = void 0, c.set(L.failure(o(v))), r == null || r(o(v), g);
|
|
1458
1631
|
}
|
|
1459
|
-
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1632
|
+
i == null || i(c.get(), g);
|
|
1633
|
+
}, d = () => f(k.get(t)), w = () => {
|
|
1634
|
+
s == null || s.abort(), s = void 0, c.dispose();
|
|
1462
1635
|
};
|
|
1463
|
-
return c.onDispose(
|
|
1636
|
+
return c.onDispose(k.on(t, f)), {
|
|
1464
1637
|
status: c,
|
|
1465
1638
|
value: a,
|
|
1466
1639
|
error: l,
|
|
1467
|
-
loading:
|
|
1468
|
-
cancel:
|
|
1469
|
-
reload:
|
|
1470
|
-
dispose:
|
|
1640
|
+
loading: u,
|
|
1641
|
+
cancel: p,
|
|
1642
|
+
reload: d,
|
|
1643
|
+
dispose: w
|
|
1471
1644
|
};
|
|
1472
|
-
},
|
|
1473
|
-
const { status: o, dispose: n, reload:
|
|
1474
|
-
return
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
loading:
|
|
1478
|
-
failure:
|
|
1479
|
-
success: (a) => c({ value: a, reload:
|
|
1645
|
+
}, Un = (t, e) => {
|
|
1646
|
+
const { status: o, dispose: n, reload: r } = t, { pending: i, failure: s, success: c } = e;
|
|
1647
|
+
return j(
|
|
1648
|
+
N(n),
|
|
1649
|
+
ge(o, {
|
|
1650
|
+
loading: i != null ? (a) => i({ previous: a, reload: r, cancel: t.cancel }) : void 0,
|
|
1651
|
+
failure: s != null ? (a) => s({ error: a, reload: r }) : void 0,
|
|
1652
|
+
success: (a) => c({ value: a, reload: r })
|
|
1480
1653
|
})
|
|
1481
1654
|
);
|
|
1482
|
-
},
|
|
1655
|
+
}, wo = ({
|
|
1483
1656
|
request: t,
|
|
1484
1657
|
load: e,
|
|
1485
1658
|
convertError: o = (l) => l,
|
|
1486
1659
|
onSuccess: n,
|
|
1487
|
-
onError:
|
|
1488
|
-
onSettled:
|
|
1489
|
-
success:
|
|
1660
|
+
onError: r,
|
|
1661
|
+
onSettled: i,
|
|
1662
|
+
success: s,
|
|
1490
1663
|
pending: c,
|
|
1491
1664
|
failure: a
|
|
1492
1665
|
}) => {
|
|
1493
|
-
const l =
|
|
1666
|
+
const l = Kn({
|
|
1494
1667
|
request: t,
|
|
1495
1668
|
load: e,
|
|
1496
1669
|
convertError: o,
|
|
1497
1670
|
onSuccess: n,
|
|
1498
|
-
onError:
|
|
1499
|
-
onSettled:
|
|
1671
|
+
onError: r,
|
|
1672
|
+
onSettled: i
|
|
1500
1673
|
});
|
|
1501
|
-
return
|
|
1502
|
-
},
|
|
1674
|
+
return Un(l, { success: s, pending: c, failure: a });
|
|
1675
|
+
}, jn = (t, e) => {
|
|
1503
1676
|
if (typeof e == "function")
|
|
1504
|
-
return
|
|
1505
|
-
const o = e.failure ?? ((
|
|
1506
|
-
|
|
1507
|
-
|
|
1677
|
+
return jn(t, { success: e });
|
|
1678
|
+
const o = e.failure ?? ((r) => j(
|
|
1679
|
+
N(r.on(console.error)),
|
|
1680
|
+
r.map((i) => `Error: ${i}`)
|
|
1508
1681
|
)), n = e.success;
|
|
1509
|
-
return
|
|
1510
|
-
Success: (
|
|
1511
|
-
Failure: (
|
|
1682
|
+
return ae(k.toSignal(t), {
|
|
1683
|
+
Success: (r) => n(r.$.value),
|
|
1684
|
+
Failure: (r) => o(r.$.error)
|
|
1512
1685
|
});
|
|
1513
|
-
},
|
|
1686
|
+
}, yo = () => ce.focus((t) => {
|
|
1514
1687
|
var e;
|
|
1515
1688
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1516
1689
|
});
|
|
@@ -1532,7 +1705,7 @@ class Rt {
|
|
|
1532
1705
|
* console.log(rect.height); // 50
|
|
1533
1706
|
* ```
|
|
1534
1707
|
*/
|
|
1535
|
-
constructor(e, o, n,
|
|
1708
|
+
constructor(e, o, n, r, i, s) {
|
|
1536
1709
|
/**
|
|
1537
1710
|
* Compares this rectangle with another rectangle for equality.
|
|
1538
1711
|
*
|
|
@@ -1553,8 +1726,8 @@ class Rt {
|
|
|
1553
1726
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1554
1727
|
* ```
|
|
1555
1728
|
*/
|
|
1556
|
-
|
|
1557
|
-
this.left = e, this.top = o, this.width = n, this.height =
|
|
1729
|
+
Lt(this, "equals", (e) => dt(this.left, e.left) && dt(this.top, e.top) && dt(this.width, e.width) && dt(this.height, e.height));
|
|
1730
|
+
this.left = e, this.top = o, this.width = n, this.height = r, this.localLeft = i, this.localTop = s;
|
|
1558
1731
|
}
|
|
1559
1732
|
/**
|
|
1560
1733
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1585,11 +1758,11 @@ class Rt {
|
|
|
1585
1758
|
left: e = 0,
|
|
1586
1759
|
top: o = 0,
|
|
1587
1760
|
width: n = 0,
|
|
1588
|
-
height:
|
|
1589
|
-
localLeft:
|
|
1590
|
-
localTop:
|
|
1761
|
+
height: r = 0,
|
|
1762
|
+
localLeft: i = 0,
|
|
1763
|
+
localTop: s = 0
|
|
1591
1764
|
}) {
|
|
1592
|
-
return new Rt(e, o, n,
|
|
1765
|
+
return new Rt(e, o, n, r, i, s);
|
|
1593
1766
|
}
|
|
1594
1767
|
/**
|
|
1595
1768
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1702,7 +1875,7 @@ class Rt {
|
|
|
1702
1875
|
return { width: this.width, height: this.height };
|
|
1703
1876
|
}
|
|
1704
1877
|
}
|
|
1705
|
-
function
|
|
1878
|
+
function ee(t) {
|
|
1706
1879
|
const e = t.getBoundingClientRect();
|
|
1707
1880
|
return Rt.of({
|
|
1708
1881
|
top: e.top + window.scrollY,
|
|
@@ -1713,149 +1886,163 @@ function Qt(t) {
|
|
|
1713
1886
|
localTop: t.offsetTop
|
|
1714
1887
|
});
|
|
1715
1888
|
}
|
|
1716
|
-
const
|
|
1717
|
-
const { element: o } = e, n =
|
|
1718
|
-
let
|
|
1719
|
-
return typeof ResizeObserver < "u" && (
|
|
1720
|
-
|
|
1889
|
+
const vo = (t) => Me((e) => {
|
|
1890
|
+
const { element: o } = e, n = M(ee(o), (c, a) => c.equals(a)), r = Ht(t(n))(e), i = () => n.set(Rt.of(ee(o)));
|
|
1891
|
+
let s = null;
|
|
1892
|
+
return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s == null || s.observe(o), N((c) => {
|
|
1893
|
+
s == null || s.disconnect(), r(c);
|
|
1721
1894
|
});
|
|
1722
1895
|
});
|
|
1723
|
-
function
|
|
1896
|
+
function ne(t) {
|
|
1724
1897
|
return {
|
|
1725
1898
|
/* c8 ignore next 6 */
|
|
1726
1899
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1727
1900
|
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1728
1901
|
};
|
|
1729
1902
|
}
|
|
1730
|
-
const
|
|
1731
|
-
const o =
|
|
1732
|
-
|
|
1733
|
-
(
|
|
1734
|
-
),
|
|
1735
|
-
return o == null || o.addEventListener("resize",
|
|
1736
|
-
o == null || o.removeEventListener("resize",
|
|
1903
|
+
const xo = (t) => (e) => {
|
|
1904
|
+
const o = nt(), n = M(
|
|
1905
|
+
ne(o),
|
|
1906
|
+
(s, c) => s.width === c.width && s.height === c.height
|
|
1907
|
+
), r = Ht(t(n))(e), i = () => n.set(ne(o));
|
|
1908
|
+
return o == null || o.addEventListener("resize", i), (s) => {
|
|
1909
|
+
o == null || o.removeEventListener("resize", i), r(s);
|
|
1737
1910
|
};
|
|
1738
|
-
},
|
|
1739
|
-
const o = e.split("/").filter((
|
|
1740
|
-
for (let
|
|
1741
|
-
const
|
|
1742
|
-
if (!
|
|
1911
|
+
}, In = (t, e) => {
|
|
1912
|
+
const o = e.split("/").filter((r) => r !== ""), n = {};
|
|
1913
|
+
for (let r = 0; r < t.length; r++) {
|
|
1914
|
+
const i = t[r], s = o[r];
|
|
1915
|
+
if (!s && i.type !== "catch-all")
|
|
1743
1916
|
return null;
|
|
1744
|
-
if (
|
|
1745
|
-
if (
|
|
1917
|
+
if (i.type === "literal") {
|
|
1918
|
+
if (i.value !== s)
|
|
1746
1919
|
return null;
|
|
1747
|
-
} else if (
|
|
1748
|
-
n[
|
|
1749
|
-
else if (
|
|
1920
|
+
} else if (i.type === "param")
|
|
1921
|
+
n[i.name] = s;
|
|
1922
|
+
else if (i.type === "catch-all") {
|
|
1923
|
+
if (i.name) {
|
|
1924
|
+
const c = o.slice(r).join("/");
|
|
1925
|
+
n[i.name] = c;
|
|
1926
|
+
}
|
|
1750
1927
|
return { params: n, path: e };
|
|
1928
|
+
}
|
|
1751
1929
|
}
|
|
1752
1930
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1753
|
-
},
|
|
1931
|
+
}, Se = (t) => t.split("/").map((e) => {
|
|
1932
|
+
if (e.startsWith(":"))
|
|
1933
|
+
return { type: "param", name: e.slice(1) };
|
|
1934
|
+
if (e.startsWith("*")) {
|
|
1935
|
+
const o = e.slice(1);
|
|
1936
|
+
return o != "" ? { type: "catch-all", name: o } : { type: "catch-all" };
|
|
1937
|
+
} else
|
|
1938
|
+
return { type: "literal", value: e };
|
|
1939
|
+
}).filter((e) => e.type !== "literal" || e.value !== ""), bo = (t) => {
|
|
1754
1940
|
const e = t.map((o) => {
|
|
1755
|
-
const n =
|
|
1941
|
+
const n = Se(o);
|
|
1756
1942
|
return { route: o, segments: n };
|
|
1757
1943
|
});
|
|
1758
1944
|
return function(n) {
|
|
1759
|
-
for (const { segments:
|
|
1760
|
-
const
|
|
1761
|
-
if (
|
|
1762
|
-
return { ...
|
|
1945
|
+
for (const { segments: r, route: i } of e) {
|
|
1946
|
+
const s = In(r, n);
|
|
1947
|
+
if (s)
|
|
1948
|
+
return { ...s, route: i };
|
|
1763
1949
|
}
|
|
1764
1950
|
return null;
|
|
1765
1951
|
};
|
|
1766
|
-
},
|
|
1767
|
-
mark:
|
|
1952
|
+
}, Ft = {
|
|
1953
|
+
mark: Nt("RouterContext"),
|
|
1768
1954
|
create: () => {
|
|
1769
|
-
const t =
|
|
1955
|
+
const t = M([]);
|
|
1770
1956
|
return {
|
|
1771
1957
|
value: t,
|
|
1772
1958
|
dispose: () => t.dispose()
|
|
1773
1959
|
};
|
|
1774
1960
|
}
|
|
1775
|
-
},
|
|
1776
|
-
const n = o.split("/").filter((
|
|
1777
|
-
let
|
|
1778
|
-
for (let
|
|
1779
|
-
const c = t[
|
|
1961
|
+
}, Yn = (t, e, o) => {
|
|
1962
|
+
const n = o.split("/").filter((s) => s !== ""), r = {};
|
|
1963
|
+
let i = 0;
|
|
1964
|
+
for (let s = 0; s < t.length; s++) {
|
|
1965
|
+
const c = t[s], a = n[s];
|
|
1780
1966
|
if (!a && c.type !== "catch-all")
|
|
1781
1967
|
return null;
|
|
1782
1968
|
if (c.type === "literal") {
|
|
1783
1969
|
if (c.value !== a)
|
|
1784
1970
|
return null;
|
|
1785
|
-
|
|
1971
|
+
i++;
|
|
1786
1972
|
} else if (c.type === "param")
|
|
1787
|
-
|
|
1973
|
+
r[c.name] = a, i++;
|
|
1788
1974
|
else if (c.type === "catch-all") {
|
|
1789
|
-
|
|
1975
|
+
c.name && (r[c.name] = n.slice(i).join("/"));
|
|
1976
|
+
const l = "/" + n.slice(0, i).join("/"), u = "/" + n.slice(i).join("/");
|
|
1790
1977
|
return {
|
|
1791
|
-
params:
|
|
1978
|
+
params: r,
|
|
1792
1979
|
matchedPath: l === "/" ? "" : l,
|
|
1793
|
-
remainingPath:
|
|
1980
|
+
remainingPath: u === "/" ? "" : u,
|
|
1794
1981
|
route: e
|
|
1795
1982
|
};
|
|
1796
1983
|
}
|
|
1797
1984
|
}
|
|
1798
1985
|
if (n.length === t.length) {
|
|
1799
|
-
const
|
|
1986
|
+
const s = "/" + n.join("/");
|
|
1800
1987
|
return {
|
|
1801
|
-
params:
|
|
1802
|
-
matchedPath:
|
|
1988
|
+
params: r,
|
|
1989
|
+
matchedPath: s === "/" ? "" : s,
|
|
1803
1990
|
remainingPath: "",
|
|
1804
1991
|
route: e
|
|
1805
1992
|
};
|
|
1806
1993
|
}
|
|
1807
1994
|
return null;
|
|
1808
|
-
},
|
|
1995
|
+
}, Te = (t) => {
|
|
1809
1996
|
const e = t.map((o) => {
|
|
1810
|
-
const n =
|
|
1997
|
+
const n = Se(o);
|
|
1811
1998
|
return { route: o, segments: n };
|
|
1812
1999
|
});
|
|
1813
2000
|
return function(n) {
|
|
1814
|
-
for (const { segments:
|
|
1815
|
-
const
|
|
1816
|
-
if (
|
|
1817
|
-
return
|
|
2001
|
+
for (const { segments: r, route: i } of e) {
|
|
2002
|
+
const s = Yn(r, i, n);
|
|
2003
|
+
if (s)
|
|
2004
|
+
return s;
|
|
1818
2005
|
}
|
|
1819
2006
|
return null;
|
|
1820
2007
|
};
|
|
1821
|
-
},
|
|
1822
|
-
const e =
|
|
1823
|
-
return
|
|
1824
|
-
|
|
2008
|
+
}, Ao = (t) => {
|
|
2009
|
+
const e = Te(Object.keys(t));
|
|
2010
|
+
return Ne(
|
|
2011
|
+
Ft,
|
|
1825
2012
|
{},
|
|
1826
|
-
() =>
|
|
1827
|
-
const
|
|
1828
|
-
const
|
|
1829
|
-
if (
|
|
1830
|
-
throw console.error("No route found for",
|
|
2013
|
+
() => ct($t, (o) => ct(Ft, (n) => {
|
|
2014
|
+
const r = o.location.map((i) => {
|
|
2015
|
+
const s = e(i.pathname);
|
|
2016
|
+
if (s == null)
|
|
2017
|
+
throw console.error("No route found for", i), new Error("No route found");
|
|
1831
2018
|
const c = {
|
|
1832
|
-
matchedPath:
|
|
1833
|
-
remainingPath:
|
|
1834
|
-
fullPath:
|
|
1835
|
-
params:
|
|
2019
|
+
matchedPath: s.matchedPath,
|
|
2020
|
+
remainingPath: s.remainingPath,
|
|
2021
|
+
fullPath: i.pathname,
|
|
2022
|
+
params: s.params
|
|
1836
2023
|
};
|
|
1837
2024
|
return n.value = [...n.value, c], {
|
|
1838
|
-
params:
|
|
1839
|
-
route:
|
|
1840
|
-
path:
|
|
1841
|
-
search:
|
|
1842
|
-
hash:
|
|
2025
|
+
params: s.params,
|
|
2026
|
+
route: s.route,
|
|
2027
|
+
path: s.matchedPath || i.pathname,
|
|
2028
|
+
search: i.search,
|
|
2029
|
+
hash: i.hash
|
|
1843
2030
|
};
|
|
1844
2031
|
});
|
|
1845
|
-
return
|
|
1846
|
-
|
|
2032
|
+
return he(
|
|
2033
|
+
r.map((i) => [i.route, i]),
|
|
1847
2034
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1848
2035
|
t
|
|
1849
2036
|
);
|
|
1850
2037
|
}))
|
|
1851
2038
|
);
|
|
1852
|
-
},
|
|
1853
|
-
const e =
|
|
1854
|
-
return
|
|
1855
|
-
const
|
|
1856
|
-
const
|
|
2039
|
+
}, Oo = (t) => {
|
|
2040
|
+
const e = Te(Object.keys(t));
|
|
2041
|
+
return ct(Ft, (o) => ct($t, (n) => {
|
|
2042
|
+
const r = o.map((i) => {
|
|
2043
|
+
const s = i[i.length - 1], c = (s == null ? void 0 : s.remainingPath) || "";
|
|
1857
2044
|
if (c === "")
|
|
1858
|
-
throw console.error("No remaining path for SubRouter",
|
|
2045
|
+
throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
|
|
1859
2046
|
const a = e(c);
|
|
1860
2047
|
if (a == null)
|
|
1861
2048
|
throw console.error("No route found for remaining path", c), new Error("No route found");
|
|
@@ -1864,152 +2051,151 @@ const fo = (t) => (e) => {
|
|
|
1864
2051
|
// Only this router's parameters
|
|
1865
2052
|
route: a.route,
|
|
1866
2053
|
path: a.matchedPath,
|
|
1867
|
-
search: n.value.search,
|
|
1868
|
-
hash: n.value.hash
|
|
2054
|
+
search: n.location.value.search,
|
|
2055
|
+
hash: n.location.value.hash
|
|
1869
2056
|
};
|
|
1870
2057
|
});
|
|
1871
|
-
return
|
|
1872
|
-
|
|
2058
|
+
return he(
|
|
2059
|
+
r.map((i) => [i.route, i]),
|
|
1873
2060
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1874
2061
|
t
|
|
1875
2062
|
);
|
|
1876
2063
|
}));
|
|
1877
|
-
},
|
|
2064
|
+
}, xt = 60 * 1e3, Mt = 60 * xt, lt = 24 * Mt, oe = 7 * lt, se = 30 * lt, qn = 365 * lt, Xn = [
|
|
1878
2065
|
{
|
|
1879
|
-
max:
|
|
1880
|
-
value:
|
|
2066
|
+
max: xt * 90,
|
|
2067
|
+
value: xt,
|
|
1881
2068
|
name: "minute",
|
|
1882
2069
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1883
2070
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1884
2071
|
},
|
|
1885
2072
|
{
|
|
1886
|
-
max:
|
|
1887
|
-
value:
|
|
2073
|
+
max: Mt * 36,
|
|
2074
|
+
value: Mt,
|
|
1888
2075
|
name: "hour",
|
|
1889
2076
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1890
2077
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1891
2078
|
},
|
|
1892
2079
|
{
|
|
1893
|
-
max:
|
|
1894
|
-
value:
|
|
2080
|
+
max: lt * 10,
|
|
2081
|
+
value: lt,
|
|
1895
2082
|
name: "day",
|
|
1896
2083
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1897
2084
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1898
2085
|
},
|
|
1899
2086
|
{
|
|
1900
|
-
max:
|
|
1901
|
-
value:
|
|
2087
|
+
max: oe * 6,
|
|
2088
|
+
value: oe,
|
|
1902
2089
|
name: "week",
|
|
1903
2090
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1904
2091
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1905
2092
|
},
|
|
1906
2093
|
{
|
|
1907
|
-
max:
|
|
1908
|
-
value:
|
|
2094
|
+
max: se * 18,
|
|
2095
|
+
value: se,
|
|
1909
2096
|
name: "month",
|
|
1910
2097
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1911
2098
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1912
2099
|
},
|
|
1913
2100
|
{
|
|
1914
2101
|
max: 1 / 0,
|
|
1915
|
-
value:
|
|
2102
|
+
value: qn,
|
|
1916
2103
|
name: "year",
|
|
1917
2104
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1918
2105
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1919
2106
|
}
|
|
1920
2107
|
];
|
|
1921
|
-
function
|
|
1922
|
-
const
|
|
1923
|
-
return
|
|
2108
|
+
function re(t, e, o, n) {
|
|
2109
|
+
const r = Math.round(t / e);
|
|
2110
|
+
return r <= 1 ? o : n.replace(
|
|
1924
2111
|
"{}",
|
|
1925
|
-
|
|
2112
|
+
r.toLocaleString(void 0, {
|
|
1926
2113
|
maximumFractionDigits: 0,
|
|
1927
2114
|
minimumFractionDigits: 0
|
|
1928
2115
|
})
|
|
1929
2116
|
);
|
|
1930
2117
|
}
|
|
1931
|
-
const
|
|
1932
|
-
const e =
|
|
2118
|
+
const Qn = (t = 1e3) => {
|
|
2119
|
+
const e = M(/* @__PURE__ */ new Date()), o = He(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1933
2120
|
return e.onDispose(o), e;
|
|
1934
|
-
},
|
|
2121
|
+
}, Jn = (t) => {
|
|
1935
2122
|
const e = Math.abs(t);
|
|
1936
|
-
if (e <
|
|
2123
|
+
if (e < xt)
|
|
1937
2124
|
return t < 0 ? "just now" : "in a moment";
|
|
1938
|
-
for (const o of
|
|
2125
|
+
for (const o of Xn)
|
|
1939
2126
|
if (e < o.max)
|
|
1940
|
-
return t < 0 ?
|
|
2127
|
+
return t < 0 ? re(e, o.value, o.past.singular, o.past.plural) : re(e, o.value, o.future.singular, o.future.plural);
|
|
1941
2128
|
throw new Error("unreachable");
|
|
1942
|
-
},
|
|
1943
|
-
const n = e != null ?
|
|
2129
|
+
}, Gn = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
2130
|
+
const n = e != null ? ie.is(e) ? e.derive() : M(e) : Qn(o), r = fe(
|
|
1944
2131
|
t,
|
|
1945
2132
|
n
|
|
1946
|
-
)((
|
|
1947
|
-
return
|
|
1948
|
-
},
|
|
1949
|
-
const o =
|
|
2133
|
+
)((i, s) => i.getTime() - s.getTime());
|
|
2134
|
+
return r.onDispose(() => k.dispose(n)), r;
|
|
2135
|
+
}, Zn = (t, e = {}) => {
|
|
2136
|
+
const o = Gn(t, e), n = o.map(Jn);
|
|
1950
2137
|
return n.onDispose(o.dispose), n;
|
|
1951
|
-
},
|
|
1952
|
-
class
|
|
2138
|
+
}, Ro = (t, e = {}) => Zn(t, e);
|
|
2139
|
+
class to extends Ve {
|
|
1953
2140
|
constructor() {
|
|
1954
2141
|
super(...arguments);
|
|
1955
2142
|
/**
|
|
1956
2143
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1957
2144
|
* @returns void
|
|
1958
2145
|
*/
|
|
1959
|
-
|
|
2146
|
+
Lt(this, "tick", () => this.update((o) => o + 1));
|
|
1960
2147
|
}
|
|
1961
2148
|
}
|
|
1962
|
-
const
|
|
2149
|
+
const Lo = (t = 0) => new to(t, (e, o) => e === o);
|
|
1963
2150
|
export {
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2151
|
+
Ge as Anchor,
|
|
2152
|
+
so as Appearance,
|
|
2153
|
+
ge as AsyncResultView,
|
|
2154
|
+
ro as AutoFocus,
|
|
2155
|
+
io as AutoSelect,
|
|
2156
|
+
Oo as ChildRouter,
|
|
2157
|
+
vo as ElementRect,
|
|
2158
|
+
lo as HTMLTitle,
|
|
2159
|
+
ao as HiddenWhenEmpty,
|
|
2160
|
+
nn as InViewport,
|
|
2161
|
+
$t as Location,
|
|
2162
|
+
mo as Mutation,
|
|
2163
|
+
cn as MutationDisplay,
|
|
2164
|
+
on as OnClickOutside,
|
|
2165
|
+
fo as OnEnterKey,
|
|
2166
|
+
ho as OnEscapeKey,
|
|
2167
|
+
pe as OnKeyPressed,
|
|
2168
|
+
po as PopOver,
|
|
2169
|
+
wo as Query,
|
|
2170
|
+
Un as QueryDisplay,
|
|
1984
2171
|
Rt as Rect,
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
_e as useAppearance
|
|
2172
|
+
jn as ResultView,
|
|
2173
|
+
Ao as RootRouter,
|
|
2174
|
+
Ft as RouterContextProvider,
|
|
2175
|
+
yo as SelectOnFocus,
|
|
2176
|
+
to as Ticker,
|
|
2177
|
+
uo as WhenInViewport,
|
|
2178
|
+
xo as WindowSize,
|
|
2179
|
+
ze as _checkExtensionCondition,
|
|
2180
|
+
$e as _getExtension,
|
|
2181
|
+
bo as _makeRouteMatcher,
|
|
2182
|
+
Se as _parseRouteSegments,
|
|
2183
|
+
go as allPlacements,
|
|
2184
|
+
Ke as areLocationsEqual,
|
|
2185
|
+
co as classes,
|
|
2186
|
+
ee as getAbsoluteRect,
|
|
2187
|
+
_e as handleAnchorClick,
|
|
2188
|
+
Tt as locationFromURL,
|
|
2189
|
+
rn as makeMutationResource,
|
|
2190
|
+
Kn as makeQueryResource,
|
|
2191
|
+
sn as matchesKeyCombo,
|
|
2192
|
+
In as matchesRoute,
|
|
2193
|
+
Qn as nowSignal,
|
|
2194
|
+
Ro as relativeTime,
|
|
2195
|
+
Gn as relativeTimeMillisSignal,
|
|
2196
|
+
Zn as relativeTimeSignal,
|
|
2197
|
+
Lo as ticker,
|
|
2198
|
+
Jn as timeDiffToString,
|
|
2199
|
+
pt as urlFromLocation,
|
|
2200
|
+
Ze as useAppearance
|
|
2015
2201
|
};
|