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