@pie-qti/player-elements 0.1.12 → 0.1.14

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