@tempots/ui 7.0.3 → 8.0.1

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