@tempots/ui 8.0.2 → 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 +1117 -947
- package/package.json +2 -2
- package/renderables/anchor.d.ts +2 -5
- package/renderables/mutation.d.ts +6 -17
- 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 We = (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 = ue(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 ($e(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
|
-
}, He = () => {
|
|
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
|
+
}
|
|
101
106
|
};
|
|
102
|
-
},
|
|
103
|
-
|
|
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
|
+
}
|
|
269
|
+
};
|
|
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
|
-
}) : jt(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,239 +353,223 @@ const Zn = 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
|
-
(d) =>
|
|
270
|
-
), a =
|
|
271
|
-
(d) =>
|
|
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 (d,
|
|
281
|
-
|
|
282
|
-
const g =
|
|
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
465
|
cancel: (d) => {
|
|
293
|
-
|
|
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
|
-
|
|
302
|
-
|
|
303
|
-
l
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
previous: m,
|
|
312
|
-
retry: f,
|
|
313
|
-
execute: h,
|
|
314
|
-
cancel: t.cancel
|
|
315
|
-
}) : void 0,
|
|
316
|
-
failure: i != null ? (m) => i({ error: m, retry: f, execute: h }) : void 0,
|
|
317
|
-
success: (m) => c({ value: m, execute: h }),
|
|
318
|
-
notAsked: () => a({ execute: h })
|
|
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),
|
|
476
|
+
l({
|
|
477
|
+
previous: u,
|
|
478
|
+
execute: r,
|
|
479
|
+
cancel: i,
|
|
480
|
+
pending: s,
|
|
481
|
+
error: c,
|
|
482
|
+
value: a,
|
|
483
|
+
status: o
|
|
319
484
|
})
|
|
320
485
|
);
|
|
321
|
-
},
|
|
486
|
+
}, mo = ({
|
|
322
487
|
mutate: t,
|
|
323
|
-
convertError: e = (
|
|
488
|
+
convertError: e = (s) => s,
|
|
324
489
|
onSuccess: o,
|
|
325
490
|
onError: n,
|
|
326
|
-
onSettled:
|
|
327
|
-
|
|
328
|
-
failure: i,
|
|
329
|
-
success: c,
|
|
330
|
-
notAsked: a
|
|
491
|
+
onSettled: r,
|
|
492
|
+
content: i
|
|
331
493
|
}) => {
|
|
332
|
-
const
|
|
494
|
+
const s = rn({
|
|
333
495
|
mutate: t,
|
|
334
496
|
convertError: e,
|
|
335
497
|
onSuccess: o,
|
|
336
498
|
onError: n,
|
|
337
|
-
onSettled:
|
|
338
|
-
});
|
|
339
|
-
return Je(l, {
|
|
340
|
-
pending: r,
|
|
341
|
-
failure: i,
|
|
342
|
-
success: c,
|
|
343
|
-
notAsked: a
|
|
499
|
+
onSettled: r
|
|
344
500
|
});
|
|
345
|
-
|
|
501
|
+
return cn(s, { content: i });
|
|
502
|
+
}, tt = Math.min, X = Math.max, wt = Math.round, mt = Math.floor, H = (t) => ({
|
|
346
503
|
x: t,
|
|
347
504
|
y: t
|
|
348
|
-
}),
|
|
505
|
+
}), an = {
|
|
349
506
|
left: "right",
|
|
350
507
|
right: "left",
|
|
351
508
|
bottom: "top",
|
|
352
509
|
top: "bottom"
|
|
353
|
-
},
|
|
510
|
+
}, ln = {
|
|
354
511
|
start: "end",
|
|
355
512
|
end: "start"
|
|
356
513
|
};
|
|
357
|
-
function
|
|
358
|
-
return
|
|
514
|
+
function Ct(t, e, o) {
|
|
515
|
+
return X(t, tt(e, o));
|
|
359
516
|
}
|
|
360
|
-
function
|
|
517
|
+
function ut(t, e) {
|
|
361
518
|
return typeof t == "function" ? t(e) : t;
|
|
362
519
|
}
|
|
363
520
|
function Q(t) {
|
|
364
521
|
return t.split("-")[0];
|
|
365
522
|
}
|
|
366
|
-
function
|
|
523
|
+
function ft(t) {
|
|
367
524
|
return t.split("-")[1];
|
|
368
525
|
}
|
|
369
|
-
function
|
|
526
|
+
function we(t) {
|
|
370
527
|
return t === "x" ? "y" : "x";
|
|
371
528
|
}
|
|
372
|
-
function
|
|
529
|
+
function zt(t) {
|
|
373
530
|
return t === "y" ? "height" : "width";
|
|
374
531
|
}
|
|
375
|
-
function
|
|
532
|
+
function U(t) {
|
|
376
533
|
return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
|
|
377
534
|
}
|
|
378
535
|
function Bt(t) {
|
|
379
|
-
return
|
|
536
|
+
return we(U(t));
|
|
380
537
|
}
|
|
381
|
-
function
|
|
538
|
+
function un(t, e, o) {
|
|
382
539
|
o === void 0 && (o = !1);
|
|
383
|
-
const n =
|
|
384
|
-
let
|
|
385
|
-
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)];
|
|
386
543
|
}
|
|
387
|
-
function
|
|
388
|
-
const e =
|
|
389
|
-
return [
|
|
544
|
+
function fn(t) {
|
|
545
|
+
const e = yt(t);
|
|
546
|
+
return [Dt(t), e, Dt(e)];
|
|
390
547
|
}
|
|
391
|
-
function
|
|
392
|
-
return t.replace(/start|end/g, (e) =>
|
|
548
|
+
function Dt(t) {
|
|
549
|
+
return t.replace(/start|end/g, (e) => ln[e]);
|
|
393
550
|
}
|
|
394
|
-
function
|
|
395
|
-
const n = ["left", "right"],
|
|
551
|
+
function hn(t, e, o) {
|
|
552
|
+
const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
396
553
|
switch (t) {
|
|
397
554
|
case "top":
|
|
398
555
|
case "bottom":
|
|
399
|
-
return o ? e ?
|
|
556
|
+
return o ? e ? r : n : e ? n : r;
|
|
400
557
|
case "left":
|
|
401
558
|
case "right":
|
|
402
|
-
return e ?
|
|
559
|
+
return e ? i : s;
|
|
403
560
|
default:
|
|
404
561
|
return [];
|
|
405
562
|
}
|
|
406
563
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
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;
|
|
411
568
|
}
|
|
412
|
-
function
|
|
413
|
-
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]);
|
|
414
571
|
}
|
|
415
|
-
function
|
|
572
|
+
function mn(t) {
|
|
416
573
|
return {
|
|
417
574
|
top: 0,
|
|
418
575
|
right: 0,
|
|
@@ -421,295 +578,295 @@ function sn(t) {
|
|
|
421
578
|
...t
|
|
422
579
|
};
|
|
423
580
|
}
|
|
424
|
-
function
|
|
425
|
-
return typeof t != "number" ?
|
|
581
|
+
function ye(t) {
|
|
582
|
+
return typeof t != "number" ? mn(t) : {
|
|
426
583
|
top: t,
|
|
427
584
|
right: t,
|
|
428
585
|
bottom: t,
|
|
429
586
|
left: t
|
|
430
587
|
};
|
|
431
588
|
}
|
|
432
|
-
function
|
|
589
|
+
function vt(t) {
|
|
433
590
|
const {
|
|
434
591
|
x: e,
|
|
435
592
|
y: o,
|
|
436
593
|
width: n,
|
|
437
|
-
height:
|
|
594
|
+
height: r
|
|
438
595
|
} = t;
|
|
439
596
|
return {
|
|
440
597
|
width: n,
|
|
441
|
-
height:
|
|
598
|
+
height: r,
|
|
442
599
|
top: o,
|
|
443
600
|
left: e,
|
|
444
601
|
right: e + n,
|
|
445
|
-
bottom: o +
|
|
602
|
+
bottom: o + r,
|
|
446
603
|
x: e,
|
|
447
604
|
y: o
|
|
448
605
|
};
|
|
449
606
|
}
|
|
450
|
-
function
|
|
607
|
+
function Qt(t, e, o) {
|
|
451
608
|
let {
|
|
452
609
|
reference: n,
|
|
453
|
-
floating:
|
|
610
|
+
floating: r
|
|
454
611
|
} = t;
|
|
455
|
-
const
|
|
456
|
-
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;
|
|
457
614
|
switch (a) {
|
|
458
615
|
case "top":
|
|
459
|
-
|
|
460
|
-
x:
|
|
461
|
-
y: n.y -
|
|
616
|
+
f = {
|
|
617
|
+
x: u,
|
|
618
|
+
y: n.y - r.height
|
|
462
619
|
};
|
|
463
620
|
break;
|
|
464
621
|
case "bottom":
|
|
465
|
-
|
|
466
|
-
x:
|
|
622
|
+
f = {
|
|
623
|
+
x: u,
|
|
467
624
|
y: n.y + n.height
|
|
468
625
|
};
|
|
469
626
|
break;
|
|
470
627
|
case "right":
|
|
471
|
-
|
|
628
|
+
f = {
|
|
472
629
|
x: n.x + n.width,
|
|
473
630
|
y: h
|
|
474
631
|
};
|
|
475
632
|
break;
|
|
476
633
|
case "left":
|
|
477
|
-
|
|
478
|
-
x: n.x -
|
|
634
|
+
f = {
|
|
635
|
+
x: n.x - r.width,
|
|
479
636
|
y: h
|
|
480
637
|
};
|
|
481
638
|
break;
|
|
482
639
|
default:
|
|
483
|
-
|
|
640
|
+
f = {
|
|
484
641
|
x: n.x,
|
|
485
642
|
y: n.y
|
|
486
643
|
};
|
|
487
644
|
}
|
|
488
|
-
switch (
|
|
645
|
+
switch (ft(e)) {
|
|
489
646
|
case "start":
|
|
490
|
-
|
|
647
|
+
f[s] -= p * (o && l ? -1 : 1);
|
|
491
648
|
break;
|
|
492
649
|
case "end":
|
|
493
|
-
|
|
650
|
+
f[s] += p * (o && l ? -1 : 1);
|
|
494
651
|
break;
|
|
495
652
|
}
|
|
496
|
-
return
|
|
653
|
+
return f;
|
|
497
654
|
}
|
|
498
|
-
const
|
|
655
|
+
const gn = async (t, e, o) => {
|
|
499
656
|
const {
|
|
500
657
|
placement: n = "bottom",
|
|
501
|
-
strategy:
|
|
502
|
-
middleware:
|
|
503
|
-
platform:
|
|
504
|
-
} = o, c =
|
|
505
|
-
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({
|
|
506
663
|
reference: t,
|
|
507
664
|
floating: e,
|
|
508
|
-
strategy:
|
|
665
|
+
strategy: r
|
|
509
666
|
}), {
|
|
510
|
-
x:
|
|
667
|
+
x: u,
|
|
511
668
|
y: h
|
|
512
|
-
} =
|
|
513
|
-
for (let
|
|
669
|
+
} = Qt(l, n, a), p = n, f = {}, d = 0;
|
|
670
|
+
for (let w = 0; w < c.length; w++) {
|
|
514
671
|
const {
|
|
515
672
|
name: g,
|
|
516
673
|
fn: y
|
|
517
|
-
} = c[
|
|
518
|
-
x
|
|
519
|
-
y:
|
|
520
|
-
data:
|
|
521
|
-
reset:
|
|
674
|
+
} = c[w], {
|
|
675
|
+
x,
|
|
676
|
+
y: v,
|
|
677
|
+
data: R,
|
|
678
|
+
reset: O
|
|
522
679
|
} = await y({
|
|
523
|
-
x:
|
|
680
|
+
x: u,
|
|
524
681
|
y: h,
|
|
525
682
|
initialPlacement: n,
|
|
526
|
-
placement:
|
|
527
|
-
strategy:
|
|
528
|
-
middlewareData:
|
|
683
|
+
placement: p,
|
|
684
|
+
strategy: r,
|
|
685
|
+
middlewareData: f,
|
|
529
686
|
rects: l,
|
|
530
|
-
platform:
|
|
687
|
+
platform: s,
|
|
531
688
|
elements: {
|
|
532
689
|
reference: t,
|
|
533
690
|
floating: e
|
|
534
691
|
}
|
|
535
692
|
});
|
|
536
|
-
|
|
537
|
-
...
|
|
693
|
+
u = x ?? u, h = v ?? h, f = {
|
|
694
|
+
...f,
|
|
538
695
|
[g]: {
|
|
539
|
-
...
|
|
540
|
-
...
|
|
696
|
+
...f[g],
|
|
697
|
+
...R
|
|
541
698
|
}
|
|
542
|
-
},
|
|
699
|
+
}, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (l = O.rects === !0 ? await s.getElementRects({
|
|
543
700
|
reference: t,
|
|
544
701
|
floating: e,
|
|
545
|
-
strategy:
|
|
546
|
-
}) :
|
|
547
|
-
x:
|
|
702
|
+
strategy: r
|
|
703
|
+
}) : O.rects), {
|
|
704
|
+
x: u,
|
|
548
705
|
y: h
|
|
549
|
-
} =
|
|
706
|
+
} = Qt(l, p, a)), w = -1);
|
|
550
707
|
}
|
|
551
708
|
return {
|
|
552
|
-
x:
|
|
709
|
+
x: u,
|
|
553
710
|
y: h,
|
|
554
|
-
placement:
|
|
555
|
-
strategy:
|
|
556
|
-
middlewareData:
|
|
711
|
+
placement: p,
|
|
712
|
+
strategy: r,
|
|
713
|
+
middlewareData: f
|
|
557
714
|
};
|
|
558
715
|
};
|
|
559
|
-
async function
|
|
716
|
+
async function ve(t, e) {
|
|
560
717
|
var o;
|
|
561
718
|
e === void 0 && (e = {});
|
|
562
719
|
const {
|
|
563
720
|
x: n,
|
|
564
|
-
y:
|
|
565
|
-
platform:
|
|
566
|
-
rects:
|
|
721
|
+
y: r,
|
|
722
|
+
platform: i,
|
|
723
|
+
rects: s,
|
|
567
724
|
elements: c,
|
|
568
725
|
strategy: a
|
|
569
726
|
} = t, {
|
|
570
727
|
boundary: l = "clippingAncestors",
|
|
571
|
-
rootBoundary:
|
|
728
|
+
rootBoundary: u = "viewport",
|
|
572
729
|
elementContext: h = "floating",
|
|
573
|
-
altBoundary:
|
|
574
|
-
padding:
|
|
575
|
-
} =
|
|
576
|
-
element: (o = await (
|
|
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)),
|
|
577
734
|
boundary: l,
|
|
578
|
-
rootBoundary:
|
|
735
|
+
rootBoundary: u,
|
|
579
736
|
strategy: a
|
|
580
|
-
})),
|
|
737
|
+
})), x = h === "floating" ? {
|
|
581
738
|
x: n,
|
|
582
|
-
y:
|
|
583
|
-
width:
|
|
584
|
-
height:
|
|
585
|
-
} :
|
|
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)) || {
|
|
586
743
|
x: 1,
|
|
587
744
|
y: 1
|
|
588
745
|
} : {
|
|
589
746
|
x: 1,
|
|
590
747
|
y: 1
|
|
591
|
-
},
|
|
748
|
+
}, O = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
592
749
|
elements: c,
|
|
593
|
-
rect:
|
|
594
|
-
offsetParent:
|
|
750
|
+
rect: x,
|
|
751
|
+
offsetParent: v,
|
|
595
752
|
strategy: a
|
|
596
|
-
}) :
|
|
753
|
+
}) : x);
|
|
597
754
|
return {
|
|
598
|
-
top: (y.top -
|
|
599
|
-
bottom: (
|
|
600
|
-
left: (y.left -
|
|
601
|
-
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
|
|
602
759
|
};
|
|
603
760
|
}
|
|
604
|
-
const
|
|
761
|
+
const pn = (t) => ({
|
|
605
762
|
name: "arrow",
|
|
606
763
|
options: t,
|
|
607
764
|
async fn(e) {
|
|
608
765
|
const {
|
|
609
766
|
x: o,
|
|
610
767
|
y: n,
|
|
611
|
-
placement:
|
|
612
|
-
rects:
|
|
613
|
-
platform:
|
|
768
|
+
placement: r,
|
|
769
|
+
rects: i,
|
|
770
|
+
platform: s,
|
|
614
771
|
elements: c,
|
|
615
772
|
middlewareData: a
|
|
616
773
|
} = e, {
|
|
617
774
|
element: l,
|
|
618
|
-
padding:
|
|
619
|
-
} =
|
|
775
|
+
padding: u = 0
|
|
776
|
+
} = ut(t, e) || {};
|
|
620
777
|
if (l == null)
|
|
621
778
|
return {};
|
|
622
|
-
const h =
|
|
779
|
+
const h = ye(u), p = {
|
|
623
780
|
x: o,
|
|
624
781
|
y: n
|
|
625
|
-
},
|
|
626
|
-
let
|
|
627
|
-
(!
|
|
628
|
-
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;
|
|
629
786
|
return {
|
|
630
|
-
[
|
|
787
|
+
[f]: p[f] + C,
|
|
631
788
|
data: {
|
|
632
|
-
[
|
|
633
|
-
centerOffset:
|
|
789
|
+
[f]: q,
|
|
790
|
+
centerOffset: P - q - C,
|
|
634
791
|
...B && {
|
|
635
|
-
alignmentOffset:
|
|
792
|
+
alignmentOffset: C
|
|
636
793
|
}
|
|
637
794
|
},
|
|
638
795
|
reset: B
|
|
639
796
|
};
|
|
640
797
|
}
|
|
641
|
-
}),
|
|
798
|
+
}), wn = function(t) {
|
|
642
799
|
return t === void 0 && (t = {}), {
|
|
643
800
|
name: "flip",
|
|
644
801
|
options: t,
|
|
645
802
|
async fn(e) {
|
|
646
803
|
var o, n;
|
|
647
804
|
const {
|
|
648
|
-
placement:
|
|
649
|
-
middlewareData:
|
|
650
|
-
rects:
|
|
805
|
+
placement: r,
|
|
806
|
+
middlewareData: i,
|
|
807
|
+
rects: s,
|
|
651
808
|
initialPlacement: c,
|
|
652
809
|
platform: a,
|
|
653
810
|
elements: l
|
|
654
811
|
} = e, {
|
|
655
|
-
mainAxis:
|
|
812
|
+
mainAxis: u = !0,
|
|
656
813
|
crossAxis: h = !0,
|
|
657
|
-
fallbackPlacements:
|
|
658
|
-
fallbackStrategy:
|
|
814
|
+
fallbackPlacements: p,
|
|
815
|
+
fallbackStrategy: f = "bestFit",
|
|
659
816
|
fallbackAxisSideDirection: d = "none",
|
|
660
|
-
flipAlignment:
|
|
817
|
+
flipAlignment: w = !0,
|
|
661
818
|
...g
|
|
662
|
-
} =
|
|
663
|
-
if ((o =
|
|
819
|
+
} = ut(t, e);
|
|
820
|
+
if ((o = i.arrow) != null && o.alignmentOffset)
|
|
664
821
|
return {};
|
|
665
|
-
const y = Q(
|
|
666
|
-
!
|
|
667
|
-
const
|
|
668
|
-
let
|
|
669
|
-
if (
|
|
670
|
-
const
|
|
671
|
-
|
|
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]]);
|
|
672
829
|
}
|
|
673
|
-
if (
|
|
674
|
-
placement:
|
|
675
|
-
overflows:
|
|
676
|
-
}],
|
|
677
|
-
var
|
|
678
|
-
const
|
|
679
|
-
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
|
|
680
837
|
// overflows the main axis.
|
|
681
|
-
|
|
838
|
+
E.every((D) => D.overflows[0] > 0 && U(D.placement) === x)))
|
|
682
839
|
return {
|
|
683
840
|
data: {
|
|
684
|
-
index:
|
|
685
|
-
overflows:
|
|
841
|
+
index: P,
|
|
842
|
+
overflows: E
|
|
686
843
|
},
|
|
687
844
|
reset: {
|
|
688
|
-
placement:
|
|
845
|
+
placement: q
|
|
689
846
|
}
|
|
690
847
|
};
|
|
691
|
-
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;
|
|
692
849
|
if (!B)
|
|
693
|
-
switch (
|
|
850
|
+
switch (f) {
|
|
694
851
|
case "bestFit": {
|
|
695
|
-
var
|
|
696
|
-
const
|
|
697
|
-
if (
|
|
698
|
-
const
|
|
699
|
-
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
|
|
700
857
|
// reading directions favoring greater width.
|
|
701
|
-
|
|
858
|
+
K === "y";
|
|
702
859
|
}
|
|
703
860
|
return !0;
|
|
704
|
-
}).map((
|
|
705
|
-
|
|
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);
|
|
706
863
|
break;
|
|
707
864
|
}
|
|
708
865
|
case "initialPlacement":
|
|
709
866
|
B = c;
|
|
710
867
|
break;
|
|
711
868
|
}
|
|
712
|
-
if (
|
|
869
|
+
if (r !== B)
|
|
713
870
|
return {
|
|
714
871
|
reset: {
|
|
715
872
|
placement: B
|
|
@@ -720,15 +877,15 @@ const cn = (t) => ({
|
|
|
720
877
|
}
|
|
721
878
|
};
|
|
722
879
|
};
|
|
723
|
-
async function
|
|
880
|
+
async function yn(t, e) {
|
|
724
881
|
const {
|
|
725
882
|
placement: o,
|
|
726
883
|
platform: n,
|
|
727
|
-
elements:
|
|
728
|
-
} = 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);
|
|
729
886
|
let {
|
|
730
|
-
mainAxis:
|
|
731
|
-
crossAxis:
|
|
887
|
+
mainAxis: p,
|
|
888
|
+
crossAxis: f,
|
|
732
889
|
alignmentAxis: d
|
|
733
890
|
} = typeof h == "number" ? {
|
|
734
891
|
mainAxis: h,
|
|
@@ -739,37 +896,37 @@ async function ln(t, e) {
|
|
|
739
896
|
crossAxis: h.crossAxis || 0,
|
|
740
897
|
alignmentAxis: h.alignmentAxis
|
|
741
898
|
};
|
|
742
|
-
return c && typeof d == "number" && (
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
899
|
+
return c && typeof d == "number" && (f = c === "end" ? d * -1 : d), a ? {
|
|
900
|
+
x: f * u,
|
|
901
|
+
y: p * l
|
|
745
902
|
} : {
|
|
746
|
-
x:
|
|
747
|
-
y:
|
|
903
|
+
x: p * l,
|
|
904
|
+
y: f * u
|
|
748
905
|
};
|
|
749
906
|
}
|
|
750
|
-
const
|
|
907
|
+
const vn = function(t) {
|
|
751
908
|
return t === void 0 && (t = 0), {
|
|
752
909
|
name: "offset",
|
|
753
910
|
options: t,
|
|
754
911
|
async fn(e) {
|
|
755
912
|
var o, n;
|
|
756
913
|
const {
|
|
757
|
-
x:
|
|
758
|
-
y:
|
|
759
|
-
placement:
|
|
914
|
+
x: r,
|
|
915
|
+
y: i,
|
|
916
|
+
placement: s,
|
|
760
917
|
middlewareData: c
|
|
761
|
-
} = e, a = await
|
|
762
|
-
return
|
|
763
|
-
x:
|
|
764
|
-
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,
|
|
765
922
|
data: {
|
|
766
923
|
...a,
|
|
767
|
-
placement:
|
|
924
|
+
placement: s
|
|
768
925
|
}
|
|
769
926
|
};
|
|
770
927
|
}
|
|
771
928
|
};
|
|
772
|
-
},
|
|
929
|
+
}, xn = function(t) {
|
|
773
930
|
return t === void 0 && (t = {}), {
|
|
774
931
|
name: "shift",
|
|
775
932
|
options: t,
|
|
@@ -777,94 +934,94 @@ const un = function(t) {
|
|
|
777
934
|
const {
|
|
778
935
|
x: o,
|
|
779
936
|
y: n,
|
|
780
|
-
placement:
|
|
937
|
+
placement: r
|
|
781
938
|
} = e, {
|
|
782
|
-
mainAxis:
|
|
783
|
-
crossAxis:
|
|
939
|
+
mainAxis: i = !0,
|
|
940
|
+
crossAxis: s = !1,
|
|
784
941
|
limiter: c = {
|
|
785
942
|
fn: (g) => {
|
|
786
943
|
let {
|
|
787
944
|
x: y,
|
|
788
|
-
y:
|
|
945
|
+
y: x
|
|
789
946
|
} = g;
|
|
790
947
|
return {
|
|
791
948
|
x: y,
|
|
792
|
-
y:
|
|
949
|
+
y: x
|
|
793
950
|
};
|
|
794
951
|
}
|
|
795
952
|
},
|
|
796
953
|
...a
|
|
797
|
-
} =
|
|
954
|
+
} = ut(t, e), l = {
|
|
798
955
|
x: o,
|
|
799
956
|
y: n
|
|
800
|
-
},
|
|
801
|
-
let
|
|
802
|
-
if (r) {
|
|
803
|
-
const g = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", v = u + f[g], w = u - f[y];
|
|
804
|
-
u = Tt(v, u, w);
|
|
805
|
-
}
|
|
957
|
+
}, u = await ve(e, a), h = U(Q(r)), p = we(h);
|
|
958
|
+
let f = l[p], d = l[h];
|
|
806
959
|
if (i) {
|
|
807
|
-
const g =
|
|
808
|
-
|
|
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);
|
|
809
966
|
}
|
|
810
|
-
const
|
|
967
|
+
const w = c.fn({
|
|
811
968
|
...e,
|
|
812
|
-
[
|
|
969
|
+
[p]: f,
|
|
813
970
|
[h]: d
|
|
814
971
|
});
|
|
815
972
|
return {
|
|
816
|
-
...
|
|
973
|
+
...w,
|
|
817
974
|
data: {
|
|
818
|
-
x:
|
|
819
|
-
y:
|
|
975
|
+
x: w.x - o,
|
|
976
|
+
y: w.y - n,
|
|
820
977
|
enabled: {
|
|
821
|
-
[
|
|
822
|
-
[h]:
|
|
978
|
+
[p]: i,
|
|
979
|
+
[h]: s
|
|
823
980
|
}
|
|
824
981
|
}
|
|
825
982
|
};
|
|
826
983
|
}
|
|
827
984
|
};
|
|
828
985
|
};
|
|
829
|
-
function
|
|
986
|
+
function bt() {
|
|
830
987
|
return typeof window < "u";
|
|
831
988
|
}
|
|
832
|
-
function
|
|
833
|
-
return
|
|
989
|
+
function ot(t) {
|
|
990
|
+
return xe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
834
991
|
}
|
|
835
|
-
function
|
|
992
|
+
function S(t) {
|
|
836
993
|
var e;
|
|
837
994
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
838
995
|
}
|
|
839
|
-
function
|
|
996
|
+
function z(t) {
|
|
840
997
|
var e;
|
|
841
|
-
return (e = (
|
|
998
|
+
return (e = (xe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
842
999
|
}
|
|
843
|
-
function
|
|
844
|
-
return
|
|
1000
|
+
function xe(t) {
|
|
1001
|
+
return bt() ? t instanceof Node || t instanceof S(t).Node : !1;
|
|
845
1002
|
}
|
|
846
|
-
function
|
|
847
|
-
return
|
|
1003
|
+
function W(t) {
|
|
1004
|
+
return bt() ? t instanceof Element || t instanceof S(t).Element : !1;
|
|
848
1005
|
}
|
|
849
|
-
function
|
|
850
|
-
return
|
|
1006
|
+
function $(t) {
|
|
1007
|
+
return bt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
|
|
851
1008
|
}
|
|
852
|
-
function
|
|
853
|
-
return !
|
|
1009
|
+
function Jt(t) {
|
|
1010
|
+
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
854
1011
|
}
|
|
855
|
-
function
|
|
1012
|
+
function ht(t) {
|
|
856
1013
|
const {
|
|
857
1014
|
overflow: e,
|
|
858
1015
|
overflowX: o,
|
|
859
1016
|
overflowY: n,
|
|
860
|
-
display:
|
|
861
|
-
} =
|
|
862
|
-
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);
|
|
863
1020
|
}
|
|
864
|
-
function
|
|
865
|
-
return ["table", "td", "th"].includes(
|
|
1021
|
+
function bn(t) {
|
|
1022
|
+
return ["table", "td", "th"].includes(ot(t));
|
|
866
1023
|
}
|
|
867
|
-
function
|
|
1024
|
+
function At(t) {
|
|
868
1025
|
return [":popover-open", ":modal"].some((e) => {
|
|
869
1026
|
try {
|
|
870
1027
|
return t.matches(e);
|
|
@@ -873,32 +1030,32 @@ function xt(t) {
|
|
|
873
1030
|
}
|
|
874
1031
|
});
|
|
875
1032
|
}
|
|
876
|
-
function
|
|
877
|
-
const e =
|
|
1033
|
+
function _t(t) {
|
|
1034
|
+
const e = Kt(), o = W(t) ? F(t) : t;
|
|
878
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));
|
|
879
1036
|
}
|
|
880
|
-
function
|
|
881
|
-
let e =
|
|
882
|
-
for (;
|
|
883
|
-
if (
|
|
1037
|
+
function An(t) {
|
|
1038
|
+
let e = I(t);
|
|
1039
|
+
for (; $(e) && !et(e); ) {
|
|
1040
|
+
if (_t(e))
|
|
884
1041
|
return e;
|
|
885
|
-
if (
|
|
1042
|
+
if (At(e))
|
|
886
1043
|
return null;
|
|
887
|
-
e =
|
|
1044
|
+
e = I(e);
|
|
888
1045
|
}
|
|
889
1046
|
return null;
|
|
890
1047
|
}
|
|
891
|
-
function
|
|
1048
|
+
function Kt() {
|
|
892
1049
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
893
1050
|
}
|
|
894
1051
|
function et(t) {
|
|
895
|
-
return ["html", "body", "#document"].includes(
|
|
1052
|
+
return ["html", "body", "#document"].includes(ot(t));
|
|
896
1053
|
}
|
|
897
|
-
function
|
|
898
|
-
return
|
|
1054
|
+
function F(t) {
|
|
1055
|
+
return S(t).getComputedStyle(t);
|
|
899
1056
|
}
|
|
900
|
-
function
|
|
901
|
-
return
|
|
1057
|
+
function Ot(t) {
|
|
1058
|
+
return W(t) ? {
|
|
902
1059
|
scrollLeft: t.scrollLeft,
|
|
903
1060
|
scrollTop: t.scrollTop
|
|
904
1061
|
} : {
|
|
@@ -906,223 +1063,223 @@ function bt(t) {
|
|
|
906
1063
|
scrollTop: t.scrollY
|
|
907
1064
|
};
|
|
908
1065
|
}
|
|
909
|
-
function
|
|
910
|
-
if (
|
|
1066
|
+
function I(t) {
|
|
1067
|
+
if (ot(t) === "html")
|
|
911
1068
|
return t;
|
|
912
1069
|
const e = (
|
|
913
1070
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
914
1071
|
t.assignedSlot || // DOM Element detected.
|
|
915
1072
|
t.parentNode || // ShadowRoot detected.
|
|
916
|
-
|
|
917
|
-
|
|
1073
|
+
Jt(t) && t.host || // Fallback.
|
|
1074
|
+
z(t)
|
|
918
1075
|
);
|
|
919
|
-
return
|
|
1076
|
+
return Jt(e) ? e.host : e;
|
|
920
1077
|
}
|
|
921
|
-
function
|
|
922
|
-
const e =
|
|
923
|
-
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);
|
|
924
1081
|
}
|
|
925
|
-
function
|
|
1082
|
+
function at(t, e, o) {
|
|
926
1083
|
var n;
|
|
927
1084
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
930
|
-
const c =
|
|
931
|
-
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) : []);
|
|
932
1089
|
}
|
|
933
|
-
return e.concat(
|
|
1090
|
+
return e.concat(r, at(r, [], o));
|
|
934
1091
|
}
|
|
935
|
-
function
|
|
1092
|
+
function Wt(t) {
|
|
936
1093
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
937
1094
|
}
|
|
938
|
-
function
|
|
939
|
-
const e =
|
|
1095
|
+
function Ae(t) {
|
|
1096
|
+
const e = F(t);
|
|
940
1097
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
941
|
-
const
|
|
942
|
-
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), {
|
|
943
1100
|
width: o,
|
|
944
1101
|
height: n,
|
|
945
1102
|
$: c
|
|
946
1103
|
};
|
|
947
1104
|
}
|
|
948
|
-
function
|
|
949
|
-
return
|
|
1105
|
+
function Ut(t) {
|
|
1106
|
+
return W(t) ? t : t.contextElement;
|
|
950
1107
|
}
|
|
951
1108
|
function Z(t) {
|
|
952
|
-
const e =
|
|
953
|
-
if (
|
|
954
|
-
return
|
|
1109
|
+
const e = Ut(t);
|
|
1110
|
+
if (!$(e))
|
|
1111
|
+
return H(1);
|
|
955
1112
|
const o = e.getBoundingClientRect(), {
|
|
956
1113
|
width: n,
|
|
957
|
-
height:
|
|
958
|
-
$:
|
|
959
|
-
} =
|
|
960
|
-
let
|
|
961
|
-
return (!
|
|
962
|
-
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,
|
|
963
1120
|
y: c
|
|
964
1121
|
};
|
|
965
1122
|
}
|
|
966
|
-
const
|
|
967
|
-
function
|
|
968
|
-
const e =
|
|
969
|
-
return !
|
|
1123
|
+
const On = /* @__PURE__ */ H(0);
|
|
1124
|
+
function Oe(t) {
|
|
1125
|
+
const e = S(t);
|
|
1126
|
+
return !Kt() || !e.visualViewport ? On : {
|
|
970
1127
|
x: e.visualViewport.offsetLeft,
|
|
971
1128
|
y: e.visualViewport.offsetTop
|
|
972
1129
|
};
|
|
973
1130
|
}
|
|
974
|
-
function
|
|
975
|
-
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;
|
|
976
1133
|
}
|
|
977
1134
|
function J(t, e, o, n) {
|
|
978
1135
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
979
|
-
const
|
|
980
|
-
let
|
|
981
|
-
e && (n ?
|
|
982
|
-
const c =
|
|
983
|
-
let a = (
|
|
984
|
-
if (
|
|
985
|
-
const
|
|
986
|
-
let d =
|
|
987
|
-
for (;
|
|
988
|
-
const g = Z(
|
|
989
|
-
a *= g.x, l *= g.y,
|
|
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);
|
|
990
1147
|
}
|
|
991
1148
|
}
|
|
992
|
-
return
|
|
993
|
-
width:
|
|
1149
|
+
return vt({
|
|
1150
|
+
width: u,
|
|
994
1151
|
height: h,
|
|
995
1152
|
x: a,
|
|
996
1153
|
y: l
|
|
997
1154
|
});
|
|
998
1155
|
}
|
|
999
|
-
function
|
|
1000
|
-
const o =
|
|
1001
|
-
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;
|
|
1002
1159
|
}
|
|
1003
|
-
function
|
|
1160
|
+
function Re(t, e, o) {
|
|
1004
1161
|
o === void 0 && (o = !1);
|
|
1005
|
-
const n = t.getBoundingClientRect(),
|
|
1162
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
|
|
1006
1163
|
// RTL <body> scrollbar.
|
|
1007
|
-
|
|
1008
|
-
)),
|
|
1164
|
+
jt(t, n)
|
|
1165
|
+
)), i = n.top + e.scrollTop;
|
|
1009
1166
|
return {
|
|
1010
|
-
x:
|
|
1011
|
-
y:
|
|
1167
|
+
x: r,
|
|
1168
|
+
y: i
|
|
1012
1169
|
};
|
|
1013
1170
|
}
|
|
1014
|
-
function
|
|
1171
|
+
function Ln(t) {
|
|
1015
1172
|
let {
|
|
1016
1173
|
elements: e,
|
|
1017
1174
|
rect: o,
|
|
1018
1175
|
offsetParent: n,
|
|
1019
|
-
strategy:
|
|
1176
|
+
strategy: r
|
|
1020
1177
|
} = t;
|
|
1021
|
-
const
|
|
1022
|
-
if (n ===
|
|
1178
|
+
const i = r === "fixed", s = z(n), c = e ? At(e.floating) : !1;
|
|
1179
|
+
if (n === s || c && i)
|
|
1023
1180
|
return o;
|
|
1024
1181
|
let a = {
|
|
1025
1182
|
scrollLeft: 0,
|
|
1026
1183
|
scrollTop: 0
|
|
1027
|
-
}, l =
|
|
1028
|
-
const
|
|
1029
|
-
if ((h || !h && !
|
|
1030
|
-
const
|
|
1031
|
-
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;
|
|
1032
1189
|
}
|
|
1033
|
-
const
|
|
1190
|
+
const p = s && !h && !i ? Re(s, a, !0) : H(0);
|
|
1034
1191
|
return {
|
|
1035
1192
|
width: o.width * l.x,
|
|
1036
1193
|
height: o.height * l.y,
|
|
1037
|
-
x: o.x * l.x - a.scrollLeft * l.x +
|
|
1038
|
-
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
|
|
1039
1196
|
};
|
|
1040
1197
|
}
|
|
1041
|
-
function
|
|
1198
|
+
function En(t) {
|
|
1042
1199
|
return Array.from(t.getClientRects());
|
|
1043
1200
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const e =
|
|
1046
|
-
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);
|
|
1047
1204
|
const c = -o.scrollTop;
|
|
1048
|
-
return
|
|
1049
|
-
width:
|
|
1050
|
-
height:
|
|
1051
|
-
x:
|
|
1205
|
+
return F(n).direction === "rtl" && (s += X(e.clientWidth, n.clientWidth) - r), {
|
|
1206
|
+
width: r,
|
|
1207
|
+
height: i,
|
|
1208
|
+
x: s,
|
|
1052
1209
|
y: c
|
|
1053
1210
|
};
|
|
1054
1211
|
}
|
|
1055
|
-
function
|
|
1056
|
-
const o =
|
|
1057
|
-
let
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
const l =
|
|
1061
|
-
(!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);
|
|
1062
1219
|
}
|
|
1063
1220
|
return {
|
|
1064
|
-
width:
|
|
1065
|
-
height:
|
|
1221
|
+
width: i,
|
|
1222
|
+
height: s,
|
|
1066
1223
|
x: c,
|
|
1067
1224
|
y: a
|
|
1068
1225
|
};
|
|
1069
1226
|
}
|
|
1070
|
-
function
|
|
1071
|
-
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;
|
|
1072
1229
|
return {
|
|
1073
|
-
width:
|
|
1230
|
+
width: s,
|
|
1074
1231
|
height: c,
|
|
1075
1232
|
x: a,
|
|
1076
1233
|
y: l
|
|
1077
1234
|
};
|
|
1078
1235
|
}
|
|
1079
|
-
function
|
|
1236
|
+
function Gt(t, e, o) {
|
|
1080
1237
|
let n;
|
|
1081
1238
|
if (e === "viewport")
|
|
1082
|
-
n =
|
|
1239
|
+
n = Sn(t, o);
|
|
1083
1240
|
else if (e === "document")
|
|
1084
|
-
n =
|
|
1085
|
-
else if (
|
|
1086
|
-
n =
|
|
1241
|
+
n = Pn(z(t));
|
|
1242
|
+
else if (W(e))
|
|
1243
|
+
n = Tn(e, o);
|
|
1087
1244
|
else {
|
|
1088
|
-
const
|
|
1245
|
+
const r = Oe(t);
|
|
1089
1246
|
n = {
|
|
1090
|
-
x: e.x -
|
|
1091
|
-
y: e.y -
|
|
1247
|
+
x: e.x - r.x,
|
|
1248
|
+
y: e.y - r.y,
|
|
1092
1249
|
width: e.width,
|
|
1093
1250
|
height: e.height
|
|
1094
1251
|
};
|
|
1095
1252
|
}
|
|
1096
|
-
return
|
|
1253
|
+
return vt(n);
|
|
1097
1254
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const o =
|
|
1100
|
-
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);
|
|
1101
1258
|
}
|
|
1102
|
-
function
|
|
1259
|
+
function kn(t, e) {
|
|
1103
1260
|
const o = e.get(t);
|
|
1104
1261
|
if (o)
|
|
1105
1262
|
return o;
|
|
1106
|
-
let n =
|
|
1107
|
-
const
|
|
1108
|
-
let
|
|
1109
|
-
for (;
|
|
1110
|
-
const c =
|
|
1111
|
-
!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);
|
|
1112
1269
|
}
|
|
1113
1270
|
return e.set(t, n), n;
|
|
1114
1271
|
}
|
|
1115
|
-
function
|
|
1272
|
+
function Cn(t) {
|
|
1116
1273
|
let {
|
|
1117
1274
|
element: e,
|
|
1118
1275
|
boundary: o,
|
|
1119
1276
|
rootBoundary: n,
|
|
1120
|
-
strategy:
|
|
1277
|
+
strategy: r
|
|
1121
1278
|
} = t;
|
|
1122
|
-
const
|
|
1123
|
-
const h =
|
|
1124
|
-
return l.top =
|
|
1125
|
-
},
|
|
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));
|
|
1126
1283
|
return {
|
|
1127
1284
|
width: a.right - a.left,
|
|
1128
1285
|
height: a.bottom - a.top,
|
|
@@ -1130,73 +1287,73 @@ function Rn(t) {
|
|
|
1130
1287
|
y: a.top
|
|
1131
1288
|
};
|
|
1132
1289
|
}
|
|
1133
|
-
function
|
|
1290
|
+
function Dn(t) {
|
|
1134
1291
|
const {
|
|
1135
1292
|
width: e,
|
|
1136
1293
|
height: o
|
|
1137
|
-
} =
|
|
1294
|
+
} = Ae(t);
|
|
1138
1295
|
return {
|
|
1139
1296
|
width: e,
|
|
1140
1297
|
height: o
|
|
1141
1298
|
};
|
|
1142
1299
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const n =
|
|
1300
|
+
function Wn(t, e, o) {
|
|
1301
|
+
const n = $(e), r = z(e), i = o === "fixed", s = J(t, !0, i, e);
|
|
1145
1302
|
let c = {
|
|
1146
1303
|
scrollLeft: 0,
|
|
1147
1304
|
scrollTop: 0
|
|
1148
1305
|
};
|
|
1149
|
-
const a =
|
|
1306
|
+
const a = H(0);
|
|
1150
1307
|
function l() {
|
|
1151
|
-
a.x =
|
|
1308
|
+
a.x = jt(r);
|
|
1152
1309
|
}
|
|
1153
|
-
if (n || !n && !
|
|
1154
|
-
if ((
|
|
1155
|
-
const
|
|
1156
|
-
a.x =
|
|
1157
|
-
} else
|
|
1158
|
-
|
|
1159
|
-
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;
|
|
1160
1317
|
return {
|
|
1161
1318
|
x: h,
|
|
1162
|
-
y:
|
|
1163
|
-
width:
|
|
1164
|
-
height:
|
|
1319
|
+
y: p,
|
|
1320
|
+
width: s.width,
|
|
1321
|
+
height: s.height
|
|
1165
1322
|
};
|
|
1166
1323
|
}
|
|
1167
|
-
function
|
|
1168
|
-
return
|
|
1324
|
+
function Et(t) {
|
|
1325
|
+
return F(t).position === "static";
|
|
1169
1326
|
}
|
|
1170
|
-
function
|
|
1171
|
-
if (
|
|
1327
|
+
function Zt(t, e) {
|
|
1328
|
+
if (!$(t) || F(t).position === "fixed")
|
|
1172
1329
|
return null;
|
|
1173
1330
|
if (e)
|
|
1174
1331
|
return e(t);
|
|
1175
1332
|
let o = t.offsetParent;
|
|
1176
|
-
return
|
|
1333
|
+
return z(t) === o && (o = o.ownerDocument.body), o;
|
|
1177
1334
|
}
|
|
1178
|
-
function
|
|
1179
|
-
const o =
|
|
1180
|
-
if (
|
|
1335
|
+
function Ee(t, e) {
|
|
1336
|
+
const o = S(t);
|
|
1337
|
+
if (At(t))
|
|
1181
1338
|
return o;
|
|
1182
|
-
if (
|
|
1183
|
-
let
|
|
1184
|
-
for (;
|
|
1185
|
-
if (
|
|
1186
|
-
return
|
|
1187
|
-
|
|
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);
|
|
1188
1345
|
}
|
|
1189
1346
|
return o;
|
|
1190
1347
|
}
|
|
1191
|
-
let n =
|
|
1192
|
-
for (; n &&
|
|
1193
|
-
n =
|
|
1194
|
-
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;
|
|
1195
1352
|
}
|
|
1196
|
-
const
|
|
1197
|
-
const e = this.getOffsetParent ||
|
|
1353
|
+
const Fn = async function(t) {
|
|
1354
|
+
const e = this.getOffsetParent || Ee, o = this.getDimensions, n = await o(t.floating);
|
|
1198
1355
|
return {
|
|
1199
|
-
reference:
|
|
1356
|
+
reference: Wn(t.reference, await e(t.floating), t.strategy),
|
|
1200
1357
|
floating: {
|
|
1201
1358
|
x: 0,
|
|
1202
1359
|
y: 0,
|
|
@@ -1205,119 +1362,119 @@ const Ln = async function(t) {
|
|
|
1205
1362
|
}
|
|
1206
1363
|
};
|
|
1207
1364
|
};
|
|
1208
|
-
function
|
|
1209
|
-
return
|
|
1210
|
-
}
|
|
1211
|
-
const
|
|
1212
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1213
|
-
getDocumentElement:
|
|
1214
|
-
getClippingRect:
|
|
1215
|
-
getOffsetParent:
|
|
1216
|
-
getElementRects:
|
|
1217
|
-
getClientRects:
|
|
1218
|
-
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,
|
|
1219
1376
|
getScale: Z,
|
|
1220
|
-
isElement:
|
|
1221
|
-
isRTL:
|
|
1377
|
+
isElement: W,
|
|
1378
|
+
isRTL: Mn
|
|
1222
1379
|
};
|
|
1223
|
-
function
|
|
1380
|
+
function Pe(t, e) {
|
|
1224
1381
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1225
1382
|
}
|
|
1226
|
-
function
|
|
1383
|
+
function Vn(t, e) {
|
|
1227
1384
|
let o = null, n;
|
|
1228
|
-
const
|
|
1229
|
-
function
|
|
1385
|
+
const r = z(t);
|
|
1386
|
+
function i() {
|
|
1230
1387
|
var c;
|
|
1231
1388
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1232
1389
|
}
|
|
1233
|
-
function
|
|
1234
|
-
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();
|
|
1235
1392
|
const l = t.getBoundingClientRect(), {
|
|
1236
|
-
left:
|
|
1393
|
+
left: u,
|
|
1237
1394
|
top: h,
|
|
1238
|
-
width:
|
|
1239
|
-
height:
|
|
1395
|
+
width: p,
|
|
1396
|
+
height: f
|
|
1240
1397
|
} = l;
|
|
1241
|
-
if (c || e(), !
|
|
1398
|
+
if (c || e(), !p || !f)
|
|
1242
1399
|
return;
|
|
1243
|
-
const d =
|
|
1244
|
-
rootMargin: -d + "px " + -
|
|
1245
|
-
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
|
|
1246
1403
|
};
|
|
1247
|
-
let
|
|
1248
|
-
function
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1251
|
-
if (!
|
|
1252
|
-
return
|
|
1253
|
-
|
|
1254
|
-
|
|
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);
|
|
1255
1412
|
}, 1e3);
|
|
1256
1413
|
}
|
|
1257
|
-
|
|
1414
|
+
m === 1 && !Pe(l, t.getBoundingClientRect()) && s(), R = !1;
|
|
1258
1415
|
}
|
|
1259
1416
|
try {
|
|
1260
|
-
o = new IntersectionObserver(
|
|
1261
|
-
...
|
|
1417
|
+
o = new IntersectionObserver(O, {
|
|
1418
|
+
...v,
|
|
1262
1419
|
// Handle <iframe>s
|
|
1263
|
-
root:
|
|
1420
|
+
root: r.ownerDocument
|
|
1264
1421
|
});
|
|
1265
1422
|
} catch {
|
|
1266
|
-
o = new IntersectionObserver(
|
|
1423
|
+
o = new IntersectionObserver(O, v);
|
|
1267
1424
|
}
|
|
1268
1425
|
o.observe(t);
|
|
1269
1426
|
}
|
|
1270
|
-
return
|
|
1427
|
+
return s(!0), i;
|
|
1271
1428
|
}
|
|
1272
|
-
function
|
|
1429
|
+
function Hn(t, e, o, n) {
|
|
1273
1430
|
n === void 0 && (n = {});
|
|
1274
1431
|
const {
|
|
1275
|
-
ancestorScroll:
|
|
1276
|
-
ancestorResize:
|
|
1277
|
-
elementResize:
|
|
1432
|
+
ancestorScroll: r = !0,
|
|
1433
|
+
ancestorResize: i = !0,
|
|
1434
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1278
1435
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1279
1436
|
animationFrame: a = !1
|
|
1280
|
-
} = n, l =
|
|
1281
|
-
|
|
1282
|
-
|
|
1437
|
+
} = n, l = Ut(t), u = r || i ? [...l ? at(l) : [], ...at(e)] : [];
|
|
1438
|
+
u.forEach((y) => {
|
|
1439
|
+
r && y.addEventListener("scroll", o, {
|
|
1283
1440
|
passive: !0
|
|
1284
|
-
}),
|
|
1441
|
+
}), i && y.addEventListener("resize", o);
|
|
1285
1442
|
});
|
|
1286
|
-
const h = l && c ?
|
|
1287
|
-
let
|
|
1288
|
-
|
|
1289
|
-
let [
|
|
1290
|
-
|
|
1291
|
-
var
|
|
1292
|
-
(
|
|
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);
|
|
1293
1450
|
})), o();
|
|
1294
|
-
}), l && !a &&
|
|
1295
|
-
let d,
|
|
1451
|
+
}), l && !a && f.observe(l), f.observe(e));
|
|
1452
|
+
let d, w = a ? J(t) : null;
|
|
1296
1453
|
a && g();
|
|
1297
1454
|
function g() {
|
|
1298
1455
|
const y = J(t);
|
|
1299
|
-
|
|
1456
|
+
w && !Pe(w, y) && o(), w = y, d = requestAnimationFrame(g);
|
|
1300
1457
|
}
|
|
1301
1458
|
return o(), () => {
|
|
1302
1459
|
var y;
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
}), h == null || h(), (y =
|
|
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);
|
|
1306
1463
|
};
|
|
1307
1464
|
}
|
|
1308
|
-
const
|
|
1309
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1310
|
-
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,
|
|
1311
1468
|
...o
|
|
1312
|
-
},
|
|
1313
|
-
...
|
|
1469
|
+
}, i = {
|
|
1470
|
+
...r.platform,
|
|
1314
1471
|
_c: n
|
|
1315
1472
|
};
|
|
1316
|
-
return
|
|
1317
|
-
...
|
|
1318
|
-
platform:
|
|
1473
|
+
return gn(t, e, {
|
|
1474
|
+
...r,
|
|
1475
|
+
platform: i
|
|
1319
1476
|
});
|
|
1320
|
-
},
|
|
1477
|
+
}, go = [
|
|
1321
1478
|
"top",
|
|
1322
1479
|
"top-start",
|
|
1323
1480
|
"top-end",
|
|
@@ -1330,42 +1487,42 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1330
1487
|
"left",
|
|
1331
1488
|
"left-start",
|
|
1332
1489
|
"left-end"
|
|
1333
|
-
],
|
|
1490
|
+
], po = (t, e = { isOpen: !1 }) => {
|
|
1334
1491
|
const o = [];
|
|
1335
1492
|
let n = null;
|
|
1336
|
-
const
|
|
1337
|
-
function
|
|
1338
|
-
n = c,
|
|
1493
|
+
const r = k.deriveProp(e.isOpen);
|
|
1494
|
+
function i(c) {
|
|
1495
|
+
n = c, r.set(!0);
|
|
1339
1496
|
}
|
|
1340
|
-
function
|
|
1341
|
-
|
|
1497
|
+
function s() {
|
|
1498
|
+
r.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1342
1499
|
}
|
|
1343
|
-
return
|
|
1344
|
-
t(
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
() =>
|
|
1348
|
-
(n == null ? void 0 : n.onClickOutside) != null ?
|
|
1349
|
-
|
|
1350
|
-
(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(
|
|
1351
1508
|
"body",
|
|
1352
|
-
|
|
1353
|
-
|
|
1509
|
+
Pt.div(
|
|
1510
|
+
_((a) => {
|
|
1354
1511
|
a.style.position = "absolute";
|
|
1355
1512
|
const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1356
1513
|
n.target
|
|
1357
1514
|
) : (n == null ? void 0 : n.target) ?? c;
|
|
1358
1515
|
if (l == null)
|
|
1359
1516
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1360
|
-
let
|
|
1361
|
-
const h =
|
|
1517
|
+
let u = null;
|
|
1518
|
+
const h = k.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), p = k.toSignal(
|
|
1362
1519
|
(n == null ? void 0 : n.crossAxisOffset) ?? 0
|
|
1363
|
-
),
|
|
1520
|
+
), f = k.toSignal(
|
|
1364
1521
|
/* c8 ignore next 3 */
|
|
1365
1522
|
(n == null ? void 0 : n.placement) ?? "top"
|
|
1366
|
-
), d =
|
|
1523
|
+
), d = k.toSignal(
|
|
1367
1524
|
(n == null ? void 0 : n.arrowPadding) ?? 0
|
|
1368
|
-
),
|
|
1525
|
+
), w = n == null ? void 0 : n.arrow, g = M({
|
|
1369
1526
|
centerOffset: 0,
|
|
1370
1527
|
alignmentOffset: 0,
|
|
1371
1528
|
containerWidth: 0,
|
|
@@ -1374,68 +1531,68 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1374
1531
|
y: void 0
|
|
1375
1532
|
});
|
|
1376
1533
|
async function y() {
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1379
|
-
|
|
1534
|
+
const v = [
|
|
1535
|
+
te(),
|
|
1536
|
+
$n({
|
|
1380
1537
|
mainAxis: h.get(),
|
|
1381
|
-
crossAxis:
|
|
1538
|
+
crossAxis: p.get()
|
|
1382
1539
|
}),
|
|
1383
|
-
|
|
1384
|
-
|
|
1540
|
+
zn(),
|
|
1541
|
+
te()
|
|
1385
1542
|
];
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
element:
|
|
1543
|
+
w != null && u != null && v.push(
|
|
1544
|
+
Bn({
|
|
1545
|
+
element: u,
|
|
1389
1546
|
padding: d.get()
|
|
1390
1547
|
})
|
|
1391
1548
|
);
|
|
1392
|
-
const
|
|
1393
|
-
placement:
|
|
1549
|
+
const R = await _n(l, a, {
|
|
1550
|
+
placement: f.get(),
|
|
1394
1551
|
strategy: "absolute",
|
|
1395
|
-
middleware:
|
|
1396
|
-
}), { x, y:
|
|
1397
|
-
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) {
|
|
1398
1555
|
const {
|
|
1399
|
-
x:
|
|
1400
|
-
y:
|
|
1401
|
-
centerOffset:
|
|
1402
|
-
alignmentOffset:
|
|
1403
|
-
} =
|
|
1556
|
+
x: b,
|
|
1557
|
+
y: A,
|
|
1558
|
+
centerOffset: E,
|
|
1559
|
+
alignmentOffset: V
|
|
1560
|
+
} = m.arrow;
|
|
1404
1561
|
g.set({
|
|
1405
|
-
x:
|
|
1406
|
-
y:
|
|
1407
|
-
centerOffset:
|
|
1408
|
-
alignmentOffset:
|
|
1562
|
+
x: b,
|
|
1563
|
+
y: A,
|
|
1564
|
+
centerOffset: E,
|
|
1565
|
+
alignmentOffset: V,
|
|
1409
1566
|
containerWidth: a.offsetWidth,
|
|
1410
1567
|
containerHeight: a.offsetHeight
|
|
1411
1568
|
});
|
|
1412
1569
|
}
|
|
1413
1570
|
}
|
|
1414
|
-
const
|
|
1571
|
+
const x = Fe(
|
|
1415
1572
|
h,
|
|
1416
|
-
|
|
1417
|
-
|
|
1573
|
+
p,
|
|
1574
|
+
f
|
|
1418
1575
|
)(y);
|
|
1419
|
-
return
|
|
1576
|
+
return j(
|
|
1420
1577
|
n == null ? void 0 : n.content,
|
|
1421
|
-
(n == null ? void 0 : n.arrow) != null ?
|
|
1578
|
+
(n == null ? void 0 : n.arrow) != null ? Pt.div(
|
|
1422
1579
|
n == null ? void 0 : n.arrow(
|
|
1423
|
-
|
|
1580
|
+
fe(
|
|
1424
1581
|
g,
|
|
1425
|
-
|
|
1426
|
-
)((
|
|
1427
|
-
...
|
|
1428
|
-
placement:
|
|
1582
|
+
f
|
|
1583
|
+
)((v, R) => ({
|
|
1584
|
+
...v,
|
|
1585
|
+
placement: R
|
|
1429
1586
|
}))
|
|
1430
1587
|
),
|
|
1431
|
-
|
|
1432
|
-
|
|
1588
|
+
_((v) => {
|
|
1589
|
+
u = v, y();
|
|
1433
1590
|
})
|
|
1434
1591
|
) : null,
|
|
1435
|
-
|
|
1592
|
+
N(
|
|
1436
1593
|
g.dispose,
|
|
1437
|
-
|
|
1438
|
-
|
|
1594
|
+
Hn(l, a, y),
|
|
1595
|
+
x
|
|
1439
1596
|
)
|
|
1440
1597
|
);
|
|
1441
1598
|
})
|
|
@@ -1445,88 +1602,88 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
|
|
|
1445
1602
|
)
|
|
1446
1603
|
)
|
|
1447
1604
|
);
|
|
1448
|
-
},
|
|
1605
|
+
}, Kn = ({
|
|
1449
1606
|
request: t,
|
|
1450
1607
|
load: e,
|
|
1451
1608
|
convertError: o,
|
|
1452
1609
|
onSuccess: n,
|
|
1453
|
-
onError:
|
|
1454
|
-
onSettled:
|
|
1610
|
+
onError: r,
|
|
1611
|
+
onSettled: i
|
|
1455
1612
|
}) => {
|
|
1456
|
-
let
|
|
1457
|
-
const c =
|
|
1458
|
-
(g) =>
|
|
1613
|
+
let s;
|
|
1614
|
+
const c = M(L.notAsked), a = c.map(
|
|
1615
|
+
(g) => L.isSuccess(g) ? g.value : void 0
|
|
1459
1616
|
), l = c.map(
|
|
1460
|
-
(g) =>
|
|
1461
|
-
),
|
|
1462
|
-
|
|
1463
|
-
},
|
|
1464
|
-
h(), c.set(g ??
|
|
1465
|
-
},
|
|
1466
|
-
h(),
|
|
1467
|
-
const y =
|
|
1468
|
-
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)));
|
|
1469
1626
|
try {
|
|
1470
|
-
const
|
|
1471
|
-
await Promise.resolve(),
|
|
1472
|
-
} catch (
|
|
1473
|
-
|
|
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);
|
|
1474
1631
|
}
|
|
1475
|
-
|
|
1476
|
-
}, d = () =>
|
|
1477
|
-
|
|
1632
|
+
i == null || i(c.get(), g);
|
|
1633
|
+
}, d = () => f(k.get(t)), w = () => {
|
|
1634
|
+
s == null || s.abort(), s = void 0, c.dispose();
|
|
1478
1635
|
};
|
|
1479
|
-
return c.onDispose(
|
|
1636
|
+
return c.onDispose(k.on(t, f)), {
|
|
1480
1637
|
status: c,
|
|
1481
1638
|
value: a,
|
|
1482
1639
|
error: l,
|
|
1483
|
-
loading:
|
|
1484
|
-
cancel:
|
|
1640
|
+
loading: u,
|
|
1641
|
+
cancel: p,
|
|
1485
1642
|
reload: d,
|
|
1486
|
-
dispose:
|
|
1643
|
+
dispose: w
|
|
1487
1644
|
};
|
|
1488
|
-
},
|
|
1489
|
-
const { status: o, dispose: n, reload:
|
|
1490
|
-
return
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
loading:
|
|
1494
|
-
failure:
|
|
1495
|
-
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 })
|
|
1496
1653
|
})
|
|
1497
1654
|
);
|
|
1498
|
-
},
|
|
1655
|
+
}, wo = ({
|
|
1499
1656
|
request: t,
|
|
1500
1657
|
load: e,
|
|
1501
1658
|
convertError: o = (l) => l,
|
|
1502
1659
|
onSuccess: n,
|
|
1503
|
-
onError:
|
|
1504
|
-
onSettled:
|
|
1505
|
-
success:
|
|
1660
|
+
onError: r,
|
|
1661
|
+
onSettled: i,
|
|
1662
|
+
success: s,
|
|
1506
1663
|
pending: c,
|
|
1507
1664
|
failure: a
|
|
1508
1665
|
}) => {
|
|
1509
|
-
const l =
|
|
1666
|
+
const l = Kn({
|
|
1510
1667
|
request: t,
|
|
1511
1668
|
load: e,
|
|
1512
1669
|
convertError: o,
|
|
1513
1670
|
onSuccess: n,
|
|
1514
|
-
onError:
|
|
1515
|
-
onSettled:
|
|
1671
|
+
onError: r,
|
|
1672
|
+
onSettled: i
|
|
1516
1673
|
});
|
|
1517
|
-
return
|
|
1518
|
-
},
|
|
1674
|
+
return Un(l, { success: s, pending: c, failure: a });
|
|
1675
|
+
}, jn = (t, e) => {
|
|
1519
1676
|
if (typeof e == "function")
|
|
1520
|
-
return
|
|
1521
|
-
const o = e.failure ?? ((
|
|
1522
|
-
|
|
1523
|
-
|
|
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}`)
|
|
1524
1681
|
)), n = e.success;
|
|
1525
|
-
return
|
|
1526
|
-
Success: (
|
|
1527
|
-
Failure: (
|
|
1682
|
+
return ae(k.toSignal(t), {
|
|
1683
|
+
Success: (r) => n(r.$.value),
|
|
1684
|
+
Failure: (r) => o(r.$.error)
|
|
1528
1685
|
});
|
|
1529
|
-
},
|
|
1686
|
+
}, yo = () => ce.focus((t) => {
|
|
1530
1687
|
var e;
|
|
1531
1688
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1532
1689
|
});
|
|
@@ -1548,7 +1705,7 @@ class Rt {
|
|
|
1548
1705
|
* console.log(rect.height); // 50
|
|
1549
1706
|
* ```
|
|
1550
1707
|
*/
|
|
1551
|
-
constructor(e, o, n,
|
|
1708
|
+
constructor(e, o, n, r, i, s) {
|
|
1552
1709
|
/**
|
|
1553
1710
|
* Compares this rectangle with another rectangle for equality.
|
|
1554
1711
|
*
|
|
@@ -1569,8 +1726,8 @@ class Rt {
|
|
|
1569
1726
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1570
1727
|
* ```
|
|
1571
1728
|
*/
|
|
1572
|
-
|
|
1573
|
-
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;
|
|
1574
1731
|
}
|
|
1575
1732
|
/**
|
|
1576
1733
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1601,11 +1758,11 @@ class Rt {
|
|
|
1601
1758
|
left: e = 0,
|
|
1602
1759
|
top: o = 0,
|
|
1603
1760
|
width: n = 0,
|
|
1604
|
-
height:
|
|
1605
|
-
localLeft:
|
|
1606
|
-
localTop:
|
|
1761
|
+
height: r = 0,
|
|
1762
|
+
localLeft: i = 0,
|
|
1763
|
+
localTop: s = 0
|
|
1607
1764
|
}) {
|
|
1608
|
-
return new Rt(e, o, n,
|
|
1765
|
+
return new Rt(e, o, n, r, i, s);
|
|
1609
1766
|
}
|
|
1610
1767
|
/**
|
|
1611
1768
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1718,7 +1875,7 @@ class Rt {
|
|
|
1718
1875
|
return { width: this.width, height: this.height };
|
|
1719
1876
|
}
|
|
1720
1877
|
}
|
|
1721
|
-
function
|
|
1878
|
+
function ee(t) {
|
|
1722
1879
|
const e = t.getBoundingClientRect();
|
|
1723
1880
|
return Rt.of({
|
|
1724
1881
|
top: e.top + window.scrollY,
|
|
@@ -1729,149 +1886,163 @@ function Jt(t) {
|
|
|
1729
1886
|
localTop: t.offsetTop
|
|
1730
1887
|
});
|
|
1731
1888
|
}
|
|
1732
|
-
const
|
|
1733
|
-
const { element: o } = e, n =
|
|
1734
|
-
let
|
|
1735
|
-
return typeof ResizeObserver < "u" && (
|
|
1736
|
-
|
|
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);
|
|
1737
1894
|
});
|
|
1738
1895
|
});
|
|
1739
|
-
function
|
|
1896
|
+
function ne(t) {
|
|
1740
1897
|
return {
|
|
1741
1898
|
/* c8 ignore next 6 */
|
|
1742
1899
|
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1743
1900
|
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1744
1901
|
};
|
|
1745
1902
|
}
|
|
1746
|
-
const
|
|
1747
|
-
const o =
|
|
1748
|
-
|
|
1749
|
-
(
|
|
1750
|
-
),
|
|
1751
|
-
return o == null || o.addEventListener("resize",
|
|
1752
|
-
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);
|
|
1753
1910
|
};
|
|
1754
|
-
},
|
|
1755
|
-
const o = e.split("/").filter((
|
|
1756
|
-
for (let
|
|
1757
|
-
const
|
|
1758
|
-
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")
|
|
1759
1916
|
return null;
|
|
1760
|
-
if (
|
|
1761
|
-
if (
|
|
1917
|
+
if (i.type === "literal") {
|
|
1918
|
+
if (i.value !== s)
|
|
1762
1919
|
return null;
|
|
1763
|
-
} else if (
|
|
1764
|
-
n[
|
|
1765
|
-
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
|
+
}
|
|
1766
1927
|
return { params: n, path: e };
|
|
1928
|
+
}
|
|
1767
1929
|
}
|
|
1768
1930
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1769
|
-
},
|
|
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) => {
|
|
1770
1940
|
const e = t.map((o) => {
|
|
1771
|
-
const n =
|
|
1941
|
+
const n = Se(o);
|
|
1772
1942
|
return { route: o, segments: n };
|
|
1773
1943
|
});
|
|
1774
1944
|
return function(n) {
|
|
1775
|
-
for (const { segments:
|
|
1776
|
-
const
|
|
1777
|
-
if (
|
|
1778
|
-
return { ...
|
|
1945
|
+
for (const { segments: r, route: i } of e) {
|
|
1946
|
+
const s = In(r, n);
|
|
1947
|
+
if (s)
|
|
1948
|
+
return { ...s, route: i };
|
|
1779
1949
|
}
|
|
1780
1950
|
return null;
|
|
1781
1951
|
};
|
|
1782
|
-
},
|
|
1783
|
-
mark:
|
|
1952
|
+
}, Ft = {
|
|
1953
|
+
mark: Nt("RouterContext"),
|
|
1784
1954
|
create: () => {
|
|
1785
|
-
const t =
|
|
1955
|
+
const t = M([]);
|
|
1786
1956
|
return {
|
|
1787
1957
|
value: t,
|
|
1788
1958
|
dispose: () => t.dispose()
|
|
1789
1959
|
};
|
|
1790
1960
|
}
|
|
1791
|
-
},
|
|
1792
|
-
const n = o.split("/").filter((
|
|
1793
|
-
let
|
|
1794
|
-
for (let
|
|
1795
|
-
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];
|
|
1796
1966
|
if (!a && c.type !== "catch-all")
|
|
1797
1967
|
return null;
|
|
1798
1968
|
if (c.type === "literal") {
|
|
1799
1969
|
if (c.value !== a)
|
|
1800
1970
|
return null;
|
|
1801
|
-
|
|
1971
|
+
i++;
|
|
1802
1972
|
} else if (c.type === "param")
|
|
1803
|
-
|
|
1973
|
+
r[c.name] = a, i++;
|
|
1804
1974
|
else if (c.type === "catch-all") {
|
|
1805
|
-
|
|
1975
|
+
c.name && (r[c.name] = n.slice(i).join("/"));
|
|
1976
|
+
const l = "/" + n.slice(0, i).join("/"), u = "/" + n.slice(i).join("/");
|
|
1806
1977
|
return {
|
|
1807
|
-
params:
|
|
1978
|
+
params: r,
|
|
1808
1979
|
matchedPath: l === "/" ? "" : l,
|
|
1809
|
-
remainingPath:
|
|
1980
|
+
remainingPath: u === "/" ? "" : u,
|
|
1810
1981
|
route: e
|
|
1811
1982
|
};
|
|
1812
1983
|
}
|
|
1813
1984
|
}
|
|
1814
1985
|
if (n.length === t.length) {
|
|
1815
|
-
const
|
|
1986
|
+
const s = "/" + n.join("/");
|
|
1816
1987
|
return {
|
|
1817
|
-
params:
|
|
1818
|
-
matchedPath:
|
|
1988
|
+
params: r,
|
|
1989
|
+
matchedPath: s === "/" ? "" : s,
|
|
1819
1990
|
remainingPath: "",
|
|
1820
1991
|
route: e
|
|
1821
1992
|
};
|
|
1822
1993
|
}
|
|
1823
1994
|
return null;
|
|
1824
|
-
},
|
|
1995
|
+
}, Te = (t) => {
|
|
1825
1996
|
const e = t.map((o) => {
|
|
1826
|
-
const n =
|
|
1997
|
+
const n = Se(o);
|
|
1827
1998
|
return { route: o, segments: n };
|
|
1828
1999
|
});
|
|
1829
2000
|
return function(n) {
|
|
1830
|
-
for (const { segments:
|
|
1831
|
-
const
|
|
1832
|
-
if (
|
|
1833
|
-
return
|
|
2001
|
+
for (const { segments: r, route: i } of e) {
|
|
2002
|
+
const s = Yn(r, i, n);
|
|
2003
|
+
if (s)
|
|
2004
|
+
return s;
|
|
1834
2005
|
}
|
|
1835
2006
|
return null;
|
|
1836
2007
|
};
|
|
1837
|
-
},
|
|
1838
|
-
const e =
|
|
1839
|
-
return
|
|
1840
|
-
|
|
2008
|
+
}, Ao = (t) => {
|
|
2009
|
+
const e = Te(Object.keys(t));
|
|
2010
|
+
return Ne(
|
|
2011
|
+
Ft,
|
|
1841
2012
|
{},
|
|
1842
|
-
() =>
|
|
1843
|
-
const
|
|
1844
|
-
const
|
|
1845
|
-
if (
|
|
1846
|
-
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");
|
|
1847
2018
|
const c = {
|
|
1848
|
-
matchedPath:
|
|
1849
|
-
remainingPath:
|
|
1850
|
-
fullPath:
|
|
1851
|
-
params:
|
|
2019
|
+
matchedPath: s.matchedPath,
|
|
2020
|
+
remainingPath: s.remainingPath,
|
|
2021
|
+
fullPath: i.pathname,
|
|
2022
|
+
params: s.params
|
|
1852
2023
|
};
|
|
1853
2024
|
return n.value = [...n.value, c], {
|
|
1854
|
-
params:
|
|
1855
|
-
route:
|
|
1856
|
-
path:
|
|
1857
|
-
search:
|
|
1858
|
-
hash:
|
|
2025
|
+
params: s.params,
|
|
2026
|
+
route: s.route,
|
|
2027
|
+
path: s.matchedPath || i.pathname,
|
|
2028
|
+
search: i.search,
|
|
2029
|
+
hash: i.hash
|
|
1859
2030
|
};
|
|
1860
2031
|
});
|
|
1861
|
-
return
|
|
1862
|
-
|
|
2032
|
+
return he(
|
|
2033
|
+
r.map((i) => [i.route, i]),
|
|
1863
2034
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1864
2035
|
t
|
|
1865
2036
|
);
|
|
1866
2037
|
}))
|
|
1867
2038
|
);
|
|
1868
|
-
},
|
|
1869
|
-
const e =
|
|
1870
|
-
return
|
|
1871
|
-
const
|
|
1872
|
-
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) || "";
|
|
1873
2044
|
if (c === "")
|
|
1874
|
-
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");
|
|
1875
2046
|
const a = e(c);
|
|
1876
2047
|
if (a == null)
|
|
1877
2048
|
throw console.error("No route found for remaining path", c), new Error("No route found");
|
|
@@ -1880,152 +2051,151 @@ const uo = (t) => (e) => {
|
|
|
1880
2051
|
// Only this router's parameters
|
|
1881
2052
|
route: a.route,
|
|
1882
2053
|
path: a.matchedPath,
|
|
1883
|
-
search: n.value.search,
|
|
1884
|
-
hash: n.value.hash
|
|
2054
|
+
search: n.location.value.search,
|
|
2055
|
+
hash: n.location.value.hash
|
|
1885
2056
|
};
|
|
1886
2057
|
});
|
|
1887
|
-
return
|
|
1888
|
-
|
|
2058
|
+
return he(
|
|
2059
|
+
r.map((i) => [i.route, i]),
|
|
1889
2060
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1890
2061
|
t
|
|
1891
2062
|
);
|
|
1892
2063
|
}));
|
|
1893
|
-
},
|
|
2064
|
+
}, xt = 60 * 1e3, Mt = 60 * xt, lt = 24 * Mt, oe = 7 * lt, se = 30 * lt, qn = 365 * lt, Xn = [
|
|
1894
2065
|
{
|
|
1895
|
-
max:
|
|
1896
|
-
value:
|
|
2066
|
+
max: xt * 90,
|
|
2067
|
+
value: xt,
|
|
1897
2068
|
name: "minute",
|
|
1898
2069
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1899
2070
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1900
2071
|
},
|
|
1901
2072
|
{
|
|
1902
|
-
max:
|
|
1903
|
-
value:
|
|
2073
|
+
max: Mt * 36,
|
|
2074
|
+
value: Mt,
|
|
1904
2075
|
name: "hour",
|
|
1905
2076
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1906
2077
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1907
2078
|
},
|
|
1908
2079
|
{
|
|
1909
|
-
max:
|
|
1910
|
-
value:
|
|
2080
|
+
max: lt * 10,
|
|
2081
|
+
value: lt,
|
|
1911
2082
|
name: "day",
|
|
1912
2083
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1913
2084
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1914
2085
|
},
|
|
1915
2086
|
{
|
|
1916
|
-
max:
|
|
1917
|
-
value:
|
|
2087
|
+
max: oe * 6,
|
|
2088
|
+
value: oe,
|
|
1918
2089
|
name: "week",
|
|
1919
2090
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1920
2091
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1921
2092
|
},
|
|
1922
2093
|
{
|
|
1923
|
-
max:
|
|
1924
|
-
value:
|
|
2094
|
+
max: se * 18,
|
|
2095
|
+
value: se,
|
|
1925
2096
|
name: "month",
|
|
1926
2097
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1927
2098
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1928
2099
|
},
|
|
1929
2100
|
{
|
|
1930
2101
|
max: 1 / 0,
|
|
1931
|
-
value:
|
|
2102
|
+
value: qn,
|
|
1932
2103
|
name: "year",
|
|
1933
2104
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1934
2105
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1935
2106
|
}
|
|
1936
2107
|
];
|
|
1937
|
-
function
|
|
1938
|
-
const
|
|
1939
|
-
return
|
|
2108
|
+
function re(t, e, o, n) {
|
|
2109
|
+
const r = Math.round(t / e);
|
|
2110
|
+
return r <= 1 ? o : n.replace(
|
|
1940
2111
|
"{}",
|
|
1941
|
-
|
|
2112
|
+
r.toLocaleString(void 0, {
|
|
1942
2113
|
maximumFractionDigits: 0,
|
|
1943
2114
|
minimumFractionDigits: 0
|
|
1944
2115
|
})
|
|
1945
2116
|
);
|
|
1946
2117
|
}
|
|
1947
|
-
const
|
|
1948
|
-
const e =
|
|
2118
|
+
const Qn = (t = 1e3) => {
|
|
2119
|
+
const e = M(/* @__PURE__ */ new Date()), o = He(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1949
2120
|
return e.onDispose(o), e;
|
|
1950
|
-
},
|
|
2121
|
+
}, Jn = (t) => {
|
|
1951
2122
|
const e = Math.abs(t);
|
|
1952
|
-
if (e <
|
|
2123
|
+
if (e < xt)
|
|
1953
2124
|
return t < 0 ? "just now" : "in a moment";
|
|
1954
|
-
for (const o of
|
|
2125
|
+
for (const o of Xn)
|
|
1955
2126
|
if (e < o.max)
|
|
1956
|
-
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);
|
|
1957
2128
|
throw new Error("unreachable");
|
|
1958
|
-
},
|
|
1959
|
-
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(
|
|
1960
2131
|
t,
|
|
1961
2132
|
n
|
|
1962
|
-
)((
|
|
1963
|
-
return
|
|
1964
|
-
},
|
|
1965
|
-
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);
|
|
1966
2137
|
return n.onDispose(o.dispose), n;
|
|
1967
|
-
},
|
|
1968
|
-
class
|
|
2138
|
+
}, Ro = (t, e = {}) => Zn(t, e);
|
|
2139
|
+
class to extends Ve {
|
|
1969
2140
|
constructor() {
|
|
1970
2141
|
super(...arguments);
|
|
1971
2142
|
/**
|
|
1972
2143
|
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1973
2144
|
* @returns void
|
|
1974
2145
|
*/
|
|
1975
|
-
|
|
2146
|
+
Lt(this, "tick", () => this.update((o) => o + 1));
|
|
1976
2147
|
}
|
|
1977
2148
|
}
|
|
1978
|
-
const
|
|
2149
|
+
const Lo = (t = 0) => new to(t, (e, o) => e === o);
|
|
1979
2150
|
export {
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
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,
|
|
2000
2171
|
Rt as Rect,
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
je 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
|
|
2031
2201
|
};
|