@pie-qti/player-elements 0.1.18 → 0.1.20

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 (55) hide show
  1. package/README.md +122 -127
  2. package/dist/{define-CLdVOnMl.js → define-BwFVHv-A.js} +4160 -3090
  3. package/dist/define-BwFVHv-A.js.map +1 -0
  4. package/dist/dist-DswyTalX.js +6731 -0
  5. package/dist/dist-DswyTalX.js.map +1 -0
  6. package/dist/{dist-CHcxiby5.js → dist-oe9UH-A2.js} +628 -583
  7. package/dist/dist-oe9UH-A2.js.map +1 -0
  8. package/dist/{element-Bekvepqe.js → element-BiInkn5Q.js} +2 -2
  9. package/dist/{element-Bekvepqe.js.map → element-BiInkn5Q.js.map} +1 -1
  10. package/dist/{element-class-C8OTgYHE-DsvwOAOP.js → element-class-CILJ4Ls7-rJWb-Gwb.js} +12421 -11624
  11. package/dist/element-class-CILJ4Ls7-rJWb-Gwb.js.map +1 -0
  12. package/dist/elements.js +3 -3
  13. package/dist/index.js +3 -3
  14. package/dist/item-toolbar-element-t_zI1vE6.js +1892 -0
  15. package/dist/item-toolbar-element-t_zI1vE6.js.map +1 -0
  16. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js → mathlive.min-DeR46YTX-D-KAmiue.js} +1 -1
  17. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js.map → mathlive.min-DeR46YTX-D-KAmiue.js.map} +1 -1
  18. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js +7113 -0
  19. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js.map +1 -0
  20. package/dist/pie-tool-calculator-GW-LhvB_.js +6905 -0
  21. package/dist/pie-tool-calculator-GW-LhvB_.js.map +1 -0
  22. package/dist/public/api.d.ts +25 -11
  23. package/dist/public/elements.d.ts +1 -1
  24. package/dist/public/index.d.ts +1 -1
  25. package/dist/register-players.js +1 -1
  26. package/dist/register.js +50707 -49652
  27. package/dist/register.js.map +1 -1
  28. package/dist/resolveItems-DHNyVysE.js +7627 -0
  29. package/dist/resolveItems-DHNyVysE.js.map +1 -0
  30. package/dist/{root--0fyaoNu.js → root-CYGgRw16.js} +3 -3
  31. package/dist/root-CYGgRw16.js.map +1 -0
  32. package/dist/sre-CgK32OcY.js +17228 -0
  33. package/dist/sre-CgK32OcY.js.map +1 -0
  34. package/dist/{tag-names-ClLtKtXt.js → tag-names-OgMDHLpx.js} +2 -2
  35. package/dist/tag-names-OgMDHLpx.js.map +1 -0
  36. package/dist/tool-tts-inline-drDEIti_.js +3724 -0
  37. package/dist/tool-tts-inline-drDEIti_.js.map +1 -0
  38. package/package.json +11 -9
  39. package/dist/define-CLdVOnMl.js.map +0 -1
  40. package/dist/dist-CHcxiby5.js.map +0 -1
  41. package/dist/dist-DjmdIRjq.js +0 -1241
  42. package/dist/dist-DjmdIRjq.js.map +0 -1
  43. package/dist/element-class-C8OTgYHE-DsvwOAOP.js.map +0 -1
  44. package/dist/item-toolbar-element-CjJkgFQ3.js +0 -6086
  45. package/dist/item-toolbar-element-CjJkgFQ3.js.map +0 -1
  46. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js +0 -28516
  47. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js.map +0 -1
  48. package/dist/pie-tool-calculator-DBfkllu3.js +0 -2309
  49. package/dist/pie-tool-calculator-DBfkllu3.js.map +0 -1
  50. package/dist/resolveItems-Bp65Mj_Z.js +0 -7030
  51. package/dist/resolveItems-Bp65Mj_Z.js.map +0 -1
  52. package/dist/root--0fyaoNu.js.map +0 -1
  53. package/dist/tag-names-ClLtKtXt.js.map +0 -1
  54. package/dist/tool-tts-inline-BNjR51Di.js +0 -2641
  55. package/dist/tool-tts-inline-BNjR51Di.js.map +0 -1
