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