@pie-players/pie-tool-tts-inline 1.0.0-beta.0 → 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +14 -2
- package/custom-elements.json +54 -1
- package/dist/THIRD-PARTY-LICENSES.txt +14 -0
- package/dist/element-props.d.ts +16 -0
- package/dist/index.d.ts +13 -8
- package/dist/tool-tts-inline.js +173 -2928
- package/package.json +11 -11
package/dist/tool-tts-inline.js
CHANGED
|
@@ -1,2928 +1,173 @@
|
|
|
1
|
-
import { coerceBooleanAttributes as e } from "@pie-players/pie-players-shared/ui/attribute-coercion";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
Ye.push(e);
|
|
176
|
-
}
|
|
177
|
-
function Qe() {
|
|
178
|
-
for (; Ye.length > 0;) Xe();
|
|
179
|
-
}
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
182
|
-
var $e = ~(E | D | T);
|
|
183
|
-
function z(e, t) {
|
|
184
|
-
e.f = e.f & $e | t;
|
|
185
|
-
}
|
|
186
|
-
function et(e) {
|
|
187
|
-
e.f & 512 || e.deps === null ? z(e, T) : z(e, D);
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
191
|
-
function tt(e, t, n) {
|
|
192
|
-
e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), z(e, T);
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
196
|
-
function nt(e) {
|
|
197
|
-
var t = K, n = J;
|
|
198
|
-
q(null), Y(null);
|
|
199
|
-
try {
|
|
200
|
-
return e();
|
|
201
|
-
} finally {
|
|
202
|
-
q(t), Y(n);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
207
|
-
function rt(e, t, n, r) {
|
|
208
|
-
let i = Je() ? st : ut;
|
|
209
|
-
var a = e.filter((e) => !e.settled), o = t.map(i);
|
|
210
|
-
if (n.length === 0 && a.length === 0) {
|
|
211
|
-
r(o);
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
var s = J, c = it(), l = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
|
|
215
|
-
function u(e) {
|
|
216
|
-
if (!(s.f & 16384)) {
|
|
217
|
-
c();
|
|
218
|
-
try {
|
|
219
|
-
r([...o, ...e]);
|
|
220
|
-
} catch (e) {
|
|
221
|
-
un(e, s);
|
|
222
|
-
}
|
|
223
|
-
at();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
var d = ot();
|
|
227
|
-
if (n.length === 0) {
|
|
228
|
-
l.then(() => u([])).finally(d);
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
function f() {
|
|
232
|
-
Promise.all(n.map((e) => /* @__PURE__ */ lt(e))).then(u).catch((e) => un(e, s)).finally(d);
|
|
233
|
-
}
|
|
234
|
-
l ? l.then(() => {
|
|
235
|
-
c(), f(), at();
|
|
236
|
-
}) : f();
|
|
237
|
-
}
|
|
238
|
-
function it() {
|
|
239
|
-
var e = J, t = K, n = R, r = V;
|
|
240
|
-
return function(i = !0) {
|
|
241
|
-
Y(e), q(t), We(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
function at(e = !0) {
|
|
245
|
-
Y(null), q(null), We(null), e && V?.deactivate();
|
|
246
|
-
}
|
|
247
|
-
function ot() {
|
|
248
|
-
var e = J, t = e.b, n = V, r = !!t?.is_rendered();
|
|
249
|
-
return t?.update_pending_count(1, n), n.increment(r, e), () => {
|
|
250
|
-
t?.update_pending_count(-1, n), n.decrement(r, e);
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
254
|
-
function st(e) {
|
|
255
|
-
var t = 2 | E;
|
|
256
|
-
return J !== null && (J.f |= k), {
|
|
257
|
-
ctx: R,
|
|
258
|
-
deps: null,
|
|
259
|
-
effects: null,
|
|
260
|
-
equals: ke,
|
|
261
|
-
f: t,
|
|
262
|
-
fn: e,
|
|
263
|
-
reactions: null,
|
|
264
|
-
rv: 0,
|
|
265
|
-
v: m,
|
|
266
|
-
wv: 0,
|
|
267
|
-
parent: J,
|
|
268
|
-
ac: null
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
var ct = Symbol("obsolete");
|
|
272
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
273
|
-
function lt(e, t, n) {
|
|
274
|
-
let r = J;
|
|
275
|
-
r === null && Me();
|
|
276
|
-
var i = void 0, a = Lt(m), o = !K, s = /* @__PURE__ */ new Set();
|
|
277
|
-
return xn(() => {
|
|
278
|
-
var t = J, n = w();
|
|
279
|
-
i = n.promise;
|
|
280
|
-
try {
|
|
281
|
-
Promise.resolve(e()).then(n.resolve, (e) => {
|
|
282
|
-
e !== ye && n.reject(e);
|
|
283
|
-
}).finally(at);
|
|
284
|
-
} catch (e) {
|
|
285
|
-
n.reject(e), at();
|
|
286
|
-
}
|
|
287
|
-
var c = V;
|
|
288
|
-
if (o) {
|
|
289
|
-
if (t.f & 32768) var l = ot();
|
|
290
|
-
if (r.b?.is_rendered()) c.async_deriveds.get(t)?.reject(ct);
|
|
291
|
-
else for (let e of s.values()) e.reject(ct);
|
|
292
|
-
s.add(n), c.async_deriveds.set(t, n);
|
|
293
|
-
}
|
|
294
|
-
let u = (e, t = void 0) => {
|
|
295
|
-
l?.(), s.delete(n), t !== ct && (c.activate(), t ? (a.f |= de, Vt(a, t)) : (a.f & 8388608 && (a.f ^= de), Vt(a, e)), c.deactivate());
|
|
296
|
-
};
|
|
297
|
-
n.promise.then(u, (e) => u(null, e || "unknown"));
|
|
298
|
-
}), hn(() => {
|
|
299
|
-
for (let e of s) e.reject(ct);
|
|
300
|
-
}), new Promise((e) => {
|
|
301
|
-
function t(n) {
|
|
302
|
-
function r() {
|
|
303
|
-
n === i ? e(a) : t(i);
|
|
304
|
-
}
|
|
305
|
-
n.then(r, r);
|
|
306
|
-
}
|
|
307
|
-
t(i);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
311
|
-
function B(e) {
|
|
312
|
-
let t = /* @__PURE__ */ st(e);
|
|
313
|
-
return Vn(t), t;
|
|
314
|
-
}
|
|
315
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
316
|
-
function ut(e) {
|
|
317
|
-
let t = /* @__PURE__ */ st(e);
|
|
318
|
-
return t.equals = je, t;
|
|
319
|
-
}
|
|
320
|
-
function dt(e) {
|
|
321
|
-
var t = e.effects;
|
|
322
|
-
if (t !== null) {
|
|
323
|
-
e.effects = null;
|
|
324
|
-
for (var n = 0; n < t.length; n += 1) G(t[n]);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function ft(e) {
|
|
328
|
-
var t, n = J, r = e.parent;
|
|
329
|
-
if (!Ln && r !== null && e.v !== m && r.f & 24576) return xe(), e.v;
|
|
330
|
-
Y(r);
|
|
331
|
-
try {
|
|
332
|
-
dt(e), t = Zn(e);
|
|
333
|
-
} finally {
|
|
334
|
-
Y(n);
|
|
335
|
-
}
|
|
336
|
-
return t;
|
|
337
|
-
}
|
|
338
|
-
function pt(e) {
|
|
339
|
-
var t = ft(e);
|
|
340
|
-
if (!e.equals(t) && (e.wv = Jn(), (!V?.is_fork || e.deps === null) && (V === null ? e.v = t : (V.capture(e, t, !0), _t?.capture(e, t, !0)), e.deps === null))) {
|
|
341
|
-
z(e, T);
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
Ln || (vt === null ? et(e) : (mn() || V?.is_fork) && vt.set(e, t));
|
|
345
|
-
}
|
|
346
|
-
function mt(e) {
|
|
347
|
-
if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && nt(() => {
|
|
348
|
-
t.ac.abort(ye), t.ac = null;
|
|
349
|
-
}), t.fn !== null && (t.teardown = ae), er(t, 0), En(t));
|
|
350
|
-
}
|
|
351
|
-
function ht(e) {
|
|
352
|
-
if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && tr(t);
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
356
|
-
var gt = null, V = null, _t = null, vt = null, yt = null, bt = !1, xt = !1, St = null, Ct = null, wt = 0, Tt = 1, Et = class e {
|
|
357
|
-
id = Tt++;
|
|
358
|
-
#e = !1;
|
|
359
|
-
linked = !0;
|
|
360
|
-
#t = null;
|
|
361
|
-
#n = null;
|
|
362
|
-
async_deriveds = /* @__PURE__ */ new Map();
|
|
363
|
-
current = /* @__PURE__ */ new Map();
|
|
364
|
-
previous = /* @__PURE__ */ new Map();
|
|
365
|
-
#r = /* @__PURE__ */ new Set();
|
|
366
|
-
#i = /* @__PURE__ */ new Set();
|
|
367
|
-
#a = 0;
|
|
368
|
-
#o = /* @__PURE__ */ new Map();
|
|
369
|
-
#s = null;
|
|
370
|
-
#c = [];
|
|
371
|
-
#l = [];
|
|
372
|
-
#u = /* @__PURE__ */ new Set();
|
|
373
|
-
#d = /* @__PURE__ */ new Set();
|
|
374
|
-
#f = /* @__PURE__ */ new Map();
|
|
375
|
-
#p = /* @__PURE__ */ new Set();
|
|
376
|
-
is_fork = !1;
|
|
377
|
-
#m = !1;
|
|
378
|
-
constructor() {
|
|
379
|
-
gt === null ? gt = this : (gt.#n = this, this.#t = gt), gt = this;
|
|
380
|
-
}
|
|
381
|
-
#h() {
|
|
382
|
-
if (this.is_fork) return !0;
|
|
383
|
-
for (let n of this.#o.keys()) {
|
|
384
|
-
for (var e = n, t = !1; e.parent !== null;) {
|
|
385
|
-
if (this.#f.has(e)) {
|
|
386
|
-
t = !0;
|
|
387
|
-
break;
|
|
388
|
-
}
|
|
389
|
-
e = e.parent;
|
|
390
|
-
}
|
|
391
|
-
if (!t) return !0;
|
|
392
|
-
}
|
|
393
|
-
return !1;
|
|
394
|
-
}
|
|
395
|
-
skip_effect(e) {
|
|
396
|
-
this.#f.has(e) || this.#f.set(e, {
|
|
397
|
-
d: [],
|
|
398
|
-
m: []
|
|
399
|
-
}), this.#p.delete(e);
|
|
400
|
-
}
|
|
401
|
-
unskip_effect(e, t = (e) => this.schedule(e)) {
|
|
402
|
-
var n = this.#f.get(e);
|
|
403
|
-
if (n) {
|
|
404
|
-
this.#f.delete(e);
|
|
405
|
-
for (var r of n.d) z(r, E), t(r);
|
|
406
|
-
for (r of n.m) z(r, D), t(r);
|
|
407
|
-
}
|
|
408
|
-
this.#p.add(e);
|
|
409
|
-
}
|
|
410
|
-
#g() {
|
|
411
|
-
var e = [];
|
|
412
|
-
for (let i of this.#c) if (!(i.f & 16384 || !(i.f & 6144))) {
|
|
413
|
-
for (var t = i, n = !1; t.parent !== null;) {
|
|
414
|
-
t = t.parent;
|
|
415
|
-
var r = t.f;
|
|
416
|
-
if (r & 96) {
|
|
417
|
-
if (!(r & 1024)) {
|
|
418
|
-
n = !0;
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
t.f ^= T;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
n || e.push(t);
|
|
425
|
-
}
|
|
426
|
-
return this.#c = [], e;
|
|
427
|
-
}
|
|
428
|
-
#_() {
|
|
429
|
-
this.#e = !0;
|
|
430
|
-
for (let e of this.#u) this.#d.delete(e), z(e, E), this.schedule(e);
|
|
431
|
-
for (let e of this.#d) z(e, D), this.schedule(e);
|
|
432
|
-
this.apply();
|
|
433
|
-
for (var t = St = [], n = [], r = Ct = []; this.#c.length > 0;) {
|
|
434
|
-
wt++ > 1e3 && (this.#S(), Ot());
|
|
435
|
-
for (let e of this.#g()) try {
|
|
436
|
-
this.#v(e, t, n);
|
|
437
|
-
} catch (t) {
|
|
438
|
-
throw Nt(e), this.#h() || this.discard(), t;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
if (V = null, r.length > 0) {
|
|
442
|
-
var i = e.ensure();
|
|
443
|
-
for (let e of r) i.schedule(e);
|
|
444
|
-
}
|
|
445
|
-
if (St = null, Ct = null, this.#h()) {
|
|
446
|
-
this.#x(n), this.#x(t);
|
|
447
|
-
for (let [e, t] of this.#f) Mt(e, t);
|
|
448
|
-
r.length > 0 && V.#_();
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
let a = this.#y();
|
|
452
|
-
if (a) {
|
|
453
|
-
this.#x(n), this.#x(t), a.#b(this);
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
this.#u.clear(), this.#d.clear();
|
|
457
|
-
for (let e of this.#r) e(this);
|
|
458
|
-
this.#r.clear(), _t = this, At(n), At(t), _t = null, this.#s?.resolve();
|
|
459
|
-
var o = V;
|
|
460
|
-
if (this.#a === 0 && (this.#c.length === 0 || o !== null) && this.#S(), this.#c.length > 0) {
|
|
461
|
-
if (o !== null) {
|
|
462
|
-
for (let e of this.#c) o.#c.push(e);
|
|
463
|
-
this.#c = [];
|
|
464
|
-
} else o = this;
|
|
465
|
-
}
|
|
466
|
-
o !== null && (Ft.clear(), o.#_());
|
|
467
|
-
}
|
|
468
|
-
#v(e, t, n) {
|
|
469
|
-
e.f ^= T;
|
|
470
|
-
for (var r = e.first; r !== null;) {
|
|
471
|
-
var i = r.f, a = !!(i & 96);
|
|
472
|
-
if (!(a && i & 1024 || i & 8192 || this.#f.has(r)) && r.fn !== null) {
|
|
473
|
-
a ? r.f ^= T : i & 4 ? t.push(r) : Yn(r) && (i & 16 && this.#d.add(r), tr(r));
|
|
474
|
-
var o = r.first;
|
|
475
|
-
if (o !== null) {
|
|
476
|
-
r = o;
|
|
477
|
-
continue;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
for (; r !== null;) {
|
|
481
|
-
var s = r.next;
|
|
482
|
-
if (s !== null) {
|
|
483
|
-
r = s;
|
|
484
|
-
break;
|
|
485
|
-
}
|
|
486
|
-
r = r.parent;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
#y() {
|
|
491
|
-
for (var e = this.#t; e !== null;) {
|
|
492
|
-
if (!e.is_fork) {
|
|
493
|
-
for (let [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
|
|
494
|
-
}
|
|
495
|
-
e = e.#t;
|
|
496
|
-
}
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
#b(e) {
|
|
500
|
-
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);
|
|
501
|
-
for (let [t, n] of e.async_deriveds) {
|
|
502
|
-
let e = this.async_deriveds.get(t);
|
|
503
|
-
e && n.promise.then(e.resolve).catch(e.reject);
|
|
504
|
-
}
|
|
505
|
-
e.async_deriveds.clear(), this.transfer_effects(e.#u, e.#d);
|
|
506
|
-
let t = (e) => {
|
|
507
|
-
var n = e.reactions;
|
|
508
|
-
if (n !== null && !(e.f & 2 && !(e.f & 6144))) for (let e of n) {
|
|
509
|
-
var r = e.f;
|
|
510
|
-
if (r & 2) t(e);
|
|
511
|
-
else {
|
|
512
|
-
var i = e;
|
|
513
|
-
r & 4194320 && !this.async_deriveds.has(i) && (this.#d.delete(i), z(i, E), this.schedule(i));
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
for (let e of this.current.keys()) t(e);
|
|
518
|
-
this.oncommit(() => e.discard()), e.#S(), V = this, this.#_();
|
|
519
|
-
}
|
|
520
|
-
#x(e) {
|
|
521
|
-
for (var t = 0; t < e.length; t += 1) tt(e[t], this.#u, this.#d);
|
|
522
|
-
}
|
|
523
|
-
capture(e, t, n = !1) {
|
|
524
|
-
e.v !== m && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [t, n]), vt?.set(e, t)), this.is_fork || (e.v = t);
|
|
525
|
-
}
|
|
526
|
-
activate() {
|
|
527
|
-
V = this;
|
|
528
|
-
}
|
|
529
|
-
deactivate() {
|
|
530
|
-
V = null, vt = null;
|
|
531
|
-
}
|
|
532
|
-
flush() {
|
|
533
|
-
try {
|
|
534
|
-
xt = !0, V = this, this.#_();
|
|
535
|
-
} finally {
|
|
536
|
-
wt = 0, yt = null, St = null, Ct = null, xt = !1, V = null, vt = null, Ft.clear();
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
discard() {
|
|
540
|
-
for (let e of this.#i) e(this);
|
|
541
|
-
this.#i.clear();
|
|
542
|
-
for (let e of this.async_deriveds.values()) e.reject(ct);
|
|
543
|
-
this.#S(), this.#s?.resolve();
|
|
544
|
-
}
|
|
545
|
-
register_created_effect(e) {
|
|
546
|
-
this.#l.push(e);
|
|
547
|
-
}
|
|
548
|
-
increment(e, t) {
|
|
549
|
-
if (this.#a += 1, e) {
|
|
550
|
-
let e = this.#o.get(t) ?? 0;
|
|
551
|
-
this.#o.set(t, e + 1);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
decrement(e, t) {
|
|
555
|
-
if (--this.#a, e) {
|
|
556
|
-
let e = this.#o.get(t) ?? 0;
|
|
557
|
-
e === 1 ? this.#o.delete(t) : this.#o.set(t, e - 1);
|
|
558
|
-
}
|
|
559
|
-
this.#m || (this.#m = !0, Ze(() => {
|
|
560
|
-
this.#m = !1, this.linked && this.flush();
|
|
561
|
-
}));
|
|
562
|
-
}
|
|
563
|
-
transfer_effects(e, t) {
|
|
564
|
-
for (let t of e) this.#u.add(t);
|
|
565
|
-
for (let e of t) this.#d.add(e);
|
|
566
|
-
e.clear(), t.clear();
|
|
567
|
-
}
|
|
568
|
-
oncommit(e) {
|
|
569
|
-
this.#r.add(e);
|
|
570
|
-
}
|
|
571
|
-
ondiscard(e) {
|
|
572
|
-
this.#i.add(e);
|
|
573
|
-
}
|
|
574
|
-
settled() {
|
|
575
|
-
return (this.#s ??= w()).promise;
|
|
576
|
-
}
|
|
577
|
-
static ensure() {
|
|
578
|
-
if (V === null) {
|
|
579
|
-
let t = V = new e();
|
|
580
|
-
!xt && !bt && Ze(() => {
|
|
581
|
-
t.#e || t.flush();
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
return V;
|
|
585
|
-
}
|
|
586
|
-
apply() {
|
|
587
|
-
vt = null;
|
|
588
|
-
}
|
|
589
|
-
schedule(e) {
|
|
590
|
-
if (yt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
|
|
591
|
-
e.b.defer_effect(e);
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
this.#c.push(e);
|
|
595
|
-
}
|
|
596
|
-
#S() {
|
|
597
|
-
if (this.linked) {
|
|
598
|
-
var e = this.#t, t = this.#n;
|
|
599
|
-
e === null || (e.#n = t), t === null ? gt = e : t.#t = e, this.linked = !1;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
function Dt(e) {
|
|
604
|
-
var t = bt;
|
|
605
|
-
bt = !0;
|
|
606
|
-
try {
|
|
607
|
-
var n;
|
|
608
|
-
for (e && (V !== null && !V.is_fork && V.flush(), n = e());;) {
|
|
609
|
-
if (Qe(), V === null) return n;
|
|
610
|
-
V.flush();
|
|
611
|
-
}
|
|
612
|
-
} finally {
|
|
613
|
-
bt = t;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
function Ot() {
|
|
617
|
-
try {
|
|
618
|
-
Le();
|
|
619
|
-
} catch (e) {
|
|
620
|
-
un(e, yt);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
var kt = null;
|
|
624
|
-
function At(e) {
|
|
625
|
-
var t = e.length;
|
|
626
|
-
if (t !== 0) {
|
|
627
|
-
for (var n = 0; n < t;) {
|
|
628
|
-
var r = e[n++];
|
|
629
|
-
if (!(r.f & 24576) && Yn(r) && (kt = /* @__PURE__ */ new Set(), tr(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && kn(r), kt?.size > 0)) {
|
|
630
|
-
Ft.clear();
|
|
631
|
-
for (let e of kt) {
|
|
632
|
-
if (e.f & 24576) continue;
|
|
633
|
-
let t = [e], n = e.parent;
|
|
634
|
-
for (; n !== null;) kt.has(n) && (kt.delete(n), t.push(n)), n = n.parent;
|
|
635
|
-
for (let e = t.length - 1; e >= 0; e--) {
|
|
636
|
-
let n = t[e];
|
|
637
|
-
n.f & 24576 || tr(n);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
kt.clear();
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
kt = null;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
function jt(e) {
|
|
647
|
-
V.schedule(e);
|
|
648
|
-
}
|
|
649
|
-
function Mt(e, t) {
|
|
650
|
-
if (!(e.f & 32 && e.f & 1024)) {
|
|
651
|
-
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), z(e, T);
|
|
652
|
-
for (var n = e.first; n !== null;) Mt(n, t), n = n.next;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
function Nt(e) {
|
|
656
|
-
z(e, T);
|
|
657
|
-
for (var t = e.first; t !== null;) Nt(t), t = t.next;
|
|
658
|
-
}
|
|
659
|
-
//#endregion
|
|
660
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
661
|
-
var Pt = /* @__PURE__ */ new Set(), Ft = /* @__PURE__ */ new Map(), It = !1;
|
|
662
|
-
function Lt(e, t) {
|
|
663
|
-
return {
|
|
664
|
-
f: 0,
|
|
665
|
-
v: e,
|
|
666
|
-
reactions: null,
|
|
667
|
-
equals: ke,
|
|
668
|
-
rv: 0,
|
|
669
|
-
wv: 0
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
673
|
-
function H(e, t) {
|
|
674
|
-
let n = Lt(e, t);
|
|
675
|
-
return Vn(n), n;
|
|
676
|
-
}
|
|
677
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
678
|
-
function Rt(e, t = !1, n = !0) {
|
|
679
|
-
let r = Lt(e);
|
|
680
|
-
return t || (r.equals = je), r;
|
|
681
|
-
}
|
|
682
|
-
function U(e, t, n = !1) {
|
|
683
|
-
return K !== null && (!zn || K.f & 131072) && Je() && K.f & 4325394 && (Bn === null || !Bn.has(e)) && He(), Vt(e, n ? Gt(t) : t, Ct);
|
|
684
|
-
}
|
|
685
|
-
var zt = null, Bt = 0;
|
|
686
|
-
function Vt(e, t, n = null) {
|
|
687
|
-
if (!e.equals(t)) {
|
|
688
|
-
Ln ? Ft.set(e, t) : Ft.has(e) || Ft.set(e, e.v);
|
|
689
|
-
var r = Et.ensure();
|
|
690
|
-
if (r.capture(e, t), e.f & 2) {
|
|
691
|
-
let t = e;
|
|
692
|
-
e.f & 2048 && ft(t), vt === null && et(t);
|
|
693
|
-
}
|
|
694
|
-
e.wv = Jn(), zt = null, Bt = 0, Wt(e, E, n), zt = null, Je() && J !== null && J.f & 1024 && !(J.f & 96) && (Hn === null ? Un([e]) : Hn.push(e)), !r.is_fork && Pt.size > 0 && !It && Ht();
|
|
695
|
-
}
|
|
696
|
-
return t;
|
|
697
|
-
}
|
|
698
|
-
function Ht() {
|
|
699
|
-
It = !1;
|
|
700
|
-
for (let e of Pt) {
|
|
701
|
-
e.f & 1024 && z(e, D);
|
|
702
|
-
let t;
|
|
703
|
-
try {
|
|
704
|
-
t = Yn(e);
|
|
705
|
-
} catch {
|
|
706
|
-
t = !0;
|
|
707
|
-
}
|
|
708
|
-
t && tr(e);
|
|
709
|
-
}
|
|
710
|
-
Pt.clear();
|
|
711
|
-
}
|
|
712
|
-
function Ut(e) {
|
|
713
|
-
U(e, e.v + 1);
|
|
714
|
-
}
|
|
715
|
-
function Wt(e, t, n) {
|
|
716
|
-
var r = e.reactions;
|
|
717
|
-
if (r !== null) {
|
|
718
|
-
var i = Je(), a = r.length;
|
|
719
|
-
if (Bt += a, Bt > 1e5 && zt === null && (zt = /* @__PURE__ */ new Set()), zt !== null) {
|
|
720
|
-
if (zt.has(e)) return;
|
|
721
|
-
zt.add(e);
|
|
722
|
-
}
|
|
723
|
-
for (var o = 0; o < a; o++) {
|
|
724
|
-
var s = r[o], c = s.f;
|
|
725
|
-
if (i || s !== J) {
|
|
726
|
-
var l = (c & E) === 0;
|
|
727
|
-
if (l && z(s, t), c & 131072) Pt.add(s);
|
|
728
|
-
else if (c & 2) {
|
|
729
|
-
var u = s;
|
|
730
|
-
vt?.delete(u), Wt(u, D, n);
|
|
731
|
-
} else if (l) {
|
|
732
|
-
var d = s;
|
|
733
|
-
c & 16 && kt !== null && kt.add(d), n === null ? jt(d) : n.push(d);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
function Gt(e) {
|
|
740
|
-
if (typeof e != "object" || !e || fe in e || pe in e) return e;
|
|
741
|
-
let t = re(e);
|
|
742
|
-
if (t !== te && t !== ne) return e;
|
|
743
|
-
var n = /* @__PURE__ */ new Map(), r = g(e), i = /* @__PURE__ */ H(0), a = null, o = Kn, s = (e) => {
|
|
744
|
-
if (Kn === o) return e();
|
|
745
|
-
var t = K, n = Kn;
|
|
746
|
-
q(null), qn(o);
|
|
747
|
-
var r = e();
|
|
748
|
-
return q(t), qn(n), r;
|
|
749
|
-
};
|
|
750
|
-
return r && n.set("length", /* @__PURE__ */ H(e.length, a)), new Proxy(e, {
|
|
751
|
-
defineProperty(e, t, r) {
|
|
752
|
-
(!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && Be();
|
|
753
|
-
var i = n.get(t);
|
|
754
|
-
return i === void 0 ? s(() => {
|
|
755
|
-
var e = /* @__PURE__ */ H(r.value, a);
|
|
756
|
-
return n.set(t, e), e;
|
|
757
|
-
}) : U(i, r.value, !0), !0;
|
|
758
|
-
},
|
|
759
|
-
deleteProperty(e, t) {
|
|
760
|
-
var r = n.get(t);
|
|
761
|
-
if (r === void 0) {
|
|
762
|
-
if (t in e) {
|
|
763
|
-
let e = s(() => /* @__PURE__ */ H(m, a));
|
|
764
|
-
n.set(t, e), Ut(i);
|
|
765
|
-
}
|
|
766
|
-
} else U(r, m), Ut(i);
|
|
767
|
-
return !0;
|
|
768
|
-
},
|
|
769
|
-
get(t, r, i) {
|
|
770
|
-
if (r === fe) return e;
|
|
771
|
-
var o = n.get(r), c = r in t;
|
|
772
|
-
if (o === void 0 && (!c || S(t, r)?.writable) && (o = s(() => /* @__PURE__ */ H(Gt(c ? t[r] : m), a)), n.set(r, o)), o !== void 0) {
|
|
773
|
-
var l = Q(o);
|
|
774
|
-
return l === m ? void 0 : l;
|
|
775
|
-
}
|
|
776
|
-
return Reflect.get(t, r, i);
|
|
777
|
-
},
|
|
778
|
-
getOwnPropertyDescriptor(e, t) {
|
|
779
|
-
this.has?.(e, t);
|
|
780
|
-
var r = Reflect.getOwnPropertyDescriptor(e, t), i = n.get(t);
|
|
781
|
-
if (i !== void 0) {
|
|
782
|
-
var a = Q(i);
|
|
783
|
-
if (a === m) return;
|
|
784
|
-
if (r && "value" in r) r.value = a;
|
|
785
|
-
else return {
|
|
786
|
-
enumerable: !0,
|
|
787
|
-
configurable: !0,
|
|
788
|
-
value: a,
|
|
789
|
-
writable: !0
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
return r;
|
|
793
|
-
},
|
|
794
|
-
has(e, t) {
|
|
795
|
-
if (t === fe) return !0;
|
|
796
|
-
var r = n.get(t), i = r !== void 0 && r.v !== m || Reflect.has(e, t);
|
|
797
|
-
return (r !== void 0 || J !== null && (!i || S(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ H(i ? Gt(e[t]) : m, a)), n.set(t, r)), Q(r) === m) ? !1 : i;
|
|
798
|
-
},
|
|
799
|
-
set(e, t, o, c) {
|
|
800
|
-
var l = n.get(t), u = t in e;
|
|
801
|
-
if (r && t === "length") for (var d = o; d < l.v; d += 1) {
|
|
802
|
-
var f = n.get(d + "");
|
|
803
|
-
f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ H(m, a)), n.set(d + "", f)) : U(f, m);
|
|
804
|
-
}
|
|
805
|
-
if (l === void 0) (!u || S(e, t)?.writable) && (l = s(() => /* @__PURE__ */ H(void 0, a)), U(l, Gt(o)), n.set(t, l));
|
|
806
|
-
else {
|
|
807
|
-
u = l.v !== m;
|
|
808
|
-
var p = s(() => Gt(o));
|
|
809
|
-
U(l, p);
|
|
810
|
-
}
|
|
811
|
-
var h = Reflect.getOwnPropertyDescriptor(e, t);
|
|
812
|
-
if (h?.set && h.set.call(c, o), !u) {
|
|
813
|
-
if (r && typeof t == "string") {
|
|
814
|
-
var g = n.get("length"), _ = Number(t);
|
|
815
|
-
Number.isInteger(_) && _ >= g.v && U(g, _ + 1);
|
|
816
|
-
}
|
|
817
|
-
Ut(i);
|
|
818
|
-
}
|
|
819
|
-
return !0;
|
|
820
|
-
},
|
|
821
|
-
ownKeys(e) {
|
|
822
|
-
Q(i);
|
|
823
|
-
var t = Reflect.ownKeys(e).filter((e) => {
|
|
824
|
-
var t = n.get(e);
|
|
825
|
-
return t === void 0 || t.v !== m;
|
|
826
|
-
});
|
|
827
|
-
for (var [r, a] of n) a.v !== m && !(r in e) && t.push(r);
|
|
828
|
-
return t;
|
|
829
|
-
},
|
|
830
|
-
setPrototypeOf() {
|
|
831
|
-
Ve();
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
}
|
|
835
|
-
var Kt, qt, Jt, Yt;
|
|
836
|
-
function Xt() {
|
|
837
|
-
if (Kt === void 0) {
|
|
838
|
-
Kt = window, qt = /Firefox/.test(navigator.userAgent);
|
|
839
|
-
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
840
|
-
Jt = S(t, "firstChild").get, Yt = S(t, "nextSibling").get, ie(e) && (e[_e] = void 0, e[ge] = null, e[N] = void 0, e.__e = void 0), ie(n) && (n[ve] = void 0);
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
function Zt(e = "") {
|
|
844
|
-
return document.createTextNode(e);
|
|
845
|
-
}
|
|
846
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
847
|
-
function Qt(e) {
|
|
848
|
-
return Jt.call(e);
|
|
849
|
-
}
|
|
850
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
851
|
-
function $t(e) {
|
|
852
|
-
return Yt.call(e);
|
|
853
|
-
}
|
|
854
|
-
function en(e, t) {
|
|
855
|
-
if (!P) return /* @__PURE__ */ Qt(e);
|
|
856
|
-
var n = /* @__PURE__ */ Qt(I);
|
|
857
|
-
if (n === null) n = I.appendChild(Zt());
|
|
858
|
-
else if (t && n.nodeType !== 3) {
|
|
859
|
-
var r = Zt();
|
|
860
|
-
return n?.before(r), L(r), r;
|
|
861
|
-
}
|
|
862
|
-
return t && cn(n), L(n), n;
|
|
863
|
-
}
|
|
864
|
-
function tn(e, t = !1) {
|
|
865
|
-
if (!P) {
|
|
866
|
-
var n = /* @__PURE__ */ Qt(e);
|
|
867
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ $t(n) : n;
|
|
868
|
-
}
|
|
869
|
-
if (t) {
|
|
870
|
-
if (I?.nodeType !== 3) {
|
|
871
|
-
var r = Zt();
|
|
872
|
-
return I?.before(r), L(r), r;
|
|
873
|
-
}
|
|
874
|
-
cn(I);
|
|
875
|
-
}
|
|
876
|
-
return I;
|
|
877
|
-
}
|
|
878
|
-
function nn(e, t = !1) {
|
|
879
|
-
if (!P) return /* @__PURE__ */ Qt(e);
|
|
880
|
-
var n = en(e, t);
|
|
881
|
-
return Te(e), n;
|
|
882
|
-
}
|
|
883
|
-
function rn(e, t = 1, n = !1) {
|
|
884
|
-
let r = P ? I : e;
|
|
885
|
-
for (var i; t--;) i = r, r = /* @__PURE__ */ $t(r);
|
|
886
|
-
if (!P) return r;
|
|
887
|
-
if (n) {
|
|
888
|
-
if (r?.nodeType !== 3) {
|
|
889
|
-
var a = Zt();
|
|
890
|
-
return r === null ? i?.after(a) : r.before(a), L(a), a;
|
|
891
|
-
}
|
|
892
|
-
cn(r);
|
|
893
|
-
}
|
|
894
|
-
return L(r), r;
|
|
895
|
-
}
|
|
896
|
-
function an(e) {
|
|
897
|
-
e.textContent = "";
|
|
898
|
-
}
|
|
899
|
-
function on() {
|
|
900
|
-
return !1;
|
|
901
|
-
}
|
|
902
|
-
function sn(e, t, n) {
|
|
903
|
-
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);
|
|
904
|
-
}
|
|
905
|
-
function cn(e) {
|
|
906
|
-
if (e.nodeValue.length < 65536) return;
|
|
907
|
-
let t = e.nextSibling;
|
|
908
|
-
for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
|
|
909
|
-
}
|
|
910
|
-
function ln(e) {
|
|
911
|
-
var t = J;
|
|
912
|
-
if (t === null) return K.f |= de, e;
|
|
913
|
-
if (!(t.f & 32768) && !(t.f & 4)) throw e;
|
|
914
|
-
un(e, t);
|
|
915
|
-
}
|
|
916
|
-
function un(e, t) {
|
|
917
|
-
if (!(t !== null && t.f & 16384)) {
|
|
918
|
-
for (; t !== null;) {
|
|
919
|
-
if (t.f & 128 && !(t.f & 33570816)) {
|
|
920
|
-
if (!(t.f & 32768)) throw e;
|
|
921
|
-
try {
|
|
922
|
-
t.b.error(e);
|
|
923
|
-
return;
|
|
924
|
-
} catch (t) {
|
|
925
|
-
e = t;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
t = t.parent;
|
|
929
|
-
}
|
|
930
|
-
throw e;
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
//#endregion
|
|
934
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
935
|
-
function dn(e) {
|
|
936
|
-
J === null && (K === null && Ie(e), Fe()), Ln && Pe(e);
|
|
937
|
-
}
|
|
938
|
-
function fn(e, t) {
|
|
939
|
-
var n = t.last;
|
|
940
|
-
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
941
|
-
}
|
|
942
|
-
function pn(e, t) {
|
|
943
|
-
var n = J;
|
|
944
|
-
n !== null && n.f & 8192 && (e |= oe);
|
|
945
|
-
var r = {
|
|
946
|
-
ctx: R,
|
|
947
|
-
deps: null,
|
|
948
|
-
nodes: null,
|
|
949
|
-
f: e | E | 512,
|
|
950
|
-
first: null,
|
|
951
|
-
fn: t,
|
|
952
|
-
last: null,
|
|
953
|
-
next: null,
|
|
954
|
-
parent: n,
|
|
955
|
-
b: n && n.b,
|
|
956
|
-
prev: null,
|
|
957
|
-
teardown: null,
|
|
958
|
-
wv: 0,
|
|
959
|
-
ac: null
|
|
960
|
-
};
|
|
961
|
-
V?.register_created_effect(r);
|
|
962
|
-
var i = r;
|
|
963
|
-
if (e & 4) St === null ? Et.ensure().schedule(r) : St.push(r);
|
|
964
|
-
else if (t !== null) {
|
|
965
|
-
try {
|
|
966
|
-
tr(r);
|
|
967
|
-
} catch (e) {
|
|
968
|
-
throw G(r), e;
|
|
969
|
-
}
|
|
970
|
-
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 |= le));
|
|
971
|
-
}
|
|
972
|
-
if (i !== null && (i.parent = n, n !== null && fn(i, n), K !== null && K.f & 2 && !(e & 64))) {
|
|
973
|
-
var a = K;
|
|
974
|
-
(a.effects ??= []).push(i);
|
|
975
|
-
}
|
|
976
|
-
return r;
|
|
977
|
-
}
|
|
978
|
-
function mn() {
|
|
979
|
-
return K !== null && !zn;
|
|
980
|
-
}
|
|
981
|
-
function hn(e) {
|
|
982
|
-
let t = pn(8, null);
|
|
983
|
-
return z(t, T), t.teardown = e, t;
|
|
984
|
-
}
|
|
985
|
-
function gn(e) {
|
|
986
|
-
dn("$effect");
|
|
987
|
-
var t = J.f;
|
|
988
|
-
if (!K && t & 32 && R !== null && !R.i) {
|
|
989
|
-
var n = R;
|
|
990
|
-
(n.e ??= []).push(e);
|
|
991
|
-
} else return _n(e);
|
|
992
|
-
}
|
|
993
|
-
function _n(e) {
|
|
994
|
-
return pn(4 | ue, e);
|
|
995
|
-
}
|
|
996
|
-
function vn(e) {
|
|
997
|
-
Et.ensure();
|
|
998
|
-
let t = pn(64 | k, e);
|
|
999
|
-
return () => {
|
|
1000
|
-
G(t);
|
|
1001
|
-
};
|
|
1002
|
-
}
|
|
1003
|
-
function yn(e) {
|
|
1004
|
-
Et.ensure();
|
|
1005
|
-
let t = pn(64 | k, e);
|
|
1006
|
-
return (e = {}) => new Promise((n) => {
|
|
1007
|
-
e.outro ? An(t, () => {
|
|
1008
|
-
G(t), n(void 0);
|
|
1009
|
-
}) : (G(t), n(void 0));
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
function bn(e) {
|
|
1013
|
-
return pn(4, e);
|
|
1014
|
-
}
|
|
1015
|
-
function xn(e) {
|
|
1016
|
-
return pn(M | k, e);
|
|
1017
|
-
}
|
|
1018
|
-
function Sn(e, t = 0) {
|
|
1019
|
-
return pn(8 | t, e);
|
|
1020
|
-
}
|
|
1021
|
-
function Cn(e, t = [], n = [], r = []) {
|
|
1022
|
-
rt(r, t, n, (t) => {
|
|
1023
|
-
pn(8, () => {
|
|
1024
|
-
e(...t.map(Q));
|
|
1025
|
-
});
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
function wn(e, t = 0) {
|
|
1029
|
-
return pn(16 | t, e);
|
|
1030
|
-
}
|
|
1031
|
-
function W(e) {
|
|
1032
|
-
return pn(32 | k, e);
|
|
1033
|
-
}
|
|
1034
|
-
function Tn(e) {
|
|
1035
|
-
var t = e.teardown;
|
|
1036
|
-
if (t !== null) {
|
|
1037
|
-
let n = Ln, r = K;
|
|
1038
|
-
Rn(!0), q(null);
|
|
1039
|
-
try {
|
|
1040
|
-
t.call(null);
|
|
1041
|
-
} catch (t) {
|
|
1042
|
-
un(t, e.parent);
|
|
1043
|
-
} finally {
|
|
1044
|
-
Rn(n), q(r);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
function En(e, t = !1) {
|
|
1049
|
-
var n = e.first;
|
|
1050
|
-
for (e.first = e.last = null; n !== null;) {
|
|
1051
|
-
let e = n.ac;
|
|
1052
|
-
e !== null && nt(() => {
|
|
1053
|
-
e.abort(ye);
|
|
1054
|
-
});
|
|
1055
|
-
var r = n.next;
|
|
1056
|
-
n.f & 64 ? n.parent = null : G(n, t), n = r;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
function Dn(e) {
|
|
1060
|
-
for (var t = e.first; t !== null;) {
|
|
1061
|
-
var n = t.next;
|
|
1062
|
-
t.f & 32 || G(t), t = n;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
function G(e, t = !0) {
|
|
1066
|
-
var n = !1;
|
|
1067
|
-
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (On(e.nodes.start, e.nodes.end), n = !0), e.f |= ce, En(e, t && !n), er(e, 0);
|
|
1068
|
-
var r = e.nodes && e.nodes.t;
|
|
1069
|
-
if (r !== null) for (let e of r) e.stop();
|
|
1070
|
-
Tn(e), e.f ^= ce, e.f |= se;
|
|
1071
|
-
var i = e.parent;
|
|
1072
|
-
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;
|
|
1073
|
-
}
|
|
1074
|
-
function On(e, t) {
|
|
1075
|
-
for (; e !== null;) {
|
|
1076
|
-
var n = e === t ? null : /* @__PURE__ */ $t(e);
|
|
1077
|
-
e.remove(), e = n;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
function kn(e) {
|
|
1081
|
-
var t = e.parent, n = e.prev, r = e.next;
|
|
1082
|
-
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1083
|
-
}
|
|
1084
|
-
function An(e, t, n = !0) {
|
|
1085
|
-
var r = [];
|
|
1086
|
-
e.f |= 256, jn(e, r, !0);
|
|
1087
|
-
var i = () => {
|
|
1088
|
-
n && G(e), t && t();
|
|
1089
|
-
}, a = r.length;
|
|
1090
|
-
if (a > 0) {
|
|
1091
|
-
var o = () => --a || i();
|
|
1092
|
-
for (var s of r) s.out(o);
|
|
1093
|
-
} else i();
|
|
1094
|
-
}
|
|
1095
|
-
function jn(e, t, n) {
|
|
1096
|
-
if (!(e.f & 8192)) {
|
|
1097
|
-
e.f ^= oe;
|
|
1098
|
-
var r = e.nodes && e.nodes.t;
|
|
1099
|
-
if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
|
|
1100
|
-
for (var i = e.first; i !== null;) {
|
|
1101
|
-
var a = i.next;
|
|
1102
|
-
if (!(i.f & 64)) {
|
|
1103
|
-
var o = !!(i.f & 65536) || !!(i.f & 32) && !!(e.f & 16);
|
|
1104
|
-
jn(i, t, o ? n : !1);
|
|
1105
|
-
}
|
|
1106
|
-
i = a;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
function Mn(e) {
|
|
1111
|
-
e.f &= -257, Nn(e, !0);
|
|
1112
|
-
}
|
|
1113
|
-
function Nn(e, t) {
|
|
1114
|
-
if (!(e.f & 256) && e.f & 8192) {
|
|
1115
|
-
e.f ^= oe, e.f & 1024 || (z(e, E), Et.ensure().schedule(e));
|
|
1116
|
-
for (var n = e.first; n !== null;) {
|
|
1117
|
-
var r = n.next, i = !!(n.f & 65536) || !!(n.f & 32);
|
|
1118
|
-
Nn(n, i ? t : !1), n = r;
|
|
1119
|
-
}
|
|
1120
|
-
var a = e.nodes && e.nodes.t;
|
|
1121
|
-
if (a !== null) for (let e of a) (e.is_global || t) && e.in();
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
function Pn(e, t) {
|
|
1125
|
-
if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; n !== null;) {
|
|
1126
|
-
var i = n === r ? null : /* @__PURE__ */ $t(n);
|
|
1127
|
-
t.append(n), n = i;
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
//#endregion
|
|
1131
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/legacy.js
|
|
1132
|
-
var Fn = null, In = !1, Ln = !1;
|
|
1133
|
-
function Rn(e) {
|
|
1134
|
-
Ln = e;
|
|
1135
|
-
}
|
|
1136
|
-
var K = null, zn = !1;
|
|
1137
|
-
function q(e) {
|
|
1138
|
-
K = e;
|
|
1139
|
-
}
|
|
1140
|
-
var J = null;
|
|
1141
|
-
function Y(e) {
|
|
1142
|
-
J = e;
|
|
1143
|
-
}
|
|
1144
|
-
var Bn = null;
|
|
1145
|
-
function Vn(e) {
|
|
1146
|
-
K !== null && (K.f & 2097152 || K.f & 2) && (Bn ??= /* @__PURE__ */ new Set()).add(e);
|
|
1147
|
-
}
|
|
1148
|
-
var X = null, Z = 0, Hn = null;
|
|
1149
|
-
function Un(e) {
|
|
1150
|
-
Hn = e;
|
|
1151
|
-
}
|
|
1152
|
-
var Wn = 1, Gn = 0, Kn = Gn;
|
|
1153
|
-
function qn(e) {
|
|
1154
|
-
Kn = e;
|
|
1155
|
-
}
|
|
1156
|
-
function Jn() {
|
|
1157
|
-
return ++Wn;
|
|
1158
|
-
}
|
|
1159
|
-
function Yn(e) {
|
|
1160
|
-
var t = e.f;
|
|
1161
|
-
if (t & 2048) return !0;
|
|
1162
|
-
if (t & 4096) {
|
|
1163
|
-
for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
|
|
1164
|
-
var a = n[i];
|
|
1165
|
-
if (Yn(a) && pt(a), a.wv > e.wv) return !0;
|
|
1166
|
-
}
|
|
1167
|
-
t & 512 && vt === null && z(e, T);
|
|
1168
|
-
}
|
|
1169
|
-
return !1;
|
|
1170
|
-
}
|
|
1171
|
-
function Xn(e, t, n = !0) {
|
|
1172
|
-
var r = e.reactions;
|
|
1173
|
-
if (r !== null && !(Bn !== null && Bn.has(e))) for (var i = 0; i < r.length; i++) {
|
|
1174
|
-
var a = r[i];
|
|
1175
|
-
a.f & 2 ? Xn(a, t, !1) : t === a && (n ? z(a, E) : a.f & 1024 && z(a, D), jt(a));
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
function Zn(e) {
|
|
1179
|
-
var t = X, n = Z, r = Hn, i = K, a = Bn, o = R, s = zn, c = Kn, l = e.f;
|
|
1180
|
-
X = null, Z = 0, Hn = null, K = l & 96 ? null : e, Bn = null, We(e.ctx), zn = !1, Kn = ++Gn, e.ac !== null && (nt(() => {
|
|
1181
|
-
e.ac.abort(ye);
|
|
1182
|
-
}), e.ac = null);
|
|
1183
|
-
try {
|
|
1184
|
-
e.f |= j;
|
|
1185
|
-
var u = e.fn, d = u();
|
|
1186
|
-
e.f |= O;
|
|
1187
|
-
var f = Qn(e);
|
|
1188
|
-
if (Je() && Hn !== null && !zn && f !== null && !(e.f & 6146)) for (var p = 0; p < Hn.length; p++) Xn(Hn[p], e);
|
|
1189
|
-
if (i !== null && i !== e) {
|
|
1190
|
-
if (Gn++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = Gn;
|
|
1191
|
-
if (t !== null) for (let e of t) e.rv = Gn;
|
|
1192
|
-
Hn !== null && (r === null ? r = Hn : r.push(...Hn));
|
|
1193
|
-
}
|
|
1194
|
-
return e.f & 8388608 && (e.f ^= de), d;
|
|
1195
|
-
} catch (t) {
|
|
1196
|
-
return Qn(e), ln(t);
|
|
1197
|
-
} finally {
|
|
1198
|
-
e.f ^= j, X = t, Z = n, Hn = r, K = i, Bn = a, We(o), zn = s, Kn = c;
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
function Qn(e) {
|
|
1202
|
-
var t = e.deps, n = V?.is_fork;
|
|
1203
|
-
if (X !== null) {
|
|
1204
|
-
var r;
|
|
1205
|
-
if (n || er(e, Z), t !== null && Z > 0) for (t.length = Z + X.length, r = 0; r < X.length; r++) t[Z + r] = X[r];
|
|
1206
|
-
else e.deps = t = X;
|
|
1207
|
-
if (mn() && e.f & 512) for (r = Z; r < t.length; r++) (t[r].reactions ??= []).push(e);
|
|
1208
|
-
} else !n && t !== null && Z < t.length && (er(e, Z), t.length = Z);
|
|
1209
|
-
return t;
|
|
1210
|
-
}
|
|
1211
|
-
function $n(e, t) {
|
|
1212
|
-
let n = t.reactions;
|
|
1213
|
-
if (n !== null) {
|
|
1214
|
-
var r = _.call(n, e);
|
|
1215
|
-
if (r !== -1) {
|
|
1216
|
-
var i = n.length - 1;
|
|
1217
|
-
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
if (n === null && t.f & 2 && (X === null || !v.call(X, t))) {
|
|
1221
|
-
var a = t;
|
|
1222
|
-
a.f & 512 && (a.f ^= 512), a.v !== m && et(a), a.ac !== null && nt(() => {
|
|
1223
|
-
a.ac.abort(ye), a.ac = null, z(a, E);
|
|
1224
|
-
}), mt(a), er(a, 0);
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
function er(e, t) {
|
|
1228
|
-
var n = e.deps;
|
|
1229
|
-
if (n !== null) for (var r = t; r < n.length; r++) $n(e, n[r]);
|
|
1230
|
-
}
|
|
1231
|
-
function tr(e) {
|
|
1232
|
-
var t = e.f;
|
|
1233
|
-
if (!(t & 16384)) {
|
|
1234
|
-
z(e, T);
|
|
1235
|
-
var n = J, r = In;
|
|
1236
|
-
J = e, In = !(t & 96);
|
|
1237
|
-
try {
|
|
1238
|
-
t & 16777232 ? Dn(e) : En(e), Tn(e);
|
|
1239
|
-
var i = Zn(e);
|
|
1240
|
-
e.teardown = typeof i == "function" ? i : null, e.wv = Wn;
|
|
1241
|
-
} finally {
|
|
1242
|
-
In = r, J = n;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
function Q(e) {
|
|
1247
|
-
var t = !!(e.f & 2);
|
|
1248
|
-
if (Fn?.add(e), K !== null && !zn && !(J !== null && J.f & 16384) && (Bn === null || !Bn.has(e))) {
|
|
1249
|
-
var n = K.deps;
|
|
1250
|
-
if (K.f & 2097152) e.rv < Gn && (e.rv = Gn, X === null && n !== null && n[Z] === e ? Z++ : X === null ? X = [e] : X.push(e));
|
|
1251
|
-
else {
|
|
1252
|
-
K.deps ??= [], v.call(K.deps, e) || K.deps.push(e);
|
|
1253
|
-
var r = e.reactions;
|
|
1254
|
-
r === null ? e.reactions = [K] : v.call(r, K) || r.push(K);
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
if (Ln && Ft.has(e)) return Ft.get(e);
|
|
1258
|
-
if (t) {
|
|
1259
|
-
var i = e;
|
|
1260
|
-
if (Ln) {
|
|
1261
|
-
var a = i.v;
|
|
1262
|
-
return (!(i.f & 1024) && i.reactions !== null || rr(i)) && (a = ft(i)), Ft.set(i, a), a;
|
|
1263
|
-
}
|
|
1264
|
-
var o = !(i.f & 512) && !zn && K !== null && (In || !!(K.f & 512)), s = (i.f & O) === 0;
|
|
1265
|
-
Yn(i) && (o && (i.f |= 512), pt(i)), o && !s && (ht(i), nr(i));
|
|
1266
|
-
}
|
|
1267
|
-
if (vt?.has(e)) return vt.get(e);
|
|
1268
|
-
if (e.f & 8388608) throw e.v;
|
|
1269
|
-
return e.v;
|
|
1270
|
-
}
|
|
1271
|
-
function nr(e) {
|
|
1272
|
-
if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ??= []).push(e), t.f & 2 && !(t.f & 512) && (ht(t), nr(t));
|
|
1273
|
-
}
|
|
1274
|
-
function rr(e) {
|
|
1275
|
-
if (e.v === m) return !0;
|
|
1276
|
-
if (e.deps === null) return !1;
|
|
1277
|
-
for (let t of e.deps) if (Ft.has(t) || t.f & 2 && rr(t)) return !0;
|
|
1278
|
-
return !1;
|
|
1279
|
-
}
|
|
1280
|
-
function ir(e) {
|
|
1281
|
-
var t = zn;
|
|
1282
|
-
try {
|
|
1283
|
-
return zn = !0, e();
|
|
1284
|
-
} finally {
|
|
1285
|
-
zn = t;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
function ar(e) {
|
|
1289
|
-
if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
|
|
1290
|
-
if (fe in e) or(e);
|
|
1291
|
-
else if (!Array.isArray(e)) for (let t in e) {
|
|
1292
|
-
let n = e[t];
|
|
1293
|
-
typeof n == "object" && n && fe in n && or(n);
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
function or(e, t = /* @__PURE__ */ new Set()) {
|
|
1298
|
-
if (typeof e == "object" && e && !(e instanceof EventTarget) && !t.has(e)) {
|
|
1299
|
-
t.add(e), e instanceof Date && e.getTime();
|
|
1300
|
-
for (let n in e) try {
|
|
1301
|
-
or(e[n], t);
|
|
1302
|
-
} catch {}
|
|
1303
|
-
let n = re(e);
|
|
1304
|
-
if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
|
|
1305
|
-
let t = ee(n);
|
|
1306
|
-
for (let n in t) {
|
|
1307
|
-
let r = t[n].get;
|
|
1308
|
-
if (r) try {
|
|
1309
|
-
r.call(e);
|
|
1310
|
-
} catch {}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
//#endregion
|
|
1316
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
1317
|
-
var sr = Symbol("events"), cr = /* @__PURE__ */ new Set(), lr = /* @__PURE__ */ new Set();
|
|
1318
|
-
function ur(e, t, n) {
|
|
1319
|
-
(t[sr] ??= {})[e] = n;
|
|
1320
|
-
}
|
|
1321
|
-
function dr(e) {
|
|
1322
|
-
for (var t = 0; t < e.length; t++) cr.add(e[t]);
|
|
1323
|
-
for (var n of lr) n(e);
|
|
1324
|
-
}
|
|
1325
|
-
var fr = null, pr = !1;
|
|
1326
|
-
function mr(e) {
|
|
1327
|
-
var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
|
|
1328
|
-
fr = e, pr || (pr = !0, setTimeout(() => {
|
|
1329
|
-
pr = !1, fr = null;
|
|
1330
|
-
}));
|
|
1331
|
-
var o = 0, s = fr === e && e[sr];
|
|
1332
|
-
if (s) {
|
|
1333
|
-
var c = i.indexOf(s);
|
|
1334
|
-
if (c !== -1 && (t === document || t === window)) {
|
|
1335
|
-
e[sr] = t;
|
|
1336
|
-
return;
|
|
1337
|
-
}
|
|
1338
|
-
var l = i.indexOf(t);
|
|
1339
|
-
if (l === -1) return;
|
|
1340
|
-
c <= l && (o = c);
|
|
1341
|
-
}
|
|
1342
|
-
if (a = i[o] || e.target, a !== t) {
|
|
1343
|
-
x(e, "currentTarget", {
|
|
1344
|
-
configurable: !0,
|
|
1345
|
-
get() {
|
|
1346
|
-
return a || n;
|
|
1347
|
-
}
|
|
1348
|
-
});
|
|
1349
|
-
var u = K, d = J;
|
|
1350
|
-
q(null), Y(null);
|
|
1351
|
-
try {
|
|
1352
|
-
for (var f, p = []; a !== null && a !== t;) {
|
|
1353
|
-
try {
|
|
1354
|
-
var m = a[sr]?.[r];
|
|
1355
|
-
m != null && (!a.disabled || e.target === a) && m.call(a, e);
|
|
1356
|
-
} catch (e) {
|
|
1357
|
-
f ? p.push(e) : f = e;
|
|
1358
|
-
}
|
|
1359
|
-
if (e.cancelBubble) break;
|
|
1360
|
-
o++, a = o < i.length ? i[o] : null;
|
|
1361
|
-
}
|
|
1362
|
-
if (f) {
|
|
1363
|
-
for (let e of p) queueMicrotask(() => {
|
|
1364
|
-
throw e;
|
|
1365
|
-
});
|
|
1366
|
-
throw f;
|
|
1367
|
-
}
|
|
1368
|
-
} finally {
|
|
1369
|
-
e[sr] = t, delete e.currentTarget, q(u), Y(d);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
//#endregion
|
|
1374
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
1375
|
-
var hr = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1376
|
-
function gr(e) {
|
|
1377
|
-
return hr?.createHTML(e) ?? e;
|
|
1378
|
-
}
|
|
1379
|
-
function _r(e) {
|
|
1380
|
-
var t = sn("template");
|
|
1381
|
-
return t.innerHTML = gr(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1382
|
-
}
|
|
1383
|
-
//#endregion
|
|
1384
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/template.js
|
|
1385
|
-
function vr(e, t) {
|
|
1386
|
-
var n = J;
|
|
1387
|
-
n.nodes === null && (n.nodes = {
|
|
1388
|
-
start: e,
|
|
1389
|
-
end: t,
|
|
1390
|
-
a: null,
|
|
1391
|
-
t: null
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
1395
|
-
function yr(e, t) {
|
|
1396
|
-
var n = !!(t & 1), r = !!(t & 2), i, a = !e.startsWith("<!>");
|
|
1397
|
-
return () => {
|
|
1398
|
-
if (P) return vr(I, null), I;
|
|
1399
|
-
i === void 0 && (i = _r(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ Qt(i)));
|
|
1400
|
-
var t = r || qt ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1401
|
-
if (n) {
|
|
1402
|
-
var o = /* @__PURE__ */ Qt(t), s = t.lastChild;
|
|
1403
|
-
vr(o, s);
|
|
1404
|
-
} else vr(t, t);
|
|
1405
|
-
return t;
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
function br() {
|
|
1409
|
-
if (P) return vr(I, null), I;
|
|
1410
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n = Zt();
|
|
1411
|
-
return e.append(t, n), vr(t, n), e;
|
|
1412
|
-
}
|
|
1413
|
-
function xr(e, t) {
|
|
1414
|
-
if (P) {
|
|
1415
|
-
var n = J;
|
|
1416
|
-
(!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = I), we();
|
|
1417
|
-
return;
|
|
1418
|
-
}
|
|
1419
|
-
e !== null && e.before(t);
|
|
1420
|
-
}
|
|
1421
|
-
[.../* @__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(".")];
|
|
1422
|
-
var Sr = ["touchstart", "touchmove"];
|
|
1423
|
-
function Cr(e) {
|
|
1424
|
-
return Sr.includes(e);
|
|
1425
|
-
}
|
|
1426
|
-
//#endregion
|
|
1427
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
1428
|
-
function wr(e) {
|
|
1429
|
-
let t = 0, n = Lt(0), r;
|
|
1430
|
-
return () => {
|
|
1431
|
-
mn() && (Q(n), Sn(() => (t === 0 && (r = ir(() => e(() => Ut(n)))), t += 1, () => {
|
|
1432
|
-
Ze(() => {
|
|
1433
|
-
--t, t === 0 && (r?.(), r = void 0, Ut(n));
|
|
1434
|
-
});
|
|
1435
|
-
})));
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
|
-
//#endregion
|
|
1439
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
1440
|
-
var Tr = le | k;
|
|
1441
|
-
function Er(e, t, n, r) {
|
|
1442
|
-
new Dr(e, t, n, r);
|
|
1443
|
-
}
|
|
1444
|
-
var Dr = class {
|
|
1445
|
-
parent;
|
|
1446
|
-
is_pending = !1;
|
|
1447
|
-
transform_error;
|
|
1448
|
-
#e;
|
|
1449
|
-
#t = P ? I : null;
|
|
1450
|
-
#n;
|
|
1451
|
-
#r;
|
|
1452
|
-
#i;
|
|
1453
|
-
#a = null;
|
|
1454
|
-
#o = null;
|
|
1455
|
-
#s = null;
|
|
1456
|
-
#c = null;
|
|
1457
|
-
#l = 0;
|
|
1458
|
-
#u = 0;
|
|
1459
|
-
#d = !1;
|
|
1460
|
-
#f = /* @__PURE__ */ new Set();
|
|
1461
|
-
#p = /* @__PURE__ */ new Set();
|
|
1462
|
-
#m = null;
|
|
1463
|
-
#h = wr(() => (this.#m = Lt(this.#l), () => {
|
|
1464
|
-
this.#m = null;
|
|
1465
|
-
}));
|
|
1466
|
-
constructor(e, t, n, r) {
|
|
1467
|
-
this.#e = e, this.#n = t, this.#r = (e) => {
|
|
1468
|
-
var t = J;
|
|
1469
|
-
t.b = this, t.f |= 128, n(e);
|
|
1470
|
-
}, this.parent = J.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), this.#i = wn(() => {
|
|
1471
|
-
if (P) {
|
|
1472
|
-
let e = this.#t;
|
|
1473
|
-
we();
|
|
1474
|
-
let t = e.data === "[!";
|
|
1475
|
-
if (e.data.startsWith("[?")) {
|
|
1476
|
-
let t = JSON.parse(e.data.slice(2));
|
|
1477
|
-
this.#_(t);
|
|
1478
|
-
} else t ? this.#y() : this.#g();
|
|
1479
|
-
} else this.#b();
|
|
1480
|
-
}, Tr), P && (this.#e = I);
|
|
1481
|
-
}
|
|
1482
|
-
#g() {
|
|
1483
|
-
try {
|
|
1484
|
-
this.#a = W(() => this.#r(this.#e));
|
|
1485
|
-
} catch (e) {
|
|
1486
|
-
this.error(e);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
#_(e) {
|
|
1490
|
-
let t = this.#n.failed, { reset: n, invoke_onerror: r } = this.#v(e);
|
|
1491
|
-
Ze(r), t && (this.#s = W(() => {
|
|
1492
|
-
t(this.#e, () => e, () => n);
|
|
1493
|
-
}));
|
|
1494
|
-
}
|
|
1495
|
-
#v(e) {
|
|
1496
|
-
var t = !1, n = !1;
|
|
1497
|
-
let r = () => {
|
|
1498
|
-
if (t) {
|
|
1499
|
-
Ce();
|
|
1500
|
-
return;
|
|
1501
|
-
}
|
|
1502
|
-
t = !0, n && Ue(), this.#s !== null && An(this.#s, () => {
|
|
1503
|
-
this.#s = null;
|
|
1504
|
-
}), this.#S(() => {
|
|
1505
|
-
this.#b();
|
|
1506
|
-
});
|
|
1507
|
-
};
|
|
1508
|
-
return {
|
|
1509
|
-
reset: r,
|
|
1510
|
-
invoke_onerror: () => {
|
|
1511
|
-
try {
|
|
1512
|
-
n = !0, this.#n.onerror?.(e, r), n = !1;
|
|
1513
|
-
} catch (e) {
|
|
1514
|
-
un(e, this.#i && this.#i.parent);
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
};
|
|
1518
|
-
}
|
|
1519
|
-
#y() {
|
|
1520
|
-
let e = this.#n.pending;
|
|
1521
|
-
e && (this.is_pending = !0, this.#o = W(() => e(this.#e)), Ze(() => {
|
|
1522
|
-
var e = this.#c = document.createDocumentFragment(), t = Zt(), n = !1;
|
|
1523
|
-
if (e.append(t), this.#a = this.#S(() => {
|
|
1524
|
-
try {
|
|
1525
|
-
return W(() => this.#r(t));
|
|
1526
|
-
} catch (e) {
|
|
1527
|
-
try {
|
|
1528
|
-
this.error(e), n = !0;
|
|
1529
|
-
} catch (e) {
|
|
1530
|
-
un(e, this.#i.parent);
|
|
1531
|
-
}
|
|
1532
|
-
return null;
|
|
1533
|
-
}
|
|
1534
|
-
}), this.#a === null) {
|
|
1535
|
-
this.#c = null, n && this.#x(V);
|
|
1536
|
-
return;
|
|
1537
|
-
}
|
|
1538
|
-
this.#u === 0 && (this.#e.before(e), this.#c = null, An(this.#o, () => {
|
|
1539
|
-
this.#o = null;
|
|
1540
|
-
}), this.#x(V));
|
|
1541
|
-
}));
|
|
1542
|
-
}
|
|
1543
|
-
#b() {
|
|
1544
|
-
try {
|
|
1545
|
-
if (this.is_pending = this.has_pending_snippet(), this.#u = 0, this.#l = 0, this.#a = W(() => {
|
|
1546
|
-
this.#r(this.#e);
|
|
1547
|
-
}), this.#u > 0) {
|
|
1548
|
-
var e = this.#c = document.createDocumentFragment();
|
|
1549
|
-
Pn(this.#a, e);
|
|
1550
|
-
let t = this.#n.pending;
|
|
1551
|
-
this.#o = W(() => t(this.#e));
|
|
1552
|
-
} else this.#x(V);
|
|
1553
|
-
} catch (e) {
|
|
1554
|
-
this.error(e);
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
#x(e) {
|
|
1558
|
-
this.is_pending = !1, e.transfer_effects(this.#f, this.#p);
|
|
1559
|
-
}
|
|
1560
|
-
defer_effect(e) {
|
|
1561
|
-
tt(e, this.#f, this.#p);
|
|
1562
|
-
}
|
|
1563
|
-
is_rendered() {
|
|
1564
|
-
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
1565
|
-
}
|
|
1566
|
-
has_pending_snippet() {
|
|
1567
|
-
return !!this.#n.pending;
|
|
1568
|
-
}
|
|
1569
|
-
#S(e) {
|
|
1570
|
-
var t = J, n = K, r = R;
|
|
1571
|
-
Y(this.#i), q(this.#i), We(this.#i.ctx);
|
|
1572
|
-
try {
|
|
1573
|
-
return Et.ensure(), e();
|
|
1574
|
-
} finally {
|
|
1575
|
-
Y(t), q(n), We(r);
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
#C(e, t) {
|
|
1579
|
-
if (!this.has_pending_snippet()) {
|
|
1580
|
-
this.parent && this.parent.#C(e, t);
|
|
1581
|
-
return;
|
|
1582
|
-
}
|
|
1583
|
-
this.#u += e, this.#u === 0 && (this.#x(t), this.#o && An(this.#o, () => {
|
|
1584
|
-
this.#o = null;
|
|
1585
|
-
}), this.#c &&= (this.#e.before(this.#c), null));
|
|
1586
|
-
}
|
|
1587
|
-
update_pending_count(e, t) {
|
|
1588
|
-
this.#C(e, t), this.#l += e, !(!this.#m || this.#d) && (this.#d = !0, Ze(() => {
|
|
1589
|
-
this.#d = !1, this.#m && Vt(this.#m, this.#l);
|
|
1590
|
-
}));
|
|
1591
|
-
}
|
|
1592
|
-
get_effect_pending() {
|
|
1593
|
-
return this.#h(), Q(this.#m);
|
|
1594
|
-
}
|
|
1595
|
-
error(e) {
|
|
1596
|
-
if (!this.#n.onerror && !this.#n.failed) throw e;
|
|
1597
|
-
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(() => {
|
|
1598
|
-
this.#w(e);
|
|
1599
|
-
})) : this.#w(e);
|
|
1600
|
-
}
|
|
1601
|
-
#w(e) {
|
|
1602
|
-
this.#a &&= (G(this.#a), null), this.#o &&= (G(this.#o), null), this.#s &&= (G(this.#s), null), P && (L(this.#t), Ee(), L(De()));
|
|
1603
|
-
let t = this.#n.failed, n = (e) => {
|
|
1604
|
-
let { reset: n, invoke_onerror: r } = this.#v(e);
|
|
1605
|
-
r(), t && (this.#s = this.#S(() => {
|
|
1606
|
-
try {
|
|
1607
|
-
return W(() => {
|
|
1608
|
-
var r = J;
|
|
1609
|
-
r.b = this, r.f |= 128, t(this.#e, () => e, () => n);
|
|
1610
|
-
});
|
|
1611
|
-
} catch (e) {
|
|
1612
|
-
return un(e, this.#i.parent), null;
|
|
1613
|
-
}
|
|
1614
|
-
}));
|
|
1615
|
-
};
|
|
1616
|
-
Ze(() => {
|
|
1617
|
-
var t;
|
|
1618
|
-
try {
|
|
1619
|
-
t = this.transform_error(e);
|
|
1620
|
-
} catch (e) {
|
|
1621
|
-
un(e, this.#i && this.#i.parent);
|
|
1622
|
-
return;
|
|
1623
|
-
}
|
|
1624
|
-
typeof t == "object" && t && typeof t.then == "function" ? t.then(n, (e) => un(e, this.#i && this.#i.parent)) : n(t);
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
function Or(e, t) {
|
|
1629
|
-
var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1630
|
-
n !== (e[ve] ??= e.nodeValue) && (e[ve] = n, e.nodeValue = `${n}`);
|
|
1631
|
-
}
|
|
1632
|
-
function kr(e, t) {
|
|
1633
|
-
return Mr(e, t);
|
|
1634
|
-
}
|
|
1635
|
-
function Ar(e, t) {
|
|
1636
|
-
Xt(), t.intro = t.intro ?? !1;
|
|
1637
|
-
let n = t.target, r = P, i = I;
|
|
1638
|
-
try {
|
|
1639
|
-
for (var a = /* @__PURE__ */ Qt(n); a && (a.nodeType !== 8 || a.data !== "[");) a = /* @__PURE__ */ $t(a);
|
|
1640
|
-
if (!a) throw p;
|
|
1641
|
-
F(!0), L(a);
|
|
1642
|
-
let r = Mr(e, {
|
|
1643
|
-
...t,
|
|
1644
|
-
anchor: a
|
|
1645
|
-
});
|
|
1646
|
-
return F(!1), r;
|
|
1647
|
-
} catch (r) {
|
|
1648
|
-
if (r instanceof Error && r.message.split("\n").some((e) => e.startsWith("https://svelte.dev/e/"))) throw r;
|
|
1649
|
-
return r !== p && console.warn("Failed to hydrate: ", r), t.recover === !1 && Re(), Xt(), an(n), F(!1), kr(e, t);
|
|
1650
|
-
} finally {
|
|
1651
|
-
F(r), L(i);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
var jr = /* @__PURE__ */ new Map();
|
|
1655
|
-
function Mr(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: o = !0, transformError: s }) {
|
|
1656
|
-
Xt();
|
|
1657
|
-
var c = void 0, l = yn(() => {
|
|
1658
|
-
var o = n ?? t.appendChild(Zt());
|
|
1659
|
-
Er(o, { pending: () => {} }, (t) => {
|
|
1660
|
-
Ge({});
|
|
1661
|
-
var n = R;
|
|
1662
|
-
if (a && (n.c = a), i && (r.$$events = i), P && vr(t, null), c = e(t, r) || qe(), P && (J.nodes.end = I, I === null || I.nodeType !== 8 || I.data !== "]")) throw Se(), p;
|
|
1663
|
-
Ke();
|
|
1664
|
-
}, s);
|
|
1665
|
-
var l = /* @__PURE__ */ new Set(), u = (e) => {
|
|
1666
|
-
for (var n = 0; n < e.length; n++) {
|
|
1667
|
-
var r = e[n];
|
|
1668
|
-
if (!l.has(r)) {
|
|
1669
|
-
l.add(r);
|
|
1670
|
-
var i = Cr(r);
|
|
1671
|
-
for (let e of [t, document]) {
|
|
1672
|
-
var a = jr.get(e);
|
|
1673
|
-
a === void 0 && (a = /* @__PURE__ */ new Map(), jr.set(e, a));
|
|
1674
|
-
var o = a.get(r);
|
|
1675
|
-
o === void 0 ? (e.addEventListener(r, mr, { passive: i }), a.set(r, 1)) : a.set(r, o + 1);
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
};
|
|
1680
|
-
return u(y(cr)), lr.add(u), () => {
|
|
1681
|
-
for (var e of l) for (let n of [t, document]) {
|
|
1682
|
-
var r = jr.get(n), i = r.get(e);
|
|
1683
|
-
--i == 0 ? (n.removeEventListener(e, mr), r.delete(e), r.size === 0 && jr.delete(n)) : r.set(e, i);
|
|
1684
|
-
}
|
|
1685
|
-
lr.delete(u), o !== n && o.parentNode?.removeChild(o);
|
|
1686
|
-
};
|
|
1687
|
-
});
|
|
1688
|
-
return Nr.set(c, l), c;
|
|
1689
|
-
}
|
|
1690
|
-
var Nr = /* @__PURE__ */ new WeakMap();
|
|
1691
|
-
function Pr(e, t) {
|
|
1692
|
-
let n = Nr.get(e);
|
|
1693
|
-
return n ? (Nr.delete(e), n(t)) : Promise.resolve();
|
|
1694
|
-
}
|
|
1695
|
-
//#endregion
|
|
1696
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
1697
|
-
var Fr = class {
|
|
1698
|
-
anchor;
|
|
1699
|
-
#e = /* @__PURE__ */ new Map();
|
|
1700
|
-
#t = /* @__PURE__ */ new Map();
|
|
1701
|
-
#n = /* @__PURE__ */ new Map();
|
|
1702
|
-
#r = /* @__PURE__ */ new Set();
|
|
1703
|
-
#i = !0;
|
|
1704
|
-
constructor(e, t = !0) {
|
|
1705
|
-
this.anchor = e, this.#i = t;
|
|
1706
|
-
}
|
|
1707
|
-
#a = (e) => {
|
|
1708
|
-
if (this.#e.has(e)) {
|
|
1709
|
-
var t = this.#e.get(e), n = this.#t.get(t);
|
|
1710
|
-
if (n) Mn(n), this.#r.delete(t);
|
|
1711
|
-
else {
|
|
1712
|
-
var r = this.#n.get(t);
|
|
1713
|
-
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);
|
|
1714
|
-
}
|
|
1715
|
-
for (let [t, n] of this.#e) {
|
|
1716
|
-
if (this.#e.delete(t), t === e) break;
|
|
1717
|
-
let r = this.#n.get(n);
|
|
1718
|
-
r && (G(r.effect), this.#n.delete(n));
|
|
1719
|
-
}
|
|
1720
|
-
for (let [e, r] of this.#t) {
|
|
1721
|
-
if (e === t || this.#r.has(e)) continue;
|
|
1722
|
-
let i = () => {
|
|
1723
|
-
if (Array.from(this.#e.values()).includes(e)) {
|
|
1724
|
-
var t = document.createDocumentFragment();
|
|
1725
|
-
Pn(r, t), t.append(Zt()), this.#n.set(e, {
|
|
1726
|
-
effect: r,
|
|
1727
|
-
fragment: t
|
|
1728
|
-
});
|
|
1729
|
-
} else G(r);
|
|
1730
|
-
this.#r.delete(e), this.#t.delete(e);
|
|
1731
|
-
};
|
|
1732
|
-
this.#i || !n ? (this.#r.add(e), An(r, i, !1)) : i();
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
};
|
|
1736
|
-
#o = (e) => {
|
|
1737
|
-
this.#e.delete(e);
|
|
1738
|
-
let t = Array.from(this.#e.values());
|
|
1739
|
-
for (let [e, n] of this.#n) t.includes(e) || (G(n.effect), this.#n.delete(e));
|
|
1740
|
-
};
|
|
1741
|
-
ensure(e, t) {
|
|
1742
|
-
var n = V, r = on();
|
|
1743
|
-
if (t && !this.#t.has(e) && !this.#n.has(e)) {
|
|
1744
|
-
if (r) {
|
|
1745
|
-
var i = document.createDocumentFragment(), a = Zt();
|
|
1746
|
-
i.append(a), this.#n.set(e, {
|
|
1747
|
-
effect: W(() => t(a)),
|
|
1748
|
-
fragment: i
|
|
1749
|
-
});
|
|
1750
|
-
} else this.#t.set(e, W(() => t(this.anchor)));
|
|
1751
|
-
}
|
|
1752
|
-
if (this.#e.set(n, e), r) {
|
|
1753
|
-
for (let [t, r] of this.#t) t === e ? n.unskip_effect(r) : n.skip_effect(r);
|
|
1754
|
-
for (let [t, r] of this.#n) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
|
|
1755
|
-
n.oncommit(this.#a), n.ondiscard(this.#o);
|
|
1756
|
-
} else P && (this.anchor = I), this.#a(n);
|
|
1757
|
-
}
|
|
1758
|
-
};
|
|
1759
|
-
//#endregion
|
|
1760
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
1761
|
-
function Ir(e, t, n = !1) {
|
|
1762
|
-
var r;
|
|
1763
|
-
P && (r = I, we());
|
|
1764
|
-
var i = new Fr(e), a = n ? le : 0;
|
|
1765
|
-
function o(e, t) {
|
|
1766
|
-
if (P) {
|
|
1767
|
-
var n = Oe(r);
|
|
1768
|
-
if (e !== parseInt(n.substring(1))) {
|
|
1769
|
-
var a = De();
|
|
1770
|
-
L(a), i.anchor = a, F(!1), i.ensure(e, t), F(!0);
|
|
1771
|
-
return;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
i.ensure(e, t);
|
|
1775
|
-
}
|
|
1776
|
-
wn(() => {
|
|
1777
|
-
var e = !1;
|
|
1778
|
-
t((t, n = 0) => {
|
|
1779
|
-
e = !0, o(n, t);
|
|
1780
|
-
}), e || o(-1, null);
|
|
1781
|
-
}, a);
|
|
1782
|
-
}
|
|
1783
|
-
//#endregion
|
|
1784
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/each.js
|
|
1785
|
-
function Lr(e, t, n) {
|
|
1786
|
-
for (var r = [], i = t.length, a, o = t.length, s = 0; s < i; s++) {
|
|
1787
|
-
let n = t[s];
|
|
1788
|
-
An(n, () => {
|
|
1789
|
-
if (a) {
|
|
1790
|
-
if (a.pending.delete(n), a.done.add(n), a.pending.size === 0) {
|
|
1791
|
-
var t = e.outrogroups;
|
|
1792
|
-
Rr(e, y(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
|
|
1793
|
-
}
|
|
1794
|
-
} else --o;
|
|
1795
|
-
}, !1);
|
|
1796
|
-
}
|
|
1797
|
-
if (o === 0) {
|
|
1798
|
-
var c = r.length === 0 && n !== null && e.pending.size === 0;
|
|
1799
|
-
if (c) {
|
|
1800
|
-
var l = n, u = l.parentNode;
|
|
1801
|
-
an(u), u.append(l), e.items.clear();
|
|
1802
|
-
}
|
|
1803
|
-
Rr(e, t, !c);
|
|
1804
|
-
} else a = {
|
|
1805
|
-
pending: new Set(t),
|
|
1806
|
-
done: /* @__PURE__ */ new Set()
|
|
1807
|
-
}, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(a);
|
|
1808
|
-
}
|
|
1809
|
-
function Rr(e, t, n = !0) {
|
|
1810
|
-
var r;
|
|
1811
|
-
if (e.pending.size > 0) {
|
|
1812
|
-
r = /* @__PURE__ */ new Set();
|
|
1813
|
-
for (let t of e.pending.values()) for (let n of t) r.add(e.items.get(n).e);
|
|
1814
|
-
}
|
|
1815
|
-
for (var i = 0; i < t.length; i++) {
|
|
1816
|
-
var a = t[i];
|
|
1817
|
-
r?.has(a) ? (a.f |= A, Pn(a, document.createDocumentFragment())) : G(t[i], n);
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
var zr;
|
|
1821
|
-
function Br(e, t, n, r, i, a = null) {
|
|
1822
|
-
var o = e, s = /* @__PURE__ */ new Map();
|
|
1823
|
-
if (t & 4) {
|
|
1824
|
-
var c = e;
|
|
1825
|
-
o = P ? L(/* @__PURE__ */ Qt(c)) : c.appendChild(Zt());
|
|
1826
|
-
}
|
|
1827
|
-
P && we();
|
|
1828
|
-
var l = null, u = /* @__PURE__ */ ut(() => {
|
|
1829
|
-
var e = n();
|
|
1830
|
-
return g(e) ? e : e == null ? [] : y(e);
|
|
1831
|
-
}), d, f = /* @__PURE__ */ new Map(), p = !0;
|
|
1832
|
-
function m(e) {
|
|
1833
|
-
_.effect.f & 16384 || (_.pending.delete(e), _.fallback = l, Hr(_, d, o, t, r), l !== null && (d.length === 0 ? l.f & 33554432 ? (l.f ^= A, Wr(l, null, o)) : Mn(l) : An(l, () => {
|
|
1834
|
-
l = null;
|
|
1835
|
-
})));
|
|
1836
|
-
}
|
|
1837
|
-
function h(e) {
|
|
1838
|
-
_.pending.delete(e);
|
|
1839
|
-
}
|
|
1840
|
-
var _ = {
|
|
1841
|
-
effect: wn(() => {
|
|
1842
|
-
d = Q(u);
|
|
1843
|
-
var e = d.length;
|
|
1844
|
-
let c = !1;
|
|
1845
|
-
P && Oe(o) === "[!" != (e === 0) && (o = De(), L(o), F(!1), c = !0);
|
|
1846
|
-
for (var g = /* @__PURE__ */ new Set(), _ = V, v = on(), y = 0; y < e; y += 1) {
|
|
1847
|
-
P && I.nodeType === 8 && I.data === "]" && (o = I, c = !0, F(!1));
|
|
1848
|
-
var b = d[y], x = r(b, y), S = p ? null : s.get(x);
|
|
1849
|
-
S ? (S.v && Vt(S.v, b), S.i && Vt(S.i, y), v && _.unskip_effect(S.e)) : (S = Ur(s, p ? o : zr ??= Zt(), b, x, y, i, t, n), p || (S.e.f |= A), s.set(x, S)), g.add(x);
|
|
1850
|
-
}
|
|
1851
|
-
if (e === 0 && a && !l && (p ? l = W(() => a(o)) : (l = W(() => a(zr ??= Zt())), l.f |= A)), e > g.size && Ne("", "", ""), P && e > 0 && L(De()), !p) {
|
|
1852
|
-
if (f.set(_, g), v) {
|
|
1853
|
-
for (let [e, t] of s) g.has(e) || _.skip_effect(t.e);
|
|
1854
|
-
_.oncommit(m), _.ondiscard(h);
|
|
1855
|
-
} else m(_);
|
|
1856
|
-
}
|
|
1857
|
-
c && F(!0), Q(u);
|
|
1858
|
-
}),
|
|
1859
|
-
flags: t,
|
|
1860
|
-
items: s,
|
|
1861
|
-
pending: f,
|
|
1862
|
-
outrogroups: null,
|
|
1863
|
-
fallback: l
|
|
1864
|
-
};
|
|
1865
|
-
p = !1, P && (o = I);
|
|
1866
|
-
}
|
|
1867
|
-
function Vr(e) {
|
|
1868
|
-
for (; e !== null && !(e.f & 32);) e = e.next;
|
|
1869
|
-
return e;
|
|
1870
|
-
}
|
|
1871
|
-
function Hr(e, t, n, r, i) {
|
|
1872
|
-
var a = !!(r & 8), o = t.length, s = e.items, c = Vr(e.effect.first), l, u = null, d, f = [], p = [], m, h, g, _;
|
|
1873
|
-
if (a) for (_ = 0; _ < o; _ += 1) m = t[_], h = i(m, _), g = s.get(h).e, g.f & 33554432 || (g.nodes?.a?.measure(), (d ??= /* @__PURE__ */ new Set()).add(g));
|
|
1874
|
-
for (_ = 0; _ < o; _ += 1) {
|
|
1875
|
-
if (m = t[_], h = i(m, _), g = s.get(h).e, e.outrogroups !== null) for (let t of e.outrogroups) t.pending.delete(g), t.done.delete(g);
|
|
1876
|
-
if (g.f & 8192 && (Mn(g), a && (g.nodes?.a?.unfix(), (d ??= /* @__PURE__ */ new Set()).delete(g))), g.f & 33554432) {
|
|
1877
|
-
if (g.f ^= A, g === c) Wr(g, null, n);
|
|
1878
|
-
else {
|
|
1879
|
-
var v = u ? u.next : c;
|
|
1880
|
-
g === e.effect.last && (e.effect.last = g.prev), g.prev && (g.prev.next = g.next), g.next && (g.next.prev = g.prev), Gr(e, u, g), Gr(e, g, v), Wr(g, v, n), u = g, f = [], p = [], c = Vr(u.next);
|
|
1881
|
-
continue;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
if (g !== c) {
|
|
1885
|
-
if (l !== void 0 && l.has(g)) {
|
|
1886
|
-
if (f.length < p.length) {
|
|
1887
|
-
var b = p[0], x;
|
|
1888
|
-
u = b.prev;
|
|
1889
|
-
var S = f[0], ee = f[f.length - 1];
|
|
1890
|
-
for (x = 0; x < f.length; x += 1) Wr(f[x], b, n);
|
|
1891
|
-
for (x = 0; x < p.length; x += 1) l.delete(p[x]);
|
|
1892
|
-
Gr(e, S.prev, ee.next), Gr(e, u, S), Gr(e, ee, b), c = b, u = ee, --_, f = [], p = [];
|
|
1893
|
-
} else l.delete(g), Wr(g, c, n), Gr(e, g.prev, g.next), Gr(e, g, u === null ? e.effect.first : u.next), Gr(e, u, g), u = g;
|
|
1894
|
-
continue;
|
|
1895
|
-
}
|
|
1896
|
-
for (f = [], p = []; c !== null && c !== g;) (l ??= /* @__PURE__ */ new Set()).add(c), p.push(c), c = Vr(c.next);
|
|
1897
|
-
if (c === null) continue;
|
|
1898
|
-
}
|
|
1899
|
-
g.f & 33554432 || f.push(g), u = g, c = Vr(g.next);
|
|
1900
|
-
}
|
|
1901
|
-
if (e.outrogroups !== null) {
|
|
1902
|
-
for (let t of e.outrogroups) t.pending.size === 0 && (Rr(e, y(t.done)), e.outrogroups?.delete(t));
|
|
1903
|
-
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
1904
|
-
}
|
|
1905
|
-
if (c !== null || l !== void 0) {
|
|
1906
|
-
var te = [];
|
|
1907
|
-
if (l !== void 0) for (g of l) g.f & 8192 || te.push(g);
|
|
1908
|
-
for (; c !== null;) !(c.f & 8192) && c !== e.fallback && te.push(c), c = Vr(c.next);
|
|
1909
|
-
var ne = te.length;
|
|
1910
|
-
if (ne > 0) {
|
|
1911
|
-
var re = r & 4 && o === 0 ? n : null;
|
|
1912
|
-
if (a) {
|
|
1913
|
-
for (_ = 0; _ < ne; _ += 1) te[_].nodes?.a?.measure();
|
|
1914
|
-
for (_ = 0; _ < ne; _ += 1) te[_].nodes?.a?.fix();
|
|
1915
|
-
}
|
|
1916
|
-
Lr(e, te, re);
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
a && Ze(() => {
|
|
1920
|
-
if (d !== void 0) for (g of d) g.nodes?.a?.apply();
|
|
1921
|
-
});
|
|
1922
|
-
}
|
|
1923
|
-
function Ur(e, t, n, r, i, a, o, s) {
|
|
1924
|
-
var c = o & 1 ? o & 16 ? Lt(n) : /* @__PURE__ */ Rt(n, !1, !1) : null, l = o & 2 ? Lt(i) : null;
|
|
1925
|
-
return {
|
|
1926
|
-
v: c,
|
|
1927
|
-
i: l,
|
|
1928
|
-
e: W(() => (a(t, c ?? n, l ?? i, s), () => {
|
|
1929
|
-
e.delete(r);
|
|
1930
|
-
}))
|
|
1931
|
-
};
|
|
1932
|
-
}
|
|
1933
|
-
function Wr(e, t, n) {
|
|
1934
|
-
if (e.nodes) for (var r = e.nodes.start, i = e.nodes.end, a = t && !(t.f & 33554432) ? t.nodes.start : n; r !== null;) {
|
|
1935
|
-
var o = /* @__PURE__ */ $t(r);
|
|
1936
|
-
if (a.before(r), r === i) return;
|
|
1937
|
-
r = o;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
function Gr(e, t, n) {
|
|
1941
|
-
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
1942
|
-
}
|
|
1943
|
-
//#endregion
|
|
1944
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/css.js
|
|
1945
|
-
function Kr(e, t) {
|
|
1946
|
-
bn(() => {
|
|
1947
|
-
e = J?.parent?.nodes?.start ?? e;
|
|
1948
|
-
var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
|
|
1949
|
-
if (!r.querySelector("#" + t.hash)) {
|
|
1950
|
-
let e = sn("style");
|
|
1951
|
-
e.id = t.hash, e.textContent = t.code, r.appendChild(e);
|
|
1952
|
-
}
|
|
1953
|
-
});
|
|
1954
|
-
}
|
|
1955
|
-
//#endregion
|
|
1956
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/actions.js
|
|
1957
|
-
function qr(e, t, n) {
|
|
1958
|
-
bn(() => {
|
|
1959
|
-
var r = ir(() => t(e, n?.()) || {});
|
|
1960
|
-
if (n && r?.update) {
|
|
1961
|
-
var i = !1, a = {};
|
|
1962
|
-
Sn(() => {
|
|
1963
|
-
var e = n();
|
|
1964
|
-
ar(e), i && Ae(a, e) && (a = e, r.update(e));
|
|
1965
|
-
}), i = !0;
|
|
1966
|
-
}
|
|
1967
|
-
if (r?.destroy) return () => r.destroy();
|
|
1968
|
-
});
|
|
1969
|
-
}
|
|
1970
|
-
//#endregion
|
|
1971
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/shared/attributes.js
|
|
1972
|
-
var Jr = [..." \n\r\f\xA0\v"];
|
|
1973
|
-
function Yr(e, t, n) {
|
|
1974
|
-
var r = e == null ? "" : "" + e;
|
|
1975
|
-
if (t && (r = r ? r + " " + t : t), n) {
|
|
1976
|
-
for (var i of Object.keys(n)) if (n[i]) r = r ? r + " " + i : i;
|
|
1977
|
-
else if (r.length) for (var a = i.length, o = 0; (o = r.indexOf(i, o)) >= 0;) {
|
|
1978
|
-
var s = o + a;
|
|
1979
|
-
(o === 0 || Jr.includes(r[o - 1])) && (s === r.length || Jr.includes(r[s])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(s + 1) : o = s;
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
return r === "" ? null : r;
|
|
1983
|
-
}
|
|
1984
|
-
function Xr(e, t = !1) {
|
|
1985
|
-
var n = t ? " !important;" : ";", r = "";
|
|
1986
|
-
for (var i of Object.keys(e)) {
|
|
1987
|
-
var a = e[i];
|
|
1988
|
-
a != null && a !== "" && (r += " " + i + ": " + a + n);
|
|
1989
|
-
}
|
|
1990
|
-
return r;
|
|
1991
|
-
}
|
|
1992
|
-
function Zr(e) {
|
|
1993
|
-
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
1994
|
-
}
|
|
1995
|
-
function Qr(e, t) {
|
|
1996
|
-
if (t) {
|
|
1997
|
-
var n = "", r, i;
|
|
1998
|
-
if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
|
|
1999
|
-
e = String(e).replaceAll(/\/\*.*?\*\//g, "").trim();
|
|
2000
|
-
var a = !1, o = 0, s = !1, c = [];
|
|
2001
|
-
r && c.push(...Object.keys(r).map(Zr)), i && c.push(...Object.keys(i).map(Zr));
|
|
2002
|
-
var l = 0, u = -1;
|
|
2003
|
-
let t = e.length;
|
|
2004
|
-
for (var d = 0; d < t; d++) {
|
|
2005
|
-
var f = e[d];
|
|
2006
|
-
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) {
|
|
2007
|
-
if (f === ":" && u === -1) u = d;
|
|
2008
|
-
else if (f === ";" || d === t - 1) {
|
|
2009
|
-
if (u !== -1) {
|
|
2010
|
-
var p = Zr(e.substring(l, u).trim());
|
|
2011
|
-
if (!c.includes(p)) {
|
|
2012
|
-
f !== ";" && d++;
|
|
2013
|
-
var m = e.substring(l, d).trim();
|
|
2014
|
-
n += " " + m + ";";
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
l = d + 1, u = -1;
|
|
2018
|
-
}
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
return r && (n += Xr(r)), i && (n += Xr(i, !0)), n = n.trim(), n === "" ? null : n;
|
|
2023
|
-
}
|
|
2024
|
-
return e == null ? null : String(e);
|
|
2025
|
-
}
|
|
2026
|
-
//#endregion
|
|
2027
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/class.js
|
|
2028
|
-
function $r(e, t, n, r, i, a) {
|
|
2029
|
-
var o = e[_e];
|
|
2030
|
-
if (P || o !== n || o === void 0) {
|
|
2031
|
-
var s = Yr(n, r, a);
|
|
2032
|
-
(!P || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[_e] = n;
|
|
2033
|
-
} else if (a && i !== a) for (var c in a) {
|
|
2034
|
-
var l = !!a[c];
|
|
2035
|
-
(i == null || l !== !!i[c]) && e.classList.toggle(c, l);
|
|
2036
|
-
}
|
|
2037
|
-
return a;
|
|
2038
|
-
}
|
|
2039
|
-
//#endregion
|
|
2040
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/style.js
|
|
2041
|
-
function ei(e, t = {}, n, r) {
|
|
2042
|
-
for (var i in n) {
|
|
2043
|
-
var a = n[i];
|
|
2044
|
-
t[i] !== a && (n[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, a, r));
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
function ti(e, t, n, r) {
|
|
2048
|
-
var i = e[N];
|
|
2049
|
-
if (P || i !== t) {
|
|
2050
|
-
var a = Qr(t, r);
|
|
2051
|
-
(!P || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e[N] = t;
|
|
2052
|
-
} else r && (Array.isArray(r) ? (ei(e, n?.[0], r[0]), ei(e, n?.[1], r[1], "important")) : ei(e, n, r));
|
|
2053
|
-
return r;
|
|
2054
|
-
}
|
|
2055
|
-
//#endregion
|
|
2056
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
2057
|
-
var ni = Symbol("is custom element"), ri = Symbol("is html"), ii = be ? "link" : "LINK";
|
|
2058
|
-
function $(e, t, n, r) {
|
|
2059
|
-
var i = oi(e);
|
|
2060
|
-
P && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ii) || i[t] !== (i[t] = n) && (t === "loading" && (e[he] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ci(e).has(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2061
|
-
}
|
|
2062
|
-
function ai(e, t, n) {
|
|
2063
|
-
var r = K, i = J;
|
|
2064
|
-
let a = P;
|
|
2065
|
-
P && F(!1), q(null), Y(null);
|
|
2066
|
-
try {
|
|
2067
|
-
t !== "style" && (si.has(e.getAttribute("is") || e.nodeName) || !customElements || customElements.get(e.getAttribute("is") || e.nodeName.toLowerCase()) ? ci(e).has(t) : n && typeof n == "object") ? e[t] = n : $(e, t, n == null ? n : String(n));
|
|
2068
|
-
} finally {
|
|
2069
|
-
q(r), Y(i), a && F(!0);
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
function oi(e) {
|
|
2073
|
-
return e[ge] ??= {
|
|
2074
|
-
[ni]: e.nodeName.includes("-"),
|
|
2075
|
-
[ri]: e.namespaceURI === h
|
|
2076
|
-
};
|
|
2077
|
-
}
|
|
2078
|
-
var si = /* @__PURE__ */ new Map();
|
|
2079
|
-
function ci(e) {
|
|
2080
|
-
var t = e.getAttribute("is") || e.nodeName, n = si.get(t);
|
|
2081
|
-
if (n) return n;
|
|
2082
|
-
si.set(t, n = /* @__PURE__ */ new Set());
|
|
2083
|
-
for (var r, i = e, a = Element.prototype; a !== i;) {
|
|
2084
|
-
for (var o in r = ee(i), r) r[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && n.add(o);
|
|
2085
|
-
i = re(i);
|
|
2086
|
-
}
|
|
2087
|
-
return n;
|
|
2088
|
-
}
|
|
2089
|
-
//#endregion
|
|
2090
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
|
|
2091
|
-
function li(e, t) {
|
|
2092
|
-
return e === t || e?.[fe] === t;
|
|
2093
|
-
}
|
|
2094
|
-
function ui(e = qe(), t, n, r) {
|
|
2095
|
-
var i = R.r, a = J;
|
|
2096
|
-
return bn(() => {
|
|
2097
|
-
var o, s;
|
|
2098
|
-
return Sn(() => {
|
|
2099
|
-
o = s, s = r?.() || [], ir(() => {
|
|
2100
|
-
li(n(...s), e) || (t(e, ...s), o && li(n(...o), e) && t(null, ...o));
|
|
2101
|
-
});
|
|
2102
|
-
}), () => {
|
|
2103
|
-
let r = a;
|
|
2104
|
-
for (; r !== i && r.parent !== null && r.parent.f & 33554432;) r = r.parent;
|
|
2105
|
-
let o = () => {
|
|
2106
|
-
s && li(n(...s), e) && t(null, ...s);
|
|
2107
|
-
}, c = r.teardown;
|
|
2108
|
-
r.teardown = () => {
|
|
2109
|
-
o(), c?.();
|
|
2110
|
-
};
|
|
2111
|
-
};
|
|
2112
|
-
}), e;
|
|
2113
|
-
}
|
|
2114
|
-
//#endregion
|
|
2115
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
2116
|
-
var di = !1;
|
|
2117
|
-
function fi(e) {
|
|
2118
|
-
var t = di;
|
|
2119
|
-
try {
|
|
2120
|
-
return di = !1, [e(), di];
|
|
2121
|
-
} finally {
|
|
2122
|
-
di = t;
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
//#endregion
|
|
2126
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
2127
|
-
function pi(e, t, n, r) {
|
|
2128
|
-
var i = !0, a = !!(n & 8), o = !!(n & 16), s = r, c = !0, l = void 0, u = () => o && i ? (l ??= /* @__PURE__ */ st(r), Q(l)) : (c && (c = !1, s = o ? ir(r) : r), s);
|
|
2129
|
-
let d;
|
|
2130
|
-
if (a) {
|
|
2131
|
-
var f = fe in e || me in e;
|
|
2132
|
-
d = S(e, t)?.set ?? (f && t in e ? (n) => e[t] = n : void 0);
|
|
2133
|
-
}
|
|
2134
|
-
var p, m = !1;
|
|
2135
|
-
a ? [p, m] = fi(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), d && (i && ze(t), d(p)));
|
|
2136
|
-
var h = i ? () => {
|
|
2137
|
-
var n = e[t];
|
|
2138
|
-
return n === void 0 ? u() : (c = !0, n);
|
|
2139
|
-
} : () => {
|
|
2140
|
-
var n = e[t];
|
|
2141
|
-
return n !== void 0 && (s = void 0), n === void 0 ? s : n;
|
|
2142
|
-
};
|
|
2143
|
-
if (i && !(n & 4)) return h;
|
|
2144
|
-
if (d) {
|
|
2145
|
-
var g = e.$$legacy;
|
|
2146
|
-
return (function(e, t) {
|
|
2147
|
-
return arguments.length > 0 ? ((!i || !t || g || m) && d(t ? h() : e), e) : h();
|
|
2148
|
-
});
|
|
2149
|
-
}
|
|
2150
|
-
var _ = !1, v = (n & 1 ? st : ut)(() => (_ = !1, h()));
|
|
2151
|
-
a && Q(v);
|
|
2152
|
-
var y = J;
|
|
2153
|
-
return (function(e, t) {
|
|
2154
|
-
if (arguments.length > 0) {
|
|
2155
|
-
let n = t ? Q(v) : i && a ? Gt(e) : e;
|
|
2156
|
-
return U(v, n), _ = !0, s !== void 0 && (s = n), e;
|
|
2157
|
-
}
|
|
2158
|
-
return Ln && _ || y.f & 16384 ? v.v : Q(v);
|
|
2159
|
-
});
|
|
2160
|
-
}
|
|
2161
|
-
//#endregion
|
|
2162
|
-
//#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/legacy/legacy-client.js
|
|
2163
|
-
function mi(e) {
|
|
2164
|
-
return new hi(e);
|
|
2165
|
-
}
|
|
2166
|
-
var hi = class {
|
|
2167
|
-
#e;
|
|
2168
|
-
#t;
|
|
2169
|
-
constructor(e) {
|
|
2170
|
-
var t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
2171
|
-
var r = /* @__PURE__ */ Rt(n, !1, !1);
|
|
2172
|
-
return t.set(e, r), r;
|
|
2173
|
-
};
|
|
2174
|
-
let r = new Proxy({
|
|
2175
|
-
...e.props || {},
|
|
2176
|
-
$$events: {}
|
|
2177
|
-
}, {
|
|
2178
|
-
get(e, r) {
|
|
2179
|
-
return Q(t.get(r) ?? n(r, Reflect.get(e, r)));
|
|
2180
|
-
},
|
|
2181
|
-
has(e, r) {
|
|
2182
|
-
return r === me || (Q(t.get(r) ?? n(r, Reflect.get(e, r))), Reflect.has(e, r));
|
|
2183
|
-
},
|
|
2184
|
-
set(e, r, i) {
|
|
2185
|
-
return U(t.get(r) ?? n(r, i), i), Reflect.set(e, r, i);
|
|
2186
|
-
}
|
|
2187
|
-
});
|
|
2188
|
-
this.#t = (e.hydrate ? Ar : kr)(e.component, {
|
|
2189
|
-
target: e.target,
|
|
2190
|
-
anchor: e.anchor,
|
|
2191
|
-
props: r,
|
|
2192
|
-
context: e.context,
|
|
2193
|
-
intro: e.intro ?? !1,
|
|
2194
|
-
recover: e.recover,
|
|
2195
|
-
transformError: e.transformError
|
|
2196
|
-
}), (!e?.props?.$$host || e.sync === !1) && Dt(), this.#e = r.$$events;
|
|
2197
|
-
for (let e of Object.keys(this.#t)) e !== "$set" && e !== "$destroy" && e !== "$on" && x(this, e, {
|
|
2198
|
-
get() {
|
|
2199
|
-
return this.#t[e];
|
|
2200
|
-
},
|
|
2201
|
-
set(t) {
|
|
2202
|
-
this.#t[e] = t;
|
|
2203
|
-
},
|
|
2204
|
-
enumerable: !0
|
|
2205
|
-
});
|
|
2206
|
-
this.#t.$set = (e) => {
|
|
2207
|
-
Object.assign(r, e);
|
|
2208
|
-
}, this.#t.$destroy = () => {
|
|
2209
|
-
Pr(this.#t);
|
|
2210
|
-
};
|
|
2211
|
-
}
|
|
2212
|
-
$set(e) {
|
|
2213
|
-
this.#t.$set(e);
|
|
2214
|
-
}
|
|
2215
|
-
$on(e, t) {
|
|
2216
|
-
this.#e[e] = this.#e[e] || [];
|
|
2217
|
-
let n = (...e) => t.call(this, ...e);
|
|
2218
|
-
return this.#e[e].push(n), () => {
|
|
2219
|
-
this.#e[e] = this.#e[e].filter((e) => e !== n);
|
|
2220
|
-
};
|
|
2221
|
-
}
|
|
2222
|
-
$destroy() {
|
|
2223
|
-
this.#t.$destroy();
|
|
2224
|
-
}
|
|
2225
|
-
}, gi;
|
|
2226
|
-
typeof HTMLElement == "function" && (gi = class extends HTMLElement {
|
|
2227
|
-
$$ctor;
|
|
2228
|
-
$$s;
|
|
2229
|
-
$$c;
|
|
2230
|
-
$$cn = !1;
|
|
2231
|
-
$$d = {};
|
|
2232
|
-
$$r = !1;
|
|
2233
|
-
$$p_d = {};
|
|
2234
|
-
$$l = {};
|
|
2235
|
-
$$l_u = /* @__PURE__ */ new Map();
|
|
2236
|
-
$$me;
|
|
2237
|
-
$$shadowRoot = null;
|
|
2238
|
-
constructor(e, t, n) {
|
|
2239
|
-
super(), this.$$ctor = e, this.$$s = t, n && (this.$$shadowRoot = this.attachShadow(n));
|
|
2240
|
-
}
|
|
2241
|
-
addEventListener(e, t, n) {
|
|
2242
|
-
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
2243
|
-
let n = this.$$c.$on(e, t);
|
|
2244
|
-
this.$$l_u.set(t, n);
|
|
2245
|
-
}
|
|
2246
|
-
super.addEventListener(e, t, n);
|
|
2247
|
-
}
|
|
2248
|
-
removeEventListener(e, t, n) {
|
|
2249
|
-
if (super.removeEventListener(e, t, n), this.$$c) {
|
|
2250
|
-
let e = this.$$l_u.get(t);
|
|
2251
|
-
e && (e(), this.$$l_u.delete(t));
|
|
2252
|
-
}
|
|
2253
|
-
}
|
|
2254
|
-
async connectedCallback() {
|
|
2255
|
-
if (this.$$cn = !0, !this.$$c) {
|
|
2256
|
-
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2257
|
-
function e(e) {
|
|
2258
|
-
return (t) => {
|
|
2259
|
-
let n = sn("slot");
|
|
2260
|
-
e !== "default" && (n.name = e), xr(t, n);
|
|
2261
|
-
};
|
|
2262
|
-
}
|
|
2263
|
-
let t = {}, n = vi(this);
|
|
2264
|
-
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));
|
|
2265
|
-
for (let e of this.attributes) {
|
|
2266
|
-
let t = this.$$g_p(e.name);
|
|
2267
|
-
t in this.$$d || (this.$$d[t] = _i(t, e.value, this.$$p_d, "toProp"));
|
|
2268
|
-
}
|
|
2269
|
-
for (let e in this.$$p_d) !(e in this.$$d) && this[e] !== void 0 && (this.$$d[e] = this[e], delete this[e]);
|
|
2270
|
-
this.$$c = mi({
|
|
2271
|
-
component: this.$$ctor,
|
|
2272
|
-
target: this.$$shadowRoot || this,
|
|
2273
|
-
props: {
|
|
2274
|
-
...this.$$d,
|
|
2275
|
-
$$slots: t,
|
|
2276
|
-
$$host: this
|
|
2277
|
-
}
|
|
2278
|
-
}), this.$$me = vn(() => {
|
|
2279
|
-
Sn(() => {
|
|
2280
|
-
this.$$r = !0;
|
|
2281
|
-
for (let e of b(this.$$c)) {
|
|
2282
|
-
if (!this.$$p_d[e]?.reflect) continue;
|
|
2283
|
-
this.$$d[e] = this.$$c[e];
|
|
2284
|
-
let t = _i(e, this.$$d[e], this.$$p_d, "toAttribute");
|
|
2285
|
-
t == null ? this.removeAttribute(this.$$p_d[e].attribute || e) : this.setAttribute(this.$$p_d[e].attribute || e, t);
|
|
2286
|
-
}
|
|
2287
|
-
this.$$r = !1;
|
|
2288
|
-
});
|
|
2289
|
-
});
|
|
2290
|
-
for (let e in this.$$l) for (let t of this.$$l[e]) {
|
|
2291
|
-
let n = this.$$c.$on(e, t);
|
|
2292
|
-
this.$$l_u.set(t, n);
|
|
2293
|
-
}
|
|
2294
|
-
this.$$l = {};
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
attributeChangedCallback(e, t, n) {
|
|
2298
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] = _i(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2299
|
-
}
|
|
2300
|
-
disconnectedCallback() {
|
|
2301
|
-
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2302
|
-
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
$$g_p(e) {
|
|
2306
|
-
return b(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
2307
|
-
}
|
|
2308
|
-
});
|
|
2309
|
-
function _i(e, t, n, r) {
|
|
2310
|
-
let i = n[e]?.type;
|
|
2311
|
-
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e]) return t;
|
|
2312
|
-
if (r === "toAttribute") switch (i) {
|
|
2313
|
-
case "Object":
|
|
2314
|
-
case "Array": return t == null ? null : JSON.stringify(t);
|
|
2315
|
-
case "Boolean": return t ? "" : null;
|
|
2316
|
-
case "Number": return t ?? null;
|
|
2317
|
-
default: return t;
|
|
2318
|
-
}
|
|
2319
|
-
else switch (i) {
|
|
2320
|
-
case "Object":
|
|
2321
|
-
case "Array": return t && JSON.parse(t);
|
|
2322
|
-
case "Boolean": return t;
|
|
2323
|
-
case "Number": return t == null ? t : +t;
|
|
2324
|
-
default: return t;
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
function vi(e) {
|
|
2328
|
-
let t = {};
|
|
2329
|
-
return e.childNodes.forEach((e) => {
|
|
2330
|
-
t[e.slot || "default"] = !0;
|
|
2331
|
-
}), t;
|
|
2332
|
-
}
|
|
2333
|
-
function yi(e, t, n, r, i, a) {
|
|
2334
|
-
let o = class extends gi {
|
|
2335
|
-
constructor() {
|
|
2336
|
-
super(e, n, i), this.$$p_d = t;
|
|
2337
|
-
}
|
|
2338
|
-
static get observedAttributes() {
|
|
2339
|
-
return b(t).map((e) => (t[e].attribute || e).toLowerCase());
|
|
2340
|
-
}
|
|
2341
|
-
};
|
|
2342
|
-
return b(t).forEach((e) => {
|
|
2343
|
-
x(o.prototype, e, {
|
|
2344
|
-
get() {
|
|
2345
|
-
return this.$$c && e in this.$$c ? this.$$c[e] : this.$$d[e];
|
|
2346
|
-
},
|
|
2347
|
-
set(n) {
|
|
2348
|
-
n = _i(e, n, t), this.$$d[e] = n;
|
|
2349
|
-
var r = this.$$c;
|
|
2350
|
-
r && (S(r, e)?.get ? r[e] = n : r.$set({ [e]: n }));
|
|
2351
|
-
}
|
|
2352
|
-
});
|
|
2353
|
-
}), r.forEach((e) => {
|
|
2354
|
-
x(o.prototype, e, { get() {
|
|
2355
|
-
return this.$$c?.[e];
|
|
2356
|
-
} });
|
|
2357
|
-
}), a && (o = a(o)), e.element = o, o;
|
|
2358
|
-
}
|
|
2359
|
-
//#endregion
|
|
2360
|
-
//#region tool-tts-inline.svelte
|
|
2361
|
-
var bi = /* @__PURE__ */ yr("<nds-icon-button></nds-icon-button>", 2), xi = /* @__PURE__ */ yr("<button type=\"button\"><i aria-hidden=\"true\"></i></button>"), Si = /* @__PURE__ */ yr("<span class=\"pie-tool-tts-inline__trigger-zoom svelte-9msc39\"><!></span>"), Ci = /* @__PURE__ */ yr("<button type=\"button\" role=\"radio\" data-pie-tts-control=\"\" class=\"pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-9msc39\"><span class=\"pie-tool-tts-inline__speed-label svelte-9msc39\"> </span></button>"), wi = /* @__PURE__ */ yr("<div role=\"radiogroup\"></div>"), Ti = /* @__PURE__ */ yr("<div role=\"toolbar\" 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-9msc39\"><i class=\"fa-solid fa-backward pie-tool-tts-inline__icon svelte-9msc39\" 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-9msc39\"><i class=\"fa-solid fa-forward pie-tool-tts-inline__icon svelte-9msc39\" 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-9msc39\"><i class=\"fa-solid fa-stop pie-tool-tts-inline__icon svelte-9msc39\" aria-hidden=\"true\"></i></button></div>"), Ei = /* @__PURE__ */ yr("<!> <!>", 1), Di = /* @__PURE__ */ yr("<div><!> <div class=\"pie-sr-only svelte-9msc39\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"> </div></div>"), Oi = {
|
|
2362
|
-
hash: "svelte-9msc39",
|
|
2363
|
-
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 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-9msc39 {position:relative;display:inline-flex;align-items:center;gap:0.5rem;}.pie-tool-tts-inline--controls-row.svelte-9msc39 {width:100%;justify-content:flex-end;}\n\n /* The play/pause trigger is an <nds-icon-button> host; the NDS component\n owns its shape, colours and hover/active/focus states. This class only\n drives the host's size via NDS's own size custom properties (see the size\n variants below), so the light-DOM inner button matches the toolbar's\n md/sm/lg dimensions. */.pie-tool-tts-inline__trigger-zoom.svelte-9msc39 {display:inline-flex;}.pie-tool-tts-inline__trigger.svelte-9msc39 {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 the same chain the panel\n paints with. It defaults through --pie-button-color so the glyph follows\n the active theme; the literal is the no-theme last resort. */--color-interactive-blue: var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));\n /* NDS palette bridge — keep in sync with the copies in\n assessment-toolkit ItemToolBar and section-player SectionItemsPane\n (asserted by scripts/check-theme-tokens.mjs). The vendored button\n paints its fill, its on-accent glyph, its hover ring and its focus\n ring from the NDS design-system palette, which no PIE theme sets, so\n a tertiary trigger kept a #f3f5f7 pill on every page — and once the\n glyph followed the theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}\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-9msc39 {border-radius:50%;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}\n\n /* Active/open trigger hooks.\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. These rules\n honour all three, matching how tool-calculator-inline-desmos wires the same\n hooks.\n ---------------------------------------------------------------------------\n Every fallback is the value this element resolves to when the hook is\n unset, so the rules are inert by default: unlike the calculator, this\n trigger has no filled active look, and adding one would restyle the\n control for every host. Hosts opt in by setting a hook.\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-9msc39 {\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 declaration never applies. Measured in Chromium: the\n plain trigger's glyph is --pie-button-color either way. */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, 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-9msc39 {--color-interactive-blue: var(\n --pie-tool-trigger-active-color,\n var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)))\n );}.pie-tool-tts-inline__control.svelte-9msc39:hover:not(:disabled) {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-9msc39:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.pie-tool-tts-inline__control.svelte-9msc39: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-9msc39:focus:not(:focus-visible),\n .pie-tool-tts-inline__trigger.svelte-9msc39 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-9msc39 {display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0.25rem;box-sizing:border-box;min-height:var(--pie-tts-controls-row-height, 2.875rem);padding:0.25rem 0.5rem;background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.5rem;}.pie-tool-tts-inline__panel--floating.svelte-9msc39 {position:absolute;z-index:2;top:50%;right:0;left:auto;}.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 {\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-9msc39 {position:absolute;z-index:2;top:100%;right:0;left:auto;}.pie-tool-tts-inline__control.svelte-9msc39 {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid 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-9msc39 {border-radius:50%;}.pie-tool-tts-inline__speed-group.svelte-9msc39 {display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.25rem;}.pie-tool-tts-inline__control--speed.svelte-9msc39 {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-9msc39 {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-9msc39 {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-9msc39 .pie-tool-tts-inline__speed-label:where(.svelte-9msc39) {display:inline-grid;justify-items:center;}.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__speed-label:where(.svelte-9msc39)::before {content:attr(data-label);height:0;overflow:hidden;font-weight:700;visibility:hidden;}.pie-tool-tts-inline__control.svelte-9msc39:disabled {cursor:not-allowed;opacity:0.6;}\n\n /* ── Overlay layouts (floating-overlay + left-aligned) ──────────────────────\n The design keeps the controls on the surrounding Question/Passage header: a\n low-chrome card, icon-only media glyphs, and speed radios as plain text with\n the selected one lifted into a chip.\n\n Shape comes from that design; colour comes from the theme. Each surface\n defaults through a canonical token, and its literal is only the no-theme\n last resort.\n\n Foregrounds resolve through --pie-button-color (DaisyUI base-content), the\n one family whose contrast against the card is guaranteed in every shipped\n theme: --pie-primary and --pie-tertiary are `direct` mappings of DaisyUI\n slots chosen to pair with their own -content colour, so an accent glyph taken\n from either drops to 1.37:1 on `pastel` and 11 of 35 themes fall under 3:1.\n Selection is signalled by the chip and the bolder weight rather than by hue.\n\n Host knobs: --pie-tts-button-color (accent),\n --pie-tts-inline-muted-color, --pie-tts-selected-bg,\n --pie-selected-button-background/-border, --pie-tts-menu-shadow. */.pie-tool-tts-inline__panel--floating.svelte-9msc39,\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 {min-height:0;height:3rem; /* Figma: 48px */justify-content:center;gap:0.375rem;\n /* The raised surface is certified with control text and focus rings.\n --pie-white remains the fallback for hosts with no surface token. */background:var(--pie-tts-selected-bg, var(--pie-surface, var(--pie-white, #fff)));\n /* The Figma card is shadow-only, but the shadow is black: once the card\n takes a dark theme's surface it has no visible edge left. A hairline\n derived from the text colour reads on either. Not --pie-border: a host\n that wants borderless controls sets that to transparent, which is\n exactly the case where the shadow is the only edge. --pie-tts-card-border\n is the opt-out (`transparent` restores the shadow-only card). */border:1px solid var(--pie-tts-card-border, color-mix(in srgb, var(--pie-text, #000) 15%, transparent));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-9msc39 {gap:0;width:fit-content;min-width:7.5rem; /* ~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 glyph, no chrome. */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39) {border:0;background:transparent;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 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-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {min-width:2.75rem;padding:0 0.625rem;border:1px solid transparent;background:transparent;box-shadow:none;\n /* Unselected labels are text on the card, so they take the full text colour\n rather than a dimmed mix: the raised surface has little contrast margin\n in `valentine`. Hosts that want them dimmer set --pie-tts-inline-muted-color. */color:var(--pie-tts-inline-muted-color, var(--pie-button-color, var(--pie-text, #5b6b73)));font-size:1rem;}.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39):hover:not(:disabled),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 8%, transparent);}\n\n /* Selected inline radio: \"chip\" treatment. Placed after the muted rule so it\n wins at equal specificity. The fill is --pie-button-active-bg, which the\n DaisyUI mapping already tunes (base-300 at 70% toward base-100) to hold\n base-content text at 4.5:1 in every shipped theme. */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));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-9msc39 {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 chip. Options size to their content and centre (no\n full-width stretch), keeping the popper compact. */.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {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, var(--pie-button-color, var(--pie-text, #222)));font-size:0.75rem;font-weight:500;}.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));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-9msc39 {--height-32: 1.75rem;}.pie-tool-tts-inline__trigger--md.svelte-9msc39 {--height-32: 2rem;}.pie-tool-tts-inline__trigger--lg.svelte-9msc39 {--height-32: 2.5rem;}.pie-tool-tts-inline__icon.svelte-9msc39 {font-size:1rem;line-height:1;color:currentColor;}\n\n @media (max-width: 839px) {.pie-tool-tts-inline.svelte-9msc39 {gap:0.375rem;}.pie-tool-tts-inline__panel--compact.svelte-9msc39 {padding:0;}\n\n /* Keep trigger sizes consistent with the calculator at this breakpoint. */.pie-tool-tts-inline__control.svelte-9msc39:not(.pie-tool-tts-inline__trigger) {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__control.svelte-9msc39 .pie-tool-tts-inline__icon:where(.svelte-9msc39) {font-size:1rem;}.pie-tool-tts-inline__control--speed.svelte-9msc39 {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-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39),\n .pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {font-size:0.75rem;}\n }.pie-sr-only.svelte-9msc39 {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-9msc39 {transition:none !important;}\n }"
|
|
2364
|
-
};
|
|
2365
|
-
function ki(e, p) {
|
|
2366
|
-
Ge(p, !0), Kr(e, Oi);
|
|
2367
|
-
let m = d("tts-inline", f), h = pi(p, "catalogId", 7, ""), g = pi(p, "size", 7, "md"), _ = pi(p, "speedOptions", 7, void 0), v = pi(p, "showSingleSpeedOption", 7, !1), y = pi(p, "layoutMode", 7, "left-aligned"), b = typeof window < "u", x = /font.?awesome|fa-?pro/i, S = (e) => {
|
|
2368
|
-
if (document.querySelector(`link[href="${e}"]`)) return;
|
|
2369
|
-
let t = document.createElement("link");
|
|
2370
|
-
t.rel = "stylesheet", t.href = e, t.addEventListener("error", () => {
|
|
2371
|
-
t.dataset.pieLoadFailed = "";
|
|
2372
|
-
}, { once: !0 }), document.head.appendChild(t);
|
|
2373
|
-
}, ee = () => {
|
|
2374
|
-
b && (Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).some((e) => x.test(e.href)) || S("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"));
|
|
2375
|
-
}, te = "__pieFaTtsShadowInstalled", ne = (e) => {
|
|
2376
|
-
let t = e.getRootNode();
|
|
2377
|
-
if (!(t instanceof ShadowRoot)) return;
|
|
2378
|
-
let n = t;
|
|
2379
|
-
if (n[te]) return;
|
|
2380
|
-
n[te] = !0;
|
|
2381
|
-
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
2382
|
-
if (!e || r.has(e)) return;
|
|
2383
|
-
r.add(e);
|
|
2384
|
-
let n = document.createElement("link");
|
|
2385
|
-
n.rel = "stylesheet", n.href = e, t.appendChild(n);
|
|
2386
|
-
}, a = Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).filter((e) => x.test(e.href));
|
|
2387
|
-
for (let e of a) {
|
|
2388
|
-
if ("pieLoadFailed" in e.dataset) continue;
|
|
2389
|
-
if (e.sheet) {
|
|
2390
|
-
i(e.href);
|
|
2391
|
-
continue;
|
|
2392
|
-
}
|
|
2393
|
-
let t = (n) => {
|
|
2394
|
-
e.removeEventListener("load", t), e.removeEventListener("error", t), n.type === "load" && i(e.href);
|
|
2395
|
-
};
|
|
2396
|
-
e.addEventListener("load", t), e.addEventListener("error", t);
|
|
2397
|
-
}
|
|
2398
|
-
}, re = (e) => {
|
|
2399
|
-
ee(), ne(e);
|
|
2400
|
-
let t = () => {
|
|
2401
|
-
for (let t of e.querySelectorAll("i.fa-light")) t.classList.remove("fa-light"), t.classList.add("fa-solid");
|
|
2402
|
-
};
|
|
2403
|
-
t();
|
|
2404
|
-
let n = new MutationObserver(t);
|
|
2405
|
-
return n.observe(e, {
|
|
2406
|
-
childList: !0,
|
|
2407
|
-
subtree: !0,
|
|
2408
|
-
attributes: !0,
|
|
2409
|
-
attributeFilter: ["class"]
|
|
2410
|
-
}), { destroy() {
|
|
2411
|
-
n.disconnect();
|
|
2412
|
-
} };
|
|
2413
|
-
}, ie = (e, t) => {
|
|
2414
|
-
let n = t, r = () => {
|
|
2415
|
-
let t = e.querySelector("button");
|
|
2416
|
-
if (t) for (let [e, r] of Object.entries(n)) r == null ? t.removeAttribute(e) : t.setAttribute(e, r);
|
|
2417
|
-
};
|
|
2418
|
-
r();
|
|
2419
|
-
let i = new MutationObserver(r);
|
|
2420
|
-
return i.observe(e, {
|
|
2421
|
-
childList: !0,
|
|
2422
|
-
subtree: !0
|
|
2423
|
-
}), {
|
|
2424
|
-
update(e) {
|
|
2425
|
-
n = e, r();
|
|
2426
|
-
},
|
|
2427
|
-
destroy() {
|
|
2428
|
-
i.disconnect();
|
|
2429
|
-
}
|
|
2430
|
-
};
|
|
2431
|
-
}, ae = (e) => (ee(), ne(e), {}), C = /* @__PURE__ */ H(void 0), w = /* @__PURE__ */ H(void 0), T = /* @__PURE__ */ H(null), E = /* @__PURE__ */ B(() => Q(T)?.ndsIcons === !0), D = /* @__PURE__ */ B(() => u(Q(T))), oe = /* @__PURE__ */ H(null), se = /* @__PURE__ */ H(null), O = /* @__PURE__ */ B(() => Q(T)?.ttsService), ce = /* @__PURE__ */ B(() => Q(T)?.highlightCoordinator), le = /* @__PURE__ */ B(() => Q(se)?.scopeElement || Q(oe)?.scopeElement || null), k = /* @__PURE__ */ H(!1), ue = /* @__PURE__ */ H(!1), A = /* @__PURE__ */ H(!1), j = /* @__PURE__ */ H(!1), M = /* @__PURE__ */ H(""), de = /* @__PURE__ */ H(null), fe = /* @__PURE__ */ H(null), pe = /* @__PURE__ */ H(!1), me = /* @__PURE__ */ H(!1), he = !1, ge = 0, _e = null, N = null, ve = /* @__PURE__ */ B(() => s(_())), ye = /* @__PURE__ */ B(() => I(Q(ve))), be = /* @__PURE__ */ B(() => Q(ve).length > 1 || v() ? Q(ve) : []), xe = /* @__PURE__ */ B(() => Q(de) !== null && Q(fe) === Q(ye) && Q(ve).some((e) => e.rate === Q(de)) ? Q(de) : L(Q(ve))), Se = `pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`, Ce = `${Se}-controls`;
|
|
2432
|
-
function P() {
|
|
2433
|
-
return Q(O)?.getRunOwner() === Se;
|
|
2434
|
-
}
|
|
2435
|
-
function F(e = "", t = !1) {
|
|
2436
|
-
U(pe, !1), U(A, !1), U(j, !1), U(k, t, !0), U(M, e, !0);
|
|
2437
|
-
}
|
|
2438
|
-
function I(e) {
|
|
2439
|
-
return e.map((e) => `${e.rate}:${e.label}:${e.ariaLabel}:${e.isDefault ? "1" : "0"}`).join("|");
|
|
2440
|
-
}
|
|
2441
|
-
function L(e) {
|
|
2442
|
-
return e.find((e) => e.isDefault)?.rate ?? e.find((e) => e.rate === 1)?.rate ?? e[0]?.rate ?? 1;
|
|
2443
|
-
}
|
|
2444
|
-
function we() {
|
|
2445
|
-
if (!Q(C) || !Q(w)) return !1;
|
|
2446
|
-
let e = Q(C).getRootNode();
|
|
2447
|
-
if (!(e instanceof ShadowRoot)) return !1;
|
|
2448
|
-
let t = e.activeElement;
|
|
2449
|
-
return !!(t && Q(w).contains(t));
|
|
2450
|
-
}
|
|
2451
|
-
function Ee() {
|
|
2452
|
-
if (!Q(w)) return !1;
|
|
2453
|
-
let e = Q(w).getRootNode();
|
|
2454
|
-
if (!(e instanceof ShadowRoot)) return !1;
|
|
2455
|
-
let t = e.activeElement;
|
|
2456
|
-
return !t || !Q(w).contains(t) ? !1 : t.matches(Me);
|
|
2457
|
-
}
|
|
2458
|
-
function De() {
|
|
2459
|
-
let e = Q(w)?.querySelector(Ne);
|
|
2460
|
-
if (e && !e.disabled) {
|
|
2461
|
-
e.focus();
|
|
2462
|
-
return;
|
|
2463
|
-
}
|
|
2464
|
-
Oe(!0);
|
|
2465
|
-
}
|
|
2466
|
-
function Oe(e) {
|
|
2467
|
-
if (!e) return;
|
|
2468
|
-
let t = st();
|
|
2469
|
-
(t?.querySelector("button") ?? t)?.focus();
|
|
2470
|
-
}
|
|
2471
|
-
function ke(e = Q(D).t("tools.textToSpeech.inline.switchedSection"), t = !1) {
|
|
2472
|
-
if (!Q(me) && Q(k)) {
|
|
2473
|
-
U(me, !0);
|
|
2474
|
-
try {
|
|
2475
|
-
let n = we();
|
|
2476
|
-
ge += 1, F(e), Ve(), t && queueMicrotask(() => {
|
|
2477
|
-
Oe(n);
|
|
2478
|
-
});
|
|
2479
|
-
} finally {
|
|
2480
|
-
U(me, !1);
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
}
|
|
2484
|
-
gn(() => {
|
|
2485
|
-
if (Q(C)) return i(Q(C), (e) => {
|
|
2486
|
-
U(T, e, !0);
|
|
2487
|
-
});
|
|
2488
|
-
}), gn(() => {
|
|
2489
|
-
if (!Q(C)) return;
|
|
2490
|
-
let e = a(Q(C), (e) => {
|
|
2491
|
-
U(oe, e, !0);
|
|
2492
|
-
}), t = r(Q(C), (e) => {
|
|
2493
|
-
U(se, e, !0);
|
|
2494
|
-
});
|
|
2495
|
-
return () => {
|
|
2496
|
-
t(), e();
|
|
2497
|
-
};
|
|
2498
|
-
}), gn(() => {
|
|
2499
|
-
let e = Q(O);
|
|
2500
|
-
if (!e) return;
|
|
2501
|
-
let t = (e) => {
|
|
2502
|
-
if (!Q(k) || !P()) {
|
|
2503
|
-
U(A, !1), U(j, !1);
|
|
2504
|
-
return;
|
|
2505
|
-
}
|
|
2506
|
-
U(A, e === "playing" || e === "paused", !0), U(j, e === "paused");
|
|
2507
|
-
}, n = e.onStateChange((n) => {
|
|
2508
|
-
let r = String(n), i = Ee();
|
|
2509
|
-
(r === "loading" || r === "playing" || r === "paused") && !he && !P() && ke(), r === "idle" && !he && e.getRunOwner() === null && ke(Q(D).t("tools.textToSpeech.inline.stopped"), !0), t(r), r === "playing" && (Q(pe) && P() && U(M, Q(D).t("tools.textToSpeech.inline.started"), !0), U(pe, !1)), (r === "error" || r === "idle") && U(pe, !1), i && !Q(A) && queueMicrotask(De);
|
|
2510
|
-
});
|
|
2511
|
-
return t(e.getState()), n;
|
|
2512
|
-
}), gn(() => () => {
|
|
2513
|
-
Ve();
|
|
2514
|
-
});
|
|
2515
|
-
let Ae = "[data-pie-tts-speed-rate]", je = "[data-pie-tts-media]", Me = "[data-pie-tts-seek]", Ne = "[data-pie-tts-stop]";
|
|
2516
|
-
function Pe(e) {
|
|
2517
|
-
return Q(w) ? Array.from(Q(w).querySelectorAll(e)).filter((e) => !e.disabled && window.getComputedStyle(e).display !== "none") : [];
|
|
2518
|
-
}
|
|
2519
|
-
function Fe(e, t) {
|
|
2520
|
-
let n = Pe(e);
|
|
2521
|
-
if (!n.length) return;
|
|
2522
|
-
let r = n[(t + n.length) % n.length];
|
|
2523
|
-
if (r.focus(), e !== Ae) return;
|
|
2524
|
-
let i = Number(r.dataset.pieTtsSpeedRate), a = Q(be).find((e) => e.rate === i);
|
|
2525
|
-
a && Ze(a);
|
|
2526
|
-
}
|
|
2527
|
-
function Ie(e, t) {
|
|
2528
|
-
let n = Pe(e);
|
|
2529
|
-
if (!n.length) return;
|
|
2530
|
-
let r = Q(w)?.getRootNode(), i = r instanceof ShadowRoot ? r.activeElement : null, a = i ? n.indexOf(i) : -1;
|
|
2531
|
-
Fe(e, a === -1 ? 0 : a + t);
|
|
2532
|
-
}
|
|
2533
|
-
function Le(e, t) {
|
|
2534
|
-
switch (t.key) {
|
|
2535
|
-
case "ArrowDown":
|
|
2536
|
-
case "ArrowRight":
|
|
2537
|
-
t.preventDefault(), Ie(e, 1);
|
|
2538
|
-
break;
|
|
2539
|
-
case "ArrowUp":
|
|
2540
|
-
case "ArrowLeft":
|
|
2541
|
-
t.preventDefault(), Ie(e, -1);
|
|
2542
|
-
break;
|
|
2543
|
-
case "Home":
|
|
2544
|
-
t.preventDefault(), Fe(e, 0);
|
|
2545
|
-
break;
|
|
2546
|
-
case "End": t.preventDefault(), Fe(e, -1);
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
function Re() {
|
|
2550
|
-
return Q(le) ? l(Q(le)) : null;
|
|
2551
|
-
}
|
|
2552
|
-
function ze() {
|
|
2553
|
-
return Q(oe) ? n(Q(oe), Q(T)) : void 0;
|
|
2554
|
-
}
|
|
2555
|
-
function Be(e, t) {
|
|
2556
|
-
Ve();
|
|
2557
|
-
let n = e.setHighlightTargetResolverProvider(() => ({
|
|
2558
|
-
context: {
|
|
2559
|
-
scopeElement: Q(se)?.scopeElement || t || null,
|
|
2560
|
-
kind: Q(oe)?.kind,
|
|
2561
|
-
itemId: Q(oe)?.itemId,
|
|
2562
|
-
canonicalItemId: Q(oe)?.canonicalItemId,
|
|
2563
|
-
contentKind: Q(oe)?.contentKind,
|
|
2564
|
-
regionPolicy: Q(oe)?.regionPolicy
|
|
2565
|
-
},
|
|
2566
|
-
resolver: Q(se)?.ttsHighlightTargetResolver || null
|
|
2567
|
-
}));
|
|
2568
|
-
return _e = n, n;
|
|
2569
|
-
}
|
|
2570
|
-
function Ve(e = _e) {
|
|
2571
|
-
e?.(), e === _e && (_e = null);
|
|
2572
|
-
}
|
|
2573
|
-
function He(e) {
|
|
2574
|
-
if (e.getRunOwner() !== Se) return !1;
|
|
2575
|
-
let t = String(e.getState());
|
|
2576
|
-
return t === "playing" || t === "paused" || t === "loading";
|
|
2577
|
-
}
|
|
2578
|
-
function Ue(e, t) {
|
|
2579
|
-
let n = we();
|
|
2580
|
-
F(Q(D).t(o(e) ? "tools.textToSpeech.initFailed" : "tools.textToSpeech.inline.startFailed")), Q(ce) && Q(ce).clearTTS(), Ve(t), n && queueMicrotask(() => {
|
|
2581
|
-
Oe(!0);
|
|
2582
|
-
});
|
|
2583
|
-
}
|
|
2584
|
-
function R(e) {
|
|
2585
|
-
o(e) || c(Q(T)?.toolkitCoordinator, "textToSpeech", "tool-playback", e);
|
|
2586
|
-
}
|
|
2587
|
-
function We() {
|
|
2588
|
-
let e = Q(O);
|
|
2589
|
-
if (!e) return;
|
|
2590
|
-
let t = Re();
|
|
2591
|
-
if (!t) {
|
|
2592
|
-
m.debug("No target container found from shell scope context");
|
|
2593
|
-
return;
|
|
2594
|
-
}
|
|
2595
|
-
let n = ++ge, r = !1, i = e.onStateChange((e) => {
|
|
2596
|
-
String(e) === "playing" && (r = !0);
|
|
2597
|
-
});
|
|
2598
|
-
U(k, !0), U(pe, !0), U(M, Q(D).t("tools.textToSpeech.inline.starting"), !0);
|
|
2599
|
-
let a = Be(e, t), o;
|
|
2600
|
-
try {
|
|
2601
|
-
o = e.speak(t, {
|
|
2602
|
-
ownerId: Se,
|
|
2603
|
-
rate: Q(xe),
|
|
2604
|
-
catalogId: h() || void 0,
|
|
2605
|
-
catalogContext: ze(),
|
|
2606
|
-
language: Q(T)?.contentLanguage || void 0
|
|
2607
|
-
});
|
|
2608
|
-
} catch (e) {
|
|
2609
|
-
o = Promise.reject(e);
|
|
2610
|
-
}
|
|
2611
|
-
N = {
|
|
2612
|
-
service: e,
|
|
2613
|
-
choicesKey: Q(ye)
|
|
2614
|
-
}, o.then(() => {
|
|
2615
|
-
n !== ge || r || String(e.getState()) === "idle" && F(Q(D).t("tools.textToSpeech.inline.nothingToRead"));
|
|
2616
|
-
}).catch((e) => {
|
|
2617
|
-
n === ge && (R(e), Ue(e, a));
|
|
2618
|
-
}).finally(() => {
|
|
2619
|
-
i(), He(e) || Ve(a);
|
|
2620
|
-
});
|
|
2621
|
-
}
|
|
2622
|
-
function qe() {
|
|
2623
|
-
let e = Q(O);
|
|
2624
|
-
if (!e) return;
|
|
2625
|
-
let t = P();
|
|
2626
|
-
if (!(Q(pe) || t && String(e.getState()) === "loading")) {
|
|
2627
|
-
if (t && Q(j)) {
|
|
2628
|
-
e.resume(), U(M, Q(D).t("tools.textToSpeech.inline.resumed"), !0);
|
|
2629
|
-
return;
|
|
2630
|
-
}
|
|
2631
|
-
if (t && Q(A) && !Q(j)) {
|
|
2632
|
-
e.pause(), U(M, Q(D).t("tools.textToSpeech.inline.pausedAnnouncement"), !0);
|
|
2633
|
-
return;
|
|
2634
|
-
}
|
|
2635
|
-
he = !0;
|
|
2636
|
-
try {
|
|
2637
|
-
We();
|
|
2638
|
-
} finally {
|
|
2639
|
-
he = !1;
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
}
|
|
2643
|
-
function Je() {
|
|
2644
|
-
if (!Q(O)) return;
|
|
2645
|
-
let e = we();
|
|
2646
|
-
ge += 1, Q(O).stop(), F(Q(D).t("tools.textToSpeech.inline.stopped")), Q(ce) && Q(ce).clearTTS(), Ve(), e && queueMicrotask(() => {
|
|
2647
|
-
Oe(!0);
|
|
2648
|
-
});
|
|
2649
|
-
}
|
|
2650
|
-
async function Ye() {
|
|
2651
|
-
if (Q(O) && Q(A)) try {
|
|
2652
|
-
await Q(O).seekForward(1), U(M, Q(D).t("tools.textToSpeech.inline.skippedForward"), !0);
|
|
2653
|
-
} catch (e) {
|
|
2654
|
-
R(e), U(M, Q(D).t("tools.textToSpeech.inline.skipForwardFailed"), !0);
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
async function Xe() {
|
|
2658
|
-
if (Q(O) && Q(A)) try {
|
|
2659
|
-
await Q(O).seekBackward(1), U(M, Q(D).t("tools.textToSpeech.inline.skippedBackward"), !0);
|
|
2660
|
-
} catch (e) {
|
|
2661
|
-
R(e), U(M, Q(D).t("tools.textToSpeech.inline.skipBackwardFailed"), !0);
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
async function Ze(e) {
|
|
2665
|
-
let t = Q(O);
|
|
2666
|
-
if (!t) return;
|
|
2667
|
-
if (Q(xe) === e.rate) {
|
|
2668
|
-
U(M, Q(D).t("tools.textToSpeech.inline.speedAnnounce", { label: e.label }), !0);
|
|
2669
|
-
return;
|
|
2670
|
-
}
|
|
2671
|
-
let n = Q(de), r = Q(fe);
|
|
2672
|
-
U(de, e.rate, !0), U(fe, Q(ye), !0), U(M, Q(D).t("tools.textToSpeech.inline.speedAnnounce", { label: e.label }), !0);
|
|
2673
|
-
let i = {
|
|
2674
|
-
service: t,
|
|
2675
|
-
choicesKey: Q(ye)
|
|
2676
|
-
};
|
|
2677
|
-
N = i;
|
|
2678
|
-
try {
|
|
2679
|
-
await t.setPlaybackRate(e.rate);
|
|
2680
|
-
} catch (e) {
|
|
2681
|
-
N === i && (N = null), R(e), U(de, n, !0), U(fe, r, !0), U(M, Q(D).t("tools.textToSpeech.inline.speedChangeFailed"), !0);
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
|
-
let Qe = /* @__PURE__ */ B(() => g() === "sm" ? "pie-tool-tts-inline__trigger--sm" : g() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md"), $e = /* @__PURE__ */ B(() => Q(A) && !Q(j) ? "tools.textToSpeech.inline.pauseA11y" : Q(j) ? "tools.textToSpeech.inline.resumeA11y" : "tools.textToSpeech.inline.playA11y"), z = /* @__PURE__ */ B(() => y() === "reserved-row" || y() === "expanding-row"), et = /* @__PURE__ */ B(() => y() === "floating-overlay"), tt = /* @__PURE__ */ B(() => y() === "left-aligned"), nt = /* @__PURE__ */ B(() => Q(et) || Q(tt)), rt = "[data-pie-tool-overlay-boundary]", it = /* @__PURE__ */ H(""), at = /* @__PURE__ */ H(0);
|
|
2685
|
-
gn(() => {
|
|
2686
|
-
let e = Q(O), t = Q(ye), n = Q(A) || Q(j);
|
|
2687
|
-
if (!e || !n || !P() || N?.service === e && N.choicesKey === t) return;
|
|
2688
|
-
let r = {
|
|
2689
|
-
service: e,
|
|
2690
|
-
choicesKey: t
|
|
2691
|
-
};
|
|
2692
|
-
N = r;
|
|
2693
|
-
let i = !1;
|
|
2694
|
-
return queueMicrotask(() => {
|
|
2695
|
-
if (i || N !== r) return;
|
|
2696
|
-
let t = Q(xe);
|
|
2697
|
-
e.setPlaybackRate(t).catch((e) => {
|
|
2698
|
-
N === r && (N = null), R(e);
|
|
2699
|
-
});
|
|
2700
|
-
}), () => {
|
|
2701
|
-
i = !0;
|
|
2702
|
-
};
|
|
2703
|
-
});
|
|
2704
|
-
function ot(e, t) {
|
|
2705
|
-
let n = e;
|
|
2706
|
-
for (; n;) {
|
|
2707
|
-
if (n.matches?.(t)) return n;
|
|
2708
|
-
n = n.parentElement ?? (n.getRootNode() instanceof ShadowRoot ? n.getRootNode().host : null);
|
|
2709
|
-
}
|
|
2710
|
-
return null;
|
|
2711
|
-
}
|
|
2712
|
-
function st() {
|
|
2713
|
-
let e = Q(C)?.getRootNode();
|
|
2714
|
-
return e instanceof ShadowRoot ? e.querySelector(".pie-tool-tts-inline__trigger") : null;
|
|
2715
|
-
}
|
|
2716
|
-
function ct(e) {
|
|
2717
|
-
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");
|
|
2718
|
-
return i.length ? i.reduce((e, t) => e + t.offsetWidth, 0) + (i.length - 1) * n + r : 0;
|
|
2719
|
-
}
|
|
2720
|
-
function lt() {
|
|
2721
|
-
let e = st();
|
|
2722
|
-
if (!e || !Q(w)) return;
|
|
2723
|
-
let t = e.getBoundingClientRect(), n = ot(e, rt), r = n?.getBoundingClientRect().left ?? 0, i = Math.max(0, t.left - r - 16);
|
|
2724
|
-
if (!Q(ue)) {
|
|
2725
|
-
let e = ct(Q(w));
|
|
2726
|
-
e > 0 && U(at, e, !0);
|
|
2727
|
-
}
|
|
2728
|
-
U(ue, Q(at) > 0 && i < Q(at), !0);
|
|
2729
|
-
let a = parseFloat(window.getComputedStyle(Q(w)).minWidth) || 0;
|
|
2730
|
-
if (Q(ue) && i < a) {
|
|
2731
|
-
let e = n?.getBoundingClientRect(), r = Math.max(0, e?.left ?? 0) + 8, i = Math.min(window.innerWidth, e?.right ?? window.innerWidth) - 8, a = Math.max(0, i - r), o = Math.min(Q(w).offsetWidth, a), s = Math.max(r, Math.min(t.right - o, i - o));
|
|
2732
|
-
U(it, `top: ${t.bottom + 8}px; left: ${s}px; right: auto; min-width: min(7.5rem, ${a}px); max-width: min(${a}px, var(--pie-tts-left-aligned-panel-width, ${a}px));`);
|
|
2733
|
-
return;
|
|
2734
|
-
}
|
|
2735
|
-
let o = Q(w).offsetHeight || t.height, s = Q(ue) ? t.top : t.top + t.height / 2 - o / 2, c = t.bottom > 0 && t.top < window.innerHeight ? Math.max(8, Math.min(s, window.innerHeight - o - 8)) : s, l = window.innerWidth - t.left + 8;
|
|
2736
|
-
U(it, `top: ${c}px; right: ${l}px; left: auto; max-width: min(${i}px, var(--pie-tts-left-aligned-panel-width, ${i}px));`);
|
|
2737
|
-
}
|
|
2738
|
-
gn(() => {
|
|
2739
|
-
if (!(Q(tt) && Q(k))) {
|
|
2740
|
-
let e = !1;
|
|
2741
|
-
return queueMicrotask(() => {
|
|
2742
|
-
e || (U(it, ""), U(ue, !1), U(at, 0));
|
|
2743
|
-
}), () => {
|
|
2744
|
-
e = !0;
|
|
2745
|
-
};
|
|
2746
|
-
}
|
|
2747
|
-
if (typeof window > "u") return;
|
|
2748
|
-
let e = 0, t = () => {
|
|
2749
|
-
e ||= window.requestAnimationFrame(() => {
|
|
2750
|
-
e = 0, lt();
|
|
2751
|
-
});
|
|
2752
|
-
};
|
|
2753
|
-
t(), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0);
|
|
2754
|
-
let n = st(), r = new ResizeObserver(t);
|
|
2755
|
-
n && r.observe(n), Q(w) && r.observe(Q(w));
|
|
2756
|
-
let i = n ? ot(n, rt) : null;
|
|
2757
|
-
i && r.observe(i);
|
|
2758
|
-
let a = i?.querySelector("[data-pie-tool-overlay-protect]");
|
|
2759
|
-
return a && r.observe(a), () => {
|
|
2760
|
-
e && window.cancelAnimationFrame(e), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0), r.disconnect();
|
|
2761
|
-
};
|
|
2762
|
-
});
|
|
2763
|
-
function ut() {
|
|
2764
|
-
if (!Q(C)) return null;
|
|
2765
|
-
let e = Q(C).getRootNode();
|
|
2766
|
-
return e instanceof ShadowRoot ? e.host : null;
|
|
2767
|
-
}
|
|
2768
|
-
gn(() => {
|
|
2769
|
-
let e = ut();
|
|
2770
|
-
if (!e) return;
|
|
2771
|
-
let n = Q(k) === !0;
|
|
2772
|
-
if (e.getAttribute("data-active") === "true" === n) return;
|
|
2773
|
-
let r = !1;
|
|
2774
|
-
return queueMicrotask(() => {
|
|
2775
|
-
r || (e.setAttribute("data-active", n ? "true" : "false"), e.dispatchEvent(new CustomEvent(t, {
|
|
2776
|
-
detail: { active: n },
|
|
2777
|
-
bubbles: !0,
|
|
2778
|
-
composed: !0
|
|
2779
|
-
})));
|
|
2780
|
-
}), () => {
|
|
2781
|
-
r = !0;
|
|
2782
|
-
};
|
|
2783
|
-
});
|
|
2784
|
-
var dt = {
|
|
2785
|
-
get catalogId() {
|
|
2786
|
-
return h();
|
|
2787
|
-
},
|
|
2788
|
-
set catalogId(e = "") {
|
|
2789
|
-
h(e), Dt();
|
|
2790
|
-
},
|
|
2791
|
-
get size() {
|
|
2792
|
-
return g();
|
|
2793
|
-
},
|
|
2794
|
-
set size(e = "md") {
|
|
2795
|
-
g(e), Dt();
|
|
2796
|
-
},
|
|
2797
|
-
get speedOptions() {
|
|
2798
|
-
return _();
|
|
2799
|
-
},
|
|
2800
|
-
set speedOptions(e = void 0) {
|
|
2801
|
-
_(e), Dt();
|
|
2802
|
-
},
|
|
2803
|
-
get showSingleSpeedOption() {
|
|
2804
|
-
return v();
|
|
2805
|
-
},
|
|
2806
|
-
set showSingleSpeedOption(e = !1) {
|
|
2807
|
-
v(e), Dt();
|
|
2808
|
-
},
|
|
2809
|
-
get layoutMode() {
|
|
2810
|
-
return y();
|
|
2811
|
-
},
|
|
2812
|
-
set layoutMode(e = "left-aligned") {
|
|
2813
|
-
y(e), Dt();
|
|
2814
|
-
}
|
|
2815
|
-
}, ft = br(), pt = tn(ft), mt = (e) => {
|
|
2816
|
-
var t = Di();
|
|
2817
|
-
let n;
|
|
2818
|
-
{
|
|
2819
|
-
let e = (e) => {
|
|
2820
|
-
var t = Si(), n = en(t), r = (e) => {
|
|
2821
|
-
var t = bi();
|
|
2822
|
-
ai(t, "type", "circle"), ai(t, "size", "small"), ai(t, "variant", "tertiary"), Cn(() => ai(t, "icon-name", Q(A) && !Q(j) ? "pause" : "play")), Cn((e) => ai(t, "button-aria-label", e), [() => Q(D).t(Q($e))]), Cn(() => ai(t, "disabled", !Q(O))), qr(t, (e) => re?.(e)), qr(t, (e, t) => ie?.(e, t), () => ({
|
|
2823
|
-
"aria-expanded": Q(k) ? "true" : "false",
|
|
2824
|
-
"aria-controls": Q(k) ? Ce : null,
|
|
2825
|
-
"aria-pressed": Q(k) ? "true" : "false",
|
|
2826
|
-
"aria-busy": Q(pe) ? "true" : null
|
|
2827
|
-
})), Cn(() => $r(t, 1, `pie-tool-tts-inline__trigger ${Q(Qe) ?? ""}`, "svelte-9msc39")), ur("click", t, qe), xr(e, t);
|
|
2828
|
-
}, i = (e) => {
|
|
2829
|
-
var t = xi(), n = nn(t);
|
|
2830
|
-
qr(t, (e) => ae?.(e)), Cn((e) => {
|
|
2831
|
-
$r(t, 1, `pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${Q(Qe) ?? ""}`, "svelte-9msc39"), $(t, "aria-expanded", Q(k) ? "true" : "false"), $(t, "aria-controls", Q(k) ? Ce : void 0), $(t, "aria-pressed", Q(k) ? "true" : "false"), $(t, "aria-label", e), $(t, "aria-busy", Q(pe) ? "true" : void 0), t.disabled = !Q(O), $r(n, 1, `fa-solid ${Q(A) && !Q(j) ? "fa-pause" : "fa-play"} pie-tool-tts-inline__icon`, "svelte-9msc39");
|
|
2832
|
-
}, [() => Q(D).t(Q($e))]), ur("click", t, qe), xr(e, t);
|
|
2833
|
-
};
|
|
2834
|
-
Ir(n, (e) => {
|
|
2835
|
-
Q(E) ? e(r) : e(i, -1);
|
|
2836
|
-
}), Te(t), xr(e, t);
|
|
2837
|
-
}, n = (e) => {
|
|
2838
|
-
var t = br(), n = tn(t), r = (e) => {
|
|
2839
|
-
var t = Ti();
|
|
2840
|
-
let n;
|
|
2841
|
-
var r = en(t), i = (e) => {
|
|
2842
|
-
var t = wi();
|
|
2843
|
-
let n;
|
|
2844
|
-
Br(t, 21, () => Q(be), (e) => e.rate, (e, t) => {
|
|
2845
|
-
var n = Ci(), r = en(n), i = nn(r, !0);
|
|
2846
|
-
Te(n), Cn(() => {
|
|
2847
|
-
$(n, "data-pie-tts-speed-rate", Q(t).rate), $(n, "tabindex", Q(xe) === Q(t).rate ? 0 : -1), $(n, "aria-label", Q(t).ariaLabel), $(n, "aria-checked", Q(xe) === Q(t).rate), n.disabled = !Q(O), $(r, "data-label", Q(t).label), Or(i, Q(t).label);
|
|
2848
|
-
}), ur("click", n, () => Ze(Q(t))), ur("keydown", n, (e) => Le(Ae, e)), xr(e, n);
|
|
2849
|
-
}), Te(t), Cn((e) => {
|
|
2850
|
-
n = $r(t, 1, "pie-tool-tts-inline__speed-group svelte-9msc39", null, n, { "pie-tool-tts-inline__speed-group--stacked": Q(ue) }), $(t, "aria-label", e);
|
|
2851
|
-
}, [() => Q(D).t("tools.textToSpeech.inline.playbackSpeedA11y")]), xr(e, t);
|
|
2852
|
-
};
|
|
2853
|
-
Ir(r, (e) => {
|
|
2854
|
-
Q(be).length > 0 && e(i);
|
|
2855
|
-
});
|
|
2856
|
-
var a = rn(r, 2), o = rn(a, 2), s = rn(o, 2);
|
|
2857
|
-
Te(t), ui(t, (e) => U(w, e), () => Q(w)), Cn((e, r, i, c) => {
|
|
2858
|
-
$(t, "id", Ce), n = $r(t, 1, "pie-tool-tts-inline__panel svelte-9msc39", null, n, {
|
|
2859
|
-
"pie-tool-tts-inline__panel--floating": Q(et),
|
|
2860
|
-
"pie-tool-tts-inline__panel--row": Q(z),
|
|
2861
|
-
"pie-tool-tts-inline__panel--left-aligned-inline": Q(tt),
|
|
2862
|
-
"pie-tool-tts-inline__panel--compact": Q(tt) && Q(ue)
|
|
2863
|
-
}), ti(t, Q(tt) ? Q(it) : ""), $(t, "aria-label", e), $(a, "aria-label", r), a.disabled = !Q(O) || !Q(A), $(o, "aria-label", i), o.disabled = !Q(O) || !Q(A), $(s, "aria-label", c), s.disabled = !Q(O);
|
|
2864
|
-
}, [
|
|
2865
|
-
() => Q(D).t("tools.textToSpeech.inline.controlsA11y"),
|
|
2866
|
-
() => Q(D).t("tools.textToSpeech.inline.rewindA11y"),
|
|
2867
|
-
() => Q(D).t("tools.textToSpeech.inline.fastForwardA11y"),
|
|
2868
|
-
() => Q(D).t("tools.textToSpeech.inline.stopA11y")
|
|
2869
|
-
]), ur("click", a, Xe), ur("keydown", a, (e) => Le(je, e)), ur("click", o, Ye), ur("keydown", o, (e) => Le(je, e)), ur("click", s, Je), ur("keydown", s, (e) => Le(je, e)), xr(e, t);
|
|
2870
|
-
};
|
|
2871
|
-
Ir(n, (e) => {
|
|
2872
|
-
Q(k) && e(r);
|
|
2873
|
-
}), xr(e, t);
|
|
2874
|
-
};
|
|
2875
|
-
var r = en(t), i = (t) => {
|
|
2876
|
-
var r = Ei(), i = tn(r);
|
|
2877
|
-
n(i);
|
|
2878
|
-
var a = rn(i, 2);
|
|
2879
|
-
e(a), xr(t, r);
|
|
2880
|
-
}, a = (t) => {
|
|
2881
|
-
var r = Ei(), i = tn(r);
|
|
2882
|
-
e(i);
|
|
2883
|
-
var a = rn(i, 2);
|
|
2884
|
-
n(a), xr(t, r);
|
|
2885
|
-
};
|
|
2886
|
-
Ir(r, (e) => {
|
|
2887
|
-
Q(nt) ? e(i) : e(a, -1);
|
|
2888
|
-
});
|
|
2889
|
-
var o = nn(rn(r, 2), !0);
|
|
2890
|
-
Te(t), ui(t, (e) => U(C, e), () => Q(C)), Cn(() => Or(o, Q(M)));
|
|
2891
|
-
}
|
|
2892
|
-
Cn(() => n = $r(t, 1, "pie-tool-tts-inline svelte-9msc39", null, n, {
|
|
2893
|
-
"pie-tool-tts-inline--controls-row": Q(z),
|
|
2894
|
-
"pie-tool-tts-inline--floating": Q(et),
|
|
2895
|
-
"pie-tool-tts-inline--left-aligned": Q(tt)
|
|
2896
|
-
})), xr(e, t);
|
|
2897
|
-
};
|
|
2898
|
-
return Ir(pt, (e) => {
|
|
2899
|
-
b && e(mt);
|
|
2900
|
-
}), xr(e, ft), Ke(dt);
|
|
2901
|
-
}
|
|
2902
|
-
dr(["click", "keydown"]), Ai("pie-tool-tts-inline", yi(ki, {
|
|
2903
|
-
catalogId: {
|
|
2904
|
-
attribute: "catalog-id",
|
|
2905
|
-
type: "String"
|
|
2906
|
-
},
|
|
2907
|
-
size: {
|
|
2908
|
-
attribute: "size",
|
|
2909
|
-
type: "String"
|
|
2910
|
-
},
|
|
2911
|
-
speedOptions: {
|
|
2912
|
-
attribute: "speed-options",
|
|
2913
|
-
type: "Array"
|
|
2914
|
-
},
|
|
2915
|
-
showSingleSpeedOption: {
|
|
2916
|
-
attribute: "show-single-speed-option",
|
|
2917
|
-
type: "Boolean"
|
|
2918
|
-
},
|
|
2919
|
-
layoutMode: {
|
|
2920
|
-
attribute: "layout-mode",
|
|
2921
|
-
type: "String"
|
|
2922
|
-
}
|
|
2923
|
-
}, [], [], { mode: "open" }, e));
|
|
2924
|
-
function Ai(e, t) {
|
|
2925
|
-
customElements.get(e) || customElements.define(e, t);
|
|
2926
|
-
}
|
|
2927
|
-
//#endregion
|
|
2928
|
-
export { ki as default };
|
|
1
|
+
import{coerceBooleanAttributes as _o}from"@pie-players/pie-players-shared/ui/attribute-coercion";import{TOOL_ACTIVE_CHANGE_EVENT as mo,catalogContextForShell as bo,connectToolRegionScopeContext as wo,connectToolRuntimeContext as yo,connectToolShellContext as So,isTTSStartFailure as Pr,normalizeTTSSpeedControlOptions as xo,reportToolFailure as ko,resolveContentRegion as $o}from"@pie-players/pie-assessment-toolkit/tools/registration";import{resolveInterfaceI18n as To}from"@pie-players/pie-players-shared/i18n/provider";import{applyNdsGlyphVariant as Eo,ensureFontAwesome as Ao,installFontAwesomeInShadow as Ro}from"@pie-players/pie-players-shared/ui/fontawesome";import{createPieLogger as Co,isTtsDebugEnabled as Oo}from"@pie-players/pie-players-shared/pie";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");var Fe={},K=Symbol("uninitialized"),No="http://www.w3.org/1999/xhtml",Lr=Array.isArray,Mo=Array.prototype.indexOf,Et=Array.prototype.includes,rn=Array.from,on=Object.keys,At=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Fr=Object.getOwnPropertyDescriptors,Po=Object.prototype,Lo=Array.prototype,Pn=Object.getPrototypeOf,Ir=Object.isExtensible,Fo=()=>{};function Io(e){for(var t=0;t<e.length;t++)e[t]()}function Dr(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var fe=1024,Z=2048,Ie=4096,Ln=8192,zr=16384,Fn=32768,In=1<<25,Dn=65536,ut=1<<19,Do=1<<20,Rt=1<<25,jr=1<<21,zo=1<<22,sn=1<<23,Je=Symbol("$state"),qr=Symbol("component"),Br=Symbol("legacy props"),jo=Symbol(""),Hr=Symbol("attributes"),zn=Symbol("class"),jn=Symbol("style"),qn=Symbol("text"),Ct=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},qo=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Bo(){console.warn("https://svelte.dev/e/derived_inert")}function ln(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Ho(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var C=!1;function ge(e){C=e}var M;function ee(e){if(e===null)throw ln(),Fe;return M=e}function an(){return ee(Ee(M))}function ft(e){if(C){if(Ee(M)!==null)throw ln(),Fe;M=e}}function Ko(e=1){if(C){for(var t=e,n=M;t--;)n=Ee(n);M=n}}function un(e=!0){for(var t=0,n=M;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(t===0)return n;t-=1}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Ee(n);e&&n.remove(),n=i}}function Bn(e){if(!e||e.nodeType!==8)throw ln(),Fe;return e.data}function Kr(e){return e===this.v}function Ur(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Wr(e){return!Ur(e,this.v)}function Uo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Wo(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Vo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Yo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Go(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Jo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xo(){throw new Error("https://svelte.dev/e/hydration_failed")}function Qo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Zo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function es(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ts(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ns(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var De=!1,fn=!1,q=null;function ct(e){q=e}function Vr(e,t=!1,n){q={p:q,i:!1,c:null,e:null,s:e,x:null,r:k,l:fn&&!t?{s:null,u:null,$:[]}:null}}function Yr(e){var t=q,n=t.e;if(n!==null){t.e=null;for(var r of n)pi(r)}return e!==void 0&&(t.x=e),t.i=!0,q=t.p,Hn(e)}function Hn(e={}){return At(e,qr,{value:!0}),e}function Ot(){return!fn||q!==null&&q.l===null}var Xe=[];function Gr(){var e=Xe;Xe=[],Io(e)}function ze(e){if(Xe.length===0&&!Pt){var t=Xe;queueMicrotask(()=>{t===Xe&&Gr()})}Xe.push(e)}function rs(){for(;Xe.length>0;)Gr()}var is=~(Z|Ie|fe);function z(e,t){e.f=e.f&is|t}function Kn(e){(e.f&512)!==0||e.deps===null?z(e,fe):z(e,Ie)}function Jr(e,t){(e.f&2048)!==0?t.set(e,Z):(e.f&4096)!==0&&t.get(e)!==2048&&t.set(e,Ie),z(e,fe)}function cn(e){var t=A,n=k;te(null),he(null);try{return e()}finally{te(t),he(n)}}function os(e,t,n,r){const i=Ot()?Nt:Un;var o=e.filter(g=>!g.settled),l=t.map(i);if(n.length===0&&o.length===0){r(l);return}var a=k,f=ss(),c=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(g=>g.promise)):null;function v(g){if((a.f&16384)===0){f();try{r([...l,...g])}catch(m){Ae(m,a)}dn()}}var p=Xr();if(n.length===0){c.then(()=>v([])).finally(p);return}function h(){Promise.all(n.map(g=>ls(g))).then(v).catch(g=>Ae(g,a)).finally(p)}c?c.then(()=>{if((a.f&16384)!==0){p();return}f(),h(),dn()}):h()}function ss(){var e=k,t=A,n=q,r=O;return function(o=!0){he(e),te(t),ct(n),o&&(e.f&16384)===0&&(r?.activate(),r?.apply())}}function dn(e=!0){he(null),te(null),ct(null),e&&O?.deactivate()}function Xr(){var e=k,t=e.b,n=O,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Nt(e){var t=2|Z;return k!==null&&(k.f|=ut),{ctx:q,deps:null,effects:null,equals:Kr,f:t,fn:e,reactions:null,rv:0,v:K,wv:0,parent:k,ac:null}}var Mt=Symbol("obsolete");function ls(e,t,n){let r=k;r===null&&Uo();var i=void 0,o=Qe(K),l=!A,a=new Set;return bs(()=>{var f=k,c=Dr();i=c.promise;try{Promise.resolve(e()).then(c.resolve,g=>{g!==Ct&&c.reject(g)}).finally(dn)}catch(g){c.reject(g),dn()}var v=O;if(l){if((f.f&32768)!==0)var p=Xr();if(r.b?.is_rendered())v.async_deriveds.get(f)?.reject(Mt);else for(const g of a.values())g.reject(Mt);a.add(c),v.async_deriveds.set(f,c)}const h=(g,m=void 0)=>{p?.(),a.delete(c),m!==Mt&&(v.activate(),m?(o.f|=sn,vt(o,m)):((o.f&8388608)!==0&&(o.f^=sn),vt(o,g)),v.deactivate())};c.promise.then(h,g=>h(null,g||"unknown"))}),gs(()=>{for(const f of a)f.reject(Mt)}),new Promise(f=>{function c(v){function p(){v===i?f(o):c(i)}v.then(p,p)}c(i)})}function B(e){const t=Nt(e);return De||wi(t),t}function Un(e){const t=Nt(e);return t.equals=Wr,t}function as(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)J(t[n])}}function Wn(e){var t,n=k,r=e.parent;if(!Pe&&r!==null&&e.v!==K&&(r.f&24576)!==0)return Bo(),e.v;he(r);try{as(e),t=$i(e)}finally{he(n)}return t}function Qr(e){var t=Wn(e);if(!e.equals(t)&&(e.wv=xi(),(!O?.is_fork||e.deps===null)&&(O!==null?(O.capture(e,t,!0),ht?.capture(e,t,!0)):e.v=t,e.deps===null))){z(e,fe);return}Pe||(G!==null?(nr()||O?.is_fork)&&G.set(e,t):Kn(e))}function us(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&cn(()=>{t.ac.abort(Ct),t.ac=null}),t.fn!==null&&(t.teardown=Fo),zt(t,0),or(t))}function Zr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&_t(t)}var hn=null,dt=null,O=null,ht=null,G=null,Vn=null,Pt=!1,Yn=!1,Lt=null,pn=null,ei=0,fs=1,pt=class mr{id=fs++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#l=new Map;#r=null;#i=[];#s=[];#o=new Map;#a=new Map;#h=new Set;is_fork=!1;#u=!1;constructor(){dt===null?hn=dt=this:(dt.next=this,this.prev=dt),dt=this}#v(){if(this.is_fork)return!0;for(const t of this.#l.keys())if(!this.#m(t))return!0;return!1}#m(t){for(var n=t;n!==null;n=n.parent)if(this.#a.has(n))return!0;return!1}skip_effect(t){this.#a.has(t)||this.#a.set(t,{d:[],m:[]}),this.#h.delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=this.#a.get(t);if(r){this.#a.delete(t);for(var i of r.d)z(i,Z),n(i);for(i of r.m)z(i,Ie),n(i)}this.#h.add(t)}#f(){var t=[];for(const o of this.#i)if(!((o.f&16384)!==0||(o.f&6144)===0)){for(var n=o,r=!1;n.parent!==null;){n=n.parent;var i=n.f;if((i&96)!==0){if((i&1024)===0){r=!0;break}n.f^=fe}}r||t.push(n)}return this.#i=[],t}#g(){this.started=!0;for(const[a,f]of this.#o)z(a,f),this.schedule(a);this.apply();for(var t=Lt=[],n=[],r=pn=[];this.#i.length>0;){ei++>1e3&&(this.#d(),cs());for(const a of this.#f())try{this.#b(a,t,n)}catch(f){throw ii(a),this.#v()||this.discard(),f}}if(O=null,r.length>0){var i=mr.ensure();for(const a of r)i.schedule(a)}if(Lt=null,pn=null,this.#v()){this.#p(n),this.#p(t);for(const[a,f]of this.#a)ri(a,f);r.length>0&&O.#g();return}const o=this.#y();if(o){this.#p(n),this.#p(t),o.#c(this);return}this.#o.clear();for(const a of this.#e)a(this);this.#e.clear(),ht=this,ti(n),ti(t),ht=null,this.#r?.resolve();var l=O;this.#n===0&&(this.#i.length===0||l!==null)&&(this.#d(),De&&(this.#w(),O=l)),l!==null&&(Te.clear(),l.#g())}#b(t,n,r){t.f^=fe;for(var i=t.first;i!==null;){var o=i.f,l=(o&96)!==0;if(!(l&&(o&1024)!==0||(o&8192)!==0||this.#a.has(i))&&i.fn!==null){l?i.f^=fe:(o&4)!==0?n.push(i):De&&(o&16777224)!==0?r.push(i):Dt(i)&&((o&16)!==0&&this.add_dirty_reaction(i,Ie),_t(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}}#y(){for(var t=this.prev;t!==null;t=t.prev)if(!t.is_fork&&this.#_(t))return t;return null}#_(t){for(const[n,[,r]]of this.current)if(!r&&t.current.has(n))return!0;return!1}#c(t){for(const[r,i]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,i);for(const[r,i]of t.async_deriveds){const o=this.async_deriveds.get(r);o&&i.promise.then(o.resolve).catch(o.reject)}t.async_deriveds.clear(),this.transfer_reactions(t.#o);const n=r=>{var i=r.reactions;if(i!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const a of i){var o=a.f;if((o&2)!==0)n(a);else{var l=a;o&4194320&&!this.async_deriveds.has(l)&&(this.#o.delete(l),z(l,Z),this.schedule(l))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>t.discard()),t.#d(),O=this,this.#g()}#p(t){for(var n=0;n<t.length;n+=1)Jr(t[n],this.#o)}capture(t,n,r=!1){t.v!==K&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&8388608)===0&&(this.current.set(t,[n,r]),G?.set(t,n)),this.is_fork||(t.v=n)}activate(){O=this}deactivate(){O=null,G=null}flush(){try{Yn=!0,O=this,this.#g()}finally{ei=0,Vn=null,Lt=null,pn=null,Yn=!1,O=null,G=null,Te.clear()}}discard(){for(const t of this.#t)t(this);this.#t.clear();for(const t of this.async_deriveds.values())t.reject(Mt);this.#d(),this.#r?.resolve()}register_created_effect(t){this.#s.push(t)}#w(){for(let p=hn;p!==null;p=p.next){var t=p.id<this.id,n=[];for(const[h,[g,m]]of this.current){if(p.current.has(h)){var r=p.current.get(h)[0];if(t&&g!==r)p.current.set(h,[g,m]);else continue}n.push(h)}if(t)for(const[h,g]of this.async_deriveds){const m=p.async_deriveds.get(h);m&&g.promise.then(m.resolve).catch(m.reject)}var i=[...p.current.keys()].filter(h=>!p.current.get(h)[1]);if(!(!p.started||i.length===0)){var o=i.filter(h=>!this.current.has(h));if(o.length===0)t&&p.discard();else if(n.length>0){if(t)for(const h of this.#h)p.unskip_effect(h,g=>{(g.f&4194320)!==0?p.schedule(g):p.#p([g])});p.activate();var l=new Set,a=new Map;for(var f of n)ni(f,o,l,a);a=new Map;var c=[...p.current].filter(([h,g])=>{const m=this.current.get(h);return m?m[0]!==g[0]||m[1]!==g[1]:!0}).map(([h])=>h);if(c.length>0)for(const h of this.#s)(h.f&155648)===0&&Gn(h,c,a)&&((h.f&4194320)!==0?(z(h,Z),p.schedule(h)):p.add_dirty_reaction(h,Z));if(p.#i.length>0&&!p.#u){p.apply();for(var v of p.#f())p.#b(v,[],[])}p.deactivate()}}}}increment(t,n){if(this.#n+=1,t){let r=this.#l.get(n)??0;this.#l.set(n,r+1)}}decrement(t,n){if(this.#n-=1,t){let r=this.#l.get(n)??0;r===1?this.#l.delete(n):this.#l.set(n,r-1)}this.#u||(this.#u=!0,ze(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_reactions(t){for(const[n,r]of t)this.add_dirty_reaction(n,r);t.clear()}add_dirty_reaction(t,n){(n===2048||this.#o.get(t)!==2048)&&this.#o.set(t,n)}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#r??=Dr()).promise}static ensure(){if(O===null){const t=O=new mr;!Yn&&!Pt&&ze(()=>{t.started||t.flush()})}return O}apply(){if(!De||!this.is_fork&&this.prev===null&&this.next===null){G=null;return}G=new Map;for(const[t,[n]]of this.current)G.set(t,n);for(let t=hn;t!==null;t=t.next)if(!(t===this||t.is_fork)&&(t.id>=this.id||!t.#_(this)))for(const[n,r]of t.previous)G.has(n)||G.set(n,r)}schedule(t){if(Vn=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}this.#i.push(t)}#d(){if(this.linked){var t=this.prev,n=this.next;t===null?hn=n:t.next=n,n===null?dt=t:n.prev=t,this.linked=!1}}};function ke(e){var t=Pt,n=ht;ht=null,Pt=!0;try{var r;for(e&&(ke(),r=e());;){if(rs(),O===null)return r;O.flush()}}finally{Pt=t,ht=n}}function cs(){try{Jo()}catch(e){Ae(e,Vn)}}var $e=null;function ti(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&24576)===0&&Dt(r)&&($e=new Set,_t(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&gi(r),$e?.size>0)){Te.clear();for(const i of $e){if((i.f&24576)!==0)continue;const o=[i];let l=i.parent;for(;l!==null;)$e.has(l)&&($e.delete(l),o.push(l)),l=l.parent;for(let a=o.length-1;a>=0;a--){const f=o[a];(f.f&24576)===0&&_t(f)}}$e.clear()}}$e=null}}function ni(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;(o&2)!==0?ni(i,t,n,r):(o&4194320)!==0&&(o&2048)===0&&Gn(i,t,r)&&(z(i,Z),Jn(i))}}function Gn(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Et.call(t,i))return!0;if((i.f&2)!==0&&Gn(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Jn(e){O.schedule(e)}function ri(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):(e.f&4096)!==0&&t.m.push(e),z(e,fe);for(var n=e.first;n!==null;)ri(n,t),n=n.next}}function ii(e){z(e,fe);for(var t=e.first;t!==null;)ii(t),t=t.next}var vn=new Set,Te=new Map,oi=!1;function Qe(e,t){return{f:0,v:e,reactions:null,equals:Kr,rv:0,wv:0}}function I(e,t){const n=Qe(e,t);return wi(n),n}function si(e,t=!1,n=!0){const r=Qe(e);return t||(r.equals=Wr),fn&&n&&q!==null&&q.l!==null&&(q.l.s??=[]).push(r),r}function y(e,t,n=!1){return A!==null&&(!_e||(A.f&131072)!==0)&&Ot()&&(A.f&4325394)!==0&&(Oe===null||!Oe.has(e))&&ts(),vt(e,n?et(t):t,pn)}var Ze=null,Xn=0;function vt(e,t,n=null){if(!e.equals(t)){Pe?Te.set(e,t):Te.has(e)||Te.set(e,e.v);var r=pt.ensure();if(r.capture(e,t),(e.f&2)!==0){const i=e;(e.f&2048)!==0&&Wn(i),G===null&&Kn(i)}e.wv=xi(),Ze=null,Xn=0,li(e,Z,n),Ze=null,Ot()&&k!==null&&(k.f&1024)!==0&&(k.f&96)===0&&(pe===null?xs([e]):pe.push(e)),!r.is_fork&&vn.size>0&&!oi&&ds()}return t}function ds(){oi=!1;for(const e of vn){(e.f&1024)!==0&&z(e,Ie);let t;try{t=Dt(e)}catch{t=!0}t&&_t(e)}vn.clear()}function Ft(e){y(e,e.v+1)}function li(e,t,n){var r=e.reactions;if(r!==null){var i=Ot(),o=r.length;if(Xn+=o,Xn>1e5&&Ze===null&&(Ze=new Set),Ze!==null){if(Ze.has(e))return;Ze.add(e)}for(var l=0;l<o;l++){var a=r[l],f=a.f;if(!(!i&&a===k)){var c=(f&Z)===0;if(c&&z(a,t),(f&131072)!==0)vn.add(a);else if((f&2)!==0){var v=a;G?.delete(v),li(v,Ie,n)}else if(c){var p=a;(f&16)!==0&&$e!==null&&$e.add(p),n!==null?n.push(p):Jn(p)}}}}}function et(e){if(typeof e!="object"||e===null||Je in e||qr in e)return e;const t=Pn(e);if(t!==Po&&t!==Lo)return e;var n=new Map,r=Lr(e),i=I(0),o=null,l=rt,a=f=>{if(rt===l)return f();var c=A,v=rt;te(null),Si(l);var p=f();return te(c),Si(v),p};return r&&n.set("length",I(e.length,o)),new Proxy(e,{defineProperty(f,c,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&Zo();var p=n.get(c);return p===void 0?a(()=>{var h=I(v.value,o);return n.set(c,h),h}):y(p,v.value,!0),!0},deleteProperty(f,c){var v=n.get(c);if(v===void 0){if(c in f){const p=a(()=>I(K,o));n.set(c,p),Ft(i)}}else y(v,K),Ft(i);return!0},get(f,c,v){if(c===Je)return e;var p=n.get(c),h=c in f;if(p===void 0&&(!h||Ge(f,c)?.writable)&&(p=a(()=>I(et(h?f[c]:K),o)),n.set(c,p)),p!==void 0){var g=s(p);return g===K?void 0:g}return Reflect.get(f,c,v)},getOwnPropertyDescriptor(f,c){this.has?.(f,c);var v=Reflect.getOwnPropertyDescriptor(f,c),p=n.get(c);if(p!==void 0){var h=s(p);if(h===K)return;if(v&&"value"in v)v.value=h;else return{enumerable:!0,configurable:!0,value:h,writable:!0}}return v},has(f,c){if(c===Je)return!0;var v=n.get(c),p=v!==void 0&&v.v!==K||Reflect.has(f,c);return(v!==void 0||(k!==null||A!==null)&&(!p||Ge(f,c)?.writable))&&(v===void 0&&(v=a(()=>I(p?et(f[c]):K,o)),n.set(c,v)),s(v)===K)?!1:p},set(f,c,v,p){var h=n.get(c),g=c in f;if(r&&c==="length")for(var m=v;m<h.v;m+=1){var S=n.get(m+"");S!==void 0?y(S,K):m in f&&(S=a(()=>I(K,o)),n.set(m+"",S))}if(h===void 0)(!g||Ge(f,c)?.writable)&&(h=a(()=>I(void 0,o)),y(h,et(v)),n.set(c,h));else{g=h.v!==K;var _=a(()=>et(v));y(h,_)}var b=Reflect.getOwnPropertyDescriptor(f,c);if(b?.set&&b.set.call(p,v),!g){if(r&&typeof c=="string"){var T=n.get("length"),P=Number(c);Number.isInteger(P)&&P>=T.v&&y(T,P+1)}Ft(i)}return!0},ownKeys(f){s(i);var c=Reflect.ownKeys(f).filter(h=>{var g=n.get(h);return g===void 0||g.v!==K});for(var[v,p]of n)p.v!==K&&!(v in f)&&c.push(v);return c},setPrototypeOf(){es()}})}var ai,ui,fi,ci;function Qn(){if(ai===void 0){ai=window,ui=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;fi=Ge(t,"firstChild").get,ci=Ge(t,"nextSibling").get,Ir(e)&&(e[zn]=void 0,e[Hr]=null,e[jn]=void 0,e.__e=void 0),Ir(n)&&(n[qn]=void 0)}}function ce(e=""){return document.createTextNode(e)}function je(e){return fi.call(e)}function Ee(e){return ci.call(e)}function It(e,t){if(!C)return je(e);var n=je(M);if(n===null)n=M.appendChild(ce());else if(t&&n.nodeType!==3){var r=ce();return n?.before(r),ee(r),r}return t&&tr(n),ee(n),n}function gn(e,t=!1){if(!C){var n=je(e);return n instanceof Comment&&n.data===""?Ee(n):n}if(t){if(M?.nodeType!==3){var r=ce();return M?.before(r),ee(r),r}tr(M)}return M}function Zn(e,t=!1){if(!C)return je(e);var n=It(e,t);return ft(e),n}function gt(e,t=1,n=!1){let r=C?M:e;for(var i;t--;)i=r,r=Ee(r);if(!C)return r;if(n){if(r?.nodeType!==3){var o=ce();return r===null?i?.after(o):r.before(o),ee(o),o}tr(r)}return ee(r),r}function di(e){e.textContent=""}function hi(){return!De||$e!==null?!1:(k.f&Fn)!==0}function er(e,t,n){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)}function tr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function hs(e){var t=k;if(t===null)return A.f|=sn,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;Ae(e,t)}function Ae(e,t){if(e===Fe)throw e;if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}function ps(e){k===null&&(A===null&&Go(e),Yo()),Pe&&Vo(e)}function vs(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Re(e,t){var n=k;n!==null&&(n.f&8192)!==0&&(e|=Ln);var r={ctx:q,deps:null,nodes:null,f:e|Z|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};O?.register_created_effect(r);var i=r;if((e&4)!==0)Lt!==null?Lt.push(r):pt.ensure().schedule(r);else if(t!==null){try{_t(r)}catch(l){throw J(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&524288)===0&&(i=i.first,(e&16)!==0&&(e&65536)!==0&&i!==null&&(i.f|=Dn))}if(i!==null&&(i.parent=n,n!==null&&vs(i,n),A!==null&&(A.f&2)!==0&&(e&64)===0)){var o=A;(o.effects??=[]).push(i)}return r}function nr(){return A!==null&&!_e}function gs(e){const t=Re(8,null);return z(t,fe),t.teardown=e,t}function Me(e){ps("$effect");var t=k.f;if(!A&&(t&32)!==0&&q!==null&&!q.i){var n=q;(n.e??=[]).push(e)}else return pi(e)}function pi(e){return Re(4|Do,e)}function _s(e){pt.ensure();const t=Re(64|ut,e);return()=>{J(t)}}function ms(e){pt.ensure();const t=Re(64|ut,e);return(n={})=>new Promise(r=>{n.outro?tt(t,()=>{J(t),r(void 0)}):(J(t),r(void 0))})}function rr(e){return Re(4,e)}function bs(e){return Re(zo|ut,e)}function _n(e,t=0){return Re(8|t,e)}function Ce(e,t=[],n=[],r=[]){os(r,t,n,i=>{Re(8,()=>{e(...i.map(s))})})}function ir(e,t=0){return Re(16|t,e)}function de(e){return Re(32|ut,e)}function vi(e){var t=e.teardown;if(t!==null){const n=Pe,r=A;bi(!0),te(null);try{t.call(null)}catch(i){Ae(i,e.parent)}finally{bi(n),te(r)}}}function or(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&cn(()=>{i.abort(Ct)});var r=n.next;(n.f&64)!==0?n.parent=null:J(n,t),n=r}}function ws(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&32)===0&&J(t),t=n}}function J(e,t=!0){var n=!1;(t||(e.f&262144)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ys(e.nodes.start,e.nodes.end),n=!0),e.f|=In,or(e,t&&!n),zt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();vi(e),e.f^=In,e.f|=zr;var i=e.parent;i!==null&&i.first!==null&&gi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ys(e,t){for(;e!==null;){var n=e===t?null:Ee(e);e.remove(),e=n}}function gi(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function tt(e,t,n=!0){var r=[];e.f|=256,_i(e,r,!0);var i=()=>{n&&J(e),t&&t()},o=r.length;if(o>0){var l=()=>--o||i();for(var a of r)a.out(l)}else i()}function _i(e,t,n){if((e.f&8192)===0){e.f^=Ln;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var o=i.next;if((i.f&64)===0){var l=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;_i(i,t,l?n:!1)}i=o}}}function mn(e){e.f&=-257,mi(e,!0)}function mi(e,t){if((e.f&256)===0&&(e.f&8192)!==0){e.f^=Ln,(e.f&1024)===0&&(z(e,Z),pt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!==0||(n.f&32)!==0;mi(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const l of o)(l.is_global||t)&&l.in()}}function sr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Ee(n);t.append(n),n=i}}var Ss=null,Pe=!1;function bi(e){Pe=e}var A=null,_e=!1;function te(e){A=e}var k=null;function he(e){k=e}var Oe=null;function wi(e){A!==null&&(!De&&(A.f&2097152)!==0||(A.f&2)!==0)&&(Oe??=new Set).add(e)}var ne=null,ae=0,pe=null;function xs(e){pe=e}var yi=1,nt=0,rt=nt;function Si(e){rt=e}function xi(){return++yi}function Dt(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Dt(o)&&Qr(o),o.wv>e.wv)return!0}(t&512)!==0&&G===null&&z(e,fe)}return!1}function ki(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!De&&Oe!==null&&Oe.has(e)))for(var i=0;i<r.length;i++){var o=r[i];(o.f&2)!==0?ki(o,t,!1):t===o&&(n?z(o,Z):(o.f&1024)!==0&&z(o,Ie),Jn(o))}}function $i(e){var t=ne,n=ae,r=pe,i=A,o=Oe,l=q,a=_e,f=rt,c=e.f;ne=null,ae=0,pe=null,A=(c&96)===0?e:null,Oe=null,ct(e.ctx),_e=!1,rt=++nt,e.ac!==null&&(cn(()=>{e.ac.abort(Ct)}),e.ac=null);try{e.f|=jr;var v=e.fn,p=v();e.f|=Fn;var h=Ti(e);if(Ot()&&pe!==null&&!_e&&h!==null&&(e.f&6146)===0)for(var g=0;g<pe.length;g++)ki(pe[g],e);if(i!==null&&i!==e){if(nt++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=nt;if(t!==null)for(const m of t)m.rv=nt;pe!==null&&(r===null?r=pe:r.push(...pe))}return(e.f&8388608)!==0&&(e.f^=sn),p}catch(m){return Ti(e),hs(m)}finally{e.f^=jr,ne=t,ae=n,pe=r,A=i,Oe=o,ct(l),_e=a,rt=f}}function Ti(e){var t=e.deps,n=O?.is_fork;if(ne!==null){var r;if(n||zt(e,ae),t!==null&&ae>0)for(t.length=ae+ne.length,r=0;r<ne.length;r++)t[ae+r]=ne[r];else e.deps=t=ne;if(nr()&&(e.f&512)!==0)for(r=ae;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&ae<t.length&&(zt(e,ae),t.length=ae);return t}function ks(e,t){let n=t.reactions;if(n!==null){var r=Mo.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&2)!==0&&(ne===null||!Et.call(ne,t))){var o=t;(o.f&512)!==0&&(o.f^=512),o.v!==K&&Kn(o),o.ac!==null&&cn(()=>{o.ac.abort(Ct),o.ac=null,z(o,Z)}),us(o),zt(o,0)}}function zt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ks(e,n[r])}function _t(e){var t=e.f;if((t&16384)===0){z(e,fe);var n=k;k=e;try{(t&16777232)!==0?ws(e):or(e),vi(e);var r=$i(e);e.teardown=typeof r=="function"?r:null,e.wv=yi}finally{k=n}}}function s(e){var t=(e.f&2)!==0;if(Ss?.add(e),A!==null&&!_e&&!(k!==null&&(k.f&16384)!==0)&&(Oe===null||!Oe.has(e))){var n=A.deps;if((A.f&2097152)!==0)e.rv<nt&&(e.rv=nt,ne===null&&n!==null&&n[ae]===e?ae++:ne===null?ne=[e]:ne.push(e));else{A.deps??=[],Et.call(A.deps,e)||A.deps.push(e);var r=e.reactions;r===null?e.reactions=[A]:Et.call(r,A)||r.push(A)}}if(Pe&&Te.has(e))return Te.get(e);if(t){var i=e;if(Pe){var o=i.v;return((i.f&1024)===0&&i.reactions!==null||Ai(i))&&(o=Wn(i)),Te.set(i,o),o}var l=(i.f&512)===0&&!_e&&A!==null&&(A.f&512)!==0,a=(i.f&Fn)===0;Dt(i)&&(l&&(i.f|=512),Qr(i)),l&&!a&&(Zr(i),Ei(i))}if(G?.has(e))return G.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function Ei(e){if(e.f|=512,e.deps!==null)for(const n of e.deps){var t=n.reactions;t===null?n.reactions=[e]:Et.call(t,e)||t.push(e),(n.f&2)!==0&&(n.f&512)===0&&(Zr(n),Ei(n))}}function Ai(e){if(e.v===K)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Te.has(t)||(t.f&2)!==0&&Ai(t))return!0;return!1}function bn(e){var t=_e;try{return _e=!0,e()}finally{_e=t}}function $s(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Je in e)lr(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&Je in n&&lr(n)}}}function lr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{lr(e[r],t)}catch{}const n=Pn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Fr(n);for(let i in r){const o=r[i].get;if(o)try{o.call(e)}catch{}}}}}var jt=Symbol("events"),Ri=new Set,ar=new Set;function Ne(e,t,n){(t[jt]??={})[e]=n}function Ts(e){for(var t=0;t<e.length;t++)Ri.add(e[t]);for(var n of ar)n(e)}var ur=null,fr=!1;function Ci(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ur=e,fr||(fr=!0,setTimeout(()=>{fr=!1,ur=null}));var l=0,a=ur===e&&e[jt];if(a){var f=i.indexOf(a);if(f!==-1&&(t===document||t===window)){e[jt]=t;return}var c=i.indexOf(t);if(c===-1)return;f<=c&&(l=f)}if(o=i[l]||e.target,o!==t){At(e,"currentTarget",{configurable:!0,get(){return o||n}});var v=A,p=k;te(null),he(null);try{for(var h,g=[];o!==null&&o!==t;){try{var m=o[jt]?.[r];m!=null&&(!o.disabled||e.target===o)&&m.call(o,e)}catch(S){h?g.push(S):h=S}if(e.cancelBubble)break;l++,o=l<i.length?i[l]:null}if(h){for(let S of g)queueMicrotask(()=>{throw S});throw h}}finally{e[jt]=t,delete e.currentTarget,te(v),he(p)}}}var Es=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function As(e){return Es?.createHTML(e)??e}function Rs(e){var t=er("template");return t.innerHTML=As(e.replaceAll("<!>","<!---->")),t.content}function mt(e,t){var n=k;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function qe(e,t){var n=(t&1)!==0,r=(t&2)!==0,i,o=!e.startsWith("<!>");return()=>{if(C)return mt(M,null),M;i===void 0&&(i=Rs(o?e:"<!>"+e),n||(i=je(i)));var l=r||ui?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=je(l),f=l.lastChild;mt(a,f)}else mt(l,l);return l}}function Oi(){if(C)return mt(M,null),M;var e=document.createDocumentFragment(),t=document.createComment(""),n=ce();return e.append(t,n),mt(t,n),e}function ve(e,t){if(C){var n=k;((n.f&32768)===0||n.nodes.end===null)&&(n.nodes.end=M),an();return}e!==null&&e.before(t)}var Cs=["touchstart","touchmove"];function Os(e){return Cs.includes(e)}function Ns(e){let t=0,n=Qe(0),r;return()=>{nr()&&(s(n),_n(()=>(t===0&&(r=bn(()=>e(()=>Ft(n)))),t+=1,()=>{ze(()=>{t-=1,t===0&&(r?.(),r=void 0,Ft(n))})})))}}var Ms=Dn|ut;function Ps(e,t,n,r){new Ls(e,t,n,r)}var Ls=class{parent;is_pending=!1;transform_error;#e;#t=C?M:null;#n;#l;#r;#i=null;#s=null;#o=null;#a=null;#h=0;#u=0;#v=!1;#m=new Map;#f=null;#g=Ns(()=>(this.#f=Qe(this.#h),()=>{this.#f=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#l=i=>{var o=k;o.b=this,o.f|=128,n(i)},this.parent=k.b,this.transform_error=r??this.parent?.transform_error??(i=>i),this.#r=ir(()=>{if(C){const i=Bn(this.#t);an();const o=i==="[!";if(i.startsWith("[?")){const l=JSON.parse(i.slice(2));this.#y(l)}else o?this.#p():this.#b()}else this.#w()},Ms),C&&(this.#e=M)}#b(){try{this.#i=de(()=>this.#l(this.#e))}catch(e){this.error(e)}}#y(e){const t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#_(e);ze(r),t&&(this.#o=de(()=>{t(this.#e,()=>e,()=>n)}))}#_(e){var t=!1,n=!1;const r=()=>{if(!this.#c()){if(t){Ho();return}t=!0,n&&ns(),this.#o!==null&&tt(this.#o,()=>{this.#o=null}),this.#S(()=>{this.#w()})}};return{reset:r,invoke_onerror:()=>{if(!this.#c())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(o){Ae(o,this.#r&&this.#r.parent)}}}}#c(){return(this.#r.f&(zr|In))!==0}#p(){const e=this.#n.pending;e&&(this.is_pending=!0,this.#s=de(()=>e(this.#e)),ze(()=>{if(!this.#c()){var t=this.#a=document.createDocumentFragment(),n=ce(),r=!1;if(t.append(n),this.#i=this.#S(()=>{try{return de(()=>this.#l(n))}catch(i){try{this.error(i),r=!0}catch(o){Ae(o,this.#r.parent)}return null}}),this.#i===null){this.#a=null,r&&this.#d(O);return}this.#u===0&&(this.#e.before(t),this.#a=null,tt(this.#s,()=>{this.#s=null}),this.#d(O))}}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#h=0,this.#i=de(()=>{this.#l(this.#e)}),this.#u>0){var e=this.#a=document.createDocumentFragment();sr(this.#i,e);const t=this.#n.pending;this.#s=de(()=>t(this.#e))}else this.#d(O)}catch(t){this.error(t)}}#d(e){this.is_pending=!1,e.transfer_reactions(this.#m)}defer_effect(e){Jr(e,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=k,n=A,r=q;he(this.#r),te(this.#r),ct(this.#r.ctx);try{return pt.ensure(),e()}finally{he(t),te(n),ct(r)}}#x(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#x(e,t);return}this.#u+=e,this.#u===0&&(this.#d(t),this.#s&&tt(this.#s,()=>{this.#s=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(e,t){this.#x(e,t),this.#h+=e,!(!this.#f||this.#v)&&(this.#v=!0,ze(()=>{this.#v=!1,this.#f&&vt(this.#f,this.#h)}))}get_effect_pending(){return this.#g(),s(this.#f)}error(e){if(e===Fe||!this.#n.onerror&&!this.#n.failed)throw e;O?.is_fork?(this.#i&&O.skip_effect(this.#i),this.#s&&O.skip_effect(this.#s),this.#o&&O.skip_effect(this.#o),O.oncommit(()=>{this.#c()||this.#k(e)})):this.#k(e)}#k(e){this.#i&&(J(this.#i),this.#i=null),this.#s&&(J(this.#s),this.#s=null),this.#o&&(J(this.#o),this.#o=null),C&&(ee(this.#t),Ko(),ee(un()));let t=this.#n.failed;const n=r=>{if(this.#c())return;const{reset:i,invoke_onerror:o}=this.#_(r);o(),t&&!this.#c()&&(this.#o=this.#S(()=>{try{return de(()=>{var l=k;l.b=this,l.f|=128,t(this.#e,()=>r,()=>i)})}catch(l){return Ae(l,this.#r.parent),null}}))};ze(()=>{if(!this.#c()){var r;try{r=this.transform_error(e)}catch(i){Ae(i,this.#r&&this.#r.parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(n,i=>Ae(i,this.#r&&this.#r.parent)):n(r)}})}};function Ni(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[qn]??=e.nodeValue)&&(e[qn]=n,e.nodeValue=`${n}`)}function Mi(e,t){return Pi(e,t)}function Fs(e,t){Qn(),t.intro=t.intro??!1;const n=t.target,r=C,i=M;try{for(var o=je(n);o&&(o.nodeType!==8||o.data!=="[");)o=Ee(o);if(!o)throw Fe;ge(!0),ee(o);const l=Pi(e,{...t,anchor:o});return ge(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
|
|
2
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw l;return l!==Fe&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Xo(),Qn(),di(n),ge(!1),Mi(e,t)}finally{ge(r),ee(i)}}var wn=new Map;function Pi(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:l=!0,transformError:a}){Qn();var f=void 0,c=ms(()=>{var v=n??t.appendChild(ce());Ps(v,{pending:()=>{}},g=>{Vr({});var m=q;if(o&&(m.c=o),i&&(r.$$events=i),C&&mt(g,null),f=e(g,r)||Hn(),C&&(k.nodes.end=M,M===null||M.nodeType!==8||M.data!=="]"))throw ln(),Fe;Yr()},a);var p=new Set,h=g=>{for(var m=0;m<g.length;m++){var S=g[m];if(!p.has(S)){p.add(S);var _=Os(S);for(const P of[t,document]){var b=wn.get(P);b===void 0&&(b=new Map,wn.set(P,b));var T=b.get(S);T===void 0?(P.addEventListener(S,Ci,{passive:_}),b.set(S,1)):b.set(S,T+1)}}}};return h(rn(Ri)),ar.add(h),()=>{for(var g of p)for(const _ of[t,document]){var m=wn.get(_),S=m.get(g);--S==0?(_.removeEventListener(g,Ci),m.delete(g),m.size===0&&wn.delete(_)):m.set(g,S)}ar.delete(h),v!==n&&v.parentNode?.removeChild(v)}});return cr.set(f,c),f}var cr=new WeakMap;function Is(e,t){const n=cr.get(e);return n?(cr.delete(e),n(t)):Promise.resolve()}var Ds=class{anchor;#e=new Map;#t=new Map;#n=new Map;#l=new Set;#r=!0;constructor(e,t=!0){this.anchor=e,this.#r=t}#i=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)mn(n),this.#l.delete(t);else{var r=this.#n.get(t);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)}for(const[i,o]of this.#e){if(this.#e.delete(i),i===e)break;const l=this.#n.get(o);l&&(J(l.effect),this.#n.delete(o))}for(const[i,o]of this.#t){if(i===t||this.#l.has(i))continue;const l=()=>{if(Array.from(this.#e.values()).includes(i)){var a=document.createDocumentFragment();sr(o,a),a.append(ce()),this.#n.set(i,{effect:o,fragment:a})}else J(o);this.#l.delete(i),this.#t.delete(i)};this.#r||!n?(this.#l.add(i),tt(o,l,!1)):l()}}};#s=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[n,r]of this.#n)t.includes(n)||(J(r.effect),this.#n.delete(n))};ensure(e,t){var n=O,r=hi();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),o=ce();i.append(o),this.#n.set(e,{effect:de(()=>t(o)),fragment:i})}else this.#t.set(e,de(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(const[l,a]of this.#t)l===e?n.unskip_effect(a):n.skip_effect(a);for(const[l,a]of this.#n)l===e?n.unskip_effect(a.effect):n.skip_effect(a.effect);n.oncommit(this.#i),n.ondiscard(this.#s)}else C&&(this.anchor=M),this.#i(n)}};function qt(e,t,n=!1){var r;C&&(r=M,an());var i=new Ds(e),o=n?Dn:0;function l(a,f){if(C){var c=Bn(r);if(a!==parseInt(c.substring(1))){var v=un();ee(v),i.anchor=v,ge(!1),i.ensure(a,f),ge(!0);return}}i.ensure(a,f)}ir(()=>{var a=!1;t((f,c=0)=>{a=!0,l(c,f)}),a||l(-1,null)},o)}function zs(e,t,n){for(var r=[],i=t.length,o,l=t.length,a=0;a<i;a++){let p=t[a];tt(p,()=>{if(o){if(o.pending.delete(p),o.done.add(p),o.pending.size===0){var h=e.outrogroups;dr(e,rn(o.done)),h.delete(o),h.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var f=r.length===0&&n!==null&&e.pending.size===0;if(f){var c=n,v=c.parentNode;di(v),v.append(c),e.items.clear()}dr(e,t,!f)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function dr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const l of e.pending.values())for(const a of l)r.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var o=t[i];r?.has(o)?(o.f|=Rt,sr(o,document.createDocumentFragment())):J(t[i],n)}}var Li;function js(e,t,n,r,i,o=null){var l=e,a=new Map;if((t&4)!==0){var f=e;l=C?ee(je(f)):f.appendChild(ce())}C&&an();var c=null,v=Un(()=>{var _=n();return Lr(_)?_:_==null?[]:rn(_)}),p=new Map,h=!0;function g(_){if((S.effect.f&16384)===0){S.pending.delete(_);var b=s(v);S.fallback=c,qs(S,b,l,t,r),c!==null&&(b.length===0?(c.f&33554432)===0?mn(c):(c.f^=Rt,Ht(c,null,l)):tt(c,()=>{c=null}))}}function m(_){S.pending.delete(_)}var S={effect:ir(()=>{var _=s(v),b=_.length;let T=!1;C&&Bn(l)==="[!"!=(b===0)&&(l=un(),ee(l),ge(!1),T=!0);for(var P=new Set,N=O,X=hi(),x=0;x<b;x+=1){C&&M.nodeType===8&&M.data==="]"&&(l=M,T=!0,ge(!1));var j=_[x],re=r(j,x),L=h?null:a.get(re);L?(L.v&&vt(L.v,j),L.i&&vt(L.i,x),X&&N.unskip_effect(L.e)):(L=Bs(a,h?l:Li??=ce(),j,re,x,i,t,n),h||(L.e.f|=Rt),a.set(re,L)),P.add(re)}if(b===0&&o&&!c&&(h?c=de(()=>o(l)):(c=de(()=>o(Li??=ce())),c.f|=Rt)),b>P.size&&Wo("","",""),C&&b>0&&ee(un()),!h)if(p.set(N,P),X){for(const[ie,Kt]of a)P.has(ie)||N.skip_effect(Kt.e);N.oncommit(g),N.ondiscard(m)}else g(N);T&&ge(!0),s(v)}),flags:t,items:a,pending:p,outrogroups:null,fallback:c};h=!1,C&&(l=M)}function Bt(e){for(;e!==null&&(e.f&32)===0;)e=e.next;return e}function qs(e,t,n,r,i){var o=(r&8)!==0,l=t.length,a=e.items,f=Bt(e.effect.first),c,v=null,p,h=[],g=[],m,S,_,b;if(o)for(b=0;b<l;b+=1)m=t[b],S=i(m,b),_=a.get(S).e,(_.f&33554432)===0&&(_.nodes?.a?.measure(),(p??=new Set).add(_));for(b=0;b<l;b+=1){if(m=t[b],S=i(m,b),_=a.get(S).e,e.outrogroups!==null)for(const ie of e.outrogroups)ie.pending.delete(_),ie.done.delete(_);if((_.f&8192)!==0&&(mn(_),o&&(_.nodes?.a?.unfix(),(p??=new Set).delete(_))),(_.f&33554432)!==0)if(_.f^=Rt,_===f)Ht(_,null,n);else{var T=v?v.next:f;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Be(e,v,_),Be(e,_,T),Ht(_,T,n),v=_,h=[],g=[],f=Bt(v.next);continue}if(_!==f){if(c!==void 0&&c.has(_)){if(h.length<g.length){var P=g[0],N;v=P.prev;var X=h[0],x=h[h.length-1];for(N=0;N<h.length;N+=1)Ht(h[N],P,n);for(N=0;N<g.length;N+=1)c.delete(g[N]);Be(e,X.prev,x.next),Be(e,v,X),Be(e,x,P),f=P,v=x,b-=1,h=[],g=[]}else c.delete(_),Ht(_,f,n),Be(e,_.prev,_.next),Be(e,_,v===null?e.effect.first:v.next),Be(e,v,_),v=_;continue}for(h=[],g=[];f!==null&&f!==_;)(c??=new Set).add(f),g.push(f),f=Bt(f.next);if(f===null)continue}(_.f&33554432)===0&&h.push(_),v=_,f=Bt(_.next)}if(e.outrogroups!==null){for(const ie of e.outrogroups)ie.pending.size===0&&(dr(e,rn(ie.done)),e.outrogroups?.delete(ie));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||c!==void 0){var j=[];if(c!==void 0)for(_ of c)(_.f&8192)===0&&j.push(_);for(;f!==null;)(f.f&8192)===0&&f!==e.fallback&&j.push(f),f=Bt(f.next);var re=j.length;if(re>0){var L=(r&4)!==0&&l===0?n:null;if(o){for(b=0;b<re;b+=1)j[b].nodes?.a?.measure();for(b=0;b<re;b+=1)j[b].nodes?.a?.fix()}zs(e,j,L)}}o&&ze(()=>{if(p!==void 0)for(_ of p)_.nodes?.a?.apply()})}function Bs(e,t,n,r,i,o,l,a){var f=(l&1)!==0?(l&16)===0?si(n,!1,!1):Qe(n):null,c=(l&2)!==0?Qe(i):null;return{v:f,i:c,e:de(()=>(o(t,f??n,c??i,a),()=>{e.delete(r)}))}}function Ht(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&(t.f&33554432)===0?t.nodes.start:n;r!==null;){var l=Ee(r);if(o.before(r),r===i)return;r=l}}function Be(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Hs(e,t){rr(()=>{e=k?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=er("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function hr(e,t,n){rr(()=>{var r=bn(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,o={};_n(()=>{var l=n();$s(l),i&&Ur(o,l)&&(o=l,r.update(l))}),i=!0}if(r?.destroy)return()=>r.destroy()})}var Fi=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function Ks(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,l=0;(l=r.indexOf(i,l))>=0;){var a=l+o;(l===0||Fi.includes(r[l-1]))&&(a===r.length||Fi.includes(r[a]))?r=(l===0?"":r.substring(0,l))+r.substring(a+1):l=a}}return r===""?null:r}function Ii(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];o!=null&&o!==""&&(r+=" "+i+": "+o+n)}return r}function pr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Us(e,t){if(t){var n="",r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var o=!1,l=0,a=!1,f=[];r&&f.push(...Object.keys(r).map(pr)),i&&f.push(...Object.keys(i).map(pr));var c=0,v=-1;const S=e.length;for(var p=0;p<S;p++){var h=e[p];if(a?h==="/"&&e[p-1]==="*"&&(a=!1):o?o===h&&(o=!1):h==="/"&&e[p+1]==="*"?a=!0:h==='"'||h==="'"?o=h:h==="("?l++:h===")"&&l--,!a&&o===!1&&l===0){if(h===":"&&v===-1)v=p;else if(h===";"||p===S-1){if(v!==-1){var g=pr(e.substring(c,v).trim());if(!f.includes(g)){h!==";"&&p++;var m=e.substring(c,p).trim();n+=" "+m+";"}}c=p+1,v=-1}}}}return r&&(n+=Ii(r)),i&&(n+=Ii(i,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function bt(e,t,n,r,i,o){var l=e[zn];if(C||l!==n||l===void 0){var a=Ks(n,r,o);(!C||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e[zn]=n}else if(o&&i!==o)for(var f in o){var c=!!o[f];(i==null||c!==!!i[f])&&e.classList.toggle(f,c)}return o}function vr(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Ws(e,t,n,r){var i=e[jn];if(C||i!==t){var o=Us(t,r);(!C||o!==e.getAttribute("style"))&&(o==null?e.removeAttribute("style"):e.style.cssText=o),e[jn]=t}else r&&(Array.isArray(r)?(vr(e,n?.[0],r[0]),vr(e,n?.[1],r[1],"important")):vr(e,n,r));return r}var Vs=Symbol("is custom element"),Ys=Symbol("is html"),Gs=qo?"link":"LINK";function U(e,t,n,r){var i=Js(e);if(!(C&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Gs))){var o=i[t];o!==(i[t]=n)&&(t==="loading"&&(e[jo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Di(e).has(t)?e[t]=n:C&&(typeof n=="number"||typeof n=="boolean")&&o===String(n)||e.setAttribute(t,n))}}function wt(e,t,n){var r=A,i=k;let o=C;C&&ge(!1),te(null),he(null);try{t!=="style"&&(gr.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?Di(e).has(t):n&&typeof n=="object")?e[t]=n:U(e,t,n==null?n:String(n))}finally{te(r),he(i),o&&ge(!0)}}function Js(e){return e[Hr]??={[Vs]:e.nodeName.includes("-"),[Ys]:e.namespaceURI===No}}var gr=new Map;function Di(e){var t=e.getAttribute("is")||e.nodeName,n=gr.get(t);if(n)return n;gr.set(t,n=new Set);for(var r,i=e,o=Element.prototype;o!==i;){r=Fr(i);for(var l in r)r[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&n.add(l);i=Pn(i)}return n}function _r(e,t){return e===t||e?.[Je]===t}function zi(e=Hn(),t,n,r){var i=q.r,o=k;return rr(()=>{var l,a;return _n(()=>{l=a,a=r?.()||[],bn(()=>{_r(n(...a),e)||(t(e,...a),l&&_r(n(...l),e)&&t(null,...l))})}),()=>{let f=o;for(;f!==i&&f.parent!==null&&f.parent.f&33554432;)f=f.parent;const c=()=>{a&&_r(n(...a),e)&&t(null,...a)},v=f.teardown;f.teardown=()=>{c(),v?.()}}}),e}var yn=!1;function Xs(e){var t=yn;try{return yn=!1,[e(),yn]}finally{yn=t}}function He(e,t,n,r){var i=!fn||(n&2)!==0,o=(n&8)!==0,l=(n&16)!==0,a=r,f=!0,c=void 0,v=()=>l&&i?(c??=Nt(r),s(c)):(f&&(f=!1,a=l?bn(r):r),a);let p;if(o){var h=Je in e||Br in e;p=Ge(e,t)?.set??(h&&t in e?N=>e[t]=N:void 0)}var g,m=!1;o?[g,m]=Xs(()=>e[t]):g=e[t],g===void 0&&r!==void 0&&(g=v(),p&&(i&&Qo(t),p(g)));var S;if(i?S=()=>{var N=e[t];return N===void 0?v():(f=!0,N)}:S=()=>{var N=e[t];return N!==void 0&&(a=void 0),N===void 0?a:N},i&&(n&4)===0)return S;if(p){var _=e.$$legacy;return(function(N,X){return arguments.length>0?((!i||!X||_||m)&&p(X?S():N),N):S()})}var b=!1,T=((n&1)!==0?Nt:Un)(()=>(b=!1,S()));o&&s(T);var P=k;return(function(N,X){if(arguments.length>0){const x=X?s(T):i&&o?et(N):N;return y(T,x),b=!0,a!==void 0&&(a=x),N}return Pe&&b||(P.f&16384)!==0?T.v:s(T)})}function Qs(e){return new Zs(e)}var Zs=class{#e;#t;constructor(e){var t=new Map,n=(i,o)=>{var l=si(o,!1,!1);return t.set(i,l),l};const r=new Proxy({...e.props||{},$$events:{}},{get(i,o){return s(t.get(o)??n(o,Reflect.get(i,o)))},has(i,o){return o===Br?!0:(s(t.get(o)??n(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,l){return y(t.get(o)??n(o,l),l),Reflect.set(i,o,l)}});this.#t=(e.hydrate?Fs:Mi)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!De&&(!e?.props?.$$host||e.sync===!1)&&ke(),this.#e=r.$$events;for(const i of Object.keys(this.#t))i==="$set"||i==="$destroy"||i==="$on"||At(this,i,{get(){return this.#t[i]},set(o){this.#t[i]=o},enumerable:!0});this.#t.$set=i=>{Object.assign(r,i)},this.#t.$destroy=()=>{Is(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];const n=(...r)=>t.call(this,...r);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(r=>r!==n)}}$destroy(){this.#t.$destroy()}},ji;typeof HTMLElement=="function"&&(ji=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const o=er("slot");r!=="default"&&(o.name=r),ve(i,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=el(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Sn(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Qs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=_s(()=>{_n(()=>{this.$$r=!0;for(const r of on(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Sn(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const o=this.$$c.$on(r,i);this.$$l_u.set(i,o)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Sn(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return on(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Sn(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function el(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function tl(e,t,n,r,i,o){let l=class extends ji{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return on(t).map(a=>(t[a].attribute||a).toLowerCase())}};return on(t).forEach(a=>{At(l.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(f){f=Sn(a,f,t),this.$$d[a]=f;var c=this.$$c;c&&(Ge(c,a)?.get?c[a]=f:c.$set({[a]:f}))}})}),r.forEach(a=>{At(l.prototype,a,{get(){return this.$$c?.[a]}})}),o&&(l=o(l)),e.element=l,l}var nl=qe("<pie-nds-icon-button></pie-nds-icon-button>",2),rl=qe('<button type="button"><i aria-hidden="true"></i></button>'),il=qe('<span class="pie-tool-tts-inline__trigger-zoom svelte-9msc39"><!></span>'),ol=qe('<button type="button" role="radio" data-pie-tts-control="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-9msc39"><span class="pie-tool-tts-inline__speed-label svelte-9msc39"> </span></button>'),sl=qe('<div role="radiogroup"></div>'),ll=qe('<div role="toolbar" 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-9msc39"><i class="fa-solid fa-backward pie-tool-tts-inline__icon svelte-9msc39" 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-9msc39"><i class="fa-solid fa-forward pie-tool-tts-inline__icon svelte-9msc39" 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-9msc39"><i class="fa-solid fa-stop pie-tool-tts-inline__icon svelte-9msc39" aria-hidden="true"></i></button></div>'),qi=qe("<!> <!>",1),al=qe('<div><!> <div class="pie-sr-only svelte-9msc39" role="status" aria-live="polite" aria-atomic="true"> </div></div>'),ul={hash:"svelte-9msc39",code:`
|
|
4
|
+
/* Lay the component out as a flex box, not the default inline custom element.
|
|
5
|
+
As \`display: inline\` the host is blockified into a block flex item that
|
|
6
|
+
wraps its content in a line box, so the inline-flex root sits on the text
|
|
7
|
+
baseline — a play button then rides that baseline and drifts
|
|
8
|
+
LOW versus the calculator button (whose flex-item wrapper has no line box).
|
|
9
|
+
inline-flex + center removes the line box and keeps the trigger centered. */:host {display:inline-flex;align-items:center;}.pie-tool-tts-inline.svelte-9msc39 {position:relative;display:inline-flex;align-items:center;gap:0.5rem;}.pie-tool-tts-inline--controls-row.svelte-9msc39 {width:100%;justify-content:flex-end;}
|
|
10
|
+
|
|
11
|
+
/* The play/pause trigger is an <pie-nds-icon-button> host; the NDS component
|
|
12
|
+
owns its shape, colours and hover/active/focus states. This class only
|
|
13
|
+
drives the host's size via NDS's own size custom properties (see the size
|
|
14
|
+
variants below), so the light-DOM inner button matches the toolbar's
|
|
15
|
+
md/sm/lg dimensions. */.pie-tool-tts-inline__trigger-zoom.svelte-9msc39 {display:inline-flex;}.pie-tool-tts-inline__trigger.svelte-9msc39 {display:inline-flex;
|
|
16
|
+
/* Outer button size follows the toolbar size variants (below); the glyph
|
|
17
|
+
keeps the NDS-native icon size (size="small") so it isn't oversized. */--height-32: 2rem;
|
|
18
|
+
/* Host-settable accent: the NDS tertiary glyph colour derives from
|
|
19
|
+
--color-interactive-blue, remapped here to the same chain the panel
|
|
20
|
+
paints with. It defaults through --pie-button-color so the glyph follows
|
|
21
|
+
the active theme; the literal is the no-theme last resort. */--color-interactive-blue: var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));
|
|
22
|
+
/* NDS palette bridge — keep in sync with the copies in
|
|
23
|
+
assessment-toolkit ItemToolBar and section-player SectionItemsPane
|
|
24
|
+
(asserted by scripts/check-theme-tokens.mjs). The vendored button
|
|
25
|
+
paints its fill, its on-accent glyph, its hover ring and its focus
|
|
26
|
+
ring from the NDS design-system palette, which no PIE theme sets, so
|
|
27
|
+
a tertiary trigger kept a #f3f5f7 pill on every page — and once the
|
|
28
|
+
glyph followed the theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}
|
|
29
|
+
|
|
30
|
+
/* Non-NDS fallback trigger (host opted out of pie-nds-icon-button). Inherits
|
|
31
|
+
the plain \`__control\` box; only override to keep the round trigger
|
|
32
|
+
shape and the themeable accent colour on its glyph. */.pie-tool-tts-inline__trigger--plain.svelte-9msc39 {border-radius:50%;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}
|
|
33
|
+
|
|
34
|
+
/* Active/open trigger hooks.
|
|
35
|
+
---------------------------------------------------------------------------
|
|
36
|
+
README documents --pie-tool-trigger-active-background / -color /
|
|
37
|
+
-border-color as the supported way to style this trigger while its panel is
|
|
38
|
+
open, instead of overriding broad tokens like --pie-primary. These rules
|
|
39
|
+
honour all three, matching how tool-calculator-inline-desmos wires the same
|
|
40
|
+
hooks.
|
|
41
|
+
---------------------------------------------------------------------------
|
|
42
|
+
Every fallback is the value this element resolves to when the hook is
|
|
43
|
+
unset, so the rules are inert by default: unlike the calculator, this
|
|
44
|
+
trigger has no filled active look, and adding one would restyle the
|
|
45
|
+
control for every host. Hosts opt in by setting a hook.
|
|
46
|
+
|
|
47
|
+
Keyed off [aria-expanded='true'], which the markup already maintains, so
|
|
48
|
+
there is no new state to keep in sync. */.pie-tool-tts-inline__trigger--plain[aria-expanded="true"].svelte-9msc39 {
|
|
49
|
+
/* All three fallbacks are \`__control\`'s chains, including the glyph colour.
|
|
50
|
+
Not \`--plain\`'s: that rule also declares \`color\`, but \`__control\` repeats
|
|
51
|
+
it further down the sheet at equal specificity, so \`__control\` wins and
|
|
52
|
+
\`--plain\`'s accent declaration never applies. Measured in Chromium: the
|
|
53
|
+
plain trigger's glyph is --pie-button-color either way. */background:var(
|
|
54
|
+
--pie-tool-trigger-active-background,
|
|
55
|
+
var(--pie-button-background-color, var(--pie-button-bg, var(--pie-background, #fff)))
|
|
56
|
+
);color:var(
|
|
57
|
+
--pie-tool-trigger-active-color,
|
|
58
|
+
var(--pie-button-color, var(--pie-text, #222))
|
|
59
|
+
);border-color:var(
|
|
60
|
+
--pie-tool-trigger-active-border-color,
|
|
61
|
+
var(--pie-button-border, var(--pie-border, #c6c6c6))
|
|
62
|
+
);}
|
|
63
|
+
|
|
64
|
+
/* NDS variant: its glyph colour derives from --color-interactive-blue, so the
|
|
65
|
+
accent is remapped rather than painted, exactly as the base rule does. Only
|
|
66
|
+
the foreground hook applies -- background and border are owned by the NDS
|
|
67
|
+
button's own internals, and setting them on this host element would paint a
|
|
68
|
+
box the tertiary button does not currently have. */.pie-tool-tts-inline__trigger:not(.pie-tool-tts-inline__trigger--plain)[aria-expanded="true"].svelte-9msc39 {--color-interactive-blue: var(
|
|
69
|
+
--pie-tool-trigger-active-color,
|
|
70
|
+
var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)))
|
|
71
|
+
);}.pie-tool-tts-inline__control.svelte-9msc39:hover:not(:disabled) {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-9msc39:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.pie-tool-tts-inline__control.svelte-9msc39: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);}
|
|
72
|
+
|
|
73
|
+
/* Activating play/pause deliberately KEEPS focus on the trigger while the
|
|
74
|
+
controls panel opens beside it, so where focus sits has to stay visible —
|
|
75
|
+
including after a pointer activation, where the browser suppresses
|
|
76
|
+
:focus-visible and would paint no ring at all. Scoped to
|
|
77
|
+
\`:focus:not(:focus-visible)\` so it only fills that gap: genuine keyboard
|
|
78
|
+
focus keeps whatever the shared \`__control\` rule (plain trigger) or the NDS
|
|
79
|
+
component (pie-nds-icon-button) already paints, untouched.
|
|
80
|
+
Two selectors because the two trigger variants focus different nodes: the
|
|
81
|
+
plain fallback IS the button, while <pie-nds-icon-button> holds focus on an
|
|
82
|
+
inner light-DOM <button> that Lit creates — so it carries no Svelte scoping
|
|
83
|
+
class and must be reached with :global(). */.pie-tool-tts-inline__trigger.svelte-9msc39:focus:not(:focus-visible),
|
|
84
|
+
.pie-tool-tts-inline__trigger.svelte-9msc39 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-9msc39 {display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:0.25rem;box-sizing:border-box;min-height:var(--pie-tts-controls-row-height, 2.875rem);padding:0.25rem 0.5rem;background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.5rem;}.pie-tool-tts-inline__panel--floating.svelte-9msc39 {position:absolute;z-index:2;top:50%;right:0;left:auto;}.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 {
|
|
85
|
+
/* Fixed so it escapes overflow-clipping ancestors; top / right /
|
|
86
|
+
max-width are set inline by measureLeftAlignedOverlay(). */position:fixed;}.pie-tool-tts-inline__panel--row.svelte-9msc39 {position:absolute;z-index:2;top:100%;right:0;left:auto;}.pie-tool-tts-inline__control.svelte-9msc39 {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid 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;}
|
|
87
|
+
|
|
88
|
+
/* Icon-only panel controls (rewind / fast-forward / stop) are round to match
|
|
89
|
+
the circular NDS trigger; the pill-shaped speed radios keep square corners. */.pie-tool-tts-inline__control--secondary.svelte-9msc39 {border-radius:50%;}.pie-tool-tts-inline__speed-group.svelte-9msc39 {display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.25rem;}.pie-tool-tts-inline__control--speed.svelte-9msc39 {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-9msc39 {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-9msc39 {line-height:1.2;
|
|
90
|
+
/* Render speed labels lowercase regardless of the configured casing.
|
|
91
|
+
Applied to the visible text only; the radio's accessible name comes
|
|
92
|
+
from aria-label (option.ariaLabel), so screen readers still hear the
|
|
93
|
+
canonical "Slow speed" / "Normal speed" / "Fast speed". */text-transform:lowercase;}
|
|
94
|
+
|
|
95
|
+
/* Reserve the bold (selected) width — stacked popper only. Switching the
|
|
96
|
+
selected speed there would otherwise change the label width and resize the
|
|
97
|
+
fit-content card. The ghost is a zero-height, hidden grid row whose bold text
|
|
98
|
+
sets the column width. The inline (roomy) row keeps its natural sizing. */.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__speed-label:where(.svelte-9msc39) {display:inline-grid;justify-items:center;}.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__speed-label:where(.svelte-9msc39)::before {content:attr(data-label);height:0;overflow:hidden;font-weight:700;visibility:hidden;}.pie-tool-tts-inline__control.svelte-9msc39:disabled {cursor:not-allowed;opacity:0.6;}
|
|
99
|
+
|
|
100
|
+
/* ── Overlay layouts (floating-overlay + left-aligned) ──────────────────────
|
|
101
|
+
The design keeps the controls on the surrounding Question/Passage header: a
|
|
102
|
+
low-chrome card, icon-only media glyphs, and speed radios as plain text with
|
|
103
|
+
the selected one lifted into a chip.
|
|
104
|
+
|
|
105
|
+
Shape comes from that design; colour comes from the theme. Each surface
|
|
106
|
+
defaults through a canonical token, and its literal is only the no-theme
|
|
107
|
+
last resort.
|
|
108
|
+
|
|
109
|
+
Foregrounds resolve through --pie-button-color (DaisyUI base-content), the
|
|
110
|
+
one family whose contrast against the card is guaranteed in every shipped
|
|
111
|
+
theme: --pie-primary and --pie-tertiary are \`direct\` mappings of DaisyUI
|
|
112
|
+
slots chosen to pair with their own -content colour, so an accent glyph taken
|
|
113
|
+
from either drops to 1.37:1 on \`pastel\` and 11 of 35 themes fall under 3:1.
|
|
114
|
+
Selection is signalled by the chip and the bolder weight rather than by hue.
|
|
115
|
+
|
|
116
|
+
Host knobs: --pie-tts-button-color (accent),
|
|
117
|
+
--pie-tts-inline-muted-color, --pie-tts-selected-bg,
|
|
118
|
+
--pie-selected-button-background/-border, --pie-tts-menu-shadow. */.pie-tool-tts-inline__panel--floating.svelte-9msc39,
|
|
119
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 {min-height:0;height:3rem; /* Figma: 48px */justify-content:center;gap:0.375rem;
|
|
120
|
+
/* The raised surface is certified with control text and focus rings.
|
|
121
|
+
--pie-white remains the fallback for hosts with no surface token. */background:var(--pie-tts-selected-bg, var(--pie-surface, var(--pie-white, #fff)));
|
|
122
|
+
/* The Figma card is shadow-only, but the shadow is black: once the card
|
|
123
|
+
takes a dark theme's surface it has no visible edge left. A hairline
|
|
124
|
+
derived from the text colour reads on either. Not --pie-border: a host
|
|
125
|
+
that wants borderless controls sets that to transparent, which is
|
|
126
|
+
exactly the case where the shadow is the only edge. --pie-tts-card-border
|
|
127
|
+
is the opt-out (\`transparent\` restores the shadow-only card). */border:1px solid var(--pie-tts-card-border, color-mix(in srgb, var(--pie-text, #000) 15%, transparent));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));}
|
|
128
|
+
|
|
129
|
+
/* Compact: the popper card holds the media row (rewind / fast-forward / stop)
|
|
130
|
+
on top and the speed radios stacked below. The white card bg + shadow come
|
|
131
|
+
from the shared overlay rule above; this only tunes the compact layout. */.pie-tool-tts-inline__panel--compact.svelte-9msc39 {gap:0;width:fit-content;min-width:7.5rem; /* ~120px floor; grows with content beyond that */height:auto; /* stacked popper grows past the 48px roomy toolbar height */padding:0;}
|
|
132
|
+
|
|
133
|
+
/* Media controls (rewind / fast-forward / stop): accent glyph, no chrome. */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39),
|
|
134
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39) {border:0;background:transparent;color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));}.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39):hover:not(:disabled),
|
|
135
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--secondary:where(.svelte-9msc39):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 12%, transparent);}
|
|
136
|
+
|
|
137
|
+
/* Speed radios (inline / roomy): plain muted text with breathing room between
|
|
138
|
+
options — min-width + side padding, matching the original inline spacing. */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39),
|
|
139
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {min-width:2.75rem;padding:0 0.625rem;border:1px solid transparent;background:transparent;box-shadow:none;
|
|
140
|
+
/* Unselected labels are text on the card, so they take the full text colour
|
|
141
|
+
rather than a dimmed mix: the raised surface has little contrast margin
|
|
142
|
+
in \`valentine\`. Hosts that want them dimmer set --pie-tts-inline-muted-color. */color:var(--pie-tts-inline-muted-color, var(--pie-button-color, var(--pie-text, #5b6b73)));font-size:1rem;}.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39):hover:not(:disabled),
|
|
143
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39):hover:not(:disabled) {transform:none;box-shadow:none;background:color-mix(in srgb, var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222))) 8%, transparent);}
|
|
144
|
+
|
|
145
|
+
/* Selected inline radio: "chip" treatment. Placed after the muted rule so it
|
|
146
|
+
wins at equal specificity. The fill is --pie-button-active-bg, which the
|
|
147
|
+
DaisyUI mapping already tunes (base-300 at 70% toward base-100) to hold
|
|
148
|
+
base-content text at 4.5:1 in every shipped theme. */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39),
|
|
149
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));font-weight:600;}
|
|
150
|
+
|
|
151
|
+
/* ── Compact left-aligned overlay ───────────────────────────────────────────
|
|
152
|
+
Inside the popper card the media controls occupy the top row and the speed
|
|
153
|
+
radios drop onto their own full-width line below, stacked vertically.
|
|
154
|
+
\`order\` puts the speeds after the media buttons even though they are first in
|
|
155
|
+
the DOM; flex-basis:100% forces the wrap so media occupy the top line. */.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 {order:1;flex-basis:100%;flex-direction:column;align-items:center;gap:0.125rem;}
|
|
156
|
+
|
|
157
|
+
/* In the card every option reads in the accent colour; the selected one is
|
|
158
|
+
lifted into a bordered chip. Options size to their content and centre (no
|
|
159
|
+
full-width stretch), keeping the popper compact. */.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {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, var(--pie-button-color, var(--pie-text, #222)));font-size:0.75rem;font-weight:500;}.pie-tool-tts-inline__speed-group--stacked.svelte-9msc39 .pie-tool-tts-inline__control--speed[aria-checked='true']:where(.svelte-9msc39) {border:1px solid var(--pie-selected-button-border, var(--pie-button-border, var(--pie-border, #d9dada)));border-radius:6px;background:var(--pie-selected-button-background, var(--pie-button-active-bg, #f3f5f7));color:var(--pie-tts-button-color, var(--pie-button-color, var(--pie-text, #222)));font-weight:700;}
|
|
160
|
+
|
|
161
|
+
/* Trigger size variants set the NDS outer size (--height-32); the glyph keeps
|
|
162
|
+
the NDS-native icon size (host renders size="small"). */.pie-tool-tts-inline__trigger--sm.svelte-9msc39 {--height-32: 1.75rem;}.pie-tool-tts-inline__trigger--md.svelte-9msc39 {--height-32: 2rem;}.pie-tool-tts-inline__trigger--lg.svelte-9msc39 {--height-32: 2.5rem;}.pie-tool-tts-inline__icon.svelte-9msc39 {font-size:1rem;line-height:1;color:currentColor;}
|
|
163
|
+
|
|
164
|
+
@media (max-width: 839px) {.pie-tool-tts-inline.svelte-9msc39 {gap:0.375rem;}.pie-tool-tts-inline__panel--compact.svelte-9msc39 {padding:0;}
|
|
165
|
+
|
|
166
|
+
/* Keep trigger sizes consistent with the calculator at this breakpoint. */.pie-tool-tts-inline__control.svelte-9msc39:not(.pie-tool-tts-inline__trigger) {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__control.svelte-9msc39 .pie-tool-tts-inline__icon:where(.svelte-9msc39) {font-size:1rem;}.pie-tool-tts-inline__control--speed.svelte-9msc39 {width:auto;min-width:2.5rem;height:1.75rem;padding:0 0.5rem;}
|
|
167
|
+
|
|
168
|
+
/* drop font-size on smaller screens */.pie-tool-tts-inline__panel--floating.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39),
|
|
169
|
+
.pie-tool-tts-inline__panel--left-aligned-inline.svelte-9msc39 .pie-tool-tts-inline__control--speed:where(.svelte-9msc39) {font-size:0.75rem;}
|
|
170
|
+
}.pie-sr-only.svelte-9msc39 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
|
|
171
|
+
|
|
172
|
+
@media (prefers-reduced-motion: reduce) {.pie-tool-tts-inline__control.svelte-9msc39 {transition:none !important;}
|
|
173
|
+
}`};function Bi(e,t){Vr(t,!0),Hs(e,ul);const n=Co("tts-inline",Oo);let r=He(t,"catalogId",7,""),i=He(t,"size",7,"md"),o=He(t,"speedOptions",7,void 0),l=He(t,"showSingleSpeedOption",7,!1),a=He(t,"layoutMode",7,"left-aligned"),f=He(t,"baseRate",7,1),c=He(t,"pitch",7,void 0),v=He(t,"volume",7,void 0);const p=typeof window<"u",h=new Set,g=u=>{if(!s(P)){h.add(u);return}Ao(s(P).itemPlayer?.loaderOptions),Ro(u)};Me(()=>{if(!s(P)||h.size===0)return;const u=[...h];h.clear();for(const d of u)g(d)});const m=u=>{g(u);const d=Eo(u,"fa-solid");return{destroy(){h.delete(u),d()}}},S=(u,d)=>{let w=d;const R=()=>{const $=u.querySelector("button");if($)for(const[D,V]of Object.entries(w))V==null?$.removeAttribute(D):$.setAttribute(D,V)};R();const E=new MutationObserver(R);return E.observe(u,{childList:!0,subtree:!0}),{update($){w=$,R()},destroy(){E.disconnect()}}},_=u=>(g(u),{destroy(){h.delete(u)}});let b=I(void 0),T=I(void 0),P=I(null);const N=B(()=>s(P)?.ndsIcons===!0);let X=I(et(typeof customElements<"u"&&!!customElements.get("pie-nds-icon-button")));Me(()=>{!s(N)||s(X)||import("@pie-players/pie-players-shared/nds-icon-button").then(()=>{y(X,!0)},u=>{n.warn("<pie-nds-icon-button> failed to load; the trigger stays a plain button",u)})});const x=B(()=>To(s(P)));let j=I(null),re=I(null);const L=B(()=>s(P)?.ttsService),ie=B(()=>s(P)?.highlightCoordinator),Kt=B(()=>s(re)?.scopeElement||s(j)?.scopeElement||null);let oe=I(!1),Ke=I(!1),Q=I(!1),me=I(!1),se=I(""),it=I(null),Ut=I(null),Le=I(!1),xn=I(!1),Wt=!1,yt=0,Vt=null,be=null;const St=B(()=>xo(o())),kn=B(()=>Ui(s(St))),$n=B(()=>s(St).length>1||l()?s(St):[]),Yt=B(()=>s(it)!==null&&s(Ut)===s(kn)&&s(St).some(u=>u.rate===s(it))?s(it):Wi(s(St))),Tn=B(()=>typeof f()=="number"&&Number.isFinite(f())&&f()>0?f():1),br=B(()=>s(Yt)*s(Tn)),En=B(()=>`${s(kn)}@${s(Tn)}`),Hi=B(()=>wr(c(),0,2)),Ki=B(()=>wr(v(),0,1)),Gt=`pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`,An=`${Gt}-controls`;function xt(){return s(L)?.getRunOwner()===Gt}function Jt(u="",d=!1){y(Le,!1),y(Q,!1),y(me,!1),y(oe,d,!0),y(se,u,!0)}function Ui(u){return u.map(d=>`${d.rate}:${d.label}:${d.ariaLabel}:${d.isDefault?"1":"0"}`).join("|")}function wr(u,d,w){return typeof u=="number"&&Number.isFinite(u)?Math.min(w,Math.max(d,u)):void 0}function Wi(u){return u.find(d=>d.isDefault)?.rate??u.find(d=>d.rate===1)?.rate??u[0]?.rate??1}function Rn(){if(!s(b)||!s(T))return!1;const u=s(b).getRootNode();if(!(u instanceof ShadowRoot))return!1;const d=u.activeElement;return!!(d&&s(T).contains(d))}function Vi(){if(!s(T))return!1;const u=s(T).getRootNode();if(!(u instanceof ShadowRoot))return!1;const d=u.activeElement;return!d||!s(T).contains(d)?!1:d.matches(Gi)}function Yi(){const u=s(T)?.querySelector(Ji);if(u&&!u.disabled){u.focus();return}Xt(!0)}function Xt(u){if(!u)return;const d=Mn();(d?.querySelector("button")??d)?.focus()}function yr(u=s(x).t("tools.textToSpeech.inline.switchedSection"),d=!1){if(!(s(xn)||!s(oe))){y(xn,!0);try{const w=Rn();yt+=1,Jt(u),ot(),d&&queueMicrotask(()=>{Xt(w)})}finally{y(xn,!1)}}}Me(()=>{if(s(b))return yo(s(b),u=>{y(P,u,!0)})}),Me(()=>{if(!s(b))return;const u=So(s(b),w=>{y(j,w,!0)}),d=wo(s(b),w=>{y(re,w,!0)});return()=>{d(),u()}}),Me(()=>{const u=s(L);if(!u)return;const d=E=>{if(!s(oe)||!xt()){y(Q,!1),y(me,!1);return}y(Q,E==="playing"||E==="paused"||E==="loading"&&s(Q),!0),y(me,E==="paused")},w=E=>{const $=String(E),D=Vi();($==="loading"||$==="playing"||$==="paused")&&!Wt&&!xt()&&yr(),$==="idle"&&!Wt&&u.getRunOwner()===null&&yr(s(x).t("tools.textToSpeech.inline.stopped"),!0),d($),$==="playing"&&(s(Le)&&xt()&&y(se,s(x).t("tools.textToSpeech.inline.started"),!0),y(Le,!1)),($==="error"||$==="idle")&&y(Le,!1),D&&!s(Q)&&queueMicrotask(Yi)},R=u.onStateChange(w);return d(u.getState()),R}),Me(()=>()=>{ot()});const Sr="[data-pie-tts-speed-rate]",Cn="[data-pie-tts-media]",Gi="[data-pie-tts-seek]",Ji="[data-pie-tts-stop]";function xr(u){return s(T)?Array.from(s(T).querySelectorAll(u)).filter(d=>!d.disabled&&window.getComputedStyle(d).display!=="none"):[]}function On(u,d){const w=xr(u);if(!w.length)return;const R=w[(d+w.length)%w.length];if(R.focus(),u!==Sr)return;const E=Number(R.dataset.pieTtsSpeedRate),$=s($n).find(D=>D.rate===E);$&&Tr($)}function kr(u,d){const w=xr(u);if(!w.length)return;const R=s(T)?.getRootNode(),E=R instanceof ShadowRoot?R.activeElement:null,$=E?w.indexOf(E):-1;On(u,$===-1?0:$+d)}function Qt(u,d){switch(d.key){case"ArrowDown":case"ArrowRight":d.preventDefault(),kr(u,1);break;case"ArrowUp":case"ArrowLeft":d.preventDefault(),kr(u,-1);break;case"Home":d.preventDefault(),On(u,0);break;case"End":d.preventDefault(),On(u,-1)}}function Xi(){return s(Kt)?$o(s(Kt)):null}function Qi(){return s(j)?bo(s(j),s(P)):void 0}function Zi(u,d){ot();const w=()=>({context:{scopeElement:s(re)?.scopeElement||d||null,kind:s(j)?.kind,itemId:s(j)?.itemId,canonicalItemId:s(j)?.canonicalItemId,contentKind:s(j)?.contentKind,regionPolicy:s(j)?.regionPolicy},resolver:s(re)?.ttsHighlightTargetResolver||null}),R=u.setHighlightTargetResolverProvider(w);return Vt=R,R}function ot(u=Vt){u?.(),u===Vt&&(Vt=null)}function eo(u){if(u.getRunOwner()!==Gt)return!1;const d=String(u.getState());return d==="playing"||d==="paused"||d==="loading"}function to(u,d){const w=Rn();Jt(s(x).t(Pr(u)?"tools.textToSpeech.initFailed":"tools.textToSpeech.inline.startFailed")),s(ie)&&s(ie).clearTTS(),ot(d),w&&queueMicrotask(()=>{Xt(!0)})}function kt(u){Pr(u)||ko(s(P)?.toolkitCoordinator,"textToSpeech","tool-playback",u)}function no(){const u=s(L);if(!u)return;const d=Xi();if(!d){n.debug("No target container found from shell scope context");return}const w=++yt;let R=!1;const E=u.onStateChange(V=>{String(V)==="playing"&&(R=!0)});y(oe,!0),y(Le,!0),y(se,s(x).t("tools.textToSpeech.inline.starting"),!0);const $=Zi(u,d);let D;try{D=u.speak(d,{ownerId:Gt,rate:s(br),pitch:s(Hi),volume:s(Ki),catalogId:r()||void 0,catalogContext:Qi(),language:s(P)?.contentLanguage||void 0})}catch(V){D=Promise.reject(V)}be={service:u,choicesKey:s(En)},D.then(()=>{w!==yt||R||String(u.getState())==="idle"&&Jt(s(x).t("tools.textToSpeech.inline.nothingToRead"))}).catch(V=>{w===yt&&(kt(V),to(V,$))}).finally(()=>{E(),eo(u)||ot($)})}function $r(){const u=s(L);if(!u)return;const d=xt();if(!(s(Le)||d&&String(u.getState())==="loading")){if(d&&s(me)){u.resume(),y(se,s(x).t("tools.textToSpeech.inline.resumed"),!0);return}if(d&&s(Q)&&!s(me)){u.pause(),y(se,s(x).t("tools.textToSpeech.inline.pausedAnnouncement"),!0);return}Wt=!0;try{no()}finally{Wt=!1}}}function ro(){if(!s(L))return;const u=Rn();yt+=1,s(L).stop(),Jt(s(x).t("tools.textToSpeech.inline.stopped")),s(ie)&&s(ie).clearTTS(),ot(),u&&queueMicrotask(()=>{Xt(!0)})}async function io(){if(!(!s(L)||!s(Q)))try{await s(L).seekForward(1),y(se,s(x).t("tools.textToSpeech.inline.skippedForward"),!0)}catch(u){kt(u),y(se,s(x).t("tools.textToSpeech.inline.skipForwardFailed"),!0)}}async function oo(){if(!(!s(L)||!s(Q)))try{await s(L).seekBackward(1),y(se,s(x).t("tools.textToSpeech.inline.skippedBackward"),!0)}catch(u){kt(u),y(se,s(x).t("tools.textToSpeech.inline.skipBackwardFailed"),!0)}}async function Tr(u){const d=s(L);if(!d)return;if(s(Yt)===u.rate){y(se,s(x).t("tools.textToSpeech.inline.speedAnnounce",{label:u.label}),!0);return}const w=s(it),R=s(Ut);y(it,u.rate,!0),y(Ut,s(kn),!0),y(se,s(x).t("tools.textToSpeech.inline.speedAnnounce",{label:u.label}),!0);const E={service:d,choicesKey:s(En)};be=E;try{await d.setPlaybackRate(u.rate*s(Tn))}catch($){be===E&&(be=null),kt($),y(it,w,!0),y(Ut,R,!0),y(se,s(x).t("tools.textToSpeech.inline.speedChangeFailed"),!0)}}const Er=B(()=>i()==="sm"?"pie-tool-tts-inline__trigger--sm":i()==="lg"?"pie-tool-tts-inline__trigger--lg":"pie-tool-tts-inline__trigger--md"),Ar=B(()=>s(Q)&&!s(me)?"tools.textToSpeech.inline.pauseA11y":s(me)?"tools.textToSpeech.inline.resumeA11y":"tools.textToSpeech.inline.playA11y"),Rr=B(()=>a()==="reserved-row"||a()==="expanding-row"),Nn=B(()=>a()==="floating-overlay"),st=B(()=>a()==="left-aligned"),so=B(()=>s(Nn)||s(st)),lt=8,Cr="[data-pie-tool-overlay-boundary]",lo="[data-pie-tool-overlay-protect]";let Zt=I(""),en=I(0);Me(()=>{const u=s(L),d=s(En),w=s(Q)||s(me);if(!u||!w||!xt()||be?.service===u&&be.choicesKey===d)return;const R={service:u,choicesKey:d};be=R;let E=!1;return queueMicrotask(()=>{if(E||be!==R)return;const $=s(br);u.setPlaybackRate($).catch(D=>{be===R&&(be=null),kt(D)})}),()=>{E=!0}});function Or(u,d){let w=u;for(;w;){if(w.matches?.(d))return w;w=w.parentElement??(w.getRootNode()instanceof ShadowRoot?w.getRootNode().host:null)}return null}function Mn(){const u=s(b)?.getRootNode();return u instanceof ShadowRoot?u.querySelector(".pie-tool-tts-inline__trigger"):null}function ao(u){const d=window.getComputedStyle(u),w=parseFloat(d.columnGap||d.gap)||0,R=(parseFloat(d.paddingLeft)||0)+(parseFloat(d.paddingRight)||0)+(parseFloat(d.borderLeftWidth)||0)+(parseFloat(d.borderRightWidth)||0),E=Array.from(u.children).filter($=>window.getComputedStyle($).display!=="none");return E.length?E.reduce(($,D)=>$+D.offsetWidth,0)+(E.length-1)*w+R:0}function uo(){const u=Mn();if(!u||!s(T))return;const d=u.getBoundingClientRect(),w=Or(u,Cr),R=w?.getBoundingClientRect().left??0,E=Math.max(0,d.left-R-16);if(!s(Ke)){const H=ao(s(T));H>0&&y(en,H,!0)}y(Ke,s(en)>0&&E<s(en),!0);const $=parseFloat(window.getComputedStyle(s(T)).minWidth)||0;if(s(Ke)&&E<$){const H=w?.getBoundingClientRect(),ue=Math.max(0,H?.left??0)+lt,we=Math.min(window.innerWidth,H?.right??window.innerWidth)-lt,ye=Math.max(0,we-ue),W=Math.min(s(T).offsetWidth,ye),F=Math.max(ue,Math.min(d.right-W,we-W));y(Zt,`top: ${d.bottom+lt}px; left: ${F}px; right: auto; min-width: min(7.5rem, ${ye}px); max-width: min(${ye}px, var(--pie-tts-left-aligned-panel-width, ${ye}px));`);return}const D=s(T).offsetHeight||d.height,V=s(Ke)?d.top:d.top+d.height/2-D/2,at=d.bottom>0&&d.top<window.innerHeight?Math.max(lt,Math.min(V,window.innerHeight-D-lt)):V,Y=window.innerWidth-d.left+lt;y(Zt,`top: ${at}px; right: ${Y}px; left: auto; max-width: min(${E}px, var(--pie-tts-left-aligned-panel-width, ${E}px));`)}Me(()=>{if(!(s(st)&&s(oe))){let D=!1;return queueMicrotask(()=>{D||(y(Zt,""),y(Ke,!1),y(en,0))}),()=>{D=!0}}if(typeof window>"u")return;let u=0;const d=()=>{u||(u=window.requestAnimationFrame(()=>{u=0,uo()}))};d(),window.addEventListener("resize",d),window.addEventListener("scroll",d,!0);const w=Mn(),R=new ResizeObserver(d);w&&R.observe(w),s(T)&&R.observe(s(T));const E=w?Or(w,Cr):null;E&&R.observe(E);const $=E?.querySelector(lo);return $&&R.observe($),()=>{u&&window.cancelAnimationFrame(u),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0),R.disconnect()}});function fo(){if(!s(b))return null;const u=s(b).getRootNode();return u instanceof ShadowRoot?u.host:null}Me(()=>{const u=fo();if(!u)return;const d=s(oe)===!0;if(u.getAttribute("data-active")==="true"===d)return;let w=!1;return queueMicrotask(()=>{w||(u.setAttribute("data-active",d?"true":"false"),u.dispatchEvent(new CustomEvent(mo,{detail:{active:d},bubbles:!0,composed:!0})))}),()=>{w=!0}});var co={get catalogId(){return r()},set catalogId(u=""){r(u),ke()},get size(){return i()},set size(u="md"){i(u),ke()},get speedOptions(){return o()},set speedOptions(u=void 0){o(u),ke()},get showSingleSpeedOption(){return l()},set showSingleSpeedOption(u=!1){l(u),ke()},get layoutMode(){return a()},set layoutMode(u="left-aligned"){a(u),ke()},get baseRate(){return f()},set baseRate(u=1){f(u),ke()},get pitch(){return c()},set pitch(u=void 0){c(u),ke()},get volume(){return v()},set volume(u=void 0){v(u),ke()}},Nr=Oi(),ho=gn(Nr),po=u=>{var d=al();let w;{const V=Y=>{var H=il(),ue=It(H),we=W=>{var F=nl();wt(F,"type","circle"),wt(F,"size","small"),wt(F,"variant","tertiary"),Ce(()=>wt(F,"icon-name",s(Q)&&!s(me)?"pause":"play")),Ce(Se=>wt(F,"button-aria-label",Se),[()=>s(x).t(s(Ar))]),Ce(()=>wt(F,"disabled",!s(L))),hr(F,Se=>m?.(Se)),hr(F,(Se,Ue)=>S?.(Se,Ue),()=>({"aria-expanded":s(oe)?"true":"false","aria-controls":s(oe)?An:null,"aria-pressed":s(oe)?"true":"false","aria-busy":s(Le)?"true":null})),Ce(()=>bt(F,1,`pie-tool-tts-inline__trigger ${s(Er)??""}`,"svelte-9msc39")),Ne("click",F,$r),ve(W,F)},ye=W=>{var F=rl(),Se=Zn(F);hr(F,Ue=>_?.(Ue)),Ce(Ue=>{bt(F,1,`pie-tool-tts-inline__control pie-tool-tts-inline__trigger pie-tool-tts-inline__trigger--plain ${s(Er)??""}`,"svelte-9msc39"),U(F,"aria-expanded",s(oe)?"true":"false"),U(F,"aria-controls",s(oe)?An:void 0),U(F,"aria-pressed",s(oe)?"true":"false"),U(F,"aria-label",Ue),U(F,"aria-busy",s(Le)?"true":void 0),F.disabled=!s(L),bt(Se,1,`fa-solid ${s(Q)&&!s(me)?"fa-pause":"fa-play"} pie-tool-tts-inline__icon`,"svelte-9msc39")},[()=>s(x).t(s(Ar))]),Ne("click",F,$r),ve(W,F)};qt(ue,W=>{s(N)&&s(X)?W(we):W(ye,-1)}),ft(H),ve(Y,H)},at=Y=>{var H=Oi(),ue=gn(H),we=ye=>{var W=ll();let F;var Se=It(W),Ue=le=>{var We=sl();let nn;js(We,21,()=>s($n),Ve=>Ve.rate,(Ve,Ye)=>{var xe=ol(),Mr=It(xe),vo=Zn(Mr,!0);ft(xe),Ce(()=>{U(xe,"data-pie-tts-speed-rate",s(Ye).rate),U(xe,"tabindex",s(Yt)===s(Ye).rate?0:-1),U(xe,"aria-label",s(Ye).ariaLabel),U(xe,"aria-checked",s(Yt)===s(Ye).rate),xe.disabled=!s(L),U(Mr,"data-label",s(Ye).label),Ni(vo,s(Ye).label)}),Ne("click",xe,()=>Tr(s(Ye))),Ne("keydown",xe,go=>Qt(Sr,go)),ve(Ve,xe)}),ft(We),Ce(Ve=>{nn=bt(We,1,"pie-tool-tts-inline__speed-group svelte-9msc39",null,nn,{"pie-tool-tts-inline__speed-group--stacked":s(Ke)}),U(We,"aria-label",Ve)},[()=>s(x).t("tools.textToSpeech.inline.playbackSpeedA11y")]),ve(le,We)};qt(Se,le=>{s($n).length>0&&le(Ue)});var $t=gt(Se,2),Tt=gt($t,2),tn=gt(Tt,2);ft(W),zi(W,le=>y(T,le),()=>s(T)),Ce((le,We,nn,Ve)=>{U(W,"id",An),F=bt(W,1,"pie-tool-tts-inline__panel svelte-9msc39",null,F,{"pie-tool-tts-inline__panel--floating":s(Nn),"pie-tool-tts-inline__panel--row":s(Rr),"pie-tool-tts-inline__panel--left-aligned-inline":s(st),"pie-tool-tts-inline__panel--compact":s(st)&&s(Ke)}),Ws(W,s(st)?s(Zt):""),U(W,"aria-label",le),U($t,"aria-label",We),$t.disabled=!s(L)||!s(Q),U(Tt,"aria-label",nn),Tt.disabled=!s(L)||!s(Q),U(tn,"aria-label",Ve),tn.disabled=!s(L)},[()=>s(x).t("tools.textToSpeech.inline.controlsA11y"),()=>s(x).t("tools.textToSpeech.inline.rewindA11y"),()=>s(x).t("tools.textToSpeech.inline.fastForwardA11y"),()=>s(x).t("tools.textToSpeech.inline.stopA11y")]),Ne("click",$t,oo),Ne("keydown",$t,le=>Qt(Cn,le)),Ne("click",Tt,io),Ne("keydown",Tt,le=>Qt(Cn,le)),Ne("click",tn,ro),Ne("keydown",tn,le=>Qt(Cn,le)),ve(ye,W)};qt(ue,ye=>{s(oe)&&ye(we)}),ve(Y,H)};var R=It(d),E=Y=>{var H=qi(),ue=gn(H);at(ue);var we=gt(ue,2);V(we),ve(Y,H)},$=Y=>{var H=qi(),ue=gn(H);V(ue);var we=gt(ue,2);at(we),ve(Y,H)};qt(R,Y=>{s(so)?Y(E):Y($,-1)});var D=Zn(gt(R,2),!0);ft(d),zi(d,Y=>y(b,Y),()=>s(b)),Ce((Y,H)=>Ni(D,s(se)),[()=>s(x).getLocale(),()=>s(x).getDirection?.()??"ltr"])}Ce((V,at)=>{w=bt(d,1,"pie-tool-tts-inline svelte-9msc39",null,w,{"pie-tool-tts-inline--controls-row":s(Rr),"pie-tool-tts-inline--floating":s(Nn),"pie-tool-tts-inline--left-aligned":s(st)}),U(d,"lang",V),U(d,"dir",at),d.dir=d.dir},[()=>s(x).getLocale(),()=>s(x).getDirection?.()??"ltr"]),ve(u,d)};return qt(ho,u=>{p&&u(po)}),ve(e,Nr),Yr(co)}Ts(["click","keydown"]),fl("pie-tool-tts-inline",tl(Bi,{catalogId:{attribute:"catalog-id",type:"String"},size:{attribute:"size",type:"String"},speedOptions:{attribute:"speed-options",type:"Array"},showSingleSpeedOption:{attribute:"show-single-speed-option",type:"Boolean"},layoutMode:{attribute:"layout-mode",type:"String"},baseRate:{attribute:"base-rate",type:"Number"},pitch:{attribute:"pitch",type:"Number"},volume:{attribute:"volume",type:"Number"}},[],[],{mode:"open"},_o));function fl(e,t){customElements.get(e)||customElements.define(e,t)}export{Bi as default};
|