@@ -0,0 +1,3724 @@
1
+ import { a as e, i as t, n, o as r, s as i } from "./dist-oe9UH-A2.js";
2
+ //#region ../../node_modules/.bun/@pie-players+pie-tool-tts-inline@0.3.63+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 a = {}, o = Symbol("uninitialized"), s = "http://www.w3.org/1999/xhtml", c = Array.isArray, l = Array.prototype.indexOf, u = Array.prototype.includes, d = Array.from, f = Object.keys, p = Object.defineProperty, m = Object.getOwnPropertyDescriptor, h = Object.getOwnPropertyDescriptors, g = Object.prototype, _ = Array.prototype, v = Object.getPrototypeOf, y = Object.isExtensible, ee = () => {};
5
+ function b(e) {
6
+ for (var t = 0; t < e.length; t++) e[t]();
7
+ }
8
+ function x() {
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 S = 1024, C = 2048, te = 4096, w = 8192, T = 16384, E = 32768, ne = 1 << 25, D = 65536, re = 1 << 19, O = 1 << 20, k = 1 << 25, ie = 65536, A = 1 << 21, ae = 1 << 22, j = 1 << 23, M = Symbol("$state"), N = Symbol("legacy props"), oe = Symbol(""), se = Symbol("attributes"), ce = Symbol("class"), le = Symbol("style"), ue = Symbol("text"), de = new class extends Error {
19
+ name = "StaleReactionError";
20
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
21
+ }(), fe = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
22
+ function pe() {
23
+ throw Error("https://svelte.dev/e/async_derived_orphan");
24
+ }
25
+ function me(e, t, n) {
26
+ throw Error("https://svelte.dev/e/each_key_duplicate");
27
+ }
28
+ function he(e) {
29
+ throw Error("https://svelte.dev/e/effect_in_teardown");
30
+ }
31
+ function ge() {
32
+ throw Error("https://svelte.dev/e/effect_in_unowned_derived");
33
+ }
34
+ function _e(e) {
35
+ throw Error("https://svelte.dev/e/effect_orphan");
36
+ }
37
+ function ve() {
38
+ throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
39
+ }
40
+ function ye() {
41
+ throw Error("https://svelte.dev/e/hydration_failed");
42
+ }
43
+ function be(e) {
44
+ throw Error("https://svelte.dev/e/props_invalid_value");
45
+ }
46
+ function xe() {
47
+ throw Error("https://svelte.dev/e/state_descriptors_fixed");
48
+ }
49
+ function Se() {
50
+ throw Error("https://svelte.dev/e/state_prototype_fixed");
51
+ }
52
+ function Ce() {
53
+ throw Error("https://svelte.dev/e/state_unsafe_mutation");
54
+ }
55
+ function we() {
56
+ throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
57
+ }
58
+ function Te() {
59
+ console.warn("https://svelte.dev/e/derived_inert");
60
+ }
61
+ function Ee(e) {
62
+ console.warn("https://svelte.dev/e/hydration_mismatch");
63
+ }
64
+ function De() {
65
+ console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
66
+ }
67
+ var P = !1;
68
+ function Oe(e) {
69
+ P = e;
70
+ }
71
+ var F;
72
+ function I(e) {
73
+ if (e === null) throw Ee(), a;
74
+ return F = e;
75
+ }
76
+ function ke() {
77
+ return I(/* @__PURE__ */ tn(F));
78
+ }
79
+ function Ae(e) {
80
+ if (P) {
81
+ if (/* @__PURE__ */ tn(F) !== null) throw Ee(), a;
82
+ F = e;
83
+ }
84
+ }
85
+ function je(e = 1) {
86
+ if (P) {
87
+ for (var t = e, n = F; t--;) n = /* @__PURE__ */ tn(n);
88
+ F = n;
89
+ }
90
+ }
91
+ function Me(e = !0) {
92
+ for (var t = 0, n = F;;) {
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__ */ tn(n);
101
+ e && n.remove(), n = i;
102
+ }
103
+ }
104
+ function Ne(e) {
105
+ if (!e || e.nodeType !== 8) throw Ee(), a;
106
+ return e.data;
107
+ }
108
+ function Pe(e) {
109
+ return e === this.v;
110
+ }
111
+ function Fe(e, t) {
112
+ return e == e ? e !== t || typeof e == "object" && !!e || typeof e == "function" : t == t;
113
+ }
114
+ function Ie(e) {
115
+ return !Fe(e, this.v);
116
+ }
117
+ var Le = !1, Re = !1, L = null;
118
+ function ze(e) {
119
+ L = e;
120
+ }
121
+ function Be(e, t = !1, n) {
122
+ L = {
123
+ p: L,
124
+ i: !1,
125
+ c: null,
126
+ e: null,
127
+ s: e,
128
+ x: null,
129
+ r: Y,
130
+ l: Re && !t ? {
131
+ s: null,
132
+ u: null,
133
+ $: []
134
+ } : null
135
+ };
136
+ }
137
+ function Ve(e) {
138
+ var t = L, n = t.e;
139
+ if (n !== null) {
140
+ t.e = null;
141
+ for (var r of n) gn(r);
142
+ }
143
+ return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
144
+ }
145
+ function He() {
146
+ return !Re || L !== null && L.l === null;
147
+ }
148
+ var R = [];
149
+ function Ue() {
150
+ var e = R;
151
+ R = [], b(e);
152
+ }
153
+ function We(e) {
154
+ if (R.length === 0 && !Ct) {
155
+ var t = R;
156
+ queueMicrotask(() => {
157
+ t === R && Ue();
158
+ });
159
+ }
160
+ R.push(e);
161
+ }
162
+ function Ge() {
163
+ for (; R.length > 0;) Ue();
164
+ }
165
+ function Ke(e) {
166
+ var t = Y;
167
+ if (t === null) return q.f |= j, e;
168
+ if (!(t.f & 32768) && !(t.f & 4)) throw e;
169
+ qe(e, t);
170
+ }
171
+ function qe(e, t) {
172
+ if (!(t !== null && t.f & 16384)) {
173
+ for (; t !== null;) {
174
+ if (t.f & 128) {
175
+ if (!(t.f & 32768)) throw e;
176
+ try {
177
+ t.b.error(e);
178
+ return;
179
+ } catch (t) {
180
+ e = t;
181
+ }
182
+ }
183
+ t = t.parent;
184
+ }
185
+ throw e;
186
+ }
187
+ }
188
+ var Je = ~(C | te | S);
189
+ function z(e, t) {
190
+ e.f = e.f & Je | t;
191
+ }
192
+ function Ye(e) {
193
+ e.f & 512 || e.deps === null ? z(e, S) : z(e, te);
194
+ }
195
+ function Xe(e) {
196
+ if (e !== null) for (let t of e) !(t.f & 2) || !(t.f & 65536) || (t.f ^= ie, Xe(t.deps));
197
+ }
198
+ function Ze(e, t, n) {
199
+ e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), Xe(e.deps), z(e, S);
200
+ }
201
+ var Qe = !1, $e = !1;
202
+ function et(e) {
203
+ var t = $e;
204
+ try {
205
+ return $e = !1, [e(), $e];
206
+ } finally {
207
+ $e = t;
208
+ }
209
+ }
210
+ function tt(e) {
211
+ var t = q, n = Y;
212
+ J(null), Bn(null);
213
+ try {
214
+ return e();
215
+ } finally {
216
+ J(t), Bn(n);
217
+ }
218
+ }
219
+ function nt(e) {
220
+ let t = 0, n = Ht(0), r;
221
+ return () => {
222
+ pn() && (Q(n), xn(() => (t === 0 && (r = ir(() => e(() => Kt(n)))), t += 1, () => {
223
+ We(() => {
224
+ --t, t === 0 && (r?.(), r = void 0, Kt(n));
225
+ });
226
+ })));
227
+ };
228
+ }
229
+ var rt = D | re;
230
+ function it(e, t, n, r) {
231
+ new at(e, t, n, r);
232
+ }
233
+ var at = class {
234
+ parent;
235
+ is_pending = !1;
236
+ transform_error;
237
+ #e;
238
+ #t = P ? F : null;
239
+ #n;
240
+ #r;
241
+ #i;
242
+ #a = null;
243
+ #o = null;
244
+ #s = null;
245
+ #c = null;
246
+ #l = 0;
247
+ #u = 0;
248
+ #d = !1;
249
+ #f = /* @__PURE__ */ new Set();
250
+ #p = /* @__PURE__ */ new Set();
251
+ #m = null;
252
+ #h = nt(() => (this.#m = Ht(this.#l), () => {
253
+ this.#m = null;
254
+ }));
255
+ constructor(e, t, n, r) {
256
+ this.#e = e, this.#n = t, this.#r = (e) => {
257
+ var t = Y;
258
+ t.b = this, t.f |= 128, n(e);
259
+ }, this.parent = Y.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), this.#i = Cn(() => {
260
+ if (P) {
261
+ let e = this.#t;
262
+ ke();
263
+ let t = e.data === "[!";
264
+ if (e.data.startsWith("[?")) {
265
+ let t = JSON.parse(e.data.slice(2));
266
+ this.#_(t);
267
+ } else t ? this.#y() : this.#g();
268
+ } else this.#b();
269
+ }, rt), P && (this.#e = F);
270
+ }
271
+ #g() {
272
+ try {
273
+ this.#a = wn(() => this.#r(this.#e));
274
+ } catch (e) {
275
+ this.error(e);
276
+ }
277
+ }
278
+ #_(e) {
279
+ let t = this.#n.failed, { reset: n, invoke_onerror: r } = this.#v(e);
280
+ We(r), t && (this.#s = wn(() => {
281
+ t(this.#e, () => e, () => n);
282
+ }));
283
+ }
284
+ #v(e) {
285
+ var t = !1, n = !1;
286
+ let r = () => {
287
+ if (t) {
288
+ De();
289
+ return;
290
+ }
291
+ t = !0, n && we(), this.#s !== null && An(this.#s, () => {
292
+ this.#s = null;
293
+ }), this.#S(() => {
294
+ this.#b();
295
+ });
296
+ };
297
+ return {
298
+ reset: r,
299
+ invoke_onerror: () => {
300
+ try {
301
+ n = !0, this.#n.onerror?.(e, r), n = !1;
302
+ } catch (e) {
303
+ qe(e, this.#i && this.#i.parent);
304
+ }
305
+ }
306
+ };
307
+ }
308
+ #y() {
309
+ let e = this.#n.pending;
310
+ e && (this.is_pending = !0, this.#o = wn(() => e(this.#e)), We(() => {
311
+ var e = this.#c = document.createDocumentFragment(), t = G();
312
+ e.append(t), this.#a = this.#S(() => wn(() => this.#r(t))), this.#u === 0 && (this.#e.before(e), this.#c = null, An(this.#o, () => {
313
+ this.#o = null;
314
+ }), this.#x(V));
315
+ }));
316
+ }
317
+ #b() {
318
+ try {
319
+ if (this.is_pending = this.has_pending_snippet(), this.#u = 0, this.#l = 0, this.#a = wn(() => {
320
+ this.#r(this.#e);
321
+ }), this.#u > 0) {
322
+ var e = this.#c = document.createDocumentFragment();
323
+ Pn(this.#a, e);
324
+ let t = this.#n.pending;
325
+ this.#o = wn(() => t(this.#e));
326
+ } else this.#x(V);
327
+ } catch (e) {
328
+ this.error(e);
329
+ }
330
+ }
331
+ #x(e) {
332
+ this.is_pending = !1, e.transfer_effects(this.#f, this.#p);
333
+ }
334
+ defer_effect(e) {
335
+ Ze(e, this.#f, this.#p);
336
+ }
337
+ is_rendered() {
338
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
339
+ }
340
+ has_pending_snippet() {
341
+ return !!this.#n.pending;
342
+ }
343
+ #S(e) {
344
+ var t = Y, n = q, r = L;
345
+ Bn(this.#i), J(this.#i), ze(this.#i.ctx);
346
+ try {
347
+ return kt.ensure(), e();
348
+ } catch (e) {
349
+ return Ke(e), null;
350
+ } finally {
351
+ Bn(t), J(n), ze(r);
352
+ }
353
+ }
354
+ #C(e, t) {
355
+ if (!this.has_pending_snippet()) {
356
+ this.parent && this.parent.#C(e, t);
357
+ return;
358
+ }
359
+ this.#u += e, this.#u === 0 && (this.#x(t), this.#o && An(this.#o, () => {
360
+ this.#o = null;
361
+ }), this.#c &&= (this.#e.before(this.#c), null));
362
+ }
363
+ update_pending_count(e, t) {
364
+ this.#C(e, t), this.#l += e, !(!this.#m || this.#d) && (this.#d = !0, We(() => {
365
+ this.#d = !1, this.#m && Wt(this.#m, this.#l);
366
+ }));
367
+ }
368
+ get_effect_pending() {
369
+ return this.#h(), Q(this.#m);
370
+ }
371
+ error(e) {
372
+ if (!this.#n.onerror && !this.#n.failed) throw e;
373
+ V?.is_fork ? (this.#a && V.skip_effect(this.#a), this.#o && V.skip_effect(this.#o), this.#s && V.skip_effect(this.#s), V.oncommit(() => {
374
+ this.#w(e);
375
+ })) : this.#w(e);
376
+ }
377
+ #w(e) {
378
+ this.#a &&= (K(this.#a), null), this.#o &&= (K(this.#o), null), this.#s &&= (K(this.#s), null), P && (I(this.#t), je(), I(Me()));
379
+ let t = this.#n.failed, n = (e) => {
380
+ let { reset: n, invoke_onerror: r } = this.#v(e);
381
+ r(), t && (this.#s = this.#S(() => {
382
+ try {
383
+ return wn(() => {
384
+ var r = Y;
385
+ r.b = this, r.f |= 128, t(this.#e, () => e, () => n);
386
+ });
387
+ } catch (e) {
388
+ return qe(e, this.#i.parent), null;
389
+ }
390
+ }));
391
+ };
392
+ We(() => {
393
+ var t;
394
+ try {
395
+ t = this.transform_error(e);
396
+ } catch (e) {
397
+ qe(e, this.#i && this.#i.parent);
398
+ return;
399
+ }
400
+ typeof t == "object" && t && typeof t.then == "function" ? t.then(n, (e) => qe(e, this.#i && this.#i.parent)) : n(t);
401
+ });
402
+ }
403
+ };
404
+ function ot(e, t, n, r) {
405
+ let i = He() ? ut : pt;
406
+ var a = e.filter((e) => !e.settled), o = t.map(i);
407
+ if (n.length === 0 && a.length === 0) {
408
+ r(o);
409
+ return;
410
+ }
411
+ var s = Y, c = st(), l = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
412
+ function u(e) {
413
+ if (!(s.f & 16384)) {
414
+ c();
415
+ try {
416
+ r([...o, ...e]);
417
+ } catch (e) {
418
+ qe(e, s);
419
+ }
420
+ ct();
421
+ }
422
+ }
423
+ var d = lt();
424
+ if (n.length === 0) {
425
+ l.then(() => u([])).finally(d);
426
+ return;
427
+ }
428
+ function f() {
429
+ Promise.all(n.map((e) => /* @__PURE__ */ ft(e))).then(u).catch((e) => qe(e, s)).finally(d);
430
+ }
431
+ l ? l.then(() => {
432
+ c(), f(), ct();
433
+ }) : f();
434
+ }
435
+ function st() {
436
+ var e = Y, t = q, n = L, r = V;
437
+ return function(i = !0) {
438
+ Bn(e), J(t), ze(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
439
+ };
440
+ }
441
+ function ct(e = !0) {
442
+ Bn(null), J(null), ze(null), e && V?.deactivate();
443
+ }
444
+ function lt() {
445
+ var e = Y, t = e.b, n = V, r = !!t?.is_rendered();
446
+ return t?.update_pending_count(1, n), n.increment(r, e), () => {
447
+ t?.update_pending_count(-1, n), n.decrement(r, e);
448
+ };
449
+ }
450
+ /* @__NO_SIDE_EFFECTS__ */
451
+ function ut(e) {
452
+ var t = 2 | C;
453
+ return Y !== null && (Y.f |= re), {
454
+ ctx: L,
455
+ deps: null,
456
+ effects: null,
457
+ equals: Pe,
458
+ f: t,
459
+ fn: e,
460
+ reactions: null,
461
+ rv: 0,
462
+ v: o,
463
+ wv: 0,
464
+ parent: Y,
465
+ ac: null
466
+ };
467
+ }
468
+ var dt = Symbol("obsolete");
469
+ /* @__NO_SIDE_EFFECTS__ */
470
+ function ft(e, t, n) {
471
+ let r = Y;
472
+ r === null && pe();
473
+ var i = void 0, a = Ht(o), s = !q, c = /* @__PURE__ */ new Set();
474
+ return bn(() => {
475
+ var t = Y, n = x();
476
+ i = n.promise;
477
+ try {
478
+ Promise.resolve(e()).then(n.resolve, (e) => {
479
+ e !== de && n.reject(e);
480
+ }).finally(ct);
481
+ } catch (e) {
482
+ n.reject(e), ct();
483
+ }
484
+ var o = V;
485
+ if (s) {
486
+ if (t.f & 32768) var l = lt();
487
+ if (r.b?.is_rendered()) o.async_deriveds.get(t)?.reject(dt);
488
+ else for (let e of c.values()) e.reject(dt);
489
+ c.add(n), o.async_deriveds.set(t, n);
490
+ }
491
+ let u = (e, t = void 0) => {
492
+ l?.(), c.delete(n), t !== dt && (o.activate(), t ? (a.f |= j, Wt(a, t)) : (a.f & 8388608 && (a.f ^= j), Wt(a, e)), o.deactivate());
493
+ };
494
+ n.promise.then(u, (e) => u(null, e || "unknown"));
495
+ }), mn(() => {
496
+ for (let e of c) e.reject(dt);
497
+ }), new Promise((e) => {
498
+ function t(n) {
499
+ function r() {
500
+ n === i ? e(a) : t(i);
501
+ }
502
+ n.then(r, r);
503
+ }
504
+ t(i);
505
+ });
506
+ }
507
+ /* @__NO_SIDE_EFFECTS__ */
508
+ function B(e) {
509
+ let t = /* @__PURE__ */ ut(e);
510
+ return Le || Hn(t), t;
511
+ }
512
+ /* @__NO_SIDE_EFFECTS__ */
513
+ function pt(e) {
514
+ let t = /* @__PURE__ */ ut(e);
515
+ return t.equals = Ie, t;
516
+ }
517
+ function mt(e) {
518
+ var t = e.effects;
519
+ if (t !== null) {
520
+ e.effects = null;
521
+ for (var n = 0; n < t.length; n += 1) K(t[n]);
522
+ }
523
+ }
524
+ function ht(e) {
525
+ var t, n = Y, r = e.parent;
526
+ if (!Ln && r !== null && e.v !== o && r.f & 24576) return Te(), e.v;
527
+ Bn(r);
528
+ try {
529
+ e.f &= ~ie, mt(e), t = Qn(e);
530
+ } finally {
531
+ Bn(n);
532
+ }
533
+ return t;
534
+ }
535
+ function gt(e) {
536
+ var t = ht(e);
537
+ if (!e.equals(t) && (e.wv = Yn(), (!V?.is_fork || e.deps === null) && (V === null ? e.v = t : (V.capture(e, t, !0), xt?.capture(e, t, !0)), e.deps === null))) {
538
+ z(e, S);
539
+ return;
540
+ }
541
+ Ln || (H === null ? Ye(e) : (pn() || V?.is_fork) && H.set(e, t));
542
+ }
543
+ function _t(e) {
544
+ if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && tt(() => {
545
+ t.ac.abort(de), t.ac = null;
546
+ }), t.fn !== null && (t.teardown = ee), er(t, 0), En(t));
547
+ }
548
+ function vt(e) {
549
+ if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && tr(t);
550
+ }
551
+ var yt = null, bt = null, V = null, xt = null, H = null, St = null, Ct = !1, wt = !1, Tt = null, Et = null, Dt = 0, Ot = 1, kt = class e {
552
+ id = Ot++;
553
+ #e = !1;
554
+ linked = !0;
555
+ #t = null;
556
+ #n = null;
557
+ async_deriveds = /* @__PURE__ */ new Map();
558
+ current = /* @__PURE__ */ new Map();
559
+ previous = /* @__PURE__ */ new Map();
560
+ #r = /* @__PURE__ */ new Set();
561
+ #i = /* @__PURE__ */ new Set();
562
+ #a = 0;
563
+ #o = /* @__PURE__ */ new Map();
564
+ #s = null;
565
+ #c = [];
566
+ #l = [];
567
+ #u = /* @__PURE__ */ new Set();
568
+ #d = /* @__PURE__ */ new Set();
569
+ #f = /* @__PURE__ */ new Map();
570
+ #p = /* @__PURE__ */ new Set();
571
+ is_fork = !1;
572
+ #m = !1;
573
+ constructor() {
574
+ bt === null ? yt = bt = this : (bt.#n = this, this.#t = bt), bt = this;
575
+ }
576
+ #h() {
577
+ if (this.is_fork) return !0;
578
+ for (let n of this.#o.keys()) {
579
+ for (var e = n, t = !1; e.parent !== null;) {
580
+ if (this.#f.has(e)) {
581
+ t = !0;
582
+ break;
583
+ }
584
+ e = e.parent;
585
+ }
586
+ if (!t) return !0;
587
+ }
588
+ return !1;
589
+ }
590
+ skip_effect(e) {
591
+ this.#f.has(e) || this.#f.set(e, {
592
+ d: [],
593
+ m: []
594
+ }), this.#p.delete(e);
595
+ }
596
+ unskip_effect(e, t = (e) => this.schedule(e)) {
597
+ var n = this.#f.get(e);
598
+ if (n) {
599
+ this.#f.delete(e);
600
+ for (var r of n.d) z(r, C), t(r);
601
+ for (r of n.m) z(r, te), t(r);
602
+ }
603
+ this.#p.add(e);
604
+ }
605
+ #g() {
606
+ this.#e = !0, Dt++ > 1e3 && (this.#S(), jt());
607
+ for (let e of this.#u) this.#d.delete(e), z(e, C), this.schedule(e);
608
+ for (let e of this.#d) z(e, te), this.schedule(e);
609
+ let t = this.#c;
610
+ this.#c = [], this.apply();
611
+ var n = Tt = [], r = [], i = Et = [];
612
+ for (let e of t) try {
613
+ this.#_(e, n, r);
614
+ } catch (t) {
615
+ throw Rt(e), this.#h() || this.discard(), t;
616
+ }
617
+ if (V = null, i.length > 0) {
618
+ var a = e.ensure();
619
+ for (let e of i) a.schedule(e);
620
+ }
621
+ if (Tt = null, Et = null, this.#h()) {
622
+ this.#b(r), this.#b(n);
623
+ for (let [e, t] of this.#f) Lt(e, t);
624
+ i.length > 0 && V.#g();
625
+ return;
626
+ }
627
+ let o = this.#v();
628
+ if (o) {
629
+ this.#b(r), this.#b(n), o.#y(this);
630
+ return;
631
+ }
632
+ this.#u.clear(), this.#d.clear();
633
+ for (let e of this.#r) e(this);
634
+ this.#r.clear(), xt = this, Nt(r), Nt(n), xt = null, this.#s?.resolve();
635
+ var s = V;
636
+ if (this.#a === 0 && (this.#c.length === 0 || s !== null) && (this.#S(), Le && (this.#x(), V = s)), this.#c.length > 0) if (s !== null) {
637
+ let e = s;
638
+ e.#c.push(...this.#c.filter((t) => !e.#c.includes(t)));
639
+ } else s = this;
640
+ s !== null && s.#g();
641
+ }
642
+ #_(e, t, n) {
643
+ e.f ^= S;
644
+ for (var r = e.first; r !== null;) {
645
+ var i = r.f, a = (i & 96) != 0;
646
+ if (!(a && i & 1024 || i & 8192 || this.#f.has(r)) && r.fn !== null) {
647
+ a ? r.f ^= S : i & 4 ? t.push(r) : Le && i & 16777224 ? n.push(r) : Xn(r) && (i & 16 && this.#d.add(r), tr(r));
648
+ var o = r.first;
649
+ if (o !== null) {
650
+ r = o;
651
+ continue;
652
+ }
653
+ }
654
+ for (; r !== null;) {
655
+ var s = r.next;
656
+ if (s !== null) {
657
+ r = s;
658
+ break;
659
+ }
660
+ r = r.parent;
661
+ }
662
+ }
663
+ }
664
+ #v() {
665
+ for (var e = this.#t; e !== null;) {
666
+ if (!e.is_fork) {
667
+ for (let [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
668
+ }
669
+ e = e.#t;
670
+ }
671
+ return null;
672
+ }
673
+ #y(e) {
674
+ 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);
675
+ for (let [t, n] of e.async_deriveds) {
676
+ let e = this.async_deriveds.get(t);
677
+ e && n.promise.then(e.resolve).catch(e.reject);
678
+ }
679
+ e.async_deriveds.clear(), this.transfer_effects(e.#u, e.#d);
680
+ let t = (e) => {
681
+ var n = e.reactions;
682
+ if (n !== null && !(e.f & 2 && !(e.f & 6144))) for (let e of n) {
683
+ var r = e.f;
684
+ if (r & 2) t(e);
685
+ else {
686
+ var i = e;
687
+ r & 4194320 && !this.async_deriveds.has(i) && (this.#d.delete(i), z(i, C), this.schedule(i));
688
+ }
689
+ }
690
+ };
691
+ for (let e of this.current.keys()) t(e);
692
+ this.oncommit(() => e.discard()), e.#S(), V = this, this.#g();
693
+ }
694
+ #b(e) {
695
+ for (var t = 0; t < e.length; t += 1) Ze(e[t], this.#u, this.#d);
696
+ }
697
+ capture(e, t, n = !1) {
698
+ e.v !== o && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [t, n]), H?.set(e, t)), this.is_fork || (e.v = t);
699
+ }
700
+ activate() {
701
+ V = this;
702
+ }
703
+ deactivate() {
704
+ V = null, H = null;
705
+ }
706
+ flush() {
707
+ try {
708
+ wt = !0, V = this, this.#g();
709
+ } finally {
710
+ Dt = 0, St = null, Tt = null, Et = null, wt = !1, V = null, H = null, Bt.clear();
711
+ }
712
+ }
713
+ discard() {
714
+ for (let e of this.#i) e(this);
715
+ this.#i.clear();
716
+ for (let e of this.async_deriveds.values()) e.reject(dt);
717
+ this.#S(), this.#s?.resolve();
718
+ }
719
+ register_created_effect(e) {
720
+ this.#l.push(e);
721
+ }
722
+ #x() {
723
+ for (let u = yt; u !== null; u = u.#n) {
724
+ var e = u.id < this.id, t = [];
725
+ for (let [r, [i, a]] of this.current) {
726
+ if (u.current.has(r)) {
727
+ var n = u.current.get(r)[0];
728
+ if (e && i !== n) u.current.set(r, [i, a]);
729
+ else continue;
730
+ }
731
+ t.push(r);
732
+ }
733
+ if (e) for (let [e, t] of this.async_deriveds) {
734
+ let n = u.async_deriveds.get(e);
735
+ n && t.promise.then(n.resolve).catch(n.reject);
736
+ }
737
+ var r = [...u.current.keys()].filter((e) => !u.current.get(e)[1]);
738
+ if (!(!u.#e || r.length === 0)) {
739
+ var i = r.filter((e) => !this.current.has(e));
740
+ if (i.length === 0) e && u.discard();
741
+ else if (t.length > 0) {
742
+ if (e) for (let e of this.#p) u.unskip_effect(e, (e) => {
743
+ e.f & 4194320 ? u.schedule(e) : u.#b([e]);
744
+ });
745
+ u.activate();
746
+ var a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
747
+ for (var s of t) Pt(s, i, a, o);
748
+ o = /* @__PURE__ */ new Map();
749
+ var c = [...u.current].filter(([e, t]) => {
750
+ let n = this.current.get(e);
751
+ return n ? n[0] !== t[0] || n[1] !== t[1] : !0;
752
+ }).map(([e]) => e);
753
+ if (c.length > 0) for (let e of this.#l) !(e.f & 155648) && Ft(e, c, o) && (e.f & 4194320 ? (z(e, C), u.schedule(e)) : u.#u.add(e));
754
+ if (u.#c.length > 0 && !u.#m) {
755
+ u.apply();
756
+ for (var l of u.#c) u.#_(l, [], []);
757
+ u.#c = [];
758
+ }
759
+ u.deactivate();
760
+ }
761
+ }
762
+ }
763
+ }
764
+ increment(e, t) {
765
+ if (this.#a += 1, e) {
766
+ let e = this.#o.get(t) ?? 0;
767
+ this.#o.set(t, e + 1);
768
+ }
769
+ }
770
+ decrement(e, t) {
771
+ if (--this.#a, e) {
772
+ let e = this.#o.get(t) ?? 0;
773
+ e === 1 ? this.#o.delete(t) : this.#o.set(t, e - 1);
774
+ }
775
+ this.#m || (this.#m = !0, We(() => {
776
+ this.#m = !1, this.linked && this.flush();
777
+ }));
778
+ }
779
+ transfer_effects(e, t) {
780
+ for (let t of e) this.#u.add(t);
781
+ for (let e of t) this.#d.add(e);
782
+ e.clear(), t.clear();
783
+ }
784
+ oncommit(e) {
785
+ this.#r.add(e);
786
+ }
787
+ ondiscard(e) {
788
+ this.#i.add(e);
789
+ }
790
+ settled() {
791
+ return (this.#s ??= x()).promise;
792
+ }
793
+ static ensure() {
794
+ if (V === null) {
795
+ let t = V = new e();
796
+ !wt && !Ct && We(() => {
797
+ t.#e || t.flush();
798
+ });
799
+ }
800
+ return V;
801
+ }
802
+ apply() {
803
+ if (!Le || !this.is_fork && this.#t === null && this.#n === null) {
804
+ H = null;
805
+ return;
806
+ }
807
+ H = /* @__PURE__ */ new Map();
808
+ for (let [e, [t]] of this.current) H.set(e, t);
809
+ for (let t = yt; t !== null; t = t.#n) if (!(t === this || t.is_fork)) {
810
+ var e = !1;
811
+ if (t.id < this.id) {
812
+ for (let [n, [, r]] of t.current) if (!r && this.current.has(n)) {
813
+ e = !0;
814
+ break;
815
+ }
816
+ }
817
+ if (!e) for (let [e, n] of t.previous) H.has(e) || H.set(e, n);
818
+ }
819
+ }
820
+ schedule(e) {
821
+ if (St = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
822
+ e.b.defer_effect(e);
823
+ return;
824
+ }
825
+ for (var t = e; t.parent !== null;) {
826
+ t = t.parent;
827
+ var n = t.f;
828
+ if (Tt !== null && t === Y && (Le || (q === null || !(q.f & 2)) && !Qe)) return;
829
+ if (n & 96) {
830
+ if (!(n & 1024)) return;
831
+ t.f ^= S;
832
+ }
833
+ }
834
+ this.#c.push(t);
835
+ }
836
+ #S() {
837
+ if (this.linked) {
838
+ var e = this.#t, t = this.#n;
839
+ e === null ? yt = t : e.#n = t, t === null ? bt = e : t.#t = e, this.linked = !1;
840
+ }
841
+ }
842
+ };
843
+ function At(e) {
844
+ var t = Ct;
845
+ Ct = !0;
846
+ try {
847
+ var n;
848
+ for (e && (V !== null && !V.is_fork && V.flush(), n = e());;) {
849
+ if (Ge(), V === null) return n;
850
+ V.flush();
851
+ }
852
+ } finally {
853
+ Ct = t;
854
+ }
855
+ }
856
+ function jt() {
857
+ try {
858
+ ve();
859
+ } catch (e) {
860
+ qe(e, St);
861
+ }
862
+ }
863
+ var Mt = null;
864
+ function Nt(e) {
865
+ var t = e.length;
866
+ if (t !== 0) {
867
+ for (var n = 0; n < t;) {
868
+ var r = e[n++];
869
+ if (!(r.f & 24576) && Xn(r) && (Mt = /* @__PURE__ */ new Set(), tr(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && kn(r), Mt?.size > 0)) {
870
+ Bt.clear();
871
+ for (let e of Mt) {
872
+ if (e.f & 24576) continue;
873
+ let t = [e], n = e.parent;
874
+ for (; n !== null;) Mt.has(n) && (Mt.delete(n), t.push(n)), n = n.parent;
875
+ for (let e = t.length - 1; e >= 0; e--) {
876
+ let n = t[e];
877
+ n.f & 24576 || tr(n);
878
+ }
879
+ }
880
+ Mt.clear();
881
+ }
882
+ }
883
+ Mt = null;
884
+ }
885
+ }
886
+ function Pt(e, t, n, r) {
887
+ if (!n.has(e) && (n.add(e), e.reactions !== null)) for (let i of e.reactions) {
888
+ let e = i.f;
889
+ e & 2 ? Pt(i, t, n, r) : e & 4194320 && !(e & 2048) && Ft(i, t, r) && (z(i, C), It(i));
890
+ }
891
+ }
892
+ function Ft(e, t, n) {
893
+ let r = n.get(e);
894
+ if (r !== void 0) return r;
895
+ if (e.deps !== null) for (let r of e.deps) {
896
+ if (u.call(t, r)) return !0;
897
+ if (r.f & 2 && Ft(r, t, n)) return n.set(r, !0), !0;
898
+ }
899
+ return n.set(e, !1), !1;
900
+ }
901
+ function It(e) {
902
+ V.schedule(e);
903
+ }
904
+ function Lt(e, t) {
905
+ if (!(e.f & 32 && e.f & 1024)) {
906
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), z(e, S);
907
+ for (var n = e.first; n !== null;) Lt(n, t), n = n.next;
908
+ }
909
+ }
910
+ function Rt(e) {
911
+ z(e, S);
912
+ for (var t = e.first; t !== null;) Rt(t), t = t.next;
913
+ }
914
+ var zt = /* @__PURE__ */ new Set(), Bt = /* @__PURE__ */ new Map(), Vt = !1;
915
+ function Ht(e, t) {
916
+ return {
917
+ f: 0,
918
+ v: e,
919
+ reactions: null,
920
+ equals: Pe,
921
+ rv: 0,
922
+ wv: 0
923
+ };
924
+ }
925
+ /* @__NO_SIDE_EFFECTS__ */
926
+ function U(e, t) {
927
+ let n = Ht(e, t);
928
+ return Hn(n), n;
929
+ }
930
+ /* @__NO_SIDE_EFFECTS__ */
931
+ function Ut(e, t = !1, n = !0) {
932
+ let r = Ht(e);
933
+ return t || (r.equals = Ie), Re && n && L !== null && L.l !== null && (L.l.s ??= []).push(r), r;
934
+ }
935
+ function W(e, t, n = !1) {
936
+ return q !== null && (!zn || q.f & 131072) && He() && q.f & 4325394 && (Vn === null || !Vn.has(e)) && Ce(), Wt(e, n ? Jt(t) : t, Et);
937
+ }
938
+ function Wt(e, t, n = null) {
939
+ if (!e.equals(t)) {
940
+ Bt.set(e, Ln ? t : e.v);
941
+ var r = kt.ensure();
942
+ if (r.capture(e, t), e.f & 2) {
943
+ let t = e;
944
+ e.f & 2048 && ht(t), H === null && Ye(t);
945
+ }
946
+ e.wv = Yn(), qt(e, C, n), He() && Y !== null && Y.f & 1024 && !(Y.f & 96) && (Un === null ? Wn([e]) : Un.push(e)), !r.is_fork && zt.size > 0 && !Vt && Gt();
947
+ }
948
+ return t;
949
+ }
950
+ function Gt() {
951
+ Vt = !1;
952
+ for (let e of zt) {
953
+ e.f & 1024 && z(e, te);
954
+ let t;
955
+ try {
956
+ t = Xn(e);
957
+ } catch {
958
+ t = !0;
959
+ }
960
+ t && tr(e);
961
+ }
962
+ zt.clear();
963
+ }
964
+ function Kt(e) {
965
+ W(e, e.v + 1);
966
+ }
967
+ function qt(e, t, n) {
968
+ var r = e.reactions;
969
+ if (r !== null) for (var i = He(), a = r.length, o = 0; o < a; o++) {
970
+ var s = r[o], c = s.f;
971
+ if (!(!i && s === Y)) {
972
+ var l = (c & C) === 0;
973
+ if (l && z(s, t), c & 131072) zt.add(s);
974
+ else if (c & 2) {
975
+ var u = s;
976
+ H?.delete(u), c & 65536 || (c & 512 && (Y === null || !(Y.f & 2097152)) && (s.f |= ie), qt(u, te, n));
977
+ } else if (l) {
978
+ var d = s;
979
+ c & 16 && Mt !== null && Mt.add(d), n === null ? It(d) : n.push(d);
980
+ }
981
+ }
982
+ }
983
+ }
984
+ function Jt(e) {
985
+ if (typeof e != "object" || !e || M in e) return e;
986
+ let t = v(e);
987
+ if (t !== g && t !== _) return e;
988
+ var n = /* @__PURE__ */ new Map(), r = c(e), i = /* @__PURE__ */ U(0), a = null, s = qn, l = (e) => {
989
+ if (qn === s) return e();
990
+ var t = q, n = qn;
991
+ J(null), Jn(s);
992
+ var r = e();
993
+ return J(t), Jn(n), r;
994
+ };
995
+ return r && n.set("length", /* @__PURE__ */ U(e.length, a)), new Proxy(e, {
996
+ defineProperty(e, t, r) {
997
+ (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && xe();
998
+ var i = n.get(t);
999
+ return i === void 0 ? l(() => {
1000
+ var e = /* @__PURE__ */ U(r.value, a);
1001
+ return n.set(t, e), e;
1002
+ }) : W(i, r.value, !0), !0;
1003
+ },
1004
+ deleteProperty(e, t) {
1005
+ var r = n.get(t);
1006
+ if (r === void 0) {
1007
+ if (t in e) {
1008
+ let e = l(() => /* @__PURE__ */ U(o, a));
1009
+ n.set(t, e), Kt(i);
1010
+ }
1011
+ } else W(r, o), Kt(i);
1012
+ return !0;
1013
+ },
1014
+ get(t, r, i) {
1015
+ if (r === M) return e;
1016
+ var s = n.get(r), c = r in t;
1017
+ if (s === void 0 && (!c || m(t, r)?.writable) && (s = l(() => /* @__PURE__ */ U(Jt(c ? t[r] : o), a)), n.set(r, s)), s !== void 0) {
1018
+ var u = Q(s);
1019
+ return u === o ? void 0 : u;
1020
+ }
1021
+ return Reflect.get(t, r, i);
1022
+ },
1023
+ getOwnPropertyDescriptor(e, t) {
1024
+ var r = Reflect.getOwnPropertyDescriptor(e, t);
1025
+ if (r && "value" in r) {
1026
+ var i = n.get(t);
1027
+ i && (r.value = Q(i));
1028
+ } else if (r === void 0) {
1029
+ var a = n.get(t), s = a?.v;
1030
+ if (a !== void 0 && s !== o) return {
1031
+ enumerable: !0,
1032
+ configurable: !0,
1033
+ value: s,
1034
+ writable: !0
1035
+ };
1036
+ }
1037
+ return r;
1038
+ },
1039
+ has(e, t) {
1040
+ if (t === M) return !0;
1041
+ var r = n.get(t), i = r !== void 0 && r.v !== o || Reflect.has(e, t);
1042
+ return (r !== void 0 || Y !== null && (!i || m(e, t)?.writable)) && (r === void 0 && (r = l(() => /* @__PURE__ */ U(i ? Jt(e[t]) : o, a)), n.set(t, r)), Q(r) === o) ? !1 : i;
1043
+ },
1044
+ set(e, t, s, c) {
1045
+ var u = n.get(t), d = t in e;
1046
+ if (r && t === "length") for (var f = s; f < u.v; f += 1) {
1047
+ var p = n.get(f + "");
1048
+ p === void 0 ? f in e && (p = l(() => /* @__PURE__ */ U(o, a)), n.set(f + "", p)) : W(p, o);
1049
+ }
1050
+ if (u === void 0) (!d || m(e, t)?.writable) && (u = l(() => /* @__PURE__ */ U(void 0, a)), W(u, Jt(s)), n.set(t, u));
1051
+ else {
1052
+ d = u.v !== o;
1053
+ var h = l(() => Jt(s));
1054
+ W(u, h);
1055
+ }
1056
+ var g = Reflect.getOwnPropertyDescriptor(e, t);
1057
+ if (g?.set && g.set.call(c, s), !d) {
1058
+ if (r && typeof t == "string") {
1059
+ var _ = n.get("length"), v = Number(t);
1060
+ Number.isInteger(v) && v >= _.v && W(_, v + 1);
1061
+ }
1062
+ Kt(i);
1063
+ }
1064
+ return !0;
1065
+ },
1066
+ ownKeys(e) {
1067
+ Q(i);
1068
+ var t = Reflect.ownKeys(e).filter((e) => {
1069
+ var t = n.get(e);
1070
+ return t === void 0 || t.v !== o;
1071
+ });
1072
+ for (var [r, a] of n) a.v !== o && !(r in e) && t.push(r);
1073
+ return t;
1074
+ },
1075
+ setPrototypeOf() {
1076
+ Se();
1077
+ }
1078
+ });
1079
+ }
1080
+ var Yt, Xt, Zt, Qt;
1081
+ function $t() {
1082
+ if (Yt === void 0) {
1083
+ Yt = window, Xt = /Firefox/.test(navigator.userAgent);
1084
+ var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1085
+ Zt = m(t, "firstChild").get, Qt = m(t, "nextSibling").get, y(e) && (e[ce] = void 0, e[se] = null, e[le] = void 0, e.__e = void 0), y(n) && (n[ue] = void 0);
1086
+ }
1087
+ }
1088
+ function G(e = "") {
1089
+ return document.createTextNode(e);
1090
+ }
1091
+ /* @__NO_SIDE_EFFECTS__ */
1092
+ function en(e) {
1093
+ return Zt.call(e);
1094
+ }
1095
+ /* @__NO_SIDE_EFFECTS__ */
1096
+ function tn(e) {
1097
+ return Qt.call(e);
1098
+ }
1099
+ function nn(e, t) {
1100
+ if (!P) return /* @__PURE__ */ en(e);
1101
+ var n = /* @__PURE__ */ en(F);
1102
+ if (n === null) n = F.appendChild(G());
1103
+ else if (t && n.nodeType !== 3) {
1104
+ var r = G();
1105
+ return n?.before(r), I(r), r;
1106
+ }
1107
+ return t && ln(n), I(n), n;
1108
+ }
1109
+ function rn(e, t = !1) {
1110
+ if (!P) {
1111
+ var n = /* @__PURE__ */ en(e);
1112
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ tn(n) : n;
1113
+ }
1114
+ if (t) {
1115
+ if (F?.nodeType !== 3) {
1116
+ var r = G();
1117
+ return F?.before(r), I(r), r;
1118
+ }
1119
+ ln(F);
1120
+ }
1121
+ return F;
1122
+ }
1123
+ function an(e, t = 1, n = !1) {
1124
+ let r = P ? F : e;
1125
+ for (var i; t--;) i = r, r = /* @__PURE__ */ tn(r);
1126
+ if (!P) return r;
1127
+ if (n) {
1128
+ if (r?.nodeType !== 3) {
1129
+ var a = G();
1130
+ return r === null ? i?.after(a) : r.before(a), I(a), a;
1131
+ }
1132
+ ln(r);
1133
+ }
1134
+ return I(r), r;
1135
+ }
1136
+ function on(e) {
1137
+ e.textContent = "";
1138
+ }
1139
+ function sn() {
1140
+ return !Le || Mt !== null ? !1 : (Y.f & E) !== 0;
1141
+ }
1142
+ function cn(e, t, n) {
1143
+ 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);
1144
+ }
1145
+ function ln(e) {
1146
+ if (e.nodeValue.length < 65536) return;
1147
+ let t = e.nextSibling;
1148
+ for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1149
+ }
1150
+ function un(e) {
1151
+ Y === null && (q === null && _e(e), ge()), Ln && he(e);
1152
+ }
1153
+ function dn(e, t) {
1154
+ var n = t.last;
1155
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1156
+ }
1157
+ function fn(e, t) {
1158
+ var n = Y;
1159
+ n !== null && n.f & 8192 && (e |= w);
1160
+ var r = {
1161
+ ctx: L,
1162
+ deps: null,
1163
+ nodes: null,
1164
+ f: e | C | 512,
1165
+ first: null,
1166
+ fn: t,
1167
+ last: null,
1168
+ next: null,
1169
+ parent: n,
1170
+ b: n && n.b,
1171
+ prev: null,
1172
+ teardown: null,
1173
+ wv: 0,
1174
+ ac: null
1175
+ };
1176
+ V?.register_created_effect(r);
1177
+ var i = r;
1178
+ if (e & 4) Tt === null ? kt.ensure().schedule(r) : Tt.push(r);
1179
+ else if (t !== null) {
1180
+ try {
1181
+ tr(r);
1182
+ } catch (e) {
1183
+ throw K(r), e;
1184
+ }
1185
+ 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 |= D));
1186
+ }
1187
+ if (i !== null && (i.parent = n, n !== null && dn(i, n), q !== null && q.f & 2 && !(e & 64))) {
1188
+ var a = q;
1189
+ (a.effects ??= []).push(i);
1190
+ }
1191
+ return r;
1192
+ }
1193
+ function pn() {
1194
+ return q !== null && !zn;
1195
+ }
1196
+ function mn(e) {
1197
+ let t = fn(8, null);
1198
+ return z(t, S), t.teardown = e, t;
1199
+ }
1200
+ function hn(e) {
1201
+ un("$effect");
1202
+ var t = Y.f;
1203
+ if (!q && t & 32 && L !== null && !L.i) {
1204
+ var n = L;
1205
+ (n.e ??= []).push(e);
1206
+ } else return gn(e);
1207
+ }
1208
+ function gn(e) {
1209
+ return fn(4 | O, e);
1210
+ }
1211
+ function _n(e) {
1212
+ kt.ensure();
1213
+ let t = fn(64 | re, e);
1214
+ return () => {
1215
+ K(t);
1216
+ };
1217
+ }
1218
+ function vn(e) {
1219
+ kt.ensure();
1220
+ let t = fn(64 | re, e);
1221
+ return (e = {}) => new Promise((n) => {
1222
+ e.outro ? An(t, () => {
1223
+ K(t), n(void 0);
1224
+ }) : (K(t), n(void 0));
1225
+ });
1226
+ }
1227
+ function yn(e) {
1228
+ return fn(4, e);
1229
+ }
1230
+ function bn(e) {
1231
+ return fn(ae | re, e);
1232
+ }
1233
+ function xn(e, t = 0) {
1234
+ return fn(8 | t, e);
1235
+ }
1236
+ function Sn(e, t = [], n = [], r = []) {
1237
+ ot(r, t, n, (t) => {
1238
+ fn(8, () => {
1239
+ e(...t.map(Q));
1240
+ });
1241
+ });
1242
+ }
1243
+ function Cn(e, t = 0) {
1244
+ return fn(16 | t, e);
1245
+ }
1246
+ function wn(e) {
1247
+ return fn(32 | re, e);
1248
+ }
1249
+ function Tn(e) {
1250
+ var t = e.teardown;
1251
+ if (t !== null) {
1252
+ let e = Ln, n = q;
1253
+ Rn(!0), J(null);
1254
+ try {
1255
+ t.call(null);
1256
+ } finally {
1257
+ Rn(e), J(n);
1258
+ }
1259
+ }
1260
+ }
1261
+ function En(e, t = !1) {
1262
+ var n = e.first;
1263
+ for (e.first = e.last = null; n !== null;) {
1264
+ let e = n.ac;
1265
+ e !== null && tt(() => {
1266
+ e.abort(de);
1267
+ });
1268
+ var r = n.next;
1269
+ n.f & 64 ? n.parent = null : K(n, t), n = r;
1270
+ }
1271
+ }
1272
+ function Dn(e) {
1273
+ for (var t = e.first; t !== null;) {
1274
+ var n = t.next;
1275
+ t.f & 32 || K(t), t = n;
1276
+ }
1277
+ }
1278
+ function K(e, t = !0) {
1279
+ var n = !1;
1280
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (On(e.nodes.start, e.nodes.end), n = !0), e.f |= ne, En(e, t && !n), er(e, 0);
1281
+ var r = e.nodes && e.nodes.t;
1282
+ if (r !== null) for (let e of r) e.stop();
1283
+ Tn(e), e.f ^= ne, e.f |= T;
1284
+ var i = e.parent;
1285
+ i !== null && i.first !== null && kn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1286
+ }
1287
+ function On(e, t) {
1288
+ for (; e !== null;) {
1289
+ var n = e === t ? null : /* @__PURE__ */ tn(e);
1290
+ e.remove(), e = n;
1291
+ }
1292
+ }
1293
+ function kn(e) {
1294
+ var t = e.parent, n = e.prev, r = e.next;
1295
+ n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1296
+ }
1297
+ function An(e, t, n = !0) {
1298
+ var r = [];
1299
+ jn(e, r, !0);
1300
+ var i = () => {
1301
+ n && K(e), t && t();
1302
+ }, a = r.length;
1303
+ if (a > 0) {
1304
+ var o = () => --a || i();
1305
+ for (var s of r) s.out(o);
1306
+ } else i();
1307
+ }
1308
+ function jn(e, t, n) {
1309
+ if (!(e.f & 8192)) {
1310
+ e.f ^= w;
1311
+ var r = e.nodes && e.nodes.t;
1312
+ if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1313
+ for (var i = e.first; i !== null;) {
1314
+ var a = i.next;
1315
+ if (!(i.f & 64)) {
1316
+ var o = (i.f & 65536) != 0 || (i.f & 32) != 0 && (e.f & 16) != 0;
1317
+ jn(i, t, o ? n : !1);
1318
+ }
1319
+ i = a;
1320
+ }
1321
+ }
1322
+ }
1323
+ function Mn(e) {
1324
+ Nn(e, !0);
1325
+ }
1326
+ function Nn(e, t) {
1327
+ if (e.f & 8192) {
1328
+ e.f ^= w, e.f & 1024 || (z(e, C), kt.ensure().schedule(e));
1329
+ for (var n = e.first; n !== null;) {
1330
+ var r = n.next, i = (n.f & 65536) != 0 || (n.f & 32) != 0;
1331
+ Nn(n, i ? t : !1), n = r;
1332
+ }
1333
+ var a = e.nodes && e.nodes.t;
1334
+ if (a !== null) for (let e of a) (e.is_global || t) && e.in();
1335
+ }
1336
+ }
1337
+ function Pn(e, t) {
1338
+ if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; n !== null;) {
1339
+ var i = n === r ? null : /* @__PURE__ */ tn(n);
1340
+ t.append(n), n = i;
1341
+ }
1342
+ }
1343
+ var Fn = null, In = !1, Ln = !1;
1344
+ function Rn(e) {
1345
+ Ln = e;
1346
+ }
1347
+ var q = null, zn = !1;
1348
+ function J(e) {
1349
+ q = e;
1350
+ }
1351
+ var Y = null;
1352
+ function Bn(e) {
1353
+ Y = e;
1354
+ }
1355
+ var Vn = null;
1356
+ function Hn(e) {
1357
+ q !== null && (!Le || q.f & 2) && (Vn ??= /* @__PURE__ */ new Set()).add(e);
1358
+ }
1359
+ var X = null, Z = 0, Un = null;
1360
+ function Wn(e) {
1361
+ Un = e;
1362
+ }
1363
+ var Gn = 1, Kn = 0, qn = Kn;
1364
+ function Jn(e) {
1365
+ qn = e;
1366
+ }
1367
+ function Yn() {
1368
+ return ++Gn;
1369
+ }
1370
+ function Xn(e) {
1371
+ var t = e.f;
1372
+ if (t & 2048) return !0;
1373
+ if (t & 2 && (e.f &= ~ie), t & 4096) {
1374
+ for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1375
+ var a = n[i];
1376
+ if (Xn(a) && gt(a), a.wv > e.wv) return !0;
1377
+ }
1378
+ t & 512 && H === null && z(e, S);
1379
+ }
1380
+ return !1;
1381
+ }
1382
+ function Zn(e, t, n = !0) {
1383
+ var r = e.reactions;
1384
+ if (r !== null && !(!Le && Vn !== null && Vn.has(e))) for (var i = 0; i < r.length; i++) {
1385
+ var a = r[i];
1386
+ a.f & 2 ? Zn(a, t, !1) : t === a && (n ? z(a, C) : a.f & 1024 && z(a, te), It(a));
1387
+ }
1388
+ }
1389
+ function Qn(e) {
1390
+ var t = X, n = Z, r = Un, i = q, a = Vn, o = L, s = zn, c = qn, l = e.f;
1391
+ X = null, Z = 0, Un = null, q = l & 96 ? null : e, Vn = null, ze(e.ctx), zn = !1, qn = ++Kn, e.ac !== null && (tt(() => {
1392
+ e.ac.abort(de);
1393
+ }), e.ac = null);
1394
+ try {
1395
+ e.f |= A;
1396
+ var u = e.fn, d = u();
1397
+ e.f |= E;
1398
+ var f = e.deps, p = V?.is_fork;
1399
+ if (X !== null) {
1400
+ var m;
1401
+ if (p || er(e, Z), f !== null && Z > 0) for (f.length = Z + X.length, m = 0; m < X.length; m++) f[Z + m] = X[m];
1402
+ else e.deps = f = X;
1403
+ if (pn() && e.f & 512) for (m = Z; m < f.length; m++) (f[m].reactions ??= []).push(e);
1404
+ } else !p && f !== null && Z < f.length && (er(e, Z), f.length = Z);
1405
+ if (He() && Un !== null && !zn && f !== null && !(e.f & 6146)) for (m = 0; m < Un.length; m++) Zn(Un[m], e);
1406
+ if (i !== null && i !== e) {
1407
+ if (Kn++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = Kn;
1408
+ if (t !== null) for (let e of t) e.rv = Kn;
1409
+ Un !== null && (r === null ? r = Un : r.push(...Un));
1410
+ }
1411
+ return e.f & 8388608 && (e.f ^= j), d;
1412
+ } catch (e) {
1413
+ return Ke(e);
1414
+ } finally {
1415
+ e.f ^= A, X = t, Z = n, Un = r, q = i, Vn = a, ze(o), zn = s, qn = c;
1416
+ }
1417
+ }
1418
+ function $n(e, t) {
1419
+ let n = t.reactions;
1420
+ if (n !== null) {
1421
+ var r = l.call(n, e);
1422
+ if (r !== -1) {
1423
+ var i = n.length - 1;
1424
+ i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1425
+ }
1426
+ }
1427
+ if (n === null && t.f & 2 && (X === null || !u.call(X, t))) {
1428
+ var a = t;
1429
+ a.f & 512 && (a.f ^= 512, a.f &= ~ie), a.v !== o && Ye(a), a.ac !== null && tt(() => {
1430
+ a.ac.abort(de), a.ac = null, z(a, C);
1431
+ }), _t(a), er(a, 0);
1432
+ }
1433
+ }
1434
+ function er(e, t) {
1435
+ var n = e.deps;
1436
+ if (n !== null) for (var r = t; r < n.length; r++) $n(e, n[r]);
1437
+ }
1438
+ function tr(e) {
1439
+ var t = e.f;
1440
+ if (!(t & 16384)) {
1441
+ z(e, S);
1442
+ var n = Y, r = In;
1443
+ Y = e, In = (t & 96) == 0;
1444
+ try {
1445
+ t & 16777232 ? Dn(e) : En(e), Tn(e);
1446
+ var i = Qn(e);
1447
+ e.teardown = typeof i == "function" ? i : null, e.wv = Gn;
1448
+ } finally {
1449
+ In = r, Y = n;
1450
+ }
1451
+ }
1452
+ }
1453
+ function Q(e) {
1454
+ var t = (e.f & 2) != 0;
1455
+ if (Fn?.add(e), q !== null && !zn && !(Y !== null && Y.f & 16384) && (Vn === null || !Vn.has(e))) {
1456
+ var n = q.deps;
1457
+ if (q.f & 2097152) e.rv < Kn && (e.rv = Kn, X === null && n !== null && n[Z] === e ? Z++ : X === null ? X = [e] : X.push(e));
1458
+ else {
1459
+ q.deps ??= [], u.call(q.deps, e) || q.deps.push(e);
1460
+ var r = e.reactions;
1461
+ r === null ? e.reactions = [q] : u.call(r, q) || r.push(q);
1462
+ }
1463
+ }
1464
+ if (Ln && Bt.has(e)) return Bt.get(e);
1465
+ if (t) {
1466
+ var i = e;
1467
+ if (Ln) {
1468
+ var a = i.v;
1469
+ return (!(i.f & 1024) && i.reactions !== null || rr(i)) && (a = ht(i)), Bt.set(i, a), a;
1470
+ }
1471
+ var o = (i.f & 512) == 0 && !zn && q !== null && (In || (q.f & 512) != 0), s = (i.f & E) === 0;
1472
+ Xn(i) && (o && (i.f |= 512), gt(i)), o && !s && (vt(i), nr(i));
1473
+ }
1474
+ if (H?.has(e)) return H.get(e);
1475
+ if (e.f & 8388608) throw e.v;
1476
+ return e.v;
1477
+ }
1478
+ function nr(e) {
1479
+ if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ??= []).push(e), t.f & 2 && !(t.f & 512) && (vt(t), nr(t));
1480
+ }
1481
+ function rr(e) {
1482
+ if (e.v === o) return !0;
1483
+ if (e.deps === null) return !1;
1484
+ for (let t of e.deps) if (Bt.has(t) || t.f & 2 && rr(t)) return !0;
1485
+ return !1;
1486
+ }
1487
+ function ir(e) {
1488
+ var t = zn;
1489
+ try {
1490
+ return zn = !0, e();
1491
+ } finally {
1492
+ zn = t;
1493
+ }
1494
+ }
1495
+ function ar(e) {
1496
+ if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
1497
+ if (M in e) or(e);
1498
+ else if (!Array.isArray(e)) for (let t in e) {
1499
+ let n = e[t];
1500
+ typeof n == "object" && n && M in n && or(n);
1501
+ }
1502
+ }
1503
+ }
1504
+ function or(e, t = /* @__PURE__ */ new Set()) {
1505
+ if (typeof e == "object" && e && !(e instanceof EventTarget) && !t.has(e)) {
1506
+ t.add(e), e instanceof Date && e.getTime();
1507
+ for (let n in e) try {
1508
+ or(e[n], t);
1509
+ } catch {}
1510
+ let n = v(e);
1511
+ if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
1512
+ let t = h(n);
1513
+ for (let n in t) {
1514
+ let r = t[n].get;
1515
+ if (r) try {
1516
+ r.call(e);
1517
+ } catch {}
1518
+ }
1519
+ }
1520
+ }
1521
+ }
1522
+ var sr = Symbol("events"), cr = /* @__PURE__ */ new Set(), lr = /* @__PURE__ */ new Set();
1523
+ function ur(e, t, n) {
1524
+ (t[sr] ??= {})[e] = n;
1525
+ }
1526
+ function dr(e) {
1527
+ for (var t = 0; t < e.length; t++) cr.add(e[t]);
1528
+ for (var n of lr) n(e);
1529
+ }
1530
+ var fr = null;
1531
+ function pr(e) {
1532
+ var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1533
+ fr = e;
1534
+ var o = 0, s = fr === e && e[sr];
1535
+ if (s) {
1536
+ var c = i.indexOf(s);
1537
+ if (c !== -1 && (t === document || t === window)) {
1538
+ e[sr] = t;
1539
+ return;
1540
+ }
1541
+ var l = i.indexOf(t);
1542
+ if (l === -1) return;
1543
+ c <= l && (o = c);
1544
+ }
1545
+ if (a = i[o] || e.target, a !== t) {
1546
+ p(e, "currentTarget", {
1547
+ configurable: !0,
1548
+ get() {
1549
+ return a || n;
1550
+ }
1551
+ });
1552
+ var u = q, d = Y;
1553
+ J(null), Bn(null);
1554
+ try {
1555
+ for (var f, m = []; a !== null && a !== t;) {
1556
+ try {
1557
+ var h = a[sr]?.[r];
1558
+ h != null && (!a.disabled || e.target === a) && h.call(a, e);
1559
+ } catch (e) {
1560
+ f ? m.push(e) : f = e;
1561
+ }
1562
+ if (e.cancelBubble) break;
1563
+ o++, a = o < i.length ? i[o] : null;
1564
+ }
1565
+ if (f) {
1566
+ for (let e of m) queueMicrotask(() => {
1567
+ throw e;
1568
+ });
1569
+ throw f;
1570
+ }
1571
+ } finally {
1572
+ e[sr] = t, delete e.currentTarget, J(u), Bn(d);
1573
+ }
1574
+ }
1575
+ }
1576
+ var mr = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1577
+ function hr(e) {
1578
+ return mr?.createHTML(e) ?? e;
1579
+ }
1580
+ function gr(e) {
1581
+ var t = cn("template");
1582
+ return t.innerHTML = hr(e.replaceAll("<!>", "<!---->")), t.content;
1583
+ }
1584
+ function _r(e, t) {
1585
+ var n = Y;
1586
+ n.nodes === null && (n.nodes = {
1587
+ start: e,
1588
+ end: t,
1589
+ a: null,
1590
+ t: null
1591
+ });
1592
+ }
1593
+ /* @__NO_SIDE_EFFECTS__ */
1594
+ function vr(e, t) {
1595
+ var n = (t & 1) != 0, r = (t & 2) != 0, i, a = !e.startsWith("<!>");
1596
+ return () => {
1597
+ if (P) return _r(F, null), F;
1598
+ i === void 0 && (i = gr(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ en(i)));
1599
+ var t = r || Xt ? document.importNode(i, !0) : i.cloneNode(!0);
1600
+ if (n) {
1601
+ var o = /* @__PURE__ */ en(t), s = t.lastChild;
1602
+ _r(o, s);
1603
+ } else _r(t, t);
1604
+ return t;
1605
+ };
1606
+ }
1607
+ function yr() {
1608
+ if (P) return _r(F, null), F;
1609
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = G();
1610
+ return e.append(t, n), _r(t, n), e;
1611
+ }
1612
+ function br(e, t) {
1613
+ if (P) {
1614
+ var n = Y;
1615
+ (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = F), ke();
1616
+ return;
1617
+ }
1618
+ e !== null && e.before(t);
1619
+ }
1620
+ [.../* @__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(".")];
1621
+ var xr = ["touchstart", "touchmove"];
1622
+ function Sr(e) {
1623
+ return xr.includes(e);
1624
+ }
1625
+ function Cr(e, t) {
1626
+ var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
1627
+ n !== (e[ue] ??= e.nodeValue) && (e[ue] = n, e.nodeValue = `${n}`);
1628
+ }
1629
+ function wr(e, t) {
1630
+ return Dr(e, t);
1631
+ }
1632
+ function Tr(e, t) {
1633
+ $t(), t.intro = t.intro ?? !1;
1634
+ let n = t.target, r = P, i = F;
1635
+ try {
1636
+ for (var o = /* @__PURE__ */ en(n); o && (o.nodeType !== 8 || o.data !== "[");) o = /* @__PURE__ */ tn(o);
1637
+ if (!o) throw a;
1638
+ Oe(!0), I(o);
1639
+ let r = Dr(e, {
1640
+ ...t,
1641
+ anchor: o
1642
+ });
1643
+ return Oe(!1), r;
1644
+ } catch (r) {
1645
+ if (r instanceof Error && r.message.split("\n").some((e) => e.startsWith("https://svelte.dev/e/"))) throw r;
1646
+ return r !== a && console.warn("Failed to hydrate: ", r), t.recover === !1 && ye(), $t(), on(n), Oe(!1), wr(e, t);
1647
+ } finally {
1648
+ Oe(r), I(i);
1649
+ }
1650
+ }
1651
+ var Er = /* @__PURE__ */ new Map();
1652
+ function Dr(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: c }) {
1653
+ $t();
1654
+ var l = void 0, u = vn(() => {
1655
+ var s = n ?? t.appendChild(G());
1656
+ it(s, { pending: () => {} }, (t) => {
1657
+ Be({});
1658
+ var n = L;
1659
+ if (o && (n.c = o), i && (r.$$events = i), P && _r(t, null), l = e(t, r) || {}, P && (Y.nodes.end = F, F === null || F.nodeType !== 8 || F.data !== "]")) throw Ee(), a;
1660
+ Ve();
1661
+ }, c);
1662
+ var u = /* @__PURE__ */ new Set(), f = (e) => {
1663
+ for (var n = 0; n < e.length; n++) {
1664
+ var r = e[n];
1665
+ if (!u.has(r)) {
1666
+ u.add(r);
1667
+ var i = Sr(r);
1668
+ for (let e of [t, document]) {
1669
+ var a = Er.get(e);
1670
+ a === void 0 && (a = /* @__PURE__ */ new Map(), Er.set(e, a));
1671
+ var o = a.get(r);
1672
+ o === void 0 ? (e.addEventListener(r, pr, { passive: i }), a.set(r, 1)) : a.set(r, o + 1);
1673
+ }
1674
+ }
1675
+ }
1676
+ };
1677
+ return f(d(cr)), lr.add(f), () => {
1678
+ for (var e of u) for (let n of [t, document]) {
1679
+ var r = Er.get(n), i = r.get(e);
1680
+ --i == 0 ? (n.removeEventListener(e, pr), r.delete(e), r.size === 0 && Er.delete(n)) : r.set(e, i);
1681
+ }
1682
+ lr.delete(f), s !== n && s.parentNode?.removeChild(s);
1683
+ };
1684
+ });
1685
+ return Or.set(l, u), l;
1686
+ }
1687
+ var Or = /* @__PURE__ */ new WeakMap();
1688
+ function kr(e, t) {
1689
+ let n = Or.get(e);
1690
+ return n ? (Or.delete(e), n(t)) : Promise.resolve();
1691
+ }
1692
+ var Ar = class {
1693
+ anchor;
1694
+ #e = /* @__PURE__ */ new Map();
1695
+ #t = /* @__PURE__ */ new Map();
1696
+ #n = /* @__PURE__ */ new Map();
1697
+ #r = /* @__PURE__ */ new Set();
1698
+ #i = !0;
1699
+ constructor(e, t = !0) {
1700
+ this.anchor = e, this.#i = t;
1701
+ }
1702
+ #a = (e) => {
1703
+ if (this.#e.has(e)) {
1704
+ var t = this.#e.get(e), n = this.#t.get(t);
1705
+ if (n) Mn(n), this.#r.delete(t);
1706
+ else {
1707
+ var r = this.#n.get(t);
1708
+ r && (Mn(r.effect), this.#t.set(t, r.effect), this.#n.delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1709
+ }
1710
+ for (let [t, n] of this.#e) {
1711
+ if (this.#e.delete(t), t === e) break;
1712
+ let r = this.#n.get(n);
1713
+ r && (K(r.effect), this.#n.delete(n));
1714
+ }
1715
+ for (let [e, r] of this.#t) {
1716
+ if (e === t || this.#r.has(e)) continue;
1717
+ let i = () => {
1718
+ if (Array.from(this.#e.values()).includes(e)) {
1719
+ var t = document.createDocumentFragment();
1720
+ Pn(r, t), t.append(G()), this.#n.set(e, {
1721
+ effect: r,
1722
+ fragment: t
1723
+ });
1724
+ } else K(r);
1725
+ this.#r.delete(e), this.#t.delete(e);
1726
+ };
1727
+ this.#i || !n ? (this.#r.add(e), An(r, i, !1)) : i();
1728
+ }
1729
+ }
1730
+ };
1731
+ #o = (e) => {
1732
+ this.#e.delete(e);
1733
+ let t = Array.from(this.#e.values());
1734
+ for (let [e, n] of this.#n) t.includes(e) || (K(n.effect), this.#n.delete(e));
1735
+ };
1736
+ ensure(e, t) {
1737
+ var n = V, r = sn();
1738
+ if (t && !this.#t.has(e) && !this.#n.has(e)) if (r) {
1739
+ var i = document.createDocumentFragment(), a = G();
1740
+ i.append(a), this.#n.set(e, {
1741
+ effect: wn(() => t(a)),
1742
+ fragment: i
1743
+ });
1744
+ } else this.#t.set(e, wn(() => t(this.anchor)));
1745
+ if (this.#e.set(n, e), r) {
1746
+ for (let [t, r] of this.#t) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1747
+ for (let [t, r] of this.#n) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1748
+ n.oncommit(this.#a), n.ondiscard(this.#o);
1749
+ } else P && (this.anchor = F), this.#a(n);
1750
+ }
1751
+ };
1752
+ function jr(e, t, n = !1) {
1753
+ var r;
1754
+ P && (r = F, ke());
1755
+ var i = new Ar(e), a = n ? D : 0;
1756
+ function o(e, t) {
1757
+ if (P) {
1758
+ var n = Ne(r);
1759
+ if (e !== parseInt(n.substring(1))) {
1760
+ var a = Me();
1761
+ I(a), i.anchor = a, Oe(!1), i.ensure(e, t), Oe(!0);
1762
+ return;
1763
+ }
1764
+ }
1765
+ i.ensure(e, t);
1766
+ }
1767
+ Cn(() => {
1768
+ var e = !1;
1769
+ t((t, n = 0) => {
1770
+ e = !0, o(n, t);
1771
+ }), e || o(-1, null);
1772
+ }, a);
1773
+ }
1774
+ function Mr(e, t, n) {
1775
+ for (var r = [], i = t.length, a, o = t.length, s = 0; s < i; s++) {
1776
+ let n = t[s];
1777
+ An(n, () => {
1778
+ if (a) {
1779
+ if (a.pending.delete(n), a.done.add(n), a.pending.size === 0) {
1780
+ var t = e.outrogroups;
1781
+ Nr(e, d(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
1782
+ }
1783
+ } else --o;
1784
+ }, !1);
1785
+ }
1786
+ if (o === 0) {
1787
+ var c = r.length === 0 && n !== null;
1788
+ if (c) {
1789
+ var l = n, u = l.parentNode;
1790
+ on(u), u.append(l), e.items.clear();
1791
+ }
1792
+ Nr(e, t, !c);
1793
+ } else a = {
1794
+ pending: new Set(t),
1795
+ done: /* @__PURE__ */ new Set()
1796
+ }, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(a);
1797
+ }
1798
+ function Nr(e, t, n = !0) {
1799
+ var r;
1800
+ if (e.pending.size > 0) {
1801
+ r = /* @__PURE__ */ new Set();
1802
+ for (let t of e.pending.values()) for (let n of t) r.add(e.items.get(n).e);
1803
+ }
1804
+ for (var i = 0; i < t.length; i++) {
1805
+ var a = t[i];
1806
+ r?.has(a) ? (a.f |= k, Pn(a, document.createDocumentFragment())) : K(t[i], n);
1807
+ }
1808
+ }
1809
+ var Pr;
1810
+ function Fr(e, t, n, r, i, a = null) {
1811
+ var o = e, s = /* @__PURE__ */ new Map();
1812
+ if (t & 4) {
1813
+ var l = e;
1814
+ o = P ? I(/* @__PURE__ */ en(l)) : l.appendChild(G());
1815
+ }
1816
+ P && ke();
1817
+ var u = null, f = /* @__PURE__ */ pt(() => {
1818
+ var e = n();
1819
+ return c(e) ? e : e == null ? [] : d(e);
1820
+ }), p, m = /* @__PURE__ */ new Map(), h = !0;
1821
+ function g(e) {
1822
+ v.effect.f & 16384 || (v.pending.delete(e), v.fallback = u, Lr(v, p, o, t, r), u !== null && (p.length === 0 ? u.f & 33554432 ? (u.f ^= k, zr(u, null, o)) : Mn(u) : An(u, () => {
1823
+ u = null;
1824
+ })));
1825
+ }
1826
+ function _(e) {
1827
+ v.pending.delete(e);
1828
+ }
1829
+ var v = {
1830
+ effect: Cn(() => {
1831
+ p = Q(f);
1832
+ var e = p.length;
1833
+ let c = !1;
1834
+ P && Ne(o) === "[!" != (e === 0) && (o = Me(), I(o), Oe(!1), c = !0);
1835
+ for (var l = /* @__PURE__ */ new Set(), d = V, v = sn(), y = 0; y < e; y += 1) {
1836
+ P && F.nodeType === 8 && F.data === "]" && (o = F, c = !0, Oe(!1));
1837
+ var ee = p[y], b = r(ee, y), x = h ? null : s.get(b);
1838
+ x ? (x.v && Wt(x.v, ee), x.i && Wt(x.i, y), v && d.unskip_effect(x.e)) : (x = Rr(s, h ? o : Pr ??= G(), ee, b, y, i, t, n), h || (x.e.f |= k), s.set(b, x)), l.add(b);
1839
+ }
1840
+ if (e === 0 && a && !u && (h ? u = wn(() => a(o)) : (u = wn(() => a(Pr ??= G())), u.f |= k)), e > l.size && me("", "", ""), P && e > 0 && I(Me()), !h) if (m.set(d, l), v) {
1841
+ for (let [e, t] of s) l.has(e) || d.skip_effect(t.e);
1842
+ d.oncommit(g), d.ondiscard(_);
1843
+ } else g(d);
1844
+ c && Oe(!0), Q(f);
1845
+ }),
1846
+ flags: t,
1847
+ items: s,
1848
+ pending: m,
1849
+ outrogroups: null,
1850
+ fallback: u
1851
+ };
1852
+ h = !1, P && (o = F);
1853
+ }
1854
+ function Ir(e) {
1855
+ for (; e !== null && !(e.f & 32);) e = e.next;
1856
+ return e;
1857
+ }
1858
+ function Lr(e, t, n, r, i) {
1859
+ var a = (r & 8) != 0, o = t.length, s = e.items, c = Ir(e.effect.first), l, u = null, f, p = [], m = [], h, g, _, v;
1860
+ 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(), (f ??= /* @__PURE__ */ new Set()).add(_));
1861
+ for (v = 0; v < o; v += 1) {
1862
+ 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(_);
1863
+ if (_.f & 8192 && (Mn(_), a && (_.nodes?.a?.unfix(), (f ??= /* @__PURE__ */ new Set()).delete(_))), _.f & 33554432) if (_.f ^= k, _ === c) zr(_, null, n);
1864
+ else {
1865
+ var y = u ? u.next : c;
1866
+ _ === e.effect.last && (e.effect.last = _.prev), _.prev && (_.prev.next = _.next), _.next && (_.next.prev = _.prev), Br(e, u, _), Br(e, _, y), zr(_, y, n), u = _, p = [], m = [], c = Ir(u.next);
1867
+ continue;
1868
+ }
1869
+ if (_ !== c) {
1870
+ if (l !== void 0 && l.has(_)) {
1871
+ if (p.length < m.length) {
1872
+ var ee = m[0], b;
1873
+ u = ee.prev;
1874
+ var x = p[0], S = p[p.length - 1];
1875
+ for (b = 0; b < p.length; b += 1) zr(p[b], ee, n);
1876
+ for (b = 0; b < m.length; b += 1) l.delete(m[b]);
1877
+ Br(e, x.prev, S.next), Br(e, u, x), Br(e, S, ee), c = ee, u = S, --v, p = [], m = [];
1878
+ } else l.delete(_), zr(_, c, n), Br(e, _.prev, _.next), Br(e, _, u === null ? e.effect.first : u.next), Br(e, u, _), u = _;
1879
+ continue;
1880
+ }
1881
+ for (p = [], m = []; c !== null && c !== _;) (l ??= /* @__PURE__ */ new Set()).add(c), m.push(c), c = Ir(c.next);
1882
+ if (c === null) continue;
1883
+ }
1884
+ _.f & 33554432 || p.push(_), u = _, c = Ir(_.next);
1885
+ }
1886
+ if (e.outrogroups !== null) {
1887
+ for (let t of e.outrogroups) t.pending.size === 0 && (Nr(e, d(t.done)), e.outrogroups?.delete(t));
1888
+ e.outrogroups.size === 0 && (e.outrogroups = null);
1889
+ }
1890
+ if (c !== null || l !== void 0) {
1891
+ var C = [];
1892
+ if (l !== void 0) for (_ of l) _.f & 8192 || C.push(_);
1893
+ for (; c !== null;) !(c.f & 8192) && c !== e.fallback && C.push(c), c = Ir(c.next);
1894
+ var te = C.length;
1895
+ if (te > 0) {
1896
+ var w = r & 4 && o === 0 ? n : null;
1897
+ if (a) {
1898
+ for (v = 0; v < te; v += 1) C[v].nodes?.a?.measure();
1899
+ for (v = 0; v < te; v += 1) C[v].nodes?.a?.fix();
1900
+ }
1901
+ Mr(e, C, w);
1902
+ }
1903
+ }
1904
+ a && We(() => {
1905
+ if (f !== void 0) for (_ of f) _.nodes?.a?.apply();
1906
+ });
1907
+ }
1908
+ function Rr(e, t, n, r, i, a, o, s) {
1909
+ var c = o & 1 ? o & 16 ? Ht(n) : /* @__PURE__ */ Ut(n, !1, !1) : null, l = o & 2 ? Ht(i) : null;
1910
+ return {
1911
+ v: c,
1912
+ i: l,
1913
+ e: wn(() => (a(t, c ?? n, l ?? i, s), () => {
1914
+ e.delete(r);
1915
+ }))
1916
+ };
1917
+ }
1918
+ function zr(e, t, n) {
1919
+ if (e.nodes) for (var r = e.nodes.start, i = e.nodes.end, a = t && !(t.f & 33554432) ? t.nodes.start : n; r !== null;) {
1920
+ var o = /* @__PURE__ */ tn(r);
1921
+ if (a.before(r), r === i) return;
1922
+ r = o;
1923
+ }
1924
+ }
1925
+ function Br(e, t, n) {
1926
+ t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
1927
+ }
1928
+ function Vr(e, t) {
1929
+ yn(() => {
1930
+ var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
1931
+ if (!r.querySelector("#" + t.hash)) {
1932
+ let e = cn("style");
1933
+ e.id = t.hash, e.textContent = t.code, r.appendChild(e);
1934
+ }
1935
+ });
1936
+ }
1937
+ function Hr(e, t, n) {
1938
+ yn(() => {
1939
+ var r = ir(() => t(e, n?.()) || {});
1940
+ if (n && r?.update) {
1941
+ var i = !1, a = {};
1942
+ xn(() => {
1943
+ var e = n();
1944
+ ar(e), i && Fe(a, e) && (a = e, r.update(e));
1945
+ }), i = !0;
1946
+ }
1947
+ if (r?.destroy) return () => r.destroy();
1948
+ });
1949
+ }
1950
+ var Ur = [..." \n\r\f\xA0\v"];
1951
+ function Wr(e, t, n) {
1952
+ var r = e == null ? "" : "" + e;
1953
+ if (t && (r = r ? r + " " + t : t), n) {
1954
+ for (var i of Object.keys(n)) if (n[i]) r = r ? r + " " + i : i;
1955
+ else if (r.length) for (var a = i.length, o = 0; (o = r.indexOf(i, o)) >= 0;) {
1956
+ var s = o + a;
1957
+ (o === 0 || Ur.includes(r[o - 1])) && (s === r.length || Ur.includes(r[s])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(s + 1) : o = s;
1958
+ }
1959
+ }
1960
+ return r === "" ? null : r;
1961
+ }
1962
+ function Gr(e, t = !1) {
1963
+ var n = t ? " !important;" : ";", r = "";
1964
+ for (var i of Object.keys(e)) {
1965
+ var a = e[i];
1966
+ a != null && a !== "" && (r += " " + i + ": " + a + n);
1967
+ }
1968
+ return r;
1969
+ }
1970
+ function Kr(e) {
1971
+ return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1972
+ }
1973
+ function qr(e, t) {
1974
+ if (t) {
1975
+ var n = "", r, i;
1976
+ if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
1977
+ e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1978
+ var a = !1, o = 0, s = !1, c = [];
1979
+ r && c.push(...Object.keys(r).map(Kr)), i && c.push(...Object.keys(i).map(Kr));
1980
+ var l = 0, u = -1;
1981
+ let t = e.length;
1982
+ for (var d = 0; d < t; d++) {
1983
+ var f = e[d];
1984
+ if (s ? f === "/" && e[d - 1] === "*" && (s = !1) : a ? a === f && (a = !1) : f === "/" && e[d + 1] === "*" ? s = !0 : f === "\"" || f === "'" ? a = f : f === "(" ? o++ : f === ")" && o--, !s && a === !1 && o === 0) {
1985
+ if (f === ":" && u === -1) u = d;
1986
+ else if (f === ";" || d === t - 1) {
1987
+ if (u !== -1) {
1988
+ var p = Kr(e.substring(l, u).trim());
1989
+ if (!c.includes(p)) {
1990
+ f !== ";" && d++;
1991
+ var m = e.substring(l, d).trim();
1992
+ n += " " + m + ";";
1993
+ }
1994
+ }
1995
+ l = d + 1, u = -1;
1996
+ }
1997
+ }
1998
+ }
1999
+ }
2000
+ return r && (n += Gr(r)), i && (n += Gr(i, !0)), n = n.trim(), n === "" ? null : n;
2001
+ }
2002
+ return e == null ? null : String(e);
2003
+ }
2004
+ function Jr(e, t, n, r, i, a) {
2005
+ var o = e[ce];
2006
+ if (P || o !== n || o === void 0) {
2007
+ var s = Wr(n, r, a);
2008
+ (!P || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[ce] = n;
2009
+ } else if (a && i !== a) for (var c in a) {
2010
+ var l = !!a[c];
2011
+ (i == null || l !== !!i[c]) && e.classList.toggle(c, l);
2012
+ }
2013
+ return a;
2014
+ }
2015
+ function Yr(e, t = {}, n, r) {
2016
+ for (var i in n) {
2017
+ var a = n[i];
2018
+ t[i] !== a && (n[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, a, r));
2019
+ }
2020
+ }
2021
+ function Xr(e, t, n, r) {
2022
+ var i = e[le];
2023
+ if (P || i !== t) {
2024
+ var a = qr(t, r);
2025
+ (!P || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e[le] = t;
2026
+ } else r && (Array.isArray(r) ? (Yr(e, n?.[0], r[0]), Yr(e, n?.[1], r[1], "important")) : Yr(e, n, r));
2027
+ return r;
2028
+ }
2029
+ var Zr = Symbol("is custom element"), Qr = Symbol("is html"), $r = fe ? "link" : "LINK";
2030
+ function ei(e, t, n, r) {
2031
+ var i = ni(e);
2032
+ P && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === $r) || i[t] !== (i[t] = n) && (t === "loading" && (e[oe] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ii(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2033
+ }
2034
+ function ti(e, t, n) {
2035
+ var r = q, i = Y;
2036
+ let a = P;
2037
+ P && Oe(!1), J(null), Bn(null);
2038
+ try {
2039
+ t !== "style" && (ri.has(e.getAttribute("is") || e.nodeName) || !customElements || customElements.get(e.getAttribute("is") || e.nodeName.toLowerCase()) ? ii(e).includes(t) : n && typeof n == "object") ? e[t] = n : ei(e, t, n == null ? n : String(n));
2040
+ } finally {
2041
+ J(r), Bn(i), a && Oe(!0);
2042
+ }
2043
+ }
2044
+ function ni(e) {
2045
+ return e[se] ??= {
2046
+ [Zr]: e.nodeName.includes("-"),
2047
+ [Qr]: e.namespaceURI === s
2048
+ };
2049
+ }
2050
+ var ri = /* @__PURE__ */ new Map();
2051
+ function ii(e) {
2052
+ var t = e.getAttribute("is") || e.nodeName, n = ri.get(t);
2053
+ if (n) return n;
2054
+ ri.set(t, n = []);
2055
+ for (var r, i = e, a = Element.prototype; a !== i;) {
2056
+ for (var o in r = h(i), r) r[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && n.push(o);
2057
+ i = v(i);
2058
+ }
2059
+ return n;
2060
+ }
2061
+ function ai(e, t) {
2062
+ return e === t || e?.[M] === t;
2063
+ }
2064
+ function oi(e = {}, t, n, r) {
2065
+ var i = L.r, a = Y;
2066
+ return yn(() => {
2067
+ var o, s;
2068
+ return xn(() => {
2069
+ o = s, s = r?.() || [], ir(() => {
2070
+ ai(n(...s), e) || (t(e, ...s), o && ai(n(...o), e) && t(null, ...o));
2071
+ });
2072
+ }), () => {
2073
+ let r = a;
2074
+ for (; r !== i && r.parent !== null && r.parent.f & 33554432;) r = r.parent;
2075
+ let o = () => {
2076
+ s && ai(n(...s), e) && t(null, ...s);
2077
+ }, c = r.teardown;
2078
+ r.teardown = () => {
2079
+ o(), c?.();
2080
+ };
2081
+ };
2082
+ }), e;
2083
+ }
2084
+ function si(e, t, n, r) {
2085
+ var i = !Re || (n & 2) != 0, a = (n & 8) != 0, o = (n & 16) != 0, s = r, c = !0, l = void 0, u = () => o && i ? (l ??= /* @__PURE__ */ ut(r), Q(l)) : (c && (c = !1, s = o ? ir(r) : r), s);
2086
+ let d;
2087
+ if (a) {
2088
+ var f = M in e || N in e;
2089
+ d = m(e, t)?.set ?? (f && t in e ? (n) => e[t] = n : void 0);
2090
+ }
2091
+ var p, h = !1;
2092
+ a ? [p, h] = et(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), d && (i && be(t), d(p)));
2093
+ var g = i ? () => {
2094
+ var n = e[t];
2095
+ return n === void 0 ? u() : (c = !0, n);
2096
+ } : () => {
2097
+ var n = e[t];
2098
+ return n !== void 0 && (s = void 0), n === void 0 ? s : n;
2099
+ };
2100
+ if (i && !(n & 4)) return g;
2101
+ if (d) {
2102
+ var _ = e.$$legacy;
2103
+ return (function(e, t) {
2104
+ return arguments.length > 0 ? ((!i || !t || _ || h) && d(t ? g() : e), e) : g();
2105
+ });
2106
+ }
2107
+ var v = !1, y = (n & 1 ? ut : pt)(() => (v = !1, g()));
2108
+ a && Q(y);
2109
+ var ee = Y;
2110
+ return (function(e, t) {
2111
+ if (arguments.length > 0) {
2112
+ let n = t ? Q(y) : i && a ? Jt(e) : e;
2113
+ return W(y, n), v = !0, s !== void 0 && (s = n), e;
2114
+ }
2115
+ return Ln && v || ee.f & 16384 ? y.v : Q(y);
2116
+ });
2117
+ }
2118
+ function ci(e) {
2119
+ return new li(e);
2120
+ }
2121
+ var li = class {
2122
+ #e;
2123
+ #t;
2124
+ constructor(e) {
2125
+ var t = /* @__PURE__ */ new Map(), n = (e, n) => {
2126
+ var r = /* @__PURE__ */ Ut(n, !1, !1);
2127
+ return t.set(e, r), r;
2128
+ };
2129
+ let r = new Proxy({
2130
+ ...e.props || {},
2131
+ $$events: {}
2132
+ }, {
2133
+ get(e, r) {
2134
+ return Q(t.get(r) ?? n(r, Reflect.get(e, r)));
2135
+ },
2136
+ has(e, r) {
2137
+ return r === N ? !0 : (Q(t.get(r) ?? n(r, Reflect.get(e, r))), Reflect.has(e, r));
2138
+ },
2139
+ set(e, r, i) {
2140
+ return W(t.get(r) ?? n(r, i), i), Reflect.set(e, r, i);
2141
+ }
2142
+ });
2143
+ this.#t = (e.hydrate ? Tr : wr)(e.component, {
2144
+ target: e.target,
2145
+ anchor: e.anchor,
2146
+ props: r,
2147
+ context: e.context,
2148
+ intro: e.intro ?? !1,
2149
+ recover: e.recover,
2150
+ transformError: e.transformError
2151
+ }), !Le && (!e?.props?.$$host || e.sync === !1) && At(), this.#e = r.$$events;
2152
+ for (let e of Object.keys(this.#t)) e === "$set" || e === "$destroy" || e === "$on" || p(this, e, {
2153
+ get() {
2154
+ return this.#t[e];
2155
+ },
2156
+ set(t) {
2157
+ this.#t[e] = t;
2158
+ },
2159
+ enumerable: !0
2160
+ });
2161
+ this.#t.$set = (e) => {
2162
+ Object.assign(r, e);
2163
+ }, this.#t.$destroy = () => {
2164
+ kr(this.#t);
2165
+ };
2166
+ }
2167
+ $set(e) {
2168
+ this.#t.$set(e);
2169
+ }
2170
+ $on(e, t) {
2171
+ this.#e[e] = this.#e[e] || [];
2172
+ let n = (...e) => t.call(this, ...e);
2173
+ return this.#e[e].push(n), () => {
2174
+ this.#e[e] = this.#e[e].filter((e) => e !== n);
2175
+ };
2176
+ }
2177
+ $destroy() {
2178
+ this.#t.$destroy();
2179
+ }
2180
+ }, ui;
2181
+ typeof HTMLElement == "function" && (ui = class extends HTMLElement {
2182
+ $$ctor;
2183
+ $$s;
2184
+ $$c;
2185
+ $$cn = !1;
2186
+ $$d = {};
2187
+ $$r = !1;
2188
+ $$p_d = {};
2189
+ $$l = {};
2190
+ $$l_u = /* @__PURE__ */ new Map();
2191
+ $$me;
2192
+ $$shadowRoot = null;
2193
+ constructor(e, t, n) {
2194
+ super(), this.$$ctor = e, this.$$s = t, n && (this.$$shadowRoot = this.attachShadow(n));
2195
+ }
2196
+ addEventListener(e, t, n) {
2197
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
2198
+ let n = this.$$c.$on(e, t);
2199
+ this.$$l_u.set(t, n);
2200
+ }
2201
+ super.addEventListener(e, t, n);
2202
+ }
2203
+ removeEventListener(e, t, n) {
2204
+ if (super.removeEventListener(e, t, n), this.$$c) {
2205
+ let e = this.$$l_u.get(t);
2206
+ e && (e(), this.$$l_u.delete(t));
2207
+ }
2208
+ }
2209
+ async connectedCallback() {
2210
+ if (this.$$cn = !0, !this.$$c) {
2211
+ if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2212
+ function e(e) {
2213
+ return (t) => {
2214
+ let n = cn("slot");
2215
+ e !== "default" && (n.name = e), br(t, n);
2216
+ };
2217
+ }
2218
+ let t = {}, n = fi(this);
2219
+ 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));
2220
+ for (let e of this.attributes) {
2221
+ let t = this.$$g_p(e.name);
2222
+ t in this.$$d || (this.$$d[t] = di(t, e.value, this.$$p_d, "toProp"));
2223
+ }
2224
+ for (let e in this.$$p_d) !(e in this.$$d) && this[e] !== void 0 && (this.$$d[e] = this[e], delete this[e]);
2225
+ this.$$c = ci({
2226
+ component: this.$$ctor,
2227
+ target: this.$$shadowRoot || this,
2228
+ props: {
2229
+ ...this.$$d,
2230
+ $$slots: t,
2231
+ $$host: this
2232
+ }
2233
+ }), this.$$me = _n(() => {
2234
+ xn(() => {
2235
+ this.$$r = !0;
2236
+ for (let e of f(this.$$c)) {
2237
+ if (!this.$$p_d[e]?.reflect) continue;
2238
+ this.$$d[e] = this.$$c[e];
2239
+ let t = di(e, this.$$d[e], this.$$p_d, "toAttribute");
2240
+ t == null ? this.removeAttribute(this.$$p_d[e].attribute || e) : this.setAttribute(this.$$p_d[e].attribute || e, t);
2241
+ }
2242
+ this.$$r = !1;
2243
+ });
2244
+ });
2245
+ for (let e in this.$$l) for (let t of this.$$l[e]) {
2246
+ let n = this.$$c.$on(e, t);
2247
+ this.$$l_u.set(t, n);
2248
+ }
2249
+ this.$$l = {};
2250
+ }
2251
+ }
2252
+ attributeChangedCallback(e, t, n) {
2253
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = di(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2254
+ }
2255
+ disconnectedCallback() {
2256
+ this.$$cn = !1, Promise.resolve().then(() => {
2257
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2258
+ });
2259
+ }
2260
+ $$g_p(e) {
2261
+ return f(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2262
+ }
2263
+ });
2264
+ function di(e, t, n, r) {
2265
+ let i = n[e]?.type;
2266
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e]) return t;
2267
+ if (r === "toAttribute") switch (i) {
2268
+ case "Object":
2269
+ case "Array": return t == null ? null : JSON.stringify(t);
2270
+ case "Boolean": return t ? "" : null;
2271
+ case "Number": return t ?? null;
2272
+ default: return t;
2273
+ }
2274
+ else switch (i) {
2275
+ case "Object":
2276
+ case "Array": return t && JSON.parse(t);
2277
+ case "Boolean": return t;
2278
+ case "Number": return t == null ? t : +t;
2279
+ default: return t;
2280
+ }
2281
+ }
2282
+ function fi(e) {
2283
+ let t = {};
2284
+ return e.childNodes.forEach((e) => {
2285
+ t[e.slot || "default"] = !0;
2286
+ }), t;
2287
+ }
2288
+ function pi(e, t, n, r, i, a) {
2289
+ let o = class extends ui {
2290
+ constructor() {
2291
+ super(e, n, i), this.$$p_d = t;
2292
+ }
2293
+ static get observedAttributes() {
2294
+ return f(t).map((e) => (t[e].attribute || e).toLowerCase());
2295
+ }
2296
+ };
2297
+ return f(t).forEach((e) => {
2298
+ p(o.prototype, e, {
2299
+ get() {
2300
+ return this.$$c && e in this.$$c ? this.$$c[e] : this.$$d[e];
2301
+ },
2302
+ set(n) {
2303
+ n = di(e, n, t), this.$$d[e] = n;
2304
+ var r = this.$$c;
2305
+ r && (m(r, e)?.get ? r[e] = n : r.$set({ [e]: n }));
2306
+ }
2307
+ });
2308
+ }), r.forEach((e) => {
2309
+ p(o.prototype, e, { get() {
2310
+ return this.$$c?.[e];
2311
+ } });
2312
+ }), a && (o = a(o)), e.element = o, o;
2313
+ }
2314
+ var mi = globalThis, hi = mi.ShadowRoot && (mi.ShadyCSS === void 0 || mi.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, gi = Symbol(), _i = /* @__PURE__ */ new WeakMap(), vi = class {
2315
+ constructor(e, t, n) {
2316
+ if (this._$cssResult$ = !0, n !== gi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
2317
+ this.cssText = e, this.t = t;
2318
+ }
2319
+ get styleSheet() {
2320
+ let e = this.o, t = this.t;
2321
+ if (hi && e === void 0) {
2322
+ let n = t !== void 0 && t.length === 1;
2323
+ n && (e = _i.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && _i.set(t, e));
2324
+ }
2325
+ return e;
2326
+ }
2327
+ toString() {
2328
+ return this.cssText;
2329
+ }
2330
+ }, yi = (e) => new vi(typeof e == "string" ? e : e + "", void 0, gi), bi = (e, t) => {
2331
+ if (hi) e.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
2332
+ else for (let n of t) {
2333
+ let t = document.createElement("style"), r = mi.litNonce;
2334
+ r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
2335
+ }
2336
+ }, xi = hi ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
2337
+ let t = "";
2338
+ for (let n of e.cssRules) t += n.cssText;
2339
+ return yi(t);
2340
+ })(e) : e, { is: Si, defineProperty: Ci, getOwnPropertyDescriptor: wi, getOwnPropertyNames: Ti, getOwnPropertySymbols: Ei, getPrototypeOf: Di } = Object, Oi = globalThis, ki = Oi.trustedTypes, Ai = ki ? ki.emptyScript : "", ji = Oi.reactiveElementPolyfillSupport, Mi = (e, t) => e, Ni = {
2341
+ toAttribute(e, t) {
2342
+ switch (t) {
2343
+ case Boolean:
2344
+ e = e ? Ai : null;
2345
+ break;
2346
+ case Object:
2347
+ case Array: e = e == null ? e : JSON.stringify(e);
2348
+ }
2349
+ return e;
2350
+ },
2351
+ fromAttribute(e, t) {
2352
+ let n = e;
2353
+ switch (t) {
2354
+ case Boolean:
2355
+ n = e !== null;
2356
+ break;
2357
+ case Number:
2358
+ n = e === null ? null : Number(e);
2359
+ break;
2360
+ case Object:
2361
+ case Array: try {
2362
+ n = JSON.parse(e);
2363
+ } catch {
2364
+ n = null;
2365
+ }
2366
+ }
2367
+ return n;
2368
+ }
2369
+ }, Pi = (e, t) => !Si(e, t), Fi = {
2370
+ attribute: !0,
2371
+ type: String,
2372
+ converter: Ni,
2373
+ reflect: !1,
2374
+ useDefault: !1,
2375
+ hasChanged: Pi
2376
+ };
2377
+ Symbol.metadata ??= Symbol("metadata"), Oi.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
2378
+ var Ii = class extends HTMLElement {
2379
+ static addInitializer(e) {
2380
+ this._$Ei(), (this.l ??= []).push(e);
2381
+ }
2382
+ static get observedAttributes() {
2383
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
2384
+ }
2385
+ static createProperty(e, t = Fi) {
2386
+ if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
2387
+ let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
2388
+ r !== void 0 && Ci(this.prototype, e, r);
2389
+ }
2390
+ }
2391
+ static getPropertyDescriptor(e, t, n) {
2392
+ let { get: r, set: i } = wi(this.prototype, e) ?? {
2393
+ get() {
2394
+ return this[t];
2395
+ },
2396
+ set(e) {
2397
+ this[t] = e;
2398
+ }
2399
+ };
2400
+ return {
2401
+ get: r,
2402
+ set(t) {
2403
+ let a = r?.call(this);
2404
+ i?.call(this, t), this.requestUpdate(e, a, n);
2405
+ },
2406
+ configurable: !0,
2407
+ enumerable: !0
2408
+ };
2409
+ }
2410
+ static getPropertyOptions(e) {
2411
+ return this.elementProperties.get(e) ?? Fi;
2412
+ }
2413
+ static _$Ei() {
2414
+ if (this.hasOwnProperty(Mi("elementProperties"))) return;
2415
+ let e = Di(this);
2416
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
2417
+ }
2418
+ static finalize() {
2419
+ if (this.hasOwnProperty(Mi("finalized"))) return;
2420
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Mi("properties"))) {
2421
+ let e = this.properties, t = [...Ti(e), ...Ei(e)];
2422
+ for (let n of t) this.createProperty(n, e[n]);
2423
+ }
2424
+ let e = this[Symbol.metadata];
2425
+ if (e !== null) {
2426
+ let t = litPropertyMetadata.get(e);
2427
+ if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
2428
+ }
2429
+ this._$Eh = /* @__PURE__ */ new Map();
2430
+ for (let [e, t] of this.elementProperties) {
2431
+ let n = this._$Eu(e, t);
2432
+ n !== void 0 && this._$Eh.set(n, e);
2433
+ }
2434
+ this.elementStyles = this.finalizeStyles(this.styles);
2435
+ }
2436
+ static finalizeStyles(e) {
2437
+ let t = [];
2438
+ if (Array.isArray(e)) {
2439
+ let n = new Set(e.flat(Infinity).reverse());
2440
+ for (let e of n) t.unshift(xi(e));
2441
+ } else e !== void 0 && t.push(xi(e));
2442
+ return t;
2443
+ }
2444
+ static _$Eu(e, t) {
2445
+ let n = t.attribute;
2446
+ return n === !1 ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
2447
+ }
2448
+ constructor() {
2449
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
2450
+ }
2451
+ _$Ev() {
2452
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
2453
+ }
2454
+ addController(e) {
2455
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
2456
+ }
2457
+ removeController(e) {
2458
+ this._$EO?.delete(e);
2459
+ }
2460
+ _$E_() {
2461
+ let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
2462
+ for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
2463
+ e.size > 0 && (this._$Ep = e);
2464
+ }
2465
+ createRenderRoot() {
2466
+ let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
2467
+ return bi(e, this.constructor.elementStyles), e;
2468
+ }
2469
+ connectedCallback() {
2470
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
2471
+ }
2472
+ enableUpdating(e) {}
2473
+ disconnectedCallback() {
2474
+ this._$EO?.forEach(((e) => e.hostDisconnected?.()));
2475
+ }
2476
+ attributeChangedCallback(e, t, n) {
2477
+ this._$AK(e, n);
2478
+ }
2479
+ _$ET(e, t) {
2480
+ let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
2481
+ if (r !== void 0 && n.reflect === !0) {
2482
+ let i = (n.converter?.toAttribute === void 0 ? Ni : n.converter).toAttribute(t, n.type);
2483
+ this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
2484
+ }
2485
+ }
2486
+ _$AK(e, t) {
2487
+ let n = this.constructor, r = n._$Eh.get(e);
2488
+ if (r !== void 0 && this._$Em !== r) {
2489
+ let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? Ni : e.converter;
2490
+ this._$Em = r;
2491
+ let a = i.fromAttribute(t, e.type);
2492
+ this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
2493
+ }
2494
+ }
2495
+ requestUpdate(e, t, n) {
2496
+ if (e !== void 0) {
2497
+ let r = this.constructor, i = this[e];
2498
+ if (n ??= r.getPropertyOptions(e), !((n.hasChanged ?? Pi)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(r._$Eu(e, n)))) return;
2499
+ this.C(e, t, n);
2500
+ }
2501
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
2502
+ }
2503
+ C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
2504
+ n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), i !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
2505
+ }
2506
+ async _$EP() {
2507
+ this.isUpdatePending = !0;
2508
+ try {
2509
+ await this._$ES;
2510
+ } catch (e) {
2511
+ Promise.reject(e);
2512
+ }
2513
+ let e = this.scheduleUpdate();
2514
+ return e != null && await e, !this.isUpdatePending;
2515
+ }
2516
+ scheduleUpdate() {
2517
+ return this.performUpdate();
2518
+ }
2519
+ performUpdate() {
2520
+ if (!this.isUpdatePending) return;
2521
+ if (!this.hasUpdated) {
2522
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
2523
+ for (let [e, t] of this._$Ep) this[e] = t;
2524
+ this._$Ep = void 0;
2525
+ }
2526
+ let e = this.constructor.elementProperties;
2527
+ if (e.size > 0) for (let [t, n] of e) {
2528
+ let { wrapped: e } = n, r = this[t];
2529
+ e !== !0 || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
2530
+ }
2531
+ }
2532
+ let e = !1, t = this._$AL;
2533
+ try {
2534
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((e) => e.hostUpdate?.())), this.update(t)) : this._$EM();
2535
+ } catch (t) {
2536
+ throw e = !1, this._$EM(), t;
2537
+ }
2538
+ e && this._$AE(t);
2539
+ }
2540
+ willUpdate(e) {}
2541
+ _$AE(e) {
2542
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
2543
+ }
2544
+ _$EM() {
2545
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
2546
+ }
2547
+ get updateComplete() {
2548
+ return this.getUpdateComplete();
2549
+ }
2550
+ getUpdateComplete() {
2551
+ return this._$ES;
2552
+ }
2553
+ shouldUpdate(e) {
2554
+ return !0;
2555
+ }
2556
+ update(e) {
2557
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
2558
+ }
2559
+ updated(e) {}
2560
+ firstUpdated(e) {}
2561
+ };
2562
+ Ii.elementStyles = [], Ii.shadowRootOptions = { mode: "open" }, Ii[Mi("elementProperties")] = /* @__PURE__ */ new Map(), Ii[Mi("finalized")] = /* @__PURE__ */ new Map(), ji?.({ ReactiveElement: Ii }), (Oi.reactiveElementVersions ??= []).push("2.1.1");
2563
+ var Li = globalThis, Ri = Li.trustedTypes, zi = Ri ? Ri.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Bi = "$lit$", Vi = `lit$${Math.random().toFixed(9).slice(2)}$`, Hi = "?" + Vi, Ui = `<${Hi}>`, Wi = document, Gi = () => Wi.createComment(""), Ki = (e) => e === null || typeof e != "object" && typeof e != "function", qi = Array.isArray, Ji = (e) => qi(e) || typeof e?.[Symbol.iterator] == "function", Yi = "[ \n\f\r]", Xi = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Zi = /-->/g, Qi = />/g, $i = RegExp(`>|${Yi}(?:([^\\s"'>=/]+)(${Yi}*=${Yi}*(?:[^
2564
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ea = /'/g, ta = /"/g, na = /^(?:script|style|textarea|title)$/i, ra = ((e) => (t, ...n) => ({
2565
+ _$litType$: e,
2566
+ strings: t,
2567
+ values: n
2568
+ }))(1), ia = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), aa = /* @__PURE__ */ new WeakMap(), oa = Wi.createTreeWalker(Wi, 129);
2569
+ function sa(e, t) {
2570
+ if (!qi(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
2571
+ return zi === void 0 ? t : zi.createHTML(t);
2572
+ }
2573
+ var ca = (e, t) => {
2574
+ let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = Xi;
2575
+ for (let t = 0; t < n; t++) {
2576
+ let n = e[t], s, c, l = -1, u = 0;
2577
+ for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === Xi ? c[1] === "!--" ? o = Zi : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = $i) : (na.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = $i) : o = Qi : o === $i ? c[0] === ">" ? (o = i ?? Xi, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? $i : c[3] === "\"" ? ta : ea) : o === ta || o === ea ? o = $i : o === Zi || o === Qi ? o = Xi : (o = $i, i = void 0);
2578
+ let d = o === $i && e[t + 1].startsWith("/>") ? " " : "";
2579
+ a += o === Xi ? n + Ui : l >= 0 ? (r.push(s), n.slice(0, l) + Bi + n.slice(l) + Vi + d) : n + Vi + (l === -2 ? t : d);
2580
+ }
2581
+ return [sa(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
2582
+ }, la = class e {
2583
+ constructor({ strings: t, _$litType$: n }, r) {
2584
+ let i;
2585
+ this.parts = [];
2586
+ let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = ca(t, n);
2587
+ if (this.el = e.createElement(l, r), oa.currentNode = this.el.content, n === 2 || n === 3) {
2588
+ let e = this.el.content.firstChild;
2589
+ e.replaceWith(...e.childNodes);
2590
+ }
2591
+ for (; (i = oa.nextNode()) !== null && c.length < s;) {
2592
+ if (i.nodeType === 1) {
2593
+ if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(Bi)) {
2594
+ let t = u[o++], n = i.getAttribute(e).split(Vi), r = /([.?@])?(.*)/.exec(t);
2595
+ c.push({
2596
+ type: 1,
2597
+ index: a,
2598
+ name: r[2],
2599
+ strings: n,
2600
+ ctor: r[1] === "." ? ma : r[1] === "?" ? ha : r[1] === "@" ? ga : pa
2601
+ }), i.removeAttribute(e);
2602
+ } else e.startsWith(Vi) && (c.push({
2603
+ type: 6,
2604
+ index: a
2605
+ }), i.removeAttribute(e));
2606
+ if (na.test(i.tagName)) {
2607
+ let e = i.textContent.split(Vi), t = e.length - 1;
2608
+ if (t > 0) {
2609
+ i.textContent = Ri ? Ri.emptyScript : "";
2610
+ for (let n = 0; n < t; n++) i.append(e[n], Gi()), oa.nextNode(), c.push({
2611
+ type: 2,
2612
+ index: ++a
2613
+ });
2614
+ i.append(e[t], Gi());
2615
+ }
2616
+ }
2617
+ } else if (i.nodeType === 8) if (i.data === Hi) c.push({
2618
+ type: 2,
2619
+ index: a
2620
+ });
2621
+ else {
2622
+ let e = -1;
2623
+ for (; (e = i.data.indexOf(Vi, e + 1)) !== -1;) c.push({
2624
+ type: 7,
2625
+ index: a
2626
+ }), e += Vi.length - 1;
2627
+ }
2628
+ a++;
2629
+ }
2630
+ }
2631
+ static createElement(e, t) {
2632
+ let n = Wi.createElement("template");
2633
+ return n.innerHTML = e, n;
2634
+ }
2635
+ };
2636
+ function ua(e, t, n = e, r) {
2637
+ if (t === ia) return t;
2638
+ let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = Ki(t) ? void 0 : t._$litDirective$;
2639
+ return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = ua(e, i._$AS(e, t.values), i, r)), t;
2640
+ }
2641
+ var da = class {
2642
+ constructor(e, t) {
2643
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
2644
+ }
2645
+ get parentNode() {
2646
+ return this._$AM.parentNode;
2647
+ }
2648
+ get _$AU() {
2649
+ return this._$AM._$AU;
2650
+ }
2651
+ u(e) {
2652
+ let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? Wi).importNode(t, !0);
2653
+ oa.currentNode = r;
2654
+ let i = oa.nextNode(), a = 0, o = 0, s = n[0];
2655
+ for (; s !== void 0;) {
2656
+ if (a === s.index) {
2657
+ let t;
2658
+ s.type === 2 ? t = new fa(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new _a(i, this, e)), this._$AV.push(t), s = n[++o];
2659
+ }
2660
+ a !== s?.index && (i = oa.nextNode(), a++);
2661
+ }
2662
+ return oa.currentNode = Wi, r;
2663
+ }
2664
+ p(e) {
2665
+ let t = 0;
2666
+ for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
2667
+ }
2668
+ }, fa = class e {
2669
+ get _$AU() {
2670
+ return this._$AM?._$AU ?? this._$Cv;
2671
+ }
2672
+ constructor(e, t, n, r) {
2673
+ this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
2674
+ }
2675
+ get parentNode() {
2676
+ let e = this._$AA.parentNode, t = this._$AM;
2677
+ return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
2678
+ }
2679
+ get startNode() {
2680
+ return this._$AA;
2681
+ }
2682
+ get endNode() {
2683
+ return this._$AB;
2684
+ }
2685
+ _$AI(e, t = this) {
2686
+ e = ua(this, e, t), Ki(e) ? e === $ || e == null || e === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : e !== this._$AH && e !== ia && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ji(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
2687
+ }
2688
+ O(e) {
2689
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
2690
+ }
2691
+ T(e) {
2692
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
2693
+ }
2694
+ _(e) {
2695
+ this._$AH !== $ && Ki(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Wi.createTextNode(e)), this._$AH = e;
2696
+ }
2697
+ $(e) {
2698
+ let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = la.createElement(sa(n.h, n.h[0]), this.options)), n);
2699
+ if (this._$AH?._$AD === r) this._$AH.p(t);
2700
+ else {
2701
+ let e = new da(r, this), n = e.u(this.options);
2702
+ e.p(t), this.T(n), this._$AH = e;
2703
+ }
2704
+ }
2705
+ _$AC(e) {
2706
+ let t = aa.get(e.strings);
2707
+ return t === void 0 && aa.set(e.strings, t = new la(e)), t;
2708
+ }
2709
+ k(t) {
2710
+ qi(this._$AH) || (this._$AH = [], this._$AR());
2711
+ let n = this._$AH, r, i = 0;
2712
+ for (let a of t) i === n.length ? n.push(r = new e(this.O(Gi()), this.O(Gi()), this, this.options)) : r = n[i], r._$AI(a), i++;
2713
+ i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
2714
+ }
2715
+ _$AR(e = this._$AA.nextSibling, t) {
2716
+ for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
2717
+ let t = e.nextSibling;
2718
+ e.remove(), e = t;
2719
+ }
2720
+ }
2721
+ setConnected(e) {
2722
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
2723
+ }
2724
+ }, pa = class {
2725
+ get tagName() {
2726
+ return this.element.tagName;
2727
+ }
2728
+ get _$AU() {
2729
+ return this._$AM._$AU;
2730
+ }
2731
+ constructor(e, t, n, r, i) {
2732
+ this.type = 1, this._$AH = $, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = $;
2733
+ }
2734
+ _$AI(e, t = this, n, r) {
2735
+ let i = this.strings, a = !1;
2736
+ if (i === void 0) e = ua(this, e, t, 0), a = !Ki(e) || e !== this._$AH && e !== ia, a && (this._$AH = e);
2737
+ else {
2738
+ let r = e, o, s;
2739
+ for (e = i[0], o = 0; o < i.length - 1; o++) s = ua(this, r[n + o], t, o), s === ia && (s = this._$AH[o]), a ||= !Ki(s) || s !== this._$AH[o], s === $ ? e = $ : e !== $ && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
2740
+ }
2741
+ a && !r && this.j(e);
2742
+ }
2743
+ j(e) {
2744
+ e === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
2745
+ }
2746
+ }, ma = class extends pa {
2747
+ constructor() {
2748
+ super(...arguments), this.type = 3;
2749
+ }
2750
+ j(e) {
2751
+ this.element[this.name] = e === $ ? void 0 : e;
2752
+ }
2753
+ }, ha = class extends pa {
2754
+ constructor() {
2755
+ super(...arguments), this.type = 4;
2756
+ }
2757
+ j(e) {
2758
+ this.element.toggleAttribute(this.name, !!e && e !== $);
2759
+ }
2760
+ }, ga = class extends pa {
2761
+ constructor(e, t, n, r, i) {
2762
+ super(e, t, n, r, i), this.type = 5;
2763
+ }
2764
+ _$AI(e, t = this) {
2765
+ if ((e = ua(this, e, t, 0) ?? $) === ia) return;
2766
+ let n = this._$AH, r = e === $ && n !== $ || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== $ && (n === $ || r);
2767
+ r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
2768
+ }
2769
+ handleEvent(e) {
2770
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
2771
+ }
2772
+ }, _a = class {
2773
+ constructor(e, t, n) {
2774
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
2775
+ }
2776
+ get _$AU() {
2777
+ return this._$AM._$AU;
2778
+ }
2779
+ _$AI(e) {
2780
+ ua(this, e);
2781
+ }
2782
+ }, va = Li.litHtmlPolyfillSupport;
2783
+ va?.(la, fa), (Li.litHtmlVersions ??= []).push("3.3.1");
2784
+ var ya = (e, t, n) => {
2785
+ let r = n?.renderBefore ?? t, i = r._$litPart$;
2786
+ if (i === void 0) {
2787
+ let e = n?.renderBefore ?? null;
2788
+ r._$litPart$ = i = new fa(t.insertBefore(Gi(), e), e, void 0, n ?? {});
2789
+ }
2790
+ return i._$AI(e), i;
2791
+ }, ba = globalThis, xa = class extends Ii {
2792
+ constructor() {
2793
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
2794
+ }
2795
+ createRenderRoot() {
2796
+ let e = super.createRenderRoot();
2797
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
2798
+ }
2799
+ update(e) {
2800
+ let t = this.render();
2801
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = ya(t, this.renderRoot, this.renderOptions);
2802
+ }
2803
+ connectedCallback() {
2804
+ super.connectedCallback(), this._$Do?.setConnected(!0);
2805
+ }
2806
+ disconnectedCallback() {
2807
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
2808
+ }
2809
+ render() {
2810
+ return ia;
2811
+ }
2812
+ };
2813
+ xa._$litElement$ = !0, xa.finalized = !0, ba.litElementHydrateSupport?.({ LitElement: xa });
2814
+ var Sa = ba.litElementPolyfillSupport;
2815
+ Sa?.({ LitElement: xa }), (ba.litElementVersions ??= []).push("4.2.1");
2816
+ var Ca = (e) => (t, n) => {
2817
+ n === void 0 ? customElements.get(e) || customElements.define(e, t) : n.addInitializer((() => {
2818
+ customElements.get(e) || customElements.define(e, t);
2819
+ }));
2820
+ }, wa = {
2821
+ attribute: !0,
2822
+ type: String,
2823
+ converter: Ni,
2824
+ reflect: !1,
2825
+ hasChanged: Pi
2826
+ }, Ta = (e = wa, t, n) => {
2827
+ let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
2828
+ if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
2829
+ let { name: r } = n;
2830
+ return {
2831
+ set(n) {
2832
+ let i = t.get.call(this);
2833
+ t.set.call(this, n), this.requestUpdate(r, i, e);
2834
+ },
2835
+ init(t) {
2836
+ return t !== void 0 && this.C(r, void 0, e, t), t;
2837
+ }
2838
+ };
2839
+ }
2840
+ if (r === "setter") {
2841
+ let { name: r } = n;
2842
+ return function(n) {
2843
+ let i = this[r];
2844
+ t.call(this, n), this.requestUpdate(r, i, e);
2845
+ };
2846
+ }
2847
+ throw Error("Unsupported decorator location: " + r);
2848
+ };
2849
+ function Ea(e) {
2850
+ return (t, n) => typeof n == "object" ? Ta(e, t, n) : ((e, t, n) => {
2851
+ let r = t.hasOwnProperty(n);
2852
+ return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
2853
+ })(e, t, n);
2854
+ }
2855
+ var Da = Object.defineProperty, Oa = Object.getOwnPropertyDescriptor, ka = (e, t, n, r) => {
2856
+ for (var i = r > 1 ? void 0 : r ? Oa(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
2857
+ return r && i && Da(t, n, i), i;
2858
+ }, Aa = class extends xa {
2859
+ constructor() {
2860
+ super(...arguments), this.variant = "primary", this.size = "default", this.type = "circle", this.state = "default", this.iconName = "home", this.disabled = !1, this.buttonAriaLabel = "Icon button";
2861
+ }
2862
+ createRenderRoot() {
2863
+ return this;
2864
+ }
2865
+ connectedCallback() {
2866
+ if (super.connectedCallback(), !document.querySelector("link[href*=\"Roboto\"]")) {
2867
+ let e = document.createElement("link");
2868
+ e.rel = "stylesheet", e.href = "https://ui.renaissance.com/fonts/Roboto/style.css", document.head.appendChild(e);
2869
+ }
2870
+ }
2871
+ set shape(e) {
2872
+ this.type = e;
2873
+ }
2874
+ get shape() {
2875
+ return this.type;
2876
+ }
2877
+ get buttonClasses() {
2878
+ return [
2879
+ "nds-icon-button",
2880
+ `nds-icon-button--${this.variant}`,
2881
+ `nds-icon-button--${this.size}`,
2882
+ `nds-icon-button--${this.type}`,
2883
+ this.state === "default" ? "" : `nds-icon-button--${this.state}`,
2884
+ this.disabled ? "nds-icon-button--disabled" : ""
2885
+ ].filter(Boolean).join(" ");
2886
+ }
2887
+ handleClick(e) {
2888
+ if (this.disabled) {
2889
+ e.preventDefault(), e.stopPropagation();
2890
+ return;
2891
+ }
2892
+ this.dispatchEvent(new CustomEvent("icon-button-click", {
2893
+ bubbles: !0,
2894
+ composed: !0,
2895
+ detail: { originalEvent: e }
2896
+ }));
2897
+ }
2898
+ render() {
2899
+ return ra`
2900
+ <style>
2901
+ nds-icon-button {
2902
+ display: inline-block;
2903
+ }
2904
+
2905
+ .nds-icon-button {
2906
+ display: inline-flex;
2907
+ align-items: center;
2908
+ justify-content: center;
2909
+ cursor: pointer;
2910
+ font-family: var(--font-family-roboto, "Roboto", sans-serif);
2911
+ font-weight: var(--font-weight-regular, 400);
2912
+ line-height: 1;
2913
+ text-decoration: none;
2914
+ background: none;
2915
+ position: relative;
2916
+ box-sizing: border-box;
2917
+ margin: 0;
2918
+ padding: 0;
2919
+ border: none;
2920
+ transition: background-color 0.2s ease-in-out,
2921
+ color 0.2s ease-in-out,
2922
+ box-shadow 0.2s ease-in-out;
2923
+ }
2924
+
2925
+ /* ── Sizes ── */
2926
+ .nds-icon-button--small {
2927
+ width: var(--height-32, 32px);
2928
+ height: var(--height-32, 32px);
2929
+ }
2930
+
2931
+ .nds-icon-button--medium {
2932
+ width: var(--height-36, 36px);
2933
+ height: var(--height-36, 36px);
2934
+ }
2935
+
2936
+ .nds-icon-button--default {
2937
+ width: var(--height-40, 40px);
2938
+ height: var(--height-40, 40px);
2939
+ }
2940
+
2941
+ .nds-icon-button--large {
2942
+ width: var(--height-48, 48px);
2943
+ height: var(--height-48, 48px);
2944
+ }
2945
+
2946
+ /* ── Shapes ── */
2947
+ .nds-icon-button--circle {
2948
+ border-radius: var(--radius-circle, 50%);
2949
+ }
2950
+
2951
+ .nds-icon-button--rounded {
2952
+ border-radius: var(--radius-8, 8px);
2953
+ }
2954
+
2955
+ /* ── Primary ── */
2956
+ .nds-icon-button--primary {
2957
+ background-color: var(--color-interactive-blue, #146eb3);
2958
+ color: var(--color-primary-white, #ffffff);
2959
+ }
2960
+
2961
+ .nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2962
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2963
+ }
2964
+
2965
+ .nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
2966
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2967
+ }
2968
+
2969
+ /* ── Secondary ── */
2970
+ .nds-icon-button--secondary {
2971
+ background-color: var(--color-primary-white, #ffffff);
2972
+ color: var(--color-interactive-blue, #146eb3);
2973
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
2974
+ }
2975
+
2976
+ .nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2977
+ background-color: var(--color-interactive-blue, #146eb3);
2978
+ color: var(--color-primary-white, #ffffff);
2979
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2980
+ }
2981
+
2982
+ .nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
2983
+ background-color: var(--color-interactive-blue, #146eb3);
2984
+ color: var(--color-primary-white, #ffffff);
2985
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
2986
+ }
2987
+
2988
+ /* ── Tertiary ── */
2989
+ .nds-icon-button--tertiary {
2990
+ background-color: var(--color-new-gray, #f3f5f7);
2991
+ color: var(--color-interactive-blue, #146eb3);
2992
+ }
2993
+
2994
+ .nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
2995
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
2996
+ }
2997
+
2998
+ .nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
2999
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
3000
+ }
3001
+
3002
+ /* ── Ghost ── */
3003
+ .nds-icon-button--ghost {
3004
+ background-color: transparent;
3005
+ color: var(--color-interactive-blue, #146eb3);
3006
+ }
3007
+
3008
+ .nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
3009
+ background-color: var(--color-new-gray, #f3f5f7);
3010
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
3011
+ }
3012
+
3013
+ .nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
3014
+ background-color: var(--color-new-gray, #f3f5f7);
3015
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
3016
+ }
3017
+
3018
+ /* ── Dark (for dark backgrounds) ── */
3019
+ .nds-icon-button--dark {
3020
+ background-color: transparent;
3021
+ color: var(--color-primary-white, #ffffff);
3022
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
3023
+ }
3024
+
3025
+ .nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
3026
+ background-color: var(--color-interactive-blue, #146eb3);
3027
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
3028
+ }
3029
+
3030
+ .nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
3031
+ background-color: var(--color-interactive-blue, #146eb3);
3032
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
3033
+ }
3034
+
3035
+ /* ── Disabled ── */
3036
+ .nds-icon-button--disabled,
3037
+ .nds-icon-button:disabled {
3038
+ opacity: 0.5;
3039
+ cursor: not-allowed;
3040
+ }
3041
+
3042
+ /* ── Icon sizing ── */
3043
+ .nds-icon-button__icon {
3044
+ line-height: 1;
3045
+ display: inline-flex;
3046
+ align-items: center;
3047
+ justify-content: center;
3048
+ color: inherit;
3049
+ }
3050
+
3051
+ .nds-icon-button--small .nds-icon-button__icon {
3052
+ font-size: var(--nds-icon-small, 12px);
3053
+ }
3054
+
3055
+ .nds-icon-button--medium .nds-icon-button__icon {
3056
+ font-size: var(--nds-icon-medium, 14px);
3057
+ }
3058
+
3059
+ .nds-icon-button--default .nds-icon-button__icon {
3060
+ font-size: var(--nds-icon-default, 16px);
3061
+ }
3062
+
3063
+ .nds-icon-button--large .nds-icon-button__icon {
3064
+ font-size: var(--nds-icon-large, 20px);
3065
+ }
3066
+
3067
+ /* ── Focus ── */
3068
+ .nds-icon-button:focus-visible {
3069
+ outline: 2px solid var(--color-focus-blue, #2b87ff);
3070
+ outline-offset: 2px;
3071
+ }
3072
+
3073
+ /* ── Reduced motion ── */
3074
+ @media (prefers-reduced-motion: reduce) {
3075
+ .nds-icon-button {
3076
+ transition: none;
3077
+ }
3078
+ }
3079
+ </style>
3080
+ <button
3081
+ type="button"
3082
+ class="${this.buttonClasses}"
3083
+ ?disabled="${this.disabled}"
3084
+ aria-disabled="${this.disabled ? "true" : "false"}"
3085
+ aria-label="${this.buttonAriaLabel}"
3086
+ @click="${this.handleClick}"
3087
+ >
3088
+ <i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
3089
+ </button>
3090
+ `;
3091
+ }
3092
+ };
3093
+ ka([Ea()], Aa.prototype, "variant", 2), ka([Ea()], Aa.prototype, "size", 2), ka([Ea()], Aa.prototype, "type", 2), ka([Ea()], Aa.prototype, "state", 2), ka([Ea({ attribute: "icon-name" })], Aa.prototype, "iconName", 2), ka([Ea({ type: Boolean })], Aa.prototype, "disabled", 2), ka([Ea({ attribute: "button-aria-label" })], Aa.prototype, "buttonAriaLabel", 2), ka([Ea()], Aa.prototype, "shape", 1), Aa = ka([Ca("nds-icon-button")], Aa);
3094
+ var ja = {
3095
+ maxZoom: 2,
3096
+ minCompensation: .25
3097
+ };
3098
+ function Ma(e, t) {
3099
+ let n = e / t;
3100
+ return Number.isFinite(n) && n > 0 ? n : 1;
3101
+ }
3102
+ function Na(e, t, n) {
3103
+ return Math.max(n, Math.min(1, t / e));
3104
+ }
3105
+ function Pa(e) {
3106
+ let { maxZoom: t, minCompensation: n } = e, r = /* @__PURE__ */ U(1), i = /* @__PURE__ */ U(1);
3107
+ function a() {
3108
+ let e = Ma(window.outerWidth, window.innerWidth);
3109
+ W(i, e, !0), W(r, Na(e, t, n), !0);
3110
+ }
3111
+ return hn(() => {
3112
+ if (!(typeof window > "u")) return a(), window.addEventListener("resize", a), () => window.removeEventListener("resize", a);
3113
+ }), {
3114
+ get current() {
3115
+ return Q(r);
3116
+ },
3117
+ get zoom() {
3118
+ return Q(i);
3119
+ }
3120
+ };
3121
+ }
3122
+ var Fa = /* @__PURE__ */ vr("<nds-icon-button></nds-icon-button>", 2), Ia = /* @__PURE__ */ vr("<button type=\"button\"><i aria-hidden=\"true\"></i></button>"), La = /* @__PURE__ */ vr("<span class=\"pie-tool-tts-inline__trigger-zoom svelte-18mzc0g\"><!></span>"), Ra = /* @__PURE__ */ vr("<button type=\"button\" role=\"radio\" data-pie-tts-control=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-18mzc0g\"><span class=\"pie-tool-tts-inline__speed-label svelte-18mzc0g\"> </span></button>"), za = /* @__PURE__ */ vr("<div role=\"radiogroup\" aria-label=\"Playback speed\"></div>"), Ba = /* @__PURE__ */ vr("<div role=\"toolbar\" aria-label=\"Reading controls\" tabindex=\"-1\"><!> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-seek=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\" aria-label=\"Rewind\"><i class=\"fa-solid fa-backward pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-seek=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\" aria-label=\"Fast-forward\"><i class=\"fa-solid fa-forward pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button> <button type=\"button\" data-pie-tts-control=\"\" data-pie-tts-media=\"\" data-pie-tts-stop=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--secondary svelte-18mzc0g\" aria-label=\"Stop reading\"><i class=\"fa-solid fa-stop pie-tool-tts-inline__icon svelte-18mzc0g\" aria-hidden=\"true\"></i></button></div>"), Va = /* @__PURE__ */ vr("<!> <!>", 1), Ha = /* @__PURE__ */ vr("<div><!> <div class=\"pie-sr-only svelte-18mzc0g\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"> </div></div>"), Ua = {
3123
+ hash: "svelte-18mzc0g",
3124
+ code: "\n /* Lay the component out as a flex box, not the default inline custom element.\n As `display: inline` the host is blockified into a block flex item that\n wraps its content in a line box, so the inline-flex root sits on the text\n baseline — a zoom-shrunk play button then rides that baseline and drifts\n LOW versus the calculator button (whose flex-item wrapper has no line box).\n inline-flex + center removes the line box and keeps the trigger centered. */:host {display:inline-flex;align-items:center;}.pie-tool-tts-inline.svelte-18mzc0g {position:relative;display:inline-flex;align-items:center;\n /* Gap between trigger and panel lives outside the zoomed buttons, so it\n is compensated separately or it keeps growing with browser zoom. */gap:calc(0.5rem * var(--pie-tts-zoom-comp, 1));}.pie-tool-tts-inline--controls-row.svelte-18mzc0g {width:100%;justify-content:flex-end;}\n\n /* The play/pause trigger and the \"more\" overflow control are now\n <nds-icon-button> hosts; the NDS component owns their shape, colours,\n hover/active/focus states, and the filled active (`variant=\"primary\"`)\n appearance. This class only drives the host's size via NDS's own size\n custom properties (see the size variants below), so the light-DOM inner\n button matches the toolbar's md/sm/lg dimensions. */\n /* Freeze the play/pause button at its 200%-zoom appearance (factor is 1 at\n zoom <= 200%, so behaviour below that is unchanged). The zoom goes on this\n wrapper, not the nds-icon-button host — see the snippet. */.pie-tool-tts-inline__trigger-zoom.svelte-18mzc0g {display:inline-flex;zoom:var(--pie-tts-zoom-comp, 1);}.pie-tool-tts-inline__trigger.svelte-18mzc0g {display:inline-flex;\n /* Outer button size follows the toolbar size variants (below); the glyph\n keeps the NDS-native icon size (size=\"small\") so it isn't oversized. */--height-32: 2rem;\n /* Host-settable accent: the NDS tertiary glyph colour derives from\n --color-interactive-blue, remapped here to a themeable variable. */--color-interactive-blue: var(--pie-tts-button-color, #146eb3);}\n\n /* Non-NDS fallback trigger (host opted out of nds-icon-button). Inherits\n the plain `__control` box; only override to keep the round trigger\n shape and the themeable accent colour on its glyph. */.pie-tool-tts-inline__trigger--plain.svelte-18mzc0g {border-radius:50%;color:var(--pie-tts-button-color, #146eb3);}\n\n /* Active/open trigger hooks (PIE-727).\n ---------------------------------------------------------------------------\n README documents --pie-tool-trigger-active-background / -color /\n -border-color as the supported way to style this trigger while its panel is\n open, instead of overriding broad tokens like --pie-primary. The component\n had stopped honouring all three, so a host following the docs got nothing.\n These rules restore them, matching how tool-calculator-inline-desmos wires\n the same three hooks.\n ---------------------------------------------------------------------------\n Every fallback is the value this element already resolves to when the hook\n is unset, so adding these rules changes nothing by default. That is\n deliberate: unlike the calculator, this trigger has never had a filled\n active look, and introducing one here would restyle the control for every\n host. Hosts opt in by setting a hook; nobody is opted in by us.\n\n Keyed off [aria-expanded='true'], which the markup already maintains, so\n there is no new state to keep in sync. */.pie-tool-tts-inline__trigger--plain[aria-expanded=\"true\"].svelte-18mzc0g {\n /* All three fallbacks are `__control`'s chains, including the glyph colour.\n Not `--plain`'s: that rule also declares `color`, but `__control` repeats\n it further down the sheet at equal specificity, so `__control` wins and\n `--plain`'s accent colour never applies. Falling back to the accent here\n would therefore have turned the glyph blue on open -- a visible change\n for every host, which is exactly what these fallbacks exist to avoid.\n Measured in Chromium: the plain trigger's glyph is the dark\n --pie-button-color, not the #146eb3 accent. */background:var(\n --pie-tool-trigger-active-background,\n var(--pie-button-background-color, var(--pie-button-bg, var(--pie-background, #fff)))\n );color:var(\n --pie-tool-trigger-active-color,\n var(--pie-button-color, var(--pie-text, #222))\n );border-color:var(\n --pie-tool-trigger-active-border-color,\n var(--pie-button-border-color, var(--pie-button-border, var(--pie-border, #c6c6c6)))\n );}\n\n /* NDS variant: its glyph colour derives from --color-interactive-blue, so the\n accent is remapped rather than painted, exactly as the base rule does. Only\n the foreground hook applies -- background and border are owned by the NDS\n button's own internals, and setting them on this host element would paint a\n box the tertiary button does not currently have. */.pie-tool-tts-inline__trigger:not(.pie-tool-tts-inline__trigger--plain)[aria-expanded=\"true\"].svelte-18mzc0g {--color-interactive-blue: var(\n --pie-tool-trigger-active-color,\n var(--pie-tts-button-color, #146eb3)\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__control.svelte-18mzc0g:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.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);}\n\n /* Activating play/pause deliberately KEEPS focus on the trigger while the\n controls panel opens beside it, so where focus sits has to stay visible —\n including after a pointer activation, where the browser suppresses\n :focus-visible and would paint no ring at all. Scoped to\n `:focus:not(:focus-visible)` so it only fills that gap: genuine keyboard\n focus keeps whatever the shared `__control` rule (plain trigger) or the NDS\n component (nds-icon-button) already paints, untouched.\n Two selectors because the two trigger variants focus different nodes: the\n plain fallback IS the button, while <nds-icon-button> holds focus on an\n inner light-DOM <button> that Lit creates — so it carries no Svelte scoping\n class and must be reached with :global(). */.pie-tool-tts-inline__trigger.svelte-18mzc0g:focus:not(:focus-visible),\n .pie-tool-tts-inline__trigger.svelte-18mzc0g button:focus:not(:focus-visible) {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;}.pie-tool-tts-inline__panel.svelte-18mzc0g {display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;\n /* Buttons inside are zoom-capped (see __control); compensate the panel's\n own spacing/height with the same factor so its chrome doesn't keep\n growing around the frozen buttons past 200%. */gap:calc(0.25rem * var(--pie-tts-zoom-comp, 1));box-sizing:border-box;min-height:calc(var(--pie-tts-controls-row-height, 2.875rem) * var(--pie-tts-zoom-comp, 1));padding:calc(0.25rem * var(--pie-tts-zoom-comp, 1)) calc(0.5rem * var(--pie-tts-zoom-comp, 1));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:50%;right:0;left:auto;}.pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g {\n /* Fixed so it escapes overflow-clipping ancestors; top / right /\n max-width are set inline by measureLeftAlignedOverlay(). */position:fixed;}.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;\n /* Cap each control (rewind / fast-forward / stop / speed) at its\n 200%-zoom size; matches the trigger and the passage/questions toggle. */zoom:var(--pie-tts-zoom-comp, 1);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;}\n\n /* Icon-only panel controls (rewind / fast-forward / stop) are round to match\n the circular NDS trigger; the pill-shaped speed radios keep square corners. */.pie-tool-tts-inline__control--secondary.svelte-18mzc0g {border-radius:50%;}.pie-tool-tts-inline__speed-group.svelte-18mzc0g {display:inline-flex;flex-wrap:wrap;align-items:center;gap:calc(0.25rem * var(--pie-tts-zoom-comp, 1));}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {width:auto;height:2rem;padding:0;font-size:1rem;font-weight:500;letter-spacing:0;white-space:nowrap;}.pie-tool-tts-inline__control--speed[aria-checked='true'].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__speed-label.svelte-18mzc0g {line-height:1.2;\n /* Render speed labels lowercase regardless of the configured casing.\n Applied to the visible text only; the radio's accessible name comes\n from aria-label (option.ariaLabel), so screen readers still hear the\n canonical \"Slow speed\" / \"Normal speed\" / \"Fast speed\". */text-transform:lowercase;}\n\n /* Reserve the bold (selected) width — stacked popper only. Switching the\n selected speed there would otherwise change the label width and resize the\n fit-content card. The ghost is a zero-height, hidden grid row whose bold text\n sets the column width. The inline (roomy) row keeps its natural sizing. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__speed-label:where(.svelte-18mzc0g) {display:inline-grid;justify-items:center;}.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__speed-label:where(.svelte-18mzc0g)::before {content:attr(data-label);height:0;overflow:hidden;font-weight:700;visibility:hidden;}.pie-tool-tts-inline__control.svelte-18mzc0g:disabled {cursor:not-allowed;opacity:0.6;}\n\n /* ── Overlay layouts (floating-overlay + left-aligned) ──────────────────────\n Per the Knowledge-Check design the controls sit transparently on the\n surrounding Question/Passage header: no panel chrome, media controls are\n accent-blue icon-only glyphs, and the speed radios are plain muted text with\n the selected one lifted into a white chip. The accent stays the same\n host-settable variable as the play/pause + calculator buttons\n (--pie-tts-button-color). Themeable knobs: --pie-tts-inline-muted-color,\n --pie-tts-selected-bg/-border/-shadow, --pie-tts-menu-shadow,\n --pie-tts-trigger-shadow. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g,\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g {min-height:0;height:calc(3rem * var(--pie-tts-zoom-comp, 1)); /* Figma: 48px */justify-content:center;gap:calc(0.375rem * var(--pie-tts-zoom-comp, 1));background:var(--pie-tts-selected-bg, #fff);border:0;border-radius:0.5rem; /* Figma: --radius-8 (8px) */box-shadow:var(--pie-tts-menu-shadow, 0 1px 5px 0 rgba(0, 0, 0, 0.3));}\n\n /* Compact: the popper card holds the media row (rewind / fast-forward / stop)\n on top and the speed radios stacked below. The white card bg + shadow come\n from the shared overlay rule above; this only tunes the compact layout. */.pie-tool-tts-inline__panel--compact.svelte-18mzc0g {gap:0;width:fit-content;min-width:calc(7.5rem * var(--pie-tts-zoom-comp, 1)); /* ~120px floor; grows with content beyond that */height:auto; /* stacked popper grows past the 48px roomy toolbar height */padding:0;}\n\n /* Media controls (rewind / fast-forward / stop): accent-blue, no chrome. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g) {border:0;background:transparent;color:var(--pie-tts-button-color, #146eb3);}.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--secondary:where(.svelte-18mzc0g):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, #146eb3) 12%, transparent);}\n\n /* Speed radios (inline / roomy): plain muted text with breathing room between\n options — min-width + side padding, matching the original inline spacing. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {min-width:2.75rem;padding:0 0.625rem;border:1px solid transparent;background:transparent;box-shadow:none;color:var(--pie-tts-inline-muted-color, #5b6b73);font-size:1rem;}.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, #146eb3) 8%, transparent);}\n\n /* Selected inline radio: white \"chip\" treatment. Placed after the muted rule\n so it wins at equal specificity. */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g) {border:1px solid var(--pie-selected-button-border, #d9dada);border-radius:6px;background:var(--pie-selected-button-background, #f3f5f7);color:var(--pie-tts-button-color, #146eb3);font-weight:600;}\n\n /* ── Compact left-aligned overlay ───────────────────────────────────────────\n Inside the popper card the media controls occupy the top row and the speed\n radios drop onto their own full-width line below, stacked vertically.\n `order` puts the speeds after the media buttons even though they are first in\n the DOM; flex-basis:100% forces the wrap so media occupy the top line. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g {order:1;flex-basis:100%;flex-direction:column;align-items:center;gap:0.125rem;}\n\n /* In the card every option reads in the accent colour; the selected one is\n lifted into a bordered white chip. Options size to their content and centre\n (no full-width stretch), keeping the popper compact. */.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {justify-content:center;width:auto;min-width:0;height:auto;padding:0.25rem 0.75rem;border:1px solid transparent;border-radius:0.5rem;background:transparent;box-shadow:none;color:var(--pie-tts-button-color, #146eb3);font-size:0.75rem;font-weight:500;}.pie-tool-tts-inline__speed-group--stacked.svelte-18mzc0g .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-18mzc0g) {border:1px solid var(--pie-selected-button-border, #d9dada);border-radius:6px;background:var(--pie-selected-button-background, #f3f5f7);color:var(--pie-tts-button-color, #146eb3);font-weight:700;}\n\n /* Trigger size variants set the NDS outer size (--height-32); the glyph keeps\n the NDS-native icon size (host renders size=\"small\"). */.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g {--height-32: 1.75rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g {--height-32: 2rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g {--height-32: 2.5rem;}.pie-tool-tts-inline__icon.svelte-18mzc0g {font-size:1rem;line-height:1;color:currentColor;}\n\n @media (max-width: 839px) {.pie-tool-tts-inline.svelte-18mzc0g {gap:0.375rem;}.pie-tool-tts-inline__panel--compact.svelte-18mzc0g {padding:0;}\n\n /* NOTE: the trigger's --height-32 is intentionally NOT shrunk here. Browser\n zoom narrows the CSS viewport enough to trip this breakpoint, which would\n drop the play button to 1.75rem while the calculator button (furnished by\n the toolbar) stays 2rem, mismatching them under zoom. Size is governed by\n the zoom-compensation cap instead. */.pie-tool-tts-inline__control.svelte-18mzc0g {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__control.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {font-size:1rem;}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {width:auto;min-width:2.5rem;height:1.75rem;padding:0 0.5rem;}\n\n /* drop font-size on smaller screens */.pie-tool-tts-inline__panel--floating.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-18mzc0g .pie-tool-tts-inline__control--speed:where(.svelte-18mzc0g) {font-size:0.75rem;}\n }.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__control.svelte-18mzc0g {transition:none !important;}\n }"
3125
+ };
3126
+ function Wa(a, o) {
3127
+ Be(o, !0), Vr(a, Ua);
3128
+ let s = si(o, "catalogId", 7, ""), c = si(o, "language", 7, "en-US"), l = si(o, "size", 7, "md"), u = si(o, "speedOptions", 7, void 0), d = si(o, "showSingleSpeedOption", 7, !1), f = si(o, "layoutMode", 7, "expanding-row"), p = typeof window < "u", m = "__pie_tts_inline_active_owner__", h = "pie-tts-inline-owner-change", g = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"], _ = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css", v = /font.?awesome|fa-?pro/i, y = !1, ee = () => {
3129
+ if (!(!p || y)) {
3130
+ if (y = !0, !document.querySelector("link[href*=\"Roboto\"]")) {
3131
+ let e = document.createElement("link");
3132
+ e.rel = "stylesheet", e.href = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap", document.head.appendChild(e);
3133
+ }
3134
+ if (!Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).some((e) => v.test(e.href))) {
3135
+ if (!document.querySelector(`link[href="${_}"]`)) {
3136
+ let e = document.createElement("link");
3137
+ e.rel = "stylesheet", e.href = _, document.head.appendChild(e);
3138
+ }
3139
+ for (let e of g) {
3140
+ if (document.querySelector(`link[href="${e}"]`)) continue;
3141
+ let t = document.createElement("link");
3142
+ t.rel = "stylesheet", t.href = e, document.head.appendChild(t);
3143
+ }
3144
+ }
3145
+ }
3146
+ }, b = "__pieFaTtsShadowInstalled", x = (e) => {
3147
+ let t = e.getRootNode();
3148
+ if (!(t instanceof ShadowRoot)) return;
3149
+ let n = t;
3150
+ if (n[b]) return;
3151
+ n[b] = !0;
3152
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
3153
+ if (!e || r.has(e)) return;
3154
+ r.add(e);
3155
+ let n = document.createElement("link");
3156
+ n.rel = "stylesheet", n.href = e, t.appendChild(n);
3157
+ }, a = Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).filter((e) => v.test(e.href));
3158
+ for (let e of a) i(e.href);
3159
+ }, S = (e) => {
3160
+ ee(), x(e);
3161
+ let t = () => {
3162
+ for (let t of e.querySelectorAll("i.fa-light")) t.classList.remove("fa-light"), t.classList.add("fa-solid");
3163
+ };
3164
+ t();
3165
+ let n = new MutationObserver(t);
3166
+ return n.observe(e, {
3167
+ childList: !0,
3168
+ subtree: !0,
3169
+ attributes: !0,
3170
+ attributeFilter: ["class"]
3171
+ }), { destroy() {
3172
+ n.disconnect();
3173
+ } };
3174
+ }, C = (e, t) => {
3175
+ let n = t, r = () => {
3176
+ let t = e.querySelector("button");
3177
+ if (t) for (let [e, r] of Object.entries(n)) r == null ? t.removeAttribute(e) : t.setAttribute(e, r);
3178
+ };
3179
+ r();
3180
+ let i = new MutationObserver(r);
3181
+ return i.observe(e, {
3182
+ childList: !0,
3183
+ subtree: !0
3184
+ }), {
3185
+ update(e) {
3186
+ n = e, r();
3187
+ },
3188
+ destroy() {
3189
+ i.disconnect();
3190
+ }
3191
+ };
3192
+ }, te = (e) => (ee(), x(e), {}), w = /* @__PURE__ */ U(void 0), T = /* @__PURE__ */ U(void 0), E = /* @__PURE__ */ U(null), ne = /* @__PURE__ */ B(() => Q(E)?.ndsIcons === !0), D = /* @__PURE__ */ U(null), re = /* @__PURE__ */ U(null), O = /* @__PURE__ */ B(() => Q(E)?.ttsService), k = /* @__PURE__ */ B(() => Q(E)?.highlightCoordinator), ie = /* @__PURE__ */ B(() => Q(re)?.scopeElement || Q(D)?.scopeElement || null), A = /* @__PURE__ */ U(!1), ae = /* @__PURE__ */ U(!1), j = /* @__PURE__ */ U(!1), M = /* @__PURE__ */ U(!1), N = /* @__PURE__ */ U(""), oe = /* @__PURE__ */ U(null), se = /* @__PURE__ */ U(null), ce = /* @__PURE__ */ U(!1), le = /* @__PURE__ */ U(!1), ue = null, de = /* @__PURE__ */ B(() => t(u())), fe = /* @__PURE__ */ B(() => we(Q(de))), pe = /* @__PURE__ */ B(() => Q(de).length > 1 || d() ? Q(de) : []), me = /* @__PURE__ */ B(() => Q(oe) !== null && Q(se) === Q(fe) && Q(de).some((e) => e.rate === Q(oe)) ? Q(oe) : Te(Q(de))), he = `pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`, ge = `pie-tts-inline-${Math.random().toString(36).slice(2)}`, _e = `${he}-controls`;
3193
+ function ve() {
3194
+ if (!p) return null;
3195
+ let e = window[m];
3196
+ return typeof e == "string" ? e : null;
3197
+ }
3198
+ function ye() {
3199
+ return ve() === he;
3200
+ }
3201
+ function be(e, t) {
3202
+ p && window.dispatchEvent(new CustomEvent(h, { detail: {
3203
+ ownerId: e,
3204
+ previousOwnerId: t
3205
+ } }));
3206
+ }
3207
+ function xe() {
3208
+ if (!p) return;
3209
+ let e = ve();
3210
+ e !== he && (window[m] = he, be(he, e));
3211
+ }
3212
+ function Se() {
3213
+ p && ve() === he && (delete window[m], be(null, he));
3214
+ }
3215
+ function Ce(e = "", t = !1) {
3216
+ W(j, !1), W(M, !1), W(A, t, !0), W(N, e, !0);
3217
+ }
3218
+ function we(e) {
3219
+ return e.map((e) => `${e.rate}:${e.label}:${e.ariaLabel}:${e.isDefault ? "1" : "0"}`).join("|");
3220
+ }
3221
+ function Te(e) {
3222
+ return e.find((e) => e.isDefault)?.rate ?? e.find((e) => e.rate === 1)?.rate ?? e[0]?.rate ?? 1;
3223
+ }
3224
+ async function Ee(e, t) {
3225
+ if (typeof e.setPlaybackRate == "function") {
3226
+ await e.setPlaybackRate(t);
3227
+ return;
3228
+ }
3229
+ await e.updateSettings({ rate: t });
3230
+ }
3231
+ function De() {
3232
+ if (!Q(w) || !Q(T)) return !1;
3233
+ let e = Q(w).getRootNode();
3234
+ if (!(e instanceof ShadowRoot)) return !1;
3235
+ let t = e.activeElement;
3236
+ return !!(t && Q(T).contains(t));
3237
+ }
3238
+ function P() {
3239
+ if (!Q(T)) return !1;
3240
+ let e = Q(T).getRootNode();
3241
+ if (!(e instanceof ShadowRoot)) return !1;
3242
+ let t = e.activeElement;
3243
+ return !t || !Q(T).contains(t) ? !1 : t.matches(Ne);
3244
+ }
3245
+ function Oe() {
3246
+ let e = Q(T)?.querySelector(Pe);
3247
+ if (e && !e.disabled) {
3248
+ e.focus();
3249
+ return;
3250
+ }
3251
+ F(!0);
3252
+ }
3253
+ function F(e) {
3254
+ if (!Q(w) || !e) return;
3255
+ let t = Q(w).getRootNode();
3256
+ if (!(t instanceof ShadowRoot)) return;
3257
+ let n = t.querySelector(".pie-tool-tts-inline__trigger");
3258
+ (n?.querySelector("button") ?? n)?.focus();
3259
+ }
3260
+ function I(e = "Reading switched to another section", t = !1) {
3261
+ if (!Q(le) && !(!Q(A) && !ye())) {
3262
+ W(le, !0);
3263
+ try {
3264
+ let n = De();
3265
+ ye() && Se(), Ce(e), R(), t && queueMicrotask(() => {
3266
+ F(n);
3267
+ });
3268
+ } finally {
3269
+ W(le, !1);
3270
+ }
3271
+ }
3272
+ }
3273
+ hn(() => {
3274
+ if (Q(w)) return r(Q(w), (e) => {
3275
+ W(E, e, !0);
3276
+ });
3277
+ }), hn(() => {
3278
+ if (!Q(w)) return;
3279
+ let t = i(Q(w), (e) => {
3280
+ W(D, e, !0);
3281
+ }), n = e(Q(w), (e) => {
3282
+ W(re, e, !0);
3283
+ });
3284
+ return () => {
3285
+ n(), t();
3286
+ };
3287
+ }), hn(() => {
3288
+ if (!Q(O)) return;
3289
+ let e = (e) => {
3290
+ if (!Q(A) || !ye()) {
3291
+ W(j, !1), W(M, !1);
3292
+ return;
3293
+ }
3294
+ W(j, e === "playing" || e === "paused", !0), W(M, e === "paused");
3295
+ }, t = (t) => {
3296
+ let n = P();
3297
+ e(t), n && !Q(j) && queueMicrotask(Oe);
3298
+ };
3299
+ return Q(O).onStateChange(ge, t), e(Q(O).getState()), () => {
3300
+ Q(O).offStateChange(ge, t);
3301
+ };
3302
+ }), hn(() => {
3303
+ if (!p) return;
3304
+ let e = (e) => {
3305
+ let { ownerId: t = null, previousOwnerId: n = null } = e.detail || {};
3306
+ n === he && t !== he && I("Reading switched to another section");
3307
+ };
3308
+ return window.addEventListener(h, e), () => {
3309
+ window.removeEventListener(h, e);
3310
+ };
3311
+ }), hn(() => {
3312
+ if (!p) return;
3313
+ let e = () => {
3314
+ I("Reading switched to another section", !0);
3315
+ };
3316
+ return window.addEventListener(n, e), () => {
3317
+ window.removeEventListener(n, e);
3318
+ };
3319
+ }), hn(() => () => {
3320
+ Se(), R();
3321
+ });
3322
+ async function ke() {
3323
+ if (!Q(O)) return !1;
3324
+ try {
3325
+ return await Q(E)?.toolkitCoordinator?.ensureTTSReady?.(), !0;
3326
+ } catch (e) {
3327
+ return console.error("[TTS Inline] Failed to initialize TTS:", e), !1;
3328
+ }
3329
+ }
3330
+ let je = "[data-pie-tts-speed-rate]", Me = "[data-pie-tts-media]", Ne = "[data-pie-tts-seek]", Pe = "[data-pie-tts-stop]";
3331
+ function Fe(e) {
3332
+ return Q(T) ? Array.from(Q(T).querySelectorAll(e)).filter((e) => !e.disabled && window.getComputedStyle(e).display !== "none") : [];
3333
+ }
3334
+ function Ie(e, t) {
3335
+ let n = Fe(e);
3336
+ if (!n.length) return;
3337
+ let r = n[(t + n.length) % n.length];
3338
+ if (r.focus(), e !== je) return;
3339
+ let i = Number(r.dataset.pieTtsSpeedRate), a = Q(pe).find((e) => e.rate === i);
3340
+ a && z(a);
3341
+ }
3342
+ function Le(e, t) {
3343
+ let n = Fe(e);
3344
+ if (!n.length) return;
3345
+ let r = Q(T)?.getRootNode(), i = r instanceof ShadowRoot ? r.activeElement : null, a = i ? n.indexOf(i) : -1;
3346
+ Ie(e, a === -1 ? 0 : a + t);
3347
+ }
3348
+ function Re(e, t) {
3349
+ switch (t.key) {
3350
+ case "ArrowDown":
3351
+ case "ArrowRight":
3352
+ t.preventDefault(), Le(e, 1);
3353
+ break;
3354
+ case "ArrowUp":
3355
+ case "ArrowLeft":
3356
+ t.preventDefault(), Le(e, -1);
3357
+ break;
3358
+ case "Home":
3359
+ t.preventDefault(), Ie(e, 0);
3360
+ break;
3361
+ case "End":
3362
+ t.preventDefault(), Ie(e, -1);
3363
+ break;
3364
+ }
3365
+ }
3366
+ function L() {
3367
+ if (!Q(ie)) return null;
3368
+ let e = Q(ie);
3369
+ if (e.getAttribute?.("data-region") === "content") return e;
3370
+ let t = e.querySelector?.("[data-region='content']");
3371
+ return t instanceof Element ? t : e;
3372
+ }
3373
+ function ze() {
3374
+ if (Q(D)) return Q(D).kind === "passage" ? {
3375
+ ownerKind: "passage",
3376
+ assessmentId: Q(E)?.assessmentId || "",
3377
+ sectionId: Q(E)?.sectionId || "",
3378
+ passageId: Q(D).canonicalItemId || Q(D).itemId
3379
+ } : {
3380
+ ownerKind: "itemModel",
3381
+ assessmentId: Q(E)?.assessmentId || "",
3382
+ sectionId: Q(E)?.sectionId || "",
3383
+ itemId: Q(D).itemId,
3384
+ canonicalItemId: Q(D).canonicalItemId || Q(D).itemId
3385
+ };
3386
+ }
3387
+ function He(e) {
3388
+ return R(), ue = Q(O)?.setHighlightTargetResolverProvider?.(() => ({
3389
+ context: {
3390
+ scopeElement: Q(re)?.scopeElement || e || null,
3391
+ kind: Q(D)?.kind,
3392
+ itemId: Q(D)?.itemId,
3393
+ canonicalItemId: Q(D)?.canonicalItemId,
3394
+ contentKind: Q(D)?.contentKind,
3395
+ regionPolicy: Q(D)?.regionPolicy
3396
+ },
3397
+ resolver: Q(re)?.ttsHighlightTargetResolver || null
3398
+ })) || null, ue;
3399
+ }
3400
+ function R(e = ue) {
3401
+ e?.(), e === ue && (ue = null);
3402
+ }
3403
+ function Ue() {
3404
+ if (!ye()) return !1;
3405
+ let e = String(Q(O)?.getState?.() || "");
3406
+ return e === "playing" || e === "paused" || e === "loading";
3407
+ }
3408
+ async function We() {
3409
+ if (!Q(O)) return;
3410
+ let e = L();
3411
+ if (!e) {
3412
+ console.warn("[TTS Inline] No target container found from shell scope context");
3413
+ return;
3414
+ }
3415
+ try {
3416
+ W(A, !0);
3417
+ let t = e.textContent || "";
3418
+ if (!t) {
3419
+ console.warn("[TTS Inline] No text content found");
3420
+ return;
3421
+ }
3422
+ Q(k) && Q(O).setHighlightCoordinator && Q(O).setHighlightCoordinator(Q(k)), await Ee(Q(O), Q(me));
3423
+ let n = He(e);
3424
+ Q(O).setRootElement?.(e), W(N, "Reading started"), Q(O).speak(t, {
3425
+ catalogId: s() || void 0,
3426
+ catalogContext: ze(),
3427
+ language: c(),
3428
+ contentElement: e
3429
+ }).catch((e) => {
3430
+ console.error("[TTS Inline] Error:", e), W(N, "Unable to start reading"), Q(k) && Q(k).clearTTS(), R(n);
3431
+ }).finally(() => {
3432
+ Ue() || R(n);
3433
+ });
3434
+ } catch (e) {
3435
+ console.error("[TTS Inline] Error:", e), W(N, "Unable to start reading"), Q(k) && Q(k).clearTTS(), R();
3436
+ }
3437
+ }
3438
+ async function Ge() {
3439
+ if (Q(O)) {
3440
+ if (ye() && Q(M)) {
3441
+ Q(O).resume(), W(N, "Reading resumed");
3442
+ return;
3443
+ }
3444
+ if (ye() && Q(j) && !Q(M)) {
3445
+ Q(O).pause(), W(N, "Reading paused");
3446
+ return;
3447
+ }
3448
+ if (!Q(ce)) {
3449
+ W(ce, !0);
3450
+ try {
3451
+ if (W(N, "Initializing text-to-speech"), !await ke()) {
3452
+ W(N, "Unable to initialize text-to-speech. Try again.");
3453
+ return;
3454
+ }
3455
+ let e = String(Q(O).getState?.() || "");
3456
+ (e === "playing" || e === "paused" || e === "loading") && !ye() && Q(O).stop(), xe(), await We();
3457
+ } finally {
3458
+ W(ce, !1);
3459
+ }
3460
+ }
3461
+ }
3462
+ }
3463
+ function Ke() {
3464
+ if (!Q(O)) return;
3465
+ let e = De();
3466
+ Q(O).stop(), Se(), Ce("Reading stopped"), Q(k) && Q(k).clearTTS(), R(), e && queueMicrotask(() => {
3467
+ F(!0);
3468
+ });
3469
+ }
3470
+ async function qe() {
3471
+ if (!(!Q(O) || !Q(j))) try {
3472
+ await Q(O).seekForward?.(1), W(N, "Skipped forward");
3473
+ } catch (e) {
3474
+ console.error("[TTS Inline] Seek forward failed:", e), W(N, "Unable to skip forward");
3475
+ }
3476
+ }
3477
+ async function Je() {
3478
+ if (!(!Q(O) || !Q(j))) try {
3479
+ await Q(O).seekBackward?.(1), W(N, "Skipped backward");
3480
+ } catch (e) {
3481
+ console.error("[TTS Inline] Seek backward failed:", e), W(N, "Unable to skip backward");
3482
+ }
3483
+ }
3484
+ async function z(e) {
3485
+ let t = Q(O);
3486
+ if (!t) return;
3487
+ if (Q(me) === e.rate) {
3488
+ W(N, `Playback speed ${e.label}`);
3489
+ return;
3490
+ }
3491
+ let n = Q(oe), r = Q(se);
3492
+ W(oe, e.rate, !0), W(se, Q(fe), !0), W(N, `Playback speed ${e.label}`);
3493
+ try {
3494
+ await Ee(t, e.rate);
3495
+ } catch (e) {
3496
+ console.error("[TTS Inline] Playback speed change failed:", e), W(oe, n, !0), W(se, r, !0), W(N, "Unable to change playback speed");
3497
+ }
3498
+ }
3499
+ let Ye = /* @__PURE__ */ B(() => l() === "sm" ? "pie-tool-tts-inline__trigger--sm" : l() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md"), Xe = /* @__PURE__ */ B(() => f() === "reserved-row" || f() === "expanding-row"), Ze = /* @__PURE__ */ B(() => f() === "floating-overlay"), Qe = /* @__PURE__ */ B(() => f() === "left-aligned"), $e = /* @__PURE__ */ B(() => Q(Ze) || Q(Qe)), et = Pa(ja), tt = "[data-pie-tool-overlay-boundary]", nt = /* @__PURE__ */ U(""), rt = /* @__PURE__ */ U(0);
3500
+ hn(() => {
3501
+ let e = Q(O), t = Q(me), n = Q(j) || Q(M);
3502
+ if (!e || !n || !ye()) return;
3503
+ let r = !1;
3504
+ return queueMicrotask(() => {
3505
+ r || Ee(e, t);
3506
+ }), () => {
3507
+ r = !0;
3508
+ };
3509
+ });
3510
+ function it(e, t) {
3511
+ let n = e;
3512
+ for (; n;) {
3513
+ if (n.matches?.(t)) return n;
3514
+ n = n.parentElement ?? (n.getRootNode() instanceof ShadowRoot ? n.getRootNode().host : null);
3515
+ }
3516
+ return null;
3517
+ }
3518
+ function at() {
3519
+ let e = Q(w)?.getRootNode();
3520
+ return e instanceof ShadowRoot ? e.querySelector(".pie-tool-tts-inline__trigger") : null;
3521
+ }
3522
+ function ot(e) {
3523
+ let t = window.getComputedStyle(e), n = parseFloat(t.columnGap || t.gap) || 0, r = (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0) + (parseFloat(t.borderLeftWidth) || 0) + (parseFloat(t.borderRightWidth) || 0), i = Array.from(e.children).filter((e) => window.getComputedStyle(e).display !== "none");
3524
+ return i.length ? i.reduce((e, t) => e + t.offsetWidth, 0) + (i.length - 1) * n + r : 0;
3525
+ }
3526
+ function st() {
3527
+ let e = at();
3528
+ if (!e || !Q(T)) return;
3529
+ let t = e.getBoundingClientRect(), n = it(e, tt)?.getBoundingClientRect().left ?? 0, r = Math.max(0, t.left - n - 16);
3530
+ if (!Q(ae)) {
3531
+ let e = ot(Q(T));
3532
+ e > 0 && W(rt, e, !0);
3533
+ }
3534
+ W(ae, Q(rt) > 0 && r < Q(rt), !0);
3535
+ let i = Q(T).offsetHeight || t.height;
3536
+ W(nt, `top: ${Q(ae) ? t.top : t.top + t.height / 2 - i / 2}px; right: ${window.innerWidth - t.left + 8}px; left: auto; max-width: min(${r}px, var(--pie-tts-left-aligned-panel-width, ${r}px));`);
3537
+ }
3538
+ hn(() => {
3539
+ if (!Q(Qe) || !Q(A)) {
3540
+ W(nt, ""), W(ae, !1), W(rt, 0);
3541
+ return;
3542
+ }
3543
+ if (typeof window > "u") return;
3544
+ let e = 0, t = () => {
3545
+ e ||= window.requestAnimationFrame(() => {
3546
+ e = 0, st();
3547
+ });
3548
+ };
3549
+ st(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0);
3550
+ let n = at(), r = new ResizeObserver(t);
3551
+ n && r.observe(n), Q(T) && r.observe(Q(T));
3552
+ let i = n ? it(n, tt) : null;
3553
+ i && r.observe(i);
3554
+ let a = i?.querySelector("[data-pie-tool-overlay-protect]");
3555
+ return a && r.observe(a), () => {
3556
+ e && window.cancelAnimationFrame(e), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0), r.disconnect();
3557
+ };
3558
+ });
3559
+ function ct() {
3560
+ if (!Q(w)) return null;
3561
+ let e = Q(w).getRootNode();
3562
+ return e instanceof ShadowRoot ? e.host : null;
3563
+ }
3564
+ hn(() => {
3565
+ let e = ct();
3566
+ if (!e) return;
3567
+ let t = Q(A) === !0;
3568
+ e.setAttribute("data-active", t ? "true" : "false");
3569
+ let n = !1;
3570
+ return queueMicrotask(() => {
3571
+ n || e.dispatchEvent(new CustomEvent("pie-tool-active-change", {
3572
+ detail: { active: t },
3573
+ bubbles: !0,
3574
+ composed: !0
3575
+ }));
3576
+ }), () => {
3577
+ n = !0;
3578
+ };
3579
+ });
3580
+ var lt = {
3581
+ get catalogId() {
3582
+ return s();
3583
+ },
3584
+ set catalogId(e = "") {
3585
+ s(e), At();
3586
+ },
3587
+ get language() {
3588
+ return c();
3589
+ },
3590
+ set language(e = "en-US") {
3591
+ c(e), At();
3592
+ },
3593
+ get size() {
3594
+ return l();
3595
+ },
3596
+ set size(e = "md") {
3597
+ l(e), At();
3598
+ },
3599
+ get speedOptions() {
3600
+ return u();
3601
+ },
3602
+ set speedOptions(e = void 0) {
3603
+ u(e), At();
3604
+ },
3605
+ get showSingleSpeedOption() {
3606
+ return d();
3607
+ },
3608
+ set showSingleSpeedOption(e = !1) {
3609
+ d(e), At();
3610
+ },
3611
+ get layoutMode() {
3612
+ return f();
3613
+ },
3614
+ set layoutMode(e = "expanding-row") {
3615
+ f(e), At();
3616
+ }
3617
+ }, ut = yr(), dt = rn(ut), ft = (e) => {
3618
+ var t = Ha();
3619
+ let n;
3620
+ {
3621
+ let e = (e) => {
3622
+ var t = La(), n = nn(t), r = (e) => {
3623
+ var t = Fa();
3624
+ ti(t, "type", "circle"), ti(t, "size", "small"), ti(t, "variant", "tertiary"), Sn(() => ti(t, "icon-name", Q(j) && !Q(M) ? "pause" : "play")), Sn(() => ti(t, "button-aria-label", Q(j) && !Q(M) ? "Pause reading" : Q(M) ? "Resume reading" : "Play reading")), Sn(() => ti(t, "disabled", !Q(O))), Hr(t, (e) => S?.(e)), Hr(t, (e, t) => C?.(e, t), () => ({
3625
+ "aria-expanded": Q(A) ? "true" : "false",
3626
+ "aria-controls": Q(A) ? _e : null,
3627
+ "aria-pressed": Q(A) ? "true" : "false",
3628
+ "aria-busy": Q(ce) ? "true" : null
3629
+ })), Sn(() => Jr(t, 1, `pie-tool-tts-inline__trigger ${Q(Ye) ?? ""}`, "svelte-18mzc0g")), ur("click", t, Ge), br(e, t);
3630
+ }, i = (e) => {
3631
+ var t = Ia(), n = nn(t);
3632
+ Ae(t), Hr(t, (e) => te?.(e)), Sn(() => {
3633
+ Jr(t, 1, `pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${Q(Ye) ?? ""}`, "svelte-18mzc0g"), ei(t, "aria-expanded", Q(A) ? "true" : "false"), ei(t, "aria-controls", Q(A) ? _e : void 0), ei(t, "aria-pressed", Q(A) ? "true" : "false"), ei(t, "aria-label", Q(j) && !Q(M) ? "Pause reading" : Q(M) ? "Resume reading" : "Play reading"), ei(t, "aria-busy", Q(ce) ? "true" : void 0), t.disabled = !Q(O), Jr(n, 1, `fa-solid ${Q(j) && !Q(M) ? "fa-pause" : "fa-play"} pie-tool-tts-inline__icon`, "svelte-18mzc0g");
3634
+ }), ur("click", t, Ge), br(e, t);
3635
+ };
3636
+ jr(n, (e) => {
3637
+ Q(ne) ? e(r) : e(i, -1);
3638
+ }), Ae(t), br(e, t);
3639
+ }, n = (e) => {
3640
+ var t = yr(), n = rn(t), r = (e) => {
3641
+ var t = Ba();
3642
+ let n;
3643
+ var r = nn(t), i = (e) => {
3644
+ var t = za();
3645
+ let n;
3646
+ Fr(t, 21, () => Q(pe), (e) => e.rate, (e, t) => {
3647
+ var n = Ra(), r = nn(n), i = nn(r, !0);
3648
+ Ae(r), Ae(n), Sn(() => {
3649
+ ei(n, "data-pie-tts-speed-rate", Q(t).rate), ei(n, "tabindex", Q(me) === Q(t).rate ? 0 : -1), ei(n, "aria-label", Q(t).ariaLabel), ei(n, "aria-checked", Q(me) === Q(t).rate), n.disabled = !Q(O), ei(r, "data-label", Q(t).label), Cr(i, Q(t).label);
3650
+ }), ur("click", n, () => z(Q(t))), ur("keydown", n, (e) => Re(je, e)), br(e, n);
3651
+ }), Ae(t), Sn(() => n = Jr(t, 1, "pie-tool-tts-inline__speed-group svelte-18mzc0g", null, n, { "pie-tool-tts-inline__speed-group--stacked": Q(ae) })), br(e, t);
3652
+ };
3653
+ jr(r, (e) => {
3654
+ Q(pe).length > 0 && e(i);
3655
+ });
3656
+ var a = an(r, 2), o = an(a, 2), s = an(o, 2);
3657
+ Ae(t), oi(t, (e) => W(T, e), () => Q(T)), Sn(() => {
3658
+ ei(t, "id", _e), n = Jr(t, 1, "pie-tool-tts-inline__panel svelte-18mzc0g", null, n, {
3659
+ "pie-tool-tts-inline__panel--floating": Q(Ze),
3660
+ "pie-tool-tts-inline__panel--row": Q(Xe),
3661
+ "pie-tool-tts-inline__panel--left-aligned-inline": Q(Qe),
3662
+ "pie-tool-tts-inline__panel--compact": Q(Qe) && Q(ae)
3663
+ }), Xr(t, Q(Qe) ? Q(nt) : ""), a.disabled = !Q(O) || !Q(j), o.disabled = !Q(O) || !Q(j), s.disabled = !Q(O);
3664
+ }), ur("click", a, Je), ur("keydown", a, (e) => Re(Me, e)), ur("click", o, qe), ur("keydown", o, (e) => Re(Me, e)), ur("click", s, Ke), ur("keydown", s, (e) => Re(Me, e)), br(e, t);
3665
+ };
3666
+ jr(n, (e) => {
3667
+ Q(A) && e(r);
3668
+ }), br(e, t);
3669
+ };
3670
+ var r = nn(t), i = (t) => {
3671
+ var r = Va(), i = rn(r);
3672
+ n(i), e(an(i, 2)), br(t, r);
3673
+ }, a = (t) => {
3674
+ var r = Va(), i = rn(r);
3675
+ e(i), n(an(i, 2)), br(t, r);
3676
+ };
3677
+ jr(r, (e) => {
3678
+ Q($e) ? e(i) : e(a, -1);
3679
+ });
3680
+ var o = an(r, 2), s = nn(o, !0);
3681
+ Ae(o), Ae(t), oi(t, (e) => W(w, e), () => Q(w)), Sn(() => Cr(s, Q(N)));
3682
+ }
3683
+ Sn(() => {
3684
+ n = Jr(t, 1, "pie-tool-tts-inline svelte-18mzc0g", null, n, {
3685
+ "pie-tool-tts-inline--controls-row": Q(Xe),
3686
+ "pie-tool-tts-inline--floating": Q(Ze),
3687
+ "pie-tool-tts-inline--left-aligned": Q(Qe)
3688
+ }), Xr(t, `--pie-tts-zoom-comp: ${et.current};`);
3689
+ }), br(e, t);
3690
+ };
3691
+ return jr(dt, (e) => {
3692
+ p && e(ft);
3693
+ }), br(a, ut), Ve(lt);
3694
+ }
3695
+ dr(["click", "keydown"]), customElements.define("pie-tool-tts-inline", pi(Wa, {
3696
+ catalogId: {
3697
+ attribute: "catalog-id",
3698
+ type: "String"
3699
+ },
3700
+ language: {
3701
+ attribute: "language",
3702
+ type: "String"
3703
+ },
3704
+ size: {
3705
+ attribute: "size",
3706
+ type: "String"
3707
+ },
3708
+ speedOptions: {
3709
+ attribute: "speed-options",
3710
+ type: "Array"
3711
+ },
3712
+ showSingleSpeedOption: {
3713
+ attribute: "show-single-speed-option",
3714
+ type: "Boolean"
3715
+ },
3716
+ layoutMode: {
3717
+ attribute: "layout-mode",
3718
+ type: "String"
3719
+ }
3720
+ }, [], [], { mode: "open" }));
3721
+ //#endregion
3722
+ export { Wa as default };
3723
+
3724
+ //# sourceMappingURL=tool-tts-inline-drDEIti_.js.map