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