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