@tempots/ui 1.0.1 → 1.0.2
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 +280 -280
- package/package.json +1 -1
- package/utils/make-relative-time.d.ts +67 -2
- package/utils/ticker.d.ts +17 -0
package/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
var ue = Object.defineProperty;
|
|
2
2
|
var fe = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { makeProviderMark as Ht, Fragment as K, OnBrowserCtx as wt, Async as St, OnHeadlessCtx as he, UseProvider as zt, makeProp as
|
|
5
|
-
|
|
3
|
+
var Tt = (t, e, n) => fe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { makeProviderMark as Ht, Fragment as K, OnBrowserCtx as wt, Async as St, OnHeadlessCtx as he, UseProvider as zt, makeProp as N, renderableOfTNode as st, getWindow as xt, Signal as Bt, html as Ut, on as _t, Value as X, attr as It, WithProvider as de, OnDispose as T, Empty as mt, OneOfType as jt, makeSignal as me, OnElement as J, Portal as Yt, When as qt, OneOfTuple as pe, makeComputedOf as ge, Prop as ye } from "@tempots/dom";
|
|
5
|
+
import { delayed as Kt, interval as we } from "@tempots/std";
|
|
6
|
+
const xe = (t) => {
|
|
6
7
|
const e = t.split("/").pop();
|
|
7
8
|
if (e == null || e.startsWith(".")) return;
|
|
8
9
|
const n = e.split(".") || [];
|
|
9
10
|
return n.length > 1 ? "." + n.pop() : void 0;
|
|
10
|
-
},
|
|
11
|
-
const n =
|
|
11
|
+
}, ve = (t, e) => {
|
|
12
|
+
const n = xe(e);
|
|
12
13
|
return n != null && (t.length === 0 || !t.some((o) => n == o));
|
|
13
|
-
},
|
|
14
|
+
}, be = (t, e, n, o) => {
|
|
14
15
|
let r = t.target;
|
|
15
16
|
for (; r != null && !(r instanceof HTMLAnchorElement); )
|
|
16
17
|
r = r.parentElement;
|
|
@@ -25,8 +26,8 @@ const ye = (t) => {
|
|
|
25
26
|
if (!(f != null && f.startsWith("#")) && f !== l)
|
|
26
27
|
return !0;
|
|
27
28
|
}
|
|
28
|
-
return e ? !1 :
|
|
29
|
-
},
|
|
29
|
+
return e ? !1 : ve(n, s);
|
|
30
|
+
}, Ae = (t, e = {
|
|
30
31
|
ignoreUrlWithExtension: !0,
|
|
31
32
|
allowedExtensions: [],
|
|
32
33
|
ignoreExternalUrl: !0
|
|
@@ -35,14 +36,14 @@ const ye = (t) => {
|
|
|
35
36
|
(o) => o.startsWith(".") ? o : "." + o
|
|
36
37
|
) : [];
|
|
37
38
|
return (o) => {
|
|
38
|
-
|
|
39
|
+
be(
|
|
39
40
|
o,
|
|
40
41
|
e.ignoreUrlWithExtension ?? !0,
|
|
41
42
|
n,
|
|
42
43
|
e.ignoreExternalUrl ?? !0
|
|
43
44
|
) || t() && o.preventDefault();
|
|
44
45
|
};
|
|
45
|
-
},
|
|
46
|
+
}, Re = Ht("LocationProvider"), Ln = (t) => K(
|
|
46
47
|
wt(() => St(
|
|
47
48
|
import("./browser-location-12vUH3Kv.js").then((e) => e.ProvideBrowserLocation),
|
|
48
49
|
(e) => e(t)
|
|
@@ -51,14 +52,14 @@ const ye = (t) => {
|
|
|
51
52
|
import("./headless-location-Ba_ht5ZQ.js").then((n) => n.ProvideHeadlessLocation),
|
|
52
53
|
(n) => n(e.container.currentURL, t)
|
|
53
54
|
))
|
|
54
|
-
), Xt = (t) => zt(
|
|
55
|
-
const o =
|
|
55
|
+
), Xt = (t) => zt(Re, (e) => (n) => {
|
|
56
|
+
const o = N(e.value, e.equals);
|
|
56
57
|
e.feedProp(o), o.on(e.set);
|
|
57
|
-
const r =
|
|
58
|
+
const r = st(t(o))(n);
|
|
58
59
|
return (i) => {
|
|
59
60
|
o.dispose(), r(i);
|
|
60
61
|
};
|
|
61
|
-
}),
|
|
62
|
+
}), kn = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Ee = (t, e) => {
|
|
62
63
|
var i;
|
|
63
64
|
const n = new URL(t, e ?? ((i = xt()) == null ? void 0 : i.location.toString())), o = Object.fromEntries(n.searchParams.entries());
|
|
64
65
|
let r = n.hash;
|
|
@@ -67,60 +68,53 @@ const ye = (t) => {
|
|
|
67
68
|
search: o,
|
|
68
69
|
hash: r === "" ? void 0 : r
|
|
69
70
|
};
|
|
70
|
-
},
|
|
71
|
-
const n =
|
|
71
|
+
}, Oe = (t, e) => {
|
|
72
|
+
const n = Ee(e);
|
|
72
73
|
return t.set(n), t;
|
|
73
|
-
},
|
|
74
|
+
}, Tn = (t) => {
|
|
74
75
|
const n = new URLSearchParams(t.search).toString(), o = t.hash;
|
|
75
76
|
return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
|
|
76
|
-
},
|
|
77
|
+
}, Le = (t, ...e) => {
|
|
77
78
|
if (typeof t == "string" || Bt.is(t))
|
|
78
|
-
return
|
|
79
|
+
return Le({ href: t }, ...e);
|
|
79
80
|
const { href: n, ...o } = t;
|
|
80
81
|
return Xt((r) => Ut.a(
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
_t.click(
|
|
83
|
+
Ae(() => (Oe(r, X.get(n)), !0), o)
|
|
83
84
|
),
|
|
84
|
-
|
|
85
|
+
It.href(n),
|
|
85
86
|
...e
|
|
86
87
|
));
|
|
87
|
-
}, Jt = Ht("Appearance"),
|
|
88
|
-
const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o =
|
|
88
|
+
}, Jt = Ht("Appearance"), Sn = (t) => {
|
|
89
|
+
const e = xt(), n = e != null && e.matchMedia != null && e.matchMedia("(prefers-color-scheme: dark)").matches, o = N(n ? "dark" : "light"), r = (s) => {
|
|
89
90
|
o.set(s.matches ? "dark" : "light");
|
|
90
91
|
}, i = e != null && e.matchMedia != null ? e.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
91
92
|
return i == null || i.addEventListener("change", r), K(
|
|
92
93
|
de(Jt, o, t),
|
|
93
|
-
|
|
94
|
+
T(() => i == null ? void 0 : i.removeEventListener("change", r))
|
|
94
95
|
);
|
|
95
|
-
},
|
|
96
|
+
}, Cn = (t) => zt(Jt, t), ke = (t, e) => {
|
|
96
97
|
if (typeof e == "function")
|
|
97
|
-
return
|
|
98
|
+
return ke(t, { success: e });
|
|
98
99
|
const n = e.failure ?? ((s) => K(
|
|
99
|
-
|
|
100
|
+
T(s.on(console.error)),
|
|
100
101
|
s.map((c) => `Error: ${c}`)
|
|
101
102
|
)), o = e.success, r = e.loading ?? (() => mt), i = e.notAsked ?? (() => mt);
|
|
102
|
-
return jt(
|
|
103
|
+
return jt(X.toSignal(t), {
|
|
103
104
|
AsyncSuccess: (s) => o(s.$.value),
|
|
104
105
|
AsyncFailure: (s) => n(s.$.error),
|
|
105
106
|
Loading: (s) => r(s.$.previousValue ?? me(void 0)),
|
|
106
107
|
NotAsked: i
|
|
107
108
|
});
|
|
108
|
-
},
|
|
109
|
-
const n =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return k(() => clearTimeout(n));
|
|
113
|
-
}), Ln = (t = 10) => X((e) => {
|
|
114
|
-
const n = setTimeout(() => {
|
|
115
|
-
e == null || e.select();
|
|
116
|
-
}, t);
|
|
117
|
-
return k(() => clearTimeout(n));
|
|
118
|
-
}), Tn = X((t) => {
|
|
109
|
+
}, Pn = (t = 10) => J((e) => T(Kt(() => e == null ? void 0 : e.focus(), t))), Dn = (t = 10) => J((e) => {
|
|
110
|
+
const n = Kt(() => e.select(), t);
|
|
111
|
+
return T(n);
|
|
112
|
+
}), Wn = J((t) => {
|
|
119
113
|
const e = t.style.getPropertyValue(":empty");
|
|
120
|
-
return t.style.setProperty(":empty", "display:none"),
|
|
114
|
+
return t.style.setProperty(":empty", "display:none"), T((n) => {
|
|
121
115
|
n && t.style.setProperty(":empty", e);
|
|
122
116
|
});
|
|
123
|
-
}),
|
|
117
|
+
}), Mn = (t) => Yt("head > title", It.innerText(t)), Te = {
|
|
124
118
|
partial: {
|
|
125
119
|
root: null,
|
|
126
120
|
rootMargin: "0px",
|
|
@@ -131,47 +125,47 @@ const ye = (t) => {
|
|
|
131
125
|
rootMargin: "0px",
|
|
132
126
|
threshold: 1
|
|
133
127
|
}
|
|
134
|
-
},
|
|
128
|
+
}, tt = {
|
|
135
129
|
partial: /* @__PURE__ */ new Map(),
|
|
136
130
|
full: /* @__PURE__ */ new Map()
|
|
137
131
|
}, j = {
|
|
138
132
|
partial: null,
|
|
139
133
|
full: null
|
|
140
134
|
};
|
|
141
|
-
function
|
|
135
|
+
function Se(t) {
|
|
142
136
|
return j[t] == null && (j[t] = new IntersectionObserver((e) => {
|
|
143
137
|
e.forEach((n) => {
|
|
144
|
-
const o =
|
|
138
|
+
const o = tt[t].get(n.target);
|
|
145
139
|
o == null || o.set(n.isIntersecting);
|
|
146
140
|
});
|
|
147
|
-
},
|
|
141
|
+
}, Te[t])), j[t];
|
|
148
142
|
}
|
|
149
|
-
const
|
|
150
|
-
const n =
|
|
143
|
+
const Ce = (t, e) => {
|
|
144
|
+
const n = N(!1);
|
|
151
145
|
return K(
|
|
152
|
-
|
|
153
|
-
const r = typeof IntersectionObserver < "u" ?
|
|
154
|
-
return
|
|
146
|
+
J((o) => {
|
|
147
|
+
const r = typeof IntersectionObserver < "u" ? Se(t) : null;
|
|
148
|
+
return tt[t].set(o, n), r == null || r.observe(o), T(() => {
|
|
155
149
|
var i;
|
|
156
|
-
n.dispose(), r == null || r.unobserve(o),
|
|
150
|
+
n.dispose(), r == null || r.unobserve(o), tt[t].delete(o), tt[t].size === 0 && ((i = j[t]) == null || i.disconnect(), j[t] = null);
|
|
157
151
|
});
|
|
158
152
|
}),
|
|
159
|
-
|
|
153
|
+
st(e(n))
|
|
160
154
|
);
|
|
161
|
-
},
|
|
155
|
+
}, Fn = (t, e, n) => Ce(t, (o) => qt(o, e, n ?? (() => mt))), et = Math.min, W = Math.max, nt = Math.round, Z = Math.floor, O = (t) => ({
|
|
162
156
|
x: t,
|
|
163
157
|
y: t
|
|
164
|
-
}),
|
|
158
|
+
}), Pe = {
|
|
165
159
|
left: "right",
|
|
166
160
|
right: "left",
|
|
167
161
|
bottom: "top",
|
|
168
162
|
top: "bottom"
|
|
169
|
-
},
|
|
163
|
+
}, De = {
|
|
170
164
|
start: "end",
|
|
171
165
|
end: "start"
|
|
172
166
|
};
|
|
173
167
|
function Ct(t, e, n) {
|
|
174
|
-
return W(t,
|
|
168
|
+
return W(t, et(e, n));
|
|
175
169
|
}
|
|
176
170
|
function ct(t, e) {
|
|
177
171
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -194,20 +188,20 @@ function z(t) {
|
|
|
194
188
|
function Zt(t) {
|
|
195
189
|
return Gt(z(t));
|
|
196
190
|
}
|
|
197
|
-
function
|
|
191
|
+
function We(t, e, n) {
|
|
198
192
|
n === void 0 && (n = !1);
|
|
199
193
|
const o = lt(t), r = Zt(t), i = Qt(r);
|
|
200
194
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
201
|
-
return e.reference[i] > e.floating[i] && (s =
|
|
195
|
+
return e.reference[i] > e.floating[i] && (s = ot(s)), [s, ot(s)];
|
|
202
196
|
}
|
|
203
|
-
function
|
|
204
|
-
const e =
|
|
197
|
+
function Me(t) {
|
|
198
|
+
const e = ot(t);
|
|
205
199
|
return [pt(t), e, pt(e)];
|
|
206
200
|
}
|
|
207
201
|
function pt(t) {
|
|
208
|
-
return t.replace(/start|end/g, (e) =>
|
|
202
|
+
return t.replace(/start|end/g, (e) => De[e]);
|
|
209
203
|
}
|
|
210
|
-
function
|
|
204
|
+
function Fe(t, e, n) {
|
|
211
205
|
const o = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
212
206
|
switch (t) {
|
|
213
207
|
case "top":
|
|
@@ -220,15 +214,15 @@ function We(t, e, n) {
|
|
|
220
214
|
return [];
|
|
221
215
|
}
|
|
222
216
|
}
|
|
223
|
-
function
|
|
217
|
+
function Ne(t, e, n, o) {
|
|
224
218
|
const r = lt(t);
|
|
225
|
-
let i =
|
|
219
|
+
let i = Fe(M(t), n === "start", o);
|
|
226
220
|
return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(pt)))), i;
|
|
227
221
|
}
|
|
228
|
-
function
|
|
229
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
222
|
+
function ot(t) {
|
|
223
|
+
return t.replace(/left|right|bottom|top/g, (e) => Pe[e]);
|
|
230
224
|
}
|
|
231
|
-
function
|
|
225
|
+
function Ve(t) {
|
|
232
226
|
return {
|
|
233
227
|
top: 0,
|
|
234
228
|
right: 0,
|
|
@@ -237,15 +231,15 @@ function Me(t) {
|
|
|
237
231
|
...t
|
|
238
232
|
};
|
|
239
233
|
}
|
|
240
|
-
function
|
|
241
|
-
return typeof t != "number" ?
|
|
234
|
+
function $e(t) {
|
|
235
|
+
return typeof t != "number" ? Ve(t) : {
|
|
242
236
|
top: t,
|
|
243
237
|
right: t,
|
|
244
238
|
bottom: t,
|
|
245
239
|
left: t
|
|
246
240
|
};
|
|
247
241
|
}
|
|
248
|
-
function
|
|
242
|
+
function rt(t) {
|
|
249
243
|
const {
|
|
250
244
|
x: e,
|
|
251
245
|
y: n,
|
|
@@ -311,7 +305,7 @@ function Pt(t, e, n) {
|
|
|
311
305
|
}
|
|
312
306
|
return h;
|
|
313
307
|
}
|
|
314
|
-
const
|
|
308
|
+
const He = async (t, e, n) => {
|
|
315
309
|
const {
|
|
316
310
|
placement: o = "bottom",
|
|
317
311
|
strategy: r = "absolute",
|
|
@@ -388,7 +382,7 @@ async function te(t, e) {
|
|
|
388
382
|
elementContext: u = "floating",
|
|
389
383
|
altBoundary: d = !1,
|
|
390
384
|
padding: h = 0
|
|
391
|
-
} = ct(e, t), p =
|
|
385
|
+
} = ct(e, t), p = $e(h), y = c[d ? u === "floating" ? "reference" : "floating" : u], m = rt(await i.getClippingRect({
|
|
392
386
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
393
387
|
boundary: l,
|
|
394
388
|
rootBoundary: f,
|
|
@@ -404,7 +398,7 @@ async function te(t, e) {
|
|
|
404
398
|
} : {
|
|
405
399
|
x: 1,
|
|
406
400
|
y: 1
|
|
407
|
-
}, v =
|
|
401
|
+
}, v = rt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
408
402
|
elements: c,
|
|
409
403
|
rect: w,
|
|
410
404
|
offsetParent: x,
|
|
@@ -417,7 +411,7 @@ async function te(t, e) {
|
|
|
417
411
|
right: (v.right - m.right + p.right) / b.x
|
|
418
412
|
};
|
|
419
413
|
}
|
|
420
|
-
const
|
|
414
|
+
const ze = function(t) {
|
|
421
415
|
return t === void 0 && (t = {}), {
|
|
422
416
|
name: "flip",
|
|
423
417
|
options: t,
|
|
@@ -441,36 +435,36 @@ const $e = function(t) {
|
|
|
441
435
|
} = ct(t, e);
|
|
442
436
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
443
437
|
return {};
|
|
444
|
-
const m = M(r), w = z(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [
|
|
445
|
-
!d && V && v.push(...
|
|
446
|
-
const le = [c, ...v], ht = await te(e, y),
|
|
447
|
-
let
|
|
448
|
-
if (f &&
|
|
449
|
-
const D =
|
|
450
|
-
|
|
438
|
+
const m = M(r), w = z(c), x = M(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = d || (x || !g ? [ot(c)] : Me(c)), V = p !== "none";
|
|
439
|
+
!d && V && v.push(...Ne(c, g, p, b));
|
|
440
|
+
const le = [c, ...v], ht = await te(e, y), Q = [];
|
|
441
|
+
let _ = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
442
|
+
if (f && Q.push(ht[m]), u) {
|
|
443
|
+
const D = We(r, s, b);
|
|
444
|
+
Q.push(ht[D[0]], ht[D[1]]);
|
|
451
445
|
}
|
|
452
|
-
if (
|
|
446
|
+
if (_ = [..._, {
|
|
453
447
|
placement: r,
|
|
454
|
-
overflows:
|
|
455
|
-
}], !
|
|
456
|
-
var
|
|
457
|
-
const D = (((
|
|
458
|
-
if (
|
|
448
|
+
overflows: Q
|
|
449
|
+
}], !Q.every((D) => D <= 0)) {
|
|
450
|
+
var Et, Ot;
|
|
451
|
+
const D = (((Et = i.flip) == null ? void 0 : Et.index) || 0) + 1, kt = le[D];
|
|
452
|
+
if (kt)
|
|
459
453
|
return {
|
|
460
454
|
data: {
|
|
461
455
|
index: D,
|
|
462
|
-
overflows:
|
|
456
|
+
overflows: _
|
|
463
457
|
},
|
|
464
458
|
reset: {
|
|
465
|
-
placement:
|
|
459
|
+
placement: kt
|
|
466
460
|
}
|
|
467
461
|
};
|
|
468
|
-
let
|
|
469
|
-
if (!
|
|
462
|
+
let I = (Ot = _.filter(($) => $.overflows[0] <= 0).sort(($, S) => $.overflows[1] - S.overflows[1])[0]) == null ? void 0 : Ot.placement;
|
|
463
|
+
if (!I)
|
|
470
464
|
switch (h) {
|
|
471
465
|
case "bestFit": {
|
|
472
466
|
var Lt;
|
|
473
|
-
const $ = (Lt =
|
|
467
|
+
const $ = (Lt = _.filter((S) => {
|
|
474
468
|
if (V) {
|
|
475
469
|
const C = z(S.placement);
|
|
476
470
|
return C === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -479,17 +473,17 @@ const $e = function(t) {
|
|
|
479
473
|
}
|
|
480
474
|
return !0;
|
|
481
475
|
}).map((S) => [S.placement, S.overflows.filter((C) => C > 0).reduce((C, ae) => C + ae, 0)]).sort((S, C) => S[1] - C[1])[0]) == null ? void 0 : Lt[0];
|
|
482
|
-
$ && (
|
|
476
|
+
$ && (I = $);
|
|
483
477
|
break;
|
|
484
478
|
}
|
|
485
479
|
case "initialPlacement":
|
|
486
|
-
|
|
480
|
+
I = c;
|
|
487
481
|
break;
|
|
488
482
|
}
|
|
489
|
-
if (r !==
|
|
483
|
+
if (r !== I)
|
|
490
484
|
return {
|
|
491
485
|
reset: {
|
|
492
|
-
placement:
|
|
486
|
+
placement: I
|
|
493
487
|
}
|
|
494
488
|
};
|
|
495
489
|
}
|
|
@@ -497,7 +491,7 @@ const $e = function(t) {
|
|
|
497
491
|
}
|
|
498
492
|
};
|
|
499
493
|
};
|
|
500
|
-
async function
|
|
494
|
+
async function Be(t, e) {
|
|
501
495
|
const {
|
|
502
496
|
placement: n,
|
|
503
497
|
platform: o,
|
|
@@ -524,7 +518,7 @@ async function He(t, e) {
|
|
|
524
518
|
y: h * f
|
|
525
519
|
};
|
|
526
520
|
}
|
|
527
|
-
const
|
|
521
|
+
const Ue = function(t) {
|
|
528
522
|
return t === void 0 && (t = 0), {
|
|
529
523
|
name: "offset",
|
|
530
524
|
options: t,
|
|
@@ -535,7 +529,7 @@ const ze = function(t) {
|
|
|
535
529
|
y: i,
|
|
536
530
|
placement: s,
|
|
537
531
|
middlewareData: c
|
|
538
|
-
} = e, a = await
|
|
532
|
+
} = e, a = await Be(e, t);
|
|
539
533
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
540
534
|
x: r + a.x,
|
|
541
535
|
y: i + a.y,
|
|
@@ -546,7 +540,7 @@ const ze = function(t) {
|
|
|
546
540
|
};
|
|
547
541
|
}
|
|
548
542
|
};
|
|
549
|
-
},
|
|
543
|
+
}, _e = function(t) {
|
|
550
544
|
return t === void 0 && (t = {}), {
|
|
551
545
|
name: "shift",
|
|
552
546
|
options: t,
|
|
@@ -613,14 +607,14 @@ function A(t) {
|
|
|
613
607
|
var e;
|
|
614
608
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
615
609
|
}
|
|
616
|
-
function
|
|
610
|
+
function k(t) {
|
|
617
611
|
var e;
|
|
618
612
|
return (e = (ee(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
619
613
|
}
|
|
620
614
|
function ee(t) {
|
|
621
615
|
return at() ? t instanceof Node || t instanceof A(t).Node : !1;
|
|
622
616
|
}
|
|
623
|
-
function
|
|
617
|
+
function R(t) {
|
|
624
618
|
return at() ? t instanceof Element || t instanceof A(t).Element : !1;
|
|
625
619
|
}
|
|
626
620
|
function L(t) {
|
|
@@ -629,16 +623,16 @@ function L(t) {
|
|
|
629
623
|
function Dt(t) {
|
|
630
624
|
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
|
|
631
625
|
}
|
|
632
|
-
function
|
|
626
|
+
function G(t) {
|
|
633
627
|
const {
|
|
634
628
|
overflow: e,
|
|
635
629
|
overflowX: n,
|
|
636
630
|
overflowY: o,
|
|
637
631
|
display: r
|
|
638
|
-
} =
|
|
632
|
+
} = E(t);
|
|
639
633
|
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(r);
|
|
640
634
|
}
|
|
641
|
-
function
|
|
635
|
+
function Ie(t) {
|
|
642
636
|
return ["table", "td", "th"].includes(U(t));
|
|
643
637
|
}
|
|
644
638
|
function ut(t) {
|
|
@@ -651,10 +645,10 @@ function ut(t) {
|
|
|
651
645
|
});
|
|
652
646
|
}
|
|
653
647
|
function vt(t) {
|
|
654
|
-
const e = bt(), n =
|
|
648
|
+
const e = bt(), n = R(t) ? E(t) : t;
|
|
655
649
|
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));
|
|
656
650
|
}
|
|
657
|
-
function
|
|
651
|
+
function je(t) {
|
|
658
652
|
let e = P(t);
|
|
659
653
|
for (; L(e) && !B(e); ) {
|
|
660
654
|
if (vt(e))
|
|
@@ -671,11 +665,11 @@ function bt() {
|
|
|
671
665
|
function B(t) {
|
|
672
666
|
return ["html", "body", "#document"].includes(U(t));
|
|
673
667
|
}
|
|
674
|
-
function
|
|
668
|
+
function E(t) {
|
|
675
669
|
return A(t).getComputedStyle(t);
|
|
676
670
|
}
|
|
677
671
|
function ft(t) {
|
|
678
|
-
return
|
|
672
|
+
return R(t) ? {
|
|
679
673
|
scrollLeft: t.scrollLeft,
|
|
680
674
|
scrollTop: t.scrollTop
|
|
681
675
|
} : {
|
|
@@ -691,13 +685,13 @@ function P(t) {
|
|
|
691
685
|
t.assignedSlot || // DOM Element detected.
|
|
692
686
|
t.parentNode || // ShadowRoot detected.
|
|
693
687
|
Dt(t) && t.host || // Fallback.
|
|
694
|
-
|
|
688
|
+
k(t)
|
|
695
689
|
);
|
|
696
690
|
return Dt(e) ? e.host : e;
|
|
697
691
|
}
|
|
698
692
|
function ne(t) {
|
|
699
693
|
const e = P(t);
|
|
700
|
-
return B(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) &&
|
|
694
|
+
return B(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : L(e) && G(e) ? e : ne(e);
|
|
701
695
|
}
|
|
702
696
|
function Y(t, e, n) {
|
|
703
697
|
var o;
|
|
@@ -705,7 +699,7 @@ function Y(t, e, n) {
|
|
|
705
699
|
const r = ne(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(r);
|
|
706
700
|
if (i) {
|
|
707
701
|
const c = gt(s);
|
|
708
|
-
return e.concat(s, s.visualViewport || [],
|
|
702
|
+
return e.concat(s, s.visualViewport || [], G(r) ? r : [], c && n ? Y(c) : []);
|
|
709
703
|
}
|
|
710
704
|
return e.concat(r, Y(r, [], n));
|
|
711
705
|
}
|
|
@@ -713,9 +707,9 @@ function gt(t) {
|
|
|
713
707
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
714
708
|
}
|
|
715
709
|
function oe(t) {
|
|
716
|
-
const e =
|
|
710
|
+
const e = E(t);
|
|
717
711
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
718
|
-
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c =
|
|
712
|
+
const r = L(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, c = nt(n) !== i || nt(o) !== s;
|
|
719
713
|
return c && (n = i, o = s), {
|
|
720
714
|
width: n,
|
|
721
715
|
height: o,
|
|
@@ -723,7 +717,7 @@ function oe(t) {
|
|
|
723
717
|
};
|
|
724
718
|
}
|
|
725
719
|
function At(t) {
|
|
726
|
-
return
|
|
720
|
+
return R(t) ? t : t.contextElement;
|
|
727
721
|
}
|
|
728
722
|
function H(t) {
|
|
729
723
|
const e = At(t);
|
|
@@ -734,68 +728,68 @@ function H(t) {
|
|
|
734
728
|
height: r,
|
|
735
729
|
$: i
|
|
736
730
|
} = oe(e);
|
|
737
|
-
let s = (i ?
|
|
731
|
+
let s = (i ? nt(n.width) : n.width) / o, c = (i ? nt(n.height) : n.height) / r;
|
|
738
732
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
739
733
|
x: s,
|
|
740
734
|
y: c
|
|
741
735
|
};
|
|
742
736
|
}
|
|
743
|
-
const
|
|
737
|
+
const Ye = /* @__PURE__ */ O(0);
|
|
744
738
|
function re(t) {
|
|
745
739
|
const e = A(t);
|
|
746
|
-
return !bt() || !e.visualViewport ?
|
|
740
|
+
return !bt() || !e.visualViewport ? Ye : {
|
|
747
741
|
x: e.visualViewport.offsetLeft,
|
|
748
742
|
y: e.visualViewport.offsetTop
|
|
749
743
|
};
|
|
750
744
|
}
|
|
751
|
-
function
|
|
745
|
+
function qe(t, e, n) {
|
|
752
746
|
return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
|
|
753
747
|
}
|
|
754
|
-
function
|
|
748
|
+
function F(t, e, n, o) {
|
|
755
749
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
756
750
|
const r = t.getBoundingClientRect(), i = At(t);
|
|
757
751
|
let s = O(1);
|
|
758
|
-
e && (o ?
|
|
759
|
-
const c =
|
|
752
|
+
e && (o ? R(o) && (s = H(o)) : s = H(t));
|
|
753
|
+
const c = qe(i, n, o) ? re(i) : O(0);
|
|
760
754
|
let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
761
755
|
if (i) {
|
|
762
|
-
const d = A(i), h = o &&
|
|
756
|
+
const d = A(i), h = o && R(o) ? A(o) : o;
|
|
763
757
|
let p = d, g = gt(p);
|
|
764
758
|
for (; g && o && h !== p; ) {
|
|
765
|
-
const y = H(g), m = g.getBoundingClientRect(), w =
|
|
759
|
+
const y = H(g), m = g.getBoundingClientRect(), w = E(g), x = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, b = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
766
760
|
a *= y.x, l *= y.y, f *= y.x, u *= y.y, a += x, l += b, p = A(g), g = gt(p);
|
|
767
761
|
}
|
|
768
762
|
}
|
|
769
|
-
return
|
|
763
|
+
return rt({
|
|
770
764
|
width: f,
|
|
771
765
|
height: u,
|
|
772
766
|
x: a,
|
|
773
767
|
y: l
|
|
774
768
|
});
|
|
775
769
|
}
|
|
776
|
-
function
|
|
770
|
+
function Rt(t, e) {
|
|
777
771
|
const n = ft(t).scrollLeft;
|
|
778
|
-
return e ? e.left + n :
|
|
772
|
+
return e ? e.left + n : F(k(t)).left + n;
|
|
779
773
|
}
|
|
780
774
|
function ie(t, e, n) {
|
|
781
775
|
n === void 0 && (n = !1);
|
|
782
776
|
const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
|
|
783
777
|
// RTL <body> scrollbar.
|
|
784
|
-
|
|
778
|
+
Rt(t, o)
|
|
785
779
|
)), i = o.top + e.scrollTop;
|
|
786
780
|
return {
|
|
787
781
|
x: r,
|
|
788
782
|
y: i
|
|
789
783
|
};
|
|
790
784
|
}
|
|
791
|
-
function
|
|
785
|
+
function Ke(t) {
|
|
792
786
|
let {
|
|
793
787
|
elements: e,
|
|
794
788
|
rect: n,
|
|
795
789
|
offsetParent: o,
|
|
796
790
|
strategy: r
|
|
797
791
|
} = t;
|
|
798
|
-
const i = r === "fixed", s =
|
|
792
|
+
const i = r === "fixed", s = k(o), c = e ? ut(e.floating) : !1;
|
|
799
793
|
if (o === s || c && i)
|
|
800
794
|
return n;
|
|
801
795
|
let a = {
|
|
@@ -803,8 +797,8 @@ function Ye(t) {
|
|
|
803
797
|
scrollTop: 0
|
|
804
798
|
}, l = O(1);
|
|
805
799
|
const f = O(0), u = L(o);
|
|
806
|
-
if ((u || !u && !i) && ((U(o) !== "body" ||
|
|
807
|
-
const h =
|
|
800
|
+
if ((u || !u && !i) && ((U(o) !== "body" || G(s)) && (a = ft(o)), L(o))) {
|
|
801
|
+
const h = F(o);
|
|
808
802
|
l = H(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
809
803
|
}
|
|
810
804
|
const d = s && !u && !i ? ie(s, a, !0) : O(0);
|
|
@@ -815,22 +809,22 @@ function Ye(t) {
|
|
|
815
809
|
y: n.y * l.y - a.scrollTop * l.y + f.y + d.y
|
|
816
810
|
};
|
|
817
811
|
}
|
|
818
|
-
function
|
|
812
|
+
function Xe(t) {
|
|
819
813
|
return Array.from(t.getClientRects());
|
|
820
814
|
}
|
|
821
|
-
function
|
|
822
|
-
const e =
|
|
823
|
-
let s = -n.scrollLeft +
|
|
815
|
+
function Je(t) {
|
|
816
|
+
const e = k(t), n = ft(t), o = t.ownerDocument.body, r = W(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = W(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
817
|
+
let s = -n.scrollLeft + Rt(t);
|
|
824
818
|
const c = -n.scrollTop;
|
|
825
|
-
return
|
|
819
|
+
return E(o).direction === "rtl" && (s += W(e.clientWidth, o.clientWidth) - r), {
|
|
826
820
|
width: r,
|
|
827
821
|
height: i,
|
|
828
822
|
x: s,
|
|
829
823
|
y: c
|
|
830
824
|
};
|
|
831
825
|
}
|
|
832
|
-
function
|
|
833
|
-
const n = A(t), o =
|
|
826
|
+
function Ge(t, e) {
|
|
827
|
+
const n = A(t), o = k(t), r = n.visualViewport;
|
|
834
828
|
let i = o.clientWidth, s = o.clientHeight, c = 0, a = 0;
|
|
835
829
|
if (r) {
|
|
836
830
|
i = r.width, s = r.height;
|
|
@@ -844,8 +838,8 @@ function Xe(t, e) {
|
|
|
844
838
|
y: a
|
|
845
839
|
};
|
|
846
840
|
}
|
|
847
|
-
function
|
|
848
|
-
const n =
|
|
841
|
+
function Qe(t, e) {
|
|
842
|
+
const n = F(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = L(t) ? H(t) : O(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = o * i.y;
|
|
849
843
|
return {
|
|
850
844
|
width: s,
|
|
851
845
|
height: c,
|
|
@@ -856,11 +850,11 @@ function Je(t, e) {
|
|
|
856
850
|
function Wt(t, e, n) {
|
|
857
851
|
let o;
|
|
858
852
|
if (e === "viewport")
|
|
859
|
-
o =
|
|
853
|
+
o = Ge(t, n);
|
|
860
854
|
else if (e === "document")
|
|
861
|
-
o =
|
|
862
|
-
else if (
|
|
863
|
-
o =
|
|
855
|
+
o = Je(k(t));
|
|
856
|
+
else if (R(e))
|
|
857
|
+
o = Qe(e, n);
|
|
864
858
|
else {
|
|
865
859
|
const r = re(t);
|
|
866
860
|
o = {
|
|
@@ -870,35 +864,35 @@ function Wt(t, e, n) {
|
|
|
870
864
|
height: e.height
|
|
871
865
|
};
|
|
872
866
|
}
|
|
873
|
-
return
|
|
867
|
+
return rt(o);
|
|
874
868
|
}
|
|
875
869
|
function se(t, e) {
|
|
876
870
|
const n = P(t);
|
|
877
|
-
return n === e || !
|
|
871
|
+
return n === e || !R(n) || B(n) ? !1 : E(n).position === "fixed" || se(n, e);
|
|
878
872
|
}
|
|
879
|
-
function
|
|
873
|
+
function Ze(t, e) {
|
|
880
874
|
const n = e.get(t);
|
|
881
875
|
if (n)
|
|
882
876
|
return n;
|
|
883
|
-
let o = Y(t, [], !1).filter((c) =>
|
|
884
|
-
const i =
|
|
877
|
+
let o = Y(t, [], !1).filter((c) => R(c) && U(c) !== "body"), r = null;
|
|
878
|
+
const i = E(t).position === "fixed";
|
|
885
879
|
let s = i ? P(t) : t;
|
|
886
|
-
for (;
|
|
887
|
-
const c =
|
|
888
|
-
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) ||
|
|
880
|
+
for (; R(s) && !B(s); ) {
|
|
881
|
+
const c = E(s), a = vt(s);
|
|
882
|
+
!a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || G(s) && !a && se(t, s)) ? o = o.filter((f) => f !== s) : r = c, s = P(s);
|
|
889
883
|
}
|
|
890
884
|
return e.set(t, o), o;
|
|
891
885
|
}
|
|
892
|
-
function
|
|
886
|
+
function tn(t) {
|
|
893
887
|
let {
|
|
894
888
|
element: e,
|
|
895
889
|
boundary: n,
|
|
896
890
|
rootBoundary: o,
|
|
897
891
|
strategy: r
|
|
898
892
|
} = t;
|
|
899
|
-
const s = [...n === "clippingAncestors" ? ut(e) ? [] :
|
|
893
|
+
const s = [...n === "clippingAncestors" ? ut(e) ? [] : Ze(e, this._c) : [].concat(n), o], c = s[0], a = s.reduce((l, f) => {
|
|
900
894
|
const u = Wt(e, f, r);
|
|
901
|
-
return l.top = W(u.top, l.top), l.right =
|
|
895
|
+
return l.top = W(u.top, l.top), l.right = et(u.right, l.right), l.bottom = et(u.bottom, l.bottom), l.left = W(u.left, l.left), l;
|
|
902
896
|
}, Wt(e, c, r));
|
|
903
897
|
return {
|
|
904
898
|
width: a.right - a.left,
|
|
@@ -907,7 +901,7 @@ function Qe(t) {
|
|
|
907
901
|
y: a.top
|
|
908
902
|
};
|
|
909
903
|
}
|
|
910
|
-
function
|
|
904
|
+
function en(t) {
|
|
911
905
|
const {
|
|
912
906
|
width: e,
|
|
913
907
|
height: n
|
|
@@ -917,18 +911,18 @@ function Ze(t) {
|
|
|
917
911
|
height: n
|
|
918
912
|
};
|
|
919
913
|
}
|
|
920
|
-
function
|
|
921
|
-
const o = L(e), r =
|
|
914
|
+
function nn(t, e, n) {
|
|
915
|
+
const o = L(e), r = k(e), i = n === "fixed", s = F(t, !0, i, e);
|
|
922
916
|
let c = {
|
|
923
917
|
scrollLeft: 0,
|
|
924
918
|
scrollTop: 0
|
|
925
919
|
};
|
|
926
920
|
const a = O(0);
|
|
927
921
|
if (o || !o && !i)
|
|
928
|
-
if ((U(e) !== "body" ||
|
|
929
|
-
const d =
|
|
922
|
+
if ((U(e) !== "body" || G(r)) && (c = ft(e)), o) {
|
|
923
|
+
const d = F(e, !0, i, e);
|
|
930
924
|
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
931
|
-
} else r && (a.x =
|
|
925
|
+
} else r && (a.x = Rt(r));
|
|
932
926
|
const l = r && !o && !i ? ie(r, c) : O(0), f = s.left + c.scrollLeft - a.x - l.x, u = s.top + c.scrollTop - a.y - l.y;
|
|
933
927
|
return {
|
|
934
928
|
x: f,
|
|
@@ -938,15 +932,15 @@ function tn(t, e, n) {
|
|
|
938
932
|
};
|
|
939
933
|
}
|
|
940
934
|
function dt(t) {
|
|
941
|
-
return
|
|
935
|
+
return E(t).position === "static";
|
|
942
936
|
}
|
|
943
|
-
function
|
|
944
|
-
if (!L(t) ||
|
|
937
|
+
function Mt(t, e) {
|
|
938
|
+
if (!L(t) || E(t).position === "fixed")
|
|
945
939
|
return null;
|
|
946
940
|
if (e)
|
|
947
941
|
return e(t);
|
|
948
942
|
let n = t.offsetParent;
|
|
949
|
-
return
|
|
943
|
+
return k(t) === n && (n = n.ownerDocument.body), n;
|
|
950
944
|
}
|
|
951
945
|
function ce(t, e) {
|
|
952
946
|
const n = A(t);
|
|
@@ -955,21 +949,21 @@ function ce(t, e) {
|
|
|
955
949
|
if (!L(t)) {
|
|
956
950
|
let r = P(t);
|
|
957
951
|
for (; r && !B(r); ) {
|
|
958
|
-
if (
|
|
952
|
+
if (R(r) && !dt(r))
|
|
959
953
|
return r;
|
|
960
954
|
r = P(r);
|
|
961
955
|
}
|
|
962
956
|
return n;
|
|
963
957
|
}
|
|
964
|
-
let o =
|
|
965
|
-
for (; o &&
|
|
966
|
-
o =
|
|
967
|
-
return o && B(o) && dt(o) && !vt(o) ? n : o ||
|
|
958
|
+
let o = Mt(t, e);
|
|
959
|
+
for (; o && Ie(o) && dt(o); )
|
|
960
|
+
o = Mt(o, e);
|
|
961
|
+
return o && B(o) && dt(o) && !vt(o) ? n : o || je(t) || n;
|
|
968
962
|
}
|
|
969
|
-
const
|
|
963
|
+
const on = async function(t) {
|
|
970
964
|
const e = this.getOffsetParent || ce, n = this.getDimensions, o = await n(t.floating);
|
|
971
965
|
return {
|
|
972
|
-
reference:
|
|
966
|
+
reference: nn(t.reference, await e(t.floating), t.strategy),
|
|
973
967
|
floating: {
|
|
974
968
|
x: 0,
|
|
975
969
|
y: 0,
|
|
@@ -978,24 +972,24 @@ const en = async function(t) {
|
|
|
978
972
|
}
|
|
979
973
|
};
|
|
980
974
|
};
|
|
981
|
-
function
|
|
982
|
-
return
|
|
975
|
+
function rn(t) {
|
|
976
|
+
return E(t).direction === "rtl";
|
|
983
977
|
}
|
|
984
|
-
const
|
|
985
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
986
|
-
getDocumentElement:
|
|
987
|
-
getClippingRect:
|
|
978
|
+
const sn = {
|
|
979
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ke,
|
|
980
|
+
getDocumentElement: k,
|
|
981
|
+
getClippingRect: tn,
|
|
988
982
|
getOffsetParent: ce,
|
|
989
|
-
getElementRects:
|
|
990
|
-
getClientRects:
|
|
991
|
-
getDimensions:
|
|
983
|
+
getElementRects: on,
|
|
984
|
+
getClientRects: Xe,
|
|
985
|
+
getDimensions: en,
|
|
992
986
|
getScale: H,
|
|
993
|
-
isElement:
|
|
994
|
-
isRTL:
|
|
987
|
+
isElement: R,
|
|
988
|
+
isRTL: rn
|
|
995
989
|
};
|
|
996
|
-
function
|
|
990
|
+
function cn(t, e) {
|
|
997
991
|
let n = null, o;
|
|
998
|
-
const r =
|
|
992
|
+
const r = k(t);
|
|
999
993
|
function i() {
|
|
1000
994
|
var c;
|
|
1001
995
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -1010,9 +1004,9 @@ function rn(t, e) {
|
|
|
1010
1004
|
} = t.getBoundingClientRect();
|
|
1011
1005
|
if (c || e(), !u || !d)
|
|
1012
1006
|
return;
|
|
1013
|
-
const h =
|
|
1007
|
+
const h = Z(f), p = Z(r.clientWidth - (l + u)), g = Z(r.clientHeight - (f + d)), y = Z(l), w = {
|
|
1014
1008
|
rootMargin: -h + "px " + -p + "px " + -g + "px " + -y + "px",
|
|
1015
|
-
threshold: W(0,
|
|
1009
|
+
threshold: W(0, et(1, a)) || 1
|
|
1016
1010
|
};
|
|
1017
1011
|
let x = !0;
|
|
1018
1012
|
function b(v) {
|
|
@@ -1039,7 +1033,7 @@ function rn(t, e) {
|
|
|
1039
1033
|
}
|
|
1040
1034
|
return s(!0), i;
|
|
1041
1035
|
}
|
|
1042
|
-
function
|
|
1036
|
+
function ln(t, e, n, o) {
|
|
1043
1037
|
o === void 0 && (o = {});
|
|
1044
1038
|
const {
|
|
1045
1039
|
ancestorScroll: r = !0,
|
|
@@ -1053,7 +1047,7 @@ function sn(t, e, n, o) {
|
|
|
1053
1047
|
passive: !0
|
|
1054
1048
|
}), i && m.addEventListener("resize", n);
|
|
1055
1049
|
});
|
|
1056
|
-
const u = l && c ?
|
|
1050
|
+
const u = l && c ? cn(l, n) : null;
|
|
1057
1051
|
let d = -1, h = null;
|
|
1058
1052
|
s && (h = new ResizeObserver((m) => {
|
|
1059
1053
|
let [w] = m;
|
|
@@ -1062,10 +1056,10 @@ function sn(t, e, n, o) {
|
|
|
1062
1056
|
(x = h) == null || x.observe(e);
|
|
1063
1057
|
})), n();
|
|
1064
1058
|
}), l && !a && h.observe(l), h.observe(e));
|
|
1065
|
-
let p, g = a ?
|
|
1059
|
+
let p, g = a ? F(t) : null;
|
|
1066
1060
|
a && y();
|
|
1067
1061
|
function y() {
|
|
1068
|
-
const m =
|
|
1062
|
+
const m = F(t);
|
|
1069
1063
|
g && (m.x !== g.x || m.y !== g.y || m.width !== g.width || m.height !== g.height) && n(), g = m, p = requestAnimationFrame(y);
|
|
1070
1064
|
}
|
|
1071
1065
|
return n(), () => {
|
|
@@ -1075,46 +1069,45 @@ function sn(t, e, n, o) {
|
|
|
1075
1069
|
}), u == null || u(), (m = h) == null || m.disconnect(), h = null, a && cancelAnimationFrame(p);
|
|
1076
1070
|
};
|
|
1077
1071
|
}
|
|
1078
|
-
const
|
|
1072
|
+
const an = Ue, un = _e, Ft = ze, fn = (t, e, n) => {
|
|
1079
1073
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1080
|
-
platform:
|
|
1074
|
+
platform: sn,
|
|
1081
1075
|
...n
|
|
1082
1076
|
}, i = {
|
|
1083
1077
|
...r.platform,
|
|
1084
1078
|
_c: o
|
|
1085
1079
|
};
|
|
1086
|
-
return
|
|
1080
|
+
return He(t, e, {
|
|
1087
1081
|
...r,
|
|
1088
1082
|
platform: i
|
|
1089
1083
|
});
|
|
1090
|
-
},
|
|
1084
|
+
}, Nn = ({
|
|
1091
1085
|
content: t,
|
|
1092
1086
|
open: e,
|
|
1093
1087
|
placement: n,
|
|
1094
1088
|
offset: { mainAxis: o, crossAxis: r } = { mainAxis: 0, crossAxis: 0 }
|
|
1095
1089
|
}) => wt((i) => {
|
|
1096
|
-
const s =
|
|
1090
|
+
const s = X.toSignal(e), c = i.element;
|
|
1097
1091
|
return qt(
|
|
1098
1092
|
s,
|
|
1099
1093
|
() => Yt(
|
|
1100
1094
|
"body",
|
|
1101
1095
|
Ut.div(
|
|
1102
|
-
|
|
1096
|
+
J((a) => {
|
|
1103
1097
|
const l = a;
|
|
1104
|
-
return l.style.position = "absolute",
|
|
1105
|
-
|
|
1106
|
-
|
|
1098
|
+
return l.style.position = "absolute", T(
|
|
1099
|
+
ln(c, l, async () => {
|
|
1100
|
+
const { x: f, y: u } = await fn(c, l, {
|
|
1107
1101
|
placement: n,
|
|
1108
1102
|
strategy: "absolute",
|
|
1109
1103
|
middleware: [
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1104
|
+
Ft(),
|
|
1105
|
+
an({ mainAxis: o, crossAxis: r }),
|
|
1106
|
+
un(),
|
|
1107
|
+
Ft()
|
|
1114
1108
|
]
|
|
1115
|
-
}).then(({ x: f, y: u }) => {
|
|
1116
|
-
l.style.top = `${u}px`, l.style.left = `${f}px`;
|
|
1117
1109
|
});
|
|
1110
|
+
l.style.top = `${u}px`, l.style.left = `${f}px`;
|
|
1118
1111
|
})
|
|
1119
1112
|
);
|
|
1120
1113
|
}),
|
|
@@ -1122,36 +1115,36 @@ const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
|
1122
1115
|
)
|
|
1123
1116
|
)
|
|
1124
1117
|
);
|
|
1125
|
-
}),
|
|
1118
|
+
}), hn = (t, e) => {
|
|
1126
1119
|
if (typeof e == "function")
|
|
1127
|
-
return
|
|
1120
|
+
return hn(t, { success: e });
|
|
1128
1121
|
const n = e.failure ?? ((r) => K(
|
|
1129
|
-
|
|
1122
|
+
T(r.on(console.error)),
|
|
1130
1123
|
r.map((i) => `Error: ${i}`)
|
|
1131
1124
|
)), o = e.success;
|
|
1132
|
-
return jt(
|
|
1125
|
+
return jt(X.toSignal(t), {
|
|
1133
1126
|
Success: (r) => o(r.$.value),
|
|
1134
1127
|
Failure: (r) => n(r.$.error)
|
|
1135
1128
|
});
|
|
1136
|
-
},
|
|
1129
|
+
}, Vn = () => _t.focus((t) => {
|
|
1137
1130
|
var e;
|
|
1138
1131
|
return (e = t.target) == null ? void 0 : e.select();
|
|
1139
|
-
}),
|
|
1140
|
-
const { element: n } = e, o =
|
|
1132
|
+
}), $n = (t) => wt((e) => {
|
|
1133
|
+
const { element: n } = e, o = N({
|
|
1141
1134
|
width: n.clientWidth,
|
|
1142
1135
|
height: n.clientHeight
|
|
1143
|
-
}), r =
|
|
1136
|
+
}), r = st(t(o))(e), i = () => {
|
|
1144
1137
|
o.set({ width: n.clientWidth, height: n.clientHeight });
|
|
1145
1138
|
};
|
|
1146
1139
|
let s;
|
|
1147
|
-
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)),
|
|
1140
|
+
return typeof ResizeObserver == "function" && (s = new ResizeObserver(i), s.observe(n)), T((c) => {
|
|
1148
1141
|
s == null || s.disconnect(), r(c);
|
|
1149
1142
|
});
|
|
1150
|
-
}),
|
|
1151
|
-
const n = xt(), o =
|
|
1143
|
+
}), Hn = (t) => (e) => {
|
|
1144
|
+
const n = xt(), o = N({
|
|
1152
1145
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1153
1146
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
1154
|
-
}), r =
|
|
1147
|
+
}), r = st(t(o))(e), i = () => {
|
|
1155
1148
|
o.set({
|
|
1156
1149
|
width: (n == null ? void 0 : n.innerWidth) ?? 0,
|
|
1157
1150
|
height: (n == null ? void 0 : n.innerHeight) ?? 0
|
|
@@ -1160,7 +1153,7 @@ const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
|
1160
1153
|
return n == null || n.addEventListener("resize", i), (s) => {
|
|
1161
1154
|
n == null || n.removeEventListener("resize", i), r(s);
|
|
1162
1155
|
};
|
|
1163
|
-
},
|
|
1156
|
+
}, dn = (t, e) => {
|
|
1164
1157
|
const n = e.split("/").filter((r) => r !== ""), o = {};
|
|
1165
1158
|
for (let r = 0; r < t.length; r++) {
|
|
1166
1159
|
const i = t[r], s = n[r];
|
|
@@ -1175,21 +1168,21 @@ const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
|
1175
1168
|
return { params: o, path: e };
|
|
1176
1169
|
}
|
|
1177
1170
|
return n.length !== t.length ? null : { params: o, path: e };
|
|
1178
|
-
},
|
|
1171
|
+
}, mn = (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 !== ""), pn = (t) => {
|
|
1179
1172
|
const e = t.map((n) => {
|
|
1180
|
-
const o =
|
|
1173
|
+
const o = mn(n);
|
|
1181
1174
|
return { route: n, segments: o };
|
|
1182
1175
|
});
|
|
1183
1176
|
return function(o) {
|
|
1184
1177
|
for (const { segments: r, route: i } of e) {
|
|
1185
|
-
const s =
|
|
1178
|
+
const s = dn(r, o);
|
|
1186
1179
|
if (s)
|
|
1187
1180
|
return { ...s, route: i };
|
|
1188
1181
|
}
|
|
1189
1182
|
return null;
|
|
1190
1183
|
};
|
|
1191
|
-
},
|
|
1192
|
-
const e =
|
|
1184
|
+
}, zn = (t) => {
|
|
1185
|
+
const e = pn(Object.keys(t));
|
|
1193
1186
|
return Xt((n) => {
|
|
1194
1187
|
const o = n.map((r) => {
|
|
1195
1188
|
const i = e(r.pathname);
|
|
@@ -1209,10 +1202,10 @@ const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
|
1209
1202
|
t
|
|
1210
1203
|
);
|
|
1211
1204
|
});
|
|
1212
|
-
},
|
|
1205
|
+
}, it = 60 * 1e3, yt = 60 * it, q = 24 * yt, Nt = 7 * q, Vt = 30 * q, gn = 365 * q, yn = [
|
|
1213
1206
|
{
|
|
1214
|
-
max:
|
|
1215
|
-
value:
|
|
1207
|
+
max: it * 90,
|
|
1208
|
+
value: it,
|
|
1216
1209
|
name: "minute",
|
|
1217
1210
|
past: { singular: "a minute ago", plural: "{} minutes ago" },
|
|
1218
1211
|
future: { singular: "in a minute", plural: "in {} minutes" }
|
|
@@ -1247,7 +1240,7 @@ const cn = ze, ln = Be, Mt = $e, an = (t, e, n) => {
|
|
|
1247
1240
|
},
|
|
1248
1241
|
{
|
|
1249
1242
|
max: 1 / 0,
|
|
1250
|
-
value:
|
|
1243
|
+
value: gn,
|
|
1251
1244
|
name: "year",
|
|
1252
1245
|
past: { singular: "last year", plural: "{} years ago" },
|
|
1253
1246
|
future: { singular: "in a year", plural: "in {} years" }
|
|
@@ -1263,67 +1256,74 @@ function $t(t, e, n, o) {
|
|
|
1263
1256
|
})
|
|
1264
1257
|
);
|
|
1265
1258
|
}
|
|
1266
|
-
|
|
1259
|
+
const wn = (t = 1e3) => {
|
|
1260
|
+
const e = N(/* @__PURE__ */ new Date()), n = we(() => e.set(/* @__PURE__ */ new Date()), t);
|
|
1261
|
+
return e.onDispose(n), e;
|
|
1262
|
+
}, xn = (t) => {
|
|
1267
1263
|
const e = Math.abs(t);
|
|
1268
|
-
if (e <
|
|
1264
|
+
if (e < it)
|
|
1269
1265
|
return t < 0 ? "just now" : "in a moment";
|
|
1270
|
-
for (const n of
|
|
1266
|
+
for (const n of yn)
|
|
1271
1267
|
if (e < n.max)
|
|
1272
1268
|
return t < 0 ? $t(e, n.value, n.past.singular, n.past.plural) : $t(e, n.value, n.future.singular, n.future.plural);
|
|
1273
1269
|
throw new Error("unreachable");
|
|
1274
|
-
}
|
|
1275
|
-
const
|
|
1276
|
-
const n = e != null ? Bt.is(e) ? e.derive() : F(e) : F(/* @__PURE__ */ new Date()), o = ge(
|
|
1270
|
+
}, vn = (t, { now: e, frequency: n = 1e4 } = {}) => {
|
|
1271
|
+
const o = e != null ? Bt.is(e) ? e.derive() : N(e) : wn(n), r = ge(
|
|
1277
1272
|
t,
|
|
1278
|
-
|
|
1279
|
-
)((i, s) =>
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
return o.onDispose(
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
};
|
|
1287
|
-
class yn extends Kt {
|
|
1273
|
+
o
|
|
1274
|
+
)((i, s) => i.getTime() - s.getTime());
|
|
1275
|
+
return r.onDispose(() => X.dispose(o)), r;
|
|
1276
|
+
}, bn = (t, e = {}) => {
|
|
1277
|
+
const n = vn(t, e), o = n.map(xn);
|
|
1278
|
+
return o.onDispose(n.dispose), o;
|
|
1279
|
+
}, Bn = (t, e = {}) => bn(t, e);
|
|
1280
|
+
class An extends ye {
|
|
1288
1281
|
constructor() {
|
|
1289
1282
|
super(...arguments);
|
|
1290
|
-
|
|
1283
|
+
/**
|
|
1284
|
+
* Triggers an update of the Ticker by incrementing its internal value.
|
|
1285
|
+
* @returns void
|
|
1286
|
+
*/
|
|
1287
|
+
Tt(this, "tick", () => this.update((n) => n + 1));
|
|
1291
1288
|
}
|
|
1292
1289
|
}
|
|
1293
|
-
const
|
|
1290
|
+
const Un = (t = 0) => new An(t, (e, n) => e === n);
|
|
1294
1291
|
export {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1292
|
+
Le as Anchor,
|
|
1293
|
+
ke as AsyncResultView,
|
|
1294
|
+
Pn as AutoFocus,
|
|
1295
|
+
Dn as AutoSelect,
|
|
1296
|
+
$n as ElementSize,
|
|
1297
|
+
Mn as HTMLTitle,
|
|
1298
|
+
Wn as HiddenWhenEmpty,
|
|
1299
|
+
Ce as InViewport,
|
|
1300
|
+
Re as LocationProviderMarker,
|
|
1301
|
+
Nn as PopOver,
|
|
1302
|
+
Sn as ProvideAppearance,
|
|
1303
|
+
Ln as ProvideLocation,
|
|
1304
|
+
hn as ResultView,
|
|
1305
|
+
zn as Router,
|
|
1306
|
+
Vn as SelectOnFocus,
|
|
1307
|
+
An as Ticker,
|
|
1308
|
+
Cn as UseAppearance,
|
|
1312
1309
|
Xt as UseLocation,
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1310
|
+
Fn as WhenInViewport,
|
|
1311
|
+
Hn as WindowSize,
|
|
1312
|
+
ve as _checkExtensionCondition,
|
|
1313
|
+
xe as _getExtension,
|
|
1314
|
+
pn as _makeRouteMatcher,
|
|
1315
|
+
mn as _parseRouteSegments,
|
|
1319
1316
|
Jt as appearanceMarker,
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1317
|
+
kn as areLocationsEqual,
|
|
1318
|
+
Ae as handleAnchorClick,
|
|
1319
|
+
Ee as locationFromURL,
|
|
1320
|
+
wn as makeNowSignal,
|
|
1321
|
+
Bn as makeRelativeTime,
|
|
1322
|
+
vn as makeRelativeTimeMillisSignal,
|
|
1323
|
+
bn as makeRelativeTimeSignal,
|
|
1324
|
+
Un as makeTicker,
|
|
1325
|
+
dn as matchesRoute,
|
|
1326
|
+
Oe as setLocationFromUrl,
|
|
1327
|
+
xn as timeDiffToString,
|
|
1328
|
+
Tn as urlFromLocation
|
|
1329
1329
|
};
|