@tempots/ui 5.2.2 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +753 -663
- package/package.json +1 -1
- package/renderables/router/router-context.d.ts +96 -0
- package/renderables/router/router.d.ts +58 -66
- package/renderables/size.d.ts +0 -9
package/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var At = (t, e, o) =>
|
|
4
|
-
import { getWindow as
|
|
5
|
-
import { delayed as
|
|
6
|
-
const
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Le = (t, e, o) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var At = (t, e, o) => Le(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { getWindow as at, prop as F, makeProviderMark as Wt, Signal as te, Use as rt, html as Et, on as ee, Value as E, attr as ne, Empty as Pt, OneOfType as oe, WithElement as H, OnDispose as M, Portal as re, Fragment as st, renderableOfTNode as Ft, When as se, effectOf as Se, computedOf as ie, WithBrowserCtx as Te, Provide as ke, OneOfTuple as ce, Prop as Ce } from "@tempots/dom";
|
|
5
|
+
import { delayed as ae, AsyncResult as U, nearEqual as ht, interval as De } from "@tempots/std";
|
|
6
|
+
const We = (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
|
+
}, Fe = (t, e) => {
|
|
12
|
+
const o = We(e);
|
|
13
13
|
return o != null && (t.length === 0 || !t.some((n) => o == n));
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
for (;
|
|
17
|
-
|
|
18
|
-
if (
|
|
14
|
+
}, Me = (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 s = r;
|
|
21
|
+
if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
|
-
const { pathname: i, search: c, hash:
|
|
23
|
+
const { pathname: i, search: c, hash: a } = s;
|
|
24
24
|
if (n) {
|
|
25
|
-
const
|
|
26
|
-
if (!(h != null && h.startsWith("#")) && h !==
|
|
25
|
+
const l = i + c + a, h = s.getAttribute("href");
|
|
26
|
+
if (!(h != null && h.startsWith("#")) && h !== l)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : Fe(o, i);
|
|
30
|
+
}, Ne = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,41 +36,41 @@ const Te = (t) => {
|
|
|
36
36
|
(n) => n.startsWith(".") ? n : "." + n
|
|
37
37
|
) : [];
|
|
38
38
|
return (n) => {
|
|
39
|
-
|
|
39
|
+
Me(
|
|
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
|
+
}, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, le = (t, e) => {
|
|
47
|
+
var s;
|
|
48
|
+
const o = new URL(t, e ?? ((s = at()) == null ? void 0 : s.location.toString())), n = Object.fromEntries(o.searchParams.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 =
|
|
55
|
+
}, zt = (t, e) => {
|
|
56
|
+
const o = le(e);
|
|
57
57
|
return t.set(o), t;
|
|
58
58
|
}, Lt = (t) => {
|
|
59
59
|
const o = new URLSearchParams(t.search).toString(), n = t.hash;
|
|
60
60
|
return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
|
|
61
|
-
},
|
|
61
|
+
}, $e = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), He = (t) => {
|
|
62
62
|
const e = t.container.currentURL, o = e.iso(
|
|
63
|
-
(n) =>
|
|
63
|
+
(n) => le(n),
|
|
64
64
|
(n) => {
|
|
65
|
-
if (
|
|
65
|
+
if ($e(n.pathname))
|
|
66
66
|
return Lt(n);
|
|
67
|
-
const
|
|
68
|
-
return Lt({ ...n, pathname:
|
|
67
|
+
const r = new URL(n.pathname, e.value), s = r.origin + r.pathname;
|
|
68
|
+
return Lt({ ...n, pathname: s });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
return { value: o, dispose: o.dispose };
|
|
72
|
-
},
|
|
73
|
-
const t =
|
|
72
|
+
}, Be = () => {
|
|
73
|
+
const t = at(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
|
|
74
74
|
return {
|
|
75
75
|
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
76
76
|
search: Object.fromEntries(
|
|
@@ -78,18 +78,18 @@ const Te = (t) => {
|
|
|
78
78
|
),
|
|
79
79
|
hash: e
|
|
80
80
|
};
|
|
81
|
-
},
|
|
82
|
-
const t =
|
|
81
|
+
}, Ue = () => {
|
|
82
|
+
const t = F(Be(), Ve), e = at(), o = () => {
|
|
83
83
|
let n = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
84
|
n.startsWith("#") && (n = n.substring(1));
|
|
85
|
-
const
|
|
85
|
+
const r = {
|
|
86
86
|
pathname: (e == null ? void 0 : e.location.pathname) ?? "",
|
|
87
87
|
search: Object.fromEntries(
|
|
88
88
|
new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
|
|
89
89
|
),
|
|
90
90
|
hash: n === "" ? void 0 : n
|
|
91
91
|
};
|
|
92
|
-
t.set(
|
|
92
|
+
t.set(r);
|
|
93
93
|
};
|
|
94
94
|
return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
|
|
95
95
|
e == null || e.removeEventListener("popstate", o);
|
|
@@ -99,68 +99,68 @@ const Te = (t) => {
|
|
|
99
99
|
value: t,
|
|
100
100
|
dispose: t.dispose
|
|
101
101
|
};
|
|
102
|
-
},
|
|
103
|
-
mark:
|
|
102
|
+
}, Mt = {
|
|
103
|
+
mark: Wt("LocationProvider"),
|
|
104
104
|
create: (t, e) => {
|
|
105
105
|
if (e.isBrowser())
|
|
106
|
-
return
|
|
106
|
+
return Ue();
|
|
107
107
|
if (e.isHeadless())
|
|
108
|
-
return
|
|
108
|
+
return He(e);
|
|
109
109
|
throw new Error("Unknown context");
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, ze = (t) => {
|
|
112
112
|
document.startViewTransition ? document.startViewTransition(t) : t();
|
|
113
|
-
},
|
|
114
|
-
if (typeof t == "string" ||
|
|
115
|
-
return
|
|
113
|
+
}, Ke = (t, ...e) => {
|
|
114
|
+
if (typeof t == "string" || te.is(t))
|
|
115
|
+
return Ke({ href: t }, ...e);
|
|
116
116
|
const {
|
|
117
117
|
href: o,
|
|
118
118
|
withViewTransition: n,
|
|
119
|
-
...
|
|
119
|
+
...r
|
|
120
120
|
} = t;
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}) :
|
|
121
|
+
return rt(Mt, (s) => Et.a(
|
|
122
|
+
ee.click(
|
|
123
|
+
Ne(() => (n === !0 ? ze(() => {
|
|
124
|
+
zt(s, E.get(o));
|
|
125
|
+
}) : zt(s, E.get(o)), !0), r)
|
|
126
126
|
),
|
|
127
|
-
|
|
127
|
+
ne.href(o),
|
|
128
128
|
...e
|
|
129
129
|
/* c8 ignore next 2 */
|
|
130
130
|
));
|
|
131
|
-
},
|
|
132
|
-
mark:
|
|
131
|
+
}, In = {
|
|
132
|
+
mark: Wt("Appearance"),
|
|
133
133
|
create: () => {
|
|
134
|
-
const t =
|
|
134
|
+
const t = _e();
|
|
135
135
|
return {
|
|
136
136
|
value: t,
|
|
137
137
|
dispose: t.dispose
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
function
|
|
142
|
-
const t =
|
|
143
|
-
return e == null || e.addEventListener("change",
|
|
141
|
+
function _e() {
|
|
142
|
+
const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = F(o ? "dark" : "light"), r = (s) => n.set(s.matches ? "dark" : "light");
|
|
143
|
+
return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const ue = (t, e) => {
|
|
146
146
|
if (typeof e == "function")
|
|
147
|
-
return
|
|
148
|
-
const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success,
|
|
149
|
-
return
|
|
147
|
+
return ue(t, { success: e });
|
|
148
|
+
const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => Pt), s = e.notAsked ?? (() => Pt);
|
|
149
|
+
return oe(E.toSignal(t), {
|
|
150
150
|
AsyncSuccess: (i) => n(i.$.value),
|
|
151
151
|
AsyncFailure: (i) => o(i.$.error),
|
|
152
|
-
Loading: (i) =>
|
|
153
|
-
NotAsked:
|
|
152
|
+
Loading: (i) => r(i.map((c) => c.previousValue)),
|
|
153
|
+
NotAsked: s
|
|
154
154
|
});
|
|
155
|
-
},
|
|
156
|
-
const o =
|
|
157
|
-
return
|
|
158
|
-
}),
|
|
155
|
+
}, Yn = (t = 10) => H((e) => M(ae(() => e == null ? void 0 : e.focus(), t))), qn = (t = 10) => H((e) => {
|
|
156
|
+
const o = ae(() => e.select(), t);
|
|
157
|
+
return M(o);
|
|
158
|
+
}), Xn = H((t) => {
|
|
159
159
|
const e = t.style.getPropertyValue(":empty");
|
|
160
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
160
|
+
return t.style.setProperty(":empty", "display:none"), M((o) => {
|
|
161
161
|
o && t.style.setProperty(":empty", e);
|
|
162
162
|
});
|
|
163
|
-
}),
|
|
163
|
+
}), Jn = (t) => re("head > title", ne.innerText(t)), je = {
|
|
164
164
|
partial: {
|
|
165
165
|
root: null,
|
|
166
166
|
rootMargin: "0px",
|
|
@@ -171,92 +171,92 @@ const ce = (t, e) => {
|
|
|
171
171
|
rootMargin: "0px",
|
|
172
172
|
threshold: 1
|
|
173
173
|
}
|
|
174
|
-
},
|
|
174
|
+
}, mt = {
|
|
175
175
|
partial: /* @__PURE__ */ new Map(),
|
|
176
176
|
full: /* @__PURE__ */ new Map()
|
|
177
177
|
}, ot = {
|
|
178
178
|
partial: null,
|
|
179
179
|
full: null
|
|
180
180
|
};
|
|
181
|
-
function
|
|
181
|
+
function Ie(t) {
|
|
182
182
|
return ot[t] == null && (ot[t] = new IntersectionObserver((e) => {
|
|
183
183
|
e.forEach((o) => {
|
|
184
|
-
const n =
|
|
184
|
+
const n = mt[t].get(o.target);
|
|
185
185
|
n == null || n.set(o.isIntersecting);
|
|
186
186
|
});
|
|
187
|
-
},
|
|
187
|
+
}, je[t])), ot[t];
|
|
188
188
|
}
|
|
189
|
-
const
|
|
190
|
-
const n =
|
|
189
|
+
const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
|
|
190
|
+
const n = F(!1);
|
|
191
191
|
return st(
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
H((r) => {
|
|
193
|
+
const s = typeof IntersectionObserver < "u" ? Ie(t) : null;
|
|
194
|
+
mt[t].set(r, n), s == null || s.observe(r);
|
|
195
195
|
function i() {
|
|
196
|
-
var
|
|
197
|
-
|
|
196
|
+
var a;
|
|
197
|
+
s == null || s.unobserve(r), mt[t].delete(r), mt[t].size === 0 && ((a = ot[t]) == null || a.disconnect(), ot[t] = null);
|
|
198
198
|
}
|
|
199
199
|
let c = null;
|
|
200
|
-
return e && (c = n.on((
|
|
201
|
-
|
|
202
|
-
})),
|
|
200
|
+
return e && (c = n.on((a) => {
|
|
201
|
+
a && i();
|
|
202
|
+
})), M(() => {
|
|
203
203
|
n.dispose(), i(), c == null || c();
|
|
204
204
|
});
|
|
205
205
|
}),
|
|
206
|
-
|
|
206
|
+
Ft(o(n))
|
|
207
207
|
);
|
|
208
|
-
},
|
|
209
|
-
function
|
|
210
|
-
return
|
|
208
|
+
}, Gn = (t, e, o) => Ye(t, (n) => se(n, e, o ?? (() => Pt)));
|
|
209
|
+
function Qn(t) {
|
|
210
|
+
return H((e) => {
|
|
211
211
|
const o = (n) => {
|
|
212
212
|
e.contains(n.target) || t(n);
|
|
213
213
|
};
|
|
214
|
-
return document.addEventListener("click", o),
|
|
214
|
+
return document.addEventListener("click", o), M(() => {
|
|
215
215
|
document.removeEventListener("click", o);
|
|
216
216
|
});
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
const G = (t, e) => t === void 0 || t === e,
|
|
220
|
-
function
|
|
221
|
-
return typeof t == "string" ? e.key === t :
|
|
219
|
+
const G = (t, e) => t === void 0 || t === e, Kt = (t, e) => t === void 0 || t === e;
|
|
220
|
+
function qe(t, e) {
|
|
221
|
+
return typeof t == "string" ? e.key === t : Kt(t.key, e.key) && Kt(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(
|
|
222
222
|
t.commandOrControlKey,
|
|
223
223
|
e.metaKey || e.ctrlKey
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function fe({
|
|
227
227
|
allowedKeys: t,
|
|
228
228
|
handler: e
|
|
229
229
|
}) {
|
|
230
|
-
return
|
|
231
|
-
const n = (
|
|
232
|
-
if (o.contains(
|
|
233
|
-
for (const
|
|
234
|
-
if (
|
|
235
|
-
e(
|
|
230
|
+
return H((o) => {
|
|
231
|
+
const n = (r) => {
|
|
232
|
+
if (o.contains(r.target)) {
|
|
233
|
+
for (const s of t)
|
|
234
|
+
if (qe(s, r)) {
|
|
235
|
+
e(r);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
|
-
return document.addEventListener("keydown", n),
|
|
240
|
+
return document.addEventListener("keydown", n), M(() => {
|
|
241
241
|
document.removeEventListener("keydown", n);
|
|
242
242
|
});
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
return
|
|
245
|
+
function Zn(t) {
|
|
246
|
+
return fe({ allowedKeys: ["Enter"], handler: t });
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
248
|
+
function to(t) {
|
|
249
|
+
return fe({ allowedKeys: ["Escape"], handler: t });
|
|
250
250
|
}
|
|
251
|
-
const Z = Math.min, q = Math.max,
|
|
251
|
+
const Z = Math.min, q = Math.max, gt = Math.round, dt = Math.floor, D = (t) => ({
|
|
252
252
|
x: t,
|
|
253
253
|
y: t
|
|
254
|
-
}),
|
|
254
|
+
}), Xe = {
|
|
255
255
|
left: "right",
|
|
256
256
|
right: "left",
|
|
257
257
|
bottom: "top",
|
|
258
258
|
top: "bottom"
|
|
259
|
-
},
|
|
259
|
+
}, Je = {
|
|
260
260
|
start: "end",
|
|
261
261
|
end: "start"
|
|
262
262
|
};
|
|
@@ -269,56 +269,56 @@ function lt(t, e) {
|
|
|
269
269
|
function X(t) {
|
|
270
270
|
return t.split("-")[0];
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function ut(t) {
|
|
273
273
|
return t.split("-")[1];
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function he(t) {
|
|
276
276
|
return t === "x" ? "y" : "x";
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Nt(t) {
|
|
279
279
|
return t === "y" ? "height" : "width";
|
|
280
280
|
}
|
|
281
281
|
function z(t) {
|
|
282
282
|
return ["top", "bottom"].includes(X(t)) ? "y" : "x";
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function Vt(t) {
|
|
285
|
+
return he(z(t));
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Ge(t, e, o) {
|
|
288
288
|
o === void 0 && (o = !1);
|
|
289
|
-
const n =
|
|
290
|
-
let i =
|
|
291
|
-
return e.reference[
|
|
289
|
+
const n = ut(t), r = Vt(t), s = Nt(r);
|
|
290
|
+
let i = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
291
|
+
return e.reference[s] > e.floating[s] && (i = pt(i)), [i, pt(i)];
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
const e =
|
|
293
|
+
function Qe(t) {
|
|
294
|
+
const e = pt(t);
|
|
295
295
|
return [Tt(t), e, Tt(e)];
|
|
296
296
|
}
|
|
297
297
|
function Tt(t) {
|
|
298
|
-
return t.replace(/start|end/g, (e) =>
|
|
298
|
+
return t.replace(/start|end/g, (e) => Je[e]);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const n = ["left", "right"],
|
|
300
|
+
function Ze(t, e, o) {
|
|
301
|
+
const n = ["left", "right"], r = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
|
|
302
302
|
switch (t) {
|
|
303
303
|
case "top":
|
|
304
304
|
case "bottom":
|
|
305
|
-
return o ? e ?
|
|
305
|
+
return o ? e ? r : n : e ? n : r;
|
|
306
306
|
case "left":
|
|
307
307
|
case "right":
|
|
308
|
-
return e ?
|
|
308
|
+
return e ? s : i;
|
|
309
309
|
default:
|
|
310
310
|
return [];
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
const
|
|
315
|
-
let
|
|
316
|
-
return
|
|
313
|
+
function tn(t, e, o, n) {
|
|
314
|
+
const r = ut(t);
|
|
315
|
+
let s = Ze(X(t), o === "start", n);
|
|
316
|
+
return r && (s = s.map((i) => i + "-" + r), e && (s = s.concat(s.map(Tt)))), s;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
318
|
+
function pt(t) {
|
|
319
|
+
return t.replace(/left|right|bottom|top/g, (e) => Xe[e]);
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function en(t) {
|
|
322
322
|
return {
|
|
323
323
|
top: 0,
|
|
324
324
|
right: 0,
|
|
@@ -327,44 +327,44 @@ function Je(t) {
|
|
|
327
327
|
...t
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return typeof t != "number" ?
|
|
330
|
+
function de(t) {
|
|
331
|
+
return typeof t != "number" ? en(t) : {
|
|
332
332
|
top: t,
|
|
333
333
|
right: t,
|
|
334
334
|
bottom: t,
|
|
335
335
|
left: t
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function wt(t) {
|
|
339
339
|
const {
|
|
340
340
|
x: e,
|
|
341
341
|
y: o,
|
|
342
342
|
width: n,
|
|
343
|
-
height:
|
|
343
|
+
height: r
|
|
344
344
|
} = t;
|
|
345
345
|
return {
|
|
346
346
|
width: n,
|
|
347
|
-
height:
|
|
347
|
+
height: r,
|
|
348
348
|
top: o,
|
|
349
349
|
left: e,
|
|
350
350
|
right: e + n,
|
|
351
|
-
bottom: o +
|
|
351
|
+
bottom: o + r,
|
|
352
352
|
x: e,
|
|
353
353
|
y: o
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function _t(t, e, o) {
|
|
357
357
|
let {
|
|
358
358
|
reference: n,
|
|
359
|
-
floating:
|
|
359
|
+
floating: r
|
|
360
360
|
} = t;
|
|
361
|
-
const
|
|
361
|
+
const s = z(e), i = Vt(e), c = Nt(i), a = X(e), l = s === "y", h = n.x + n.width / 2 - r.width / 2, f = n.y + n.height / 2 - r.height / 2, m = n[c] / 2 - r[c] / 2;
|
|
362
362
|
let u;
|
|
363
|
-
switch (
|
|
363
|
+
switch (a) {
|
|
364
364
|
case "top":
|
|
365
365
|
u = {
|
|
366
366
|
x: h,
|
|
367
|
-
y: n.y -
|
|
367
|
+
y: n.y - r.height
|
|
368
368
|
};
|
|
369
369
|
break;
|
|
370
370
|
case "bottom":
|
|
@@ -381,7 +381,7 @@ function Bt(t, e, o) {
|
|
|
381
381
|
break;
|
|
382
382
|
case "left":
|
|
383
383
|
u = {
|
|
384
|
-
x: n.x -
|
|
384
|
+
x: n.x - r.width,
|
|
385
385
|
y: f
|
|
386
386
|
};
|
|
387
387
|
break;
|
|
@@ -391,31 +391,31 @@ function Bt(t, e, o) {
|
|
|
391
391
|
y: n.y
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
switch (
|
|
394
|
+
switch (ut(e)) {
|
|
395
395
|
case "start":
|
|
396
|
-
u[i] -= m * (o &&
|
|
396
|
+
u[i] -= m * (o && l ? -1 : 1);
|
|
397
397
|
break;
|
|
398
398
|
case "end":
|
|
399
|
-
u[i] += m * (o &&
|
|
399
|
+
u[i] += m * (o && l ? -1 : 1);
|
|
400
400
|
break;
|
|
401
401
|
}
|
|
402
402
|
return u;
|
|
403
403
|
}
|
|
404
|
-
const
|
|
404
|
+
const nn = async (t, e, o) => {
|
|
405
405
|
const {
|
|
406
406
|
placement: n = "bottom",
|
|
407
|
-
strategy:
|
|
408
|
-
middleware:
|
|
407
|
+
strategy: r = "absolute",
|
|
408
|
+
middleware: s = [],
|
|
409
409
|
platform: i
|
|
410
|
-
} = o, c =
|
|
411
|
-
let
|
|
410
|
+
} = o, c = s.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(e));
|
|
411
|
+
let l = await i.getElementRects({
|
|
412
412
|
reference: t,
|
|
413
413
|
floating: e,
|
|
414
|
-
strategy:
|
|
414
|
+
strategy: r
|
|
415
415
|
}), {
|
|
416
416
|
x: h,
|
|
417
417
|
y: f
|
|
418
|
-
} =
|
|
418
|
+
} = _t(l, n, a), m = n, u = {}, d = 0;
|
|
419
419
|
for (let p = 0; p < c.length; p++) {
|
|
420
420
|
const {
|
|
421
421
|
name: w,
|
|
@@ -430,9 +430,9 @@ const Ge = async (t, e, o) => {
|
|
|
430
430
|
y: f,
|
|
431
431
|
initialPlacement: n,
|
|
432
432
|
placement: m,
|
|
433
|
-
strategy:
|
|
433
|
+
strategy: r,
|
|
434
434
|
middlewareData: u,
|
|
435
|
-
rects:
|
|
435
|
+
rects: l,
|
|
436
436
|
platform: i,
|
|
437
437
|
elements: {
|
|
438
438
|
reference: t,
|
|
@@ -445,60 +445,60 @@ const Ge = async (t, e, o) => {
|
|
|
445
445
|
...u[w],
|
|
446
446
|
...b
|
|
447
447
|
}
|
|
448
|
-
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (
|
|
448
|
+
}, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (l = v.rects === !0 ? await i.getElementRects({
|
|
449
449
|
reference: t,
|
|
450
450
|
floating: e,
|
|
451
|
-
strategy:
|
|
451
|
+
strategy: r
|
|
452
452
|
}) : v.rects), {
|
|
453
453
|
x: h,
|
|
454
454
|
y: f
|
|
455
|
-
} =
|
|
455
|
+
} = _t(l, m, a)), p = -1);
|
|
456
456
|
}
|
|
457
457
|
return {
|
|
458
458
|
x: h,
|
|
459
459
|
y: f,
|
|
460
460
|
placement: m,
|
|
461
|
-
strategy:
|
|
461
|
+
strategy: r,
|
|
462
462
|
middlewareData: u
|
|
463
463
|
};
|
|
464
464
|
};
|
|
465
|
-
async function
|
|
465
|
+
async function me(t, e) {
|
|
466
466
|
var o;
|
|
467
467
|
e === void 0 && (e = {});
|
|
468
468
|
const {
|
|
469
469
|
x: n,
|
|
470
|
-
y:
|
|
471
|
-
platform:
|
|
470
|
+
y: r,
|
|
471
|
+
platform: s,
|
|
472
472
|
rects: i,
|
|
473
473
|
elements: c,
|
|
474
|
-
strategy:
|
|
474
|
+
strategy: a
|
|
475
475
|
} = t, {
|
|
476
|
-
boundary:
|
|
476
|
+
boundary: l = "clippingAncestors",
|
|
477
477
|
rootBoundary: h = "viewport",
|
|
478
478
|
elementContext: f = "floating",
|
|
479
479
|
altBoundary: m = !1,
|
|
480
480
|
padding: u = 0
|
|
481
|
-
} = lt(e, t), d =
|
|
482
|
-
element: (o = await (
|
|
483
|
-
boundary:
|
|
481
|
+
} = lt(e, t), d = de(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = wt(await s.getClippingRect({
|
|
482
|
+
element: (o = await (s.isElement == null ? void 0 : s.isElement(w))) == null || o ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
483
|
+
boundary: l,
|
|
484
484
|
rootBoundary: h,
|
|
485
|
-
strategy:
|
|
485
|
+
strategy: a
|
|
486
486
|
})), x = f === "floating" ? {
|
|
487
487
|
x: n,
|
|
488
|
-
y:
|
|
488
|
+
y: r,
|
|
489
489
|
width: i.floating.width,
|
|
490
490
|
height: i.floating.height
|
|
491
|
-
} : i.reference, y = await (
|
|
491
|
+
} : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), b = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
|
|
492
492
|
x: 1,
|
|
493
493
|
y: 1
|
|
494
494
|
} : {
|
|
495
495
|
x: 1,
|
|
496
496
|
y: 1
|
|
497
|
-
}, v =
|
|
497
|
+
}, v = wt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
498
498
|
elements: c,
|
|
499
499
|
rect: x,
|
|
500
500
|
offsetParent: y,
|
|
501
|
-
strategy:
|
|
501
|
+
strategy: a
|
|
502
502
|
}) : x);
|
|
503
503
|
return {
|
|
504
504
|
top: (g.top - v.top + d.top) / b.y,
|
|
@@ -507,56 +507,56 @@ async function fe(t, e) {
|
|
|
507
507
|
right: (v.right - g.right + d.right) / b.x
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const on = (t) => ({
|
|
511
511
|
name: "arrow",
|
|
512
512
|
options: t,
|
|
513
513
|
async fn(e) {
|
|
514
514
|
const {
|
|
515
515
|
x: o,
|
|
516
516
|
y: n,
|
|
517
|
-
placement:
|
|
518
|
-
rects:
|
|
517
|
+
placement: r,
|
|
518
|
+
rects: s,
|
|
519
519
|
platform: i,
|
|
520
520
|
elements: c,
|
|
521
|
-
middlewareData:
|
|
521
|
+
middlewareData: a
|
|
522
522
|
} = e, {
|
|
523
|
-
element:
|
|
523
|
+
element: l,
|
|
524
524
|
padding: h = 0
|
|
525
525
|
} = lt(t, e) || {};
|
|
526
|
-
if (
|
|
526
|
+
if (l == null)
|
|
527
527
|
return {};
|
|
528
|
-
const f =
|
|
528
|
+
const f = de(h), m = {
|
|
529
529
|
x: o,
|
|
530
530
|
y: n
|
|
531
|
-
}, u =
|
|
532
|
-
let
|
|
533
|
-
(!
|
|
534
|
-
const _ = b / 2 - v / 2, V =
|
|
531
|
+
}, u = Vt(r), d = Nt(u), p = await i.getDimensions(l), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = s.reference[d] + s.reference[u] - m[u] - s.floating[d], v = m[u] - s.reference[u], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
532
|
+
let R = P ? P[y] : 0;
|
|
533
|
+
(!R || !await (i.isElement == null ? void 0 : i.isElement(P))) && (R = c.floating[y] || s.floating[d]);
|
|
534
|
+
const _ = b / 2 - v / 2, V = R / 2 - p[d] / 2 - 1, L = Z(f[g], V), j = Z(f[x], V), I = L, nt = R - p[d] - j, A = R / 2 - p[d] / 2 + _, Y = St(I, A, nt), $ = !a.arrow && ut(r) != null && A !== Y && s.reference[d] / 2 - (A < I ? L : j) - p[d] / 2 < 0, S = $ ? A < I ? A - I : A - nt : 0;
|
|
535
535
|
return {
|
|
536
|
-
[u]: m[u] +
|
|
536
|
+
[u]: m[u] + S,
|
|
537
537
|
data: {
|
|
538
538
|
[u]: Y,
|
|
539
|
-
centerOffset:
|
|
540
|
-
|
|
541
|
-
alignmentOffset:
|
|
539
|
+
centerOffset: A - Y - S,
|
|
540
|
+
...$ && {
|
|
541
|
+
alignmentOffset: S
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
|
-
reset:
|
|
544
|
+
reset: $
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
|
-
}),
|
|
547
|
+
}), rn = function(t) {
|
|
548
548
|
return t === void 0 && (t = {}), {
|
|
549
549
|
name: "flip",
|
|
550
550
|
options: t,
|
|
551
551
|
async fn(e) {
|
|
552
552
|
var o, n;
|
|
553
553
|
const {
|
|
554
|
-
placement:
|
|
555
|
-
middlewareData:
|
|
554
|
+
placement: r,
|
|
555
|
+
middlewareData: s,
|
|
556
556
|
rects: i,
|
|
557
557
|
initialPlacement: c,
|
|
558
|
-
platform:
|
|
559
|
-
elements:
|
|
558
|
+
platform: a,
|
|
559
|
+
elements: l
|
|
560
560
|
} = e, {
|
|
561
561
|
mainAxis: h = !0,
|
|
562
562
|
crossAxis: f = !0,
|
|
@@ -566,59 +566,59 @@ const Qe = (t) => ({
|
|
|
566
566
|
flipAlignment: p = !0,
|
|
567
567
|
...w
|
|
568
568
|
} = lt(t, e);
|
|
569
|
-
if ((o =
|
|
569
|
+
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
570
570
|
return {};
|
|
571
|
-
const g = X(
|
|
572
|
-
!m &&
|
|
573
|
-
const
|
|
574
|
-
let
|
|
571
|
+
const g = X(r), x = z(c), y = X(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (y || !p ? [pt(c)] : Qe(c)), P = d !== "none";
|
|
572
|
+
!m && P && v.push(...tn(c, p, d, b));
|
|
573
|
+
const R = [c, ...v], _ = await me(e, w), V = [];
|
|
574
|
+
let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
575
575
|
if (h && V.push(_[g]), f) {
|
|
576
|
-
const
|
|
577
|
-
V.push(_[
|
|
576
|
+
const A = Ge(r, i, b);
|
|
577
|
+
V.push(_[A[0]], _[A[1]]);
|
|
578
578
|
}
|
|
579
|
-
if (
|
|
580
|
-
placement:
|
|
579
|
+
if (L = [...L, {
|
|
580
|
+
placement: r,
|
|
581
581
|
overflows: V
|
|
582
|
-
}], !V.every((
|
|
583
|
-
var
|
|
584
|
-
const
|
|
582
|
+
}], !V.every((A) => A <= 0)) {
|
|
583
|
+
var j, I;
|
|
584
|
+
const A = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, Y = R[A];
|
|
585
585
|
if (Y && (!(f === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
|
|
586
586
|
// overflows the main axis.
|
|
587
|
-
|
|
587
|
+
L.every((T) => T.overflows[0] > 0 && z(T.placement) === x)))
|
|
588
588
|
return {
|
|
589
589
|
data: {
|
|
590
|
-
index:
|
|
591
|
-
overflows:
|
|
590
|
+
index: A,
|
|
591
|
+
overflows: L
|
|
592
592
|
},
|
|
593
593
|
reset: {
|
|
594
594
|
placement: Y
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
|
-
let
|
|
598
|
-
if (
|
|
597
|
+
let $ = (I = L.filter((S) => S.overflows[0] <= 0).sort((S, T) => S.overflows[1] - T.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
598
|
+
if (!$)
|
|
599
599
|
switch (u) {
|
|
600
600
|
case "bestFit": {
|
|
601
601
|
var nt;
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
const B = z(
|
|
602
|
+
const S = (nt = L.filter((T) => {
|
|
603
|
+
if (P) {
|
|
604
|
+
const B = z(T.placement);
|
|
605
605
|
return B === x || // Create a bias to the `y` side axis due to horizontal
|
|
606
606
|
// reading directions favoring greater width.
|
|
607
607
|
B === "y";
|
|
608
608
|
}
|
|
609
609
|
return !0;
|
|
610
|
-
}).map((
|
|
611
|
-
|
|
610
|
+
}).map((T) => [T.placement, T.overflows.filter((B) => B > 0).reduce((B, Ee) => B + Ee, 0)]).sort((T, B) => T[1] - B[1])[0]) == null ? void 0 : nt[0];
|
|
611
|
+
S && ($ = S);
|
|
612
612
|
break;
|
|
613
613
|
}
|
|
614
614
|
case "initialPlacement":
|
|
615
|
-
|
|
615
|
+
$ = c;
|
|
616
616
|
break;
|
|
617
617
|
}
|
|
618
|
-
if (
|
|
618
|
+
if (r !== $)
|
|
619
619
|
return {
|
|
620
620
|
reset: {
|
|
621
|
-
placement:
|
|
621
|
+
placement: $
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
624
|
}
|
|
@@ -626,12 +626,12 @@ const Qe = (t) => ({
|
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
628
|
};
|
|
629
|
-
async function
|
|
629
|
+
async function sn(t, e) {
|
|
630
630
|
const {
|
|
631
631
|
placement: o,
|
|
632
632
|
platform: n,
|
|
633
|
-
elements:
|
|
634
|
-
} = t,
|
|
633
|
+
elements: r
|
|
634
|
+
} = t, s = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), i = X(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, h = s && a ? -1 : 1, f = lt(e, t);
|
|
635
635
|
let {
|
|
636
636
|
mainAxis: m,
|
|
637
637
|
crossAxis: u,
|
|
@@ -645,37 +645,37 @@ async function tn(t, e) {
|
|
|
645
645
|
crossAxis: f.crossAxis || 0,
|
|
646
646
|
alignmentAxis: f.alignmentAxis
|
|
647
647
|
};
|
|
648
|
-
return c && typeof d == "number" && (u = c === "end" ? d * -1 : d),
|
|
648
|
+
return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
|
|
649
649
|
x: u * h,
|
|
650
|
-
y: m *
|
|
650
|
+
y: m * l
|
|
651
651
|
} : {
|
|
652
|
-
x: m *
|
|
652
|
+
x: m * l,
|
|
653
653
|
y: u * h
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const cn = function(t) {
|
|
657
657
|
return t === void 0 && (t = 0), {
|
|
658
658
|
name: "offset",
|
|
659
659
|
options: t,
|
|
660
660
|
async fn(e) {
|
|
661
661
|
var o, n;
|
|
662
662
|
const {
|
|
663
|
-
x:
|
|
664
|
-
y:
|
|
663
|
+
x: r,
|
|
664
|
+
y: s,
|
|
665
665
|
placement: i,
|
|
666
666
|
middlewareData: c
|
|
667
|
-
} = e,
|
|
667
|
+
} = e, a = await sn(e, t);
|
|
668
668
|
return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
669
|
-
x:
|
|
670
|
-
y:
|
|
669
|
+
x: r + a.x,
|
|
670
|
+
y: s + a.y,
|
|
671
671
|
data: {
|
|
672
|
-
...
|
|
672
|
+
...a,
|
|
673
673
|
placement: i
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
},
|
|
678
|
+
}, an = function(t) {
|
|
679
679
|
return t === void 0 && (t = {}), {
|
|
680
680
|
name: "shift",
|
|
681
681
|
options: t,
|
|
@@ -683,9 +683,9 @@ const en = function(t) {
|
|
|
683
683
|
const {
|
|
684
684
|
x: o,
|
|
685
685
|
y: n,
|
|
686
|
-
placement:
|
|
686
|
+
placement: r
|
|
687
687
|
} = e, {
|
|
688
|
-
mainAxis:
|
|
688
|
+
mainAxis: s = !0,
|
|
689
689
|
crossAxis: i = !1,
|
|
690
690
|
limiter: c = {
|
|
691
691
|
fn: (w) => {
|
|
@@ -699,13 +699,13 @@ const en = function(t) {
|
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
|
-
...
|
|
703
|
-
} = lt(t, e),
|
|
702
|
+
...a
|
|
703
|
+
} = lt(t, e), l = {
|
|
704
704
|
x: o,
|
|
705
705
|
y: n
|
|
706
|
-
}, h = await
|
|
707
|
-
let u =
|
|
708
|
-
if (
|
|
706
|
+
}, h = await me(e, a), f = z(X(r)), m = he(f);
|
|
707
|
+
let u = l[m], d = l[f];
|
|
708
|
+
if (s) {
|
|
709
709
|
const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
|
|
710
710
|
u = St(x, u, y);
|
|
711
711
|
}
|
|
@@ -724,7 +724,7 @@ const en = function(t) {
|
|
|
724
724
|
x: p.x - o,
|
|
725
725
|
y: p.y - n,
|
|
726
726
|
enabled: {
|
|
727
|
-
[m]:
|
|
727
|
+
[m]: s,
|
|
728
728
|
[f]: i
|
|
729
729
|
}
|
|
730
730
|
}
|
|
@@ -732,45 +732,45 @@ const en = function(t) {
|
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
734
|
};
|
|
735
|
-
function
|
|
735
|
+
function xt() {
|
|
736
736
|
return typeof window < "u";
|
|
737
737
|
}
|
|
738
738
|
function et(t) {
|
|
739
|
-
return
|
|
739
|
+
return ge(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function O(t) {
|
|
742
742
|
var e;
|
|
743
743
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function N(t) {
|
|
746
746
|
var e;
|
|
747
|
-
return (e = (
|
|
747
|
+
return (e = (ge(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
750
|
-
return
|
|
749
|
+
function ge(t) {
|
|
750
|
+
return xt() ? t instanceof Node || t instanceof O(t).Node : !1;
|
|
751
751
|
}
|
|
752
752
|
function k(t) {
|
|
753
|
-
return
|
|
753
|
+
return xt() ? t instanceof Element || t instanceof O(t).Element : !1;
|
|
754
754
|
}
|
|
755
755
|
function W(t) {
|
|
756
|
-
return
|
|
756
|
+
return xt() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
return !
|
|
758
|
+
function jt(t) {
|
|
759
|
+
return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function ft(t) {
|
|
762
762
|
const {
|
|
763
763
|
overflow: e,
|
|
764
764
|
overflowX: o,
|
|
765
765
|
overflowY: n,
|
|
766
|
-
display:
|
|
767
|
-
} =
|
|
768
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(
|
|
766
|
+
display: r
|
|
767
|
+
} = C(t);
|
|
768
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function ln(t) {
|
|
771
771
|
return ["table", "td", "th"].includes(et(t));
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function vt(t) {
|
|
774
774
|
return [":popover-open", ":modal"].some((e) => {
|
|
775
775
|
try {
|
|
776
776
|
return t.matches(e);
|
|
@@ -779,31 +779,31 @@ function xt(t) {
|
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
|
-
function
|
|
783
|
-
const e =
|
|
782
|
+
function $t(t) {
|
|
783
|
+
const e = Ht(), o = k(t) ? C(t) : t;
|
|
784
784
|
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));
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function un(t) {
|
|
787
787
|
let e = K(t);
|
|
788
788
|
for (; W(e) && !tt(e); ) {
|
|
789
|
-
if (
|
|
789
|
+
if ($t(e))
|
|
790
790
|
return e;
|
|
791
|
-
if (
|
|
791
|
+
if (vt(e))
|
|
792
792
|
return null;
|
|
793
793
|
e = K(e);
|
|
794
794
|
}
|
|
795
795
|
return null;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Ht() {
|
|
798
798
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
799
799
|
}
|
|
800
800
|
function tt(t) {
|
|
801
801
|
return ["html", "body", "#document"].includes(et(t));
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
return
|
|
803
|
+
function C(t) {
|
|
804
|
+
return O(t).getComputedStyle(t);
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function bt(t) {
|
|
807
807
|
return k(t) ? {
|
|
808
808
|
scrollLeft: t.scrollLeft,
|
|
809
809
|
scrollTop: t.scrollTop
|
|
@@ -819,250 +819,250 @@ function K(t) {
|
|
|
819
819
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
820
820
|
t.assignedSlot || // DOM Element detected.
|
|
821
821
|
t.parentNode || // ShadowRoot detected.
|
|
822
|
-
|
|
823
|
-
|
|
822
|
+
jt(t) && t.host || // Fallback.
|
|
823
|
+
N(t)
|
|
824
824
|
);
|
|
825
|
-
return
|
|
825
|
+
return jt(e) ? e.host : e;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function pe(t) {
|
|
828
828
|
const e = K(t);
|
|
829
|
-
return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) &&
|
|
829
|
+
return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ft(e) ? e : pe(e);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function it(t, e, o) {
|
|
832
832
|
var n;
|
|
833
833
|
e === void 0 && (e = []), o === void 0 && (o = !0);
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
836
|
-
const c =
|
|
837
|
-
return e.concat(i, i.visualViewport || [],
|
|
834
|
+
const r = pe(t), s = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = O(r);
|
|
835
|
+
if (s) {
|
|
836
|
+
const c = kt(i);
|
|
837
|
+
return e.concat(i, i.visualViewport || [], ft(r) ? r : [], c && o ? it(c) : []);
|
|
838
838
|
}
|
|
839
|
-
return e.concat(
|
|
839
|
+
return e.concat(r, it(r, [], o));
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function kt(t) {
|
|
842
842
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
const e =
|
|
844
|
+
function we(t) {
|
|
845
|
+
const e = C(t);
|
|
846
846
|
let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
847
|
-
const
|
|
848
|
-
return c && (o =
|
|
847
|
+
const r = W(t), s = r ? t.offsetWidth : o, i = r ? t.offsetHeight : n, c = gt(o) !== s || gt(n) !== i;
|
|
848
|
+
return c && (o = s, n = i), {
|
|
849
849
|
width: o,
|
|
850
850
|
height: n,
|
|
851
851
|
$: c
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Bt(t) {
|
|
855
855
|
return k(t) ? t : t.contextElement;
|
|
856
856
|
}
|
|
857
857
|
function Q(t) {
|
|
858
|
-
const e =
|
|
858
|
+
const e = Bt(t);
|
|
859
859
|
if (!W(e))
|
|
860
|
-
return
|
|
860
|
+
return D(1);
|
|
861
861
|
const o = e.getBoundingClientRect(), {
|
|
862
862
|
width: n,
|
|
863
|
-
height:
|
|
864
|
-
$:
|
|
865
|
-
} =
|
|
866
|
-
let i = (
|
|
863
|
+
height: r,
|
|
864
|
+
$: s
|
|
865
|
+
} = we(e);
|
|
866
|
+
let i = (s ? gt(o.width) : o.width) / n, c = (s ? gt(o.height) : o.height) / r;
|
|
867
867
|
return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
868
868
|
x: i,
|
|
869
869
|
y: c
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
|
-
const
|
|
873
|
-
function
|
|
874
|
-
const e =
|
|
875
|
-
return !
|
|
872
|
+
const fn = /* @__PURE__ */ D(0);
|
|
873
|
+
function ye(t) {
|
|
874
|
+
const e = O(t);
|
|
875
|
+
return !Ht() || !e.visualViewport ? fn : {
|
|
876
876
|
x: e.visualViewport.offsetLeft,
|
|
877
877
|
y: e.visualViewport.offsetTop
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
return e === void 0 && (e = !1), !o || e && o !==
|
|
880
|
+
function hn(t, e, o) {
|
|
881
|
+
return e === void 0 && (e = !1), !o || e && o !== O(t) ? !1 : e;
|
|
882
882
|
}
|
|
883
883
|
function J(t, e, o, n) {
|
|
884
884
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
885
|
-
const
|
|
886
|
-
let i =
|
|
885
|
+
const r = t.getBoundingClientRect(), s = Bt(t);
|
|
886
|
+
let i = D(1);
|
|
887
887
|
e && (n ? k(n) && (i = Q(n)) : i = Q(t));
|
|
888
|
-
const c =
|
|
889
|
-
let
|
|
890
|
-
if (
|
|
891
|
-
const m =
|
|
892
|
-
let d = m, p =
|
|
888
|
+
const c = hn(s, o, n) ? ye(s) : D(0);
|
|
889
|
+
let a = (r.left + c.x) / i.x, l = (r.top + c.y) / i.y, h = r.width / i.x, f = r.height / i.y;
|
|
890
|
+
if (s) {
|
|
891
|
+
const m = O(s), u = n && k(n) ? O(n) : n;
|
|
892
|
+
let d = m, p = kt(d);
|
|
893
893
|
for (; p && n && u !== d; ) {
|
|
894
|
-
const w = Q(p), g = p.getBoundingClientRect(), x =
|
|
895
|
-
|
|
894
|
+
const w = Q(p), g = p.getBoundingClientRect(), x = C(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
895
|
+
a *= w.x, l *= w.y, h *= w.x, f *= w.y, a += y, l += b, d = O(p), p = kt(d);
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
return
|
|
898
|
+
return wt({
|
|
899
899
|
width: h,
|
|
900
900
|
height: f,
|
|
901
|
-
x:
|
|
902
|
-
y:
|
|
901
|
+
x: a,
|
|
902
|
+
y: l
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
const o =
|
|
907
|
-
return e ? e.left + o : J(
|
|
905
|
+
function Ut(t, e) {
|
|
906
|
+
const o = bt(t).scrollLeft;
|
|
907
|
+
return e ? e.left + o : J(N(t)).left + o;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function xe(t, e, o) {
|
|
910
910
|
o === void 0 && (o = !1);
|
|
911
|
-
const n = t.getBoundingClientRect(),
|
|
911
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
|
|
912
912
|
// RTL <body> scrollbar.
|
|
913
|
-
|
|
914
|
-
)),
|
|
913
|
+
Ut(t, n)
|
|
914
|
+
)), s = n.top + e.scrollTop;
|
|
915
915
|
return {
|
|
916
|
-
x:
|
|
917
|
-
y:
|
|
916
|
+
x: r,
|
|
917
|
+
y: s
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function dn(t) {
|
|
921
921
|
let {
|
|
922
922
|
elements: e,
|
|
923
923
|
rect: o,
|
|
924
924
|
offsetParent: n,
|
|
925
|
-
strategy:
|
|
925
|
+
strategy: r
|
|
926
926
|
} = t;
|
|
927
|
-
const
|
|
928
|
-
if (n === i || c &&
|
|
927
|
+
const s = r === "fixed", i = N(n), c = e ? vt(e.floating) : !1;
|
|
928
|
+
if (n === i || c && s)
|
|
929
929
|
return o;
|
|
930
|
-
let
|
|
930
|
+
let a = {
|
|
931
931
|
scrollLeft: 0,
|
|
932
932
|
scrollTop: 0
|
|
933
|
-
},
|
|
934
|
-
const h =
|
|
935
|
-
if ((f || !f && !
|
|
933
|
+
}, l = D(1);
|
|
934
|
+
const h = D(0), f = W(n);
|
|
935
|
+
if ((f || !f && !s) && ((et(n) !== "body" || ft(i)) && (a = bt(n)), W(n))) {
|
|
936
936
|
const u = J(n);
|
|
937
|
-
|
|
937
|
+
l = Q(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
|
|
938
938
|
}
|
|
939
|
-
const m = i && !f && !
|
|
939
|
+
const m = i && !f && !s ? xe(i, a, !0) : D(0);
|
|
940
940
|
return {
|
|
941
|
-
width: o.width *
|
|
942
|
-
height: o.height *
|
|
943
|
-
x: o.x *
|
|
944
|
-
y: o.y *
|
|
941
|
+
width: o.width * l.x,
|
|
942
|
+
height: o.height * l.y,
|
|
943
|
+
x: o.x * l.x - a.scrollLeft * l.x + h.x + m.x,
|
|
944
|
+
y: o.y * l.y - a.scrollTop * l.y + h.y + m.y
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function mn(t) {
|
|
948
948
|
return Array.from(t.getClientRects());
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
const e =
|
|
952
|
-
let i = -o.scrollLeft +
|
|
950
|
+
function gn(t) {
|
|
951
|
+
const e = N(t), o = bt(t), n = t.ownerDocument.body, r = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
952
|
+
let i = -o.scrollLeft + Ut(t);
|
|
953
953
|
const c = -o.scrollTop;
|
|
954
|
-
return
|
|
955
|
-
width:
|
|
956
|
-
height:
|
|
954
|
+
return C(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - r), {
|
|
955
|
+
width: r,
|
|
956
|
+
height: s,
|
|
957
957
|
x: i,
|
|
958
958
|
y: c
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
const o =
|
|
963
|
-
let
|
|
964
|
-
if (
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
(!
|
|
961
|
+
function pn(t, e) {
|
|
962
|
+
const o = O(t), n = N(t), r = o.visualViewport;
|
|
963
|
+
let s = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
|
|
964
|
+
if (r) {
|
|
965
|
+
s = r.width, i = r.height;
|
|
966
|
+
const l = Ht();
|
|
967
|
+
(!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
|
|
968
968
|
}
|
|
969
969
|
return {
|
|
970
|
-
width:
|
|
970
|
+
width: s,
|
|
971
971
|
height: i,
|
|
972
972
|
x: c,
|
|
973
|
-
y:
|
|
973
|
+
y: a
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop,
|
|
976
|
+
function wn(t, e) {
|
|
977
|
+
const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, s = W(t) ? Q(t) : D(1), i = t.clientWidth * s.x, c = t.clientHeight * s.y, a = r * s.x, l = n * s.y;
|
|
978
978
|
return {
|
|
979
979
|
width: i,
|
|
980
980
|
height: c,
|
|
981
|
-
x:
|
|
982
|
-
y:
|
|
981
|
+
x: a,
|
|
982
|
+
y: l
|
|
983
983
|
};
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function It(t, e, o) {
|
|
986
986
|
let n;
|
|
987
987
|
if (e === "viewport")
|
|
988
|
-
n =
|
|
988
|
+
n = pn(t, o);
|
|
989
989
|
else if (e === "document")
|
|
990
|
-
n =
|
|
990
|
+
n = gn(N(t));
|
|
991
991
|
else if (k(e))
|
|
992
|
-
n =
|
|
992
|
+
n = wn(e, o);
|
|
993
993
|
else {
|
|
994
|
-
const
|
|
994
|
+
const r = ye(t);
|
|
995
995
|
n = {
|
|
996
|
-
x: e.x -
|
|
997
|
-
y: e.y -
|
|
996
|
+
x: e.x - r.x,
|
|
997
|
+
y: e.y - r.y,
|
|
998
998
|
width: e.width,
|
|
999
999
|
height: e.height
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
return
|
|
1002
|
+
return wt(n);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function ve(t, e) {
|
|
1005
1005
|
const o = K(t);
|
|
1006
|
-
return o === e || !k(o) || tt(o) ? !1 :
|
|
1006
|
+
return o === e || !k(o) || tt(o) ? !1 : C(o).position === "fixed" || ve(o, e);
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function yn(t, e) {
|
|
1009
1009
|
const o = e.get(t);
|
|
1010
1010
|
if (o)
|
|
1011
1011
|
return o;
|
|
1012
|
-
let n =
|
|
1013
|
-
const
|
|
1014
|
-
let i =
|
|
1012
|
+
let n = it(t, [], !1).filter((c) => k(c) && et(c) !== "body"), r = null;
|
|
1013
|
+
const s = C(t).position === "fixed";
|
|
1014
|
+
let i = s ? K(t) : t;
|
|
1015
1015
|
for (; k(i) && !tt(i); ) {
|
|
1016
|
-
const c =
|
|
1017
|
-
!
|
|
1016
|
+
const c = C(i), a = $t(i);
|
|
1017
|
+
!a && c.position === "fixed" && (r = null), (s ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ft(i) && !a && ve(t, i)) ? n = n.filter((h) => h !== i) : r = c, i = K(i);
|
|
1018
1018
|
}
|
|
1019
1019
|
return e.set(t, n), n;
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function xn(t) {
|
|
1022
1022
|
let {
|
|
1023
1023
|
element: e,
|
|
1024
1024
|
boundary: o,
|
|
1025
1025
|
rootBoundary: n,
|
|
1026
|
-
strategy:
|
|
1026
|
+
strategy: r
|
|
1027
1027
|
} = t;
|
|
1028
|
-
const i = [...o === "clippingAncestors" ?
|
|
1029
|
-
const f =
|
|
1030
|
-
return
|
|
1031
|
-
},
|
|
1028
|
+
const i = [...o === "clippingAncestors" ? vt(e) ? [] : yn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, h) => {
|
|
1029
|
+
const f = It(e, h, r);
|
|
1030
|
+
return l.top = q(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = q(f.left, l.left), l;
|
|
1031
|
+
}, It(e, c, r));
|
|
1032
1032
|
return {
|
|
1033
|
-
width:
|
|
1034
|
-
height:
|
|
1035
|
-
x:
|
|
1036
|
-
y:
|
|
1033
|
+
width: a.right - a.left,
|
|
1034
|
+
height: a.bottom - a.top,
|
|
1035
|
+
x: a.left,
|
|
1036
|
+
y: a.top
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function vn(t) {
|
|
1040
1040
|
const {
|
|
1041
1041
|
width: e,
|
|
1042
1042
|
height: o
|
|
1043
|
-
} =
|
|
1043
|
+
} = we(t);
|
|
1044
1044
|
return {
|
|
1045
1045
|
width: e,
|
|
1046
1046
|
height: o
|
|
1047
1047
|
};
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const n = W(e),
|
|
1049
|
+
function bn(t, e, o) {
|
|
1050
|
+
const n = W(e), r = N(e), s = o === "fixed", i = J(t, !0, s, e);
|
|
1051
1051
|
let c = {
|
|
1052
1052
|
scrollLeft: 0,
|
|
1053
1053
|
scrollTop: 0
|
|
1054
1054
|
};
|
|
1055
|
-
const
|
|
1056
|
-
function
|
|
1057
|
-
|
|
1055
|
+
const a = D(0);
|
|
1056
|
+
function l() {
|
|
1057
|
+
a.x = Ut(r);
|
|
1058
1058
|
}
|
|
1059
|
-
if (n || !n && !
|
|
1060
|
-
if ((et(e) !== "body" ||
|
|
1061
|
-
const u = J(e, !0,
|
|
1062
|
-
|
|
1063
|
-
} else
|
|
1064
|
-
|
|
1065
|
-
const h =
|
|
1059
|
+
if (n || !n && !s)
|
|
1060
|
+
if ((et(e) !== "body" || ft(r)) && (c = bt(e)), n) {
|
|
1061
|
+
const u = J(e, !0, s, e);
|
|
1062
|
+
a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
|
|
1063
|
+
} else r && l();
|
|
1064
|
+
s && !n && r && l();
|
|
1065
|
+
const h = r && !n && !s ? xe(r, c) : D(0), f = i.left + c.scrollLeft - a.x - h.x, m = i.top + c.scrollTop - a.y - h.y;
|
|
1066
1066
|
return {
|
|
1067
1067
|
x: f,
|
|
1068
1068
|
y: m,
|
|
@@ -1071,38 +1071,38 @@ function pn(t, e, o) {
|
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
1073
|
function Ot(t) {
|
|
1074
|
-
return
|
|
1074
|
+
return C(t).position === "static";
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
if (!W(t) ||
|
|
1076
|
+
function Yt(t, e) {
|
|
1077
|
+
if (!W(t) || C(t).position === "fixed")
|
|
1078
1078
|
return null;
|
|
1079
1079
|
if (e)
|
|
1080
1080
|
return e(t);
|
|
1081
1081
|
let o = t.offsetParent;
|
|
1082
|
-
return
|
|
1082
|
+
return N(t) === o && (o = o.ownerDocument.body), o;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1085
|
-
const o =
|
|
1086
|
-
if (
|
|
1084
|
+
function be(t, e) {
|
|
1085
|
+
const o = O(t);
|
|
1086
|
+
if (vt(t))
|
|
1087
1087
|
return o;
|
|
1088
1088
|
if (!W(t)) {
|
|
1089
|
-
let
|
|
1090
|
-
for (;
|
|
1091
|
-
if (k(
|
|
1092
|
-
return
|
|
1093
|
-
|
|
1089
|
+
let r = K(t);
|
|
1090
|
+
for (; r && !tt(r); ) {
|
|
1091
|
+
if (k(r) && !Ot(r))
|
|
1092
|
+
return r;
|
|
1093
|
+
r = K(r);
|
|
1094
1094
|
}
|
|
1095
1095
|
return o;
|
|
1096
1096
|
}
|
|
1097
|
-
let n =
|
|
1098
|
-
for (; n &&
|
|
1099
|
-
n =
|
|
1100
|
-
return n && tt(n) && Ot(n) &&
|
|
1097
|
+
let n = Yt(t, e);
|
|
1098
|
+
for (; n && ln(n) && Ot(n); )
|
|
1099
|
+
n = Yt(n, e);
|
|
1100
|
+
return n && tt(n) && Ot(n) && !$t(n) ? o : n || un(t) || o;
|
|
1101
1101
|
}
|
|
1102
|
-
const
|
|
1103
|
-
const e = this.getOffsetParent ||
|
|
1102
|
+
const Rn = async function(t) {
|
|
1103
|
+
const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
|
|
1104
1104
|
return {
|
|
1105
|
-
reference:
|
|
1105
|
+
reference: bn(t.reference, await e(t.floating), t.strategy),
|
|
1106
1106
|
floating: {
|
|
1107
1107
|
x: 0,
|
|
1108
1108
|
y: 0,
|
|
@@ -1111,119 +1111,119 @@ const wn = async function(t) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
};
|
|
1113
1113
|
};
|
|
1114
|
-
function
|
|
1115
|
-
return
|
|
1116
|
-
}
|
|
1117
|
-
const
|
|
1118
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1119
|
-
getDocumentElement:
|
|
1120
|
-
getClippingRect:
|
|
1121
|
-
getOffsetParent:
|
|
1122
|
-
getElementRects:
|
|
1123
|
-
getClientRects:
|
|
1124
|
-
getDimensions:
|
|
1114
|
+
function An(t) {
|
|
1115
|
+
return C(t).direction === "rtl";
|
|
1116
|
+
}
|
|
1117
|
+
const On = {
|
|
1118
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: dn,
|
|
1119
|
+
getDocumentElement: N,
|
|
1120
|
+
getClippingRect: xn,
|
|
1121
|
+
getOffsetParent: be,
|
|
1122
|
+
getElementRects: Rn,
|
|
1123
|
+
getClientRects: mn,
|
|
1124
|
+
getDimensions: vn,
|
|
1125
1125
|
getScale: Q,
|
|
1126
1126
|
isElement: k,
|
|
1127
|
-
isRTL:
|
|
1127
|
+
isRTL: An
|
|
1128
1128
|
};
|
|
1129
|
-
function
|
|
1129
|
+
function Re(t, e) {
|
|
1130
1130
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function En(t, e) {
|
|
1133
1133
|
let o = null, n;
|
|
1134
|
-
const
|
|
1135
|
-
function
|
|
1134
|
+
const r = N(t);
|
|
1135
|
+
function s() {
|
|
1136
1136
|
var c;
|
|
1137
1137
|
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
1138
1138
|
}
|
|
1139
|
-
function i(c,
|
|
1140
|
-
c === void 0 && (c = !1),
|
|
1141
|
-
const
|
|
1139
|
+
function i(c, a) {
|
|
1140
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), s();
|
|
1141
|
+
const l = t.getBoundingClientRect(), {
|
|
1142
1142
|
left: h,
|
|
1143
1143
|
top: f,
|
|
1144
1144
|
width: m,
|
|
1145
1145
|
height: u
|
|
1146
|
-
} =
|
|
1146
|
+
} = l;
|
|
1147
1147
|
if (c || e(), !m || !u)
|
|
1148
1148
|
return;
|
|
1149
|
-
const d =
|
|
1149
|
+
const d = dt(f), p = dt(r.clientWidth - (h + m)), w = dt(r.clientHeight - (f + u)), g = dt(h), y = {
|
|
1150
1150
|
rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
|
|
1151
|
-
threshold: q(0, Z(1,
|
|
1151
|
+
threshold: q(0, Z(1, a)) || 1
|
|
1152
1152
|
};
|
|
1153
1153
|
let b = !0;
|
|
1154
|
-
function v(
|
|
1155
|
-
const
|
|
1156
|
-
if (
|
|
1154
|
+
function v(P) {
|
|
1155
|
+
const R = P[0].intersectionRatio;
|
|
1156
|
+
if (R !== a) {
|
|
1157
1157
|
if (!b)
|
|
1158
1158
|
return i();
|
|
1159
|
-
|
|
1159
|
+
R ? i(!1, R) : n = setTimeout(() => {
|
|
1160
1160
|
i(!1, 1e-7);
|
|
1161
1161
|
}, 1e3);
|
|
1162
1162
|
}
|
|
1163
|
-
|
|
1163
|
+
R === 1 && !Re(l, t.getBoundingClientRect()) && i(), b = !1;
|
|
1164
1164
|
}
|
|
1165
1165
|
try {
|
|
1166
1166
|
o = new IntersectionObserver(v, {
|
|
1167
1167
|
...y,
|
|
1168
1168
|
// Handle <iframe>s
|
|
1169
|
-
root:
|
|
1169
|
+
root: r.ownerDocument
|
|
1170
1170
|
});
|
|
1171
1171
|
} catch {
|
|
1172
1172
|
o = new IntersectionObserver(v, y);
|
|
1173
1173
|
}
|
|
1174
1174
|
o.observe(t);
|
|
1175
1175
|
}
|
|
1176
|
-
return i(!0),
|
|
1176
|
+
return i(!0), s;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Pn(t, e, o, n) {
|
|
1179
1179
|
n === void 0 && (n = {});
|
|
1180
1180
|
const {
|
|
1181
|
-
ancestorScroll:
|
|
1182
|
-
ancestorResize:
|
|
1181
|
+
ancestorScroll: r = !0,
|
|
1182
|
+
ancestorResize: s = !0,
|
|
1183
1183
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1184
1184
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1185
|
-
animationFrame:
|
|
1186
|
-
} = n,
|
|
1185
|
+
animationFrame: a = !1
|
|
1186
|
+
} = n, l = Bt(t), h = r || s ? [...l ? it(l) : [], ...it(e)] : [];
|
|
1187
1187
|
h.forEach((g) => {
|
|
1188
|
-
|
|
1188
|
+
r && g.addEventListener("scroll", o, {
|
|
1189
1189
|
passive: !0
|
|
1190
|
-
}),
|
|
1190
|
+
}), s && g.addEventListener("resize", o);
|
|
1191
1191
|
});
|
|
1192
|
-
const f =
|
|
1192
|
+
const f = l && c ? En(l, o) : null;
|
|
1193
1193
|
let m = -1, u = null;
|
|
1194
1194
|
i && (u = new ResizeObserver((g) => {
|
|
1195
1195
|
let [x] = g;
|
|
1196
|
-
x && x.target ===
|
|
1196
|
+
x && x.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1197
1197
|
var y;
|
|
1198
1198
|
(y = u) == null || y.observe(e);
|
|
1199
1199
|
})), o();
|
|
1200
|
-
}),
|
|
1201
|
-
let d, p =
|
|
1202
|
-
|
|
1200
|
+
}), l && !a && u.observe(l), u.observe(e));
|
|
1201
|
+
let d, p = a ? J(t) : null;
|
|
1202
|
+
a && w();
|
|
1203
1203
|
function w() {
|
|
1204
1204
|
const g = J(t);
|
|
1205
|
-
p && !
|
|
1205
|
+
p && !Re(p, g) && o(), p = g, d = requestAnimationFrame(w);
|
|
1206
1206
|
}
|
|
1207
1207
|
return o(), () => {
|
|
1208
1208
|
var g;
|
|
1209
1209
|
h.forEach((x) => {
|
|
1210
|
-
|
|
1211
|
-
}), f == null || f(), (g = u) == null || g.disconnect(), u = null,
|
|
1210
|
+
r && x.removeEventListener("scroll", o), s && x.removeEventListener("resize", o);
|
|
1211
|
+
}), f == null || f(), (g = u) == null || g.disconnect(), u = null, a && cancelAnimationFrame(d);
|
|
1212
1212
|
};
|
|
1213
1213
|
}
|
|
1214
|
-
const
|
|
1215
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1216
|
-
platform:
|
|
1214
|
+
const Ln = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
|
|
1215
|
+
const n = /* @__PURE__ */ new Map(), r = {
|
|
1216
|
+
platform: On,
|
|
1217
1217
|
...o
|
|
1218
|
-
},
|
|
1219
|
-
...
|
|
1218
|
+
}, s = {
|
|
1219
|
+
...r.platform,
|
|
1220
1220
|
_c: n
|
|
1221
1221
|
};
|
|
1222
|
-
return
|
|
1223
|
-
...
|
|
1224
|
-
platform:
|
|
1222
|
+
return nn(t, e, {
|
|
1223
|
+
...r,
|
|
1224
|
+
platform: s
|
|
1225
1225
|
});
|
|
1226
|
-
},
|
|
1226
|
+
}, eo = [
|
|
1227
1227
|
"top",
|
|
1228
1228
|
"top-start",
|
|
1229
1229
|
"top-end",
|
|
@@ -1236,36 +1236,36 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
|
1236
1236
|
"left",
|
|
1237
1237
|
"left-start",
|
|
1238
1238
|
"left-end"
|
|
1239
|
-
],
|
|
1239
|
+
], no = (t, e = { isOpen: !1 }) => {
|
|
1240
1240
|
const o = [];
|
|
1241
1241
|
let n = null;
|
|
1242
|
-
const
|
|
1243
|
-
function
|
|
1244
|
-
n = c,
|
|
1242
|
+
const r = E.deriveProp(e.isOpen);
|
|
1243
|
+
function s(c) {
|
|
1244
|
+
n = c, r.set(!0);
|
|
1245
1245
|
}
|
|
1246
1246
|
function i() {
|
|
1247
|
-
|
|
1247
|
+
r.set(!1), o.forEach((c) => c()), o.length = 0;
|
|
1248
1248
|
}
|
|
1249
1249
|
return st(
|
|
1250
|
-
t(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
() =>
|
|
1254
|
-
(c) =>
|
|
1250
|
+
t(s, i),
|
|
1251
|
+
se(
|
|
1252
|
+
r,
|
|
1253
|
+
() => H(
|
|
1254
|
+
(c) => re(
|
|
1255
1255
|
"body",
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1256
|
+
Et.div(
|
|
1257
|
+
H((a) => {
|
|
1258
|
+
a.style.position = "absolute";
|
|
1259
|
+
const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
|
|
1260
1260
|
n.target
|
|
1261
1261
|
) : (n == null ? void 0 : n.target) ?? c;
|
|
1262
|
-
if (
|
|
1262
|
+
if (l == null)
|
|
1263
1263
|
throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
|
|
1264
1264
|
let h = null;
|
|
1265
1265
|
const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal(
|
|
1266
1266
|
/* c8 ignore next 3 */
|
|
1267
1267
|
(n == null ? void 0 : n.placement) ?? "top"
|
|
1268
|
-
), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w =
|
|
1268
|
+
), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = F({
|
|
1269
1269
|
centerOffset: 0,
|
|
1270
1270
|
alignmentOffset: 0,
|
|
1271
1271
|
containerWidth: 0,
|
|
@@ -1275,52 +1275,52 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
|
1275
1275
|
});
|
|
1276
1276
|
async function g() {
|
|
1277
1277
|
const y = [
|
|
1278
|
-
|
|
1279
|
-
|
|
1278
|
+
qt(),
|
|
1279
|
+
Ln({
|
|
1280
1280
|
mainAxis: f.get(),
|
|
1281
1281
|
crossAxis: m.get()
|
|
1282
1282
|
}),
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
Sn(),
|
|
1284
|
+
qt()
|
|
1285
1285
|
];
|
|
1286
1286
|
p != null && h != null && y.push(
|
|
1287
|
-
|
|
1287
|
+
Tn({
|
|
1288
1288
|
element: h,
|
|
1289
1289
|
padding: d.get()
|
|
1290
1290
|
})
|
|
1291
1291
|
);
|
|
1292
|
-
const b = await
|
|
1292
|
+
const b = await kn(l, a, {
|
|
1293
1293
|
placement: u.get(),
|
|
1294
1294
|
strategy: "absolute",
|
|
1295
1295
|
middleware: y
|
|
1296
|
-
}), { x: v, y:
|
|
1297
|
-
if (
|
|
1296
|
+
}), { x: v, y: P, middlewareData: R } = b;
|
|
1297
|
+
if (a.style.top = `${P}px`, a.style.left = `${v}px`, h != null && R.arrow != null) {
|
|
1298
1298
|
const {
|
|
1299
1299
|
x: _,
|
|
1300
1300
|
y: V,
|
|
1301
|
-
centerOffset:
|
|
1302
|
-
alignmentOffset:
|
|
1303
|
-
} =
|
|
1301
|
+
centerOffset: L,
|
|
1302
|
+
alignmentOffset: j
|
|
1303
|
+
} = R.arrow;
|
|
1304
1304
|
w.set({
|
|
1305
1305
|
x: _,
|
|
1306
1306
|
y: V,
|
|
1307
|
-
centerOffset:
|
|
1308
|
-
alignmentOffset:
|
|
1309
|
-
containerWidth:
|
|
1310
|
-
containerHeight:
|
|
1307
|
+
centerOffset: L,
|
|
1308
|
+
alignmentOffset: j,
|
|
1309
|
+
containerWidth: a.offsetWidth,
|
|
1310
|
+
containerHeight: a.offsetHeight
|
|
1311
1311
|
});
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
-
const x =
|
|
1314
|
+
const x = Se(
|
|
1315
1315
|
f,
|
|
1316
1316
|
m,
|
|
1317
1317
|
u
|
|
1318
1318
|
)(g);
|
|
1319
1319
|
return st(
|
|
1320
1320
|
n == null ? void 0 : n.content,
|
|
1321
|
-
(n == null ? void 0 : n.arrow) != null ?
|
|
1321
|
+
(n == null ? void 0 : n.arrow) != null ? Et.div(
|
|
1322
1322
|
n == null ? void 0 : n.arrow(
|
|
1323
|
-
|
|
1323
|
+
ie(
|
|
1324
1324
|
w,
|
|
1325
1325
|
u
|
|
1326
1326
|
)((y, b) => ({
|
|
@@ -1328,13 +1328,13 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
|
1328
1328
|
placement: b
|
|
1329
1329
|
}))
|
|
1330
1330
|
),
|
|
1331
|
-
|
|
1331
|
+
H((y) => {
|
|
1332
1332
|
h = y, g();
|
|
1333
1333
|
})
|
|
1334
1334
|
) : null,
|
|
1335
|
-
|
|
1335
|
+
M(
|
|
1336
1336
|
w.dispose,
|
|
1337
|
-
|
|
1337
|
+
Pn(l, a, g),
|
|
1338
1338
|
x
|
|
1339
1339
|
)
|
|
1340
1340
|
);
|
|
@@ -1344,14 +1344,14 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
|
1344
1344
|
)
|
|
1345
1345
|
)
|
|
1346
1346
|
);
|
|
1347
|
-
},
|
|
1348
|
-
const n =
|
|
1347
|
+
}, Cn = (t, e, o) => {
|
|
1348
|
+
const n = F(U.notAsked), r = n.map(
|
|
1349
1349
|
(f) => U.isSuccess(f) ? f.value : void 0
|
|
1350
|
-
),
|
|
1350
|
+
), s = n.map(
|
|
1351
1351
|
(f) => U.isFailure(f) ? f.error : void 0
|
|
1352
1352
|
), i = n.map((f) => U.isLoading(f));
|
|
1353
1353
|
let c;
|
|
1354
|
-
const
|
|
1354
|
+
const a = async (f) => {
|
|
1355
1355
|
c == null || c.abort(), c = new AbortController();
|
|
1356
1356
|
const m = c.signal, u = n.get();
|
|
1357
1357
|
n.set(U.loading(U.getOrUndefined(u)));
|
|
@@ -1361,50 +1361,50 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
|
|
|
1361
1361
|
} catch (d) {
|
|
1362
1362
|
c = void 0, n.set(U.failure(o(d)));
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, l = () => a(E.get(t)), h = () => {
|
|
1365
1365
|
c == null || c.abort(), c = void 0, n.dispose();
|
|
1366
1366
|
};
|
|
1367
|
-
return n.onDispose(E.on(t,
|
|
1367
|
+
return n.onDispose(E.on(t, a)), {
|
|
1368
1368
|
status: n,
|
|
1369
|
-
value:
|
|
1370
|
-
error:
|
|
1369
|
+
value: r,
|
|
1370
|
+
error: s,
|
|
1371
1371
|
loading: i,
|
|
1372
|
-
reload:
|
|
1372
|
+
reload: l,
|
|
1373
1373
|
dispose: h
|
|
1374
1374
|
};
|
|
1375
|
-
},
|
|
1376
|
-
const { status: o, dispose: n, reload:
|
|
1375
|
+
}, Dn = (t, e) => {
|
|
1376
|
+
const { status: o, dispose: n, reload: r } = t, { loading: s, failure: i, success: c } = e;
|
|
1377
1377
|
return st(
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
loading:
|
|
1381
|
-
failure: i != null ? (
|
|
1382
|
-
success: (
|
|
1378
|
+
M(n),
|
|
1379
|
+
ue(o, {
|
|
1380
|
+
loading: s != null ? (a) => s(a, r) : void 0,
|
|
1381
|
+
failure: i != null ? (a) => i(a, r) : void 0,
|
|
1382
|
+
success: (a) => c(a, r)
|
|
1383
1383
|
})
|
|
1384
1384
|
);
|
|
1385
|
-
},
|
|
1385
|
+
}, oo = ({
|
|
1386
1386
|
request: t,
|
|
1387
1387
|
load: e,
|
|
1388
1388
|
mapError: o = (n) => n
|
|
1389
1389
|
}) => {
|
|
1390
|
-
const n =
|
|
1391
|
-
return (
|
|
1392
|
-
},
|
|
1390
|
+
const n = Cn(t, e, o);
|
|
1391
|
+
return (r) => Dn(n, r);
|
|
1392
|
+
}, Wn = (t, e) => {
|
|
1393
1393
|
if (typeof e == "function")
|
|
1394
|
-
return
|
|
1395
|
-
const o = e.failure ?? ((
|
|
1396
|
-
|
|
1397
|
-
|
|
1394
|
+
return Wn(t, { success: e });
|
|
1395
|
+
const o = e.failure ?? ((r) => st(
|
|
1396
|
+
M(r.on(console.error)),
|
|
1397
|
+
r.map((s) => `Error: ${s}`)
|
|
1398
1398
|
)), n = e.success;
|
|
1399
|
-
return
|
|
1400
|
-
Success: (
|
|
1401
|
-
Failure: (
|
|
1399
|
+
return oe(E.toSignal(t), {
|
|
1400
|
+
Success: (r) => n(r.$.value),
|
|
1401
|
+
Failure: (r) => o(r.$.error)
|
|
1402
1402
|
});
|
|
1403
|
-
},
|
|
1403
|
+
}, ro = () => ee.focus((t) => {
|
|
1404
1404
|
var e;
|
|
1405
1405
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1406
1406
|
});
|
|
1407
|
-
class
|
|
1407
|
+
class Rt {
|
|
1408
1408
|
/**
|
|
1409
1409
|
* Creates a new Rect instance.
|
|
1410
1410
|
*
|
|
@@ -1422,7 +1422,7 @@ class bt {
|
|
|
1422
1422
|
* console.log(rect.height); // 50
|
|
1423
1423
|
* ```
|
|
1424
1424
|
*/
|
|
1425
|
-
constructor(e, o, n,
|
|
1425
|
+
constructor(e, o, n, r) {
|
|
1426
1426
|
/**
|
|
1427
1427
|
* Compares this rectangle with another rectangle for equality.
|
|
1428
1428
|
*
|
|
@@ -1443,8 +1443,8 @@ class bt {
|
|
|
1443
1443
|
* console.log(rect1.equals(rect3)); // true (within tolerance)
|
|
1444
1444
|
* ```
|
|
1445
1445
|
*/
|
|
1446
|
-
At(this, "equals", (e) =>
|
|
1447
|
-
this.left = e, this.top = o, this.width = n, this.height =
|
|
1446
|
+
At(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
|
|
1447
|
+
this.left = e, this.top = o, this.width = n, this.height = r;
|
|
1448
1448
|
}
|
|
1449
1449
|
/**
|
|
1450
1450
|
* Creates a new Rect instance using an object with optional properties.
|
|
@@ -1475,9 +1475,9 @@ class bt {
|
|
|
1475
1475
|
left: e = 0,
|
|
1476
1476
|
top: o = 0,
|
|
1477
1477
|
width: n = 0,
|
|
1478
|
-
height:
|
|
1478
|
+
height: r = 0
|
|
1479
1479
|
}) {
|
|
1480
|
-
return new
|
|
1480
|
+
return new Rt(e, o, n, r);
|
|
1481
1481
|
}
|
|
1482
1482
|
/**
|
|
1483
1483
|
* Gets the x-coordinate of the right edge of the rectangle.
|
|
@@ -1543,163 +1543,252 @@ class bt {
|
|
|
1543
1543
|
return { width: this.width, height: this.height };
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function Xt(t) {
|
|
1547
1547
|
const e = t.getBoundingClientRect();
|
|
1548
|
-
return
|
|
1548
|
+
return Rt.of({
|
|
1549
1549
|
top: e.top + window.scrollY,
|
|
1550
1550
|
left: e.left + window.scrollX,
|
|
1551
1551
|
width: e.width,
|
|
1552
1552
|
height: e.height
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
|
-
const
|
|
1556
|
-
const { element: o } = e, n =
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
return typeof ResizeObserver == "function" && (i = new ResizeObserver(r), i.observe(o)), F((c) => {
|
|
1561
|
-
i == null || i.disconnect(), s(c);
|
|
1555
|
+
const so = (t) => Te((e) => {
|
|
1556
|
+
const { element: o } = e, n = F(Xt(o), (c, a) => c.equals(a)), r = Ft(t(n))(e), s = () => n.set(Rt.of(Xt(o)));
|
|
1557
|
+
let i = null;
|
|
1558
|
+
return typeof ResizeObserver < "u" && (i = new ResizeObserver(s)), i == null || i.observe(o), M((c) => {
|
|
1559
|
+
i == null || i.disconnect(), r(c);
|
|
1562
1560
|
});
|
|
1563
|
-
})
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
/* c8 ignore next 6 */
|
|
1570
|
-
width: (o == null ? void 0 : o.innerWidth) ?? 0,
|
|
1571
|
-
height: (o == null ? void 0 : o.innerHeight) ?? 0
|
|
1572
|
-
});
|
|
1561
|
+
});
|
|
1562
|
+
function Jt(t) {
|
|
1563
|
+
return {
|
|
1564
|
+
/* c8 ignore next 6 */
|
|
1565
|
+
width: (t == null ? void 0 : t.innerWidth) ?? 0,
|
|
1566
|
+
height: (t == null ? void 0 : t.innerHeight) ?? 0
|
|
1573
1567
|
};
|
|
1574
|
-
|
|
1575
|
-
|
|
1568
|
+
}
|
|
1569
|
+
const io = (t) => (e) => {
|
|
1570
|
+
const o = at(), n = F(
|
|
1571
|
+
Jt(o),
|
|
1572
|
+
(i, c) => i.width === c.width && i.height === c.height
|
|
1573
|
+
), r = Ft(t(n))(e), s = () => n.set(Jt(o));
|
|
1574
|
+
return o == null || o.addEventListener("resize", s), (i) => {
|
|
1575
|
+
o == null || o.removeEventListener("resize", s), r(i);
|
|
1576
1576
|
};
|
|
1577
|
-
},
|
|
1578
|
-
const o = e.split("/").filter((
|
|
1579
|
-
for (let
|
|
1580
|
-
const
|
|
1581
|
-
if (!i &&
|
|
1577
|
+
}, Fn = (t, e) => {
|
|
1578
|
+
const o = e.split("/").filter((r) => r !== ""), n = {};
|
|
1579
|
+
for (let r = 0; r < t.length; r++) {
|
|
1580
|
+
const s = t[r], i = o[r];
|
|
1581
|
+
if (!i && s.type !== "catch-all")
|
|
1582
1582
|
return null;
|
|
1583
|
-
if (
|
|
1584
|
-
if (
|
|
1583
|
+
if (s.type === "literal") {
|
|
1584
|
+
if (s.value !== i)
|
|
1585
1585
|
return null;
|
|
1586
|
-
} else if (
|
|
1587
|
-
n[
|
|
1588
|
-
else if (
|
|
1586
|
+
} else if (s.type === "param")
|
|
1587
|
+
n[s.name] = i;
|
|
1588
|
+
else if (s.type === "catch-all")
|
|
1589
1589
|
return { params: n, path: e };
|
|
1590
1590
|
}
|
|
1591
1591
|
return o.length !== t.length ? null : { params: n, path: e };
|
|
1592
|
-
},
|
|
1592
|
+
}, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), co = (t) => {
|
|
1593
1593
|
const e = t.map((o) => {
|
|
1594
|
-
const n =
|
|
1594
|
+
const n = Ae(o);
|
|
1595
1595
|
return { route: o, segments: n };
|
|
1596
1596
|
});
|
|
1597
1597
|
return function(n) {
|
|
1598
|
-
for (const { segments:
|
|
1599
|
-
const i =
|
|
1598
|
+
for (const { segments: r, route: s } of e) {
|
|
1599
|
+
const i = Fn(r, n);
|
|
1600
1600
|
if (i)
|
|
1601
|
-
return { ...i, route:
|
|
1601
|
+
return { ...i, route: s };
|
|
1602
1602
|
}
|
|
1603
1603
|
return null;
|
|
1604
1604
|
};
|
|
1605
|
-
},
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
const
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1605
|
+
}, Ct = {
|
|
1606
|
+
mark: Wt("RouterContext"),
|
|
1607
|
+
create: () => {
|
|
1608
|
+
const t = F([]);
|
|
1609
|
+
return {
|
|
1610
|
+
value: t,
|
|
1611
|
+
dispose: () => t.dispose()
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1614
|
+
}, Mn = (t, e, o) => {
|
|
1615
|
+
const n = o.split("/").filter((i) => i !== ""), r = {};
|
|
1616
|
+
let s = 0;
|
|
1617
|
+
for (let i = 0; i < t.length; i++) {
|
|
1618
|
+
const c = t[i], a = n[i];
|
|
1619
|
+
if (!a && c.type !== "catch-all")
|
|
1620
|
+
return null;
|
|
1621
|
+
if (c.type === "literal") {
|
|
1622
|
+
if (c.value !== a)
|
|
1623
|
+
return null;
|
|
1624
|
+
s++;
|
|
1625
|
+
} else if (c.type === "param")
|
|
1626
|
+
r[c.name] = a, s++;
|
|
1627
|
+
else if (c.type === "catch-all") {
|
|
1628
|
+
const l = "/" + n.slice(0, s).join("/"), h = "/" + n.slice(s).join("/");
|
|
1612
1629
|
return {
|
|
1613
|
-
params: r
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1630
|
+
params: r,
|
|
1631
|
+
matchedPath: l === "/" ? "" : l,
|
|
1632
|
+
remainingPath: h === "/" ? "" : h,
|
|
1633
|
+
route: e
|
|
1634
|
+
};
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (n.length === t.length) {
|
|
1638
|
+
const i = "/" + n.join("/");
|
|
1639
|
+
return {
|
|
1640
|
+
params: r,
|
|
1641
|
+
matchedPath: i === "/" ? "" : i,
|
|
1642
|
+
remainingPath: "",
|
|
1643
|
+
route: e
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
return null;
|
|
1647
|
+
}, Oe = (t) => {
|
|
1648
|
+
const e = t.map((o) => {
|
|
1649
|
+
const n = Ae(o);
|
|
1650
|
+
return { route: o, segments: n };
|
|
1651
|
+
});
|
|
1652
|
+
return function(n) {
|
|
1653
|
+
for (const { segments: r, route: s } of e) {
|
|
1654
|
+
const i = Mn(r, s, n);
|
|
1655
|
+
if (i)
|
|
1656
|
+
return i;
|
|
1657
|
+
}
|
|
1658
|
+
return null;
|
|
1659
|
+
};
|
|
1660
|
+
}, ao = (t) => {
|
|
1661
|
+
const e = Oe(Object.keys(t));
|
|
1662
|
+
return ke(
|
|
1663
|
+
Ct,
|
|
1664
|
+
{},
|
|
1665
|
+
() => rt(Mt, (o) => rt(Ct, (n) => {
|
|
1666
|
+
const r = o.map((s) => {
|
|
1667
|
+
const i = e(s.pathname);
|
|
1668
|
+
if (i == null)
|
|
1669
|
+
throw console.error("No route found for", s), new Error("No route found");
|
|
1670
|
+
const c = {
|
|
1671
|
+
matchedPath: i.matchedPath,
|
|
1672
|
+
remainingPath: i.remainingPath,
|
|
1673
|
+
fullPath: s.pathname,
|
|
1674
|
+
params: i.params
|
|
1675
|
+
};
|
|
1676
|
+
return n.value = [...n.value, c], {
|
|
1677
|
+
params: i.params,
|
|
1678
|
+
route: i.route,
|
|
1679
|
+
path: i.matchedPath || s.pathname,
|
|
1680
|
+
search: s.search,
|
|
1681
|
+
hash: s.hash
|
|
1682
|
+
};
|
|
1683
|
+
});
|
|
1684
|
+
return ce(
|
|
1685
|
+
r.map((s) => [s.route, s]),
|
|
1686
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1687
|
+
t
|
|
1688
|
+
);
|
|
1689
|
+
}))
|
|
1690
|
+
);
|
|
1691
|
+
}, lo = (t) => {
|
|
1692
|
+
const e = Oe(Object.keys(t));
|
|
1693
|
+
return rt(Ct, (o) => rt(Mt, (n) => {
|
|
1694
|
+
const r = o.map((s) => {
|
|
1695
|
+
const i = s[s.length - 1], c = (i == null ? void 0 : i.remainingPath) || "";
|
|
1696
|
+
if (c === "")
|
|
1697
|
+
throw console.error("No remaining path for SubRouter", s), new Error("No remaining path for SubRouter");
|
|
1698
|
+
const a = e(c);
|
|
1699
|
+
if (a == null)
|
|
1700
|
+
throw console.error("No route found for remaining path", c), new Error("No route found");
|
|
1701
|
+
return {
|
|
1702
|
+
params: a.params,
|
|
1703
|
+
// Only this router's parameters
|
|
1704
|
+
route: a.route,
|
|
1705
|
+
path: a.matchedPath,
|
|
1706
|
+
search: n.value.search,
|
|
1707
|
+
hash: n.value.hash
|
|
1618
1708
|
};
|
|
1619
1709
|
});
|
|
1620
|
-
return
|
|
1621
|
-
|
|
1710
|
+
return ce(
|
|
1711
|
+
r.map((s) => [s.route, s]),
|
|
1622
1712
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1623
1713
|
t
|
|
1624
|
-
/* c8 ignore next 2 */
|
|
1625
1714
|
);
|
|
1626
|
-
});
|
|
1627
|
-
},
|
|
1715
|
+
}));
|
|
1716
|
+
}, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Gt = 7 * ct, Qt = 30 * ct, Nn = 365 * ct, Vn = [
|
|
1628
1717
|
{
|
|
1629
|
-
max:
|
|
1630
|
-
value:
|
|
1718
|
+
max: yt * 90,
|
|
1719
|
+
value: yt,
|
|
1631
1720
|
name: "minute",
|
|
1632
1721
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1633
1722
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1634
1723
|
},
|
|
1635
1724
|
{
|
|
1636
|
-
max:
|
|
1637
|
-
value:
|
|
1725
|
+
max: Dt * 36,
|
|
1726
|
+
value: Dt,
|
|
1638
1727
|
name: "hour",
|
|
1639
1728
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1640
1729
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1641
1730
|
},
|
|
1642
1731
|
{
|
|
1643
|
-
max:
|
|
1644
|
-
value:
|
|
1732
|
+
max: ct * 10,
|
|
1733
|
+
value: ct,
|
|
1645
1734
|
name: "day",
|
|
1646
1735
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1647
1736
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1648
1737
|
},
|
|
1649
1738
|
{
|
|
1650
|
-
max:
|
|
1651
|
-
value:
|
|
1739
|
+
max: Gt * 6,
|
|
1740
|
+
value: Gt,
|
|
1652
1741
|
name: "week",
|
|
1653
1742
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1654
1743
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1655
1744
|
},
|
|
1656
1745
|
{
|
|
1657
|
-
max:
|
|
1658
|
-
value:
|
|
1746
|
+
max: Qt * 18,
|
|
1747
|
+
value: Qt,
|
|
1659
1748
|
name: "month",
|
|
1660
1749
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1661
1750
|
future: { singular: "in a month", plural: "in {} months" }
|
|
1662
1751
|
},
|
|
1663
1752
|
{
|
|
1664
1753
|
max: 1 / 0,
|
|
1665
|
-
value:
|
|
1754
|
+
value: Nn,
|
|
1666
1755
|
name: "year",
|
|
1667
1756
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1668
1757
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1669
1758
|
}
|
|
1670
1759
|
];
|
|
1671
|
-
function
|
|
1672
|
-
const
|
|
1673
|
-
return
|
|
1760
|
+
function Zt(t, e, o, n) {
|
|
1761
|
+
const r = Math.round(t / e);
|
|
1762
|
+
return r <= 1 ? o : n.replace(
|
|
1674
1763
|
"{}",
|
|
1675
|
-
|
|
1764
|
+
r.toLocaleString(void 0, {
|
|
1676
1765
|
maximumFractionDigits: 0,
|
|
1677
1766
|
minimumFractionDigits: 0
|
|
1678
1767
|
})
|
|
1679
1768
|
);
|
|
1680
1769
|
}
|
|
1681
|
-
const
|
|
1682
|
-
const e =
|
|
1770
|
+
const $n = (t = 1e3) => {
|
|
1771
|
+
const e = F(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1683
1772
|
return e.onDispose(o), e;
|
|
1684
|
-
},
|
|
1773
|
+
}, Hn = (t) => {
|
|
1685
1774
|
const e = Math.abs(t);
|
|
1686
|
-
if (e <
|
|
1775
|
+
if (e < yt)
|
|
1687
1776
|
return t < 0 ? "just now" : "in a moment";
|
|
1688
|
-
for (const o of
|
|
1777
|
+
for (const o of Vn)
|
|
1689
1778
|
if (e < o.max)
|
|
1690
|
-
return t < 0 ?
|
|
1779
|
+
return t < 0 ? Zt(e, o.value, o.past.singular, o.past.plural) : Zt(e, o.value, o.future.singular, o.future.plural);
|
|
1691
1780
|
throw new Error("unreachable");
|
|
1692
|
-
},
|
|
1693
|
-
const n = e != null ?
|
|
1781
|
+
}, Bn = (t, { now: e, frequency: o = 1e4 } = {}) => {
|
|
1782
|
+
const n = e != null ? te.is(e) ? e.derive() : F(e) : $n(o), r = ie(
|
|
1694
1783
|
t,
|
|
1695
1784
|
n
|
|
1696
|
-
)((
|
|
1697
|
-
return
|
|
1698
|
-
},
|
|
1699
|
-
const o =
|
|
1785
|
+
)((s, i) => s.getTime() - i.getTime());
|
|
1786
|
+
return r.onDispose(() => E.dispose(n)), r;
|
|
1787
|
+
}, Un = (t, e = {}) => {
|
|
1788
|
+
const o = Bn(t, e), n = o.map(Hn);
|
|
1700
1789
|
return n.onDispose(o.dispose), n;
|
|
1701
|
-
},
|
|
1702
|
-
class
|
|
1790
|
+
}, uo = (t, e = {}) => Un(t, e);
|
|
1791
|
+
class zn extends Ce {
|
|
1703
1792
|
constructor() {
|
|
1704
1793
|
super(...arguments);
|
|
1705
1794
|
/**
|
|
@@ -1709,52 +1798,53 @@ class Hn extends Le {
|
|
|
1709
1798
|
At(this, "tick", () => this.update((o) => o + 1));
|
|
1710
1799
|
}
|
|
1711
1800
|
}
|
|
1712
|
-
const
|
|
1801
|
+
const fo = (t = 0) => new zn(t, (e, o) => e === o);
|
|
1713
1802
|
export {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1803
|
+
Ke as Anchor,
|
|
1804
|
+
In as Appearance,
|
|
1805
|
+
ue as AsyncResultView,
|
|
1806
|
+
Yn as AutoFocus,
|
|
1807
|
+
qn as AutoSelect,
|
|
1808
|
+
lo as ChildRouter,
|
|
1809
|
+
so as ElementRect,
|
|
1810
|
+
Jn as HTMLTitle,
|
|
1811
|
+
Xn as HiddenWhenEmpty,
|
|
1812
|
+
Ye as InViewport,
|
|
1813
|
+
Mt as Location,
|
|
1814
|
+
Qn as OnClickOutside,
|
|
1815
|
+
Zn as OnEnterKey,
|
|
1816
|
+
to as OnEscapeKey,
|
|
1817
|
+
fe as OnKeyPressed,
|
|
1818
|
+
no as PopOver,
|
|
1819
|
+
Rt as Rect,
|
|
1820
|
+
oo as Resource,
|
|
1821
|
+
Dn as ResourceDisplay,
|
|
1822
|
+
Wn as ResultView,
|
|
1823
|
+
ao as RootRouter,
|
|
1824
|
+
Ct as RouterContextProvider,
|
|
1825
|
+
ro as SelectOnFocus,
|
|
1826
|
+
zn as Ticker,
|
|
1827
|
+
Gn as WhenInViewport,
|
|
1828
|
+
io as WindowSize,
|
|
1829
|
+
Fe as _checkExtensionCondition,
|
|
1830
|
+
We as _getExtension,
|
|
1831
|
+
co as _makeRouteMatcher,
|
|
1832
|
+
Ae as _parseRouteSegments,
|
|
1833
|
+
eo as allPlacements,
|
|
1834
|
+
Ve as areLocationsEqual,
|
|
1835
|
+
Xt as getAbsoluteRect,
|
|
1836
|
+
Ne as handleAnchorClick,
|
|
1837
|
+
le as locationFromURL,
|
|
1838
|
+
Cn as makeResource,
|
|
1839
|
+
qe as matchesKeyCombo,
|
|
1840
|
+
Fn as matchesRoute,
|
|
1841
|
+
$n as nowSignal,
|
|
1842
|
+
uo as relativeTime,
|
|
1843
|
+
Bn as relativeTimeMillisSignal,
|
|
1844
|
+
Un as relativeTimeSignal,
|
|
1845
|
+
zt as setLocationFromUrl,
|
|
1846
|
+
fo as ticker,
|
|
1847
|
+
Hn as timeDiffToString,
|
|
1758
1848
|
Lt as urlFromLocation,
|
|
1759
|
-
|
|
1849
|
+
_e as useAppearance
|
|
1760
1850
|
};
|