@tempots/ui 5.0.0 → 5.1.0

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