@tempots/ui 2.0.0 → 2.2.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 +555 -524
- package/package.json +1 -1
- package/renderables/appearance.d.ts +3 -17
- package/renderables/router/browser-location.d.ts +9 -6
- package/renderables/router/headless-location.d.ts +5 -2
- package/renderables/router/location.d.ts +3 -16
- package/browser-location-Td-R3jYM.cjs +0 -1
- package/browser-location-Wn6jT0ta.js +0 -39
- package/headless-location-24MkNdBT.cjs +0 -1
- package/headless-location-CR5zPUNK.js +0 -21
package/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var de = Object.defineProperty;
|
|
2
2
|
var he = (t, e, n) => e in t ? de(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var kt = (t, e, n) => he(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import {
|
|
5
|
-
import { delayed as Xt, AsyncResult as
|
|
6
|
-
const
|
|
4
|
+
import { getWindow as X, prop as W, makeProviderMark as Ht, Signal as Ut, Use as Bt, html as zt, on as _t, Value as J, attr as It, Empty as mt, OneOfType as jt, WithElement as G, OnDispose as P, Portal as Yt, Fragment as wt, renderableOfTNode as vt, When as Kt, WithBrowserCtx as qt, OneOfTuple as me, computedOf as pe, Prop as ge } from "@tempots/dom";
|
|
5
|
+
import { delayed as Xt, AsyncResult as C, interval as ye } from "@tempots/std";
|
|
6
|
+
const xe = (t) => {
|
|
7
7
|
const e = t.split("/").pop();
|
|
8
8
|
if (e == null || e.startsWith(".")) return;
|
|
9
9
|
const n = e.split(".") || [];
|
|
10
10
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
11
|
-
},
|
|
12
|
-
const n =
|
|
11
|
+
}, we = (t, e) => {
|
|
12
|
+
const n = xe(e);
|
|
13
13
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
for (;
|
|
17
|
-
|
|
18
|
-
if (
|
|
14
|
+
}, ve = (t, e, n, o) => {
|
|
15
|
+
let s = t.target;
|
|
16
|
+
for (; s != null && !(s instanceof HTMLAnchorElement); )
|
|
17
|
+
s = s.parentElement;
|
|
18
|
+
if (s == null)
|
|
19
19
|
return !0;
|
|
20
|
-
const
|
|
21
|
-
if (t.button !== 0 || t.ctrlKey || t.metaKey ||
|
|
20
|
+
const r = s;
|
|
21
|
+
if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
|
|
22
22
|
return !0;
|
|
23
|
-
const { pathname:
|
|
23
|
+
const { pathname: i, search: c, hash: l } = r;
|
|
24
24
|
if (o) {
|
|
25
|
-
const a =
|
|
25
|
+
const a = i + c + l, f = r.getAttribute("href");
|
|
26
26
|
if (!(f != null && f.startsWith("#")) && f !== a)
|
|
27
27
|
return !0;
|
|
28
28
|
}
|
|
29
|
-
return e ? !1 :
|
|
30
|
-
},
|
|
29
|
+
return e ? !1 : we(n, i);
|
|
30
|
+
}, be = (t, e = {
|
|
31
31
|
ignoreUrlWithExtension: !0,
|
|
32
32
|
allowedExtensions: [],
|
|
33
33
|
ignoreExternalUrl: !0
|
|
@@ -36,82 +36,117 @@ const ve = (t) => {
|
|
|
36
36
|
(o) => o.startsWith(".") ? o : "." + o
|
|
37
37
|
) : [];
|
|
38
38
|
return (o) => {
|
|
39
|
-
|
|
39
|
+
ve(
|
|
40
40
|
o,
|
|
41
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
42
42
|
n,
|
|
43
43
|
e.ignoreExternalUrl ?? !0
|
|
44
44
|
) || t() && o.preventDefault();
|
|
45
45
|
};
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)),
|
|
51
|
-
me((e) => Ct(
|
|
52
|
-
import("./headless-location-CR5zPUNK.js").then((n) => n.ProvideHeadlessLocation),
|
|
53
|
-
(n) => n(e.container.currentURL, t)
|
|
54
|
-
))
|
|
55
|
-
), Jt = (t) => Bt(Ee, (e) => (n) => {
|
|
56
|
-
const o = W(e.value, e.equals);
|
|
57
|
-
e.feedProp(o), o.on(e.set);
|
|
58
|
-
const r = ct(t(o))(n);
|
|
59
|
-
return (i) => {
|
|
60
|
-
o.dispose(), r(i);
|
|
61
|
-
};
|
|
62
|
-
}), kn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Oe = (t, e) => {
|
|
63
|
-
var i;
|
|
64
|
-
const n = new URL(t, e ?? ((i = vt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
65
|
-
let r = n.hash;
|
|
66
|
-
return r.startsWith("#") && (r = r.substring(1)), {
|
|
46
|
+
}, Ae = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Jt = (t, e) => {
|
|
47
|
+
var r;
|
|
48
|
+
const n = new URL(t, e ?? ((r = X()) == null ? void 0 : r.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
49
|
+
let s = n.hash;
|
|
50
|
+
return s.startsWith("#") && (s = s.substring(1)), {
|
|
67
51
|
pathname: n.pathname,
|
|
68
52
|
search: o,
|
|
69
|
-
hash:
|
|
53
|
+
hash: s === "" ? void 0 : s
|
|
70
54
|
};
|
|
71
|
-
},
|
|
72
|
-
const n =
|
|
55
|
+
}, Re = (t, e) => {
|
|
56
|
+
const n = Jt(e);
|
|
73
57
|
return t.set(n), t;
|
|
74
|
-
},
|
|
58
|
+
}, pt = (t) => {
|
|
75
59
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
76
60
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
77
|
-
},
|
|
61
|
+
}, Ee = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Le = (t) => {
|
|
62
|
+
const e = t.container.currentURL, n = e.iso(
|
|
63
|
+
(o) => Jt(o),
|
|
64
|
+
(o) => {
|
|
65
|
+
if (Ee(o.pathname))
|
|
66
|
+
return pt(o);
|
|
67
|
+
const s = new URL(o.pathname, e.value), r = s.origin + s.pathname;
|
|
68
|
+
return pt({ ...o, pathname: r });
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
return { value: n, dispose: n.dispose };
|
|
72
|
+
}, Oe = () => {
|
|
73
|
+
const t = X(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
|
|
74
|
+
return {
|
|
75
|
+
pathname: (t == null ? void 0 : t.location.pathname) ?? "",
|
|
76
|
+
search: Object.fromEntries(
|
|
77
|
+
new URLSearchParams((t == null ? void 0 : t.location.search) ?? "").entries()
|
|
78
|
+
),
|
|
79
|
+
hash: e
|
|
80
|
+
};
|
|
81
|
+
}, Se = () => {
|
|
82
|
+
const t = W(Oe(), Ae), e = X(), n = () => {
|
|
83
|
+
let o = (e == null ? void 0 : e.location.hash) ?? "";
|
|
84
|
+
o.startsWith("#") && (o = o.substring(1));
|
|
85
|
+
const s = {
|
|
86
|
+
pathname: (e == null ? void 0 : e.location.pathname) ?? "",
|
|
87
|
+
search: Object.fromEntries(
|
|
88
|
+
new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
|
|
89
|
+
),
|
|
90
|
+
hash: o === "" ? void 0 : o
|
|
91
|
+
};
|
|
92
|
+
t.set(s);
|
|
93
|
+
};
|
|
94
|
+
return e == null || e.addEventListener("popstate", n), t.onDispose(() => {
|
|
95
|
+
e == null || e.removeEventListener("popstate", n);
|
|
96
|
+
}), t.on((o) => {
|
|
97
|
+
e == null || e.history.pushState({}, "", pt(o));
|
|
98
|
+
}), {
|
|
99
|
+
value: t,
|
|
100
|
+
dispose: t.dispose
|
|
101
|
+
};
|
|
102
|
+
}, Gt = {
|
|
103
|
+
mark: Ht("LocationProvider"),
|
|
104
|
+
create: (t, e) => {
|
|
105
|
+
if (e.isBrowser())
|
|
106
|
+
return Se();
|
|
107
|
+
if (e.isHeadless())
|
|
108
|
+
return Le(e);
|
|
109
|
+
throw new Error("Unknown context");
|
|
110
|
+
}
|
|
111
|
+
}, Te = (t, ...e) => {
|
|
78
112
|
if (typeof t == "string" || Ut.is(t))
|
|
79
|
-
return
|
|
113
|
+
return Te({ href: t }, ...e);
|
|
80
114
|
const { href: n, ...o } = t;
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
115
|
+
return Bt(Gt, (s) => zt.a(
|
|
116
|
+
_t.click(
|
|
117
|
+
be(() => (Re(s, J.get(n)), !0), o)
|
|
84
118
|
),
|
|
85
|
-
|
|
119
|
+
It.href(n),
|
|
86
120
|
...e
|
|
87
121
|
));
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
122
|
+
}, kn = {
|
|
123
|
+
mark: Ht("Appearance"),
|
|
124
|
+
create: () => {
|
|
125
|
+
const t = X(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, o = W(n ? "dark" : "light"), s = (r) => o.set(r.matches ? "dark" : "light");
|
|
126
|
+
return e == null || e.addEventListener("change", s), {
|
|
127
|
+
value: o,
|
|
128
|
+
dispose: () => e == null ? void 0 : e.removeEventListener("change", s)
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}, Qt = (t, e) => {
|
|
97
132
|
if (typeof e == "function")
|
|
98
133
|
return Qt(t, { success: e });
|
|
99
|
-
const n = e.failure ?? ((
|
|
100
|
-
return
|
|
101
|
-
AsyncSuccess: (
|
|
102
|
-
AsyncFailure: (
|
|
103
|
-
Loading: (
|
|
104
|
-
NotAsked:
|
|
134
|
+
const n = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), o = e.success, s = e.loading ?? (() => mt), r = e.notAsked ?? (() => mt);
|
|
135
|
+
return jt(J.toSignal(t), {
|
|
136
|
+
AsyncSuccess: (i) => o(i.$.value),
|
|
137
|
+
AsyncFailure: (i) => n(i.$.error),
|
|
138
|
+
Loading: (i) => s(i.map((c) => c.previousValue)),
|
|
139
|
+
NotAsked: r
|
|
105
140
|
});
|
|
106
|
-
},
|
|
141
|
+
}, Cn = (t = 10) => G((e) => P(Xt(() => e == null ? void 0 : e.focus(), t))), Dn = (t = 10) => G((e) => {
|
|
107
142
|
const n = Xt(() => e.select(), t);
|
|
108
|
-
return
|
|
109
|
-
}),
|
|
143
|
+
return P(n);
|
|
144
|
+
}), Wn = G((t) => {
|
|
110
145
|
const e = t.style.getPropertyValue(":empty");
|
|
111
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
146
|
+
return t.style.setProperty(":empty", "display:none"), P((n) => {
|
|
112
147
|
n && t.style.setProperty(":empty", e);
|
|
113
148
|
});
|
|
114
|
-
}),
|
|
149
|
+
}), Pn = (t) => Yt("head > title", It.innerText(t)), ke = {
|
|
115
150
|
partial: {
|
|
116
151
|
root: null,
|
|
117
152
|
rootMargin: "0px",
|
|
@@ -129,48 +164,48 @@ const ve = (t) => {
|
|
|
129
164
|
partial: null,
|
|
130
165
|
full: null
|
|
131
166
|
};
|
|
132
|
-
function
|
|
167
|
+
function Ce(t) {
|
|
133
168
|
return Y[t] == null && (Y[t] = new IntersectionObserver((e) => {
|
|
134
169
|
e.forEach((n) => {
|
|
135
170
|
const o = et[t].get(n.target);
|
|
136
171
|
o == null || o.set(n.isIntersecting);
|
|
137
172
|
});
|
|
138
|
-
},
|
|
173
|
+
}, ke[t])), Y[t];
|
|
139
174
|
}
|
|
140
|
-
const
|
|
175
|
+
const De = (t, e) => {
|
|
141
176
|
const n = W(!1);
|
|
142
|
-
return
|
|
177
|
+
return wt(
|
|
143
178
|
G((o) => {
|
|
144
|
-
const
|
|
145
|
-
return et[t].set(o, n),
|
|
146
|
-
var
|
|
147
|
-
n.dispose(),
|
|
179
|
+
const s = typeof IntersectionObserver < "u" ? Ce(t) : null;
|
|
180
|
+
return et[t].set(o, n), s == null || s.observe(o), P(() => {
|
|
181
|
+
var r;
|
|
182
|
+
n.dispose(), s == null || s.unobserve(o), et[t].delete(o), et[t].size === 0 && ((r = Y[t]) == null || r.disconnect(), Y[t] = null);
|
|
148
183
|
});
|
|
149
184
|
}),
|
|
150
|
-
|
|
185
|
+
vt(e(n))
|
|
151
186
|
);
|
|
152
|
-
},
|
|
187
|
+
}, Fn = (t, e, n) => De(t, (o) => Kt(o, e, n ?? (() => mt))), nt = Math.min, M = Math.max, ot = Math.round, tt = Math.floor, L = (t) => ({
|
|
153
188
|
x: t,
|
|
154
189
|
y: t
|
|
155
|
-
}),
|
|
190
|
+
}), We = {
|
|
156
191
|
left: "right",
|
|
157
192
|
right: "left",
|
|
158
193
|
bottom: "top",
|
|
159
194
|
top: "bottom"
|
|
160
|
-
},
|
|
195
|
+
}, Pe = {
|
|
161
196
|
start: "end",
|
|
162
197
|
end: "start"
|
|
163
198
|
};
|
|
164
|
-
function
|
|
199
|
+
function Ct(t, e, n) {
|
|
165
200
|
return M(t, nt(e, n));
|
|
166
201
|
}
|
|
167
|
-
function
|
|
202
|
+
function ct(t, e) {
|
|
168
203
|
return typeof t == "function" ? t(e) : t;
|
|
169
204
|
}
|
|
170
205
|
function N(t) {
|
|
171
206
|
return t.split("-")[0];
|
|
172
207
|
}
|
|
173
|
-
function
|
|
208
|
+
function lt(t) {
|
|
174
209
|
return t.split("-")[1];
|
|
175
210
|
}
|
|
176
211
|
function Zt(t) {
|
|
@@ -185,41 +220,41 @@ function B(t) {
|
|
|
185
220
|
function ee(t) {
|
|
186
221
|
return Zt(B(t));
|
|
187
222
|
}
|
|
188
|
-
function
|
|
223
|
+
function Fe(t, e, n) {
|
|
189
224
|
n === void 0 && (n = !1);
|
|
190
|
-
const o =
|
|
191
|
-
let
|
|
192
|
-
return e.reference[
|
|
225
|
+
const o = lt(t), s = ee(t), r = te(s);
|
|
226
|
+
let i = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
227
|
+
return e.reference[r] > e.floating[r] && (i = st(i)), [i, st(i)];
|
|
193
228
|
}
|
|
194
|
-
function
|
|
195
|
-
const e =
|
|
229
|
+
function Me(t) {
|
|
230
|
+
const e = st(t);
|
|
196
231
|
return [gt(t), e, gt(e)];
|
|
197
232
|
}
|
|
198
233
|
function gt(t) {
|
|
199
|
-
return t.replace(/start|end/g, (e) =>
|
|
234
|
+
return t.replace(/start|end/g, (e) => Pe[e]);
|
|
200
235
|
}
|
|
201
|
-
function
|
|
202
|
-
const o = ["left", "right"],
|
|
236
|
+
function Ne(t, e, n) {
|
|
237
|
+
const o = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
203
238
|
switch (t) {
|
|
204
239
|
case "top":
|
|
205
240
|
case "bottom":
|
|
206
|
-
return n ? e ?
|
|
241
|
+
return n ? e ? s : o : e ? o : s;
|
|
207
242
|
case "left":
|
|
208
243
|
case "right":
|
|
209
|
-
return e ?
|
|
244
|
+
return e ? r : i;
|
|
210
245
|
default:
|
|
211
246
|
return [];
|
|
212
247
|
}
|
|
213
248
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
let
|
|
217
|
-
return
|
|
249
|
+
function Ve(t, e, n, o) {
|
|
250
|
+
const s = lt(t);
|
|
251
|
+
let r = Ne(N(t), n === "start", o);
|
|
252
|
+
return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(gt)))), r;
|
|
218
253
|
}
|
|
219
|
-
function
|
|
220
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
254
|
+
function st(t) {
|
|
255
|
+
return t.replace(/left|right|bottom|top/g, (e) => We[e]);
|
|
221
256
|
}
|
|
222
|
-
function
|
|
257
|
+
function $e(t) {
|
|
223
258
|
return {
|
|
224
259
|
top: 0,
|
|
225
260
|
right: 0,
|
|
@@ -228,28 +263,28 @@ function Ve(t) {
|
|
|
228
263
|
...t
|
|
229
264
|
};
|
|
230
265
|
}
|
|
231
|
-
function
|
|
232
|
-
return typeof t != "number" ?
|
|
266
|
+
function He(t) {
|
|
267
|
+
return typeof t != "number" ? $e(t) : {
|
|
233
268
|
top: t,
|
|
234
269
|
right: t,
|
|
235
270
|
bottom: t,
|
|
236
271
|
left: t
|
|
237
272
|
};
|
|
238
273
|
}
|
|
239
|
-
function
|
|
274
|
+
function rt(t) {
|
|
240
275
|
const {
|
|
241
276
|
x: e,
|
|
242
277
|
y: n,
|
|
243
278
|
width: o,
|
|
244
|
-
height:
|
|
279
|
+
height: s
|
|
245
280
|
} = t;
|
|
246
281
|
return {
|
|
247
282
|
width: o,
|
|
248
|
-
height:
|
|
283
|
+
height: s,
|
|
249
284
|
top: n,
|
|
250
285
|
left: e,
|
|
251
286
|
right: e + o,
|
|
252
|
-
bottom: n +
|
|
287
|
+
bottom: n + s,
|
|
253
288
|
x: e,
|
|
254
289
|
y: n
|
|
255
290
|
};
|
|
@@ -257,15 +292,15 @@ function it(t) {
|
|
|
257
292
|
function Dt(t, e, n) {
|
|
258
293
|
let {
|
|
259
294
|
reference: o,
|
|
260
|
-
floating:
|
|
295
|
+
floating: s
|
|
261
296
|
} = t;
|
|
262
|
-
const
|
|
297
|
+
const r = B(e), i = ee(e), c = te(i), l = N(e), a = r === "y", f = o.x + o.width / 2 - s.width / 2, u = o.y + o.height / 2 - s.height / 2, h = o[c] / 2 - s[c] / 2;
|
|
263
298
|
let d;
|
|
264
299
|
switch (l) {
|
|
265
300
|
case "top":
|
|
266
301
|
d = {
|
|
267
302
|
x: f,
|
|
268
|
-
y: o.y -
|
|
303
|
+
y: o.y - s.height
|
|
269
304
|
};
|
|
270
305
|
break;
|
|
271
306
|
case "bottom":
|
|
@@ -282,7 +317,7 @@ function Dt(t, e, n) {
|
|
|
282
317
|
break;
|
|
283
318
|
case "left":
|
|
284
319
|
d = {
|
|
285
|
-
x: o.x -
|
|
320
|
+
x: o.x - s.width,
|
|
286
321
|
y: u
|
|
287
322
|
};
|
|
288
323
|
break;
|
|
@@ -292,27 +327,27 @@ function Dt(t, e, n) {
|
|
|
292
327
|
y: o.y
|
|
293
328
|
};
|
|
294
329
|
}
|
|
295
|
-
switch (
|
|
330
|
+
switch (lt(e)) {
|
|
296
331
|
case "start":
|
|
297
|
-
d[
|
|
332
|
+
d[i] -= h * (n && a ? -1 : 1);
|
|
298
333
|
break;
|
|
299
334
|
case "end":
|
|
300
|
-
d[
|
|
335
|
+
d[i] += h * (n && a ? -1 : 1);
|
|
301
336
|
break;
|
|
302
337
|
}
|
|
303
338
|
return d;
|
|
304
339
|
}
|
|
305
|
-
const
|
|
340
|
+
const Ue = async (t, e, n) => {
|
|
306
341
|
const {
|
|
307
342
|
placement: o = "bottom",
|
|
308
|
-
strategy:
|
|
309
|
-
middleware:
|
|
310
|
-
platform:
|
|
311
|
-
} = n, c =
|
|
312
|
-
let a = await
|
|
343
|
+
strategy: s = "absolute",
|
|
344
|
+
middleware: r = [],
|
|
345
|
+
platform: i
|
|
346
|
+
} = n, c = r.filter(Boolean), l = await (i.isRTL == null ? void 0 : i.isRTL(e));
|
|
347
|
+
let a = await i.getElementRects({
|
|
313
348
|
reference: t,
|
|
314
349
|
floating: e,
|
|
315
|
-
strategy:
|
|
350
|
+
strategy: s
|
|
316
351
|
}), {
|
|
317
352
|
x: f,
|
|
318
353
|
y: u
|
|
@@ -322,8 +357,8 @@ const He = async (t, e, n) => {
|
|
|
322
357
|
name: y,
|
|
323
358
|
fn: p
|
|
324
359
|
} = c[g], {
|
|
325
|
-
x
|
|
326
|
-
y:
|
|
360
|
+
x,
|
|
361
|
+
y: w,
|
|
327
362
|
data: b,
|
|
328
363
|
reset: v
|
|
329
364
|
} = await p({
|
|
@@ -331,25 +366,25 @@ const He = async (t, e, n) => {
|
|
|
331
366
|
y: u,
|
|
332
367
|
initialPlacement: o,
|
|
333
368
|
placement: h,
|
|
334
|
-
strategy:
|
|
369
|
+
strategy: s,
|
|
335
370
|
middlewareData: d,
|
|
336
371
|
rects: a,
|
|
337
|
-
platform:
|
|
372
|
+
platform: i,
|
|
338
373
|
elements: {
|
|
339
374
|
reference: t,
|
|
340
375
|
floating: e
|
|
341
376
|
}
|
|
342
377
|
});
|
|
343
|
-
f =
|
|
378
|
+
f = x ?? f, u = w ?? u, d = {
|
|
344
379
|
...d,
|
|
345
380
|
[y]: {
|
|
346
381
|
...d[y],
|
|
347
382
|
...b
|
|
348
383
|
}
|
|
349
|
-
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (a = v.rects === !0 ? await
|
|
384
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (a = v.rects === !0 ? await i.getElementRects({
|
|
350
385
|
reference: t,
|
|
351
386
|
floating: e,
|
|
352
|
-
strategy:
|
|
387
|
+
strategy: s
|
|
353
388
|
}) : v.rects), {
|
|
354
389
|
x: f,
|
|
355
390
|
y: u
|
|
@@ -359,7 +394,7 @@ const He = async (t, e, n) => {
|
|
|
359
394
|
x: f,
|
|
360
395
|
y: u,
|
|
361
396
|
placement: h,
|
|
362
|
-
strategy:
|
|
397
|
+
strategy: s,
|
|
363
398
|
middlewareData: d
|
|
364
399
|
};
|
|
365
400
|
};
|
|
@@ -368,9 +403,9 @@ async function ne(t, e) {
|
|
|
368
403
|
e === void 0 && (e = {});
|
|
369
404
|
const {
|
|
370
405
|
x: o,
|
|
371
|
-
y:
|
|
372
|
-
platform:
|
|
373
|
-
rects:
|
|
406
|
+
y: s,
|
|
407
|
+
platform: r,
|
|
408
|
+
rects: i,
|
|
374
409
|
elements: c,
|
|
375
410
|
strategy: l
|
|
376
411
|
} = t, {
|
|
@@ -379,28 +414,28 @@ async function ne(t, e) {
|
|
|
379
414
|
elementContext: u = "floating",
|
|
380
415
|
altBoundary: h = !1,
|
|
381
416
|
padding: d = 0
|
|
382
|
-
} =
|
|
383
|
-
element: (n = await (
|
|
417
|
+
} = ct(e, t), m = He(d), y = c[h ? u === "floating" ? "reference" : "floating" : u], p = rt(await r.getClippingRect({
|
|
418
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(y))) == null || n ? y : y.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
384
419
|
boundary: a,
|
|
385
420
|
rootBoundary: f,
|
|
386
421
|
strategy: l
|
|
387
|
-
})),
|
|
422
|
+
})), x = u === "floating" ? {
|
|
388
423
|
x: o,
|
|
389
|
-
y:
|
|
390
|
-
width:
|
|
391
|
-
height:
|
|
392
|
-
} :
|
|
424
|
+
y: s,
|
|
425
|
+
width: i.floating.width,
|
|
426
|
+
height: i.floating.height
|
|
427
|
+
} : i.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(w)) ? await (r.getScale == null ? void 0 : r.getScale(w)) || {
|
|
393
428
|
x: 1,
|
|
394
429
|
y: 1
|
|
395
430
|
} : {
|
|
396
431
|
x: 1,
|
|
397
432
|
y: 1
|
|
398
|
-
}, v =
|
|
433
|
+
}, v = rt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
399
434
|
elements: c,
|
|
400
|
-
rect:
|
|
401
|
-
offsetParent:
|
|
435
|
+
rect: x,
|
|
436
|
+
offsetParent: w,
|
|
402
437
|
strategy: l
|
|
403
|
-
}) :
|
|
438
|
+
}) : x);
|
|
404
439
|
return {
|
|
405
440
|
top: (p.top - v.top + m.top) / b.y,
|
|
406
441
|
bottom: (v.bottom - p.bottom + m.bottom) / b.y,
|
|
@@ -408,16 +443,16 @@ async function ne(t, e) {
|
|
|
408
443
|
right: (v.right - p.right + m.right) / b.x
|
|
409
444
|
};
|
|
410
445
|
}
|
|
411
|
-
const
|
|
446
|
+
const Be = function(t) {
|
|
412
447
|
return t === void 0 && (t = {}), {
|
|
413
448
|
name: "flip",
|
|
414
449
|
options: t,
|
|
415
450
|
async fn(e) {
|
|
416
451
|
var n, o;
|
|
417
452
|
const {
|
|
418
|
-
placement:
|
|
419
|
-
middlewareData:
|
|
420
|
-
rects:
|
|
453
|
+
placement: s,
|
|
454
|
+
middlewareData: r,
|
|
455
|
+
rects: i,
|
|
421
456
|
initialPlacement: c,
|
|
422
457
|
platform: l,
|
|
423
458
|
elements: a
|
|
@@ -429,23 +464,23 @@ const ze = function(t) {
|
|
|
429
464
|
fallbackAxisSideDirection: m = "none",
|
|
430
465
|
flipAlignment: g = !0,
|
|
431
466
|
...y
|
|
432
|
-
} =
|
|
433
|
-
if ((n =
|
|
467
|
+
} = ct(t, e);
|
|
468
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
434
469
|
return {};
|
|
435
|
-
const p = N(
|
|
436
|
-
!h && $ && v.push(...
|
|
437
|
-
const ue = [c, ...v],
|
|
438
|
-
let I = ((o =
|
|
439
|
-
if (f && Z.push(
|
|
440
|
-
const F =
|
|
441
|
-
Z.push(
|
|
470
|
+
const p = N(s), x = B(c), w = N(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = h || (w || !g ? [st(c)] : Me(c)), $ = m !== "none";
|
|
471
|
+
!h && $ && v.push(...Ve(c, g, m, b));
|
|
472
|
+
const ue = [c, ...v], dt = await ne(e, y), Z = [];
|
|
473
|
+
let I = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
474
|
+
if (f && Z.push(dt[p]), u) {
|
|
475
|
+
const F = Fe(s, i, b);
|
|
476
|
+
Z.push(dt[F[0]], dt[F[1]]);
|
|
442
477
|
}
|
|
443
478
|
if (I = [...I, {
|
|
444
|
-
placement:
|
|
479
|
+
placement: s,
|
|
445
480
|
overflows: Z
|
|
446
481
|
}], !Z.every((F) => F <= 0)) {
|
|
447
|
-
var
|
|
448
|
-
const F = (((
|
|
482
|
+
var Lt, Ot;
|
|
483
|
+
const F = (((Lt = r.flip) == null ? void 0 : Lt.index) || 0) + 1, Tt = ue[F];
|
|
449
484
|
if (Tt)
|
|
450
485
|
return {
|
|
451
486
|
data: {
|
|
@@ -456,20 +491,20 @@ const ze = function(t) {
|
|
|
456
491
|
placement: Tt
|
|
457
492
|
}
|
|
458
493
|
};
|
|
459
|
-
let j = (
|
|
494
|
+
let j = (Ot = I.filter((H) => H.overflows[0] <= 0).sort((H, T) => H.overflows[1] - T.overflows[1])[0]) == null ? void 0 : Ot.placement;
|
|
460
495
|
if (!j)
|
|
461
496
|
switch (d) {
|
|
462
497
|
case "bestFit": {
|
|
463
498
|
var St;
|
|
464
|
-
const H = (St = I.filter((
|
|
499
|
+
const H = (St = I.filter((T) => {
|
|
465
500
|
if ($) {
|
|
466
|
-
const
|
|
467
|
-
return
|
|
501
|
+
const k = B(T.placement);
|
|
502
|
+
return k === x || // Create a bias to the `y` side axis due to horizontal
|
|
468
503
|
// reading directions favoring greater width.
|
|
469
|
-
|
|
504
|
+
k === "y";
|
|
470
505
|
}
|
|
471
506
|
return !0;
|
|
472
|
-
}).map((
|
|
507
|
+
}).map((T) => [T.placement, T.overflows.filter((k) => k > 0).reduce((k, fe) => k + fe, 0)]).sort((T, k) => T[1] - k[1])[0]) == null ? void 0 : St[0];
|
|
473
508
|
H && (j = H);
|
|
474
509
|
break;
|
|
475
510
|
}
|
|
@@ -477,7 +512,7 @@ const ze = function(t) {
|
|
|
477
512
|
j = c;
|
|
478
513
|
break;
|
|
479
514
|
}
|
|
480
|
-
if (
|
|
515
|
+
if (s !== j)
|
|
481
516
|
return {
|
|
482
517
|
reset: {
|
|
483
518
|
placement: j
|
|
@@ -488,12 +523,12 @@ const ze = function(t) {
|
|
|
488
523
|
}
|
|
489
524
|
};
|
|
490
525
|
};
|
|
491
|
-
async function
|
|
526
|
+
async function ze(t, e) {
|
|
492
527
|
const {
|
|
493
528
|
placement: n,
|
|
494
529
|
platform: o,
|
|
495
|
-
elements:
|
|
496
|
-
} = t,
|
|
530
|
+
elements: s
|
|
531
|
+
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), i = N(n), c = lt(n), l = B(n) === "y", a = ["left", "top"].includes(i) ? -1 : 1, f = r && l ? -1 : 1, u = ct(e, t);
|
|
497
532
|
let {
|
|
498
533
|
mainAxis: h,
|
|
499
534
|
crossAxis: d,
|
|
@@ -515,29 +550,29 @@ async function Be(t, e) {
|
|
|
515
550
|
y: d * f
|
|
516
551
|
};
|
|
517
552
|
}
|
|
518
|
-
const
|
|
553
|
+
const _e = function(t) {
|
|
519
554
|
return t === void 0 && (t = 0), {
|
|
520
555
|
name: "offset",
|
|
521
556
|
options: t,
|
|
522
557
|
async fn(e) {
|
|
523
558
|
var n, o;
|
|
524
559
|
const {
|
|
525
|
-
x:
|
|
526
|
-
y:
|
|
527
|
-
placement:
|
|
560
|
+
x: s,
|
|
561
|
+
y: r,
|
|
562
|
+
placement: i,
|
|
528
563
|
middlewareData: c
|
|
529
|
-
} = e, l = await
|
|
530
|
-
return
|
|
531
|
-
x:
|
|
532
|
-
y:
|
|
564
|
+
} = e, l = await ze(e, t);
|
|
565
|
+
return i === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
566
|
+
x: s + l.x,
|
|
567
|
+
y: r + l.y,
|
|
533
568
|
data: {
|
|
534
569
|
...l,
|
|
535
|
-
placement:
|
|
570
|
+
placement: i
|
|
536
571
|
}
|
|
537
572
|
};
|
|
538
573
|
}
|
|
539
574
|
};
|
|
540
|
-
},
|
|
575
|
+
}, Ie = function(t) {
|
|
541
576
|
return t === void 0 && (t = {}), {
|
|
542
577
|
name: "shift",
|
|
543
578
|
options: t,
|
|
@@ -545,35 +580,35 @@ const Ue = function(t) {
|
|
|
545
580
|
const {
|
|
546
581
|
x: n,
|
|
547
582
|
y: o,
|
|
548
|
-
placement:
|
|
583
|
+
placement: s
|
|
549
584
|
} = e, {
|
|
550
|
-
mainAxis:
|
|
551
|
-
crossAxis:
|
|
585
|
+
mainAxis: r = !0,
|
|
586
|
+
crossAxis: i = !1,
|
|
552
587
|
limiter: c = {
|
|
553
588
|
fn: (y) => {
|
|
554
589
|
let {
|
|
555
590
|
x: p,
|
|
556
|
-
y:
|
|
591
|
+
y: x
|
|
557
592
|
} = y;
|
|
558
593
|
return {
|
|
559
594
|
x: p,
|
|
560
|
-
y:
|
|
595
|
+
y: x
|
|
561
596
|
};
|
|
562
597
|
}
|
|
563
598
|
},
|
|
564
599
|
...l
|
|
565
|
-
} =
|
|
600
|
+
} = ct(t, e), a = {
|
|
566
601
|
x: n,
|
|
567
602
|
y: o
|
|
568
|
-
}, f = await ne(e, l), u = B(N(
|
|
603
|
+
}, f = await ne(e, l), u = B(N(s)), h = Zt(u);
|
|
569
604
|
let d = a[h], m = a[u];
|
|
570
|
-
if (
|
|
571
|
-
const y = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right",
|
|
572
|
-
d =
|
|
605
|
+
if (r) {
|
|
606
|
+
const y = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", x = d + f[y], w = d - f[p];
|
|
607
|
+
d = Ct(x, d, w);
|
|
573
608
|
}
|
|
574
|
-
if (
|
|
575
|
-
const y = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right",
|
|
576
|
-
m =
|
|
609
|
+
if (i) {
|
|
610
|
+
const y = u === "y" ? "top" : "left", p = u === "y" ? "bottom" : "right", x = m + f[y], w = m - f[p];
|
|
611
|
+
m = Ct(x, m, w);
|
|
577
612
|
}
|
|
578
613
|
const g = c.fn({
|
|
579
614
|
...e,
|
|
@@ -586,15 +621,15 @@ const Ue = function(t) {
|
|
|
586
621
|
x: g.x - n,
|
|
587
622
|
y: g.y - o,
|
|
588
623
|
enabled: {
|
|
589
|
-
[h]:
|
|
590
|
-
[u]:
|
|
624
|
+
[h]: r,
|
|
625
|
+
[u]: i
|
|
591
626
|
}
|
|
592
627
|
}
|
|
593
628
|
};
|
|
594
629
|
}
|
|
595
630
|
};
|
|
596
631
|
};
|
|
597
|
-
function
|
|
632
|
+
function at() {
|
|
598
633
|
return typeof window < "u";
|
|
599
634
|
}
|
|
600
635
|
function _(t) {
|
|
@@ -609,30 +644,30 @@ function S(t) {
|
|
|
609
644
|
return (e = (oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
610
645
|
}
|
|
611
646
|
function oe(t) {
|
|
612
|
-
return
|
|
647
|
+
return at() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
613
648
|
}
|
|
614
649
|
function R(t) {
|
|
615
|
-
return
|
|
650
|
+
return at() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
616
651
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
652
|
+
function O(t) {
|
|
653
|
+
return at() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
|
|
619
654
|
}
|
|
620
655
|
function Wt(t) {
|
|
621
|
-
return !
|
|
656
|
+
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
622
657
|
}
|
|
623
658
|
function Q(t) {
|
|
624
659
|
const {
|
|
625
660
|
overflow: e,
|
|
626
661
|
overflowX: n,
|
|
627
662
|
overflowY: o,
|
|
628
|
-
display:
|
|
663
|
+
display: s
|
|
629
664
|
} = E(t);
|
|
630
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(
|
|
665
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(s);
|
|
631
666
|
}
|
|
632
|
-
function
|
|
667
|
+
function je(t) {
|
|
633
668
|
return ["table", "td", "th"].includes(_(t));
|
|
634
669
|
}
|
|
635
|
-
function
|
|
670
|
+
function ut(t) {
|
|
636
671
|
return [":popover-open", ":modal"].some((e) => {
|
|
637
672
|
try {
|
|
638
673
|
return t.matches(e);
|
|
@@ -645,12 +680,12 @@ function bt(t) {
|
|
|
645
680
|
const e = At(), n = R(t) ? E(t) : t;
|
|
646
681
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
647
682
|
}
|
|
648
|
-
function
|
|
683
|
+
function Ye(t) {
|
|
649
684
|
let e = D(t);
|
|
650
|
-
for (;
|
|
685
|
+
for (; O(e) && !z(e); ) {
|
|
651
686
|
if (bt(e))
|
|
652
687
|
return e;
|
|
653
|
-
if (
|
|
688
|
+
if (ut(e))
|
|
654
689
|
return null;
|
|
655
690
|
e = D(e);
|
|
656
691
|
}
|
|
@@ -659,13 +694,13 @@ function je(t) {
|
|
|
659
694
|
function At() {
|
|
660
695
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
661
696
|
}
|
|
662
|
-
function
|
|
697
|
+
function z(t) {
|
|
663
698
|
return ["html", "body", "#document"].includes(_(t));
|
|
664
699
|
}
|
|
665
700
|
function E(t) {
|
|
666
701
|
return A(t).getComputedStyle(t);
|
|
667
702
|
}
|
|
668
|
-
function
|
|
703
|
+
function ft(t) {
|
|
669
704
|
return R(t) ? {
|
|
670
705
|
scrollLeft: t.scrollLeft,
|
|
671
706
|
scrollTop: t.scrollTop
|
|
@@ -686,28 +721,28 @@ function D(t) {
|
|
|
686
721
|
);
|
|
687
722
|
return Wt(e) ? e.host : e;
|
|
688
723
|
}
|
|
689
|
-
function
|
|
724
|
+
function se(t) {
|
|
690
725
|
const e = D(t);
|
|
691
|
-
return
|
|
726
|
+
return z(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && Q(e) ? e : se(e);
|
|
692
727
|
}
|
|
693
|
-
function
|
|
728
|
+
function K(t, e, n) {
|
|
694
729
|
var o;
|
|
695
730
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
696
|
-
const
|
|
697
|
-
if (
|
|
698
|
-
const c = yt(
|
|
699
|
-
return e.concat(
|
|
731
|
+
const s = se(t), r = s === ((o = t.ownerDocument) == null ? void 0 : o.body), i = A(s);
|
|
732
|
+
if (r) {
|
|
733
|
+
const c = yt(i);
|
|
734
|
+
return e.concat(i, i.visualViewport || [], Q(s) ? s : [], c && n ? K(c) : []);
|
|
700
735
|
}
|
|
701
|
-
return e.concat(
|
|
736
|
+
return e.concat(s, K(s, [], n));
|
|
702
737
|
}
|
|
703
738
|
function yt(t) {
|
|
704
739
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
705
740
|
}
|
|
706
|
-
function
|
|
741
|
+
function re(t) {
|
|
707
742
|
const e = E(t);
|
|
708
743
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
709
|
-
const
|
|
710
|
-
return c && (n =
|
|
744
|
+
const s = O(t), r = s ? t.offsetWidth : n, i = s ? t.offsetHeight : o, c = ot(n) !== r || ot(o) !== i;
|
|
745
|
+
return c && (n = r, o = i), {
|
|
711
746
|
width: n,
|
|
712
747
|
height: o,
|
|
713
748
|
$: c
|
|
@@ -716,25 +751,25 @@ function ie(t) {
|
|
|
716
751
|
function Rt(t) {
|
|
717
752
|
return R(t) ? t : t.contextElement;
|
|
718
753
|
}
|
|
719
|
-
function
|
|
754
|
+
function U(t) {
|
|
720
755
|
const e = Rt(t);
|
|
721
|
-
if (!
|
|
722
|
-
return
|
|
756
|
+
if (!O(e))
|
|
757
|
+
return L(1);
|
|
723
758
|
const n = e.getBoundingClientRect(), {
|
|
724
759
|
width: o,
|
|
725
|
-
height:
|
|
726
|
-
$:
|
|
727
|
-
} =
|
|
728
|
-
let
|
|
729
|
-
return (!
|
|
730
|
-
x:
|
|
760
|
+
height: s,
|
|
761
|
+
$: r
|
|
762
|
+
} = re(e);
|
|
763
|
+
let i = (r ? ot(n.width) : n.width) / o, c = (r ? ot(n.height) : n.height) / s;
|
|
764
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
765
|
+
x: i,
|
|
731
766
|
y: c
|
|
732
767
|
};
|
|
733
768
|
}
|
|
734
|
-
const
|
|
735
|
-
function
|
|
769
|
+
const Ke = /* @__PURE__ */ L(0);
|
|
770
|
+
function ie(t) {
|
|
736
771
|
const e = A(t);
|
|
737
|
-
return !At() || !e.visualViewport ?
|
|
772
|
+
return !At() || !e.visualViewport ? Ke : {
|
|
738
773
|
x: e.visualViewport.offsetLeft,
|
|
739
774
|
y: e.visualViewport.offsetTop
|
|
740
775
|
};
|
|
@@ -744,20 +779,20 @@ function qe(t, e, n) {
|
|
|
744
779
|
}
|
|
745
780
|
function V(t, e, n, o) {
|
|
746
781
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
747
|
-
const
|
|
748
|
-
let
|
|
749
|
-
e && (o ? R(o) && (
|
|
750
|
-
const c = qe(
|
|
751
|
-
let l = (
|
|
752
|
-
if (
|
|
753
|
-
const h = A(
|
|
782
|
+
const s = t.getBoundingClientRect(), r = Rt(t);
|
|
783
|
+
let i = L(1);
|
|
784
|
+
e && (o ? R(o) && (i = U(o)) : i = U(t));
|
|
785
|
+
const c = qe(r, n, o) ? ie(r) : L(0);
|
|
786
|
+
let l = (s.left + c.x) / i.x, a = (s.top + c.y) / i.y, f = s.width / i.x, u = s.height / i.y;
|
|
787
|
+
if (r) {
|
|
788
|
+
const h = A(r), d = o && R(o) ? A(o) : o;
|
|
754
789
|
let m = h, g = yt(m);
|
|
755
790
|
for (; g && o && d !== m; ) {
|
|
756
|
-
const y =
|
|
757
|
-
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l +=
|
|
791
|
+
const y = U(g), p = g.getBoundingClientRect(), x = E(g), w = p.left + (g.clientLeft + parseFloat(x.paddingLeft)) * y.x, b = p.top + (g.clientTop + parseFloat(x.paddingTop)) * y.y;
|
|
792
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += w, a += b, m = A(g), g = yt(m);
|
|
758
793
|
}
|
|
759
794
|
}
|
|
760
|
-
return
|
|
795
|
+
return rt({
|
|
761
796
|
width: f,
|
|
762
797
|
height: u,
|
|
763
798
|
x: l,
|
|
@@ -765,40 +800,40 @@ function V(t, e, n, o) {
|
|
|
765
800
|
});
|
|
766
801
|
}
|
|
767
802
|
function Et(t, e) {
|
|
768
|
-
const n =
|
|
803
|
+
const n = ft(t).scrollLeft;
|
|
769
804
|
return e ? e.left + n : V(S(t)).left + n;
|
|
770
805
|
}
|
|
771
806
|
function ce(t, e, n) {
|
|
772
807
|
n === void 0 && (n = !1);
|
|
773
|
-
const o = t.getBoundingClientRect(),
|
|
808
|
+
const o = t.getBoundingClientRect(), s = o.left + e.scrollLeft - (n ? 0 : (
|
|
774
809
|
// RTL <body> scrollbar.
|
|
775
810
|
Et(t, o)
|
|
776
|
-
)),
|
|
811
|
+
)), r = o.top + e.scrollTop;
|
|
777
812
|
return {
|
|
778
|
-
x:
|
|
779
|
-
y:
|
|
813
|
+
x: s,
|
|
814
|
+
y: r
|
|
780
815
|
};
|
|
781
816
|
}
|
|
782
|
-
function
|
|
817
|
+
function Xe(t) {
|
|
783
818
|
let {
|
|
784
819
|
elements: e,
|
|
785
820
|
rect: n,
|
|
786
821
|
offsetParent: o,
|
|
787
|
-
strategy:
|
|
822
|
+
strategy: s
|
|
788
823
|
} = t;
|
|
789
|
-
const
|
|
790
|
-
if (o ===
|
|
824
|
+
const r = s === "fixed", i = S(o), c = e ? ut(e.floating) : !1;
|
|
825
|
+
if (o === i || c && r)
|
|
791
826
|
return n;
|
|
792
827
|
let l = {
|
|
793
828
|
scrollLeft: 0,
|
|
794
829
|
scrollTop: 0
|
|
795
|
-
}, a =
|
|
796
|
-
const f =
|
|
797
|
-
if ((u || !u && !
|
|
830
|
+
}, a = L(1);
|
|
831
|
+
const f = L(0), u = O(o);
|
|
832
|
+
if ((u || !u && !r) && ((_(o) !== "body" || Q(i)) && (l = ft(o)), O(o))) {
|
|
798
833
|
const d = V(o);
|
|
799
|
-
a =
|
|
834
|
+
a = U(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
800
835
|
}
|
|
801
|
-
const h =
|
|
836
|
+
const h = i && !u && !r ? ce(i, l, !0) : L(0);
|
|
802
837
|
return {
|
|
803
838
|
width: n.width * a.x,
|
|
804
839
|
height: n.height * a.y,
|
|
@@ -806,91 +841,91 @@ function Ke(t) {
|
|
|
806
841
|
y: n.y * a.y - l.scrollTop * a.y + f.y + h.y
|
|
807
842
|
};
|
|
808
843
|
}
|
|
809
|
-
function
|
|
844
|
+
function Je(t) {
|
|
810
845
|
return Array.from(t.getClientRects());
|
|
811
846
|
}
|
|
812
|
-
function
|
|
813
|
-
const e = S(t), n =
|
|
814
|
-
let
|
|
847
|
+
function Ge(t) {
|
|
848
|
+
const e = S(t), n = ft(t), o = t.ownerDocument.body, s = M(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = M(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
849
|
+
let i = -n.scrollLeft + Et(t);
|
|
815
850
|
const c = -n.scrollTop;
|
|
816
|
-
return E(o).direction === "rtl" && (
|
|
817
|
-
width:
|
|
818
|
-
height:
|
|
819
|
-
x:
|
|
851
|
+
return E(o).direction === "rtl" && (i += M(e.clientWidth, o.clientWidth) - s), {
|
|
852
|
+
width: s,
|
|
853
|
+
height: r,
|
|
854
|
+
x: i,
|
|
820
855
|
y: c
|
|
821
856
|
};
|
|
822
857
|
}
|
|
823
|
-
function
|
|
824
|
-
const n = A(t), o = S(t),
|
|
825
|
-
let
|
|
826
|
-
if (
|
|
827
|
-
|
|
858
|
+
function Qe(t, e) {
|
|
859
|
+
const n = A(t), o = S(t), s = n.visualViewport;
|
|
860
|
+
let r = o.clientWidth, i = o.clientHeight, c = 0, l = 0;
|
|
861
|
+
if (s) {
|
|
862
|
+
r = s.width, i = s.height;
|
|
828
863
|
const a = At();
|
|
829
|
-
(!a || a && e === "fixed") && (c =
|
|
864
|
+
(!a || a && e === "fixed") && (c = s.offsetLeft, l = s.offsetTop);
|
|
830
865
|
}
|
|
831
866
|
return {
|
|
832
|
-
width:
|
|
833
|
-
height:
|
|
867
|
+
width: r,
|
|
868
|
+
height: i,
|
|
834
869
|
x: c,
|
|
835
870
|
y: l
|
|
836
871
|
};
|
|
837
872
|
}
|
|
838
|
-
function
|
|
839
|
-
const n = V(t, !0, e === "fixed"), o = n.top + t.clientTop,
|
|
873
|
+
function Ze(t, e) {
|
|
874
|
+
const n = V(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, r = O(t) ? U(t) : L(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, l = s * r.x, a = o * r.y;
|
|
840
875
|
return {
|
|
841
|
-
width:
|
|
876
|
+
width: i,
|
|
842
877
|
height: c,
|
|
843
878
|
x: l,
|
|
844
879
|
y: a
|
|
845
880
|
};
|
|
846
881
|
}
|
|
847
|
-
function
|
|
882
|
+
function Pt(t, e, n) {
|
|
848
883
|
let o;
|
|
849
884
|
if (e === "viewport")
|
|
850
|
-
o =
|
|
885
|
+
o = Qe(t, n);
|
|
851
886
|
else if (e === "document")
|
|
852
|
-
o =
|
|
887
|
+
o = Ge(S(t));
|
|
853
888
|
else if (R(e))
|
|
854
|
-
o =
|
|
889
|
+
o = Ze(e, n);
|
|
855
890
|
else {
|
|
856
|
-
const
|
|
891
|
+
const s = ie(t);
|
|
857
892
|
o = {
|
|
858
|
-
x: e.x -
|
|
859
|
-
y: e.y -
|
|
893
|
+
x: e.x - s.x,
|
|
894
|
+
y: e.y - s.y,
|
|
860
895
|
width: e.width,
|
|
861
896
|
height: e.height
|
|
862
897
|
};
|
|
863
898
|
}
|
|
864
|
-
return
|
|
899
|
+
return rt(o);
|
|
865
900
|
}
|
|
866
901
|
function le(t, e) {
|
|
867
902
|
const n = D(t);
|
|
868
|
-
return n === e || !R(n) ||
|
|
903
|
+
return n === e || !R(n) || z(n) ? !1 : E(n).position === "fixed" || le(n, e);
|
|
869
904
|
}
|
|
870
|
-
function
|
|
905
|
+
function tn(t, e) {
|
|
871
906
|
const n = e.get(t);
|
|
872
907
|
if (n)
|
|
873
908
|
return n;
|
|
874
|
-
let o =
|
|
875
|
-
const
|
|
876
|
-
let
|
|
877
|
-
for (; R(
|
|
878
|
-
const c = E(
|
|
879
|
-
!l && c.position === "fixed" && (
|
|
909
|
+
let o = K(t, [], !1).filter((c) => R(c) && _(c) !== "body"), s = null;
|
|
910
|
+
const r = E(t).position === "fixed";
|
|
911
|
+
let i = r ? D(t) : t;
|
|
912
|
+
for (; R(i) && !z(i); ) {
|
|
913
|
+
const c = E(i), l = bt(i);
|
|
914
|
+
!l && c.position === "fixed" && (s = null), (r ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || Q(i) && !l && le(t, i)) ? o = o.filter((f) => f !== i) : s = c, i = D(i);
|
|
880
915
|
}
|
|
881
916
|
return e.set(t, o), o;
|
|
882
917
|
}
|
|
883
|
-
function
|
|
918
|
+
function en(t) {
|
|
884
919
|
let {
|
|
885
920
|
element: e,
|
|
886
921
|
boundary: n,
|
|
887
922
|
rootBoundary: o,
|
|
888
|
-
strategy:
|
|
923
|
+
strategy: s
|
|
889
924
|
} = t;
|
|
890
|
-
const
|
|
891
|
-
const u =
|
|
925
|
+
const i = [...n === "clippingAncestors" ? ut(e) ? [] : tn(e, this._c) : [].concat(n), o], c = i[0], l = i.reduce((a, f) => {
|
|
926
|
+
const u = Pt(e, f, s);
|
|
892
927
|
return a.top = M(u.top, a.top), a.right = nt(u.right, a.right), a.bottom = nt(u.bottom, a.bottom), a.left = M(u.left, a.left), a;
|
|
893
|
-
},
|
|
928
|
+
}, Pt(e, c, s));
|
|
894
929
|
return {
|
|
895
930
|
width: l.right - l.left,
|
|
896
931
|
height: l.bottom - l.top,
|
|
@@ -898,41 +933,41 @@ function tn(t) {
|
|
|
898
933
|
y: l.top
|
|
899
934
|
};
|
|
900
935
|
}
|
|
901
|
-
function
|
|
936
|
+
function nn(t) {
|
|
902
937
|
const {
|
|
903
938
|
width: e,
|
|
904
939
|
height: n
|
|
905
|
-
} =
|
|
940
|
+
} = re(t);
|
|
906
941
|
return {
|
|
907
942
|
width: e,
|
|
908
943
|
height: n
|
|
909
944
|
};
|
|
910
945
|
}
|
|
911
|
-
function
|
|
912
|
-
const o =
|
|
946
|
+
function on(t, e, n) {
|
|
947
|
+
const o = O(e), s = S(e), r = n === "fixed", i = V(t, !0, r, e);
|
|
913
948
|
let c = {
|
|
914
949
|
scrollLeft: 0,
|
|
915
950
|
scrollTop: 0
|
|
916
951
|
};
|
|
917
|
-
const l =
|
|
918
|
-
if (o || !o && !
|
|
919
|
-
if ((_(e) !== "body" || Q(
|
|
920
|
-
const h = V(e, !0,
|
|
952
|
+
const l = L(0);
|
|
953
|
+
if (o || !o && !r)
|
|
954
|
+
if ((_(e) !== "body" || Q(s)) && (c = ft(e)), o) {
|
|
955
|
+
const h = V(e, !0, r, e);
|
|
921
956
|
l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
|
|
922
|
-
} else
|
|
923
|
-
const a =
|
|
957
|
+
} else s && (l.x = Et(s));
|
|
958
|
+
const a = s && !o && !r ? ce(s, c) : L(0), f = i.left + c.scrollLeft - l.x - a.x, u = i.top + c.scrollTop - l.y - a.y;
|
|
924
959
|
return {
|
|
925
960
|
x: f,
|
|
926
961
|
y: u,
|
|
927
|
-
width:
|
|
928
|
-
height:
|
|
962
|
+
width: i.width,
|
|
963
|
+
height: i.height
|
|
929
964
|
};
|
|
930
965
|
}
|
|
931
|
-
function
|
|
966
|
+
function ht(t) {
|
|
932
967
|
return E(t).position === "static";
|
|
933
968
|
}
|
|
934
|
-
function
|
|
935
|
-
if (!
|
|
969
|
+
function Ft(t, e) {
|
|
970
|
+
if (!O(t) || E(t).position === "fixed")
|
|
936
971
|
return null;
|
|
937
972
|
if (e)
|
|
938
973
|
return e(t);
|
|
@@ -941,26 +976,26 @@ function Mt(t, e) {
|
|
|
941
976
|
}
|
|
942
977
|
function ae(t, e) {
|
|
943
978
|
const n = A(t);
|
|
944
|
-
if (
|
|
979
|
+
if (ut(t))
|
|
945
980
|
return n;
|
|
946
|
-
if (!
|
|
947
|
-
let
|
|
948
|
-
for (;
|
|
949
|
-
if (R(
|
|
950
|
-
return
|
|
951
|
-
|
|
981
|
+
if (!O(t)) {
|
|
982
|
+
let s = D(t);
|
|
983
|
+
for (; s && !z(s); ) {
|
|
984
|
+
if (R(s) && !ht(s))
|
|
985
|
+
return s;
|
|
986
|
+
s = D(s);
|
|
952
987
|
}
|
|
953
988
|
return n;
|
|
954
989
|
}
|
|
955
|
-
let o =
|
|
956
|
-
for (; o &&
|
|
957
|
-
o =
|
|
958
|
-
return o &&
|
|
990
|
+
let o = Ft(t, e);
|
|
991
|
+
for (; o && je(o) && ht(o); )
|
|
992
|
+
o = Ft(o, e);
|
|
993
|
+
return o && z(o) && ht(o) && !bt(o) ? n : o || Ye(t) || n;
|
|
959
994
|
}
|
|
960
|
-
const
|
|
995
|
+
const sn = async function(t) {
|
|
961
996
|
const e = this.getOffsetParent || ae, n = this.getDimensions, o = await n(t.floating);
|
|
962
997
|
return {
|
|
963
|
-
reference:
|
|
998
|
+
reference: on(t.reference, await e(t.floating), t.strategy),
|
|
964
999
|
floating: {
|
|
965
1000
|
x: 0,
|
|
966
1001
|
y: 0,
|
|
@@ -972,27 +1007,27 @@ const on = async function(t) {
|
|
|
972
1007
|
function rn(t) {
|
|
973
1008
|
return E(t).direction === "rtl";
|
|
974
1009
|
}
|
|
975
|
-
const
|
|
976
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1010
|
+
const cn = {
|
|
1011
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Xe,
|
|
977
1012
|
getDocumentElement: S,
|
|
978
|
-
getClippingRect:
|
|
1013
|
+
getClippingRect: en,
|
|
979
1014
|
getOffsetParent: ae,
|
|
980
|
-
getElementRects:
|
|
981
|
-
getClientRects:
|
|
982
|
-
getDimensions:
|
|
983
|
-
getScale:
|
|
1015
|
+
getElementRects: sn,
|
|
1016
|
+
getClientRects: Je,
|
|
1017
|
+
getDimensions: nn,
|
|
1018
|
+
getScale: U,
|
|
984
1019
|
isElement: R,
|
|
985
1020
|
isRTL: rn
|
|
986
1021
|
};
|
|
987
|
-
function
|
|
1022
|
+
function ln(t, e) {
|
|
988
1023
|
let n = null, o;
|
|
989
|
-
const
|
|
990
|
-
function
|
|
1024
|
+
const s = S(t);
|
|
1025
|
+
function r() {
|
|
991
1026
|
var c;
|
|
992
1027
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
993
1028
|
}
|
|
994
|
-
function
|
|
995
|
-
c === void 0 && (c = !1), l === void 0 && (l = 1),
|
|
1029
|
+
function i(c, l) {
|
|
1030
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), r();
|
|
996
1031
|
const {
|
|
997
1032
|
left: a,
|
|
998
1033
|
top: f,
|
|
@@ -1001,56 +1036,56 @@ function cn(t, e) {
|
|
|
1001
1036
|
} = t.getBoundingClientRect();
|
|
1002
1037
|
if (c || e(), !u || !h)
|
|
1003
1038
|
return;
|
|
1004
|
-
const d = tt(f), m = tt(
|
|
1039
|
+
const d = tt(f), m = tt(s.clientWidth - (a + u)), g = tt(s.clientHeight - (f + h)), y = tt(a), x = {
|
|
1005
1040
|
rootMargin: -d + "px " + -m + "px " + -g + "px " + -y + "px",
|
|
1006
1041
|
threshold: M(0, nt(1, l)) || 1
|
|
1007
1042
|
};
|
|
1008
|
-
let
|
|
1043
|
+
let w = !0;
|
|
1009
1044
|
function b(v) {
|
|
1010
1045
|
const $ = v[0].intersectionRatio;
|
|
1011
1046
|
if ($ !== l) {
|
|
1012
|
-
if (!
|
|
1013
|
-
return
|
|
1014
|
-
$ ?
|
|
1015
|
-
|
|
1047
|
+
if (!w)
|
|
1048
|
+
return i();
|
|
1049
|
+
$ ? i(!1, $) : o = setTimeout(() => {
|
|
1050
|
+
i(!1, 1e-7);
|
|
1016
1051
|
}, 1e3);
|
|
1017
1052
|
}
|
|
1018
|
-
|
|
1053
|
+
w = !1;
|
|
1019
1054
|
}
|
|
1020
1055
|
try {
|
|
1021
1056
|
n = new IntersectionObserver(b, {
|
|
1022
|
-
...
|
|
1057
|
+
...x,
|
|
1023
1058
|
// Handle <iframe>s
|
|
1024
|
-
root:
|
|
1059
|
+
root: s.ownerDocument
|
|
1025
1060
|
});
|
|
1026
1061
|
} catch {
|
|
1027
|
-
n = new IntersectionObserver(b,
|
|
1062
|
+
n = new IntersectionObserver(b, x);
|
|
1028
1063
|
}
|
|
1029
1064
|
n.observe(t);
|
|
1030
1065
|
}
|
|
1031
|
-
return
|
|
1066
|
+
return i(!0), r;
|
|
1032
1067
|
}
|
|
1033
|
-
function
|
|
1068
|
+
function an(t, e, n, o) {
|
|
1034
1069
|
o === void 0 && (o = {});
|
|
1035
1070
|
const {
|
|
1036
|
-
ancestorScroll:
|
|
1037
|
-
ancestorResize:
|
|
1038
|
-
elementResize:
|
|
1071
|
+
ancestorScroll: s = !0,
|
|
1072
|
+
ancestorResize: r = !0,
|
|
1073
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1039
1074
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1040
1075
|
animationFrame: l = !1
|
|
1041
|
-
} = o, a = Rt(t), f =
|
|
1076
|
+
} = o, a = Rt(t), f = s || r ? [...a ? K(a) : [], ...K(e)] : [];
|
|
1042
1077
|
f.forEach((p) => {
|
|
1043
|
-
|
|
1078
|
+
s && p.addEventListener("scroll", n, {
|
|
1044
1079
|
passive: !0
|
|
1045
|
-
}),
|
|
1080
|
+
}), r && p.addEventListener("resize", n);
|
|
1046
1081
|
});
|
|
1047
|
-
const u = a && c ?
|
|
1082
|
+
const u = a && c ? ln(a, n) : null;
|
|
1048
1083
|
let h = -1, d = null;
|
|
1049
|
-
|
|
1050
|
-
let [
|
|
1051
|
-
|
|
1052
|
-
var
|
|
1053
|
-
(
|
|
1084
|
+
i && (d = new ResizeObserver((p) => {
|
|
1085
|
+
let [x] = p;
|
|
1086
|
+
x && x.target === a && d && (d.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1087
|
+
var w;
|
|
1088
|
+
(w = d) == null || w.observe(e);
|
|
1054
1089
|
})), n();
|
|
1055
1090
|
}), a && !l && d.observe(a), d.observe(e));
|
|
1056
1091
|
let m, g = l ? V(t) : null;
|
|
@@ -1061,47 +1096,47 @@ function ln(t, e, n, o) {
|
|
|
1061
1096
|
}
|
|
1062
1097
|
return n(), () => {
|
|
1063
1098
|
var p;
|
|
1064
|
-
f.forEach((
|
|
1065
|
-
|
|
1099
|
+
f.forEach((x) => {
|
|
1100
|
+
s && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
|
|
1066
1101
|
}), u == null || u(), (p = d) == null || p.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1067
1102
|
};
|
|
1068
1103
|
}
|
|
1069
|
-
const
|
|
1070
|
-
const o = /* @__PURE__ */ new Map(),
|
|
1071
|
-
platform:
|
|
1104
|
+
const un = _e, fn = Ie, Mt = Be, dn = (t, e, n) => {
|
|
1105
|
+
const o = /* @__PURE__ */ new Map(), s = {
|
|
1106
|
+
platform: cn,
|
|
1072
1107
|
...n
|
|
1073
|
-
},
|
|
1074
|
-
...
|
|
1108
|
+
}, r = {
|
|
1109
|
+
...s.platform,
|
|
1075
1110
|
_c: o
|
|
1076
1111
|
};
|
|
1077
|
-
return
|
|
1078
|
-
...
|
|
1079
|
-
platform:
|
|
1112
|
+
return Ue(t, e, {
|
|
1113
|
+
...s,
|
|
1114
|
+
platform: r
|
|
1080
1115
|
});
|
|
1081
|
-
},
|
|
1116
|
+
}, Mn = ({
|
|
1082
1117
|
content: t,
|
|
1083
1118
|
open: e,
|
|
1084
1119
|
placement: n,
|
|
1085
|
-
offset: { mainAxis: o, crossAxis:
|
|
1086
|
-
}) =>
|
|
1087
|
-
const
|
|
1120
|
+
offset: { mainAxis: o, crossAxis: s } = { mainAxis: 0, crossAxis: 0 }
|
|
1121
|
+
}) => qt((r) => {
|
|
1122
|
+
const i = J.toSignal(e), c = r.element;
|
|
1088
1123
|
return Kt(
|
|
1089
|
-
|
|
1090
|
-
() =>
|
|
1124
|
+
i,
|
|
1125
|
+
() => Yt(
|
|
1091
1126
|
"body",
|
|
1092
|
-
|
|
1127
|
+
zt.div(
|
|
1093
1128
|
G((l) => {
|
|
1094
1129
|
const a = l;
|
|
1095
|
-
return a.style.position = "absolute",
|
|
1096
|
-
|
|
1097
|
-
const { x: f, y: u } = await
|
|
1130
|
+
return a.style.position = "absolute", P(
|
|
1131
|
+
an(c, a, async () => {
|
|
1132
|
+
const { x: f, y: u } = await dn(c, a, {
|
|
1098
1133
|
placement: n,
|
|
1099
1134
|
strategy: "absolute",
|
|
1100
1135
|
middleware: [
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1136
|
+
Mt(),
|
|
1137
|
+
un({ mainAxis: o, crossAxis: s }),
|
|
1138
|
+
fn(),
|
|
1139
|
+
Mt()
|
|
1105
1140
|
]
|
|
1106
1141
|
});
|
|
1107
1142
|
a.style.top = `${u}px`, a.style.left = `${f}px`;
|
|
@@ -1112,170 +1147,170 @@ const an = Ue, un = _e, Nt = ze, fn = (t, e, n) => {
|
|
|
1112
1147
|
)
|
|
1113
1148
|
)
|
|
1114
1149
|
);
|
|
1115
|
-
}),
|
|
1116
|
-
const o = W(
|
|
1117
|
-
(u) =>
|
|
1118
|
-
),
|
|
1119
|
-
(u) =>
|
|
1120
|
-
),
|
|
1150
|
+
}), hn = (t, e, n) => {
|
|
1151
|
+
const o = W(C.notAsked), s = o.map(
|
|
1152
|
+
(u) => C.isSuccess(u) ? u.value : void 0
|
|
1153
|
+
), r = o.map(
|
|
1154
|
+
(u) => C.isFailure(u) ? u.error : void 0
|
|
1155
|
+
), i = o.map((u) => C.isLoading(u));
|
|
1121
1156
|
let c;
|
|
1122
1157
|
const l = async (u) => {
|
|
1123
1158
|
c == null || c.abort(), c = new AbortController();
|
|
1124
1159
|
const h = c.signal, d = o.get();
|
|
1125
|
-
o.set(
|
|
1160
|
+
o.set(C.loading(C.getOrUndefined(d)));
|
|
1126
1161
|
try {
|
|
1127
1162
|
const m = await e({ request: u, abortSignal: h, previous: d });
|
|
1128
|
-
await Promise.resolve(), c = void 0, o.set(
|
|
1163
|
+
await Promise.resolve(), c = void 0, o.set(C.success(m));
|
|
1129
1164
|
} catch (m) {
|
|
1130
|
-
c = void 0, o.set(
|
|
1165
|
+
c = void 0, o.set(C.failure(n(m)));
|
|
1131
1166
|
}
|
|
1132
1167
|
}, a = () => l(t.get()), f = () => {
|
|
1133
1168
|
c == null || c.abort(), c = void 0, o.dispose();
|
|
1134
1169
|
};
|
|
1135
1170
|
return o.onDispose(t.on(l)), {
|
|
1136
1171
|
status: o,
|
|
1137
|
-
value:
|
|
1138
|
-
error:
|
|
1139
|
-
loading:
|
|
1172
|
+
value: s,
|
|
1173
|
+
error: r,
|
|
1174
|
+
loading: i,
|
|
1140
1175
|
reload: a,
|
|
1141
1176
|
dispose: f
|
|
1142
1177
|
};
|
|
1143
|
-
},
|
|
1144
|
-
const { status: n, dispose: o, reload:
|
|
1145
|
-
return
|
|
1146
|
-
|
|
1178
|
+
}, mn = (t, e) => {
|
|
1179
|
+
const { status: n, dispose: o, reload: s } = t, { loading: r, failure: i, success: c } = e;
|
|
1180
|
+
return wt(
|
|
1181
|
+
P(o),
|
|
1147
1182
|
Qt(n, {
|
|
1148
|
-
loading:
|
|
1149
|
-
failure:
|
|
1150
|
-
success: (l) => c(l,
|
|
1183
|
+
loading: r != null ? (l) => r(l, s) : void 0,
|
|
1184
|
+
failure: i != null ? (l) => i(l, s) : void 0,
|
|
1185
|
+
success: (l) => c(l, s)
|
|
1151
1186
|
})
|
|
1152
1187
|
);
|
|
1153
|
-
},
|
|
1188
|
+
}, Nn = ({
|
|
1154
1189
|
request: t,
|
|
1155
1190
|
load: e,
|
|
1156
1191
|
mapError: n = (o) => o
|
|
1157
1192
|
}) => {
|
|
1158
|
-
const o =
|
|
1159
|
-
return (
|
|
1160
|
-
},
|
|
1193
|
+
const o = hn(t, e, n);
|
|
1194
|
+
return (s) => mn(o, s);
|
|
1195
|
+
}, pn = (t, e) => {
|
|
1161
1196
|
if (typeof e == "function")
|
|
1162
|
-
return
|
|
1163
|
-
const n = e.failure ?? ((
|
|
1164
|
-
|
|
1165
|
-
|
|
1197
|
+
return pn(t, { success: e });
|
|
1198
|
+
const n = e.failure ?? ((s) => wt(
|
|
1199
|
+
P(s.on(console.error)),
|
|
1200
|
+
s.map((r) => `Error: ${r}`)
|
|
1166
1201
|
)), o = e.success;
|
|
1167
|
-
return
|
|
1168
|
-
Success: (
|
|
1169
|
-
Failure: (
|
|
1202
|
+
return jt(J.toSignal(t), {
|
|
1203
|
+
Success: (s) => o(s.$.value),
|
|
1204
|
+
Failure: (s) => n(s.$.error)
|
|
1170
1205
|
});
|
|
1171
|
-
},
|
|
1206
|
+
}, Vn = () => _t.focus((t) => {
|
|
1172
1207
|
var e;
|
|
1173
1208
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1174
|
-
}),
|
|
1209
|
+
}), $n = (t) => qt((e) => {
|
|
1175
1210
|
const { element: n } = e, o = W({
|
|
1176
1211
|
width: n.clientWidth,
|
|
1177
1212
|
height: n.clientHeight
|
|
1178
|
-
}),
|
|
1213
|
+
}), s = vt(t(o))(e), r = () => {
|
|
1179
1214
|
o.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1180
1215
|
};
|
|
1181
|
-
let
|
|
1182
|
-
return typeof ResizeObserver == "function" && (
|
|
1183
|
-
|
|
1216
|
+
let i;
|
|
1217
|
+
return typeof ResizeObserver == "function" && (i = new ResizeObserver(r), i.observe(n)), P((c) => {
|
|
1218
|
+
i == null || i.disconnect(), s(c);
|
|
1184
1219
|
});
|
|
1185
|
-
}),
|
|
1186
|
-
const n =
|
|
1220
|
+
}), Hn = (t) => (e) => {
|
|
1221
|
+
const n = X(), o = W({
|
|
1187
1222
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1188
1223
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1189
|
-
}),
|
|
1224
|
+
}), s = vt(t(o))(e), r = () => {
|
|
1190
1225
|
o.set({
|
|
1191
1226
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1192
1227
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1193
1228
|
});
|
|
1194
1229
|
};
|
|
1195
|
-
return n == null || n.addEventListener("resize",
|
|
1196
|
-
n == null || n.removeEventListener("resize",
|
|
1230
|
+
return n == null || n.addEventListener("resize", r), (i) => {
|
|
1231
|
+
n == null || n.removeEventListener("resize", r), s(i);
|
|
1197
1232
|
};
|
|
1198
|
-
},
|
|
1199
|
-
const n = e.split("/").filter((
|
|
1200
|
-
for (let
|
|
1201
|
-
const
|
|
1202
|
-
if (!
|
|
1233
|
+
}, gn = (t, e) => {
|
|
1234
|
+
const n = e.split("/").filter((s) => s !== ""), o = {};
|
|
1235
|
+
for (let s = 0; s < t.length; s++) {
|
|
1236
|
+
const r = t[s], i = n[s];
|
|
1237
|
+
if (!i && r.type !== "catch-all")
|
|
1203
1238
|
return null;
|
|
1204
|
-
if (
|
|
1205
|
-
if (
|
|
1239
|
+
if (r.type === "literal") {
|
|
1240
|
+
if (r.value !== i)
|
|
1206
1241
|
return null;
|
|
1207
|
-
} else if (
|
|
1208
|
-
o[
|
|
1209
|
-
else if (
|
|
1242
|
+
} else if (r.type === "param")
|
|
1243
|
+
o[r.name] = i;
|
|
1244
|
+
else if (r.type === "catch-all")
|
|
1210
1245
|
return { params: o, path: e };
|
|
1211
1246
|
}
|
|
1212
1247
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1213
|
-
},
|
|
1248
|
+
}, yn = (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 !== ""), xn = (t) => {
|
|
1214
1249
|
const e = t.map((n) => {
|
|
1215
|
-
const o =
|
|
1250
|
+
const o = yn(n);
|
|
1216
1251
|
return { route: n, segments: o };
|
|
1217
1252
|
});
|
|
1218
1253
|
return function(o) {
|
|
1219
|
-
for (const { segments:
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1222
|
-
return { ...
|
|
1254
|
+
for (const { segments: s, route: r } of e) {
|
|
1255
|
+
const i = gn(s, o);
|
|
1256
|
+
if (i)
|
|
1257
|
+
return { ...i, route: r };
|
|
1223
1258
|
}
|
|
1224
1259
|
return null;
|
|
1225
1260
|
};
|
|
1226
|
-
},
|
|
1227
|
-
const e =
|
|
1228
|
-
return
|
|
1229
|
-
const o = n.map((
|
|
1230
|
-
const
|
|
1231
|
-
if (
|
|
1232
|
-
throw console.error("No route found for",
|
|
1261
|
+
}, Un = (t) => {
|
|
1262
|
+
const e = xn(Object.keys(t));
|
|
1263
|
+
return Bt(Gt, (n) => {
|
|
1264
|
+
const o = n.map((s) => {
|
|
1265
|
+
const r = e(s.pathname);
|
|
1266
|
+
if (r == null)
|
|
1267
|
+
throw console.error("No route found for", s), new Error("No route found");
|
|
1233
1268
|
return {
|
|
1234
|
-
params:
|
|
1235
|
-
route:
|
|
1236
|
-
path:
|
|
1237
|
-
search:
|
|
1238
|
-
hash:
|
|
1269
|
+
params: r.params,
|
|
1270
|
+
route: r.route,
|
|
1271
|
+
path: r.path,
|
|
1272
|
+
search: s.search,
|
|
1273
|
+
hash: s.hash
|
|
1239
1274
|
};
|
|
1240
1275
|
});
|
|
1241
|
-
return
|
|
1242
|
-
o.map((
|
|
1276
|
+
return me(
|
|
1277
|
+
o.map((s) => [s.route, s]),
|
|
1243
1278
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1244
1279
|
t
|
|
1245
1280
|
);
|
|
1246
1281
|
});
|
|
1247
|
-
},
|
|
1282
|
+
}, it = 60 * 1e3, xt = 60 * it, q = 24 * xt, Nt = 7 * q, Vt = 30 * q, wn = 365 * q, vn = [
|
|
1248
1283
|
{
|
|
1249
|
-
max:
|
|
1250
|
-
value:
|
|
1284
|
+
max: it * 90,
|
|
1285
|
+
value: it,
|
|
1251
1286
|
name: "minute",
|
|
1252
1287
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1253
1288
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
1254
1289
|
},
|
|
1255
1290
|
{
|
|
1256
|
-
max:
|
|
1257
|
-
value:
|
|
1291
|
+
max: xt * 36,
|
|
1292
|
+
value: xt,
|
|
1258
1293
|
name: "hour",
|
|
1259
1294
|
past: { singular: "an hour ago", plural: "{} hours ago" },
|
|
1260
1295
|
future: { singular: "in an hour", plural: "in {} hours" }
|
|
1261
1296
|
},
|
|
1262
1297
|
{
|
|
1263
|
-
max:
|
|
1264
|
-
value:
|
|
1298
|
+
max: q * 10,
|
|
1299
|
+
value: q,
|
|
1265
1300
|
name: "day",
|
|
1266
1301
|
past: { singular: "yesterday", plural: "{} days ago" },
|
|
1267
1302
|
future: { singular: "tomorrow", plural: "in {} days" }
|
|
1268
1303
|
},
|
|
1269
1304
|
{
|
|
1270
|
-
max:
|
|
1271
|
-
value:
|
|
1305
|
+
max: Nt * 6,
|
|
1306
|
+
value: Nt,
|
|
1272
1307
|
name: "week",
|
|
1273
1308
|
past: { singular: "last week", plural: "{} weeks ago" },
|
|
1274
1309
|
future: { singular: "in a week", plural: "in {} weeks" }
|
|
1275
1310
|
},
|
|
1276
1311
|
{
|
|
1277
|
-
max:
|
|
1278
|
-
value:
|
|
1312
|
+
max: Vt * 18,
|
|
1313
|
+
value: Vt,
|
|
1279
1314
|
name: "month",
|
|
1280
1315
|
past: { singular: "last month", plural: "{} months ago" },
|
|
1281
1316
|
future: { singular: "in a month", plural: "in {} months" }
|
|
@@ -1288,38 +1323,38 @@ const an = Ue, un = _e, Nt = ze, fn = (t, e, n) => {
|
|
|
1288
1323
|
future: { singular: "in a year", plural: "in {} years" }
|
|
1289
1324
|
}
|
|
1290
1325
|
];
|
|
1291
|
-
function
|
|
1292
|
-
const
|
|
1293
|
-
return
|
|
1326
|
+
function $t(t, e, n, o) {
|
|
1327
|
+
const s = Math.round(t / e);
|
|
1328
|
+
return s <= 1 ? n : o.replace(
|
|
1294
1329
|
"{}",
|
|
1295
|
-
|
|
1330
|
+
s.toLocaleString(void 0, {
|
|
1296
1331
|
maximumFractionDigits: 0,
|
|
1297
1332
|
minimumFractionDigits: 0
|
|
1298
1333
|
})
|
|
1299
1334
|
);
|
|
1300
1335
|
}
|
|
1301
|
-
const
|
|
1302
|
-
const e = W(/* @__PURE__ */ new Date()), n =
|
|
1336
|
+
const bn = (t = 1e3) => {
|
|
1337
|
+
const e = W(/* @__PURE__ */ new Date()), n = ye(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1303
1338
|
return e.onDispose(n), e;
|
|
1304
|
-
},
|
|
1339
|
+
}, An = (t) => {
|
|
1305
1340
|
const e = Math.abs(t);
|
|
1306
|
-
if (e <
|
|
1341
|
+
if (e < it)
|
|
1307
1342
|
return t < 0 ? "just now" : "in a moment";
|
|
1308
|
-
for (const n of
|
|
1343
|
+
for (const n of vn)
|
|
1309
1344
|
if (e < n.max)
|
|
1310
|
-
return t < 0 ?
|
|
1345
|
+
return t < 0 ? $t(e, n.value, n.past.singular, n.past.plural) : $t(e, n.value, n.future.singular, n.future.plural);
|
|
1311
1346
|
throw new Error("unreachable");
|
|
1312
|
-
},
|
|
1313
|
-
const o = e != null ? Ut.is(e) ? e.derive() : W(e) :
|
|
1347
|
+
}, Rn = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
1348
|
+
const o = e != null ? Ut.is(e) ? e.derive() : W(e) : bn(n), s = pe(
|
|
1314
1349
|
t,
|
|
1315
1350
|
o
|
|
1316
|
-
)((
|
|
1317
|
-
return
|
|
1318
|
-
},
|
|
1319
|
-
const n =
|
|
1351
|
+
)((r, i) => r.getTime() - i.getTime());
|
|
1352
|
+
return s.onDispose(() => J.dispose(o)), s;
|
|
1353
|
+
}, En = (t, e = {}) => {
|
|
1354
|
+
const n = Rn(t, e), o = n.map(An);
|
|
1320
1355
|
return o.onDispose(n.dispose), o;
|
|
1321
|
-
},
|
|
1322
|
-
class
|
|
1356
|
+
}, Bn = (t, e = {}) => En(t, e);
|
|
1357
|
+
class Ln extends ge {
|
|
1323
1358
|
constructor() {
|
|
1324
1359
|
super(...arguments);
|
|
1325
1360
|
/**
|
|
@@ -1329,46 +1364,42 @@ class En extends we {
|
|
|
1329
1364
|
kt(this, "tick", () => this.update((n) => n + 1));
|
|
1330
1365
|
}
|
|
1331
1366
|
}
|
|
1332
|
-
const
|
|
1367
|
+
const zn = (t = 0) => new Ln(t, (e, n) => e === n);
|
|
1333
1368
|
export {
|
|
1334
|
-
|
|
1369
|
+
Te as Anchor,
|
|
1370
|
+
kn as Appearance,
|
|
1335
1371
|
Qt as AsyncResultView,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
Rn as relativeTimeSignal,
|
|
1370
|
-
Le as setLocationFromUrl,
|
|
1371
|
-
jn as ticker,
|
|
1372
|
-
bn as timeDiffToString,
|
|
1373
|
-
Cn as urlFromLocation
|
|
1372
|
+
Cn as AutoFocus,
|
|
1373
|
+
Dn as AutoSelect,
|
|
1374
|
+
$n as ElementSize,
|
|
1375
|
+
Pn as HTMLTitle,
|
|
1376
|
+
Wn as HiddenWhenEmpty,
|
|
1377
|
+
De as InViewport,
|
|
1378
|
+
Gt as Location,
|
|
1379
|
+
Mn as PopOver,
|
|
1380
|
+
Nn as Resource,
|
|
1381
|
+
mn as ResourceDisplay,
|
|
1382
|
+
pn as ResultView,
|
|
1383
|
+
Un as Router,
|
|
1384
|
+
Vn as SelectOnFocus,
|
|
1385
|
+
Ln as Ticker,
|
|
1386
|
+
Fn as WhenInViewport,
|
|
1387
|
+
Hn as WindowSize,
|
|
1388
|
+
we as _checkExtensionCondition,
|
|
1389
|
+
xe as _getExtension,
|
|
1390
|
+
xn as _makeRouteMatcher,
|
|
1391
|
+
yn as _parseRouteSegments,
|
|
1392
|
+
Ae as areLocationsEqual,
|
|
1393
|
+
be as handleAnchorClick,
|
|
1394
|
+
Jt as locationFromURL,
|
|
1395
|
+
hn as makeResource,
|
|
1396
|
+
gn as matchesRoute,
|
|
1397
|
+
bn as nowSignal,
|
|
1398
|
+
Bn as relativeTime,
|
|
1399
|
+
Rn as relativeTimeMillisSignal,
|
|
1400
|
+
En as relativeTimeSignal,
|
|
1401
|
+
Re as setLocationFromUrl,
|
|
1402
|
+
zn as ticker,
|
|
1403
|
+
An as timeDiffToString,
|
|
1404
|
+
pt as urlFromLocation
|
|
1374
1405
|
};
|