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