@44-audio/components 0.1.0-dev.11 → 0.1.0-dev.13

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.
@@ -0,0 +1,2632 @@
1
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
2
+ const fn = 1, on = 2, cn = 16, vn = 1, dn = 4, hn = 8, _n = 16, Hs = 1, Vs = 2, Ws = 4, pn = 1, gn = 2, sr = "[", bt = "[!", Et = "]", Me = {}, I = Symbol(), yn = "http://www.w3.org/1999/xhtml", ir = !1;
3
+ var Tt = Array.isArray, mn = Array.prototype.indexOf, xt = Array.from, Ze = Object.keys, ke = Object.defineProperty, we = Object.getOwnPropertyDescriptor, wn = Object.getOwnPropertyDescriptors, $n = Object.prototype, bn = Array.prototype, ar = Object.getPrototypeOf, Ut = Object.isExtensible;
4
+ function Ys(e) {
5
+ return typeof e == "function";
6
+ }
7
+ const Gs = () => {
8
+ };
9
+ function lr(e) {
10
+ for (var t = 0; t < e.length; t++)
11
+ e[t]();
12
+ }
13
+ function En() {
14
+ var e, t, r = new Promise((n, s) => {
15
+ e = n, t = s;
16
+ });
17
+ return { promise: r, resolve: e, reject: t };
18
+ }
19
+ const B = 2, At = 4, St = 8, De = 16, le = 32, ge = 64, ur = 128, V = 256, Qe = 512, P = 1024, W = 2048, ye = 4096, Y = 8192, xe = 16384, Ct = 32768, Nt = 65536, Ht = 1 << 17, Tn = 1 << 18, Fe = 1 << 19, xn = 1 << 20, ht = 1 << 21, Rt = 1 << 22, $e = 1 << 23, ze = Symbol("$state"), fr = Symbol("legacy props"), An = Symbol(""), Mt = new class extends Error {
20
+ name = "StaleReactionError";
21
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
22
+ }(), Ot = 3, He = 8;
23
+ function Sn() {
24
+ throw new Error("https://svelte.dev/e/await_outside_boundary");
25
+ }
26
+ function or(e) {
27
+ throw new Error("https://svelte.dev/e/lifecycle_outside_component");
28
+ }
29
+ function Cn() {
30
+ throw new Error("https://svelte.dev/e/async_derived_orphan");
31
+ }
32
+ function Nn(e) {
33
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
34
+ }
35
+ function Rn() {
36
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
37
+ }
38
+ function Mn(e) {
39
+ throw new Error("https://svelte.dev/e/effect_orphan");
40
+ }
41
+ function On() {
42
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
43
+ }
44
+ function Ln() {
45
+ throw new Error("https://svelte.dev/e/hydration_failed");
46
+ }
47
+ function kn(e) {
48
+ throw new Error("https://svelte.dev/e/props_invalid_value");
49
+ }
50
+ function In() {
51
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
52
+ }
53
+ function Pn() {
54
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
55
+ }
56
+ function Dn() {
57
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
58
+ }
59
+ function st(e) {
60
+ console.warn("https://svelte.dev/e/hydration_mismatch");
61
+ }
62
+ let A = !1;
63
+ function se(e) {
64
+ A = e;
65
+ }
66
+ let x;
67
+ function G(e) {
68
+ if (e === null)
69
+ throw st(), Me;
70
+ return x = e;
71
+ }
72
+ function it() {
73
+ return G(
74
+ /** @type {TemplateNode} */
75
+ /* @__PURE__ */ ue(x)
76
+ );
77
+ }
78
+ function Be(e) {
79
+ if (A) {
80
+ if (/* @__PURE__ */ ue(x) !== null)
81
+ throw st(), Me;
82
+ x = e;
83
+ }
84
+ }
85
+ function Js(e = 1) {
86
+ if (A) {
87
+ for (var t = e, r = x; t--; )
88
+ r = /** @type {TemplateNode} */
89
+ /* @__PURE__ */ ue(r);
90
+ x = r;
91
+ }
92
+ }
93
+ function _t() {
94
+ for (var e = 0, t = x; ; ) {
95
+ if (t.nodeType === He) {
96
+ var r = (
97
+ /** @type {Comment} */
98
+ t.data
99
+ );
100
+ if (r === Et) {
101
+ if (e === 0) return t;
102
+ e -= 1;
103
+ } else (r === sr || r === bt) && (e += 1);
104
+ }
105
+ var n = (
106
+ /** @type {TemplateNode} */
107
+ /* @__PURE__ */ ue(t)
108
+ );
109
+ t.remove(), t = n;
110
+ }
111
+ }
112
+ function cr(e) {
113
+ if (!e || e.nodeType !== He)
114
+ throw st(), Me;
115
+ return (
116
+ /** @type {Comment} */
117
+ e.data
118
+ );
119
+ }
120
+ function vr(e) {
121
+ return e === this.v;
122
+ }
123
+ function Fn(e, t) {
124
+ return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
125
+ }
126
+ function dr(e) {
127
+ return !Fn(e, this.v);
128
+ }
129
+ let jn = !1, q = null;
130
+ function et(e) {
131
+ q = e;
132
+ }
133
+ function Lt(e, t = !1, r) {
134
+ q = {
135
+ p: q,
136
+ c: null,
137
+ e: null,
138
+ s: e,
139
+ x: null,
140
+ l: null
141
+ };
142
+ }
143
+ function kt(e) {
144
+ var t = (
145
+ /** @type {ComponentContext} */
146
+ q
147
+ ), r = t.e;
148
+ if (r !== null) {
149
+ t.e = null;
150
+ for (var n of r)
151
+ Or(n);
152
+ }
153
+ return e !== void 0 && (t.x = e), q = t.p, e ?? /** @type {T} */
154
+ {};
155
+ }
156
+ function hr() {
157
+ return !0;
158
+ }
159
+ const zn = /* @__PURE__ */ new WeakMap();
160
+ function Bn(e) {
161
+ var t = b;
162
+ if (t === null)
163
+ return T.f |= $e, e;
164
+ if ((t.f & Ct) === 0) {
165
+ if ((t.f & ur) === 0)
166
+ throw !t.parent && e instanceof Error && _r(e), e;
167
+ t.b.error(e);
168
+ } else
169
+ It(e, t);
170
+ }
171
+ function It(e, t) {
172
+ for (; t !== null; ) {
173
+ if ((t.f & ur) !== 0)
174
+ try {
175
+ t.b.error(e);
176
+ return;
177
+ } catch (r) {
178
+ e = r;
179
+ }
180
+ t = t.parent;
181
+ }
182
+ throw e instanceof Error && _r(e), e;
183
+ }
184
+ function _r(e) {
185
+ const t = zn.get(e);
186
+ t && (ke(e, "message", {
187
+ value: t.message
188
+ }), ke(e, "stack", {
189
+ value: t.stack
190
+ }));
191
+ }
192
+ let Ve = [], pt = [];
193
+ function pr() {
194
+ var e = Ve;
195
+ Ve = [], lr(e);
196
+ }
197
+ function qn() {
198
+ var e = pt;
199
+ pt = [], lr(e);
200
+ }
201
+ function gr(e) {
202
+ Ve.length === 0 && queueMicrotask(pr), Ve.push(e);
203
+ }
204
+ function Un() {
205
+ Ve.length > 0 && pr(), pt.length > 0 && qn();
206
+ }
207
+ function Hn() {
208
+ const e = (
209
+ /** @type {Effect} */
210
+ b.b
211
+ );
212
+ return e === null && Sn(), e;
213
+ }
214
+ // @__NO_SIDE_EFFECTS__
215
+ function at(e) {
216
+ var t = B | W, r = T !== null && (T.f & B) !== 0 ? (
217
+ /** @type {Derived} */
218
+ T
219
+ ) : null;
220
+ return b === null || r !== null && (r.f & V) !== 0 ? t |= V : b.f |= Fe, {
221
+ ctx: q,
222
+ deps: null,
223
+ effects: null,
224
+ equals: vr,
225
+ f: t,
226
+ fn: e,
227
+ reactions: null,
228
+ rv: 0,
229
+ v: (
230
+ /** @type {V} */
231
+ I
232
+ ),
233
+ wv: 0,
234
+ parent: r ?? b,
235
+ ac: null
236
+ };
237
+ }
238
+ // @__NO_SIDE_EFFECTS__
239
+ function Vn(e, t) {
240
+ let r = (
241
+ /** @type {Effect | null} */
242
+ b
243
+ );
244
+ r === null && Cn();
245
+ var n = (
246
+ /** @type {Boundary} */
247
+ r.b
248
+ ), s = (
249
+ /** @type {Promise<V>} */
250
+ /** @type {unknown} */
251
+ void 0
252
+ ), i = We(
253
+ /** @type {V} */
254
+ I
255
+ ), a = null, u = !T;
256
+ return rs(() => {
257
+ try {
258
+ var l = e();
259
+ a && Promise.resolve(l).catch(() => {
260
+ });
261
+ } catch (d) {
262
+ l = Promise.reject(d);
263
+ }
264
+ var f = () => l;
265
+ s = a?.then(f, f) ?? Promise.resolve(l), a = s;
266
+ var c = (
267
+ /** @type {Batch} */
268
+ L
269
+ ), h = n.is_pending();
270
+ u && (n.update_pending_count(1), h || c.increment());
271
+ const o = (d, v = void 0) => {
272
+ a = null, h || c.activate(), v ? v !== Mt && (i.f |= $e, rt(i, v)) : ((i.f & $e) !== 0 && (i.f ^= $e), rt(i, d)), u && (n.update_pending_count(-1), h || c.decrement()), $r();
273
+ };
274
+ if (s.then(o, (d) => o(null, d || "unknown")), c)
275
+ return () => {
276
+ queueMicrotask(() => c.neuter());
277
+ };
278
+ }), new Promise((l) => {
279
+ function f(c) {
280
+ function h() {
281
+ c === s ? l(i) : f(s);
282
+ }
283
+ c.then(h, h);
284
+ }
285
+ f(s);
286
+ });
287
+ }
288
+ // @__NO_SIDE_EFFECTS__
289
+ function oe(e) {
290
+ const t = /* @__PURE__ */ at(e);
291
+ return Br(t), t;
292
+ }
293
+ // @__NO_SIDE_EFFECTS__
294
+ function yr(e) {
295
+ const t = /* @__PURE__ */ at(e);
296
+ return t.equals = dr, t;
297
+ }
298
+ function mr(e) {
299
+ var t = e.effects;
300
+ if (t !== null) {
301
+ e.effects = null;
302
+ for (var r = 0; r < t.length; r += 1)
303
+ Z(
304
+ /** @type {Effect} */
305
+ t[r]
306
+ );
307
+ }
308
+ }
309
+ function Wn(e) {
310
+ for (var t = e.parent; t !== null; ) {
311
+ if ((t.f & B) === 0)
312
+ return (
313
+ /** @type {Effect} */
314
+ t
315
+ );
316
+ t = t.parent;
317
+ }
318
+ return null;
319
+ }
320
+ function Pt(e) {
321
+ var t, r = b;
322
+ pe(Wn(e));
323
+ try {
324
+ mr(e), t = Vr(e);
325
+ } finally {
326
+ pe(r);
327
+ }
328
+ return t;
329
+ }
330
+ function wr(e) {
331
+ var t = Pt(e);
332
+ if (e.equals(t) || (e.v = t, e.wv = Ur()), !Ae) {
333
+ var r = (de || (e.f & V) !== 0) && e.deps !== null ? ye : P;
334
+ j(e, r);
335
+ }
336
+ }
337
+ function Yn(e, t, r) {
338
+ const n = at;
339
+ if (t.length === 0) {
340
+ r(e.map(n));
341
+ return;
342
+ }
343
+ var s = L, i = (
344
+ /** @type {Effect} */
345
+ b
346
+ ), a = Gn(), u = Hn();
347
+ Promise.all(t.map((l) => /* @__PURE__ */ Vn(l))).then((l) => {
348
+ s?.activate(), a();
349
+ try {
350
+ r([...e.map(n), ...l]);
351
+ } catch (f) {
352
+ (i.f & xe) === 0 && It(f, i);
353
+ }
354
+ s?.deactivate(), $r();
355
+ }).catch((l) => {
356
+ u.error(l);
357
+ });
358
+ }
359
+ function Gn() {
360
+ var e = b, t = T, r = q, n = L;
361
+ return function() {
362
+ pe(e), Q(t), et(r), n?.activate();
363
+ };
364
+ }
365
+ function $r() {
366
+ pe(null), Q(null), et(null);
367
+ }
368
+ const ot = /* @__PURE__ */ new Set();
369
+ let L = null, Vt = /* @__PURE__ */ new Set(), tt = [];
370
+ function br() {
371
+ const e = (
372
+ /** @type {() => void} */
373
+ tt.shift()
374
+ );
375
+ tt.length > 0 && queueMicrotask(br), e();
376
+ }
377
+ let Ee = [], lt = null, gt = !1, Ke = !1;
378
+ class Te {
379
+ /**
380
+ * The current values of any sources that are updated in this batch
381
+ * They keys of this map are identical to `this.#previous`
382
+ * @type {Map<Source, any>}
383
+ */
384
+ current = /* @__PURE__ */ new Map();
385
+ /**
386
+ * The values of any sources that are updated in this batch _before_ those updates took place.
387
+ * They keys of this map are identical to `this.#current`
388
+ * @type {Map<Source, any>}
389
+ */
390
+ #t = /* @__PURE__ */ new Map();
391
+ /**
392
+ * When the batch is committed (and the DOM is updated), we need to remove old branches
393
+ * and append new ones by calling the functions added inside (if/each/key/etc) blocks
394
+ * @type {Set<() => void>}
395
+ */
396
+ #e = /* @__PURE__ */ new Set();
397
+ /**
398
+ * The number of async effects that are currently in flight
399
+ */
400
+ #r = 0;
401
+ /**
402
+ * A deferred that resolves when the batch is committed, used with `settled()`
403
+ * TODO replace with Promise.withResolvers once supported widely enough
404
+ * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
405
+ */
406
+ #f = null;
407
+ /**
408
+ * True if an async effect inside this batch resolved and
409
+ * its parent branch was already deleted
410
+ */
411
+ #o = !1;
412
+ /**
413
+ * Async effects (created inside `async_derived`) encountered during processing.
414
+ * These run after the rest of the batch has updated, since they should
415
+ * always have the latest values
416
+ * @type {Effect[]}
417
+ */
418
+ #s = [];
419
+ /**
420
+ * The same as `#async_effects`, but for effects inside a newly-created
421
+ * `<svelte:boundary>` — these do not prevent the batch from committing
422
+ * @type {Effect[]}
423
+ */
424
+ #a = [];
425
+ /**
426
+ * Template effects and `$effect.pre` effects, which run when
427
+ * a batch is committed
428
+ * @type {Effect[]}
429
+ */
430
+ #i = [];
431
+ /**
432
+ * The same as `#render_effects`, but for `$effect` (which runs after)
433
+ * @type {Effect[]}
434
+ */
435
+ #n = [];
436
+ /**
437
+ * Block effects, which may need to re-run on subsequent flushes
438
+ * in order to update internal sources (e.g. each block items)
439
+ * @type {Effect[]}
440
+ */
441
+ #l = [];
442
+ /**
443
+ * Deferred effects (which run after async work has completed) that are DIRTY
444
+ * @type {Effect[]}
445
+ */
446
+ #c = [];
447
+ /**
448
+ * Deferred effects that are MAYBE_DIRTY
449
+ * @type {Effect[]}
450
+ */
451
+ #v = [];
452
+ /**
453
+ * A set of branches that still exist, but will be destroyed when this batch
454
+ * is committed — we skip over these during `process`
455
+ * @type {Set<Effect>}
456
+ */
457
+ skipped_effects = /* @__PURE__ */ new Set();
458
+ /**
459
+ *
460
+ * @param {Effect[]} root_effects
461
+ */
462
+ process(t) {
463
+ Ee = [];
464
+ for (const s of t)
465
+ this.#h(s);
466
+ if (this.#s.length === 0 && this.#r === 0) {
467
+ this.#d();
468
+ var r = this.#i, n = this.#n;
469
+ this.#i = [], this.#n = [], this.#l = [], L = null, Wt(r), Wt(n), L === null ? L = this : ot.delete(this), this.#f?.resolve();
470
+ } else
471
+ this.#u(this.#i), this.#u(this.#n), this.#u(this.#l);
472
+ for (const s of this.#s)
473
+ Le(s);
474
+ for (const s of this.#a)
475
+ Le(s);
476
+ this.#s = [], this.#a = [];
477
+ }
478
+ /**
479
+ * Traverse the effect tree, executing effects or stashing
480
+ * them for later execution as appropriate
481
+ * @param {Effect} root
482
+ */
483
+ #h(t) {
484
+ t.f ^= P;
485
+ for (var r = t.first; r !== null; ) {
486
+ var n = r.f, s = (n & (le | ge)) !== 0, i = s && (n & P) !== 0, a = i || (n & Y) !== 0 || this.skipped_effects.has(r);
487
+ if (!a && r.fn !== null) {
488
+ if (s)
489
+ r.f ^= P;
490
+ else if ((n & At) !== 0)
491
+ this.#n.push(r);
492
+ else if ((n & P) === 0)
493
+ if ((n & Rt) !== 0) {
494
+ var u = r.b?.is_pending() ? this.#a : this.#s;
495
+ u.push(r);
496
+ } else ut(r) && ((r.f & De) !== 0 && this.#l.push(r), Le(r));
497
+ var l = r.first;
498
+ if (l !== null) {
499
+ r = l;
500
+ continue;
501
+ }
502
+ }
503
+ var f = r.parent;
504
+ for (r = r.next; r === null && f !== null; )
505
+ r = f.next, f = f.parent;
506
+ }
507
+ }
508
+ /**
509
+ * @param {Effect[]} effects
510
+ */
511
+ #u(t) {
512
+ for (const r of t)
513
+ ((r.f & W) !== 0 ? this.#c : this.#v).push(r), j(r, P);
514
+ t.length = 0;
515
+ }
516
+ /**
517
+ * Associate a change to a given source with the current
518
+ * batch, noting its previous and current values
519
+ * @param {Source} source
520
+ * @param {any} value
521
+ */
522
+ capture(t, r) {
523
+ this.#t.has(t) || this.#t.set(t, r), this.current.set(t, t.v);
524
+ }
525
+ activate() {
526
+ L = this;
527
+ }
528
+ deactivate() {
529
+ L = null;
530
+ for (const t of Vt)
531
+ if (Vt.delete(t), t(), L !== null)
532
+ break;
533
+ }
534
+ neuter() {
535
+ this.#o = !0;
536
+ }
537
+ flush() {
538
+ Ee.length > 0 ? Er() : this.#d(), L === this && (this.#r === 0 && ot.delete(this), this.deactivate());
539
+ }
540
+ /**
541
+ * Append and remove branches to/from the DOM
542
+ */
543
+ #d() {
544
+ if (!this.#o)
545
+ for (const t of this.#e)
546
+ t();
547
+ this.#e.clear();
548
+ }
549
+ increment() {
550
+ this.#r += 1;
551
+ }
552
+ decrement() {
553
+ if (this.#r -= 1, this.#r === 0) {
554
+ for (const t of this.#c)
555
+ j(t, W), Ie(t);
556
+ for (const t of this.#v)
557
+ j(t, ye), Ie(t);
558
+ this.#i = [], this.#n = [], this.flush();
559
+ } else
560
+ this.deactivate();
561
+ }
562
+ /** @param {() => void} fn */
563
+ add_callback(t) {
564
+ this.#e.add(t);
565
+ }
566
+ settled() {
567
+ return (this.#f ??= En()).promise;
568
+ }
569
+ static ensure() {
570
+ if (L === null) {
571
+ const t = L = new Te();
572
+ ot.add(L), Ke || Te.enqueue(() => {
573
+ L === t && t.flush();
574
+ });
575
+ }
576
+ return L;
577
+ }
578
+ /** @param {() => void} task */
579
+ static enqueue(t) {
580
+ tt.length === 0 && queueMicrotask(br), tt.unshift(t);
581
+ }
582
+ }
583
+ function re(e) {
584
+ var t = Ke;
585
+ Ke = !0;
586
+ try {
587
+ for (var r; ; ) {
588
+ if (Un(), Ee.length === 0 && (L?.flush(), Ee.length === 0))
589
+ return lt = null, /** @type {T} */
590
+ r;
591
+ Er();
592
+ }
593
+ } finally {
594
+ Ke = t;
595
+ }
596
+ }
597
+ function Er() {
598
+ var e = Oe;
599
+ gt = !0;
600
+ try {
601
+ var t = 0;
602
+ for (Gt(!0); Ee.length > 0; ) {
603
+ var r = Te.ensure();
604
+ if (t++ > 1e3) {
605
+ var n, s;
606
+ Kn();
607
+ }
608
+ r.process(Ee), he.clear();
609
+ }
610
+ } finally {
611
+ gt = !1, Gt(e), lt = null;
612
+ }
613
+ }
614
+ function Kn() {
615
+ try {
616
+ On();
617
+ } catch (e) {
618
+ It(e, lt);
619
+ }
620
+ }
621
+ let me = null;
622
+ function Wt(e) {
623
+ var t = e.length;
624
+ if (t !== 0) {
625
+ for (var r = 0; r < t; ) {
626
+ var n = e[r++];
627
+ if ((n.f & (xe | Y)) === 0 && ut(n) && (me = [], Le(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? Fr(n) : n.fn = null), me?.length > 0)) {
628
+ he.clear();
629
+ for (const s of me)
630
+ Le(s);
631
+ me = [];
632
+ }
633
+ }
634
+ me = null;
635
+ }
636
+ }
637
+ function Ie(e) {
638
+ for (var t = lt = e; t.parent !== null; ) {
639
+ t = t.parent;
640
+ var r = t.f;
641
+ if (gt && t === b && (r & De) !== 0)
642
+ return;
643
+ if ((r & (ge | le)) !== 0) {
644
+ if ((r & P) === 0) return;
645
+ t.f ^= P;
646
+ }
647
+ }
648
+ Ee.push(t);
649
+ }
650
+ const he = /* @__PURE__ */ new Map();
651
+ function We(e, t) {
652
+ var r = {
653
+ f: 0,
654
+ // TODO ideally we could skip this altogether, but it causes type errors
655
+ v: e,
656
+ reactions: null,
657
+ equals: vr,
658
+ rv: 0,
659
+ wv: 0
660
+ };
661
+ return r;
662
+ }
663
+ // @__NO_SIDE_EFFECTS__
664
+ function F(e, t) {
665
+ const r = We(e);
666
+ return Br(r), r;
667
+ }
668
+ // @__NO_SIDE_EFFECTS__
669
+ function Tr(e, t = !1, r = !0) {
670
+ const n = We(e);
671
+ return t || (n.equals = dr), n;
672
+ }
673
+ function O(e, t, r = !1) {
674
+ T !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
675
+ // to ensure we error if state is set inside an inspect effect
676
+ (!J || (T.f & Ht) !== 0) && hr() && (T.f & (B | De | Rt | Ht)) !== 0 && !ie?.includes(e) && Dn();
677
+ let n = r ? Re(t) : t;
678
+ return rt(e, n);
679
+ }
680
+ function rt(e, t) {
681
+ if (!e.equals(t)) {
682
+ var r = e.v;
683
+ Ae ? he.set(e, t) : he.set(e, r), e.v = t;
684
+ var n = Te.ensure();
685
+ n.capture(e, r), (e.f & B) !== 0 && ((e.f & W) !== 0 && Pt(
686
+ /** @type {Derived} */
687
+ e
688
+ ), j(e, (e.f & V) === 0 ? P : ye)), e.wv = Ur(), xr(e, W), b !== null && (b.f & P) !== 0 && (b.f & (le | ge)) === 0 && (H === null ? is([e]) : H.push(e));
689
+ }
690
+ return t;
691
+ }
692
+ function ct(e) {
693
+ O(e, e.v + 1);
694
+ }
695
+ function xr(e, t) {
696
+ var r = e.reactions;
697
+ if (r !== null)
698
+ for (var n = r.length, s = 0; s < n; s++) {
699
+ var i = r[s], a = i.f, u = (a & W) === 0;
700
+ u && j(i, t), (a & B) !== 0 ? xr(
701
+ /** @type {Derived} */
702
+ i,
703
+ ye
704
+ ) : u && ((a & De) !== 0 && me !== null && me.push(
705
+ /** @type {Effect} */
706
+ i
707
+ ), Ie(
708
+ /** @type {Effect} */
709
+ i
710
+ ));
711
+ }
712
+ }
713
+ function Re(e) {
714
+ if (typeof e != "object" || e === null || ze in e)
715
+ return e;
716
+ const t = ar(e);
717
+ if (t !== $n && t !== bn)
718
+ return e;
719
+ var r = /* @__PURE__ */ new Map(), n = Tt(e), s = /* @__PURE__ */ F(0), i = be, a = (u) => {
720
+ if (be === i)
721
+ return u();
722
+ var l = T, f = be;
723
+ Q(null), Jt(i);
724
+ var c = u();
725
+ return Q(l), Jt(f), c;
726
+ };
727
+ return n && r.set("length", /* @__PURE__ */ F(
728
+ /** @type {any[]} */
729
+ e.length
730
+ )), new Proxy(
731
+ /** @type {any} */
732
+ e,
733
+ {
734
+ defineProperty(u, l, f) {
735
+ (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && In();
736
+ var c = r.get(l);
737
+ return c === void 0 ? c = a(() => {
738
+ var h = /* @__PURE__ */ F(f.value);
739
+ return r.set(l, h), h;
740
+ }) : O(c, f.value, !0), !0;
741
+ },
742
+ deleteProperty(u, l) {
743
+ var f = r.get(l);
744
+ if (f === void 0) {
745
+ if (l in u) {
746
+ const c = a(() => /* @__PURE__ */ F(I));
747
+ r.set(l, c), ct(s);
748
+ }
749
+ } else
750
+ O(f, I), ct(s);
751
+ return !0;
752
+ },
753
+ get(u, l, f) {
754
+ if (l === ze)
755
+ return e;
756
+ var c = r.get(l), h = l in u;
757
+ if (c === void 0 && (!h || we(u, l)?.writable) && (c = a(() => {
758
+ var d = Re(h ? u[l] : I), v = /* @__PURE__ */ F(d);
759
+ return v;
760
+ }), r.set(l, c)), c !== void 0) {
761
+ var o = p(c);
762
+ return o === I ? void 0 : o;
763
+ }
764
+ return Reflect.get(u, l, f);
765
+ },
766
+ getOwnPropertyDescriptor(u, l) {
767
+ var f = Reflect.getOwnPropertyDescriptor(u, l);
768
+ if (f && "value" in f) {
769
+ var c = r.get(l);
770
+ c && (f.value = p(c));
771
+ } else if (f === void 0) {
772
+ var h = r.get(l), o = h?.v;
773
+ if (h !== void 0 && o !== I)
774
+ return {
775
+ enumerable: !0,
776
+ configurable: !0,
777
+ value: o,
778
+ writable: !0
779
+ };
780
+ }
781
+ return f;
782
+ },
783
+ has(u, l) {
784
+ if (l === ze)
785
+ return !0;
786
+ var f = r.get(l), c = f !== void 0 && f.v !== I || Reflect.has(u, l);
787
+ if (f !== void 0 || b !== null && (!c || we(u, l)?.writable)) {
788
+ f === void 0 && (f = a(() => {
789
+ var o = c ? Re(u[l]) : I, d = /* @__PURE__ */ F(o);
790
+ return d;
791
+ }), r.set(l, f));
792
+ var h = p(f);
793
+ if (h === I)
794
+ return !1;
795
+ }
796
+ return c;
797
+ },
798
+ set(u, l, f, c) {
799
+ var h = r.get(l), o = l in u;
800
+ if (n && l === "length")
801
+ for (var d = f; d < /** @type {Source<number>} */
802
+ h.v; d += 1) {
803
+ var v = r.get(d + "");
804
+ v !== void 0 ? O(v, I) : d in u && (v = a(() => /* @__PURE__ */ F(I)), r.set(d + "", v));
805
+ }
806
+ if (h === void 0)
807
+ (!o || we(u, l)?.writable) && (h = a(() => /* @__PURE__ */ F(void 0)), O(h, Re(f)), r.set(l, h));
808
+ else {
809
+ o = h.v !== I;
810
+ var _ = a(() => Re(f));
811
+ O(h, _);
812
+ }
813
+ var y = Reflect.getOwnPropertyDescriptor(u, l);
814
+ if (y?.set && y.set.call(c, f), !o) {
815
+ if (n && typeof l == "string") {
816
+ var R = (
817
+ /** @type {Source<number>} */
818
+ r.get("length")
819
+ ), g = Number(l);
820
+ Number.isInteger(g) && g >= R.v && O(R, g + 1);
821
+ }
822
+ ct(s);
823
+ }
824
+ return !0;
825
+ },
826
+ ownKeys(u) {
827
+ p(s);
828
+ var l = Reflect.ownKeys(u).filter((h) => {
829
+ var o = r.get(h);
830
+ return o === void 0 || o.v !== I;
831
+ });
832
+ for (var [f, c] of r)
833
+ c.v !== I && !(f in u) && l.push(f);
834
+ return l;
835
+ },
836
+ setPrototypeOf() {
837
+ Pn();
838
+ }
839
+ }
840
+ );
841
+ }
842
+ var Yt, Ar, Sr, Cr;
843
+ function yt() {
844
+ if (Yt === void 0) {
845
+ Yt = window, Ar = /Firefox/.test(navigator.userAgent);
846
+ var e = Element.prototype, t = Node.prototype, r = Text.prototype;
847
+ Sr = we(t, "firstChild").get, Cr = we(t, "nextSibling").get, Ut(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ut(r) && (r.__t = void 0);
848
+ }
849
+ }
850
+ function ae(e = "") {
851
+ return document.createTextNode(e);
852
+ }
853
+ // @__NO_SIDE_EFFECTS__
854
+ function _e(e) {
855
+ return Sr.call(e);
856
+ }
857
+ // @__NO_SIDE_EFFECTS__
858
+ function ue(e) {
859
+ return Cr.call(e);
860
+ }
861
+ function qe(e, t) {
862
+ if (!A)
863
+ return /* @__PURE__ */ _e(e);
864
+ var r = (
865
+ /** @type {TemplateNode} */
866
+ /* @__PURE__ */ _e(x)
867
+ );
868
+ if (r === null)
869
+ r = x.appendChild(ae());
870
+ else if (t && r.nodeType !== Ot) {
871
+ var n = ae();
872
+ return r?.before(n), G(n), n;
873
+ }
874
+ return G(r), r;
875
+ }
876
+ function Jn(e, t) {
877
+ if (!A) {
878
+ var r = (
879
+ /** @type {DocumentFragment} */
880
+ /* @__PURE__ */ _e(
881
+ /** @type {Node} */
882
+ e
883
+ )
884
+ );
885
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ue(r) : r;
886
+ }
887
+ return x;
888
+ }
889
+ function vt(e, t = 1, r = !1) {
890
+ let n = A ? x : e;
891
+ for (var s; t--; )
892
+ s = n, n = /** @type {TemplateNode} */
893
+ /* @__PURE__ */ ue(n);
894
+ if (!A)
895
+ return n;
896
+ if (r && n?.nodeType !== Ot) {
897
+ var i = ae();
898
+ return n === null ? s?.after(i) : n.before(i), G(i), i;
899
+ }
900
+ return G(n), /** @type {TemplateNode} */
901
+ n;
902
+ }
903
+ function Nr(e) {
904
+ e.textContent = "";
905
+ }
906
+ function Rr() {
907
+ return !1;
908
+ }
909
+ function Dt(e) {
910
+ var t = T, r = b;
911
+ Q(null), pe(null);
912
+ try {
913
+ return e();
914
+ } finally {
915
+ Q(t), pe(r);
916
+ }
917
+ }
918
+ function Xn(e) {
919
+ b === null && T === null && Mn(), T !== null && (T.f & V) !== 0 && b === null && Rn(), Ae && Nn();
920
+ }
921
+ function Zn(e, t) {
922
+ var r = t.last;
923
+ r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
924
+ }
925
+ function ee(e, t, r, n = !0) {
926
+ var s = b;
927
+ s !== null && (s.f & Y) !== 0 && (e |= Y);
928
+ var i = {
929
+ ctx: q,
930
+ deps: null,
931
+ nodes_start: null,
932
+ nodes_end: null,
933
+ f: e | W,
934
+ first: null,
935
+ fn: t,
936
+ last: null,
937
+ next: null,
938
+ parent: s,
939
+ b: s && s.b,
940
+ prev: null,
941
+ teardown: null,
942
+ transitions: null,
943
+ wv: 0,
944
+ ac: null
945
+ };
946
+ if (r)
947
+ try {
948
+ Le(i), i.f |= Ct;
949
+ } catch (l) {
950
+ throw Z(i), l;
951
+ }
952
+ else t !== null && Ie(i);
953
+ if (n) {
954
+ var a = i;
955
+ if (r && a.deps === null && a.teardown === null && a.nodes_start === null && a.first === a.last && // either `null`, or a singular child
956
+ (a.f & Fe) === 0 && (a = a.first), a !== null && (a.parent = s, s !== null && Zn(a, s), T !== null && (T.f & B) !== 0 && (e & ge) === 0)) {
957
+ var u = (
958
+ /** @type {Derived} */
959
+ T
960
+ );
961
+ (u.effects ??= []).push(a);
962
+ }
963
+ }
964
+ return i;
965
+ }
966
+ function Mr(e) {
967
+ const t = ee(St, null, !1);
968
+ return j(t, P), t.teardown = e, t;
969
+ }
970
+ function Qn(e) {
971
+ Xn();
972
+ var t = (
973
+ /** @type {Effect} */
974
+ b.f
975
+ ), r = !T && (t & le) !== 0 && (t & Ct) === 0;
976
+ if (r) {
977
+ var n = (
978
+ /** @type {ComponentContext} */
979
+ q
980
+ );
981
+ (n.e ??= []).push(e);
982
+ } else
983
+ return Or(e);
984
+ }
985
+ function Or(e) {
986
+ return ee(At | xn, e, !1);
987
+ }
988
+ function es(e) {
989
+ Te.ensure();
990
+ const t = ee(ge | Fe, e, !0);
991
+ return () => {
992
+ Z(t);
993
+ };
994
+ }
995
+ function ts(e) {
996
+ Te.ensure();
997
+ const t = ee(ge | Fe, e, !0);
998
+ return (r = {}) => new Promise((n) => {
999
+ r.outro ? Ft(t, () => {
1000
+ Z(t), n(void 0);
1001
+ }) : (Z(t), n(void 0));
1002
+ });
1003
+ }
1004
+ function Lr(e) {
1005
+ return ee(At, e, !1);
1006
+ }
1007
+ function rs(e) {
1008
+ return ee(Rt | Fe, e, !0);
1009
+ }
1010
+ function kr(e, t = 0) {
1011
+ return ee(St | t, e, !0);
1012
+ }
1013
+ function Ue(e, t = [], r = []) {
1014
+ Yn(t, r, (n) => {
1015
+ ee(St, () => e(...n.map(p)), !0);
1016
+ });
1017
+ }
1018
+ function Ir(e, t = 0) {
1019
+ var r = ee(De | t, e, !0);
1020
+ return r;
1021
+ }
1022
+ function Pe(e, t = !0) {
1023
+ return ee(le | Fe, e, !0, t);
1024
+ }
1025
+ function Pr(e) {
1026
+ var t = e.teardown;
1027
+ if (t !== null) {
1028
+ const r = Ae, n = T;
1029
+ Kt(!0), Q(null);
1030
+ try {
1031
+ t.call(null);
1032
+ } finally {
1033
+ Kt(r), Q(n);
1034
+ }
1035
+ }
1036
+ }
1037
+ function Dr(e, t = !1) {
1038
+ var r = e.first;
1039
+ for (e.first = e.last = null; r !== null; ) {
1040
+ const s = r.ac;
1041
+ s !== null && Dt(() => {
1042
+ s.abort(Mt);
1043
+ });
1044
+ var n = r.next;
1045
+ (r.f & ge) !== 0 ? r.parent = null : Z(r, t), r = n;
1046
+ }
1047
+ }
1048
+ function ns(e) {
1049
+ for (var t = e.first; t !== null; ) {
1050
+ var r = t.next;
1051
+ (t.f & le) === 0 && Z(t), t = r;
1052
+ }
1053
+ }
1054
+ function Z(e, t = !0) {
1055
+ var r = !1;
1056
+ (t || (e.f & Tn) !== 0) && e.nodes_start !== null && e.nodes_end !== null && (ss(
1057
+ e.nodes_start,
1058
+ /** @type {TemplateNode} */
1059
+ e.nodes_end
1060
+ ), r = !0), Dr(e, t && !r), nt(e, 0), j(e, xe);
1061
+ var n = e.transitions;
1062
+ if (n !== null)
1063
+ for (const i of n)
1064
+ i.stop();
1065
+ Pr(e);
1066
+ var s = e.parent;
1067
+ s !== null && s.first !== null && Fr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = e.ac = null;
1068
+ }
1069
+ function ss(e, t) {
1070
+ for (; e !== null; ) {
1071
+ var r = e === t ? null : (
1072
+ /** @type {TemplateNode} */
1073
+ /* @__PURE__ */ ue(e)
1074
+ );
1075
+ e.remove(), e = r;
1076
+ }
1077
+ }
1078
+ function Fr(e) {
1079
+ var t = e.parent, r = e.prev, n = e.next;
1080
+ r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
1081
+ }
1082
+ function Ft(e, t) {
1083
+ var r = [];
1084
+ jt(e, r, !0), jr(r, () => {
1085
+ Z(e), t && t();
1086
+ });
1087
+ }
1088
+ function jr(e, t) {
1089
+ var r = e.length;
1090
+ if (r > 0) {
1091
+ var n = () => --r || t();
1092
+ for (var s of e)
1093
+ s.out(n);
1094
+ } else
1095
+ t();
1096
+ }
1097
+ function jt(e, t, r) {
1098
+ if ((e.f & Y) === 0) {
1099
+ if (e.f ^= Y, e.transitions !== null)
1100
+ for (const a of e.transitions)
1101
+ (a.is_global || r) && t.push(a);
1102
+ for (var n = e.first; n !== null; ) {
1103
+ var s = n.next, i = (n.f & Nt) !== 0 || (n.f & le) !== 0;
1104
+ jt(n, t, i ? r : !1), n = s;
1105
+ }
1106
+ }
1107
+ }
1108
+ function zt(e) {
1109
+ zr(e, !0);
1110
+ }
1111
+ function zr(e, t) {
1112
+ if ((e.f & Y) !== 0) {
1113
+ e.f ^= Y, (e.f & P) === 0 && (j(e, W), Ie(e));
1114
+ for (var r = e.first; r !== null; ) {
1115
+ var n = r.next, s = (r.f & Nt) !== 0 || (r.f & le) !== 0;
1116
+ zr(r, s ? t : !1), r = n;
1117
+ }
1118
+ if (e.transitions !== null)
1119
+ for (const i of e.transitions)
1120
+ (i.is_global || t) && i.in();
1121
+ }
1122
+ }
1123
+ let Oe = !1;
1124
+ function Gt(e) {
1125
+ Oe = e;
1126
+ }
1127
+ let Ae = !1;
1128
+ function Kt(e) {
1129
+ Ae = e;
1130
+ }
1131
+ let T = null, J = !1;
1132
+ function Q(e) {
1133
+ T = e;
1134
+ }
1135
+ let b = null;
1136
+ function pe(e) {
1137
+ b = e;
1138
+ }
1139
+ let ie = null;
1140
+ function Br(e) {
1141
+ T !== null && (ie === null ? ie = [e] : ie.push(e));
1142
+ }
1143
+ let D = null, z = 0, H = null;
1144
+ function is(e) {
1145
+ H = e;
1146
+ }
1147
+ let qr = 1, Ye = 0, be = Ye;
1148
+ function Jt(e) {
1149
+ be = e;
1150
+ }
1151
+ let de = !1;
1152
+ function Ur() {
1153
+ return ++qr;
1154
+ }
1155
+ function ut(e) {
1156
+ var t = e.f;
1157
+ if ((t & W) !== 0)
1158
+ return !0;
1159
+ if ((t & ye) !== 0) {
1160
+ var r = e.deps, n = (t & V) !== 0;
1161
+ if (r !== null) {
1162
+ var s, i, a = (t & Qe) !== 0, u = n && b !== null && !de, l = r.length;
1163
+ if ((a || u) && (b === null || (b.f & xe) === 0)) {
1164
+ var f = (
1165
+ /** @type {Derived} */
1166
+ e
1167
+ ), c = f.parent;
1168
+ for (s = 0; s < l; s++)
1169
+ i = r[s], (a || !i?.reactions?.includes(f)) && (i.reactions ??= []).push(f);
1170
+ a && (f.f ^= Qe), u && c !== null && (c.f & V) === 0 && (f.f ^= V);
1171
+ }
1172
+ for (s = 0; s < l; s++)
1173
+ if (i = r[s], ut(
1174
+ /** @type {Derived} */
1175
+ i
1176
+ ) && wr(
1177
+ /** @type {Derived} */
1178
+ i
1179
+ ), i.wv > e.wv)
1180
+ return !0;
1181
+ }
1182
+ (!n || b !== null && !de) && j(e, P);
1183
+ }
1184
+ return !1;
1185
+ }
1186
+ function Hr(e, t, r = !0) {
1187
+ var n = e.reactions;
1188
+ if (n !== null && !ie?.includes(e))
1189
+ for (var s = 0; s < n.length; s++) {
1190
+ var i = n[s];
1191
+ (i.f & B) !== 0 ? Hr(
1192
+ /** @type {Derived} */
1193
+ i,
1194
+ t,
1195
+ !1
1196
+ ) : t === i && (r ? j(i, W) : (i.f & P) !== 0 && j(i, ye), Ie(
1197
+ /** @type {Effect} */
1198
+ i
1199
+ ));
1200
+ }
1201
+ }
1202
+ function Vr(e) {
1203
+ var t = D, r = z, n = H, s = T, i = de, a = ie, u = q, l = J, f = be, c = e.f;
1204
+ D = /** @type {null | Value[]} */
1205
+ null, z = 0, H = null, de = (c & V) !== 0 && (J || !Oe || T === null), T = (c & (le | ge)) === 0 ? e : null, ie = null, et(e.ctx), J = !1, be = ++Ye, e.ac !== null && (Dt(() => {
1206
+ e.ac.abort(Mt);
1207
+ }), e.ac = null);
1208
+ try {
1209
+ e.f |= ht;
1210
+ var h = (
1211
+ /** @type {Function} */
1212
+ e.fn
1213
+ ), o = h(), d = e.deps;
1214
+ if (D !== null) {
1215
+ var v;
1216
+ if (nt(e, z), d !== null && z > 0)
1217
+ for (d.length = z + D.length, v = 0; v < D.length; v++)
1218
+ d[z + v] = D[v];
1219
+ else
1220
+ e.deps = d = D;
1221
+ if (!de || // Deriveds that already have reactions can cleanup, so we still add them as reactions
1222
+ (c & B) !== 0 && /** @type {import('#client').Derived} */
1223
+ e.reactions !== null)
1224
+ for (v = z; v < d.length; v++)
1225
+ (d[v].reactions ??= []).push(e);
1226
+ } else d !== null && z < d.length && (nt(e, z), d.length = z);
1227
+ if (hr() && H !== null && !J && d !== null && (e.f & (B | ye | W)) === 0)
1228
+ for (v = 0; v < /** @type {Source[]} */
1229
+ H.length; v++)
1230
+ Hr(
1231
+ H[v],
1232
+ /** @type {Effect} */
1233
+ e
1234
+ );
1235
+ return s !== null && s !== e && (Ye++, H !== null && (n === null ? n = H : n.push(.../** @type {Source[]} */
1236
+ H))), (e.f & $e) !== 0 && (e.f ^= $e), o;
1237
+ } catch (_) {
1238
+ return Bn(_);
1239
+ } finally {
1240
+ e.f ^= ht, D = t, z = r, H = n, T = s, de = i, ie = a, et(u), J = l, be = f;
1241
+ }
1242
+ }
1243
+ function as(e, t) {
1244
+ let r = t.reactions;
1245
+ if (r !== null) {
1246
+ var n = mn.call(r, e);
1247
+ if (n !== -1) {
1248
+ var s = r.length - 1;
1249
+ s === 0 ? r = t.reactions = null : (r[n] = r[s], r.pop());
1250
+ }
1251
+ }
1252
+ r === null && (t.f & B) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1253
+ // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1254
+ // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1255
+ (D === null || !D.includes(t)) && (j(t, ye), (t.f & (V | Qe)) === 0 && (t.f ^= Qe), mr(
1256
+ /** @type {Derived} **/
1257
+ t
1258
+ ), nt(
1259
+ /** @type {Derived} **/
1260
+ t,
1261
+ 0
1262
+ ));
1263
+ }
1264
+ function nt(e, t) {
1265
+ var r = e.deps;
1266
+ if (r !== null)
1267
+ for (var n = t; n < r.length; n++)
1268
+ as(e, r[n]);
1269
+ }
1270
+ function Le(e) {
1271
+ var t = e.f;
1272
+ if ((t & xe) === 0) {
1273
+ j(e, P);
1274
+ var r = b, n = Oe;
1275
+ b = e, Oe = !0;
1276
+ try {
1277
+ (t & De) !== 0 ? ns(e) : Dr(e), Pr(e);
1278
+ var s = Vr(e);
1279
+ e.teardown = typeof s == "function" ? s : null, e.wv = qr;
1280
+ var i;
1281
+ ir && jn && (e.f & W) !== 0 && e.deps;
1282
+ } finally {
1283
+ Oe = n, b = r;
1284
+ }
1285
+ }
1286
+ }
1287
+ function p(e) {
1288
+ var t = e.f, r = (t & B) !== 0;
1289
+ if (T !== null && !J) {
1290
+ var n = b !== null && (b.f & xe) !== 0;
1291
+ if (!n && !ie?.includes(e)) {
1292
+ var s = T.deps;
1293
+ if ((T.f & ht) !== 0)
1294
+ e.rv < Ye && (e.rv = Ye, D === null && s !== null && s[z] === e ? z++ : D === null ? D = [e] : (!de || !D.includes(e)) && D.push(e));
1295
+ else {
1296
+ (T.deps ??= []).push(e);
1297
+ var i = e.reactions;
1298
+ i === null ? e.reactions = [T] : i.includes(T) || i.push(T);
1299
+ }
1300
+ }
1301
+ } else if (r && /** @type {Derived} */
1302
+ e.deps === null && /** @type {Derived} */
1303
+ e.effects === null) {
1304
+ var a = (
1305
+ /** @type {Derived} */
1306
+ e
1307
+ ), u = a.parent;
1308
+ u !== null && (u.f & V) === 0 && (a.f ^= V);
1309
+ }
1310
+ if (Ae) {
1311
+ if (he.has(e))
1312
+ return he.get(e);
1313
+ if (r) {
1314
+ a = /** @type {Derived} */
1315
+ e;
1316
+ var l = a.v;
1317
+ return ((a.f & P) === 0 && a.reactions !== null || Wr(a)) && (l = Pt(a)), he.set(a, l), l;
1318
+ }
1319
+ } else r && (a = /** @type {Derived} */
1320
+ e, ut(a) && wr(a));
1321
+ if ((e.f & $e) !== 0)
1322
+ throw e.v;
1323
+ return e.v;
1324
+ }
1325
+ function Wr(e) {
1326
+ if (e.v === I) return !0;
1327
+ if (e.deps === null) return !1;
1328
+ for (const t of e.deps)
1329
+ if (he.has(t) || (t.f & B) !== 0 && Wr(
1330
+ /** @type {Derived} */
1331
+ t
1332
+ ))
1333
+ return !0;
1334
+ return !1;
1335
+ }
1336
+ function ft(e) {
1337
+ var t = J;
1338
+ try {
1339
+ return J = !0, e();
1340
+ } finally {
1341
+ J = t;
1342
+ }
1343
+ }
1344
+ const ls = -7169;
1345
+ function j(e, t) {
1346
+ e.f = e.f & ls | t;
1347
+ }
1348
+ const Yr = /* @__PURE__ */ new Set(), mt = /* @__PURE__ */ new Set();
1349
+ function us(e, t, r, n = {}) {
1350
+ function s(i) {
1351
+ if (n.capture || je.call(t, i), !i.cancelBubble)
1352
+ return Dt(() => r?.call(this, i));
1353
+ }
1354
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? gr(() => {
1355
+ t.addEventListener(e, s, n);
1356
+ }) : t.addEventListener(e, s, n), s;
1357
+ }
1358
+ function fs(e, t, r, n, s) {
1359
+ var i = { capture: n, passive: s }, a = us(e, t, r, i);
1360
+ (t === document.body || // @ts-ignore
1361
+ t === window || // @ts-ignore
1362
+ t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
1363
+ t instanceof HTMLMediaElement) && Mr(() => {
1364
+ t.removeEventListener(e, a, i);
1365
+ });
1366
+ }
1367
+ function os(e) {
1368
+ for (var t = 0; t < e.length; t++)
1369
+ Yr.add(e[t]);
1370
+ for (var r of mt)
1371
+ r(e);
1372
+ }
1373
+ let Xt = null;
1374
+ function je(e) {
1375
+ var t = this, r = (
1376
+ /** @type {Node} */
1377
+ t.ownerDocument
1378
+ ), n = e.type, s = e.composedPath?.() || [], i = (
1379
+ /** @type {null | Element} */
1380
+ s[0] || e.target
1381
+ );
1382
+ Xt = e;
1383
+ var a = 0, u = Xt === e && e.__root;
1384
+ if (u) {
1385
+ var l = s.indexOf(u);
1386
+ if (l !== -1 && (t === document || t === /** @type {any} */
1387
+ window)) {
1388
+ e.__root = t;
1389
+ return;
1390
+ }
1391
+ var f = s.indexOf(t);
1392
+ if (f === -1)
1393
+ return;
1394
+ l <= f && (a = l);
1395
+ }
1396
+ if (i = /** @type {Element} */
1397
+ s[a] || e.target, i !== t) {
1398
+ ke(e, "currentTarget", {
1399
+ configurable: !0,
1400
+ get() {
1401
+ return i || r;
1402
+ }
1403
+ });
1404
+ var c = T, h = b;
1405
+ Q(null), pe(null);
1406
+ try {
1407
+ for (var o, d = []; i !== null; ) {
1408
+ var v = i.assignedSlot || i.parentNode || /** @type {any} */
1409
+ i.host || null;
1410
+ try {
1411
+ var _ = i["__" + n];
1412
+ if (_ != null && (!/** @type {any} */
1413
+ i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1414
+ // -> the target could not have been disabled because it emits the event in the first place
1415
+ e.target === i))
1416
+ if (Tt(_)) {
1417
+ var [y, ...R] = _;
1418
+ y.apply(i, [e, ...R]);
1419
+ } else
1420
+ _.call(i, e);
1421
+ } catch (g) {
1422
+ o ? d.push(g) : o = g;
1423
+ }
1424
+ if (e.cancelBubble || v === t || v === null)
1425
+ break;
1426
+ i = v;
1427
+ }
1428
+ if (o) {
1429
+ for (let g of d)
1430
+ queueMicrotask(() => {
1431
+ throw g;
1432
+ });
1433
+ throw o;
1434
+ }
1435
+ } finally {
1436
+ e.__root = t, delete e.currentTarget, Q(c), pe(h);
1437
+ }
1438
+ }
1439
+ }
1440
+ function Gr(e) {
1441
+ var t = document.createElement("template");
1442
+ return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
1443
+ }
1444
+ function X(e, t) {
1445
+ var r = (
1446
+ /** @type {Effect} */
1447
+ b
1448
+ );
1449
+ r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
1450
+ }
1451
+ // @__NO_SIDE_EFFECTS__
1452
+ function Kr(e, t) {
1453
+ var r = (t & pn) !== 0, n = (t & gn) !== 0, s, i = !e.startsWith("<!>");
1454
+ return () => {
1455
+ if (A)
1456
+ return X(x, null), x;
1457
+ s === void 0 && (s = Gr(i ? e : "<!>" + e), r || (s = /** @type {Node} */
1458
+ /* @__PURE__ */ _e(s)));
1459
+ var a = (
1460
+ /** @type {TemplateNode} */
1461
+ n || Ar ? document.importNode(s, !0) : s.cloneNode(!0)
1462
+ );
1463
+ if (r) {
1464
+ var u = (
1465
+ /** @type {TemplateNode} */
1466
+ /* @__PURE__ */ _e(a)
1467
+ ), l = (
1468
+ /** @type {TemplateNode} */
1469
+ a.lastChild
1470
+ );
1471
+ X(u, l);
1472
+ } else
1473
+ X(a, a);
1474
+ return a;
1475
+ };
1476
+ }
1477
+ // @__NO_SIDE_EFFECTS__
1478
+ function cs(e, t, r = "svg") {
1479
+ var n = !e.startsWith("<!>"), s = `<${r}>${n ? e : "<!>" + e}</${r}>`, i;
1480
+ return () => {
1481
+ if (A)
1482
+ return X(x, null), x;
1483
+ if (!i) {
1484
+ var a = (
1485
+ /** @type {DocumentFragment} */
1486
+ Gr(s)
1487
+ ), u = (
1488
+ /** @type {Element} */
1489
+ /* @__PURE__ */ _e(a)
1490
+ );
1491
+ i = /** @type {Element} */
1492
+ /* @__PURE__ */ _e(u);
1493
+ }
1494
+ var l = (
1495
+ /** @type {TemplateNode} */
1496
+ i.cloneNode(!0)
1497
+ );
1498
+ return X(l, l), l;
1499
+ };
1500
+ }
1501
+ // @__NO_SIDE_EFFECTS__
1502
+ function Bt(e, t) {
1503
+ return /* @__PURE__ */ cs(e, t, "svg");
1504
+ }
1505
+ function Zt(e = "") {
1506
+ if (!A) {
1507
+ var t = ae(e + "");
1508
+ return X(t, t), t;
1509
+ }
1510
+ var r = x;
1511
+ return r.nodeType !== Ot && (r.before(r = ae()), G(r)), X(r, r), r;
1512
+ }
1513
+ function vs() {
1514
+ if (A)
1515
+ return X(x, null), x;
1516
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = ae();
1517
+ return e.append(t, r), X(t, r), e;
1518
+ }
1519
+ function ne(e, t) {
1520
+ if (A) {
1521
+ b.nodes_end = x, it();
1522
+ return;
1523
+ }
1524
+ e !== null && e.before(
1525
+ /** @type {Node} */
1526
+ t
1527
+ );
1528
+ }
1529
+ const ds = ["touchstart", "touchmove"];
1530
+ function hs(e) {
1531
+ return ds.includes(e);
1532
+ }
1533
+ let Qt = !0;
1534
+ function er(e, t) {
1535
+ var r = t == null ? "" : typeof t == "object" ? t + "" : t;
1536
+ r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
1537
+ }
1538
+ function Jr(e, t) {
1539
+ return Xr(e, t);
1540
+ }
1541
+ function _s(e, t) {
1542
+ yt(), t.intro = t.intro ?? !1;
1543
+ const r = t.target, n = A, s = x;
1544
+ try {
1545
+ for (var i = (
1546
+ /** @type {TemplateNode} */
1547
+ /* @__PURE__ */ _e(r)
1548
+ ); i && (i.nodeType !== He || /** @type {Comment} */
1549
+ i.data !== sr); )
1550
+ i = /** @type {TemplateNode} */
1551
+ /* @__PURE__ */ ue(i);
1552
+ if (!i)
1553
+ throw Me;
1554
+ se(!0), G(
1555
+ /** @type {Comment} */
1556
+ i
1557
+ ), it();
1558
+ const a = Xr(e, { ...t, anchor: i });
1559
+ if (x === null || x.nodeType !== He || /** @type {Comment} */
1560
+ x.data !== Et)
1561
+ throw st(), Me;
1562
+ return se(!1), /** @type {Exports} */
1563
+ a;
1564
+ } catch (a) {
1565
+ if (a instanceof Error && a.message.split(`
1566
+ `).some((u) => u.startsWith("https://svelte.dev/e/")))
1567
+ throw a;
1568
+ return a !== Me && console.warn("Failed to hydrate: ", a), t.recover === !1 && Ln(), yt(), Nr(r), se(!1), Jr(e, t);
1569
+ } finally {
1570
+ se(n), G(s);
1571
+ }
1572
+ }
1573
+ const Ne = /* @__PURE__ */ new Map();
1574
+ function Xr(e, { target: t, anchor: r, props: n = {}, events: s, context: i, intro: a = !0 }) {
1575
+ yt();
1576
+ var u = /* @__PURE__ */ new Set(), l = (h) => {
1577
+ for (var o = 0; o < h.length; o++) {
1578
+ var d = h[o];
1579
+ if (!u.has(d)) {
1580
+ u.add(d);
1581
+ var v = hs(d);
1582
+ t.addEventListener(d, je, { passive: v });
1583
+ var _ = Ne.get(d);
1584
+ _ === void 0 ? (document.addEventListener(d, je, { passive: v }), Ne.set(d, 1)) : Ne.set(d, _ + 1);
1585
+ }
1586
+ }
1587
+ };
1588
+ l(xt(Yr)), mt.add(l);
1589
+ var f = void 0, c = ts(() => {
1590
+ var h = r ?? t.appendChild(ae());
1591
+ return Pe(() => {
1592
+ if (i) {
1593
+ Lt({});
1594
+ var o = (
1595
+ /** @type {ComponentContext} */
1596
+ q
1597
+ );
1598
+ o.c = i;
1599
+ }
1600
+ s && (n.$$events = s), A && X(
1601
+ /** @type {TemplateNode} */
1602
+ h,
1603
+ null
1604
+ ), Qt = a, f = e(h, n) || {}, Qt = !0, A && (b.nodes_end = x), i && kt();
1605
+ }), () => {
1606
+ for (var o of u) {
1607
+ t.removeEventListener(o, je);
1608
+ var d = (
1609
+ /** @type {number} */
1610
+ Ne.get(o)
1611
+ );
1612
+ --d === 0 ? (document.removeEventListener(o, je), Ne.delete(o)) : Ne.set(o, d);
1613
+ }
1614
+ mt.delete(l), h !== r && h.parentNode?.removeChild(h);
1615
+ };
1616
+ });
1617
+ return wt.set(f, c), f;
1618
+ }
1619
+ let wt = /* @__PURE__ */ new WeakMap();
1620
+ function ps(e, t) {
1621
+ const r = wt.get(e);
1622
+ return r ? (wt.delete(e), r(t)) : Promise.resolve();
1623
+ }
1624
+ function Zr(e) {
1625
+ q === null && or(), Qn(() => {
1626
+ const t = ft(e);
1627
+ if (typeof t == "function") return (
1628
+ /** @type {() => void} */
1629
+ t
1630
+ );
1631
+ });
1632
+ }
1633
+ function Xs(e) {
1634
+ q === null && or(), Zr(() => () => ft(e));
1635
+ }
1636
+ function Je(e, t, r = !1) {
1637
+ A && it();
1638
+ var n = e, s = null, i = null, a = I, u = r ? Nt : 0, l = !1;
1639
+ const f = (d, v = !0) => {
1640
+ l = !0, o(v, d);
1641
+ };
1642
+ var c = null;
1643
+ function h() {
1644
+ c !== null && (c.lastChild.remove(), n.before(c), c = null);
1645
+ var d = a ? s : i, v = a ? i : s;
1646
+ d && zt(d), v && Ft(v, () => {
1647
+ a ? i = null : s = null;
1648
+ });
1649
+ }
1650
+ const o = (d, v) => {
1651
+ if (a === (a = d)) return;
1652
+ let _ = !1;
1653
+ if (A) {
1654
+ const C = cr(n) === bt;
1655
+ !!a === C && (n = _t(), G(n), se(!1), _ = !0);
1656
+ }
1657
+ var y = Rr(), R = n;
1658
+ if (y && (c = document.createDocumentFragment(), c.append(R = ae())), a ? s ??= v && Pe(() => v(R)) : i ??= v && Pe(() => v(R)), y) {
1659
+ var g = (
1660
+ /** @type {Batch} */
1661
+ L
1662
+ ), m = a ? s : i, E = a ? i : s;
1663
+ m && g.skipped_effects.delete(m), E && g.skipped_effects.add(E), g.add_callback(h);
1664
+ } else
1665
+ h();
1666
+ _ && se(!0);
1667
+ };
1668
+ Ir(() => {
1669
+ l = !1, t(f), l || o(null, null);
1670
+ }, u), A && (n = x);
1671
+ }
1672
+ function gs(e, t) {
1673
+ return t;
1674
+ }
1675
+ function ys(e, t, r) {
1676
+ for (var n = e.items, s = [], i = t.length, a = 0; a < i; a++)
1677
+ jt(t[a].e, s, !0);
1678
+ var u = i > 0 && s.length === 0 && r !== null;
1679
+ if (u) {
1680
+ var l = (
1681
+ /** @type {Element} */
1682
+ /** @type {Element} */
1683
+ r.parentNode
1684
+ );
1685
+ Nr(l), l.append(
1686
+ /** @type {Element} */
1687
+ r
1688
+ ), n.clear(), K(e, t[0].prev, t[i - 1].next);
1689
+ }
1690
+ jr(s, () => {
1691
+ for (var f = 0; f < i; f++) {
1692
+ var c = t[f];
1693
+ u || (n.delete(c.k), K(e, c.prev, c.next)), Z(c.e, !u);
1694
+ }
1695
+ });
1696
+ }
1697
+ function ms(e, t, r, n, s, i = null) {
1698
+ var a = e, u = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
1699
+ A && it();
1700
+ var l = null, f = !1, c = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ yr(() => {
1701
+ var _ = r();
1702
+ return Tt(_) ? _ : _ == null ? [] : xt(_);
1703
+ }), o, d;
1704
+ function v() {
1705
+ ws(
1706
+ d,
1707
+ o,
1708
+ u,
1709
+ c,
1710
+ a,
1711
+ s,
1712
+ t,
1713
+ n,
1714
+ r
1715
+ ), i !== null && (o.length === 0 ? l ? zt(l) : l = Pe(() => i(a)) : l !== null && Ft(l, () => {
1716
+ l = null;
1717
+ }));
1718
+ }
1719
+ Ir(() => {
1720
+ d ??= /** @type {Effect} */
1721
+ b, o = /** @type {V[]} */
1722
+ p(h);
1723
+ var _ = o.length;
1724
+ if (f && _ === 0)
1725
+ return;
1726
+ f = _ === 0;
1727
+ let y = !1;
1728
+ if (A) {
1729
+ var R = cr(a) === bt;
1730
+ R !== (_ === 0) && (a = _t(), G(a), se(!1), y = !0);
1731
+ }
1732
+ if (A) {
1733
+ for (var g = null, m, E = 0; E < _; E++) {
1734
+ if (x.nodeType === He && /** @type {Comment} */
1735
+ x.data === Et) {
1736
+ a = /** @type {Comment} */
1737
+ x, y = !0, se(!1);
1738
+ break;
1739
+ }
1740
+ var C = o[E], k = n(C, E);
1741
+ m = $t(
1742
+ x,
1743
+ u,
1744
+ g,
1745
+ null,
1746
+ C,
1747
+ k,
1748
+ E,
1749
+ s,
1750
+ t,
1751
+ r
1752
+ ), u.items.set(k, m), g = m;
1753
+ }
1754
+ _ > 0 && G(_t());
1755
+ }
1756
+ if (A)
1757
+ _ === 0 && i && (l = Pe(() => i(a)));
1758
+ else if (Rr()) {
1759
+ var fe = /* @__PURE__ */ new Set(), $ = (
1760
+ /** @type {Batch} */
1761
+ L
1762
+ );
1763
+ for (E = 0; E < _; E += 1) {
1764
+ C = o[E], k = n(C, E);
1765
+ var S = u.items.get(k) ?? c.get(k);
1766
+ S ? Qr(S, C, E) : (m = $t(
1767
+ null,
1768
+ u,
1769
+ null,
1770
+ null,
1771
+ C,
1772
+ k,
1773
+ E,
1774
+ s,
1775
+ t,
1776
+ r,
1777
+ !0
1778
+ ), c.set(k, m)), fe.add(k);
1779
+ }
1780
+ for (const [M, w] of u.items)
1781
+ fe.has(M) || $.skipped_effects.add(w.e);
1782
+ $.add_callback(v);
1783
+ } else
1784
+ v();
1785
+ y && se(!0), p(h);
1786
+ }), A && (a = x);
1787
+ }
1788
+ function ws(e, t, r, n, s, i, a, u, l) {
1789
+ var f = t.length, c = r.items, h = r.first, o = h, d, v = null, _ = [], y = [], R, g, m, E;
1790
+ for (E = 0; E < f; E += 1) {
1791
+ if (R = t[E], g = u(R, E), m = c.get(g), m === void 0) {
1792
+ var C = n.get(g);
1793
+ if (C !== void 0) {
1794
+ n.delete(g), c.set(g, C);
1795
+ var k = v ? v.next : o;
1796
+ K(r, v, C), K(r, C, k), dt(C, k, s), v = C;
1797
+ } else {
1798
+ var fe = o ? (
1799
+ /** @type {TemplateNode} */
1800
+ o.e.nodes_start
1801
+ ) : s;
1802
+ v = $t(
1803
+ fe,
1804
+ r,
1805
+ v,
1806
+ v === null ? r.first : v.next,
1807
+ R,
1808
+ g,
1809
+ E,
1810
+ i,
1811
+ a,
1812
+ l
1813
+ );
1814
+ }
1815
+ c.set(g, v), _ = [], y = [], o = v.next;
1816
+ continue;
1817
+ }
1818
+ if (Qr(m, R, E), (m.e.f & Y) !== 0 && zt(m.e), m !== o) {
1819
+ if (d !== void 0 && d.has(m)) {
1820
+ if (_.length < y.length) {
1821
+ var $ = y[0], S;
1822
+ v = $.prev;
1823
+ var M = _[0], w = _[_.length - 1];
1824
+ for (S = 0; S < _.length; S += 1)
1825
+ dt(_[S], $, s);
1826
+ for (S = 0; S < y.length; S += 1)
1827
+ d.delete(y[S]);
1828
+ K(r, M.prev, w.next), K(r, v, M), K(r, w, $), o = $, v = w, E -= 1, _ = [], y = [];
1829
+ } else
1830
+ d.delete(m), dt(m, o, s), K(r, m.prev, m.next), K(r, m, v === null ? r.first : v.next), K(r, v, m), v = m;
1831
+ continue;
1832
+ }
1833
+ for (_ = [], y = []; o !== null && o.k !== g; )
1834
+ (o.e.f & Y) === 0 && (d ??= /* @__PURE__ */ new Set()).add(o), y.push(o), o = o.next;
1835
+ if (o === null)
1836
+ continue;
1837
+ m = o;
1838
+ }
1839
+ _.push(m), v = m, o = m.next;
1840
+ }
1841
+ if (o !== null || d !== void 0) {
1842
+ for (var N = d === void 0 ? [] : xt(d); o !== null; )
1843
+ (o.e.f & Y) === 0 && N.push(o), o = o.next;
1844
+ var U = N.length;
1845
+ if (U > 0) {
1846
+ var Se = null;
1847
+ ys(r, N, Se);
1848
+ }
1849
+ }
1850
+ e.first = r.first && r.first.e, e.last = v && v.e;
1851
+ for (var Ce of n.values())
1852
+ Z(Ce.e);
1853
+ n.clear();
1854
+ }
1855
+ function Qr(e, t, r, n) {
1856
+ rt(e.v, t), e.i = r;
1857
+ }
1858
+ function $t(e, t, r, n, s, i, a, u, l, f, c) {
1859
+ var h = (l & fn) !== 0, o = (l & cn) === 0, d = h ? o ? /* @__PURE__ */ Tr(s, !1, !1) : We(s) : s, v = (l & on) === 0 ? a : We(a), _ = {
1860
+ i: v,
1861
+ v: d,
1862
+ k: i,
1863
+ a: null,
1864
+ // @ts-expect-error
1865
+ e: null,
1866
+ prev: r,
1867
+ next: n
1868
+ };
1869
+ try {
1870
+ if (e === null) {
1871
+ var y = document.createDocumentFragment();
1872
+ y.append(e = ae());
1873
+ }
1874
+ return _.e = Pe(() => u(
1875
+ /** @type {Node} */
1876
+ e,
1877
+ d,
1878
+ v,
1879
+ f
1880
+ ), A), _.e.prev = r && r.e, _.e.next = n && n.e, r === null ? c || (t.first = _) : (r.next = _, r.e.next = _.e), n !== null && (n.prev = _, n.e.prev = _.e), _;
1881
+ } finally {
1882
+ }
1883
+ }
1884
+ function dt(e, t, r) {
1885
+ for (var n = e.next ? (
1886
+ /** @type {TemplateNode} */
1887
+ e.next.e.nodes_start
1888
+ ) : r, s = t ? (
1889
+ /** @type {TemplateNode} */
1890
+ t.e.nodes_start
1891
+ ) : r, i = (
1892
+ /** @type {TemplateNode} */
1893
+ e.e.nodes_start
1894
+ ); i !== null && i !== n; ) {
1895
+ var a = (
1896
+ /** @type {TemplateNode} */
1897
+ /* @__PURE__ */ ue(i)
1898
+ );
1899
+ s.before(i), i = a;
1900
+ }
1901
+ }
1902
+ function K(e, t, r) {
1903
+ 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);
1904
+ }
1905
+ function en(e, t) {
1906
+ Lr(() => {
1907
+ var r = e.getRootNode(), n = (
1908
+ /** @type {ShadowRoot} */
1909
+ r.host ? (
1910
+ /** @type {ShadowRoot} */
1911
+ r
1912
+ ) : (
1913
+ /** @type {Document} */
1914
+ r.head ?? /** @type {Document} */
1915
+ r.ownerDocument.head
1916
+ )
1917
+ );
1918
+ if (!n.querySelector("#" + t.hash)) {
1919
+ const s = document.createElement("style");
1920
+ s.id = t.hash, s.textContent = t.code, n.appendChild(s);
1921
+ }
1922
+ });
1923
+ }
1924
+ function tn(e) {
1925
+ var t, r, n = "";
1926
+ if (typeof e == "string" || typeof e == "number") n += e;
1927
+ else if (typeof e == "object") if (Array.isArray(e)) {
1928
+ var s = e.length;
1929
+ for (t = 0; t < s; t++) e[t] && (r = tn(e[t])) && (n && (n += " "), n += r);
1930
+ } else for (r in e) e[r] && (n && (n += " "), n += r);
1931
+ return n;
1932
+ }
1933
+ function $s() {
1934
+ for (var e, t, r = 0, n = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (t = tn(e)) && (n && (n += " "), n += t);
1935
+ return n;
1936
+ }
1937
+ function bs(e) {
1938
+ return typeof e == "object" ? $s(e) : e ?? "";
1939
+ }
1940
+ function Es(e, t, r) {
1941
+ var n = e == null ? "" : "" + e;
1942
+ return t && (n = n ? n + " " + t : t), n === "" ? null : n;
1943
+ }
1944
+ function Ts(e, t) {
1945
+ return e == null ? null : String(e);
1946
+ }
1947
+ function xs(e, t, r, n, s, i) {
1948
+ var a = e.__className;
1949
+ if (A || a !== r || a === void 0) {
1950
+ var u = Es(r, n);
1951
+ (!A || u !== e.getAttribute("class")) && (u == null ? e.removeAttribute("class") : t ? e.className = u : e.setAttribute("class", u)), e.__className = r;
1952
+ }
1953
+ return i;
1954
+ }
1955
+ function As(e, t, r, n) {
1956
+ var s = e.__style;
1957
+ if (A || s !== t) {
1958
+ var i = Ts(t);
1959
+ (!A || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
1960
+ }
1961
+ return n;
1962
+ }
1963
+ const Ss = Symbol("is custom element"), Cs = Symbol("is html");
1964
+ function ce(e, t, r, n) {
1965
+ var s = Ns(e);
1966
+ A && (s[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || s[t] !== (s[t] = r) && (t === "loading" && (e[An] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Rs(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1967
+ }
1968
+ function Ns(e) {
1969
+ return (
1970
+ /** @type {Record<string | symbol, unknown>} **/
1971
+ // @ts-expect-error
1972
+ e.__attributes ??= {
1973
+ [Ss]: e.nodeName.includes("-"),
1974
+ [Cs]: e.namespaceURI === yn
1975
+ }
1976
+ );
1977
+ }
1978
+ var tr = /* @__PURE__ */ new Map();
1979
+ function Rs(e) {
1980
+ var t = e.getAttribute("is") || e.nodeName, r = tr.get(t);
1981
+ if (r) return r;
1982
+ tr.set(t, r = []);
1983
+ for (var n, s = e, i = Element.prototype; i !== s; ) {
1984
+ n = wn(s);
1985
+ for (var a in n)
1986
+ n[a].set && r.push(a);
1987
+ s = ar(s);
1988
+ }
1989
+ return r;
1990
+ }
1991
+ function rr(e, t) {
1992
+ return e === t || e?.[ze] === t;
1993
+ }
1994
+ function rn(e = {}, t, r, n) {
1995
+ return Lr(() => {
1996
+ var s, i;
1997
+ return kr(() => {
1998
+ s = i, i = [], ft(() => {
1999
+ e !== r(...i) && (t(e, ...i), s && rr(r(...s), e) && t(null, ...s));
2000
+ });
2001
+ }), () => {
2002
+ gr(() => {
2003
+ i && rr(r(...i), e) && t(null, ...i);
2004
+ });
2005
+ };
2006
+ }), e;
2007
+ }
2008
+ function Ms(e, t, r, n, s) {
2009
+ var i = () => {
2010
+ n(r[e]);
2011
+ };
2012
+ r.addEventListener(t, i), i(), (r === document.body || r === window || r === document) && Mr(() => {
2013
+ r.removeEventListener(t, i);
2014
+ });
2015
+ }
2016
+ let Ge = !1;
2017
+ function Os(e) {
2018
+ var t = Ge;
2019
+ try {
2020
+ return Ge = !1, [e(), Ge];
2021
+ } finally {
2022
+ Ge = t;
2023
+ }
2024
+ }
2025
+ function ve(e, t, r, n) {
2026
+ var s = (r & hn) !== 0, i = (r & _n) !== 0, a = (
2027
+ /** @type {V} */
2028
+ n
2029
+ ), u = !0, l = () => (u && (u = !1, a = i ? ft(
2030
+ /** @type {() => V} */
2031
+ n
2032
+ ) : (
2033
+ /** @type {V} */
2034
+ n
2035
+ )), a), f;
2036
+ if (s) {
2037
+ var c = ze in e || fr in e;
2038
+ f = we(e, t)?.set ?? (c && t in e ? (g) => e[t] = g : void 0);
2039
+ }
2040
+ var h, o = !1;
2041
+ s ? [h, o] = Os(() => (
2042
+ /** @type {V} */
2043
+ e[t]
2044
+ )) : h = /** @type {V} */
2045
+ e[t], h === void 0 && n !== void 0 && (h = l(), f && (kn(), f(h)));
2046
+ var d;
2047
+ if (d = () => {
2048
+ var g = (
2049
+ /** @type {V} */
2050
+ e[t]
2051
+ );
2052
+ return g === void 0 ? l() : (u = !0, g);
2053
+ }, (r & dn) === 0)
2054
+ return d;
2055
+ if (f) {
2056
+ var v = e.$$legacy;
2057
+ return (
2058
+ /** @type {() => V} */
2059
+ (function(g, m) {
2060
+ return arguments.length > 0 ? ((!m || v || o) && f(m ? d() : g), g) : d();
2061
+ })
2062
+ );
2063
+ }
2064
+ var _ = !1, y = ((r & vn) !== 0 ? at : yr)(() => (_ = !1, d()));
2065
+ s && p(y);
2066
+ var R = (
2067
+ /** @type {Effect} */
2068
+ b
2069
+ );
2070
+ return (
2071
+ /** @type {() => V} */
2072
+ (function(g, m) {
2073
+ if (arguments.length > 0) {
2074
+ const E = m ? p(y) : s ? Re(g) : g;
2075
+ return O(y, E), _ = !0, a !== void 0 && (a = E), g;
2076
+ }
2077
+ return Ae && _ || (R.f & xe) !== 0 ? y.v : p(y);
2078
+ })
2079
+ );
2080
+ }
2081
+ function Ls(e) {
2082
+ return new ks(e);
2083
+ }
2084
+ class ks {
2085
+ /** @type {any} */
2086
+ #t;
2087
+ /** @type {Record<string, any>} */
2088
+ #e;
2089
+ /**
2090
+ * @param {ComponentConstructorOptions & {
2091
+ * component: any;
2092
+ * }} options
2093
+ */
2094
+ constructor(t) {
2095
+ var r = /* @__PURE__ */ new Map(), n = (i, a) => {
2096
+ var u = /* @__PURE__ */ Tr(a, !1, !1);
2097
+ return r.set(i, u), u;
2098
+ };
2099
+ const s = new Proxy(
2100
+ { ...t.props || {}, $$events: {} },
2101
+ {
2102
+ get(i, a) {
2103
+ return p(r.get(a) ?? n(a, Reflect.get(i, a)));
2104
+ },
2105
+ has(i, a) {
2106
+ return a === fr ? !0 : (p(r.get(a) ?? n(a, Reflect.get(i, a))), Reflect.has(i, a));
2107
+ },
2108
+ set(i, a, u) {
2109
+ return O(r.get(a) ?? n(a, u), u), Reflect.set(i, a, u);
2110
+ }
2111
+ }
2112
+ );
2113
+ this.#e = (t.hydrate ? _s : Jr)(t.component, {
2114
+ target: t.target,
2115
+ anchor: t.anchor,
2116
+ props: s,
2117
+ context: t.context,
2118
+ intro: t.intro ?? !1,
2119
+ recover: t.recover
2120
+ }), (!t?.props?.$$host || t.sync === !1) && re(), this.#t = s.$$events;
2121
+ for (const i of Object.keys(this.#e))
2122
+ i === "$set" || i === "$destroy" || i === "$on" || ke(this, i, {
2123
+ get() {
2124
+ return this.#e[i];
2125
+ },
2126
+ /** @param {any} value */
2127
+ set(a) {
2128
+ this.#e[i] = a;
2129
+ },
2130
+ enumerable: !0
2131
+ });
2132
+ this.#e.$set = /** @param {Record<string, any>} next */
2133
+ (i) => {
2134
+ Object.assign(s, i);
2135
+ }, this.#e.$destroy = () => {
2136
+ ps(this.#e);
2137
+ };
2138
+ }
2139
+ /** @param {Record<string, any>} props */
2140
+ $set(t) {
2141
+ this.#e.$set(t);
2142
+ }
2143
+ /**
2144
+ * @param {string} event
2145
+ * @param {(...args: any[]) => any} callback
2146
+ * @returns {any}
2147
+ */
2148
+ $on(t, r) {
2149
+ this.#t[t] = this.#t[t] || [];
2150
+ const n = (...s) => r.call(this, ...s);
2151
+ return this.#t[t].push(n), () => {
2152
+ this.#t[t] = this.#t[t].filter(
2153
+ /** @param {any} fn */
2154
+ (s) => s !== n
2155
+ );
2156
+ };
2157
+ }
2158
+ $destroy() {
2159
+ this.#e.$destroy();
2160
+ }
2161
+ }
2162
+ let nn;
2163
+ typeof HTMLElement == "function" && (nn = class extends HTMLElement {
2164
+ /** The Svelte component constructor */
2165
+ $$ctor;
2166
+ /** Slots */
2167
+ $$s;
2168
+ /** @type {any} The Svelte component instance */
2169
+ $$c;
2170
+ /** Whether or not the custom element is connected */
2171
+ $$cn = !1;
2172
+ /** @type {Record<string, any>} Component props data */
2173
+ $$d = {};
2174
+ /** `true` if currently in the process of reflecting component props back to attributes */
2175
+ $$r = !1;
2176
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2177
+ $$p_d = {};
2178
+ /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2179
+ $$l = {};
2180
+ /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2181
+ $$l_u = /* @__PURE__ */ new Map();
2182
+ /** @type {any} The managed render effect for reflecting attributes */
2183
+ $$me;
2184
+ /**
2185
+ * @param {*} $$componentCtor
2186
+ * @param {*} $$slots
2187
+ * @param {*} use_shadow_dom
2188
+ */
2189
+ constructor(e, t, r) {
2190
+ super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
2191
+ }
2192
+ /**
2193
+ * @param {string} type
2194
+ * @param {EventListenerOrEventListenerObject} listener
2195
+ * @param {boolean | AddEventListenerOptions} [options]
2196
+ */
2197
+ addEventListener(e, t, r) {
2198
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
2199
+ const n = this.$$c.$on(e, t);
2200
+ this.$$l_u.set(t, n);
2201
+ }
2202
+ super.addEventListener(e, t, r);
2203
+ }
2204
+ /**
2205
+ * @param {string} type
2206
+ * @param {EventListenerOrEventListenerObject} listener
2207
+ * @param {boolean | AddEventListenerOptions} [options]
2208
+ */
2209
+ removeEventListener(e, t, r) {
2210
+ if (super.removeEventListener(e, t, r), this.$$c) {
2211
+ const n = this.$$l_u.get(t);
2212
+ n && (n(), this.$$l_u.delete(t));
2213
+ }
2214
+ }
2215
+ async connectedCallback() {
2216
+ if (this.$$cn = !0, !this.$$c) {
2217
+ let e = function(n) {
2218
+ return (s) => {
2219
+ const i = document.createElement("slot");
2220
+ n !== "default" && (i.name = n), ne(s, i);
2221
+ };
2222
+ };
2223
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
2224
+ return;
2225
+ const t = {}, r = Is(this);
2226
+ for (const n of this.$$s)
2227
+ n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2228
+ for (const n of this.attributes) {
2229
+ const s = this.$$g_p(n.name);
2230
+ s in this.$$d || (this.$$d[s] = Xe(s, n.value, this.$$p_d, "toProp"));
2231
+ }
2232
+ for (const n in this.$$p_d)
2233
+ !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2234
+ this.$$c = Ls({
2235
+ component: this.$$ctor,
2236
+ target: this.shadowRoot || this,
2237
+ props: {
2238
+ ...this.$$d,
2239
+ $$slots: t,
2240
+ $$host: this
2241
+ }
2242
+ }), this.$$me = es(() => {
2243
+ kr(() => {
2244
+ this.$$r = !0;
2245
+ for (const n of Ze(this.$$c)) {
2246
+ if (!this.$$p_d[n]?.reflect) continue;
2247
+ this.$$d[n] = this.$$c[n];
2248
+ const s = Xe(
2249
+ n,
2250
+ this.$$d[n],
2251
+ this.$$p_d,
2252
+ "toAttribute"
2253
+ );
2254
+ s == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, s);
2255
+ }
2256
+ this.$$r = !1;
2257
+ });
2258
+ });
2259
+ for (const n in this.$$l)
2260
+ for (const s of this.$$l[n]) {
2261
+ const i = this.$$c.$on(n, s);
2262
+ this.$$l_u.set(s, i);
2263
+ }
2264
+ this.$$l = {};
2265
+ }
2266
+ }
2267
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
2268
+ // and setting attributes through setAttribute etc, this is helpful
2269
+ /**
2270
+ * @param {string} attr
2271
+ * @param {string} _oldValue
2272
+ * @param {string} newValue
2273
+ */
2274
+ attributeChangedCallback(e, t, r) {
2275
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Xe(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2276
+ }
2277
+ disconnectedCallback() {
2278
+ this.$$cn = !1, Promise.resolve().then(() => {
2279
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2280
+ });
2281
+ }
2282
+ /**
2283
+ * @param {string} attribute_name
2284
+ */
2285
+ $$g_p(e) {
2286
+ return Ze(this.$$p_d).find(
2287
+ (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
2288
+ ) || e;
2289
+ }
2290
+ });
2291
+ function Xe(e, t, r, n) {
2292
+ const s = r[e]?.type;
2293
+ if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
2294
+ return t;
2295
+ if (n === "toAttribute")
2296
+ switch (s) {
2297
+ case "Object":
2298
+ case "Array":
2299
+ return t == null ? null : JSON.stringify(t);
2300
+ case "Boolean":
2301
+ return t ? "" : null;
2302
+ case "Number":
2303
+ return t ?? null;
2304
+ default:
2305
+ return t;
2306
+ }
2307
+ else
2308
+ switch (s) {
2309
+ case "Object":
2310
+ case "Array":
2311
+ return t && JSON.parse(t);
2312
+ case "Boolean":
2313
+ return t;
2314
+ // conversion already handled above
2315
+ case "Number":
2316
+ return t != null ? +t : t;
2317
+ default:
2318
+ return t;
2319
+ }
2320
+ }
2321
+ function Is(e) {
2322
+ const t = {};
2323
+ return e.childNodes.forEach((r) => {
2324
+ t[
2325
+ /** @type {Element} node */
2326
+ r.slot || "default"
2327
+ ] = !0;
2328
+ }), t;
2329
+ }
2330
+ function sn(e, t, r, n, s, i) {
2331
+ let a = class extends nn {
2332
+ constructor() {
2333
+ super(e, r, s), this.$$p_d = t;
2334
+ }
2335
+ static get observedAttributes() {
2336
+ return Ze(t).map(
2337
+ (u) => (t[u].attribute || u).toLowerCase()
2338
+ );
2339
+ }
2340
+ };
2341
+ return Ze(t).forEach((u) => {
2342
+ ke(a.prototype, u, {
2343
+ get() {
2344
+ return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
2345
+ },
2346
+ set(l) {
2347
+ l = Xe(u, l, t), this.$$d[u] = l;
2348
+ var f = this.$$c;
2349
+ if (f) {
2350
+ var c = we(f, u)?.get;
2351
+ c ? f[u] = l : f.$set({ [u]: l });
2352
+ }
2353
+ }
2354
+ });
2355
+ }), n.forEach((u) => {
2356
+ ke(a.prototype, u, {
2357
+ get() {
2358
+ return this.$$c?.[u];
2359
+ }
2360
+ });
2361
+ }), e.element = /** @type {any} */
2362
+ a, a;
2363
+ }
2364
+ function nr(e) {
2365
+ if (isNaN(e) || e < 0)
2366
+ return "-:--";
2367
+ const t = Math.floor(e / 60), r = Math.round(e % 60);
2368
+ return `${t}:${r.toString().padStart(2, "0")}`;
2369
+ }
2370
+ var Ps = /* @__PURE__ */ Bt('<rect rx="1"></rect>'), Ds = /* @__PURE__ */ Kr('<div class="container svelte-efr4jv" role="group" aria-label="audio player"><svg width="100%" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="svelte-efr4jv"><!></svg></div>');
2371
+ const Fs = {
2372
+ hash: "svelte-efr4jv",
2373
+ code: `svg.svelte-efr4jv {box-sizing:border-box;margin:0;padding:0;}.container.svelte-efr4jv {flex:1;box-sizing:border-box;margin:0;padding:0;display:flex;align-items:center;}.bar.svelte-efr4jv {transition:fill 0.2s;}.played.svelte-efr4jv {fill:var(--44-color-2, var(--fortyfour-recorder-bg-primary));}.unplayed.svelte-efr4jv {fill:var(--44-color-1, var(--fortyfour-recorder-color-0));}.recording-pulse.svelte-efr4jv {
2374
+ animation: svelte-efr4jv-pulse 0.5s ease-out;}
2375
+
2376
+ @keyframes svelte-efr4jv-pulse {
2377
+ 0% {
2378
+ opacity: 0.5;
2379
+ }
2380
+ 100% {
2381
+ opacity: 1;
2382
+ }
2383
+ }`
2384
+ };
2385
+ function an(e, t) {
2386
+ Lt(t, !0), en(e, Fs);
2387
+ function r($, S) {
2388
+ const M = $.length / S, w = [];
2389
+ for (let N = 0; N < S; N++) {
2390
+ const U = Math.floor(N * M), Se = Math.floor((N + 1) * M), Ce = $.slice(U, Math.max(U + 1, Se)), te = Ce.reduce((un, qt) => un + qt * qt, 0), ln = Math.sqrt(te / Ce.length);
2391
+ w.push(ln);
2392
+ }
2393
+ return w;
2394
+ }
2395
+ let n = ve(t, "data", 7), s = ve(t, "timeMs", 7, null), i = ve(t, "barWidth", 7, 3), a = ve(t, "spacing", 7, 1), u = ve(t, "playedColor", 7, null), l = ve(t, "unplayedColor", 7, null), f = /* @__PURE__ */ F(0), c = /* @__PURE__ */ F(!1), h = null;
2396
+ Zr(() => {
2397
+ const $ = new ResizeObserver((S) => {
2398
+ for (let M of S)
2399
+ M.contentBoxSize ? O(f, M.contentBoxSize[0]?.inlineSize || M.contentBoxSize.inlineSize, !0) : O(f, M.contentRect.width, !0), O(c, !0);
2400
+ });
2401
+ return h && $.observe(h), () => {
2402
+ $.disconnect();
2403
+ };
2404
+ });
2405
+ const o = 56, d = 100, v = /* @__PURE__ */ oe(() => Math.floor(p(f) / (i() + a()))), _ = /* @__PURE__ */ oe(() => r(n(), p(v))), y = /* @__PURE__ */ oe(() => p(_).length ? n().length / p(_).length : 1), R = /* @__PURE__ */ oe(() => d * p(y)), g = /* @__PURE__ */ oe(() => p(_).map(($) => {
2406
+ const S = Math.max(3, Math.round($ / 100 * (o - 3) + 3));
2407
+ return S % 2 === 0 ? S + 1 : S;
2408
+ }));
2409
+ var m = {
2410
+ get data() {
2411
+ return n();
2412
+ },
2413
+ set data($) {
2414
+ n($), re();
2415
+ },
2416
+ get timeMs() {
2417
+ return s();
2418
+ },
2419
+ set timeMs($ = null) {
2420
+ s($), re();
2421
+ },
2422
+ get barWidth() {
2423
+ return i();
2424
+ },
2425
+ set barWidth($ = 3) {
2426
+ i($), re();
2427
+ },
2428
+ get spacing() {
2429
+ return a();
2430
+ },
2431
+ set spacing($ = 1) {
2432
+ a($), re();
2433
+ },
2434
+ get playedColor() {
2435
+ return u();
2436
+ },
2437
+ set playedColor($ = null) {
2438
+ u($), re();
2439
+ },
2440
+ get unplayedColor() {
2441
+ return l();
2442
+ },
2443
+ set unplayedColor($ = null) {
2444
+ l($), re();
2445
+ }
2446
+ }, E = Ds(), C = qe(E);
2447
+ ce(C, "height", o);
2448
+ var k = qe(C);
2449
+ {
2450
+ var fe = ($) => {
2451
+ var S = vs(), M = Jn(S);
2452
+ ms(M, 17, () => p(g), gs, (w, N, U) => {
2453
+ const Se = /* @__PURE__ */ oe(() => U * p(R) < s()), Ce = /* @__PURE__ */ oe(() => s() === null && U === p(g).length - 1);
2454
+ var te = Ps();
2455
+ Ue(() => {
2456
+ xs(
2457
+ te,
2458
+ 0,
2459
+ bs([
2460
+ "bar",
2461
+ p(Se) ? "played" : "unplayed",
2462
+ p(Ce) && "recording-pulse"
2463
+ ]),
2464
+ "svelte-efr4jv"
2465
+ ), ce(te, "x", U * (i() + a())), ce(te, "y", o / 4 - p(N) / 2), ce(te, "width", i() - 1), ce(te, "height", p(N)), As(te, p(Se) ? u() ? `fill: ${u()}` : null : l() ? `fill: ${l()}` : null);
2466
+ }), ne(w, te);
2467
+ }), ne($, S);
2468
+ };
2469
+ Je(k, ($) => {
2470
+ p(c) && $(fe);
2471
+ });
2472
+ }
2473
+ return Be(C), rn(C, ($) => h = $, () => h), Be(E), Ue(() => ce(C, "viewBox", `0 0 ${p(f)} ${o / 2}`)), ne(e, E), kt(m);
2474
+ }
2475
+ sn(
2476
+ an,
2477
+ {
2478
+ data: {},
2479
+ timeMs: {},
2480
+ barWidth: {},
2481
+ spacing: {},
2482
+ playedColor: {},
2483
+ unplayedColor: {}
2484
+ },
2485
+ [],
2486
+ [],
2487
+ !0
2488
+ );
2489
+ var js = /* @__PURE__ */ Bt('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" class="icon svelte-7u5az2"><path d="M176 96C149.5 96 128 117.5 128 144L128 496C128 522.5 149.5 544 176 544L240 544C266.5 544 288 522.5 288 496L288 144C288 117.5 266.5 96 240 96L176 96zM400 96C373.5 96 352 117.5 352 144L352 496C352 522.5 373.5 544 400 544L464 544C490.5 544 512 522.5 512 496L512 144C512 117.5 490.5 96 464 96L400 96z"></path></svg>'), zs = /* @__PURE__ */ Bt('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" class="icon svelte-7u5az2"><path d="M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z"></path></svg>'), Bs = /* @__PURE__ */ Kr('<div class="container svelte-7u5az2" role="group" aria-label="Audio player"><button class="btn svelte-7u5az2"><!></button> <!> <div class="time svelte-7u5az2"><!></div> <audio></audio></div>');
2490
+ const qs = {
2491
+ hash: "svelte-7u5az2",
2492
+ code: ".container.svelte-7u5az2 {display:flex;align-items:stretch;gap:0.5rem;flex:1;}.btn.svelte-7u5az2 {border:none;border-radius:50%;padding:0.5rem;cursor:pointer;display:flex;align-items:center;justify-content:center;aspect-ratio:1 / 1;flex-shrink:0;align-self:center;color:var(--fortyfour-recorder-btn-primary-color);background:var(--fortyfour-recorder-btn-primary-bg);}.btn.svelte-7u5az2:hover {color:var(--fortyfour-recorder-btn-primary-color-hover);background:var(--fortyfour-recorder-btn-primary-bg-hover);}.icon.svelte-7u5az2 {width:1.5em;height:1.5em;fill:currentColor;}.time.svelte-7u5az2 {display:flex;align-items:center;font-variant-numeric:tabular-nums;font-size:0.9rem;}"
2493
+ };
2494
+ function Us(e, t) {
2495
+ Lt(t, !0), en(e, qs);
2496
+ let r = ve(t, "audioURL", 7), n = ve(t, "waveform", 7), s = /* @__PURE__ */ F(null), i = /* @__PURE__ */ F(0), a = /* @__PURE__ */ F(0), u = /* @__PURE__ */ F(
2497
+ "ready"
2498
+ // "ready", "playing", "paused"
2499
+ ), l = null;
2500
+ const c = typeof navigator < "u" && /iPad|iPhone|iPod/.test(navigator.userAgent) ? 350 : 0;
2501
+ function h() {
2502
+ p(s) && p(u) === "playing" && (O(i, p(s).currentTime, !0), l = requestAnimationFrame(h));
2503
+ }
2504
+ function o() {
2505
+ O(u, "ready"), O(i, 0), l && (cancelAnimationFrame(l), l = null);
2506
+ }
2507
+ function d() {
2508
+ p(s) && (p(u) === "playing" ? (p(s).pause(), O(u, "paused"), l && (cancelAnimationFrame(l), l = null)) : (p(s).play(), O(u, "playing"), h()));
2509
+ }
2510
+ var v = {
2511
+ get audioURL() {
2512
+ return r();
2513
+ },
2514
+ set audioURL(w) {
2515
+ r(w), re();
2516
+ },
2517
+ get waveform() {
2518
+ return n();
2519
+ },
2520
+ set waveform(w) {
2521
+ n(w), re();
2522
+ }
2523
+ }, _ = Bs(), y = qe(_);
2524
+ y.__click = d;
2525
+ var R = qe(y);
2526
+ {
2527
+ var g = (w) => {
2528
+ var N = js();
2529
+ ne(w, N);
2530
+ }, m = (w) => {
2531
+ var N = zs();
2532
+ ne(w, N);
2533
+ };
2534
+ Je(R, (w) => {
2535
+ p(u) === "playing" ? w(g) : w(m, !1);
2536
+ });
2537
+ }
2538
+ Be(y);
2539
+ var E = vt(y, 2);
2540
+ {
2541
+ var C = (w) => {
2542
+ {
2543
+ let N = /* @__PURE__ */ oe(() => Math.round(p(i) * 1e3) + c);
2544
+ an(w, {
2545
+ get timeMs() {
2546
+ return p(N);
2547
+ },
2548
+ get data() {
2549
+ return n();
2550
+ }
2551
+ });
2552
+ }
2553
+ };
2554
+ Je(E, (w) => {
2555
+ n() && w(C);
2556
+ });
2557
+ }
2558
+ var k = vt(E, 2), fe = qe(k);
2559
+ {
2560
+ var $ = (w) => {
2561
+ var N = Zt();
2562
+ Ue((U) => er(N, U), [() => nr(p(i))]), ne(w, N);
2563
+ }, S = (w) => {
2564
+ var N = Zt();
2565
+ Ue((U) => er(N, U), [() => nr(p(a))]), ne(w, N);
2566
+ };
2567
+ Je(fe, (w) => {
2568
+ ["playing", "paused"].includes(p(u)) ? w($) : w(S, !1);
2569
+ });
2570
+ }
2571
+ Be(k);
2572
+ var M = vt(k, 2);
2573
+ return rn(M, (w) => O(s, w), () => p(s)), Be(_), Ue(() => {
2574
+ ce(y, "aria-label", p(u) === "playing" ? "Pause" : "Play"), ce(M, "src", r());
2575
+ }), fs("ended", M, o), Ms("duration", "durationchange", M, (w) => O(a, w)), ne(e, _), kt(v);
2576
+ }
2577
+ os(["click"]);
2578
+ sn(Us, { audioURL: {}, waveform: {} }, [], [], !0);
2579
+ export {
2580
+ Us as A,
2581
+ A as B,
2582
+ it as C,
2583
+ b as D,
2584
+ Qt as E,
2585
+ Nt as F,
2586
+ De as G,
2587
+ Ct as H,
2588
+ Lr as I,
2589
+ ft as J,
2590
+ Dt as K,
2591
+ Ys as L,
2592
+ gr as M,
2593
+ Gs as N,
2594
+ Hs as O,
2595
+ Vs as P,
2596
+ Re as Q,
2597
+ ms as R,
2598
+ gs as S,
2599
+ Ws as T,
2600
+ xs as U,
2601
+ bs as V,
2602
+ Xs as W,
2603
+ an as X,
2604
+ Js as Y,
2605
+ Bt as Z,
2606
+ en as a,
2607
+ ve as b,
2608
+ sn as c,
2609
+ os as d,
2610
+ ne as e,
2611
+ Kr as f,
2612
+ kt as g,
2613
+ F as h,
2614
+ Je as i,
2615
+ re as j,
2616
+ qe as k,
2617
+ p as l,
2618
+ vt as m,
2619
+ Jn as n,
2620
+ er as o,
2621
+ Lt as p,
2622
+ Zt as q,
2623
+ Be as r,
2624
+ O as s,
2625
+ Ue as t,
2626
+ oe as u,
2627
+ vs as v,
2628
+ Zr as w,
2629
+ rn as x,
2630
+ As as y,
2631
+ ce as z
2632
+ };