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