@tempots/ui 8.0.2 → 10.0.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.js CHANGED
@@ -1,33 +1,33 @@
1
- var Ee = Object.defineProperty;
2
- var Pe = (t, e, o) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var At = (t, e, o) => Pe(t, typeof e != "symbol" ? e + "" : e, o);
4
- import { getWindow as at, prop as W, makeProviderMark as Wt, Signal as ne, Use as it, html as Lt, on as oe, Value as L, attr as Ft, Empty as Et, OneOfType as se, WithElement as H, OnDispose as F, Fragment as K, Portal as ie, renderableOfTNode as Mt, When as re, effectOf as Te, computedOf as ce, WithBrowserCtx as ke, Provide as Se, OneOfTuple as ae, Prop as Ce } from "@tempots/dom";
5
- import { delayed as le, AsyncResult as R, nearEqual as ht, interval as De } from "@tempots/std";
6
- const We = (t) => {
1
+ var Ce = Object.defineProperty;
2
+ var De = (t, e, o) => e in t ? Ce(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var Lt = (t, e, o) => De(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { getWindow as nt, prop as M, makeProviderMark as Nt, Signal as ie, Use as ct, html as Pt, on as ce, Value as k, attr as Vt, Empty as St, OneOfType as ae, WithElement as _, OnDispose as N, Fragment as j, Portal as le, renderableOfTNode as Ht, When as ue, previousSignal as We, effectOf as Fe, computedOf as fe, WithBrowserCtx as Me, Provide as Ne, OneOfTuple as he, Prop as Ve } from "@tempots/dom";
5
+ import { delayed as de, AsyncResult as L, nearEqual as dt, interval as He } from "@tempots/std";
6
+ const $e = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
9
  const o = e.split(".") || [];
10
10
  return o.length > 1 ? "." + o.pop() : void 0;
11
- }, Fe = (t, e) => {
12
- const o = We(e);
11
+ }, ze = (t, e) => {
12
+ const o = $e(e);
13
13
  return o != null && (t.length === 0 || !t.some((n) => o == n));
14
- }, Me = (t, e, o, n) => {
15
- let s = t.target;
16
- for (; s != null && !(s instanceof HTMLAnchorElement); )
17
- s = s.parentElement;
18
- if (s == null)
14
+ }, Be = (t, e, o, n) => {
15
+ let r = t.target;
16
+ for (; r != null && !(r instanceof HTMLAnchorElement); )
17
+ r = r.parentElement;
18
+ if (r == null)
19
19
  return !0;
20
- const r = s;
21
- if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
20
+ const i = r;
21
+ if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
22
22
  return !0;
23
- const { pathname: i, search: c, hash: a } = r;
23
+ const { pathname: s, search: c, hash: a } = i;
24
24
  if (n) {
25
- const l = i + c + a, f = r.getAttribute("href");
26
- if (!(f != null && f.startsWith("#")) && f !== l)
25
+ const l = s + c + a, u = i.getAttribute("href");
26
+ if (!(u != null && u.startsWith("#")) && u !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Fe(o, i);
30
- }, Ne = (t, e = {
29
+ return e ? !1 : ze(o, s);
30
+ }, _e = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,140 +36,313 @@ const We = (t) => {
36
36
  (n) => n.startsWith(".") ? n : "." + n
37
37
  ) : [];
38
38
  return (n) => {
39
- Me(
39
+ Be(
40
40
  n,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  o,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && n.preventDefault();
45
45
  };
46
- }, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, ue = (t, e) => {
47
- var r, i;
48
- const o = new URL(t, e ?? ((r = at()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(((i = o.searchParams) == null ? void 0 : i.entries()) ?? []);
49
- let s = o.hash;
50
- return s.startsWith("#") && (s = s.substring(1)), {
46
+ }, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Tt = (t, e) => {
47
+ var i, s;
48
+ const o = new URL(t, e ?? ((i = nt()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((s = o.searchParams) == null ? void 0 : s.entries()) ?? []);
49
+ let r = o.hash;
50
+ return r.startsWith("#") && (r = r.substring(1)), {
51
51
  pathname: o.pathname,
52
52
  search: n,
53
- hash: s === "" ? void 0 : s
53
+ hash: r === "" ? void 0 : r
54
54
  };
55
- }, jt = (t, e) => {
56
- const o = ue(e);
57
- return t.set(o), t;
58
- }, Pt = (t) => {
55
+ }, pt = (t) => {
59
56
  const o = new URLSearchParams(t.search).toString(), n = t.hash;
60
57
  return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
61
- }, $e = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Be = (t) => {
62
- const e = t.container.currentURL, o = e.iso(
63
- (n) => ue(n),
64
- (n) => {
65
- if ($e(n.pathname))
66
- return Pt(n);
67
- const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
68
- return Pt({ ...n, pathname: r });
69
- }
70
- );
71
- return { value: o, dispose: o.dispose };
72
- }, He = () => {
73
- const t = at(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
58
+ }, Ue = (t) => {
59
+ document.startViewTransition ? document.startViewTransition(t) : t();
60
+ }, It = () => {
61
+ const t = nt(), e = (t == null ? void 0 : t.location.hash) ?? "";
74
62
  return {
75
63
  pathname: (t == null ? void 0 : t.location.pathname) ?? "",
76
64
  search: Object.fromEntries(
77
65
  new URLSearchParams((t == null ? void 0 : t.location.search) ?? "").entries()
78
66
  ),
79
- hash: e
67
+ hash: e.startsWith("#") ? e.substring(1) || void 0 : e === "" ? void 0 : e
80
68
  };
81
- }, Ue = () => {
82
- const t = W(He(), Ve), e = at(), o = () => {
83
- let n = (e == null ? void 0 : e.location.hash) ?? "";
84
- n.startsWith("#") && (n = n.substring(1));
85
- const s = {
86
- pathname: (e == null ? void 0 : e.location.pathname) ?? "",
87
- search: Object.fromEntries(
88
- new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
89
- ),
90
- hash: n === "" ? void 0 : n
91
- };
92
- t.set(s);
69
+ }, Yt = (t) => {
70
+ if ((t == null ? void 0 : t.scroll) !== "auto")
71
+ return;
72
+ const e = nt();
73
+ e && e.requestAnimationFrame(
74
+ () => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
75
+ );
76
+ }, qt = (t, e) => {
77
+ e != null && e.viewTransition ? Ue(t) : t();
78
+ }, je = () => {
79
+ const t = M(It(), Ke), e = nt(), o = () => {
80
+ t.set(It());
93
81
  };
94
- return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
95
- e == null || e.removeEventListener("popstate", o);
96
- }), t.on((n) => {
97
- e == null || e.history.pushState({}, "", Pt(n));
98
- }), {
99
- value: t,
100
- dispose: t.dispose
82
+ e == null || e.addEventListener("popstate", o), e == null || e.addEventListener("hashchange", o);
83
+ const n = (a, l, u) => {
84
+ qt(() => {
85
+ if (e) {
86
+ const h = pt(a), p = (l == null ? void 0 : l.state) ?? {};
87
+ u === "replaceState" || l != null && l.replace ? e.history.replaceState(p, "", h) : e.history.pushState(p, "", h);
88
+ }
89
+ t.set(a);
90
+ }, l), Yt(l);
91
+ }, r = (a, l) => {
92
+ qt(() => {
93
+ e == null || e.history.go(a);
94
+ }, l), Yt(l);
95
+ };
96
+ return {
97
+ location: t,
98
+ commit: n,
99
+ go: r,
100
+ back: (a) => r(-1, a),
101
+ forward: (a) => r(1, a),
102
+ resolve: (a) => Tt(a),
103
+ dispose: () => {
104
+ e == null || e.removeEventListener("popstate", o), e == null || e.removeEventListener("hashchange", o), t.dispose();
105
+ }
101
106
  };
102
- }, Nt = {
103
- mark: Wt("Location"),
107
+ }, Ie = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ye = (t) => {
108
+ const e = t.container.currentURL, o = e.iso(
109
+ (s) => Tt(s, e.value),
110
+ (s) => {
111
+ if (Ie(s.pathname))
112
+ return pt(s);
113
+ const c = new URL(s.pathname, e.value), a = c.origin + c.pathname;
114
+ return pt({ ...s, pathname: a });
115
+ }
116
+ );
117
+ return {
118
+ location: o,
119
+ dispose: () => {
120
+ o.dispose();
121
+ },
122
+ commit: (s, c, a) => {
123
+ o.set(s);
124
+ },
125
+ go: (s, c) => {
126
+ },
127
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
128
+ back: (s) => {
129
+ },
130
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
131
+ forward: (s) => {
132
+ },
133
+ resolve: (s) => Tt(s, e.value)
134
+ };
135
+ }, rt = (t) => ({
136
+ pathname: t.pathname,
137
+ search: { ...t.search },
138
+ hash: t.hash ?? void 0
139
+ }), kt = (t) => {
140
+ if (t == null) return;
141
+ const e = `${t}`;
142
+ return e === "" ? void 0 : e;
143
+ }, me = (t, e) => {
144
+ const o = { ...t };
145
+ for (const [n, r] of Object.entries(e))
146
+ r == null ? delete o[n] : o[n] = r;
147
+ return o;
148
+ };
149
+ class qe {
150
+ constructor(e) {
151
+ this.current = e;
152
+ }
153
+ get location() {
154
+ return this.current;
155
+ }
156
+ setLocation(e) {
157
+ return this.current = rt(e), this;
158
+ }
159
+ setPathname(e) {
160
+ return this.current = {
161
+ ...this.current,
162
+ pathname: e
163
+ }, this;
164
+ }
165
+ setHash(e) {
166
+ const o = kt(e);
167
+ if (o == null) {
168
+ const { hash: n, ...r } = this.current;
169
+ this.current = r;
170
+ } else
171
+ this.current = {
172
+ ...this.current,
173
+ hash: o
174
+ };
175
+ return this;
176
+ }
177
+ clearHash() {
178
+ const { hash: e, ...o } = this.current;
179
+ return this.current = o, this;
180
+ }
181
+ setSearch(e) {
182
+ return this.current = {
183
+ ...this.current,
184
+ search: me(this.current.search, e)
185
+ }, this;
186
+ }
187
+ setSearchParam(e, o) {
188
+ return this.setSearch({ [e]: o });
189
+ }
190
+ updateSearch(e) {
191
+ return this.current = {
192
+ ...this.current,
193
+ search: { ...e({ ...this.current.search }) }
194
+ }, this;
195
+ }
196
+ }
197
+ const Xe = (t, e) => t != null && t.replace ? "replaceState" : e, Qe = (t) => {
198
+ const e = t.location, o = e.map(pt), n = e.map((m) => m.pathname), r = e.map((m) => ({ ...m.search })), i = e.map((m) => m.hash), s = (m, b, A) => {
199
+ const E = rt({
200
+ ...m,
201
+ hash: kt(m.hash ?? void 0)
202
+ });
203
+ t.commit(E, b, A);
204
+ }, c = (m, b) => {
205
+ const A = Xe(b, "pushState");
206
+ s(m, b, A);
207
+ }, a = (m, b) => {
208
+ const A = m(rt(t.location.value));
209
+ c(A, b);
210
+ }, l = (m, b) => {
211
+ const A = t.resolve(m);
212
+ c(A, b);
213
+ }, u = (m, b) => {
214
+ const A = { ...b, replace: !0 };
215
+ l(m, A);
216
+ }, h = (m, b) => {
217
+ t.go(m, b);
218
+ }, p = (m) => {
219
+ t.back(m);
220
+ }, f = (m) => {
221
+ t.forward(m);
222
+ }, d = (m, b) => a((A) => ({ ...A, pathname: m }), b), w = (m, b) => a((A) => {
223
+ const E = { ...A }, V = kt(m);
224
+ return V == null ? delete E.hash : E.hash = V, E;
225
+ }, b), g = (m) => w(void 0, m), y = (m, b) => a(
226
+ (A) => ({
227
+ ...A,
228
+ search: me(A.search, m)
229
+ }),
230
+ b
231
+ );
232
+ return {
233
+ handle: {
234
+ location: e,
235
+ url: o,
236
+ pathname: n,
237
+ search: r,
238
+ hash: i,
239
+ setLocation: c,
240
+ updateLocation: a,
241
+ navigate: l,
242
+ replace: u,
243
+ go: h,
244
+ back: p,
245
+ forward: f,
246
+ setPathname: d,
247
+ setHash: w,
248
+ clearHash: g,
249
+ setSearch: y,
250
+ setSearchParam: (m, b, A) => y({ [m]: b }, A),
251
+ updateSearch: (m, b) => a(
252
+ (A) => ({
253
+ ...A,
254
+ search: { ...m({ ...A.search }) }
255
+ }),
256
+ b
257
+ ),
258
+ queryParam: (m) => e.map((b) => b.search[m]),
259
+ run: (m, b) => {
260
+ const A = new qe(
261
+ rt(t.location.value)
262
+ );
263
+ m(A), c(rt(A.location), b);
264
+ }
265
+ },
266
+ dispose: () => {
267
+ t.dispose(), o.dispose(), n.dispose(), r.dispose(), i.dispose();
268
+ }
269
+ };
270
+ }, Je = (t) => {
271
+ if (t.isBrowser())
272
+ return je();
273
+ if (t.isHeadless())
274
+ return Ye(t);
275
+ throw new Error("Unknown context");
276
+ }, $t = {
277
+ mark: Nt("Location"),
104
278
  create: (t, e) => {
105
- if (e.isBrowser())
106
- return Ue();
107
- if (e.isHeadless())
108
- return Be(e);
109
- throw new Error("Unknown context");
279
+ const o = Je(e), { handle: n, dispose: r } = Qe(o);
280
+ return {
281
+ value: n,
282
+ dispose: r
283
+ };
110
284
  }
111
- }, ze = (t) => {
112
- document.startViewTransition ? document.startViewTransition(t) : t();
113
- }, Ke = (t, ...e) => {
114
- if (typeof t == "string" || ne.is(t))
115
- return Ke({ href: t }, ...e);
116
- const {
117
- href: o,
118
- withViewTransition: n,
119
- ...s
120
- } = t;
121
- return it(Nt, (r) => Lt.a(
122
- oe.click(
123
- Ne(() => (n === !0 ? ze(() => {
124
- jt(r, L.get(o));
125
- }) : jt(r, L.get(o)), !0), s)
285
+ }, Ge = (t, ...e) => {
286
+ if (typeof t == "string" || ie.is(t))
287
+ return Ge({ href: t }, ...e);
288
+ const { href: o, state: n, scroll: r, viewTransition: i, replace: s, ...c } = t;
289
+ return ct($t, (a) => Pt.a(
290
+ ce.click(
291
+ _e(() => {
292
+ let l = !1;
293
+ const u = {};
294
+ return n !== void 0 && (u.state = n, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), s !== void 0 && (u.replace = s, l = !0), a.navigate(
295
+ k.get(o),
296
+ l ? u : void 0
297
+ ), !0;
298
+ }, c)
126
299
  ),
127
- Ft.href(o),
300
+ Vt.href(o),
128
301
  ...e
129
302
  /* c8 ignore next 2 */
130
303
  ));
131
- }, qn = {
132
- mark: Wt("Appearance"),
304
+ }, so = {
305
+ mark: Nt("Appearance"),
133
306
  create: () => {
134
- const t = je();
307
+ const t = Ze();
135
308
  return {
136
309
  value: t,
137
310
  dispose: t.dispose
138
311
  };
139
312
  }
140
313
  };
141
- function je() {
142
- const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = W(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
143
- return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
314
+ function Ze() {
315
+ const t = nt(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = M(o ? "dark" : "light"), r = (i) => n.set(i.matches ? "dark" : "light");
316
+ return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
144
317
  }
145
- const Vt = (t, e) => {
318
+ const ge = (t, e) => {
146
319
  if (typeof e == "function")
147
- return Vt(t, { success: e });
148
- const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Et), r = e.notAsked ?? (() => Et);
149
- return se(L.toSignal(t), {
150
- AsyncSuccess: (i) => n(i.$.value),
151
- AsyncFailure: (i) => o(i.$.error),
152
- Loading: (i) => s(i.map((c) => c.previousValue)),
153
- NotAsked: r
320
+ return ge(t, { success: e });
321
+ const o = e.failure ?? ((s) => s.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => St), i = e.notAsked ?? (() => St);
322
+ return ae(k.toSignal(t), {
323
+ AsyncSuccess: (s) => n(s.$.value),
324
+ AsyncFailure: (s) => o(s.$.error),
325
+ Loading: (s) => r(s.map((c) => c.previousValue)),
326
+ NotAsked: i
154
327
  });
155
- }, Qn = (t = 10) => H((e) => F(le(() => e == null ? void 0 : e.focus(), t))), Jn = (t = 10) => H((e) => {
156
- const o = le(() => e.select(), t);
157
- return F(o);
328
+ }, ro = (t = 10) => _((e) => N(de(() => e == null ? void 0 : e.focus(), t))), io = (t = 10) => _((e) => {
329
+ const o = de(() => e.select(), t);
330
+ return N(o);
158
331
  });
159
- function Gn(t) {
332
+ function co(t) {
160
333
  const e = Object.entries(t);
161
- return K(
334
+ return j(
162
335
  ...e.map(
163
- ([o, n]) => Ft.class(L.map(n, (s) => s ? o : void 0))
336
+ ([o, n]) => Vt.class(k.map(n, (r) => r ? o : void 0))
164
337
  )
165
338
  );
166
339
  }
167
- const Zn = H((t) => {
340
+ const ao = _((t) => {
168
341
  const e = t.style.getPropertyValue(":empty");
169
- return t.style.setProperty(":empty", "display:none"), F((o) => {
342
+ return t.style.setProperty(":empty", "display:none"), N((o) => {
170
343
  o && t.style.setProperty(":empty", e);
171
344
  });
172
- }), to = (t) => ie("head > title", Ft.innerText(t)), _e = {
345
+ }), lo = (t) => le("head > title", Vt.innerText(t)), tn = {
173
346
  partial: {
174
347
  root: null,
175
348
  rootMargin: "0px",
@@ -180,239 +353,223 @@ const Zn = H((t) => {
180
353
  rootMargin: "0px",
181
354
  threshold: 1
182
355
  }
183
- }, mt = {
356
+ }, gt = {
184
357
  partial: /* @__PURE__ */ new Map(),
185
358
  full: /* @__PURE__ */ new Map()
186
- }, st = {
359
+ }, it = {
187
360
  partial: null,
188
361
  full: null
189
362
  };
190
- function Ie(t) {
191
- return st[t] == null && (st[t] = new IntersectionObserver((e) => {
363
+ function en(t) {
364
+ return it[t] == null && (it[t] = new IntersectionObserver((e) => {
192
365
  e.forEach((o) => {
193
- const n = mt[t].get(o.target);
366
+ const n = gt[t].get(o.target);
194
367
  n == null || n.set(o.isIntersecting);
195
368
  });
196
- }, _e[t])), st[t];
197
- }
198
- const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
199
- const n = W(!1);
200
- return K(
201
- H((s) => {
202
- const r = typeof IntersectionObserver < "u" ? Ie(t) : null;
203
- mt[t].set(s, n), r == null || r.observe(s);
204
- function i() {
369
+ }, tn[t])), it[t];
370
+ }
371
+ const nn = ({ mode: t = "partial", once: e = !1 }, o) => {
372
+ const n = M(!1);
373
+ return j(
374
+ _((r) => {
375
+ const i = typeof IntersectionObserver < "u" ? en(t) : null;
376
+ gt[t].set(r, n), i == null || i.observe(r);
377
+ function s() {
205
378
  var a;
206
- r == null || r.unobserve(s), mt[t].delete(s), mt[t].size === 0 && ((a = st[t]) == null || a.disconnect(), st[t] = null);
379
+ i == null || i.unobserve(r), gt[t].delete(r), gt[t].size === 0 && ((a = it[t]) == null || a.disconnect(), it[t] = null);
207
380
  }
208
381
  let c = null;
209
382
  return e && (c = n.on((a) => {
210
- a && i();
211
- })), F(() => {
212
- n.dispose(), i(), c == null || c();
383
+ a && s();
384
+ })), N(() => {
385
+ n.dispose(), s(), c == null || c();
213
386
  });
214
387
  }),
215
- Mt(o(n))
388
+ Ht(o(n))
216
389
  );
217
- }, eo = (t, e, o) => Ye(t, (n) => re(n, e, o ?? (() => Et)));
218
- function Xe(t) {
219
- return H((e) => {
390
+ }, uo = (t, e, o) => nn(t, (n) => ue(n, e, o ?? (() => St)));
391
+ function on(t) {
392
+ return _((e) => {
220
393
  const o = (n) => {
221
394
  e.contains(n.target) || t(n);
222
395
  };
223
- return document.addEventListener("click", o), F(() => {
396
+ return document.addEventListener("click", o), N(() => {
224
397
  document.removeEventListener("click", o);
225
398
  });
226
399
  });
227
400
  }
228
- const G = (t, e) => t === void 0 || t === e, _t = (t, e) => t === void 0 || t === e;
229
- function qe(t, e) {
230
- return typeof t == "string" ? e.key === t : _t(t.key, e.key) && _t(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
401
+ const G = (t, e) => t === void 0 || t === e, Xt = (t, e) => t === void 0 || t === e;
402
+ function sn(t, e) {
403
+ return typeof t == "string" ? e.key === t : Xt(t.key, e.key) && Xt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
231
404
  t.commandOrControlKey,
232
405
  e.metaKey || e.ctrlKey
233
406
  );
234
407
  }
235
- function fe({
408
+ function pe({
236
409
  allowedKeys: t,
237
410
  handler: e
238
411
  }) {
239
- return H((o) => {
240
- const n = (s) => {
241
- if (o.contains(s.target)) {
242
- for (const r of t)
243
- if (qe(r, s)) {
244
- e(s);
412
+ return _((o) => {
413
+ const n = (r) => {
414
+ if (o.contains(r.target)) {
415
+ for (const i of t)
416
+ if (sn(i, r)) {
417
+ e(r);
245
418
  break;
246
419
  }
247
420
  }
248
421
  };
249
- return document.addEventListener("keydown", n), F(() => {
422
+ return document.addEventListener("keydown", n), N(() => {
250
423
  document.removeEventListener("keydown", n);
251
424
  });
252
425
  });
253
426
  }
254
- function no(t) {
255
- return fe({ allowedKeys: ["Enter"], handler: t });
427
+ function fo(t) {
428
+ return pe({ allowedKeys: ["Enter"], handler: t });
256
429
  }
257
- function oo(t) {
258
- return fe({ allowedKeys: ["Escape"], handler: t });
430
+ function ho(t) {
431
+ return pe({ allowedKeys: ["Escape"], handler: t });
259
432
  }
260
- const Qe = ({
433
+ const rn = ({
261
434
  mutate: t,
262
435
  convertError: e,
263
436
  onSuccess: o,
264
437
  onError: n,
265
- onSettled: s
438
+ onSettled: r
266
439
  }) => {
267
- let r;
268
- const i = W(R.notAsked), c = i.map(
269
- (d) => R.isSuccess(d) ? d.value : void 0
270
- ), a = i.map(
271
- (d) => R.isFailure(d) ? d.error : void 0
272
- ), l = i.map((d) => R.isLoading(d)), f = () => {
273
- r == null || r.abort(), r = void 0;
440
+ let i;
441
+ const s = M(L.notAsked), c = s.map(
442
+ (d) => L.isSuccess(d) ? d.value : void 0
443
+ ), a = s.map(
444
+ (d) => L.isFailure(d) ? d.error : void 0
445
+ ), l = s.map((d) => L.isLoading(d)), u = () => {
446
+ i == null || i.abort(), i = void 0;
274
447
  };
275
448
  return {
276
- status: i,
449
+ status: s,
277
450
  value: c,
278
451
  error: a,
279
452
  pending: l,
280
- execute: async (d, p) => {
281
- f(), r = new AbortController();
282
- const g = r.signal, y = i.get(), v = (p == null ? void 0 : p.optimisticValue) ?? ((p == null ? void 0 : p.optimisticFromRequest) != null ? p.optimisticFromRequest(d) : void 0);
283
- v != null ? i.set(R.loading(v)) : i.set(R.loading(R.getOrUndefined(y)));
453
+ execute: async (d, w) => {
454
+ u(), i = new AbortController();
455
+ const g = i.signal, y = s.get(), x = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
456
+ x != null ? s.set(L.loading(x)) : s.set(L.loading(L.getOrUndefined(y)));
284
457
  try {
285
- const w = await t({ request: d, abortSignal: g, previous: y });
286
- r = void 0, i.set(R.success(w)), o == null || o(w, d);
287
- } catch (w) {
288
- r = void 0, i.set(R.failure(e(w))), n == null || n(e(w), d);
458
+ const v = await t({ request: d, abortSignal: g, previous: y });
459
+ i = void 0, s.set(L.success(v)), o == null || o(v, d);
460
+ } catch (v) {
461
+ i = void 0, s.set(L.failure(e(v))), n == null || n(e(v), d);
289
462
  }
290
- s == null || s(i.get(), d);
463
+ r == null || r(s.get(), d);
291
464
  },
292
465
  cancel: (d) => {
293
- f(), i.set(d ?? R.notAsked);
466
+ u(), s.set(d ?? L.notAsked);
294
467
  },
295
468
  dispose: () => {
296
- r == null || r.abort(), r = void 0, i.dispose();
469
+ i == null || i.abort(), i = void 0, s.dispose();
297
470
  }
298
471
  };
299
- }, Je = (t, e) => {
300
- const { status: o, dispose: n, execute: s } = t, { pending: r, failure: i, success: c, notAsked: a } = e;
301
- let l;
302
- const f = () => {
303
- l != null && s(l);
304
- }, h = (m) => {
305
- l = m, s(m);
306
- };
307
- return K(
308
- F(n),
309
- Vt(o, {
310
- loading: r != null ? (m) => r({
311
- previous: m,
312
- retry: f,
313
- execute: h,
314
- cancel: t.cancel
315
- }) : void 0,
316
- failure: i != null ? (m) => i({ error: m, retry: f, execute: h }) : void 0,
317
- success: (m) => c({ value: m, execute: h }),
318
- notAsked: () => a({ execute: h })
472
+ }, cn = (t, e) => {
473
+ const { status: o, dispose: n, execute: r, cancel: i, pending: s, error: c, value: a } = t, { content: l } = e, u = We(a);
474
+ return j(
475
+ N(n),
476
+ l({
477
+ previous: u,
478
+ execute: r,
479
+ cancel: i,
480
+ pending: s,
481
+ error: c,
482
+ value: a,
483
+ status: o
319
484
  })
320
485
  );
321
- }, so = ({
486
+ }, mo = ({
322
487
  mutate: t,
323
- convertError: e = (l) => l,
488
+ convertError: e = (s) => s,
324
489
  onSuccess: o,
325
490
  onError: n,
326
- onSettled: s,
327
- pending: r,
328
- failure: i,
329
- success: c,
330
- notAsked: a
491
+ onSettled: r,
492
+ content: i
331
493
  }) => {
332
- const l = Qe({
494
+ const s = rn({
333
495
  mutate: t,
334
496
  convertError: e,
335
497
  onSuccess: o,
336
498
  onError: n,
337
- onSettled: s
338
- });
339
- return Je(l, {
340
- pending: r,
341
- failure: i,
342
- success: c,
343
- notAsked: a
499
+ onSettled: r
344
500
  });
345
- }, tt = Math.min, q = Math.max, gt = Math.round, dt = Math.floor, M = (t) => ({
501
+ return cn(s, { content: i });
502
+ }, tt = Math.min, X = Math.max, wt = Math.round, mt = Math.floor, H = (t) => ({
346
503
  x: t,
347
504
  y: t
348
- }), Ge = {
505
+ }), an = {
349
506
  left: "right",
350
507
  right: "left",
351
508
  bottom: "top",
352
509
  top: "bottom"
353
- }, Ze = {
510
+ }, ln = {
354
511
  start: "end",
355
512
  end: "start"
356
513
  };
357
- function Tt(t, e, o) {
358
- return q(t, tt(e, o));
514
+ function Ct(t, e, o) {
515
+ return X(t, tt(e, o));
359
516
  }
360
- function lt(t, e) {
517
+ function ut(t, e) {
361
518
  return typeof t == "function" ? t(e) : t;
362
519
  }
363
520
  function Q(t) {
364
521
  return t.split("-")[0];
365
522
  }
366
- function ut(t) {
523
+ function ft(t) {
367
524
  return t.split("-")[1];
368
525
  }
369
- function he(t) {
526
+ function we(t) {
370
527
  return t === "x" ? "y" : "x";
371
528
  }
372
- function $t(t) {
529
+ function zt(t) {
373
530
  return t === "y" ? "height" : "width";
374
531
  }
375
- function z(t) {
532
+ function U(t) {
376
533
  return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
377
534
  }
378
535
  function Bt(t) {
379
- return he(z(t));
536
+ return we(U(t));
380
537
  }
381
- function tn(t, e, o) {
538
+ function un(t, e, o) {
382
539
  o === void 0 && (o = !1);
383
- const n = ut(t), s = Bt(t), r = $t(s);
384
- let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
385
- return e.reference[r] > e.floating[r] && (i = pt(i)), [i, pt(i)];
540
+ const n = ft(t), r = Bt(t), i = zt(r);
541
+ let s = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
542
+ return e.reference[i] > e.floating[i] && (s = yt(s)), [s, yt(s)];
386
543
  }
387
- function en(t) {
388
- const e = pt(t);
389
- return [kt(t), e, kt(e)];
544
+ function fn(t) {
545
+ const e = yt(t);
546
+ return [Dt(t), e, Dt(e)];
390
547
  }
391
- function kt(t) {
392
- return t.replace(/start|end/g, (e) => Ze[e]);
548
+ function Dt(t) {
549
+ return t.replace(/start|end/g, (e) => ln[e]);
393
550
  }
394
- function nn(t, e, o) {
395
- const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
551
+ function hn(t, e, o) {
552
+ const n = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
396
553
  switch (t) {
397
554
  case "top":
398
555
  case "bottom":
399
- return o ? e ? s : n : e ? n : s;
556
+ return o ? e ? r : n : e ? n : r;
400
557
  case "left":
401
558
  case "right":
402
- return e ? r : i;
559
+ return e ? i : s;
403
560
  default:
404
561
  return [];
405
562
  }
406
563
  }
407
- function on(t, e, o, n) {
408
- const s = ut(t);
409
- let r = nn(Q(t), o === "start", n);
410
- return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(kt)))), r;
564
+ function dn(t, e, o, n) {
565
+ const r = ft(t);
566
+ let i = hn(Q(t), o === "start", n);
567
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
411
568
  }
412
- function pt(t) {
413
- return t.replace(/left|right|bottom|top/g, (e) => Ge[e]);
569
+ function yt(t) {
570
+ return t.replace(/left|right|bottom|top/g, (e) => an[e]);
414
571
  }
415
- function sn(t) {
572
+ function mn(t) {
416
573
  return {
417
574
  top: 0,
418
575
  right: 0,
@@ -421,295 +578,295 @@ function sn(t) {
421
578
  ...t
422
579
  };
423
580
  }
424
- function de(t) {
425
- return typeof t != "number" ? sn(t) : {
581
+ function ye(t) {
582
+ return typeof t != "number" ? mn(t) : {
426
583
  top: t,
427
584
  right: t,
428
585
  bottom: t,
429
586
  left: t
430
587
  };
431
588
  }
432
- function wt(t) {
589
+ function vt(t) {
433
590
  const {
434
591
  x: e,
435
592
  y: o,
436
593
  width: n,
437
- height: s
594
+ height: r
438
595
  } = t;
439
596
  return {
440
597
  width: n,
441
- height: s,
598
+ height: r,
442
599
  top: o,
443
600
  left: e,
444
601
  right: e + n,
445
- bottom: o + s,
602
+ bottom: o + r,
446
603
  x: e,
447
604
  y: o
448
605
  };
449
606
  }
450
- function It(t, e, o) {
607
+ function Qt(t, e, o) {
451
608
  let {
452
609
  reference: n,
453
- floating: s
610
+ floating: r
454
611
  } = t;
455
- const r = z(e), i = Bt(e), c = $t(i), a = Q(e), l = r === "y", f = n.x + n.width / 2 - s.width / 2, h = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
456
- let u;
612
+ const i = U(e), s = Bt(e), c = zt(s), a = Q(e), l = i === "y", u = n.x + n.width / 2 - r.width / 2, h = n.y + n.height / 2 - r.height / 2, p = n[c] / 2 - r[c] / 2;
613
+ let f;
457
614
  switch (a) {
458
615
  case "top":
459
- u = {
460
- x: f,
461
- y: n.y - s.height
616
+ f = {
617
+ x: u,
618
+ y: n.y - r.height
462
619
  };
463
620
  break;
464
621
  case "bottom":
465
- u = {
466
- x: f,
622
+ f = {
623
+ x: u,
467
624
  y: n.y + n.height
468
625
  };
469
626
  break;
470
627
  case "right":
471
- u = {
628
+ f = {
472
629
  x: n.x + n.width,
473
630
  y: h
474
631
  };
475
632
  break;
476
633
  case "left":
477
- u = {
478
- x: n.x - s.width,
634
+ f = {
635
+ x: n.x - r.width,
479
636
  y: h
480
637
  };
481
638
  break;
482
639
  default:
483
- u = {
640
+ f = {
484
641
  x: n.x,
485
642
  y: n.y
486
643
  };
487
644
  }
488
- switch (ut(e)) {
645
+ switch (ft(e)) {
489
646
  case "start":
490
- u[i] -= m * (o && l ? -1 : 1);
647
+ f[s] -= p * (o && l ? -1 : 1);
491
648
  break;
492
649
  case "end":
493
- u[i] += m * (o && l ? -1 : 1);
650
+ f[s] += p * (o && l ? -1 : 1);
494
651
  break;
495
652
  }
496
- return u;
653
+ return f;
497
654
  }
498
- const rn = async (t, e, o) => {
655
+ const gn = async (t, e, o) => {
499
656
  const {
500
657
  placement: n = "bottom",
501
- strategy: s = "absolute",
502
- middleware: r = [],
503
- platform: i
504
- } = o, c = r.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(e));
505
- let l = await i.getElementRects({
658
+ strategy: r = "absolute",
659
+ middleware: i = [],
660
+ platform: s
661
+ } = o, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
662
+ let l = await s.getElementRects({
506
663
  reference: t,
507
664
  floating: e,
508
- strategy: s
665
+ strategy: r
509
666
  }), {
510
- x: f,
667
+ x: u,
511
668
  y: h
512
- } = It(l, n, a), m = n, u = {}, d = 0;
513
- for (let p = 0; p < c.length; p++) {
669
+ } = Qt(l, n, a), p = n, f = {}, d = 0;
670
+ for (let w = 0; w < c.length; w++) {
514
671
  const {
515
672
  name: g,
516
673
  fn: y
517
- } = c[p], {
518
- x: v,
519
- y: w,
520
- data: b,
521
- reset: x
674
+ } = c[w], {
675
+ x,
676
+ y: v,
677
+ data: R,
678
+ reset: O
522
679
  } = await y({
523
- x: f,
680
+ x: u,
524
681
  y: h,
525
682
  initialPlacement: n,
526
- placement: m,
527
- strategy: s,
528
- middlewareData: u,
683
+ placement: p,
684
+ strategy: r,
685
+ middlewareData: f,
529
686
  rects: l,
530
- platform: i,
687
+ platform: s,
531
688
  elements: {
532
689
  reference: t,
533
690
  floating: e
534
691
  }
535
692
  });
536
- f = v ?? f, h = w ?? h, u = {
537
- ...u,
693
+ u = x ?? u, h = v ?? h, f = {
694
+ ...f,
538
695
  [g]: {
539
- ...u[g],
540
- ...b
696
+ ...f[g],
697
+ ...R
541
698
  }
542
- }, x && d <= 50 && (d++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (l = x.rects === !0 ? await i.getElementRects({
699
+ }, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (p = O.placement), O.rects && (l = O.rects === !0 ? await s.getElementRects({
543
700
  reference: t,
544
701
  floating: e,
545
- strategy: s
546
- }) : x.rects), {
547
- x: f,
702
+ strategy: r
703
+ }) : O.rects), {
704
+ x: u,
548
705
  y: h
549
- } = It(l, m, a)), p = -1);
706
+ } = Qt(l, p, a)), w = -1);
550
707
  }
551
708
  return {
552
- x: f,
709
+ x: u,
553
710
  y: h,
554
- placement: m,
555
- strategy: s,
556
- middlewareData: u
711
+ placement: p,
712
+ strategy: r,
713
+ middlewareData: f
557
714
  };
558
715
  };
559
- async function me(t, e) {
716
+ async function ve(t, e) {
560
717
  var o;
561
718
  e === void 0 && (e = {});
562
719
  const {
563
720
  x: n,
564
- y: s,
565
- platform: r,
566
- rects: i,
721
+ y: r,
722
+ platform: i,
723
+ rects: s,
567
724
  elements: c,
568
725
  strategy: a
569
726
  } = t, {
570
727
  boundary: l = "clippingAncestors",
571
- rootBoundary: f = "viewport",
728
+ rootBoundary: u = "viewport",
572
729
  elementContext: h = "floating",
573
- altBoundary: m = !1,
574
- padding: u = 0
575
- } = lt(e, t), d = de(u), g = c[m ? h === "floating" ? "reference" : "floating" : h], y = wt(await r.getClippingRect({
576
- element: (o = await (r.isElement == null ? void 0 : r.isElement(g))) == null || o ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
730
+ altBoundary: p = !1,
731
+ padding: f = 0
732
+ } = ut(e, t), d = ye(f), g = c[p ? h === "floating" ? "reference" : "floating" : h], y = vt(await i.getClippingRect({
733
+ element: (o = await (i.isElement == null ? void 0 : i.isElement(g))) == null || o ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
577
734
  boundary: l,
578
- rootBoundary: f,
735
+ rootBoundary: u,
579
736
  strategy: a
580
- })), v = h === "floating" ? {
737
+ })), x = h === "floating" ? {
581
738
  x: n,
582
- y: s,
583
- width: i.floating.width,
584
- height: i.floating.height
585
- } : i.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(w)) ? await (r.getScale == null ? void 0 : r.getScale(w)) || {
739
+ y: r,
740
+ width: s.floating.width,
741
+ height: s.floating.height
742
+ } : s.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), R = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
586
743
  x: 1,
587
744
  y: 1
588
745
  } : {
589
746
  x: 1,
590
747
  y: 1
591
- }, x = wt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
748
+ }, O = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
592
749
  elements: c,
593
- rect: v,
594
- offsetParent: w,
750
+ rect: x,
751
+ offsetParent: v,
595
752
  strategy: a
596
- }) : v);
753
+ }) : x);
597
754
  return {
598
- top: (y.top - x.top + d.top) / b.y,
599
- bottom: (x.bottom - y.bottom + d.bottom) / b.y,
600
- left: (y.left - x.left + d.left) / b.x,
601
- right: (x.right - y.right + d.right) / b.x
755
+ top: (y.top - O.top + d.top) / R.y,
756
+ bottom: (O.bottom - y.bottom + d.bottom) / R.y,
757
+ left: (y.left - O.left + d.left) / R.x,
758
+ right: (O.right - y.right + d.right) / R.x
602
759
  };
603
760
  }
604
- const cn = (t) => ({
761
+ const pn = (t) => ({
605
762
  name: "arrow",
606
763
  options: t,
607
764
  async fn(e) {
608
765
  const {
609
766
  x: o,
610
767
  y: n,
611
- placement: s,
612
- rects: r,
613
- platform: i,
768
+ placement: r,
769
+ rects: i,
770
+ platform: s,
614
771
  elements: c,
615
772
  middlewareData: a
616
773
  } = e, {
617
774
  element: l,
618
- padding: f = 0
619
- } = lt(t, e) || {};
775
+ padding: u = 0
776
+ } = ut(t, e) || {};
620
777
  if (l == null)
621
778
  return {};
622
- const h = de(f), m = {
779
+ const h = ye(u), p = {
623
780
  x: o,
624
781
  y: n
625
- }, u = Bt(s), d = $t(u), p = await i.getDimensions(l), g = u === "y", y = g ? "top" : "left", v = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", b = r.reference[d] + r.reference[u] - m[u] - r.floating[d], x = m[u] - r.reference[u], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
626
- let A = P ? P[w] : 0;
627
- (!A || !await (i.isElement == null ? void 0 : i.isElement(P))) && (A = c.floating[w] || r.floating[d]);
628
- const _ = b / 2 - x / 2, $ = A / 2 - p[d] / 2 - 1, T = tt(h[y], $), I = tt(h[v], $), Y = T, ot = A - p[d] - I, O = A / 2 - p[d] / 2 + _, X = Tt(Y, O, ot), B = !a.arrow && ut(s) != null && O !== X && r.reference[d] / 2 - (O < Y ? T : I) - p[d] / 2 < 0, k = B ? O < Y ? O - Y : O - ot : 0;
782
+ }, f = Bt(r), d = zt(f), w = await s.getDimensions(l), g = f === "y", y = g ? "top" : "left", x = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], O = p[f] - i.reference[f], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
783
+ let m = T ? T[v] : 0;
784
+ (!m || !await (s.isElement == null ? void 0 : s.isElement(T))) && (m = c.floating[v] || i.floating[d]);
785
+ const b = R / 2 - O / 2, A = m / 2 - w[d] / 2 - 1, E = tt(h[y], A), V = tt(h[x], A), Y = E, st = m - w[d] - V, P = m / 2 - w[d] / 2 + b, q = Ct(Y, P, st), B = !a.arrow && ft(r) != null && P !== q && i.reference[d] / 2 - (P < Y ? E : V) - w[d] / 2 < 0, C = B ? P < Y ? P - Y : P - st : 0;
629
786
  return {
630
- [u]: m[u] + k,
787
+ [f]: p[f] + C,
631
788
  data: {
632
- [u]: X,
633
- centerOffset: O - X - k,
789
+ [f]: q,
790
+ centerOffset: P - q - C,
634
791
  ...B && {
635
- alignmentOffset: k
792
+ alignmentOffset: C
636
793
  }
637
794
  },
638
795
  reset: B
639
796
  };
640
797
  }
641
- }), an = function(t) {
798
+ }), wn = function(t) {
642
799
  return t === void 0 && (t = {}), {
643
800
  name: "flip",
644
801
  options: t,
645
802
  async fn(e) {
646
803
  var o, n;
647
804
  const {
648
- placement: s,
649
- middlewareData: r,
650
- rects: i,
805
+ placement: r,
806
+ middlewareData: i,
807
+ rects: s,
651
808
  initialPlacement: c,
652
809
  platform: a,
653
810
  elements: l
654
811
  } = e, {
655
- mainAxis: f = !0,
812
+ mainAxis: u = !0,
656
813
  crossAxis: h = !0,
657
- fallbackPlacements: m,
658
- fallbackStrategy: u = "bestFit",
814
+ fallbackPlacements: p,
815
+ fallbackStrategy: f = "bestFit",
659
816
  fallbackAxisSideDirection: d = "none",
660
- flipAlignment: p = !0,
817
+ flipAlignment: w = !0,
661
818
  ...g
662
- } = lt(t, e);
663
- if ((o = r.arrow) != null && o.alignmentOffset)
819
+ } = ut(t, e);
820
+ if ((o = i.arrow) != null && o.alignmentOffset)
664
821
  return {};
665
- const y = Q(s), v = z(c), w = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = m || (w || !p ? [pt(c)] : en(c)), P = d !== "none";
666
- !m && P && x.push(...on(c, p, d, b));
667
- const A = [c, ...x], _ = await me(e, g), $ = [];
668
- let T = ((n = r.flip) == null ? void 0 : n.overflows) || [];
669
- if (f && $.push(_[y]), h) {
670
- const O = tn(s, i, b);
671
- $.push(_[O[0]], _[O[1]]);
822
+ const y = Q(r), x = U(c), v = Q(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (v || !w ? [yt(c)] : fn(c)), T = d !== "none";
823
+ !p && T && O.push(...dn(c, w, d, R));
824
+ const m = [c, ...O], b = await ve(e, g), A = [];
825
+ let E = ((n = i.flip) == null ? void 0 : n.overflows) || [];
826
+ if (u && A.push(b[y]), h) {
827
+ const P = un(r, s, R);
828
+ A.push(b[P[0]], b[P[1]]);
672
829
  }
673
- if (T = [...T, {
674
- placement: s,
675
- overflows: $
676
- }], !$.every((O) => O <= 0)) {
677
- var I, Y;
678
- const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, X = A[O];
679
- if (X && (!(h === "alignment" ? v !== z(X) : !1) || // We leave the current main axis only if every placement on that axis
830
+ if (E = [...E, {
831
+ placement: r,
832
+ overflows: A
833
+ }], !A.every((P) => P <= 0)) {
834
+ var V, Y;
835
+ const P = (((V = i.flip) == null ? void 0 : V.index) || 0) + 1, q = m[P];
836
+ if (q && (!(h === "alignment" ? x !== U(q) : !1) || // We leave the current main axis only if every placement on that axis
680
837
  // overflows the main axis.
681
- T.every((S) => S.overflows[0] > 0 && z(S.placement) === v)))
838
+ E.every((D) => D.overflows[0] > 0 && U(D.placement) === x)))
682
839
  return {
683
840
  data: {
684
- index: O,
685
- overflows: T
841
+ index: P,
842
+ overflows: E
686
843
  },
687
844
  reset: {
688
- placement: X
845
+ placement: q
689
846
  }
690
847
  };
691
- let B = (Y = T.filter((k) => k.overflows[0] <= 0).sort((k, S) => k.overflows[1] - S.overflows[1])[0]) == null ? void 0 : Y.placement;
848
+ let B = (Y = E.filter((C) => C.overflows[0] <= 0).sort((C, D) => C.overflows[1] - D.overflows[1])[0]) == null ? void 0 : Y.placement;
692
849
  if (!B)
693
- switch (u) {
850
+ switch (f) {
694
851
  case "bestFit": {
695
- var ot;
696
- const k = (ot = T.filter((S) => {
697
- if (P) {
698
- const U = z(S.placement);
699
- return U === v || // Create a bias to the `y` side axis due to horizontal
852
+ var st;
853
+ const C = (st = E.filter((D) => {
854
+ if (T) {
855
+ const K = U(D.placement);
856
+ return K === x || // Create a bias to the `y` side axis due to horizontal
700
857
  // reading directions favoring greater width.
701
- U === "y";
858
+ K === "y";
702
859
  }
703
860
  return !0;
704
- }).map((S) => [S.placement, S.overflows.filter((U) => U > 0).reduce((U, Le) => U + Le, 0)]).sort((S, U) => S[1] - U[1])[0]) == null ? void 0 : ot[0];
705
- k && (B = k);
861
+ }).map((D) => [D.placement, D.overflows.filter((K) => K > 0).reduce((K, ke) => K + ke, 0)]).sort((D, K) => D[1] - K[1])[0]) == null ? void 0 : st[0];
862
+ C && (B = C);
706
863
  break;
707
864
  }
708
865
  case "initialPlacement":
709
866
  B = c;
710
867
  break;
711
868
  }
712
- if (s !== B)
869
+ if (r !== B)
713
870
  return {
714
871
  reset: {
715
872
  placement: B
@@ -720,15 +877,15 @@ const cn = (t) => ({
720
877
  }
721
878
  };
722
879
  };
723
- async function ln(t, e) {
880
+ async function yn(t, e) {
724
881
  const {
725
882
  placement: o,
726
883
  platform: n,
727
- elements: s
728
- } = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, f = r && a ? -1 : 1, h = lt(e, t);
884
+ elements: r
885
+ } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), s = Q(o), c = ft(o), a = U(o) === "y", l = ["left", "top"].includes(s) ? -1 : 1, u = i && a ? -1 : 1, h = ut(e, t);
729
886
  let {
730
- mainAxis: m,
731
- crossAxis: u,
887
+ mainAxis: p,
888
+ crossAxis: f,
732
889
  alignmentAxis: d
733
890
  } = typeof h == "number" ? {
734
891
  mainAxis: h,
@@ -739,37 +896,37 @@ async function ln(t, e) {
739
896
  crossAxis: h.crossAxis || 0,
740
897
  alignmentAxis: h.alignmentAxis
741
898
  };
742
- return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
743
- x: u * f,
744
- y: m * l
899
+ return c && typeof d == "number" && (f = c === "end" ? d * -1 : d), a ? {
900
+ x: f * u,
901
+ y: p * l
745
902
  } : {
746
- x: m * l,
747
- y: u * f
903
+ x: p * l,
904
+ y: f * u
748
905
  };
749
906
  }
750
- const un = function(t) {
907
+ const vn = function(t) {
751
908
  return t === void 0 && (t = 0), {
752
909
  name: "offset",
753
910
  options: t,
754
911
  async fn(e) {
755
912
  var o, n;
756
913
  const {
757
- x: s,
758
- y: r,
759
- placement: i,
914
+ x: r,
915
+ y: i,
916
+ placement: s,
760
917
  middlewareData: c
761
- } = e, a = await ln(e, t);
762
- return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
763
- x: s + a.x,
764
- y: r + a.y,
918
+ } = e, a = await yn(e, t);
919
+ return s === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
920
+ x: r + a.x,
921
+ y: i + a.y,
765
922
  data: {
766
923
  ...a,
767
- placement: i
924
+ placement: s
768
925
  }
769
926
  };
770
927
  }
771
928
  };
772
- }, fn = function(t) {
929
+ }, xn = function(t) {
773
930
  return t === void 0 && (t = {}), {
774
931
  name: "shift",
775
932
  options: t,
@@ -777,94 +934,94 @@ const un = function(t) {
777
934
  const {
778
935
  x: o,
779
936
  y: n,
780
- placement: s
937
+ placement: r
781
938
  } = e, {
782
- mainAxis: r = !0,
783
- crossAxis: i = !1,
939
+ mainAxis: i = !0,
940
+ crossAxis: s = !1,
784
941
  limiter: c = {
785
942
  fn: (g) => {
786
943
  let {
787
944
  x: y,
788
- y: v
945
+ y: x
789
946
  } = g;
790
947
  return {
791
948
  x: y,
792
- y: v
949
+ y: x
793
950
  };
794
951
  }
795
952
  },
796
953
  ...a
797
- } = lt(t, e), l = {
954
+ } = ut(t, e), l = {
798
955
  x: o,
799
956
  y: n
800
- }, f = await me(e, a), h = z(Q(s)), m = he(h);
801
- let u = l[m], d = l[h];
802
- if (r) {
803
- const g = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", v = u + f[g], w = u - f[y];
804
- u = Tt(v, u, w);
805
- }
957
+ }, u = await ve(e, a), h = U(Q(r)), p = we(h);
958
+ let f = l[p], d = l[h];
806
959
  if (i) {
807
- const g = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", v = d + f[g], w = d - f[y];
808
- d = Tt(v, d, w);
960
+ const g = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", x = f + u[g], v = f - u[y];
961
+ f = Ct(x, f, v);
962
+ }
963
+ if (s) {
964
+ const g = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = d + u[g], v = d - u[y];
965
+ d = Ct(x, d, v);
809
966
  }
810
- const p = c.fn({
967
+ const w = c.fn({
811
968
  ...e,
812
- [m]: u,
969
+ [p]: f,
813
970
  [h]: d
814
971
  });
815
972
  return {
816
- ...p,
973
+ ...w,
817
974
  data: {
818
- x: p.x - o,
819
- y: p.y - n,
975
+ x: w.x - o,
976
+ y: w.y - n,
820
977
  enabled: {
821
- [m]: r,
822
- [h]: i
978
+ [p]: i,
979
+ [h]: s
823
980
  }
824
981
  }
825
982
  };
826
983
  }
827
984
  };
828
985
  };
829
- function vt() {
986
+ function bt() {
830
987
  return typeof window < "u";
831
988
  }
832
- function nt(t) {
833
- return ge(t) ? (t.nodeName || "").toLowerCase() : "#document";
989
+ function ot(t) {
990
+ return xe(t) ? (t.nodeName || "").toLowerCase() : "#document";
834
991
  }
835
- function E(t) {
992
+ function S(t) {
836
993
  var e;
837
994
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
838
995
  }
839
- function V(t) {
996
+ function z(t) {
840
997
  var e;
841
- return (e = (ge(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
998
+ return (e = (xe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
842
999
  }
843
- function ge(t) {
844
- return vt() ? t instanceof Node || t instanceof E(t).Node : !1;
1000
+ function xe(t) {
1001
+ return bt() ? t instanceof Node || t instanceof S(t).Node : !1;
845
1002
  }
846
- function C(t) {
847
- return vt() ? t instanceof Element || t instanceof E(t).Element : !1;
1003
+ function W(t) {
1004
+ return bt() ? t instanceof Element || t instanceof S(t).Element : !1;
848
1005
  }
849
- function N(t) {
850
- return vt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
1006
+ function $(t) {
1007
+ return bt() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
851
1008
  }
852
- function Yt(t) {
853
- return !vt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
1009
+ function Jt(t) {
1010
+ return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
854
1011
  }
855
- function ft(t) {
1012
+ function ht(t) {
856
1013
  const {
857
1014
  overflow: e,
858
1015
  overflowX: o,
859
1016
  overflowY: n,
860
- display: s
861
- } = D(t);
862
- return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
1017
+ display: r
1018
+ } = F(t);
1019
+ return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
863
1020
  }
864
- function hn(t) {
865
- return ["table", "td", "th"].includes(nt(t));
1021
+ function bn(t) {
1022
+ return ["table", "td", "th"].includes(ot(t));
866
1023
  }
867
- function xt(t) {
1024
+ function At(t) {
868
1025
  return [":popover-open", ":modal"].some((e) => {
869
1026
  try {
870
1027
  return t.matches(e);
@@ -873,32 +1030,32 @@ function xt(t) {
873
1030
  }
874
1031
  });
875
1032
  }
876
- function Ht(t) {
877
- const e = Ut(), o = C(t) ? D(t) : t;
1033
+ function _t(t) {
1034
+ const e = Kt(), o = W(t) ? F(t) : t;
878
1035
  return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
879
1036
  }
880
- function dn(t) {
881
- let e = j(t);
882
- for (; N(e) && !et(e); ) {
883
- if (Ht(e))
1037
+ function An(t) {
1038
+ let e = I(t);
1039
+ for (; $(e) && !et(e); ) {
1040
+ if (_t(e))
884
1041
  return e;
885
- if (xt(e))
1042
+ if (At(e))
886
1043
  return null;
887
- e = j(e);
1044
+ e = I(e);
888
1045
  }
889
1046
  return null;
890
1047
  }
891
- function Ut() {
1048
+ function Kt() {
892
1049
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
893
1050
  }
894
1051
  function et(t) {
895
- return ["html", "body", "#document"].includes(nt(t));
1052
+ return ["html", "body", "#document"].includes(ot(t));
896
1053
  }
897
- function D(t) {
898
- return E(t).getComputedStyle(t);
1054
+ function F(t) {
1055
+ return S(t).getComputedStyle(t);
899
1056
  }
900
- function bt(t) {
901
- return C(t) ? {
1057
+ function Ot(t) {
1058
+ return W(t) ? {
902
1059
  scrollLeft: t.scrollLeft,
903
1060
  scrollTop: t.scrollTop
904
1061
  } : {
@@ -906,223 +1063,223 @@ function bt(t) {
906
1063
  scrollTop: t.scrollY
907
1064
  };
908
1065
  }
909
- function j(t) {
910
- if (nt(t) === "html")
1066
+ function I(t) {
1067
+ if (ot(t) === "html")
911
1068
  return t;
912
1069
  const e = (
913
1070
  // Step into the shadow DOM of the parent of a slotted node.
914
1071
  t.assignedSlot || // DOM Element detected.
915
1072
  t.parentNode || // ShadowRoot detected.
916
- Yt(t) && t.host || // Fallback.
917
- V(t)
1073
+ Jt(t) && t.host || // Fallback.
1074
+ z(t)
918
1075
  );
919
- return Yt(e) ? e.host : e;
1076
+ return Jt(e) ? e.host : e;
920
1077
  }
921
- function pe(t) {
922
- const e = j(t);
923
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : N(e) && ft(e) ? e : pe(e);
1078
+ function be(t) {
1079
+ const e = I(t);
1080
+ return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && ht(e) ? e : be(e);
924
1081
  }
925
- function rt(t, e, o) {
1082
+ function at(t, e, o) {
926
1083
  var n;
927
1084
  e === void 0 && (e = []), o === void 0 && (o = !0);
928
- const s = pe(t), r = s === ((n = t.ownerDocument) == null ? void 0 : n.body), i = E(s);
929
- if (r) {
930
- const c = St(i);
931
- return e.concat(i, i.visualViewport || [], ft(s) ? s : [], c && o ? rt(c) : []);
1085
+ const r = be(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), s = S(r);
1086
+ if (i) {
1087
+ const c = Wt(s);
1088
+ return e.concat(s, s.visualViewport || [], ht(r) ? r : [], c && o ? at(c) : []);
932
1089
  }
933
- return e.concat(s, rt(s, [], o));
1090
+ return e.concat(r, at(r, [], o));
934
1091
  }
935
- function St(t) {
1092
+ function Wt(t) {
936
1093
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
937
1094
  }
938
- function we(t) {
939
- const e = D(t);
1095
+ function Ae(t) {
1096
+ const e = F(t);
940
1097
  let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
941
- const s = N(t), r = s ? t.offsetWidth : o, i = s ? t.offsetHeight : n, c = gt(o) !== r || gt(n) !== i;
942
- return c && (o = r, n = i), {
1098
+ const r = $(t), i = r ? t.offsetWidth : o, s = r ? t.offsetHeight : n, c = wt(o) !== i || wt(n) !== s;
1099
+ return c && (o = i, n = s), {
943
1100
  width: o,
944
1101
  height: n,
945
1102
  $: c
946
1103
  };
947
1104
  }
948
- function zt(t) {
949
- return C(t) ? t : t.contextElement;
1105
+ function Ut(t) {
1106
+ return W(t) ? t : t.contextElement;
950
1107
  }
951
1108
  function Z(t) {
952
- const e = zt(t);
953
- if (!N(e))
954
- return M(1);
1109
+ const e = Ut(t);
1110
+ if (!$(e))
1111
+ return H(1);
955
1112
  const o = e.getBoundingClientRect(), {
956
1113
  width: n,
957
- height: s,
958
- $: r
959
- } = we(e);
960
- let i = (r ? gt(o.width) : o.width) / n, c = (r ? gt(o.height) : o.height) / s;
961
- return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
962
- x: i,
1114
+ height: r,
1115
+ $: i
1116
+ } = Ae(e);
1117
+ let s = (i ? wt(o.width) : o.width) / n, c = (i ? wt(o.height) : o.height) / r;
1118
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1119
+ x: s,
963
1120
  y: c
964
1121
  };
965
1122
  }
966
- const mn = /* @__PURE__ */ M(0);
967
- function ye(t) {
968
- const e = E(t);
969
- return !Ut() || !e.visualViewport ? mn : {
1123
+ const On = /* @__PURE__ */ H(0);
1124
+ function Oe(t) {
1125
+ const e = S(t);
1126
+ return !Kt() || !e.visualViewport ? On : {
970
1127
  x: e.visualViewport.offsetLeft,
971
1128
  y: e.visualViewport.offsetTop
972
1129
  };
973
1130
  }
974
- function gn(t, e, o) {
975
- return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
1131
+ function Rn(t, e, o) {
1132
+ return e === void 0 && (e = !1), !o || e && o !== S(t) ? !1 : e;
976
1133
  }
977
1134
  function J(t, e, o, n) {
978
1135
  e === void 0 && (e = !1), o === void 0 && (o = !1);
979
- const s = t.getBoundingClientRect(), r = zt(t);
980
- let i = M(1);
981
- e && (n ? C(n) && (i = Z(n)) : i = Z(t));
982
- const c = gn(r, o, n) ? ye(r) : M(0);
983
- let a = (s.left + c.x) / i.x, l = (s.top + c.y) / i.y, f = s.width / i.x, h = s.height / i.y;
984
- if (r) {
985
- const m = E(r), u = n && C(n) ? E(n) : n;
986
- let d = m, p = St(d);
987
- for (; p && n && u !== d; ) {
988
- const g = Z(p), y = p.getBoundingClientRect(), v = D(p), w = y.left + (p.clientLeft + parseFloat(v.paddingLeft)) * g.x, b = y.top + (p.clientTop + parseFloat(v.paddingTop)) * g.y;
989
- a *= g.x, l *= g.y, f *= g.x, h *= g.y, a += w, l += b, d = E(p), p = St(d);
1136
+ const r = t.getBoundingClientRect(), i = Ut(t);
1137
+ let s = H(1);
1138
+ e && (n ? W(n) && (s = Z(n)) : s = Z(t));
1139
+ const c = Rn(i, o, n) ? Oe(i) : H(0);
1140
+ let a = (r.left + c.x) / s.x, l = (r.top + c.y) / s.y, u = r.width / s.x, h = r.height / s.y;
1141
+ if (i) {
1142
+ const p = S(i), f = n && W(n) ? S(n) : n;
1143
+ let d = p, w = Wt(d);
1144
+ for (; w && n && f !== d; ) {
1145
+ const g = Z(w), y = w.getBoundingClientRect(), x = F(w), v = y.left + (w.clientLeft + parseFloat(x.paddingLeft)) * g.x, R = y.top + (w.clientTop + parseFloat(x.paddingTop)) * g.y;
1146
+ a *= g.x, l *= g.y, u *= g.x, h *= g.y, a += v, l += R, d = S(w), w = Wt(d);
990
1147
  }
991
1148
  }
992
- return wt({
993
- width: f,
1149
+ return vt({
1150
+ width: u,
994
1151
  height: h,
995
1152
  x: a,
996
1153
  y: l
997
1154
  });
998
1155
  }
999
- function Kt(t, e) {
1000
- const o = bt(t).scrollLeft;
1001
- return e ? e.left + o : J(V(t)).left + o;
1156
+ function jt(t, e) {
1157
+ const o = Ot(t).scrollLeft;
1158
+ return e ? e.left + o : J(z(t)).left + o;
1002
1159
  }
1003
- function ve(t, e, o) {
1160
+ function Re(t, e, o) {
1004
1161
  o === void 0 && (o = !1);
1005
- const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
1162
+ const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
1006
1163
  // RTL <body> scrollbar.
1007
- Kt(t, n)
1008
- )), r = n.top + e.scrollTop;
1164
+ jt(t, n)
1165
+ )), i = n.top + e.scrollTop;
1009
1166
  return {
1010
- x: s,
1011
- y: r
1167
+ x: r,
1168
+ y: i
1012
1169
  };
1013
1170
  }
1014
- function pn(t) {
1171
+ function Ln(t) {
1015
1172
  let {
1016
1173
  elements: e,
1017
1174
  rect: o,
1018
1175
  offsetParent: n,
1019
- strategy: s
1176
+ strategy: r
1020
1177
  } = t;
1021
- const r = s === "fixed", i = V(n), c = e ? xt(e.floating) : !1;
1022
- if (n === i || c && r)
1178
+ const i = r === "fixed", s = z(n), c = e ? At(e.floating) : !1;
1179
+ if (n === s || c && i)
1023
1180
  return o;
1024
1181
  let a = {
1025
1182
  scrollLeft: 0,
1026
1183
  scrollTop: 0
1027
- }, l = M(1);
1028
- const f = M(0), h = N(n);
1029
- if ((h || !h && !r) && ((nt(n) !== "body" || ft(i)) && (a = bt(n)), N(n))) {
1030
- const u = J(n);
1031
- l = Z(n), f.x = u.x + n.clientLeft, f.y = u.y + n.clientTop;
1184
+ }, l = H(1);
1185
+ const u = H(0), h = $(n);
1186
+ if ((h || !h && !i) && ((ot(n) !== "body" || ht(s)) && (a = Ot(n)), $(n))) {
1187
+ const f = J(n);
1188
+ l = Z(n), u.x = f.x + n.clientLeft, u.y = f.y + n.clientTop;
1032
1189
  }
1033
- const m = i && !h && !r ? ve(i, a, !0) : M(0);
1190
+ const p = s && !h && !i ? Re(s, a, !0) : H(0);
1034
1191
  return {
1035
1192
  width: o.width * l.x,
1036
1193
  height: o.height * l.y,
1037
- x: o.x * l.x - a.scrollLeft * l.x + f.x + m.x,
1038
- y: o.y * l.y - a.scrollTop * l.y + f.y + m.y
1194
+ x: o.x * l.x - a.scrollLeft * l.x + u.x + p.x,
1195
+ y: o.y * l.y - a.scrollTop * l.y + u.y + p.y
1039
1196
  };
1040
1197
  }
1041
- function wn(t) {
1198
+ function En(t) {
1042
1199
  return Array.from(t.getClientRects());
1043
1200
  }
1044
- function yn(t) {
1045
- const e = V(t), o = bt(t), n = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1046
- let i = -o.scrollLeft + Kt(t);
1201
+ function Pn(t) {
1202
+ const e = z(t), o = Ot(t), n = t.ownerDocument.body, r = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1203
+ let s = -o.scrollLeft + jt(t);
1047
1204
  const c = -o.scrollTop;
1048
- return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
1049
- width: s,
1050
- height: r,
1051
- x: i,
1205
+ return F(n).direction === "rtl" && (s += X(e.clientWidth, n.clientWidth) - r), {
1206
+ width: r,
1207
+ height: i,
1208
+ x: s,
1052
1209
  y: c
1053
1210
  };
1054
1211
  }
1055
- function vn(t, e) {
1056
- const o = E(t), n = V(t), s = o.visualViewport;
1057
- let r = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
1058
- if (s) {
1059
- r = s.width, i = s.height;
1060
- const l = Ut();
1061
- (!l || l && e === "fixed") && (c = s.offsetLeft, a = s.offsetTop);
1212
+ function Sn(t, e) {
1213
+ const o = S(t), n = z(t), r = o.visualViewport;
1214
+ let i = n.clientWidth, s = n.clientHeight, c = 0, a = 0;
1215
+ if (r) {
1216
+ i = r.width, s = r.height;
1217
+ const l = Kt();
1218
+ (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
1062
1219
  }
1063
1220
  return {
1064
- width: r,
1065
- height: i,
1221
+ width: i,
1222
+ height: s,
1066
1223
  x: c,
1067
1224
  y: a
1068
1225
  };
1069
1226
  }
1070
- function xn(t, e) {
1071
- const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = N(t) ? Z(t) : M(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, a = s * r.x, l = n * r.y;
1227
+ function Tn(t, e) {
1228
+ const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, i = $(t) ? Z(t) : H(1), s = t.clientWidth * i.x, c = t.clientHeight * i.y, a = r * i.x, l = n * i.y;
1072
1229
  return {
1073
- width: i,
1230
+ width: s,
1074
1231
  height: c,
1075
1232
  x: a,
1076
1233
  y: l
1077
1234
  };
1078
1235
  }
1079
- function Xt(t, e, o) {
1236
+ function Gt(t, e, o) {
1080
1237
  let n;
1081
1238
  if (e === "viewport")
1082
- n = vn(t, o);
1239
+ n = Sn(t, o);
1083
1240
  else if (e === "document")
1084
- n = yn(V(t));
1085
- else if (C(e))
1086
- n = xn(e, o);
1241
+ n = Pn(z(t));
1242
+ else if (W(e))
1243
+ n = Tn(e, o);
1087
1244
  else {
1088
- const s = ye(t);
1245
+ const r = Oe(t);
1089
1246
  n = {
1090
- x: e.x - s.x,
1091
- y: e.y - s.y,
1247
+ x: e.x - r.x,
1248
+ y: e.y - r.y,
1092
1249
  width: e.width,
1093
1250
  height: e.height
1094
1251
  };
1095
1252
  }
1096
- return wt(n);
1253
+ return vt(n);
1097
1254
  }
1098
- function xe(t, e) {
1099
- const o = j(t);
1100
- return o === e || !C(o) || et(o) ? !1 : D(o).position === "fixed" || xe(o, e);
1255
+ function Le(t, e) {
1256
+ const o = I(t);
1257
+ return o === e || !W(o) || et(o) ? !1 : F(o).position === "fixed" || Le(o, e);
1101
1258
  }
1102
- function bn(t, e) {
1259
+ function kn(t, e) {
1103
1260
  const o = e.get(t);
1104
1261
  if (o)
1105
1262
  return o;
1106
- let n = rt(t, [], !1).filter((c) => C(c) && nt(c) !== "body"), s = null;
1107
- const r = D(t).position === "fixed";
1108
- let i = r ? j(t) : t;
1109
- for (; C(i) && !et(i); ) {
1110
- const c = D(i), a = Ht(i);
1111
- !a && c.position === "fixed" && (s = null), (r ? !a && !s : !a && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ft(i) && !a && xe(t, i)) ? n = n.filter((f) => f !== i) : s = c, i = j(i);
1263
+ let n = at(t, [], !1).filter((c) => W(c) && ot(c) !== "body"), r = null;
1264
+ const i = F(t).position === "fixed";
1265
+ let s = i ? I(t) : t;
1266
+ for (; W(s) && !et(s); ) {
1267
+ const c = F(s), a = _t(s);
1268
+ !a && c.position === "fixed" && (r = null), (i ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ht(s) && !a && Le(t, s)) ? n = n.filter((u) => u !== s) : r = c, s = I(s);
1112
1269
  }
1113
1270
  return e.set(t, n), n;
1114
1271
  }
1115
- function Rn(t) {
1272
+ function Cn(t) {
1116
1273
  let {
1117
1274
  element: e,
1118
1275
  boundary: o,
1119
1276
  rootBoundary: n,
1120
- strategy: s
1277
+ strategy: r
1121
1278
  } = t;
1122
- const i = [...o === "clippingAncestors" ? xt(e) ? [] : bn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, f) => {
1123
- const h = Xt(e, f, s);
1124
- return l.top = q(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = q(h.left, l.left), l;
1125
- }, Xt(e, c, s));
1279
+ const s = [...o === "clippingAncestors" ? At(e) ? [] : kn(e, this._c) : [].concat(o), n], c = s[0], a = s.reduce((l, u) => {
1280
+ const h = Gt(e, u, r);
1281
+ return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
1282
+ }, Gt(e, c, r));
1126
1283
  return {
1127
1284
  width: a.right - a.left,
1128
1285
  height: a.bottom - a.top,
@@ -1130,73 +1287,73 @@ function Rn(t) {
1130
1287
  y: a.top
1131
1288
  };
1132
1289
  }
1133
- function An(t) {
1290
+ function Dn(t) {
1134
1291
  const {
1135
1292
  width: e,
1136
1293
  height: o
1137
- } = we(t);
1294
+ } = Ae(t);
1138
1295
  return {
1139
1296
  width: e,
1140
1297
  height: o
1141
1298
  };
1142
1299
  }
1143
- function On(t, e, o) {
1144
- const n = N(e), s = V(e), r = o === "fixed", i = J(t, !0, r, e);
1300
+ function Wn(t, e, o) {
1301
+ const n = $(e), r = z(e), i = o === "fixed", s = J(t, !0, i, e);
1145
1302
  let c = {
1146
1303
  scrollLeft: 0,
1147
1304
  scrollTop: 0
1148
1305
  };
1149
- const a = M(0);
1306
+ const a = H(0);
1150
1307
  function l() {
1151
- a.x = Kt(s);
1308
+ a.x = jt(r);
1152
1309
  }
1153
- if (n || !n && !r)
1154
- if ((nt(e) !== "body" || ft(s)) && (c = bt(e)), n) {
1155
- const u = J(e, !0, r, e);
1156
- a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
1157
- } else s && l();
1158
- r && !n && s && l();
1159
- const f = s && !n && !r ? ve(s, c) : M(0), h = i.left + c.scrollLeft - a.x - f.x, m = i.top + c.scrollTop - a.y - f.y;
1310
+ if (n || !n && !i)
1311
+ if ((ot(e) !== "body" || ht(r)) && (c = Ot(e)), n) {
1312
+ const f = J(e, !0, i, e);
1313
+ a.x = f.x + e.clientLeft, a.y = f.y + e.clientTop;
1314
+ } else r && l();
1315
+ i && !n && r && l();
1316
+ const u = r && !n && !i ? Re(r, c) : H(0), h = s.left + c.scrollLeft - a.x - u.x, p = s.top + c.scrollTop - a.y - u.y;
1160
1317
  return {
1161
1318
  x: h,
1162
- y: m,
1163
- width: i.width,
1164
- height: i.height
1319
+ y: p,
1320
+ width: s.width,
1321
+ height: s.height
1165
1322
  };
1166
1323
  }
1167
- function Ot(t) {
1168
- return D(t).position === "static";
1324
+ function Et(t) {
1325
+ return F(t).position === "static";
1169
1326
  }
1170
- function qt(t, e) {
1171
- if (!N(t) || D(t).position === "fixed")
1327
+ function Zt(t, e) {
1328
+ if (!$(t) || F(t).position === "fixed")
1172
1329
  return null;
1173
1330
  if (e)
1174
1331
  return e(t);
1175
1332
  let o = t.offsetParent;
1176
- return V(t) === o && (o = o.ownerDocument.body), o;
1333
+ return z(t) === o && (o = o.ownerDocument.body), o;
1177
1334
  }
1178
- function be(t, e) {
1179
- const o = E(t);
1180
- if (xt(t))
1335
+ function Ee(t, e) {
1336
+ const o = S(t);
1337
+ if (At(t))
1181
1338
  return o;
1182
- if (!N(t)) {
1183
- let s = j(t);
1184
- for (; s && !et(s); ) {
1185
- if (C(s) && !Ot(s))
1186
- return s;
1187
- s = j(s);
1339
+ if (!$(t)) {
1340
+ let r = I(t);
1341
+ for (; r && !et(r); ) {
1342
+ if (W(r) && !Et(r))
1343
+ return r;
1344
+ r = I(r);
1188
1345
  }
1189
1346
  return o;
1190
1347
  }
1191
- let n = qt(t, e);
1192
- for (; n && hn(n) && Ot(n); )
1193
- n = qt(n, e);
1194
- return n && et(n) && Ot(n) && !Ht(n) ? o : n || dn(t) || o;
1348
+ let n = Zt(t, e);
1349
+ for (; n && bn(n) && Et(n); )
1350
+ n = Zt(n, e);
1351
+ return n && et(n) && Et(n) && !_t(n) ? o : n || An(t) || o;
1195
1352
  }
1196
- const Ln = async function(t) {
1197
- const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
1353
+ const Fn = async function(t) {
1354
+ const e = this.getOffsetParent || Ee, o = this.getDimensions, n = await o(t.floating);
1198
1355
  return {
1199
- reference: On(t.reference, await e(t.floating), t.strategy),
1356
+ reference: Wn(t.reference, await e(t.floating), t.strategy),
1200
1357
  floating: {
1201
1358
  x: 0,
1202
1359
  y: 0,
@@ -1205,119 +1362,119 @@ const Ln = async function(t) {
1205
1362
  }
1206
1363
  };
1207
1364
  };
1208
- function En(t) {
1209
- return D(t).direction === "rtl";
1210
- }
1211
- const Pn = {
1212
- convertOffsetParentRelativeRectToViewportRelativeRect: pn,
1213
- getDocumentElement: V,
1214
- getClippingRect: Rn,
1215
- getOffsetParent: be,
1216
- getElementRects: Ln,
1217
- getClientRects: wn,
1218
- getDimensions: An,
1365
+ function Mn(t) {
1366
+ return F(t).direction === "rtl";
1367
+ }
1368
+ const Nn = {
1369
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
1370
+ getDocumentElement: z,
1371
+ getClippingRect: Cn,
1372
+ getOffsetParent: Ee,
1373
+ getElementRects: Fn,
1374
+ getClientRects: En,
1375
+ getDimensions: Dn,
1219
1376
  getScale: Z,
1220
- isElement: C,
1221
- isRTL: En
1377
+ isElement: W,
1378
+ isRTL: Mn
1222
1379
  };
1223
- function Re(t, e) {
1380
+ function Pe(t, e) {
1224
1381
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1225
1382
  }
1226
- function Tn(t, e) {
1383
+ function Vn(t, e) {
1227
1384
  let o = null, n;
1228
- const s = V(t);
1229
- function r() {
1385
+ const r = z(t);
1386
+ function i() {
1230
1387
  var c;
1231
1388
  clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
1232
1389
  }
1233
- function i(c, a) {
1234
- c === void 0 && (c = !1), a === void 0 && (a = 1), r();
1390
+ function s(c, a) {
1391
+ c === void 0 && (c = !1), a === void 0 && (a = 1), i();
1235
1392
  const l = t.getBoundingClientRect(), {
1236
- left: f,
1393
+ left: u,
1237
1394
  top: h,
1238
- width: m,
1239
- height: u
1395
+ width: p,
1396
+ height: f
1240
1397
  } = l;
1241
- if (c || e(), !m || !u)
1398
+ if (c || e(), !p || !f)
1242
1399
  return;
1243
- const d = dt(h), p = dt(s.clientWidth - (f + m)), g = dt(s.clientHeight - (h + u)), y = dt(f), w = {
1244
- rootMargin: -d + "px " + -p + "px " + -g + "px " + -y + "px",
1245
- threshold: q(0, tt(1, a)) || 1
1400
+ const d = mt(h), w = mt(r.clientWidth - (u + p)), g = mt(r.clientHeight - (h + f)), y = mt(u), v = {
1401
+ rootMargin: -d + "px " + -w + "px " + -g + "px " + -y + "px",
1402
+ threshold: X(0, tt(1, a)) || 1
1246
1403
  };
1247
- let b = !0;
1248
- function x(P) {
1249
- const A = P[0].intersectionRatio;
1250
- if (A !== a) {
1251
- if (!b)
1252
- return i();
1253
- A ? i(!1, A) : n = setTimeout(() => {
1254
- i(!1, 1e-7);
1404
+ let R = !0;
1405
+ function O(T) {
1406
+ const m = T[0].intersectionRatio;
1407
+ if (m !== a) {
1408
+ if (!R)
1409
+ return s();
1410
+ m ? s(!1, m) : n = setTimeout(() => {
1411
+ s(!1, 1e-7);
1255
1412
  }, 1e3);
1256
1413
  }
1257
- A === 1 && !Re(l, t.getBoundingClientRect()) && i(), b = !1;
1414
+ m === 1 && !Pe(l, t.getBoundingClientRect()) && s(), R = !1;
1258
1415
  }
1259
1416
  try {
1260
- o = new IntersectionObserver(x, {
1261
- ...w,
1417
+ o = new IntersectionObserver(O, {
1418
+ ...v,
1262
1419
  // Handle <iframe>s
1263
- root: s.ownerDocument
1420
+ root: r.ownerDocument
1264
1421
  });
1265
1422
  } catch {
1266
- o = new IntersectionObserver(x, w);
1423
+ o = new IntersectionObserver(O, v);
1267
1424
  }
1268
1425
  o.observe(t);
1269
1426
  }
1270
- return i(!0), r;
1427
+ return s(!0), i;
1271
1428
  }
1272
- function kn(t, e, o, n) {
1429
+ function Hn(t, e, o, n) {
1273
1430
  n === void 0 && (n = {});
1274
1431
  const {
1275
- ancestorScroll: s = !0,
1276
- ancestorResize: r = !0,
1277
- elementResize: i = typeof ResizeObserver == "function",
1432
+ ancestorScroll: r = !0,
1433
+ ancestorResize: i = !0,
1434
+ elementResize: s = typeof ResizeObserver == "function",
1278
1435
  layoutShift: c = typeof IntersectionObserver == "function",
1279
1436
  animationFrame: a = !1
1280
- } = n, l = zt(t), f = s || r ? [...l ? rt(l) : [], ...rt(e)] : [];
1281
- f.forEach((y) => {
1282
- s && y.addEventListener("scroll", o, {
1437
+ } = n, l = Ut(t), u = r || i ? [...l ? at(l) : [], ...at(e)] : [];
1438
+ u.forEach((y) => {
1439
+ r && y.addEventListener("scroll", o, {
1283
1440
  passive: !0
1284
- }), r && y.addEventListener("resize", o);
1441
+ }), i && y.addEventListener("resize", o);
1285
1442
  });
1286
- const h = l && c ? Tn(l, o) : null;
1287
- let m = -1, u = null;
1288
- i && (u = new ResizeObserver((y) => {
1289
- let [v] = y;
1290
- v && v.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1291
- var w;
1292
- (w = u) == null || w.observe(e);
1443
+ const h = l && c ? Vn(l, o) : null;
1444
+ let p = -1, f = null;
1445
+ s && (f = new ResizeObserver((y) => {
1446
+ let [x] = y;
1447
+ x && x.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1448
+ var v;
1449
+ (v = f) == null || v.observe(e);
1293
1450
  })), o();
1294
- }), l && !a && u.observe(l), u.observe(e));
1295
- let d, p = a ? J(t) : null;
1451
+ }), l && !a && f.observe(l), f.observe(e));
1452
+ let d, w = a ? J(t) : null;
1296
1453
  a && g();
1297
1454
  function g() {
1298
1455
  const y = J(t);
1299
- p && !Re(p, y) && o(), p = y, d = requestAnimationFrame(g);
1456
+ w && !Pe(w, y) && o(), w = y, d = requestAnimationFrame(g);
1300
1457
  }
1301
1458
  return o(), () => {
1302
1459
  var y;
1303
- f.forEach((v) => {
1304
- s && v.removeEventListener("scroll", o), r && v.removeEventListener("resize", o);
1305
- }), h == null || h(), (y = u) == null || y.disconnect(), u = null, a && cancelAnimationFrame(d);
1460
+ u.forEach((x) => {
1461
+ r && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
1462
+ }), h == null || h(), (y = f) == null || y.disconnect(), f = null, a && cancelAnimationFrame(d);
1306
1463
  };
1307
1464
  }
1308
- const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
1309
- const n = /* @__PURE__ */ new Map(), s = {
1310
- platform: Pn,
1465
+ const $n = vn, zn = xn, te = wn, Bn = pn, _n = (t, e, o) => {
1466
+ const n = /* @__PURE__ */ new Map(), r = {
1467
+ platform: Nn,
1311
1468
  ...o
1312
- }, r = {
1313
- ...s.platform,
1469
+ }, i = {
1470
+ ...r.platform,
1314
1471
  _c: n
1315
1472
  };
1316
- return rn(t, e, {
1317
- ...s,
1318
- platform: r
1473
+ return gn(t, e, {
1474
+ ...r,
1475
+ platform: i
1319
1476
  });
1320
- }, io = [
1477
+ }, go = [
1321
1478
  "top",
1322
1479
  "top-start",
1323
1480
  "top-end",
@@ -1330,42 +1487,42 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
1330
1487
  "left",
1331
1488
  "left-start",
1332
1489
  "left-end"
1333
- ], ro = (t, e = { isOpen: !1 }) => {
1490
+ ], po = (t, e = { isOpen: !1 }) => {
1334
1491
  const o = [];
1335
1492
  let n = null;
1336
- const s = L.deriveProp(e.isOpen);
1337
- function r(c) {
1338
- n = c, s.set(!0);
1493
+ const r = k.deriveProp(e.isOpen);
1494
+ function i(c) {
1495
+ n = c, r.set(!0);
1339
1496
  }
1340
- function i() {
1341
- s.set(!1), o.forEach((c) => c()), o.length = 0;
1497
+ function s() {
1498
+ r.set(!1), o.forEach((c) => c()), o.length = 0;
1342
1499
  }
1343
- return K(
1344
- t(r, i),
1345
- re(
1346
- s,
1347
- () => K(
1348
- (n == null ? void 0 : n.onClickOutside) != null ? Xe(n.onClickOutside) : null,
1349
- H(
1350
- (c) => ie(
1500
+ return j(
1501
+ t(i, s),
1502
+ ue(
1503
+ r,
1504
+ () => j(
1505
+ (n == null ? void 0 : n.onClickOutside) != null ? on(n.onClickOutside) : null,
1506
+ _(
1507
+ (c) => le(
1351
1508
  "body",
1352
- Lt.div(
1353
- H((a) => {
1509
+ Pt.div(
1510
+ _((a) => {
1354
1511
  a.style.position = "absolute";
1355
1512
  const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
1356
1513
  n.target
1357
1514
  ) : (n == null ? void 0 : n.target) ?? c;
1358
1515
  if (l == null)
1359
1516
  throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
1360
- let f = null;
1361
- const h = L.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = L.toSignal(
1517
+ let u = null;
1518
+ const h = k.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), p = k.toSignal(
1362
1519
  (n == null ? void 0 : n.crossAxisOffset) ?? 0
1363
- ), u = L.toSignal(
1520
+ ), f = k.toSignal(
1364
1521
  /* c8 ignore next 3 */
1365
1522
  (n == null ? void 0 : n.placement) ?? "top"
1366
- ), d = L.toSignal(
1523
+ ), d = k.toSignal(
1367
1524
  (n == null ? void 0 : n.arrowPadding) ?? 0
1368
- ), p = n == null ? void 0 : n.arrow, g = W({
1525
+ ), w = n == null ? void 0 : n.arrow, g = M({
1369
1526
  centerOffset: 0,
1370
1527
  alignmentOffset: 0,
1371
1528
  containerWidth: 0,
@@ -1374,68 +1531,68 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
1374
1531
  y: void 0
1375
1532
  });
1376
1533
  async function y() {
1377
- const w = [
1378
- Qt(),
1379
- Sn({
1534
+ const v = [
1535
+ te(),
1536
+ $n({
1380
1537
  mainAxis: h.get(),
1381
- crossAxis: m.get()
1538
+ crossAxis: p.get()
1382
1539
  }),
1383
- Cn(),
1384
- Qt()
1540
+ zn(),
1541
+ te()
1385
1542
  ];
1386
- p != null && f != null && w.push(
1387
- Dn({
1388
- element: f,
1543
+ w != null && u != null && v.push(
1544
+ Bn({
1545
+ element: u,
1389
1546
  padding: d.get()
1390
1547
  })
1391
1548
  );
1392
- const b = await Wn(l, a, {
1393
- placement: u.get(),
1549
+ const R = await _n(l, a, {
1550
+ placement: f.get(),
1394
1551
  strategy: "absolute",
1395
- middleware: w
1396
- }), { x, y: P, middlewareData: A } = b;
1397
- if (a.style.top = `${P}px`, a.style.left = `${x}px`, f != null && A.arrow != null) {
1552
+ middleware: v
1553
+ }), { x: O, y: T, middlewareData: m } = R;
1554
+ if (a.style.top = `${T}px`, a.style.left = `${O}px`, u != null && m.arrow != null) {
1398
1555
  const {
1399
- x: _,
1400
- y: $,
1401
- centerOffset: T,
1402
- alignmentOffset: I
1403
- } = A.arrow;
1556
+ x: b,
1557
+ y: A,
1558
+ centerOffset: E,
1559
+ alignmentOffset: V
1560
+ } = m.arrow;
1404
1561
  g.set({
1405
- x: _,
1406
- y: $,
1407
- centerOffset: T,
1408
- alignmentOffset: I,
1562
+ x: b,
1563
+ y: A,
1564
+ centerOffset: E,
1565
+ alignmentOffset: V,
1409
1566
  containerWidth: a.offsetWidth,
1410
1567
  containerHeight: a.offsetHeight
1411
1568
  });
1412
1569
  }
1413
1570
  }
1414
- const v = Te(
1571
+ const x = Fe(
1415
1572
  h,
1416
- m,
1417
- u
1573
+ p,
1574
+ f
1418
1575
  )(y);
1419
- return K(
1576
+ return j(
1420
1577
  n == null ? void 0 : n.content,
1421
- (n == null ? void 0 : n.arrow) != null ? Lt.div(
1578
+ (n == null ? void 0 : n.arrow) != null ? Pt.div(
1422
1579
  n == null ? void 0 : n.arrow(
1423
- ce(
1580
+ fe(
1424
1581
  g,
1425
- u
1426
- )((w, b) => ({
1427
- ...w,
1428
- placement: b
1582
+ f
1583
+ )((v, R) => ({
1584
+ ...v,
1585
+ placement: R
1429
1586
  }))
1430
1587
  ),
1431
- H((w) => {
1432
- f = w, y();
1588
+ _((v) => {
1589
+ u = v, y();
1433
1590
  })
1434
1591
  ) : null,
1435
- F(
1592
+ N(
1436
1593
  g.dispose,
1437
- kn(l, a, y),
1438
- v
1594
+ Hn(l, a, y),
1595
+ x
1439
1596
  )
1440
1597
  );
1441
1598
  })
@@ -1445,88 +1602,88 @@ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
1445
1602
  )
1446
1603
  )
1447
1604
  );
1448
- }, Fn = ({
1605
+ }, Kn = ({
1449
1606
  request: t,
1450
1607
  load: e,
1451
1608
  convertError: o,
1452
1609
  onSuccess: n,
1453
- onError: s,
1454
- onSettled: r
1610
+ onError: r,
1611
+ onSettled: i
1455
1612
  }) => {
1456
- let i;
1457
- const c = W(R.notAsked), a = c.map(
1458
- (g) => R.isSuccess(g) ? g.value : void 0
1613
+ let s;
1614
+ const c = M(L.notAsked), a = c.map(
1615
+ (g) => L.isSuccess(g) ? g.value : void 0
1459
1616
  ), l = c.map(
1460
- (g) => R.isFailure(g) ? g.error : void 0
1461
- ), f = c.map((g) => R.isLoading(g)), h = () => {
1462
- i == null || i.abort(), i = void 0;
1463
- }, m = (g) => {
1464
- h(), c.set(g ?? R.notAsked);
1465
- }, u = async (g) => {
1466
- h(), i = new AbortController();
1467
- const y = i.signal, v = c.get();
1468
- c.set(R.loading(R.getOrUndefined(v)));
1617
+ (g) => L.isFailure(g) ? g.error : void 0
1618
+ ), u = c.map((g) => L.isLoading(g)), h = () => {
1619
+ s == null || s.abort(), s = void 0;
1620
+ }, p = (g) => {
1621
+ h(), c.set(g ?? L.notAsked);
1622
+ }, f = async (g) => {
1623
+ h(), s = new AbortController();
1624
+ const y = s.signal, x = c.get();
1625
+ c.set(L.loading(L.getOrUndefined(x)));
1469
1626
  try {
1470
- const w = await e({ request: g, abortSignal: y, previous: v });
1471
- await Promise.resolve(), i = void 0, c.set(R.success(w)), n == null || n(w, g);
1472
- } catch (w) {
1473
- i = void 0, c.set(R.failure(o(w))), s == null || s(o(w), g);
1627
+ const v = await e({ request: g, abortSignal: y, previous: x });
1628
+ await Promise.resolve(), s = void 0, c.set(L.success(v)), n == null || n(v, g);
1629
+ } catch (v) {
1630
+ s = void 0, c.set(L.failure(o(v))), r == null || r(o(v), g);
1474
1631
  }
1475
- r == null || r(c.get(), g);
1476
- }, d = () => u(L.get(t)), p = () => {
1477
- i == null || i.abort(), i = void 0, c.dispose();
1632
+ i == null || i(c.get(), g);
1633
+ }, d = () => f(k.get(t)), w = () => {
1634
+ s == null || s.abort(), s = void 0, c.dispose();
1478
1635
  };
1479
- return c.onDispose(L.on(t, u)), {
1636
+ return c.onDispose(k.on(t, f)), {
1480
1637
  status: c,
1481
1638
  value: a,
1482
1639
  error: l,
1483
- loading: f,
1484
- cancel: m,
1640
+ loading: u,
1641
+ cancel: p,
1485
1642
  reload: d,
1486
- dispose: p
1643
+ dispose: w
1487
1644
  };
1488
- }, Mn = (t, e) => {
1489
- const { status: o, dispose: n, reload: s } = t, { pending: r, failure: i, success: c } = e;
1490
- return K(
1491
- F(n),
1492
- Vt(o, {
1493
- loading: r != null ? (a) => r({ previous: a, reload: s, cancel: t.cancel }) : void 0,
1494
- failure: i != null ? (a) => i({ error: a, reload: s }) : void 0,
1495
- success: (a) => c({ value: a, reload: s })
1645
+ }, Un = (t, e) => {
1646
+ const { status: o, dispose: n, reload: r } = t, { pending: i, failure: s, success: c } = e;
1647
+ return j(
1648
+ N(n),
1649
+ ge(o, {
1650
+ loading: i != null ? (a) => i({ previous: a, reload: r, cancel: t.cancel }) : void 0,
1651
+ failure: s != null ? (a) => s({ error: a, reload: r }) : void 0,
1652
+ success: (a) => c({ value: a, reload: r })
1496
1653
  })
1497
1654
  );
1498
- }, co = ({
1655
+ }, wo = ({
1499
1656
  request: t,
1500
1657
  load: e,
1501
1658
  convertError: o = (l) => l,
1502
1659
  onSuccess: n,
1503
- onError: s,
1504
- onSettled: r,
1505
- success: i,
1660
+ onError: r,
1661
+ onSettled: i,
1662
+ success: s,
1506
1663
  pending: c,
1507
1664
  failure: a
1508
1665
  }) => {
1509
- const l = Fn({
1666
+ const l = Kn({
1510
1667
  request: t,
1511
1668
  load: e,
1512
1669
  convertError: o,
1513
1670
  onSuccess: n,
1514
- onError: s,
1515
- onSettled: r
1671
+ onError: r,
1672
+ onSettled: i
1516
1673
  });
1517
- return Mn(l, { success: i, pending: c, failure: a });
1518
- }, Nn = (t, e) => {
1674
+ return Un(l, { success: s, pending: c, failure: a });
1675
+ }, jn = (t, e) => {
1519
1676
  if (typeof e == "function")
1520
- return Nn(t, { success: e });
1521
- const o = e.failure ?? ((s) => K(
1522
- F(s.on(console.error)),
1523
- s.map((r) => `Error: ${r}`)
1677
+ return jn(t, { success: e });
1678
+ const o = e.failure ?? ((r) => j(
1679
+ N(r.on(console.error)),
1680
+ r.map((i) => `Error: ${i}`)
1524
1681
  )), n = e.success;
1525
- return se(L.toSignal(t), {
1526
- Success: (s) => n(s.$.value),
1527
- Failure: (s) => o(s.$.error)
1682
+ return ae(k.toSignal(t), {
1683
+ Success: (r) => n(r.$.value),
1684
+ Failure: (r) => o(r.$.error)
1528
1685
  });
1529
- }, ao = () => oe.focus((t) => {
1686
+ }, yo = () => ce.focus((t) => {
1530
1687
  var e;
1531
1688
  return (e = t.target) == null ? void 0 : e.select();
1532
1689
  });
@@ -1548,7 +1705,7 @@ class Rt {
1548
1705
  * console.log(rect.height); // 50
1549
1706
  * ```
1550
1707
  */
1551
- constructor(e, o, n, s, r, i) {
1708
+ constructor(e, o, n, r, i, s) {
1552
1709
  /**
1553
1710
  * Compares this rectangle with another rectangle for equality.
1554
1711
  *
@@ -1569,8 +1726,8 @@ class Rt {
1569
1726
  * console.log(rect1.equals(rect3)); // true (within tolerance)
1570
1727
  * ```
1571
1728
  */
1572
- At(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
1573
- this.left = e, this.top = o, this.width = n, this.height = s, this.localLeft = r, this.localTop = i;
1729
+ Lt(this, "equals", (e) => dt(this.left, e.left) && dt(this.top, e.top) && dt(this.width, e.width) && dt(this.height, e.height));
1730
+ this.left = e, this.top = o, this.width = n, this.height = r, this.localLeft = i, this.localTop = s;
1574
1731
  }
1575
1732
  /**
1576
1733
  * Creates a new Rect instance using an object with optional properties.
@@ -1601,11 +1758,11 @@ class Rt {
1601
1758
  left: e = 0,
1602
1759
  top: o = 0,
1603
1760
  width: n = 0,
1604
- height: s = 0,
1605
- localLeft: r = 0,
1606
- localTop: i = 0
1761
+ height: r = 0,
1762
+ localLeft: i = 0,
1763
+ localTop: s = 0
1607
1764
  }) {
1608
- return new Rt(e, o, n, s, r, i);
1765
+ return new Rt(e, o, n, r, i, s);
1609
1766
  }
1610
1767
  /**
1611
1768
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1718,7 +1875,7 @@ class Rt {
1718
1875
  return { width: this.width, height: this.height };
1719
1876
  }
1720
1877
  }
1721
- function Jt(t) {
1878
+ function ee(t) {
1722
1879
  const e = t.getBoundingClientRect();
1723
1880
  return Rt.of({
1724
1881
  top: e.top + window.scrollY,
@@ -1729,149 +1886,163 @@ function Jt(t) {
1729
1886
  localTop: t.offsetTop
1730
1887
  });
1731
1888
  }
1732
- const lo = (t) => ke((e) => {
1733
- const { element: o } = e, n = W(Jt(o), (c, a) => c.equals(a)), s = Mt(t(n))(e), r = () => n.set(Rt.of(Jt(o)));
1734
- let i = null;
1735
- return typeof ResizeObserver < "u" && (i = new ResizeObserver(r)), i == null || i.observe(o), F((c) => {
1736
- i == null || i.disconnect(), s(c);
1889
+ const vo = (t) => Me((e) => {
1890
+ const { element: o } = e, n = M(ee(o), (c, a) => c.equals(a)), r = Ht(t(n))(e), i = () => n.set(Rt.of(ee(o)));
1891
+ let s = null;
1892
+ return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s == null || s.observe(o), N((c) => {
1893
+ s == null || s.disconnect(), r(c);
1737
1894
  });
1738
1895
  });
1739
- function Gt(t) {
1896
+ function ne(t) {
1740
1897
  return {
1741
1898
  /* c8 ignore next 6 */
1742
1899
  width: (t == null ? void 0 : t.innerWidth) ?? 0,
1743
1900
  height: (t == null ? void 0 : t.innerHeight) ?? 0
1744
1901
  };
1745
1902
  }
1746
- const uo = (t) => (e) => {
1747
- const o = at(), n = W(
1748
- Gt(o),
1749
- (i, c) => i.width === c.width && i.height === c.height
1750
- ), s = Mt(t(n))(e), r = () => n.set(Gt(o));
1751
- return o == null || o.addEventListener("resize", r), (i) => {
1752
- o == null || o.removeEventListener("resize", r), s(i);
1903
+ const xo = (t) => (e) => {
1904
+ const o = nt(), n = M(
1905
+ ne(o),
1906
+ (s, c) => s.width === c.width && s.height === c.height
1907
+ ), r = Ht(t(n))(e), i = () => n.set(ne(o));
1908
+ return o == null || o.addEventListener("resize", i), (s) => {
1909
+ o == null || o.removeEventListener("resize", i), r(s);
1753
1910
  };
1754
- }, Vn = (t, e) => {
1755
- const o = e.split("/").filter((s) => s !== ""), n = {};
1756
- for (let s = 0; s < t.length; s++) {
1757
- const r = t[s], i = o[s];
1758
- if (!i && r.type !== "catch-all")
1911
+ }, In = (t, e) => {
1912
+ const o = e.split("/").filter((r) => r !== ""), n = {};
1913
+ for (let r = 0; r < t.length; r++) {
1914
+ const i = t[r], s = o[r];
1915
+ if (!s && i.type !== "catch-all")
1759
1916
  return null;
1760
- if (r.type === "literal") {
1761
- if (r.value !== i)
1917
+ if (i.type === "literal") {
1918
+ if (i.value !== s)
1762
1919
  return null;
1763
- } else if (r.type === "param")
1764
- n[r.name] = i;
1765
- else if (r.type === "catch-all")
1920
+ } else if (i.type === "param")
1921
+ n[i.name] = s;
1922
+ else if (i.type === "catch-all") {
1923
+ if (i.name) {
1924
+ const c = o.slice(r).join("/");
1925
+ n[i.name] = c;
1926
+ }
1766
1927
  return { params: n, path: e };
1928
+ }
1767
1929
  }
1768
1930
  return o.length !== t.length ? null : { params: n, path: e };
1769
- }, Ae = (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 !== ""), fo = (t) => {
1931
+ }, Se = (t) => t.split("/").map((e) => {
1932
+ if (e.startsWith(":"))
1933
+ return { type: "param", name: e.slice(1) };
1934
+ if (e.startsWith("*")) {
1935
+ const o = e.slice(1);
1936
+ return o != "" ? { type: "catch-all", name: o } : { type: "catch-all" };
1937
+ } else
1938
+ return { type: "literal", value: e };
1939
+ }).filter((e) => e.type !== "literal" || e.value !== ""), bo = (t) => {
1770
1940
  const e = t.map((o) => {
1771
- const n = Ae(o);
1941
+ const n = Se(o);
1772
1942
  return { route: o, segments: n };
1773
1943
  });
1774
1944
  return function(n) {
1775
- for (const { segments: s, route: r } of e) {
1776
- const i = Vn(s, n);
1777
- if (i)
1778
- return { ...i, route: r };
1945
+ for (const { segments: r, route: i } of e) {
1946
+ const s = In(r, n);
1947
+ if (s)
1948
+ return { ...s, route: i };
1779
1949
  }
1780
1950
  return null;
1781
1951
  };
1782
- }, Ct = {
1783
- mark: Wt("RouterContext"),
1952
+ }, Ft = {
1953
+ mark: Nt("RouterContext"),
1784
1954
  create: () => {
1785
- const t = W([]);
1955
+ const t = M([]);
1786
1956
  return {
1787
1957
  value: t,
1788
1958
  dispose: () => t.dispose()
1789
1959
  };
1790
1960
  }
1791
- }, $n = (t, e, o) => {
1792
- const n = o.split("/").filter((i) => i !== ""), s = {};
1793
- let r = 0;
1794
- for (let i = 0; i < t.length; i++) {
1795
- const c = t[i], a = n[i];
1961
+ }, Yn = (t, e, o) => {
1962
+ const n = o.split("/").filter((s) => s !== ""), r = {};
1963
+ let i = 0;
1964
+ for (let s = 0; s < t.length; s++) {
1965
+ const c = t[s], a = n[s];
1796
1966
  if (!a && c.type !== "catch-all")
1797
1967
  return null;
1798
1968
  if (c.type === "literal") {
1799
1969
  if (c.value !== a)
1800
1970
  return null;
1801
- r++;
1971
+ i++;
1802
1972
  } else if (c.type === "param")
1803
- s[c.name] = a, r++;
1973
+ r[c.name] = a, i++;
1804
1974
  else if (c.type === "catch-all") {
1805
- const l = "/" + n.slice(0, r).join("/"), f = "/" + n.slice(r).join("/");
1975
+ c.name && (r[c.name] = n.slice(i).join("/"));
1976
+ const l = "/" + n.slice(0, i).join("/"), u = "/" + n.slice(i).join("/");
1806
1977
  return {
1807
- params: s,
1978
+ params: r,
1808
1979
  matchedPath: l === "/" ? "" : l,
1809
- remainingPath: f === "/" ? "" : f,
1980
+ remainingPath: u === "/" ? "" : u,
1810
1981
  route: e
1811
1982
  };
1812
1983
  }
1813
1984
  }
1814
1985
  if (n.length === t.length) {
1815
- const i = "/" + n.join("/");
1986
+ const s = "/" + n.join("/");
1816
1987
  return {
1817
- params: s,
1818
- matchedPath: i === "/" ? "" : i,
1988
+ params: r,
1989
+ matchedPath: s === "/" ? "" : s,
1819
1990
  remainingPath: "",
1820
1991
  route: e
1821
1992
  };
1822
1993
  }
1823
1994
  return null;
1824
- }, Oe = (t) => {
1995
+ }, Te = (t) => {
1825
1996
  const e = t.map((o) => {
1826
- const n = Ae(o);
1997
+ const n = Se(o);
1827
1998
  return { route: o, segments: n };
1828
1999
  });
1829
2000
  return function(n) {
1830
- for (const { segments: s, route: r } of e) {
1831
- const i = $n(s, r, n);
1832
- if (i)
1833
- return i;
2001
+ for (const { segments: r, route: i } of e) {
2002
+ const s = Yn(r, i, n);
2003
+ if (s)
2004
+ return s;
1834
2005
  }
1835
2006
  return null;
1836
2007
  };
1837
- }, ho = (t) => {
1838
- const e = Oe(Object.keys(t));
1839
- return Se(
1840
- Ct,
2008
+ }, Ao = (t) => {
2009
+ const e = Te(Object.keys(t));
2010
+ return Ne(
2011
+ Ft,
1841
2012
  {},
1842
- () => it(Nt, (o) => it(Ct, (n) => {
1843
- const s = o.map((r) => {
1844
- const i = e(r.pathname);
1845
- if (i == null)
1846
- throw console.error("No route found for", r), new Error("No route found");
2013
+ () => ct($t, (o) => ct(Ft, (n) => {
2014
+ const r = o.location.map((i) => {
2015
+ const s = e(i.pathname);
2016
+ if (s == null)
2017
+ throw console.error("No route found for", i), new Error("No route found");
1847
2018
  const c = {
1848
- matchedPath: i.matchedPath,
1849
- remainingPath: i.remainingPath,
1850
- fullPath: r.pathname,
1851
- params: i.params
2019
+ matchedPath: s.matchedPath,
2020
+ remainingPath: s.remainingPath,
2021
+ fullPath: i.pathname,
2022
+ params: s.params
1852
2023
  };
1853
2024
  return n.value = [...n.value, c], {
1854
- params: i.params,
1855
- route: i.route,
1856
- path: i.matchedPath || r.pathname,
1857
- search: r.search,
1858
- hash: r.hash
2025
+ params: s.params,
2026
+ route: s.route,
2027
+ path: s.matchedPath || i.pathname,
2028
+ search: i.search,
2029
+ hash: i.hash
1859
2030
  };
1860
2031
  });
1861
- return ae(
1862
- s.map((r) => [r.route, r]),
2032
+ return he(
2033
+ r.map((i) => [i.route, i]),
1863
2034
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1864
2035
  t
1865
2036
  );
1866
2037
  }))
1867
2038
  );
1868
- }, mo = (t) => {
1869
- const e = Oe(Object.keys(t));
1870
- return it(Ct, (o) => it(Nt, (n) => {
1871
- const s = o.map((r) => {
1872
- const i = r[r.length - 1], c = (i == null ? void 0 : i.remainingPath) || "";
2039
+ }, Oo = (t) => {
2040
+ const e = Te(Object.keys(t));
2041
+ return ct(Ft, (o) => ct($t, (n) => {
2042
+ const r = o.map((i) => {
2043
+ const s = i[i.length - 1], c = (s == null ? void 0 : s.remainingPath) || "";
1873
2044
  if (c === "")
1874
- throw console.error("No remaining path for SubRouter", r), new Error("No remaining path for SubRouter");
2045
+ throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
1875
2046
  const a = e(c);
1876
2047
  if (a == null)
1877
2048
  throw console.error("No route found for remaining path", c), new Error("No route found");
@@ -1880,152 +2051,151 @@ const uo = (t) => (e) => {
1880
2051
  // Only this router's parameters
1881
2052
  route: a.route,
1882
2053
  path: a.matchedPath,
1883
- search: n.value.search,
1884
- hash: n.value.hash
2054
+ search: n.location.value.search,
2055
+ hash: n.location.value.hash
1885
2056
  };
1886
2057
  });
1887
- return ae(
1888
- s.map((r) => [r.route, r]),
2058
+ return he(
2059
+ r.map((i) => [i.route, i]),
1889
2060
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1890
2061
  t
1891
2062
  );
1892
2063
  }));
1893
- }, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Zt = 7 * ct, te = 30 * ct, Bn = 365 * ct, Hn = [
2064
+ }, xt = 60 * 1e3, Mt = 60 * xt, lt = 24 * Mt, oe = 7 * lt, se = 30 * lt, qn = 365 * lt, Xn = [
1894
2065
  {
1895
- max: yt * 90,
1896
- value: yt,
2066
+ max: xt * 90,
2067
+ value: xt,
1897
2068
  name: "minute",
1898
2069
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1899
2070
  future: { singular: "in a minute", plural: "in {} minutes" }
1900
2071
  },
1901
2072
  {
1902
- max: Dt * 36,
1903
- value: Dt,
2073
+ max: Mt * 36,
2074
+ value: Mt,
1904
2075
  name: "hour",
1905
2076
  past: { singular: "an hour ago", plural: "{} hours ago" },
1906
2077
  future: { singular: "in an hour", plural: "in {} hours" }
1907
2078
  },
1908
2079
  {
1909
- max: ct * 10,
1910
- value: ct,
2080
+ max: lt * 10,
2081
+ value: lt,
1911
2082
  name: "day",
1912
2083
  past: { singular: "yesterday", plural: "{} days ago" },
1913
2084
  future: { singular: "tomorrow", plural: "in {} days" }
1914
2085
  },
1915
2086
  {
1916
- max: Zt * 6,
1917
- value: Zt,
2087
+ max: oe * 6,
2088
+ value: oe,
1918
2089
  name: "week",
1919
2090
  past: { singular: "last week", plural: "{} weeks ago" },
1920
2091
  future: { singular: "in a week", plural: "in {} weeks" }
1921
2092
  },
1922
2093
  {
1923
- max: te * 18,
1924
- value: te,
2094
+ max: se * 18,
2095
+ value: se,
1925
2096
  name: "month",
1926
2097
  past: { singular: "last month", plural: "{} months ago" },
1927
2098
  future: { singular: "in a month", plural: "in {} months" }
1928
2099
  },
1929
2100
  {
1930
2101
  max: 1 / 0,
1931
- value: Bn,
2102
+ value: qn,
1932
2103
  name: "year",
1933
2104
  past: { singular: "last year", plural: "{} years ago" },
1934
2105
  future: { singular: "in a year", plural: "in {} years" }
1935
2106
  }
1936
2107
  ];
1937
- function ee(t, e, o, n) {
1938
- const s = Math.round(t / e);
1939
- return s <= 1 ? o : n.replace(
2108
+ function re(t, e, o, n) {
2109
+ const r = Math.round(t / e);
2110
+ return r <= 1 ? o : n.replace(
1940
2111
  "{}",
1941
- s.toLocaleString(void 0, {
2112
+ r.toLocaleString(void 0, {
1942
2113
  maximumFractionDigits: 0,
1943
2114
  minimumFractionDigits: 0
1944
2115
  })
1945
2116
  );
1946
2117
  }
1947
- const Un = (t = 1e3) => {
1948
- const e = W(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
2118
+ const Qn = (t = 1e3) => {
2119
+ const e = M(/* @__PURE__ */ new Date()), o = He(() => e.set(/* @__PURE__ */ new Date()), t);
1949
2120
  return e.onDispose(o), e;
1950
- }, zn = (t) => {
2121
+ }, Jn = (t) => {
1951
2122
  const e = Math.abs(t);
1952
- if (e < yt)
2123
+ if (e < xt)
1953
2124
  return t < 0 ? "just now" : "in a moment";
1954
- for (const o of Hn)
2125
+ for (const o of Xn)
1955
2126
  if (e < o.max)
1956
- return t < 0 ? ee(e, o.value, o.past.singular, o.past.plural) : ee(e, o.value, o.future.singular, o.future.plural);
2127
+ return t < 0 ? re(e, o.value, o.past.singular, o.past.plural) : re(e, o.value, o.future.singular, o.future.plural);
1957
2128
  throw new Error("unreachable");
1958
- }, Kn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1959
- const n = e != null ? ne.is(e) ? e.derive() : W(e) : Un(o), s = ce(
2129
+ }, Gn = (t, { now: e, frequency: o = 1e4 } = {}) => {
2130
+ const n = e != null ? ie.is(e) ? e.derive() : M(e) : Qn(o), r = fe(
1960
2131
  t,
1961
2132
  n
1962
- )((r, i) => r.getTime() - i.getTime());
1963
- return s.onDispose(() => L.dispose(n)), s;
1964
- }, jn = (t, e = {}) => {
1965
- const o = Kn(t, e), n = o.map(zn);
2133
+ )((i, s) => i.getTime() - s.getTime());
2134
+ return r.onDispose(() => k.dispose(n)), r;
2135
+ }, Zn = (t, e = {}) => {
2136
+ const o = Gn(t, e), n = o.map(Jn);
1966
2137
  return n.onDispose(o.dispose), n;
1967
- }, go = (t, e = {}) => jn(t, e);
1968
- class _n extends Ce {
2138
+ }, Ro = (t, e = {}) => Zn(t, e);
2139
+ class to extends Ve {
1969
2140
  constructor() {
1970
2141
  super(...arguments);
1971
2142
  /**
1972
2143
  * Triggers an update of the Ticker by incrementing its internal value.
1973
2144
  * @returns void
1974
2145
  */
1975
- At(this, "tick", () => this.update((o) => o + 1));
2146
+ Lt(this, "tick", () => this.update((o) => o + 1));
1976
2147
  }
1977
2148
  }
1978
- const po = (t = 0) => new _n(t, (e, o) => e === o);
2149
+ const Lo = (t = 0) => new to(t, (e, o) => e === o);
1979
2150
  export {
1980
- Ke as Anchor,
1981
- qn as Appearance,
1982
- Vt as AsyncResultView,
1983
- Qn as AutoFocus,
1984
- Jn as AutoSelect,
1985
- mo as ChildRouter,
1986
- lo as ElementRect,
1987
- to as HTMLTitle,
1988
- Zn as HiddenWhenEmpty,
1989
- Ye as InViewport,
1990
- Nt as Location,
1991
- so as Mutation,
1992
- Je as MutationDisplay,
1993
- Xe as OnClickOutside,
1994
- no as OnEnterKey,
1995
- oo as OnEscapeKey,
1996
- fe as OnKeyPressed,
1997
- ro as PopOver,
1998
- co as Query,
1999
- Mn as QueryDisplay,
2151
+ Ge as Anchor,
2152
+ so as Appearance,
2153
+ ge as AsyncResultView,
2154
+ ro as AutoFocus,
2155
+ io as AutoSelect,
2156
+ Oo as ChildRouter,
2157
+ vo as ElementRect,
2158
+ lo as HTMLTitle,
2159
+ ao as HiddenWhenEmpty,
2160
+ nn as InViewport,
2161
+ $t as Location,
2162
+ mo as Mutation,
2163
+ cn as MutationDisplay,
2164
+ on as OnClickOutside,
2165
+ fo as OnEnterKey,
2166
+ ho as OnEscapeKey,
2167
+ pe as OnKeyPressed,
2168
+ po as PopOver,
2169
+ wo as Query,
2170
+ Un as QueryDisplay,
2000
2171
  Rt as Rect,
2001
- Nn as ResultView,
2002
- ho as RootRouter,
2003
- Ct as RouterContextProvider,
2004
- ao as SelectOnFocus,
2005
- _n as Ticker,
2006
- eo as WhenInViewport,
2007
- uo as WindowSize,
2008
- Fe as _checkExtensionCondition,
2009
- We as _getExtension,
2010
- fo as _makeRouteMatcher,
2011
- Ae as _parseRouteSegments,
2012
- io as allPlacements,
2013
- Ve as areLocationsEqual,
2014
- Gn as classes,
2015
- Jt as getAbsoluteRect,
2016
- Ne as handleAnchorClick,
2017
- ue as locationFromURL,
2018
- Qe as makeMutationResource,
2019
- Fn as makeQueryResource,
2020
- qe as matchesKeyCombo,
2021
- Vn as matchesRoute,
2022
- Un as nowSignal,
2023
- go as relativeTime,
2024
- Kn as relativeTimeMillisSignal,
2025
- jn as relativeTimeSignal,
2026
- jt as setLocationFromUrl,
2027
- po as ticker,
2028
- zn as timeDiffToString,
2029
- Pt as urlFromLocation,
2030
- je as useAppearance
2172
+ jn as ResultView,
2173
+ Ao as RootRouter,
2174
+ Ft as RouterContextProvider,
2175
+ yo as SelectOnFocus,
2176
+ to as Ticker,
2177
+ uo as WhenInViewport,
2178
+ xo as WindowSize,
2179
+ ze as _checkExtensionCondition,
2180
+ $e as _getExtension,
2181
+ bo as _makeRouteMatcher,
2182
+ Se as _parseRouteSegments,
2183
+ go as allPlacements,
2184
+ Ke as areLocationsEqual,
2185
+ co as classes,
2186
+ ee as getAbsoluteRect,
2187
+ _e as handleAnchorClick,
2188
+ Tt as locationFromURL,
2189
+ rn as makeMutationResource,
2190
+ Kn as makeQueryResource,
2191
+ sn as matchesKeyCombo,
2192
+ In as matchesRoute,
2193
+ Qn as nowSignal,
2194
+ Ro as relativeTime,
2195
+ Gn as relativeTimeMillisSignal,
2196
+ Zn as relativeTimeSignal,
2197
+ Lo as ticker,
2198
+ Jn as timeDiffToString,
2199
+ pt as urlFromLocation,
2200
+ Ze as useAppearance
2031
2201
  };