@nil-/xit 0.2.2 → 0.2.3

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.
@@ -1,2304 +0,0 @@
1
- var Yt = Object.defineProperty;
2
- var lt = (e) => {
3
- throw TypeError(e);
4
- };
5
- var Vt = (e, t, r) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
- var I = (e, t, r) => Vt(e, typeof t != "symbol" ? t + "" : t, r), Me = (e, t, r) => t.has(e) || lt("Cannot " + r);
7
- var E = (e, t, r) => (Me(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Z = (e, t, r) => t.has(e) ? lt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ue = (e, t, r, s) => (Me(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r), ct = (e, t, r) => (Me(e, t, "access private method"), r);
8
- import { u as C, h as Ut, i as Gt, j as $, H as Kt, k as Xe, l as At, F as ae, m as Wt, c as te, p as Y, E as ne, g as k, q as S, v as T, w as he, x as we, y as Xt, z as Se, A as Jt, B as Zt, C as Qt, D as jt, U as ie, G as Et, I as P, J as er, K as ce, L as W, M as B, N as X, O as ye, P as K, Q as D, R as Nt, S as me, T as q, V as j, W as tr, b as x, X as J, Y as Q, Z as Tt, _ as xt, $ as De, a0 as kt, a1 as F, a2 as Je, a3 as Ze, a4 as rr, a5 as sr, a6 as ar, a7 as ir, a8 as Qe, a9 as nr, aa as Ce, ab as fr, ac as St, ad as ur, ae as lr, af as Ve, ag as cr, ah as or, ai as _r, aj as z, ak as Ct, s as vr, al as dr, am as hr, an as Ue, ao as br, ap as $r, aq as pr, ar as gr, as as wr, at as yr, au as je, av as mr, aw as Ar, ax as Er, ay as Nr, az as Tr, aA as re, n as U, aB as xr, aC as kr, aD as Sr, aE as R, aF as be, aG as Rt, aH as _e, aI as Re, aJ as It, aK as Cr, aL as ot, aM as Rr, r as _t, aN as Ot, a as Ie, aO as Ae, aP as Ir, aQ as Lt, aR as Or, aS as Lr, aT as Pr, aU as vt, aV as et, aW as Mr, aX as Dr, aY as qr, aZ as Br, a_ as Fr, a$ as zr, b0 as Hr, b1 as qe, b2 as Yr, b3 as Vr, b4 as Ur, b5 as Gr, b6 as Kr, b7 as Wr, b8 as Xr, b9 as Ee, d as Jr, ba as Zr, bb as Qr, bc as jr, bd as es, be as ts, bf as rs } from "../index.js";
9
- import { bi as xi, bj as ki, bm as Si, bs as Ci, bR as Ri, by as Ii, bQ as Oi, bV as Li, e as Pi, bZ as Mi, bt as Di, bP as qi, bW as Bi, bS as Fi, br as zi, bw as Hi, bX as Yi, bO as Vi, bF as Ui, bG as Gi, bl as Ki, bk as Wi, bB as Xi, bI as Ji, bJ as Zi, bz as Qi, bh as ji, bg as en, bv as tn, bu as rn, bx as sn, bN as an, bM as nn, bT as fn, bn as un, bp as ln, bK as cn, bY as on, bA as _n, bC as vn, bH as dn, bD as hn, bE as bn, t as $n, bo as pn, bL as gn, bU as wn, bq as yn } from "../index.js";
10
- import { l as ss } from "../motion.js";
11
- import { r as An } from "../motion.js";
12
- import { s as as, g as is } from "../store.js";
13
- function Oe(e, t, r, s) {
14
- return e !== t && Ut(
15
- r,
16
- /** @type {string} */
17
- Gt(s)
18
- ), e;
19
- }
20
- function Ls(e, t, r, s) {
21
- return Oe(
22
- e[t] = r,
23
- C(() => e[t]),
24
- t,
25
- s
26
- );
27
- }
28
- function Ps(e, t, r, s) {
29
- return Oe(
30
- e[t] && (e[t] = r),
31
- C(() => e[t]),
32
- t,
33
- s
34
- );
35
- }
36
- function Ms(e, t, r, s) {
37
- return Oe(
38
- e[t] || (e[t] = r),
39
- C(() => e[t]),
40
- t,
41
- s
42
- );
43
- }
44
- function Ds(e, t, r, s) {
45
- return Oe(
46
- e[t] ?? (e[t] = r),
47
- C(() => e[t]),
48
- t,
49
- s
50
- );
51
- }
52
- var dt = /* @__PURE__ */ new Map();
53
- function qs(e) {
54
- var t = dt.get(e);
55
- if (t) {
56
- for (const r of t)
57
- r.remove();
58
- dt.delete(e);
59
- }
60
- }
61
- function Bs(e, t, r) {
62
- return (...s) => {
63
- const a = e(...s);
64
- var i = $ ? a : a.nodeType === 11 ? a.firstChild : a;
65
- return Pt(i, t, r), a;
66
- };
67
- }
68
- function ns(e, t, r) {
69
- e.__svelte_meta = {
70
- loc: { file: t, line: r[0], column: r[1] }
71
- }, r[2] && Pt(e.firstChild, t, r[2]);
72
- }
73
- function Pt(e, t, r) {
74
- for (var s = 0, a = 0; e && s < r.length; ) {
75
- if ($ && e.nodeType === 8) {
76
- var i = (
77
- /** @type {Comment} */
78
- e
79
- );
80
- i.data === Kt || i.data === Xe ? a += 1 : i.data[0] === At && (a -= 1);
81
- }
82
- a === 0 && e.nodeType === 1 && ns(
83
- /** @type {Element} */
84
- e,
85
- t,
86
- r[s++]
87
- ), e = e.nextSibling;
88
- }
89
- }
90
- function Fs(e, t) {
91
- function r(s, a) {
92
- let i = {}, n, f = !1;
93
- return Y(() => {
94
- const l = t(), u = k(l);
95
- if (n) {
96
- for (var c in i) delete i[c];
97
- he(n);
98
- }
99
- n = S(() => {
100
- f && we(!1), Object.defineProperties(
101
- i,
102
- Object.getOwnPropertyDescriptors(
103
- // @ts-expect-error
104
- new.target ? new u(s, a) : u(s, a)
105
- )
106
- ), f && we(!0);
107
- });
108
- }, ne), f = !0, $ && (s = T), i;
109
- }
110
- return r[ae] = e[ae], r[Wt] = {
111
- // When we accept an update, we set the original source to the new component
112
- original: e,
113
- // The `get_source` parameter reads `wrapper[HMR].source`, but in the `accept`
114
- // function we always replace it with `previous[HMR].source`, which in practice
115
- // means we only ever update the original
116
- source: te(e)
117
- }, r;
118
- }
119
- function zs(e) {
120
- e && Xt(e[ae] ?? "a component", e.name);
121
- }
122
- function Hs() {
123
- var r;
124
- const e = (r = Se) == null ? void 0 : r.function;
125
- function t(s) {
126
- var i;
127
- const a = ((i = Jt()) == null ? void 0 : i[ae]) ?? "Something";
128
- Zt(a, s, e[ae]);
129
- }
130
- return {
131
- $destroy: () => t("$destroy()"),
132
- $on: () => t("$on(...)"),
133
- $set: () => t("$set(...)")
134
- };
135
- }
136
- function Ys(e, t = console.log) {
137
- Qt();
138
- let r = !0;
139
- jt(() => {
140
- var s = ie;
141
- try {
142
- s = e();
143
- } catch (a) {
144
- console.error(a);
145
- }
146
- s !== ie && t(r ? "init" : "update", ...Et(s, !0)), r = !1;
147
- });
148
- }
149
- const Be = 0, $e = 1, Fe = 2;
150
- function Vs(e, t, r, s, a) {
151
- $ && P();
152
- var i = e, n = Se, f = ie, l, u, c, v = te(
153
- /** @type {V} */
154
- void 0
155
- ), o = te(void 0), _ = !1;
156
- function h(p, b) {
157
- _ = !0, b && (B(d), X(d), ye(n));
158
- try {
159
- p === Be && r && (l ? K(l) : l = S(() => r(i))), p === $e && s && (u ? K(u) : u = S(() => s(i, v))), p === Fe && a && (c ? K(c) : c = S(() => a(i, o))), p !== Be && l && D(l, () => l = null), p !== $e && u && D(u, () => u = null), p !== Fe && c && D(c, () => c = null);
160
- } finally {
161
- b && (ye(null), X(null), B(null), Nt());
162
- }
163
- }
164
- var d = Y(() => {
165
- if (f !== (f = t())) {
166
- if (er(f)) {
167
- var p = f;
168
- _ = !1, p.then(
169
- (b) => {
170
- p === f && (ce(v, b), h($e, !0));
171
- },
172
- (b) => {
173
- if (p === f && (ce(o, b), h(Fe, !0), !a))
174
- throw o.v;
175
- }
176
- ), $ ? r && (l = S(() => r(i))) : W(() => {
177
- _ || h(Be, !0);
178
- });
179
- } else
180
- ce(v, f), h($e, !1);
181
- return () => f = ie;
182
- }
183
- });
184
- $ && (i = T);
185
- }
186
- function Us(e, t, r = !1) {
187
- $ && P();
188
- var s = e, a = null, i = null, n = ie, f = r ? ne : 0, l = !1;
189
- const u = (v, o = !0) => {
190
- l = !0, c(o, v);
191
- }, c = (v, o) => {
192
- if (n === (n = v)) return;
193
- let _ = !1;
194
- if ($) {
195
- const h = (
196
- /** @type {Comment} */
197
- s.data === Xe
198
- );
199
- !!n === h && (s = me(), q(s), j(!1), _ = !0);
200
- }
201
- n ? (a ? K(a) : o && (a = S(() => o(s))), i && D(i, () => {
202
- i = null;
203
- })) : (i ? K(i) : o && (i = S(() => o(s))), a && D(a, () => {
204
- a = null;
205
- })), _ && j(!0);
206
- };
207
- Y(() => {
208
- l = !1, t(u), l || c(null, null);
209
- }, f), $ && (s = T);
210
- }
211
- function Gs(e, t, r) {
212
- $ && P();
213
- var s = e, a = ie, i, n = tr;
214
- Y(() => {
215
- n(a, a = t()) && (i && D(i), i = S(() => r(s)));
216
- }), $ && (s = T);
217
- }
218
- function Ks(e, t) {
219
- $ && q(
220
- /** @type {TemplateNode} */
221
- Q(e)
222
- ), x(() => {
223
- var r = t();
224
- for (var s in r) {
225
- var a = r[s];
226
- a ? e.style.setProperty(s, a) : e.style.removeProperty(s);
227
- }
228
- }), J(() => {
229
- e.remove();
230
- });
231
- }
232
- let ee = null;
233
- function ht(e) {
234
- ee = e;
235
- }
236
- function Ws(e, t) {
237
- return t;
238
- }
239
- function fs(e, t, r, s) {
240
- for (var a = [], i = t.length, n = 0; n < i; n++)
241
- rr(t[n].e, a, !0);
242
- var f = i > 0 && a.length === 0 && r !== null;
243
- if (f) {
244
- var l = (
245
- /** @type {Element} */
246
- /** @type {Element} */
247
- r.parentNode
248
- );
249
- sr(l), l.append(
250
- /** @type {Element} */
251
- r
252
- ), s.clear(), V(e, t[0].prev, t[i - 1].next);
253
- }
254
- ar(a, () => {
255
- for (var u = 0; u < i; u++) {
256
- var c = t[u];
257
- f || (s.delete(c.k), V(e, c.prev, c.next)), he(c.e, !f);
258
- }
259
- });
260
- }
261
- function Xs(e, t, r, s, a, i = null) {
262
- var n = e, f = { flags: t, items: /* @__PURE__ */ new Map(), first: null }, l = (t & xt) !== 0;
263
- if (l) {
264
- var u = (
265
- /** @type {Element} */
266
- e
267
- );
268
- n = $ ? q(
269
- /** @type {Comment | Text} */
270
- Q(u)
271
- ) : u.appendChild(Tt());
272
- }
273
- $ && P();
274
- var c = null, v = !1, o = ir(() => {
275
- var _ = r();
276
- return Qe(_) ? _ : _ == null ? [] : kt(_);
277
- });
278
- Y(() => {
279
- var _ = k(o), h = _.length;
280
- if (v && h === 0)
281
- return;
282
- v = h === 0;
283
- let d = !1;
284
- if ($) {
285
- var p = (
286
- /** @type {Comment} */
287
- n.data === Xe
288
- );
289
- p !== (h === 0) && (n = me(), q(n), j(!1), d = !0);
290
- }
291
- if ($) {
292
- for (var b = null, g, y = 0; y < h; y++) {
293
- if (T.nodeType === 8 && /** @type {Comment} */
294
- T.data === At) {
295
- n = /** @type {Comment} */
296
- T, d = !0, j(!1);
297
- break;
298
- }
299
- var w = _[y], m = s(w, y);
300
- g = Mt(
301
- T,
302
- f,
303
- b,
304
- null,
305
- w,
306
- m,
307
- y,
308
- a,
309
- t,
310
- r
311
- ), f.items.set(m, g), b = g;
312
- }
313
- h > 0 && q(me());
314
- }
315
- $ || us(_, f, n, a, t, s, r), i !== null && (h === 0 ? c ? K(c) : c = S(() => i(n)) : c !== null && D(c, () => {
316
- c = null;
317
- })), d && j(!0), k(o);
318
- }), $ && (n = T);
319
- }
320
- function us(e, t, r, s, a, i, n) {
321
- var at, it, nt, ft;
322
- var f = (a & nr) !== 0, l = (a & (Je | Ze)) !== 0, u = e.length, c = t.items, v = t.first, o = v, _, h = null, d, p = [], b = [], g, y, w, m;
323
- if (f)
324
- for (m = 0; m < u; m += 1)
325
- g = e[m], y = i(g, m), w = c.get(y), w !== void 0 && ((at = w.a) == null || at.measure(), (d ?? (d = /* @__PURE__ */ new Set())).add(w));
326
- for (m = 0; m < u; m += 1) {
327
- if (g = e[m], y = i(g, m), w = c.get(y), w === void 0) {
328
- var M = o ? (
329
- /** @type {TemplateNode} */
330
- o.e.nodes_start
331
- ) : r;
332
- h = Mt(
333
- M,
334
- t,
335
- h,
336
- h === null ? t.first : h.next,
337
- g,
338
- y,
339
- m,
340
- s,
341
- a,
342
- n
343
- ), c.set(y, h), p = [], b = [], o = h.next;
344
- continue;
345
- }
346
- if (l && ls(w, g, m, a), w.e.f & De && (K(w.e), f && ((it = w.a) == null || it.unfix(), (d ?? (d = /* @__PURE__ */ new Set())).delete(w))), w !== o) {
347
- if (_ !== void 0 && _.has(w)) {
348
- if (p.length < b.length) {
349
- var A = b[0], N;
350
- h = A.prev;
351
- var L = p[0], Le = p[p.length - 1];
352
- for (N = 0; N < p.length; N += 1)
353
- bt(p[N], A, r);
354
- for (N = 0; N < b.length; N += 1)
355
- _.delete(b[N]);
356
- V(t, L.prev, Le.next), V(t, h, L), V(t, Le, A), o = A, h = Le, m -= 1, p = [], b = [];
357
- } else
358
- _.delete(w), bt(w, o, r), V(t, w.prev, w.next), V(t, w, h === null ? t.first : h.next), V(t, h, w), h = w;
359
- continue;
360
- }
361
- for (p = [], b = []; o !== null && o.k !== y; )
362
- o.e.f & De || (_ ?? (_ = /* @__PURE__ */ new Set())).add(o), b.push(o), o = o.next;
363
- if (o === null)
364
- continue;
365
- w = o;
366
- }
367
- p.push(w), h = w, o = w.next;
368
- }
369
- if (o !== null || _ !== void 0) {
370
- for (var fe = _ === void 0 ? [] : kt(_); o !== null; )
371
- o.e.f & De || fe.push(o), o = o.next;
372
- var Pe = fe.length;
373
- if (Pe > 0) {
374
- var Ht = a & xt && u === 0 ? r : null;
375
- if (f) {
376
- for (m = 0; m < Pe; m += 1)
377
- (nt = fe[m].a) == null || nt.measure();
378
- for (m = 0; m < Pe; m += 1)
379
- (ft = fe[m].a) == null || ft.fix();
380
- }
381
- fs(t, fe, Ht, c);
382
- }
383
- }
384
- f && W(() => {
385
- var ut;
386
- if (d !== void 0)
387
- for (w of d)
388
- (ut = w.a) == null || ut.apply();
389
- }), F.first = t.first && t.first.e, F.last = h && h.e;
390
- }
391
- function ls(e, t, r, s) {
392
- s & Je && ce(e.v, t), s & Ze ? ce(
393
- /** @type {Value<number>} */
394
- e.i,
395
- r
396
- ) : e.i = r;
397
- }
398
- function Mt(e, t, r, s, a, i, n, f, l, u) {
399
- var c = ee, v = (l & Je) !== 0, o = (l & fr) === 0, _ = v ? o ? Ce(a) : te(a) : a, h = l & Ze ? te(n) : n, d = {
400
- i: h,
401
- v: _,
402
- k: i,
403
- a: null,
404
- // @ts-expect-error
405
- e: null,
406
- prev: r,
407
- next: s
408
- };
409
- ee = d;
410
- try {
411
- return d.e = S(() => f(e, _, h, u), $), d.e.prev = r && r.e, d.e.next = s && s.e, r === null ? t.first = d : (r.next = d, r.e.next = d.e), s !== null && (s.prev = d, s.e.prev = d.e), d;
412
- } finally {
413
- ee = c;
414
- }
415
- }
416
- function bt(e, t, r) {
417
- for (var s = e.next ? (
418
- /** @type {TemplateNode} */
419
- e.next.e.nodes_start
420
- ) : r, a = t ? (
421
- /** @type {TemplateNode} */
422
- t.e.nodes_start
423
- ) : r, i = (
424
- /** @type {TemplateNode} */
425
- e.e.nodes_start
426
- ); i !== s; ) {
427
- var n = (
428
- /** @type {TemplateNode} */
429
- St(i)
430
- );
431
- a.before(i), i = n;
432
- }
433
- }
434
- function V(e, t, r) {
435
- t === null ? e.first = r : (t.next = r, t.e.next = r && r.e), r !== null && (r.prev = t, r.e.prev = t && t.e);
436
- }
437
- function Js(e, t, r, s, a) {
438
- var i = e, n = "", f;
439
- Y(() => {
440
- if (n === (n = t() ?? "")) {
441
- $ && P();
442
- return;
443
- }
444
- f !== void 0 && (he(f), f = void 0), n !== "" && (f = S(() => {
445
- if ($) {
446
- T.data;
447
- for (var l = P(), u = l; l !== null && (l.nodeType !== 8 || /** @type {Comment} */
448
- l.data !== ""); )
449
- u = l, l = /** @type {TemplateNode} */
450
- St(l);
451
- if (l === null)
452
- throw ur(), lr;
453
- Ve(T, u), i = q(l);
454
- return;
455
- }
456
- var c = n + "";
457
- r ? c = `<svg>${c}</svg>` : s && (c = `<math>${c}</math>`);
458
- var v = cr(c);
459
- if ((r || s) && (v = /** @type {Element} */
460
- Q(v)), Ve(
461
- /** @type {TemplateNode} */
462
- Q(v),
463
- /** @type {TemplateNode} */
464
- v.lastChild
465
- ), r || s)
466
- for (; Q(v); )
467
- i.before(
468
- /** @type {Node} */
469
- Q(v)
470
- );
471
- else
472
- i.before(v);
473
- }));
474
- });
475
- }
476
- function Zs(e, t, r, s, a) {
477
- var f;
478
- $ && P();
479
- var i = (f = t.$$slots) == null ? void 0 : f[r], n = !1;
480
- i === !0 && (i = t[r === "default" ? "children" : r], n = !0), i === void 0 ? a !== null && a(e) : i(e, n ? () => s : s);
481
- }
482
- function Qs(e) {
483
- const t = {};
484
- e.children && (t.default = !0);
485
- for (const r in e.$$slots)
486
- t[r] = !0;
487
- return t;
488
- }
489
- function js(e, t, r) {
490
- $ && P();
491
- var s = e, a, i;
492
- Y(() => {
493
- a !== (a = t()) && (i && (D(i), i = null), a && (i = S(() => r(s, a))));
494
- }, ne), $ && (s = T);
495
- }
496
- function ea(e, t, r, s, a, i) {
497
- let n = $;
498
- $ && P();
499
- var f, l, u = null;
500
- $ && T.nodeType === 1 && (u = /** @type {Element} */
501
- T, P());
502
- var c = (
503
- /** @type {TemplateNode} */
504
- $ ? T : e
505
- ), v, o = ee;
506
- Y(() => {
507
- const _ = t() || null;
508
- var h = a ? a() : r || _ === "svg" ? or : null;
509
- if (_ !== f) {
510
- var d = ee;
511
- ht(o), v && (_ === null ? D(v, () => {
512
- v = null, l = null;
513
- }) : _ === l ? K(v) : (he(v), we(!1))), _ && _ !== l && (v = S(() => {
514
- if (u = $ ? (
515
- /** @type {Element} */
516
- u
517
- ) : h ? document.createElementNS(h, _) : document.createElement(_), Ve(u, u), s) {
518
- $ && _r(_) && u.append(document.createComment(""));
519
- var p = (
520
- /** @type {TemplateNode} */
521
- $ ? Q(u) : u.appendChild(Tt())
522
- );
523
- $ && (p === null ? j(!1) : q(p)), s(u, p);
524
- }
525
- F.nodes_end = u, c.before(u);
526
- })), f = _, f && (l = f), we(!0), ht(d);
527
- }
528
- }, ne), n && (j(!0), q(c));
529
- }
530
- function ta(e, t) {
531
- W(() => {
532
- var r = e.getRootNode(), s = (
533
- /** @type {ShadowRoot} */
534
- r.host ? (
535
- /** @type {ShadowRoot} */
536
- r
537
- ) : (
538
- /** @type {Document} */
539
- r.head ?? /** @type {Document} */
540
- r.ownerDocument.head
541
- )
542
- );
543
- if (!s.querySelector("#" + t.hash)) {
544
- const a = document.createElement("style");
545
- a.id = t.hash, a.textContent = t.code, s.appendChild(a);
546
- }
547
- });
548
- }
549
- function ra(e, t, r) {
550
- z(() => {
551
- var s = C(() => t(e, r == null ? void 0 : r()) || {});
552
- if (r && (s != null && s.update)) {
553
- var a = !1, i = (
554
- /** @type {any} */
555
- {}
556
- );
557
- x(() => {
558
- var n = r();
559
- Ct(n), a && vr(i, n) && (i = n, s.update(n));
560
- }), a = !0;
561
- }
562
- if (s != null && s.destroy)
563
- return () => (
564
- /** @type {Function} */
565
- s.destroy()
566
- );
567
- });
568
- }
569
- const cs = /[&"<]/g;
570
- function os(e, t) {
571
- const r = String(e ?? ""), s = cs;
572
- s.lastIndex = 0;
573
- let a = "", i = 0;
574
- for (; s.test(r); ) {
575
- const n = s.lastIndex - 1, f = r[n];
576
- a += r.substring(i, n) + (f === "&" ? "&amp;" : f === '"' ? "&quot;" : "&lt;"), i = n + 1;
577
- }
578
- return a + r.substring(i);
579
- }
580
- function Dt(e) {
581
- var t, r, s = "";
582
- if (typeof e == "string" || typeof e == "number") s += e;
583
- else if (typeof e == "object") if (Array.isArray(e)) {
584
- var a = e.length;
585
- for (t = 0; t < a; t++) e[t] && (r = Dt(e[t])) && (s && (s += " "), s += r);
586
- } else for (r in e) e[r] && (s && (s += " "), s += r);
587
- return s;
588
- }
589
- function _s() {
590
- for (var e, t, r = 0, s = "", a = arguments.length; r < a; r++) (e = arguments[r]) && (t = Dt(e)) && (s && (s += " "), s += t);
591
- return s;
592
- }
593
- const $t = {
594
- translate: /* @__PURE__ */ new Map([
595
- [!0, "yes"],
596
- [!1, "no"]
597
- ])
598
- };
599
- function sa(e, t, r = !1) {
600
- if (t == null || !t && r || t === "" && e === "class") return "";
601
- const s = e in $t && $t[e].get(t) || t, a = r ? "" : `="${os(s)}"`;
602
- return ` ${e}${a}`;
603
- }
604
- function vs(e) {
605
- return typeof e == "object" ? _s(e) : e ?? "";
606
- }
607
- function aa(e) {
608
- if ($) {
609
- var t = !1, r = () => {
610
- if (!t) {
611
- if (t = !0, e.hasAttribute("value")) {
612
- var s = e.value;
613
- Ne(e, "value", null), e.value = s;
614
- }
615
- if (e.hasAttribute("checked")) {
616
- var a = e.checked;
617
- Ne(e, "checked", null), e.checked = a;
618
- }
619
- }
620
- };
621
- e.__on_r = r, dr(r), hr();
622
- }
623
- }
624
- function ia(e, t) {
625
- var r = e.__attributes ?? (e.__attributes = {});
626
- r.value === (r.value = // treat null and undefined the same for the initial value
627
- t ?? void 0) || // @ts-expect-error
628
- // `progress` elements always need their value set when it's `0`
629
- e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
630
- }
631
- function na(e, t) {
632
- var r = e.__attributes ?? (e.__attributes = {});
633
- r.checked !== (r.checked = // treat null and undefined the same for the initial value
634
- t ?? void 0) && (e.checked = t);
635
- }
636
- function ds(e, t) {
637
- t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
638
- }
639
- function fa(e, t) {
640
- const r = e.checked;
641
- e.defaultChecked = t, e.checked = r;
642
- }
643
- function ua(e, t) {
644
- const r = e.value;
645
- e.defaultValue = t, e.value = r;
646
- }
647
- function Ne(e, t, r, s) {
648
- var a = e.__attributes ?? (e.__attributes = {});
649
- $ && (a[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || a[t] !== (a[t] = r) && (t === "style" && "__styles" in e && (e.__styles = {}), t === "loading" && (e[Ue] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && tt(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
650
- }
651
- function la(e, t, r) {
652
- e.setAttributeNS("http://www.w3.org/1999/xlink", t, r);
653
- }
654
- function ca(e, t, r) {
655
- var s = je, a = F;
656
- X(null), B(null);
657
- try {
658
- // Don't compute setters for custom elements while they aren't registered yet,
659
- // because during their upgrade/instantiation they might add more setters.
660
- // Instead, fall back to a simple "an object, then set as property" heuristic.
661
- (Ge.has(e.nodeName) || // customElements may not be available in browser extension contexts
662
- !customElements || customElements.get(e.tagName.toLowerCase()) ? tt(e).includes(t) : r && typeof r == "object") ? e[t] = r : Ne(e, t, r == null ? r : String(r));
663
- } finally {
664
- X(s), B(a);
665
- }
666
- }
667
- function oa(e, t, r, s, a = !1, i = !1, n = !1) {
668
- var f = t || {}, l = e.tagName === "OPTION";
669
- for (var u in t)
670
- u in r || (r[u] = null);
671
- r.class && (r.class = vs(r.class)), s !== void 0 && (r.class = r.class ? r.class + " " + s : s);
672
- var c = tt(e), v = (
673
- /** @type {Record<string, unknown>} **/
674
- e.__attributes ?? (e.__attributes = {})
675
- );
676
- for (const b in r) {
677
- let g = r[b];
678
- if (l && b === "value" && g == null) {
679
- e.value = e.__value = "", f[b] = g;
680
- continue;
681
- }
682
- var o = f[b];
683
- if (g !== o) {
684
- f[b] = g;
685
- var _ = b[0] + b[1];
686
- if (_ !== "$$") {
687
- if (_ === "on") {
688
- const y = {}, w = "$$" + b;
689
- let m = b.slice(2);
690
- var h = mr(m);
691
- if (br(m) && (m = m.slice(0, -7), y.capture = !0), !h && o) {
692
- if (g != null) continue;
693
- e.removeEventListener(m, f[w], y), f[w] = null;
694
- }
695
- if (g != null)
696
- if (h)
697
- e[`__${m}`] = g, pr([m]);
698
- else {
699
- let M = function(A) {
700
- f[b].call(this, A);
701
- };
702
- f[w] = $r(m, e, M, y);
703
- }
704
- else h && (e[`__${m}`] = void 0);
705
- } else if (b === "style" && g != null)
706
- e.style.cssText = g + "";
707
- else if (b === "autofocus")
708
- gr(
709
- /** @type {HTMLElement} */
710
- e,
711
- !!g
712
- );
713
- else if (b === "__value" || b === "value" && g != null)
714
- e.value = e[b] = e.__value = g;
715
- else if (b === "selected" && l)
716
- ds(
717
- /** @type {HTMLOptionElement} */
718
- e,
719
- g
720
- );
721
- else {
722
- var d = b;
723
- a || (d = wr(d));
724
- var p = d === "defaultValue" || d === "defaultChecked";
725
- if (g == null && !i && !p)
726
- if (v[b] = null, d === "value" || d === "checked") {
727
- let y = (
728
- /** @type {HTMLInputElement} */
729
- e
730
- );
731
- if (d === "value") {
732
- let w = y.defaultValue;
733
- y.removeAttribute(d), y.defaultValue = w;
734
- } else {
735
- let w = y.defaultChecked;
736
- y.removeAttribute(d), y.defaultChecked = w;
737
- }
738
- } else
739
- e.removeAttribute(b);
740
- else p || c.includes(d) && (i || typeof g != "string") ? e[d] = g : typeof g != "function" && ($ && (d === "src" || d === "href" || d === "srcset") || Ne(e, d, g));
741
- }
742
- b === "style" && "__styles" in e && (e.__styles = {});
743
- }
744
- }
745
- }
746
- return f;
747
- }
748
- var Ge = /* @__PURE__ */ new Map();
749
- function tt(e) {
750
- var t = Ge.get(e.nodeName);
751
- if (t) return t;
752
- Ge.set(e.nodeName, t = []);
753
- for (var r, s = e, a = Element.prototype; a !== s; ) {
754
- r = Ar(s);
755
- for (var i in r)
756
- r[i].set && t.push(i);
757
- s = yr(s);
758
- }
759
- return t;
760
- }
761
- function _a(e) {
762
- if (!$ && e.loading === "lazy") {
763
- var t = e.src;
764
- e[Ue] = null, e.loading = "eager", e.removeAttribute("src"), requestAnimationFrame(() => {
765
- e[Ue] !== "eager" && (e.loading = "lazy"), e.src = t;
766
- });
767
- }
768
- }
769
- function va(e, t, r) {
770
- var s = e.__className, a = rt(t, r);
771
- $ && e.getAttribute("class") === a ? e.__className = a : (s !== a || $ && e.getAttribute("class") !== a) && (a === "" ? e.removeAttribute("class") : e.setAttribute("class", a), e.__className = a);
772
- }
773
- function da(e, t, r) {
774
- var s = e.__className, a = rt(t, r);
775
- $ && e.getAttribute("class") === a ? e.__className = a : (s !== a || $ && e.getAttribute("class") !== a) && (a === "" ? e.removeAttribute("class") : e.setAttribute("class", a), e.__className = a);
776
- }
777
- function ha(e, t, r) {
778
- var s = e.__className, a = rt(t, r);
779
- $ && e.className === a ? e.__className = a : (s !== a || $ && e.className !== a) && (t == null && !r ? e.removeAttribute("class") : e.className = a, e.__className = a);
780
- }
781
- function rt(e, t) {
782
- return (e ?? "") + (t ? " " + t : "");
783
- }
784
- function ba(e, t, r) {
785
- if (r) {
786
- if (e.classList.contains(t)) return;
787
- e.classList.add(t);
788
- } else {
789
- if (!e.classList.contains(t)) return;
790
- e.classList.remove(t);
791
- }
792
- }
793
- function $a(e, t, r, s) {
794
- var a = e.__styles ?? (e.__styles = {});
795
- a[t] !== r && (a[t] = r, r == null ? e.style.removeProperty(t) : e.style.setProperty(t, r, s ? "important" : ""));
796
- }
797
- function pe(e, t) {
798
- e.dispatchEvent(new CustomEvent(t));
799
- }
800
- function hs(e) {
801
- if (e === "float") return "cssFloat";
802
- if (e === "offset") return "cssOffset";
803
- if (e.startsWith("--")) return e;
804
- const t = e.split("-");
805
- return t.length === 1 ? t[0] : t[0] + t.slice(1).map(
806
- /** @param {any} word */
807
- (r) => r[0].toUpperCase() + r.slice(1)
808
- ).join("");
809
- }
810
- function pt(e) {
811
- const t = {}, r = e.split(";");
812
- for (const s of r) {
813
- const [a, i] = s.split(":");
814
- if (!a || i === void 0) break;
815
- const n = hs(a.trim());
816
- t[n] = i.trim();
817
- }
818
- return t;
819
- }
820
- const bs = (e) => e;
821
- function pa(e, t, r) {
822
- var s = (
823
- /** @type {EachItem} */
824
- ee
825
- ), a, i, n, f = null;
826
- s.a ?? (s.a = {
827
- element: e,
828
- measure() {
829
- a = this.element.getBoundingClientRect();
830
- },
831
- apply() {
832
- if (n == null || n.abort(), i = this.element.getBoundingClientRect(), a.left !== i.left || a.right !== i.right || a.top !== i.top || a.bottom !== i.bottom) {
833
- const l = t()(this.element, { from: a, to: i }, r == null ? void 0 : r());
834
- n = Te(this.element, l, void 0, 1, () => {
835
- n == null || n.abort(), n = void 0;
836
- });
837
- }
838
- },
839
- fix() {
840
- if (!e.getAnimations().length) {
841
- var { position: l, width: u, height: c } = getComputedStyle(e);
842
- if (l !== "absolute" && l !== "fixed") {
843
- var v = (
844
- /** @type {HTMLElement | SVGElement} */
845
- e.style
846
- );
847
- f = {
848
- position: v.position,
849
- width: v.width,
850
- height: v.height,
851
- transform: v.transform
852
- }, v.position = "absolute", v.width = u, v.height = c;
853
- var o = e.getBoundingClientRect();
854
- if (a.left !== o.left || a.top !== o.top) {
855
- var _ = `translate(${a.left - o.left}px, ${a.top - o.top}px)`;
856
- v.transform = v.transform ? `${v.transform} ${_}` : _;
857
- }
858
- }
859
- }
860
- },
861
- unfix() {
862
- if (f) {
863
- var l = (
864
- /** @type {HTMLElement | SVGElement} */
865
- e.style
866
- );
867
- l.position = f.position, l.width = f.width, l.height = f.height, l.transform = f.transform;
868
- }
869
- }
870
- }), s.a.element = e;
871
- }
872
- function ga(e, t, r, s) {
873
- var a = (e & xr) !== 0, i = (e & kr) !== 0, n = a && i, f = (e & Sr) !== 0, l = n ? "both" : a ? "in" : "out", u, c = t.inert, v = t.style.overflow, o, _;
874
- function h() {
875
- var y = je, w = F;
876
- X(null), B(null);
877
- try {
878
- return u ?? (u = r()(t, (s == null ? void 0 : s()) ?? /** @type {P} */
879
- {}, {
880
- direction: l
881
- }));
882
- } finally {
883
- X(y), B(w);
884
- }
885
- }
886
- var d = {
887
- is_global: f,
888
- in() {
889
- var y;
890
- if (t.inert = c, !a) {
891
- _ == null || _.abort(), (y = _ == null ? void 0 : _.reset) == null || y.call(_);
892
- return;
893
- }
894
- i || o == null || o.abort(), pe(t, "introstart"), o = Te(t, h(), _, 1, () => {
895
- pe(t, "introend"), o == null || o.abort(), o = u = void 0, t.style.overflow = v;
896
- });
897
- },
898
- out(y) {
899
- if (!i) {
900
- y == null || y(), u = void 0;
901
- return;
902
- }
903
- t.inert = !0, pe(t, "outrostart"), _ = Te(t, h(), o, 0, () => {
904
- pe(t, "outroend"), y == null || y();
905
- });
906
- },
907
- stop: () => {
908
- o == null || o.abort(), _ == null || _.abort();
909
- }
910
- }, p = (
911
- /** @type {Effect} */
912
- F
913
- );
914
- if ((p.transitions ?? (p.transitions = [])).push(d), a && Er) {
915
- var b = f;
916
- if (!b) {
917
- for (var g = (
918
- /** @type {Effect | null} */
919
- p.parent
920
- ); g && g.f & ne; )
921
- for (; (g = g.parent) && !(g.f & Nr); )
922
- ;
923
- b = !g || (g.f & Tr) !== 0;
924
- }
925
- b && z(() => {
926
- C(() => d.in());
927
- });
928
- }
929
- }
930
- function Te(e, t, r, s, a) {
931
- var i = s === 1;
932
- if (re(t)) {
933
- var n, f = !1;
934
- return W(() => {
935
- if (!f) {
936
- var p = t({ direction: i ? "in" : "out" });
937
- n = Te(e, p, r, s, a);
938
- }
939
- }), {
940
- abort: () => {
941
- f = !0, n == null || n.abort();
942
- },
943
- deactivate: () => n.deactivate(),
944
- reset: () => n.reset(),
945
- t: () => n.t()
946
- };
947
- }
948
- if (r == null || r.deactivate(), !(t != null && t.duration))
949
- return a(), {
950
- abort: U,
951
- deactivate: U,
952
- reset: U,
953
- t: () => s
954
- };
955
- const { delay: l = 0, css: u, tick: c, easing: v = bs } = t;
956
- var o = [];
957
- if (i && r === void 0 && (c && c(0, 1), u)) {
958
- var _ = pt(u(0, 1));
959
- o.push(_, _);
960
- }
961
- var h = () => 1 - s, d = e.animate(o, { duration: l });
962
- return d.onfinish = () => {
963
- var p = (r == null ? void 0 : r.t()) ?? 1 - s;
964
- r == null || r.abort();
965
- var b = s - p, g = (
966
- /** @type {number} */
967
- t.duration * Math.abs(b)
968
- ), y = [];
969
- if (g > 0) {
970
- var w = !1;
971
- if (u)
972
- for (var m = Math.ceil(g / 16.666666666666668), M = 0; M <= m; M += 1) {
973
- var A = p + b * v(M / m), N = pt(u(A, 1 - A));
974
- y.push(N), w || (w = N.overflow === "hidden");
975
- }
976
- w && (e.style.overflow = "hidden"), h = () => {
977
- var L = (
978
- /** @type {number} */
979
- /** @type {globalThis.Animation} */
980
- d.currentTime
981
- );
982
- return p + b * v(L / g);
983
- }, c && ss(() => {
984
- if (d.playState !== "running") return !1;
985
- var L = h();
986
- return c(L, 1 - L), !0;
987
- });
988
- }
989
- d = e.animate(y, { duration: g, fill: "forwards" }), d.onfinish = () => {
990
- h = () => s, c == null || c(s, 1 - s), a();
991
- };
992
- }, {
993
- abort: () => {
994
- d && (d.cancel(), d.effect = null, d.onfinish = U);
995
- },
996
- deactivate: () => {
997
- a = U;
998
- },
999
- reset: () => {
1000
- s === 0 && (c == null || c(1, 0));
1001
- },
1002
- t: () => h()
1003
- };
1004
- }
1005
- function wa(e) {
1006
- R(document, ["focusin", "focusout"], (t) => {
1007
- t && t.type === "focusout" && /** @type {FocusEvent} */
1008
- t.relatedTarget || e(document.activeElement);
1009
- });
1010
- }
1011
- function ya(e, t, r = t) {
1012
- be(e, "input", (s) => {
1013
- var a = s ? e.defaultValue : e.value;
1014
- if (a = He(e) ? Ye(a) : a, r(a), a !== (a = t())) {
1015
- var i = e.selectionStart, n = e.selectionEnd;
1016
- e.value = a ?? "", n !== null && (e.selectionStart = i, e.selectionEnd = Math.min(n, e.value.length));
1017
- }
1018
- }), // If we are hydrating and the value has since changed,
1019
- // then use the updated value from the input instead.
1020
- ($ && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
1021
- // TODO Svelte 6: remove input.value check and set to empty string?
1022
- C(t) == null && e.value) && r(He(e) ? Ye(e.value) : e.value), x(() => {
1023
- var s = t();
1024
- He(e) && s === Ye(e.value) || e.type === "date" && !s && !e.value || s !== e.value && (e.value = s ?? "");
1025
- });
1026
- }
1027
- const ze = /* @__PURE__ */ new Set();
1028
- function ma(e, t, r, s, a = s) {
1029
- var i = r.getAttribute("type") === "checkbox", n = e;
1030
- let f = !1;
1031
- if (t !== null)
1032
- for (var l of t)
1033
- n = n[l] ?? (n[l] = []);
1034
- n.push(r), be(
1035
- r,
1036
- "change",
1037
- () => {
1038
- var u = r.__value;
1039
- i && (u = gt(n, u, r.checked)), a(u);
1040
- },
1041
- // TODO better default value handling
1042
- () => a(i ? [] : null)
1043
- ), x(() => {
1044
- var u = s();
1045
- if ($ && r.defaultChecked !== r.checked) {
1046
- f = !0;
1047
- return;
1048
- }
1049
- i ? (u = u || [], r.checked = u.includes(r.__value)) : r.checked = Rt(r.__value, u);
1050
- }), J(() => {
1051
- var u = n.indexOf(r);
1052
- u !== -1 && n.splice(u, 1);
1053
- }), ze.has(n) || (ze.add(n), W(() => {
1054
- n.sort((u, c) => u.compareDocumentPosition(c) === 4 ? -1 : 1), ze.delete(n);
1055
- })), W(() => {
1056
- if (f) {
1057
- var u;
1058
- if (i)
1059
- u = gt(n, u, r.checked);
1060
- else {
1061
- var c = n.find((v) => v.checked);
1062
- u = c == null ? void 0 : c.__value;
1063
- }
1064
- a(u);
1065
- }
1066
- });
1067
- }
1068
- function Aa(e, t, r = t) {
1069
- be(e, "change", (s) => {
1070
- var a = s ? e.defaultChecked : e.checked;
1071
- r(a);
1072
- }), // If we are hydrating and the value has since changed,
1073
- // then use the update value from the input instead.
1074
- ($ && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1075
- C(t) == null) && r(e.checked), x(() => {
1076
- var s = t();
1077
- e.checked = !!s;
1078
- });
1079
- }
1080
- function gt(e, t, r) {
1081
- for (var s = /* @__PURE__ */ new Set(), a = 0; a < e.length; a += 1)
1082
- e[a].checked && s.add(e[a].__value);
1083
- return r || s.delete(t), Array.from(s);
1084
- }
1085
- function He(e) {
1086
- var t = e.type;
1087
- return t === "number" || t === "range";
1088
- }
1089
- function Ye(e) {
1090
- return e === "" ? null : +e;
1091
- }
1092
- function Ea(e, t, r = t) {
1093
- be(e, "change", () => {
1094
- r(e.files);
1095
- }), // If we are hydrating and the value has since changed,
1096
- // then use the updated value from the input instead.
1097
- $ && e.files && r(e.files), x(() => {
1098
- e.files = t();
1099
- });
1100
- }
1101
- function st(e) {
1102
- for (var t = [], r = 0; r < e.length; r += 1)
1103
- t.push({ start: e.start(r), end: e.end(r) });
1104
- return t;
1105
- }
1106
- function Na(e, t, r = t) {
1107
- var s, a, i = () => {
1108
- cancelAnimationFrame(s), e.paused || (s = requestAnimationFrame(i));
1109
- var n = e.currentTime;
1110
- a !== n && r(a = n);
1111
- };
1112
- s = requestAnimationFrame(i), e.addEventListener("timeupdate", i), x(() => {
1113
- var n = Number(t());
1114
- a !== n && !isNaN(
1115
- /** @type {any} */
1116
- n
1117
- ) && (e.currentTime = a = n);
1118
- }), J(() => {
1119
- cancelAnimationFrame(s), e.removeEventListener("timeupdate", i);
1120
- });
1121
- }
1122
- function Ta(e, t) {
1123
- R(e, ["loadedmetadata", "progress"], () => t(st(e.buffered)));
1124
- }
1125
- function xa(e, t) {
1126
- R(e, ["loadedmetadata"], () => t(st(e.seekable)));
1127
- }
1128
- function ka(e, t) {
1129
- R(e, ["timeupdate"], () => t(st(e.played)));
1130
- }
1131
- function Sa(e, t) {
1132
- R(e, ["seeking", "seeked"], () => t(e.seeking));
1133
- }
1134
- function Ca(e, t) {
1135
- R(e, ["timeupdate", "ended"], () => t(e.ended));
1136
- }
1137
- function Ra(e, t) {
1138
- R(
1139
- e,
1140
- ["loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "emptied"],
1141
- () => t(e.readyState)
1142
- );
1143
- }
1144
- function Ia(e, t, r = t) {
1145
- z(() => {
1146
- var s = Number(t());
1147
- s !== e.playbackRate && !isNaN(s) && (e.playbackRate = s);
1148
- }), z(() => {
1149
- R(e, ["ratechange"], () => {
1150
- r(e.playbackRate);
1151
- });
1152
- });
1153
- }
1154
- function Oa(e, t, r = t) {
1155
- var s = t(), a = () => {
1156
- s !== e.paused && r(s = e.paused);
1157
- };
1158
- R(e, ["play", "pause", "canplay"], a, s == null), z(() => {
1159
- (s = !!t()) !== e.paused && (s ? e.pause() : e.play().catch(() => {
1160
- r(s = !0);
1161
- }));
1162
- });
1163
- }
1164
- function La(e, t, r = t) {
1165
- var s = () => {
1166
- r(e.volume);
1167
- };
1168
- t() == null && s(), R(e, ["volumechange"], s, !1), x(() => {
1169
- var a = Number(t());
1170
- a !== e.volume && !isNaN(a) && (e.volume = a);
1171
- });
1172
- }
1173
- function Pa(e, t, r = t) {
1174
- var s = () => {
1175
- r(e.muted);
1176
- };
1177
- t() == null && s(), R(e, ["volumechange"], s, !1), x(() => {
1178
- var a = !!t();
1179
- e.muted !== a && (e.muted = a);
1180
- });
1181
- }
1182
- function Ma(e) {
1183
- R(window, ["online", "offline"], () => {
1184
- e(navigator.onLine);
1185
- });
1186
- }
1187
- function Da(e, t, r) {
1188
- var s = _e(e, t);
1189
- s && s.set && (e[t] = r, J(() => {
1190
- e[t] = null;
1191
- }));
1192
- }
1193
- function Ke(e, t, r) {
1194
- if (e.multiple)
1195
- return ps(e, t);
1196
- for (var s of e.options) {
1197
- var a = oe(s);
1198
- if (Rt(a, t)) {
1199
- s.selected = !0;
1200
- return;
1201
- }
1202
- }
1203
- (!r || t !== void 0) && (e.selectedIndex = -1);
1204
- }
1205
- function $s(e, t) {
1206
- let r = !0;
1207
- z(() => {
1208
- t && Ke(e, C(t), r), r = !1;
1209
- var s = new MutationObserver(() => {
1210
- var a = e.__value;
1211
- Ke(e, a);
1212
- });
1213
- return s.observe(e, {
1214
- // Listen to option element changes
1215
- childList: !0,
1216
- subtree: !0,
1217
- // because of <optgroup>
1218
- // Listen to option element value attribute changes
1219
- // (doesn't get notified of select value changes,
1220
- // because that property is not reflected as an attribute)
1221
- attributes: !0,
1222
- attributeFilter: ["value"]
1223
- }), () => {
1224
- s.disconnect();
1225
- };
1226
- });
1227
- }
1228
- function qa(e, t, r = t) {
1229
- var s = !0;
1230
- be(e, "change", (a) => {
1231
- var i = a ? "[selected]" : ":checked", n;
1232
- if (e.multiple)
1233
- n = [].map.call(e.querySelectorAll(i), oe);
1234
- else {
1235
- var f = e.querySelector(i) ?? // will fall back to first non-disabled option if no option is selected
1236
- e.querySelector("option:not([disabled])");
1237
- n = f && oe(f);
1238
- }
1239
- r(n);
1240
- }), z(() => {
1241
- var a = t();
1242
- if (Ke(e, a, s), s && a === void 0) {
1243
- var i = e.querySelector(":checked");
1244
- i !== null && (a = oe(i), r(a));
1245
- }
1246
- e.__value = a, s = !1;
1247
- }), $s(e);
1248
- }
1249
- function ps(e, t) {
1250
- for (var r of e.options)
1251
- r.selected = ~t.indexOf(oe(r));
1252
- }
1253
- function oe(e) {
1254
- return "__value" in e ? e.__value : e.value;
1255
- }
1256
- var G, se, de, xe, qt;
1257
- const ke = class ke {
1258
- /** @param {ResizeObserverOptions} options */
1259
- constructor(t) {
1260
- Z(this, xe);
1261
- /** */
1262
- Z(this, G, /* @__PURE__ */ new WeakMap());
1263
- /** @type {ResizeObserver | undefined} */
1264
- Z(this, se);
1265
- /** @type {ResizeObserverOptions} */
1266
- Z(this, de);
1267
- ue(this, de, t);
1268
- }
1269
- /**
1270
- * @param {Element} element
1271
- * @param {(entry: ResizeObserverEntry) => any} listener
1272
- */
1273
- observe(t, r) {
1274
- var s = E(this, G).get(t) || /* @__PURE__ */ new Set();
1275
- return s.add(r), E(this, G).set(t, s), ct(this, xe, qt).call(this).observe(t, E(this, de)), () => {
1276
- var a = E(this, G).get(t);
1277
- a.delete(r), a.size === 0 && (E(this, G).delete(t), E(this, se).unobserve(t));
1278
- };
1279
- }
1280
- };
1281
- G = new WeakMap(), se = new WeakMap(), de = new WeakMap(), xe = new WeakSet(), qt = function() {
1282
- return E(this, se) ?? ue(this, se, new ResizeObserver(
1283
- /** @param {any} entries */
1284
- (t) => {
1285
- for (var r of t) {
1286
- ke.entries.set(r.target, r);
1287
- for (var s of E(this, G).get(r.target) || [])
1288
- s(r);
1289
- }
1290
- }
1291
- ));
1292
- }, /** @static */
1293
- I(ke, "entries", /* @__PURE__ */ new WeakMap());
1294
- let ve = ke;
1295
- var gs = /* @__PURE__ */ new ve({
1296
- box: "content-box"
1297
- }), Bt = /* @__PURE__ */ new ve({
1298
- box: "border-box"
1299
- }), ws = /* @__PURE__ */ new ve({
1300
- box: "device-pixel-content-box"
1301
- });
1302
- function Ba(e, t, r) {
1303
- var s = t === "contentRect" || t === "contentBoxSize" ? gs : t === "borderBoxSize" ? Bt : ws, a = s.observe(
1304
- e,
1305
- /** @param {any} entry */
1306
- (i) => r(i[t])
1307
- );
1308
- J(a);
1309
- }
1310
- function Fa(e, t, r) {
1311
- var s = Bt.observe(e, () => r(e[t]));
1312
- z(() => (C(() => r(e[t])), s));
1313
- }
1314
- function wt(e, t) {
1315
- return e === t || (e == null ? void 0 : e[Re]) === t;
1316
- }
1317
- function za(e = {}, t, r, s) {
1318
- return z(() => {
1319
- var a, i;
1320
- return x(() => {
1321
- a = i, i = (s == null ? void 0 : s()) || [], C(() => {
1322
- e !== r(...i) && (t(e, ...i), a && wt(r(...a), e) && t(null, ...a));
1323
- });
1324
- }), () => {
1325
- W(() => {
1326
- i && wt(r(...i), e) && t(null, ...i);
1327
- });
1328
- };
1329
- }), e;
1330
- }
1331
- function Ha(e, t, r, s = r) {
1332
- t.addEventListener("input", () => {
1333
- s(t[e]);
1334
- }), x(() => {
1335
- var a = r();
1336
- if (t[e] !== a)
1337
- if (a == null) {
1338
- var i = t[e];
1339
- s(i);
1340
- } else
1341
- t[e] = a + "";
1342
- });
1343
- }
1344
- function Ya(e, t, r, s, a) {
1345
- var i = () => {
1346
- s(r[e]);
1347
- };
1348
- r.addEventListener(t, i), a ? x(() => {
1349
- r[e] = a();
1350
- }) : i(), (r === document.body || r === window || r === document) && J(() => {
1351
- r.removeEventListener(t, i);
1352
- });
1353
- }
1354
- function Va(e, t) {
1355
- R(e, ["focus", "blur"], () => {
1356
- t(e === document.activeElement);
1357
- });
1358
- }
1359
- function Ua(e, t, r = t) {
1360
- var s = e === "x", a = () => It(() => {
1361
- i = !0, clearTimeout(n), n = setTimeout(f, 100), r(window[s ? "scrollX" : "scrollY"]);
1362
- });
1363
- addEventListener("scroll", a, {
1364
- passive: !0
1365
- });
1366
- var i = !1, n, f = () => {
1367
- i = !1;
1368
- }, l = !0;
1369
- x(() => {
1370
- var u = t();
1371
- l ? l = !1 : !i && u != null && (i = !0, clearTimeout(n), s ? scrollTo(u, window.scrollY) : scrollTo(window.scrollX, u), n = setTimeout(f, 100));
1372
- }), z(a), J(() => {
1373
- removeEventListener("scroll", a);
1374
- });
1375
- }
1376
- function Ga(e, t) {
1377
- R(window, ["resize"], () => It(() => t(window[e])));
1378
- }
1379
- function Ka(e) {
1380
- return function(...t) {
1381
- var r = (
1382
- /** @type {Event} */
1383
- t[0]
1384
- );
1385
- r.isTrusted && (e == null || e.apply(this, t));
1386
- };
1387
- }
1388
- function Wa(e) {
1389
- return function(...t) {
1390
- var r = (
1391
- /** @type {Event} */
1392
- t[0]
1393
- );
1394
- r.target === this && (e == null || e.apply(this, t));
1395
- };
1396
- }
1397
- function Xa(e) {
1398
- return function(...t) {
1399
- var r = (
1400
- /** @type {Event} */
1401
- t[0]
1402
- );
1403
- return r.stopPropagation(), e == null ? void 0 : e.apply(this, t);
1404
- };
1405
- }
1406
- function Ja(e) {
1407
- var t = !1;
1408
- return function(...r) {
1409
- if (!t)
1410
- return t = !0, e == null ? void 0 : e.apply(this, r);
1411
- };
1412
- }
1413
- function Za(e) {
1414
- return function(...t) {
1415
- var r = (
1416
- /** @type {Event} */
1417
- t[0]
1418
- );
1419
- return r.stopImmediatePropagation(), e == null ? void 0 : e.apply(this, t);
1420
- };
1421
- }
1422
- function Qa(e) {
1423
- return function(...t) {
1424
- var r = (
1425
- /** @type {Event} */
1426
- t[0]
1427
- );
1428
- return r.preventDefault(), e == null ? void 0 : e.apply(this, t);
1429
- };
1430
- }
1431
- function ja(e = !1) {
1432
- const t = (
1433
- /** @type {ComponentContextLegacy} */
1434
- Se
1435
- ), r = t.l.u;
1436
- if (!r) return;
1437
- let s = () => Ct(t.s);
1438
- if (e) {
1439
- let a = 0, i = (
1440
- /** @type {Record<string, any>} */
1441
- {}
1442
- );
1443
- const n = Ot(() => {
1444
- let f = !1;
1445
- const l = t.s;
1446
- for (const u in l)
1447
- l[u] !== i[u] && (i[u] = l[u], f = !0);
1448
- return f && a++, a;
1449
- });
1450
- s = () => k(n);
1451
- }
1452
- r.b.length && Cr(() => {
1453
- yt(t, s), _t(r.b);
1454
- }), ot(() => {
1455
- const a = C(() => r.m.map(Rr));
1456
- return () => {
1457
- for (const i of a)
1458
- typeof i == "function" && i();
1459
- };
1460
- }), r.a.length && ot(() => {
1461
- yt(t, s), _t(r.a);
1462
- });
1463
- }
1464
- function yt(e, t) {
1465
- if (e.l.s)
1466
- for (const r of e.l.s) k(r);
1467
- t();
1468
- }
1469
- function ei(e) {
1470
- var t = te(0);
1471
- return function() {
1472
- return arguments.length === 1 ? (Ie(t, k(t) + 1), arguments[0]) : (k(t), e());
1473
- };
1474
- }
1475
- function ti(e, t) {
1476
- var i;
1477
- var r = (
1478
- /** @type {Record<string, Function[] | Function>} */
1479
- (i = e.$$events) == null ? void 0 : i[t.type]
1480
- ), s = Qe(r) ? r.slice() : r == null ? [] : [r];
1481
- for (var a of s)
1482
- a.call(this, t);
1483
- }
1484
- function ri(e, t, r) {
1485
- var s;
1486
- e.$$events || (e.$$events = {}), (s = e.$$events)[t] || (s[t] = []), e.$$events[t].push(r);
1487
- }
1488
- function si(e) {
1489
- for (var t in e)
1490
- t in this && (this[t] = e[t]);
1491
- }
1492
- let le = !1, We = Symbol();
1493
- function ai(e, t, r) {
1494
- const s = r[t] ?? (r[t] = {
1495
- store: null,
1496
- source: Ce(void 0),
1497
- unsubscribe: U
1498
- });
1499
- if (s.store !== e && !(We in r))
1500
- if (s.unsubscribe(), s.store = e ?? null, e == null)
1501
- s.source.v = void 0, s.unsubscribe = U;
1502
- else {
1503
- var a = !0;
1504
- s.unsubscribe = as(e, (i) => {
1505
- a ? s.source.v = i : Ie(s.source, i);
1506
- }), a = !1;
1507
- }
1508
- return e && We in r ? is(e) : k(s.source);
1509
- }
1510
- function ii(e, t, r) {
1511
- let s = r[t];
1512
- return s && s.store !== e && (s.unsubscribe(), s.unsubscribe = U), e;
1513
- }
1514
- function ys(e, t) {
1515
- return e.set(t), t;
1516
- }
1517
- function ni(e, t) {
1518
- var r = e[t];
1519
- r.store !== null && ys(r.store, r.source.v);
1520
- }
1521
- function fi() {
1522
- const e = {};
1523
- function t() {
1524
- J(() => {
1525
- for (var r in e)
1526
- e[r].unsubscribe();
1527
- Ae(e, We, {
1528
- enumerable: !1,
1529
- value: !0
1530
- });
1531
- });
1532
- }
1533
- return [e, t];
1534
- }
1535
- function ui(e, t, r) {
1536
- return e.set(r), t;
1537
- }
1538
- function li(e, t, r = 1) {
1539
- return e.set(t + r), t;
1540
- }
1541
- function ci(e, t, r = 1) {
1542
- const s = t + r;
1543
- return e.set(s), s;
1544
- }
1545
- function oi() {
1546
- le = !0;
1547
- }
1548
- function Ft(e) {
1549
- var t = le;
1550
- try {
1551
- return le = !1, [e(), le];
1552
- } finally {
1553
- le = t;
1554
- }
1555
- }
1556
- function _i(e, t = 1) {
1557
- const r = e();
1558
- return e(r + t), r;
1559
- }
1560
- function vi(e, t = 1) {
1561
- const r = e() + t;
1562
- return e(r), r;
1563
- }
1564
- const ms = {
1565
- get(e, t) {
1566
- if (!e.exclude.includes(t))
1567
- return e.props[t];
1568
- },
1569
- set(e, t) {
1570
- return !1;
1571
- },
1572
- getOwnPropertyDescriptor(e, t) {
1573
- if (!e.exclude.includes(t) && t in e.props)
1574
- return {
1575
- enumerable: !0,
1576
- configurable: !0,
1577
- value: e.props[t]
1578
- };
1579
- },
1580
- has(e, t) {
1581
- return e.exclude.includes(t) ? !1 : t in e.props;
1582
- },
1583
- ownKeys(e) {
1584
- return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
1585
- }
1586
- };
1587
- // @__NO_SIDE_EFFECTS__
1588
- function di(e, t, r) {
1589
- return new Proxy(
1590
- { props: e, exclude: t },
1591
- ms
1592
- );
1593
- }
1594
- const As = {
1595
- get(e, t) {
1596
- if (!e.exclude.includes(t))
1597
- return k(e.version), t in e.special ? e.special[t]() : e.props[t];
1598
- },
1599
- set(e, t, r) {
1600
- return t in e.special || (e.special[t] = Ts(
1601
- {
1602
- get [t]() {
1603
- return e.props[t];
1604
- }
1605
- },
1606
- /** @type {string} */
1607
- t,
1608
- Lt
1609
- )), e.special[t](r), vt(e.version), !0;
1610
- },
1611
- getOwnPropertyDescriptor(e, t) {
1612
- if (!e.exclude.includes(t) && t in e.props)
1613
- return {
1614
- enumerable: !0,
1615
- configurable: !0,
1616
- value: e.props[t]
1617
- };
1618
- },
1619
- deleteProperty(e, t) {
1620
- return e.exclude.includes(t) || (e.exclude.push(t), vt(e.version)), !0;
1621
- },
1622
- has(e, t) {
1623
- return e.exclude.includes(t) ? !1 : t in e.props;
1624
- },
1625
- ownKeys(e) {
1626
- return Reflect.ownKeys(e.props).filter((t) => !e.exclude.includes(t));
1627
- }
1628
- };
1629
- function hi(e, t) {
1630
- return new Proxy({ props: e, exclude: t, special: {}, version: te(0) }, As);
1631
- }
1632
- const Es = {
1633
- get(e, t) {
1634
- let r = e.props.length;
1635
- for (; r--; ) {
1636
- let s = e.props[r];
1637
- if (re(s) && (s = s()), typeof s == "object" && s !== null && t in s) return s[t];
1638
- }
1639
- },
1640
- set(e, t, r) {
1641
- let s = e.props.length;
1642
- for (; s--; ) {
1643
- let a = e.props[s];
1644
- re(a) && (a = a());
1645
- const i = _e(a, t);
1646
- if (i && i.set)
1647
- return i.set(r), !0;
1648
- }
1649
- return !1;
1650
- },
1651
- getOwnPropertyDescriptor(e, t) {
1652
- let r = e.props.length;
1653
- for (; r--; ) {
1654
- let s = e.props[r];
1655
- if (re(s) && (s = s()), typeof s == "object" && s !== null && t in s) {
1656
- const a = _e(s, t);
1657
- return a && !a.configurable && (a.configurable = !0), a;
1658
- }
1659
- }
1660
- },
1661
- has(e, t) {
1662
- if (t === Re || t === et) return !1;
1663
- for (let r of e.props)
1664
- if (re(r) && (r = r()), r != null && t in r) return !0;
1665
- return !1;
1666
- },
1667
- ownKeys(e) {
1668
- const t = [];
1669
- for (let r of e.props) {
1670
- re(r) && (r = r());
1671
- for (const s in r)
1672
- t.includes(s) || t.push(s);
1673
- }
1674
- return t;
1675
- }
1676
- };
1677
- function bi(...e) {
1678
- return new Proxy({ props: e }, Es);
1679
- }
1680
- function Ns(e) {
1681
- for (var t = F, r = F; t !== null && !(t.f & (Mr | Dr)); )
1682
- t = t.parent;
1683
- try {
1684
- return B(t), e();
1685
- } finally {
1686
- B(r);
1687
- }
1688
- }
1689
- function Ts(e, t, r, s) {
1690
- var M;
1691
- var a = (r & qr) !== 0, i = !0, n = (r & Br) !== 0, f = (r & Fr) !== 0, l = !1, u;
1692
- n ? [u, l] = Ft(() => (
1693
- /** @type {V} */
1694
- e[t]
1695
- )) : u = /** @type {V} */
1696
- e[t];
1697
- var c = Re in e || et in e, v = n && (((M = _e(e, t)) == null ? void 0 : M.set) ?? (c && t in e && ((A) => e[t] = A))) || void 0, o = (
1698
- /** @type {V} */
1699
- s
1700
- ), _ = !0, h = !1, d = () => (h = !0, _ && (_ = !1, f ? o = C(
1701
- /** @type {() => V} */
1702
- s
1703
- ) : o = /** @type {V} */
1704
- s), o);
1705
- u === void 0 && s !== void 0 && (v && i && Ir(), u = d(), v && v(u));
1706
- var p;
1707
- if (p = () => {
1708
- var A = (
1709
- /** @type {V} */
1710
- e[t]
1711
- );
1712
- return A === void 0 ? d() : (_ = !0, h = !1, A);
1713
- }, !(r & Lt))
1714
- return p;
1715
- if (v) {
1716
- var b = e.$$legacy;
1717
- return function(A, N) {
1718
- return arguments.length > 0 ? ((!N || b || l) && v(N ? p() : A), A) : p();
1719
- };
1720
- }
1721
- var g = !1, y = !1, w = Ce(u), m = Ns(
1722
- () => Ot(() => {
1723
- var A = p(), N = k(w);
1724
- return g ? (g = !1, y = !0, N) : (y = !1, w.v = A);
1725
- })
1726
- );
1727
- return a || (m.equals = Or), function(A, N) {
1728
- if (Lr !== null && (g = y, p(), k(w)), arguments.length > 0) {
1729
- const L = N ? k(m) : n ? Pr(A) : A;
1730
- return m.equals(L) || (g = !0, Ie(w, L), h && o !== void 0 && (o = L), C(() => k(m))), A;
1731
- }
1732
- return k(m);
1733
- };
1734
- }
1735
- function mt(e, t) {
1736
- var r = F, s = je, a = Se;
1737
- B(e), X(e), ye(e.ctx);
1738
- try {
1739
- t();
1740
- } finally {
1741
- B(r), X(s), ye(a);
1742
- }
1743
- }
1744
- function $i(e, t, r) {
1745
- var s = e, a;
1746
- Y(() => {
1747
- var i = (
1748
- /** @type {Effect} */
1749
- F
1750
- ), n = T, f = !1;
1751
- i.fn = (l) => {
1752
- var u = t.onerror;
1753
- let c = t.failed;
1754
- if (!u && !c || f)
1755
- throw l;
1756
- var v = () => {
1757
- D(a), mt(i, () => {
1758
- f = !1, a = S(() => r(s)), qe();
1759
- });
1760
- };
1761
- u == null || u(l, v), a ? he(a) : $ && (q(n), Hr(), q(me())), c && W(() => {
1762
- mt(i, () => {
1763
- f = !0;
1764
- try {
1765
- a = S(() => {
1766
- c(
1767
- s,
1768
- () => l,
1769
- () => v
1770
- );
1771
- });
1772
- } catch (o) {
1773
- Yr(o, i, null, i.ctx);
1774
- }
1775
- qe(), f = !1;
1776
- });
1777
- });
1778
- }, $ && P(), a = S(() => r(s)), qe();
1779
- }, ne | zr), $ && (s = T);
1780
- }
1781
- function pi(e, t) {
1782
- x(() => {
1783
- const r = /* @__PURE__ */ new Map(), s = e(), a = Qe(s) ? s : s == null ? [] : Array.from(s), i = a.length;
1784
- for (let n = 0; n < i; n++) {
1785
- const f = t(a[n], n);
1786
- if (r.has(f)) {
1787
- String(r.get(f));
1788
- let l = String(f);
1789
- l.startsWith("[object ") && (l = null), Ur();
1790
- }
1791
- r.set(f, n);
1792
- }
1793
- });
1794
- }
1795
- function gi(e, t, r, s, a) {
1796
- var n;
1797
- var i = !1;
1798
- (n = Vr) == null || n[ae], x(() => {
1799
- if (!i) {
1800
- var [f, l] = Ft(t);
1801
- if (!l) {
1802
- var u = r(), c = !1, v = x(() => {
1803
- c || f[u];
1804
- });
1805
- c = !0, v.deps === null && (Gr(), i = !0);
1806
- }
1807
- }
1808
- });
1809
- }
1810
- function xs(e) {
1811
- return new ks(e);
1812
- }
1813
- var H, O;
1814
- class ks {
1815
- /**
1816
- * @param {ComponentConstructorOptions & {
1817
- * component: any;
1818
- * }} options
1819
- */
1820
- constructor(t) {
1821
- /** @type {any} */
1822
- Z(this, H);
1823
- /** @type {Record<string, any>} */
1824
- Z(this, O);
1825
- var i;
1826
- var r = /* @__PURE__ */ new Map(), s = (n, f) => {
1827
- var l = Ce(f);
1828
- return r.set(n, l), l;
1829
- };
1830
- const a = new Proxy(
1831
- { ...t.props || {}, $$events: {} },
1832
- {
1833
- get(n, f) {
1834
- return k(r.get(f) ?? s(f, Reflect.get(n, f)));
1835
- },
1836
- has(n, f) {
1837
- return f === et ? !0 : (k(r.get(f) ?? s(f, Reflect.get(n, f))), Reflect.has(n, f));
1838
- },
1839
- set(n, f, l) {
1840
- return Ie(r.get(f) ?? s(f, l), l), Reflect.set(n, f, l);
1841
- }
1842
- }
1843
- );
1844
- ue(this, O, (t.hydrate ? Kr : Wr)(t.component, {
1845
- target: t.target,
1846
- anchor: t.anchor,
1847
- props: a,
1848
- context: t.context,
1849
- intro: t.intro ?? !1,
1850
- recover: t.recover
1851
- })), (!((i = t == null ? void 0 : t.props) != null && i.$$host) || t.sync === !1) && Nt(), ue(this, H, a.$$events);
1852
- for (const n of Object.keys(E(this, O)))
1853
- n === "$set" || n === "$destroy" || n === "$on" || Ae(this, n, {
1854
- get() {
1855
- return E(this, O)[n];
1856
- },
1857
- /** @param {any} value */
1858
- set(f) {
1859
- E(this, O)[n] = f;
1860
- },
1861
- enumerable: !0
1862
- });
1863
- E(this, O).$set = /** @param {Record<string, any>} next */
1864
- (n) => {
1865
- Object.assign(a, n);
1866
- }, E(this, O).$destroy = () => {
1867
- Xr(E(this, O));
1868
- };
1869
- }
1870
- /** @param {Record<string, any>} props */
1871
- $set(t) {
1872
- E(this, O).$set(t);
1873
- }
1874
- /**
1875
- * @param {string} event
1876
- * @param {(...args: any[]) => any} callback
1877
- * @returns {any}
1878
- */
1879
- $on(t, r) {
1880
- E(this, H)[t] = E(this, H)[t] || [];
1881
- const s = (...a) => r.call(this, ...a);
1882
- return E(this, H)[t].push(s), () => {
1883
- E(this, H)[t] = E(this, H)[t].filter(
1884
- /** @param {any} fn */
1885
- (a) => a !== s
1886
- );
1887
- };
1888
- }
1889
- $destroy() {
1890
- E(this, O).$destroy();
1891
- }
1892
- }
1893
- H = new WeakMap(), O = new WeakMap();
1894
- let zt;
1895
- typeof HTMLElement == "function" && (zt = class extends HTMLElement {
1896
- /**
1897
- * @param {*} $$componentCtor
1898
- * @param {*} $$slots
1899
- * @param {*} use_shadow_dom
1900
- */
1901
- constructor(t, r, s) {
1902
- super();
1903
- /** The Svelte component constructor */
1904
- I(this, "$$ctor");
1905
- /** Slots */
1906
- I(this, "$$s");
1907
- /** @type {any} The Svelte component instance */
1908
- I(this, "$$c");
1909
- /** Whether or not the custom element is connected */
1910
- I(this, "$$cn", !1);
1911
- /** @type {Record<string, any>} Component props data */
1912
- I(this, "$$d", {});
1913
- /** `true` if currently in the process of reflecting component props back to attributes */
1914
- I(this, "$$r", !1);
1915
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
1916
- I(this, "$$p_d", {});
1917
- /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
1918
- I(this, "$$l", {});
1919
- /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
1920
- I(this, "$$l_u", /* @__PURE__ */ new Map());
1921
- /** @type {any} The managed render effect for reflecting attributes */
1922
- I(this, "$$me");
1923
- this.$$ctor = t, this.$$s = r, s && this.attachShadow({ mode: "open" });
1924
- }
1925
- /**
1926
- * @param {string} type
1927
- * @param {EventListenerOrEventListenerObject} listener
1928
- * @param {boolean | AddEventListenerOptions} [options]
1929
- */
1930
- addEventListener(t, r, s) {
1931
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
1932
- const a = this.$$c.$on(t, r);
1933
- this.$$l_u.set(r, a);
1934
- }
1935
- super.addEventListener(t, r, s);
1936
- }
1937
- /**
1938
- * @param {string} type
1939
- * @param {EventListenerOrEventListenerObject} listener
1940
- * @param {boolean | AddEventListenerOptions} [options]
1941
- */
1942
- removeEventListener(t, r, s) {
1943
- if (super.removeEventListener(t, r, s), this.$$c) {
1944
- const a = this.$$l_u.get(r);
1945
- a && (a(), this.$$l_u.delete(r));
1946
- }
1947
- }
1948
- async connectedCallback() {
1949
- if (this.$$cn = !0, !this.$$c) {
1950
- let t = function(a) {
1951
- return (i) => {
1952
- const n = document.createElement("slot");
1953
- a !== "default" && (n.name = a), Zr(i, n);
1954
- };
1955
- };
1956
- if (await Promise.resolve(), !this.$$cn || this.$$c)
1957
- return;
1958
- const r = {}, s = Ss(this);
1959
- for (const a of this.$$s)
1960
- a in s && (a === "default" && !this.$$d.children ? (this.$$d.children = t(a), r.default = !0) : r[a] = t(a));
1961
- for (const a of this.attributes) {
1962
- const i = this.$$g_p(a.name);
1963
- i in this.$$d || (this.$$d[i] = ge(i, a.value, this.$$p_d, "toProp"));
1964
- }
1965
- for (const a in this.$$p_d)
1966
- !(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
1967
- this.$$c = xs({
1968
- component: this.$$ctor,
1969
- target: this.shadowRoot || this,
1970
- props: {
1971
- ...this.$$d,
1972
- $$slots: r,
1973
- $$host: this
1974
- }
1975
- }), this.$$me = Jr(() => {
1976
- x(() => {
1977
- var a;
1978
- this.$$r = !0;
1979
- for (const i of Ee(this.$$c)) {
1980
- if (!((a = this.$$p_d[i]) != null && a.reflect)) continue;
1981
- this.$$d[i] = this.$$c[i];
1982
- const n = ge(
1983
- i,
1984
- this.$$d[i],
1985
- this.$$p_d,
1986
- "toAttribute"
1987
- );
1988
- n == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, n);
1989
- }
1990
- this.$$r = !1;
1991
- });
1992
- });
1993
- for (const a in this.$$l)
1994
- for (const i of this.$$l[a]) {
1995
- const n = this.$$c.$on(a, i);
1996
- this.$$l_u.set(i, n);
1997
- }
1998
- this.$$l = {};
1999
- }
2000
- }
2001
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
2002
- // and setting attributes through setAttribute etc, this is helpful
2003
- /**
2004
- * @param {string} attr
2005
- * @param {string} _oldValue
2006
- * @param {string} newValue
2007
- */
2008
- attributeChangedCallback(t, r, s) {
2009
- var a;
2010
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = ge(t, s, this.$$p_d, "toProp"), (a = this.$$c) == null || a.$set({ [t]: this.$$d[t] }));
2011
- }
2012
- disconnectedCallback() {
2013
- this.$$cn = !1, Promise.resolve().then(() => {
2014
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2015
- });
2016
- }
2017
- /**
2018
- * @param {string} attribute_name
2019
- */
2020
- $$g_p(t) {
2021
- return Ee(this.$$p_d).find(
2022
- (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
2023
- ) || t;
2024
- }
2025
- });
2026
- function ge(e, t, r, s) {
2027
- var i;
2028
- const a = (i = r[e]) == null ? void 0 : i.type;
2029
- if (t = a === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !r[e])
2030
- return t;
2031
- if (s === "toAttribute")
2032
- switch (a) {
2033
- case "Object":
2034
- case "Array":
2035
- return t == null ? null : JSON.stringify(t);
2036
- case "Boolean":
2037
- return t ? "" : null;
2038
- case "Number":
2039
- return t ?? null;
2040
- default:
2041
- return t;
2042
- }
2043
- else
2044
- switch (a) {
2045
- case "Object":
2046
- case "Array":
2047
- return t && JSON.parse(t);
2048
- case "Boolean":
2049
- return t;
2050
- // conversion already handled above
2051
- case "Number":
2052
- return t != null ? +t : t;
2053
- default:
2054
- return t;
2055
- }
2056
- }
2057
- function Ss(e) {
2058
- const t = {};
2059
- return e.childNodes.forEach((r) => {
2060
- t[
2061
- /** @type {Element} node */
2062
- r.slot || "default"
2063
- ] = !0;
2064
- }), t;
2065
- }
2066
- function wi(e, t, r, s, a, i) {
2067
- let n = class extends zt {
2068
- constructor() {
2069
- super(e, r, a), this.$$p_d = t;
2070
- }
2071
- static get observedAttributes() {
2072
- return Ee(t).map(
2073
- (f) => (t[f].attribute || f).toLowerCase()
2074
- );
2075
- }
2076
- };
2077
- return Ee(t).forEach((f) => {
2078
- Ae(n.prototype, f, {
2079
- get() {
2080
- return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
2081
- },
2082
- set(l) {
2083
- var v;
2084
- l = ge(f, l, t), this.$$d[f] = l;
2085
- var u = this.$$c;
2086
- if (u) {
2087
- var c = (v = _e(u, f)) == null ? void 0 : v.get;
2088
- c ? u[f] = l : u.$set({ [f]: l });
2089
- }
2090
- }
2091
- });
2092
- }), s.forEach((f) => {
2093
- Ae(n.prototype, f, {
2094
- get() {
2095
- var l;
2096
- return (l = this.$$c) == null ? void 0 : l[f];
2097
- }
2098
- });
2099
- }), i && (n = i(n)), e.element = /** @type {any} */
2100
- n, n;
2101
- }
2102
- function yi(e) {
2103
- const t = e();
2104
- t && Qr(t) && jr();
2105
- }
2106
- function mi(e) {
2107
- const t = e();
2108
- t && !(typeof t == "string") && es();
2109
- }
2110
- function Ai(e, t) {
2111
- e != null && typeof e.subscribe != "function" && ts();
2112
- }
2113
- function Ei(e, ...t) {
2114
- return C(() => {
2115
- try {
2116
- let r = !1;
2117
- const s = [];
2118
- for (const a of t)
2119
- a && typeof a == "object" && Re in a ? (s.push(Et(a, !0)), r = !0) : s.push(a);
2120
- r && (rs(e), console.log("%c[snapshot]", "color: grey", ...s));
2121
- } catch {
2122
- }
2123
- }), t;
2124
- }
2125
- export {
2126
- xi as ADD_OWNER,
2127
- ae as FILENAME,
2128
- Wt as HMR,
2129
- or as NAMESPACE_SVG,
2130
- ra as action,
2131
- ri as add_legacy_event_listener,
2132
- Bs as add_locations,
2133
- ki as add_owner,
2134
- Si as add_owner_effect,
2135
- pa as animation,
2136
- Zr as append,
2137
- ta as append_styles,
2138
- Ci as apply,
2139
- Ls as assign,
2140
- Ps as assign_and,
2141
- Ds as assign_nullish,
2142
- Ms as assign_or,
2143
- sa as attr,
2144
- gr as autofocus,
2145
- Vs as await,
2146
- wa as bind_active_element,
2147
- Ta as bind_buffered,
2148
- Aa as bind_checked,
2149
- Ha as bind_content_editable,
2150
- Na as bind_current_time,
2151
- Fa as bind_element_size,
2152
- Ca as bind_ended,
2153
- Ea as bind_files,
2154
- Va as bind_focused,
2155
- ma as bind_group,
2156
- Pa as bind_muted,
2157
- Ma as bind_online,
2158
- Oa as bind_paused,
2159
- Ia as bind_playback_rate,
2160
- ka as bind_played,
2161
- Da as bind_prop,
2162
- Ya as bind_property,
2163
- Ra as bind_ready_state,
2164
- Ba as bind_resize_observer,
2165
- xa as bind_seekable,
2166
- Sa as bind_seeking,
2167
- qa as bind_select_value,
2168
- za as bind_this,
2169
- ya as bind_value,
2170
- La as bind_volume,
2171
- Ua as bind_window_scroll,
2172
- Ga as bind_window_size,
2173
- $i as boundary,
2174
- ti as bubble_event,
2175
- zs as check_target,
2176
- Ri as child,
2177
- qs as cleanup_styles,
2178
- vs as clsx,
2179
- Ii as comment,
2180
- js as component,
2181
- wi as create_custom_element,
2182
- Ks as css_props,
2183
- Oi as deep_read,
2184
- Ct as deep_read_state,
2185
- pr as delegate,
2186
- Ot as derived,
2187
- ir as derived_safe_equal,
2188
- Li as document,
2189
- Xs as each,
2190
- z as effect,
2191
- Jr as effect_root,
2192
- Pi as effect_tracking,
2193
- ea as element,
2194
- Mi as equals,
2195
- Di as event,
2196
- qi as exclude_from_object,
2197
- Bi as fallback,
2198
- Fi as first_child,
2199
- Nt as flush_sync,
2200
- k as get,
2201
- _a as handle_lazy_img,
2202
- zi as head,
2203
- Fs as hmr,
2204
- Js as html,
2205
- Hi as hydrate_template,
2206
- Us as if,
2207
- Ws as index,
2208
- ja as init,
2209
- $s as init_select,
2210
- Ys as inspect,
2211
- Yi as invalid_default_snippet,
2212
- Vi as invalidate_inner_signals,
2213
- ni as invalidate_store,
2214
- Gs as key,
2215
- Hs as legacy_api,
2216
- Ui as legacy_pre_effect,
2217
- Gi as legacy_pre_effect_reset,
2218
- hi as legacy_rest_props,
2219
- Ei as log_if_contains_state,
2220
- Ki as mark_module_end,
2221
- Wi as mark_module_start,
2222
- oi as mark_store_binding,
2223
- Xi as mathml_template,
2224
- Ji as mutable_state,
2225
- Zi as mutate,
2226
- Hr as next,
2227
- U as noop,
2228
- Qi as ns_template,
2229
- Ja as once,
2230
- ji as pop,
2231
- Qa as preventDefault,
2232
- Ts as prop,
2233
- Pr as proxy,
2234
- en as push,
2235
- An as raf,
2236
- ei as reactive_import,
2237
- aa as remove_input_defaults,
2238
- tn as remove_textarea_child,
2239
- x as render_effect,
2240
- rn as replay_events,
2241
- sn as reset,
2242
- di as rest_props,
2243
- an as safe_get,
2244
- Qs as sanitize_slots,
2245
- Ke as select_option,
2246
- Wa as self,
2247
- Ie as set,
2248
- Ne as set_attribute,
2249
- oa as set_attributes,
2250
- na as set_checked,
2251
- ha as set_class,
2252
- ca as set_custom_element_data,
2253
- fa as set_default_checked,
2254
- ua as set_default_value,
2255
- da as set_mathml_class,
2256
- ds as set_selected,
2257
- $a as set_style,
2258
- va as set_svg_class,
2259
- nn as set_text,
2260
- ia as set_value,
2261
- la as set_xlink_attribute,
2262
- fi as setup_stores,
2263
- fn as sibling,
2264
- un as skip_ownership_validation,
2265
- Zs as slot,
2266
- Et as snapshot,
2267
- ln as snippet,
2268
- bi as spread_props,
2269
- cn as state,
2270
- Za as stopImmediatePropagation,
2271
- Xa as stopPropagation,
2272
- ai as store_get,
2273
- ui as store_mutate,
2274
- ys as store_set,
2275
- ii as store_unsub,
2276
- on as strict_equals,
2277
- _n as svg_template_with_script,
2278
- vn as template,
2279
- dn as template_effect,
2280
- hn as template_with_script,
2281
- bn as text,
2282
- $n as tick,
2283
- ba as toggle_class,
2284
- pn as trace,
2285
- ga as transition,
2286
- Ka as trusted,
2287
- C as untrack,
2288
- vt as update,
2289
- si as update_legacy_props,
2290
- gn as update_pre,
2291
- vi as update_pre_prop,
2292
- ci as update_pre_store,
2293
- _i as update_prop,
2294
- li as update_store,
2295
- ot as user_effect,
2296
- Cr as user_pre_effect,
2297
- gi as validate_binding,
2298
- mi as validate_dynamic_element_tag,
2299
- pi as validate_each_keys,
2300
- Ai as validate_store,
2301
- yi as validate_void_dynamic_element,
2302
- wn as window,
2303
- yn as wrap_snippet
2304
- };