@pie-players/pie-section-player-tools-tts-settings 0.3.52 → 0.3.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as E } from "./defineProperty-Dt7ri80W.js";
|
|
2
2
|
var Dd = Object.create, Ol = Object.defineProperty, jd = Object.getOwnPropertyDescriptor, Vd = Object.getOwnPropertyNames, Ud = Object.getPrototypeOf, qd = Object.prototype.hasOwnProperty, Sm = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Gd = (e, t, r, n) => {
|
|
3
3
|
if (t && typeof t == "object" || typeof t == "function")
|
|
4
4
|
for (var i = Vd(t), o = 0, s = i.length, a; o < s; o++)
|
|
@@ -35,13 +35,13 @@ function Pl() {
|
|
|
35
35
|
reject: t
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
var rf = 1 << 24, Be = 1024, je = 2048, br = 4096, Ss = 8192, nf = 16384, ks = 32768, Ha = 1 << 25, Ri = 65536,
|
|
38
|
+
var rf = 1 << 24, Be = 1024, je = 2048, br = 4096, Ss = 8192, nf = 16384, ks = 32768, Ha = 1 << 25, Ri = 65536, xm = 1 << 17, Em = 1 << 18, Gr = 1 << 19, of = 1 << 20, _n = 1 << 25, Cn = 65536, Ba = 1 << 21, sf = 1 << 22, vi = 1 << 23, or = /* @__PURE__ */ Symbol("$state"), Rl = /* @__PURE__ */ Symbol("legacy props"), af = /* @__PURE__ */ Symbol(""), lf = /* @__PURE__ */ Symbol("proxy path"), Yo = /* @__PURE__ */ Symbol("attributes"), Xo = /* @__PURE__ */ Symbol("class"), Jo = /* @__PURE__ */ Symbol("style"), ii = /* @__PURE__ */ Symbol("text"), wn = /* @__PURE__ */ Symbol("form reset");
|
|
39
39
|
var Li = new class extends Error {
|
|
40
40
|
constructor(...t) {
|
|
41
|
-
super(...t),
|
|
41
|
+
super(...t), E(this, "name", "StaleReactionError"), E(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
42
42
|
}
|
|
43
43
|
}(), $i = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
44
|
-
function
|
|
44
|
+
function xs(e) {
|
|
45
45
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
46
46
|
}
|
|
47
47
|
function cf() {
|
|
@@ -147,9 +147,9 @@ function Wl(e) {
|
|
|
147
147
|
}
|
|
148
148
|
var Fe = !1, On = !1;
|
|
149
149
|
function Fa(e, t) {
|
|
150
|
-
return e.label = t,
|
|
150
|
+
return e.label = t, xf(e.v, t), e;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function xf(e, t) {
|
|
153
153
|
return e?.[lf]?.(t), e;
|
|
154
154
|
}
|
|
155
155
|
var se = null;
|
|
@@ -197,7 +197,7 @@ function ct(e) {
|
|
|
197
197
|
}
|
|
198
198
|
er.push(e);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Ef() {
|
|
201
201
|
for (; er.length > 0; ) Bl();
|
|
202
202
|
}
|
|
203
203
|
function Fl(e) {
|
|
@@ -224,11 +224,11 @@ function Ft(e, t) {
|
|
|
224
224
|
throw e;
|
|
225
225
|
}
|
|
226
226
|
var Af = ~(je | br | Be);
|
|
227
|
-
function
|
|
227
|
+
function ce(e, t) {
|
|
228
228
|
e.f = e.f & Af | t;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
(e.f & 512) !== 0 || e.deps === null ?
|
|
230
|
+
function Es(e) {
|
|
231
|
+
(e.f & 512) !== 0 || e.deps === null ? ce(e, Be) : ce(e, br);
|
|
232
232
|
}
|
|
233
233
|
function Dl(e) {
|
|
234
234
|
if (e !== null)
|
|
@@ -236,7 +236,7 @@ function Dl(e) {
|
|
|
236
236
|
(t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= Cn, Dl(t.deps));
|
|
237
237
|
}
|
|
238
238
|
function jl(e, t, r) {
|
|
239
|
-
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Dl(e.deps),
|
|
239
|
+
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Dl(e.deps), ce(e, Be);
|
|
240
240
|
}
|
|
241
241
|
var Mf = !1, Xn = !1;
|
|
242
242
|
function Cf(e) {
|
|
@@ -266,10 +266,10 @@ function F(e, t, r) {
|
|
|
266
266
|
function g(e, t) {
|
|
267
267
|
return e.get(Y(e, t));
|
|
268
268
|
}
|
|
269
|
-
var Ul, mi = null, Pr = null, j = null,
|
|
270
|
-
var Of = 1, bi = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), _i = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), gn = /* @__PURE__ */ new WeakMap(),
|
|
269
|
+
var Ul, mi = null, Pr = null, j = null, xn = null, xe = null, Qo = null, Tn = !1, Lo = !1, Dr = null, yi = null, ql = 0;
|
|
270
|
+
var Of = 1, bi = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), _i = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), gn = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakSet(), _r = class Gl {
|
|
271
271
|
constructor() {
|
|
272
|
-
As(this,
|
|
272
|
+
As(this, de), E(this, "id", Of++), q(this, bi, !1), E(this, "linked", !0), q(this, sr, null), q(this, tr, null), E(this, "async_deriveds", /* @__PURE__ */ new Map()), E(this, "current", /* @__PURE__ */ new Map()), E(this, "previous", /* @__PURE__ */ new Map()), q(this, _i, /* @__PURE__ */ new Set()), q(this, Jn, /* @__PURE__ */ new Set()), q(this, Rr, 0), q(this, Jt, /* @__PURE__ */ new Map()), q(this, vn, null), q(this, We, []), q(this, Zo, []), q(this, vr, /* @__PURE__ */ new Set()), q(this, St, /* @__PURE__ */ new Set()), q(this, Bt, /* @__PURE__ */ new Map()), q(this, oi, /* @__PURE__ */ new Set()), E(this, "is_fork", !1), q(this, gn, !1), Pr === null ? mi = Pr = this : (F(tr, Pr, this), F(sr, this, Pr)), Pr = this;
|
|
273
273
|
}
|
|
274
274
|
skip_effect(t) {
|
|
275
275
|
g(Bt, this).has(t) || g(Bt, this).set(t, {
|
|
@@ -282,31 +282,31 @@ var Of = 1, bi = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap
|
|
|
282
282
|
if (n) {
|
|
283
283
|
g(Bt, this).delete(t);
|
|
284
284
|
for (var i of n.d)
|
|
285
|
-
|
|
285
|
+
ce(i, je), r(i);
|
|
286
286
|
for (i of n.m)
|
|
287
|
-
|
|
287
|
+
ce(i, br), r(i);
|
|
288
288
|
}
|
|
289
289
|
g(oi, this).add(t);
|
|
290
290
|
}
|
|
291
291
|
capture(t, r, n = !1) {
|
|
292
|
-
t.v !== ve && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]),
|
|
292
|
+
t.v !== ve && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), xe?.set(t, r)), this.is_fork || (t.v = r);
|
|
293
293
|
}
|
|
294
294
|
activate() {
|
|
295
295
|
j = this;
|
|
296
296
|
}
|
|
297
297
|
deactivate() {
|
|
298
|
-
j = null,
|
|
298
|
+
j = null, xe = null;
|
|
299
299
|
}
|
|
300
300
|
flush() {
|
|
301
301
|
try {
|
|
302
|
-
Lo = !0, j = this, Y(
|
|
302
|
+
Lo = !0, j = this, Y(de, this, wi).call(this);
|
|
303
303
|
} finally {
|
|
304
|
-
ql = 0, Qo = null, Dr = null, yi = null, Lo = !1, j = null,
|
|
304
|
+
ql = 0, Qo = null, Dr = null, yi = null, Lo = !1, j = null, xe = null, cr.clear();
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
discard() {
|
|
308
308
|
for (const t of g(Jn, this)) t(this);
|
|
309
|
-
g(Jn, this).clear(), Y(
|
|
309
|
+
g(Jn, this).clear(), Y(de, this, Ti).call(this), g(vn, this)?.resolve();
|
|
310
310
|
}
|
|
311
311
|
register_created_effect(t) {
|
|
312
312
|
g(Zo, this).push(t);
|
|
@@ -351,11 +351,11 @@ var Of = 1, bi = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap
|
|
|
351
351
|
}
|
|
352
352
|
apply() {
|
|
353
353
|
if (!Fe || !this.is_fork && g(sr, this) === null && g(tr, this) === null) {
|
|
354
|
-
|
|
354
|
+
xe = null;
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
|
|
358
|
-
for (const [r, [n]] of this.current)
|
|
357
|
+
xe = /* @__PURE__ */ new Map();
|
|
358
|
+
for (const [r, [n]] of this.current) xe.set(r, n);
|
|
359
359
|
for (let r = mi; r !== null; r = g(tr, r))
|
|
360
360
|
if (!(r === this || r.is_fork)) {
|
|
361
361
|
var t = !1;
|
|
@@ -367,7 +367,7 @@ var Of = 1, bi = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!t)
|
|
370
|
-
for (const [n, i] of r.previous)
|
|
370
|
+
for (const [n, i] of r.previous) xe.has(n) || xe.set(n, i);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
schedule(t) {
|
|
@@ -404,43 +404,43 @@ function Da() {
|
|
|
404
404
|
return !1;
|
|
405
405
|
}
|
|
406
406
|
function wi() {
|
|
407
|
-
F(bi, this, !0), ql++ > 1e3 && (Y(
|
|
407
|
+
F(bi, this, !0), ql++ > 1e3 && (Y(de, this, Ti).call(this), Lf());
|
|
408
408
|
for (const a of g(vr, this))
|
|
409
|
-
g(St, this).delete(a),
|
|
409
|
+
g(St, this).delete(a), ce(a, je), this.schedule(a);
|
|
410
410
|
for (const a of g(St, this))
|
|
411
|
-
|
|
411
|
+
ce(a, br), this.schedule(a);
|
|
412
412
|
const e = g(We, this);
|
|
413
413
|
F(We, this, []), this.apply();
|
|
414
414
|
var t = Dr = [], r = [], n = yi = [];
|
|
415
415
|
for (const a of e) try {
|
|
416
|
-
Y(
|
|
416
|
+
Y(de, this, Kl).call(this, a, t, r);
|
|
417
417
|
} catch (l) {
|
|
418
|
-
throw Jl(a), Y(
|
|
418
|
+
throw Jl(a), Y(de, this, Da).call(this) || this.discard(), l;
|
|
419
419
|
}
|
|
420
420
|
if (j = null, n.length > 0) {
|
|
421
421
|
var i = Ul.ensure();
|
|
422
422
|
for (const a of n) i.schedule(a);
|
|
423
423
|
}
|
|
424
|
-
if (Dr = null, yi = null, Y(
|
|
425
|
-
Y(
|
|
424
|
+
if (Dr = null, yi = null, Y(de, this, Da).call(this)) {
|
|
425
|
+
Y(de, this, mn).call(this, r), Y(de, this, mn).call(this, t);
|
|
426
426
|
for (const [a, l] of g(Bt, this)) Xl(a, l);
|
|
427
|
-
n.length > 0 && Y(
|
|
427
|
+
n.length > 0 && Y(de, j, wi).call(j);
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
-
const o = Y(
|
|
430
|
+
const o = Y(de, this, If).call(this);
|
|
431
431
|
if (o) {
|
|
432
|
-
Y(
|
|
432
|
+
Y(de, this, mn).call(this, r), Y(de, this, mn).call(this, t), Y(de, o, Pf).call(o, this);
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
g(vr, this).clear(), g(St, this).clear();
|
|
436
436
|
for (const a of g(_i, this)) a(this);
|
|
437
|
-
g(_i, this).clear(),
|
|
437
|
+
g(_i, this).clear(), xn = this, ja(r), ja(t), xn = null, g(vn, this)?.resolve();
|
|
438
438
|
var s = j;
|
|
439
|
-
if (g(Rr, this) === 0 && (g(We, this).length === 0 || s !== null) && (Y(
|
|
439
|
+
if (g(Rr, this) === 0 && (g(We, this).length === 0 || s !== null) && (Y(de, this, Ti).call(this), Fe && (Y(de, this, Rf).call(this), j = s)), g(We, this).length > 0) if (s !== null) {
|
|
440
440
|
const a = s;
|
|
441
441
|
g(We, a).push(...g(We, this).filter((l) => !g(We, a).includes(l)));
|
|
442
442
|
} else s = this;
|
|
443
|
-
s !== null && Y(
|
|
443
|
+
s !== null && Y(de, s, wi).call(s);
|
|
444
444
|
}
|
|
445
445
|
function Kl(e, t, r) {
|
|
446
446
|
e.f ^= Be;
|
|
@@ -489,12 +489,12 @@ function Pf(e) {
|
|
|
489
489
|
if ((i & 2) !== 0) t(s);
|
|
490
490
|
else {
|
|
491
491
|
var o = s;
|
|
492
|
-
i & 4194320 && !this.async_deriveds.has(o) && (g(St, this).delete(o),
|
|
492
|
+
i & 4194320 && !this.async_deriveds.has(o) && (g(St, this).delete(o), ce(o, je), this.schedule(o));
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
for (const r of this.current.keys()) t(r);
|
|
497
|
-
this.oncommit(() => e.discard()), Y(
|
|
497
|
+
this.oncommit(() => e.discard()), Y(de, e, Ti).call(e), j = this, Y(de, this, wi).call(this);
|
|
498
498
|
}
|
|
499
499
|
function mn(e) {
|
|
500
500
|
for (var t = 0; t < e.length; t += 1) jl(e[t], g(vr, this), g(St, this));
|
|
@@ -520,7 +520,7 @@ function Rf() {
|
|
|
520
520
|
e && f.discard();
|
|
521
521
|
else if (t.length > 0) {
|
|
522
522
|
if (e) for (const d of g(oi, this)) f.unskip_effect(d, (p) => {
|
|
523
|
-
(p.f & 4194320) !== 0 ? f.schedule(p) : Y(
|
|
523
|
+
(p.f & 4194320) !== 0 ? f.schedule(p) : Y(de, f, mn).call(f, [p]);
|
|
524
524
|
});
|
|
525
525
|
f.activate();
|
|
526
526
|
var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
@@ -531,10 +531,10 @@ function Rf() {
|
|
|
531
531
|
return v ? v[0] !== p[0] || v[1] !== p[1] : !0;
|
|
532
532
|
}).map(([d]) => d);
|
|
533
533
|
if (a.length > 0)
|
|
534
|
-
for (const d of g(Zo, this)) (d.f & 155648) === 0 && Ms(d, a, o) && ((d.f & 4194320) !== 0 ? (
|
|
534
|
+
for (const d of g(Zo, this)) (d.f & 155648) === 0 && Ms(d, a, o) && ((d.f & 4194320) !== 0 ? (ce(d, je), f.schedule(d)) : g(vr, f).add(d));
|
|
535
535
|
if (g(We, f).length > 0 && !g(gn, f)) {
|
|
536
536
|
f.apply();
|
|
537
|
-
for (var l of g(We, f)) Y(
|
|
537
|
+
for (var l of g(We, f)) Y(de, f, Kl).call(f, l, [], []);
|
|
538
538
|
F(We, f, []);
|
|
539
539
|
}
|
|
540
540
|
f.deactivate();
|
|
@@ -554,7 +554,7 @@ function Zt(e) {
|
|
|
554
554
|
try {
|
|
555
555
|
var r;
|
|
556
556
|
for (e && (j !== null && !j.is_fork && j.flush(), r = e()); ; ) {
|
|
557
|
-
if (
|
|
557
|
+
if (Ef(), j === null) return r;
|
|
558
558
|
j.flush();
|
|
559
559
|
}
|
|
560
560
|
} finally {
|
|
@@ -602,7 +602,7 @@ function Yl(e, t, r, n) {
|
|
|
602
602
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
603
603
|
for (const i of e.reactions) {
|
|
604
604
|
const o = i.f;
|
|
605
|
-
(o & 2) !== 0 ? Yl(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 && Ms(i, t, n) && (
|
|
605
|
+
(o & 2) !== 0 ? Yl(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 && Ms(i, t, n) && (ce(i, je), Cs(i));
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
function Ms(e, t, r) {
|
|
@@ -620,13 +620,13 @@ function Cs(e) {
|
|
|
620
620
|
}
|
|
621
621
|
function Xl(e, t) {
|
|
622
622
|
if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
|
|
623
|
-
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e),
|
|
623
|
+
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), ce(e, Be);
|
|
624
624
|
for (var r = e.first; r !== null; )
|
|
625
625
|
Xl(r, t), r = r.next;
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
function Jl(e) {
|
|
629
|
-
|
|
629
|
+
ce(e, Be);
|
|
630
630
|
for (var t = e.first; t !== null; )
|
|
631
631
|
Jl(t), t = t.next;
|
|
632
632
|
}
|
|
@@ -644,11 +644,11 @@ var Nf = Ri | Gr;
|
|
|
644
644
|
function Wf(e, t, r, n) {
|
|
645
645
|
new zf(e, t, r, n);
|
|
646
646
|
}
|
|
647
|
-
var et = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(),
|
|
647
|
+
var et = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), ts = /* @__PURE__ */ new WeakMap(), rs = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), Va = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakSet(), zf = class {
|
|
648
648
|
constructor(e, t, r, n) {
|
|
649
|
-
As(this, Se),
|
|
649
|
+
As(this, Se), E(this, "parent", void 0), E(this, "is_pending", !1), E(this, "transform_error", void 0), q(this, et, void 0), q(this, es, D ? J : null), q(this, at, void 0), q(this, En, void 0), q(this, ze, void 0), q(this, lt, null), q(this, Le, null), q(this, Qe, null), q(this, ar, null), q(this, Lr, 0), q(this, lr, 0), q(this, Qn, !1), q(this, ts, /* @__PURE__ */ new Set()), q(this, rs, /* @__PURE__ */ new Set()), q(this, Kt, null), q(this, Va, $f(() => (F(Kt, this, gr(g(Lr, this))), () => {
|
|
650
650
|
F(Kt, this, null);
|
|
651
|
-
}))), F(et, this, e), F(at, this, t), F(
|
|
651
|
+
}))), F(et, this, e), F(at, this, t), F(En, this, (i) => {
|
|
652
652
|
var o = G;
|
|
653
653
|
o.b = this, o.f |= 128, r(i);
|
|
654
654
|
}), this.parent = G.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), F(ze, this, Bi(() => {
|
|
@@ -689,7 +689,7 @@ var et = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), at =
|
|
|
689
689
|
};
|
|
690
690
|
function Hf() {
|
|
691
691
|
try {
|
|
692
|
-
F(lt, this, Ce(() => g(
|
|
692
|
+
F(lt, this, Ce(() => g(En, this).call(this, g(et, this))));
|
|
693
693
|
} catch (e) {
|
|
694
694
|
this.error(e);
|
|
695
695
|
}
|
|
@@ -704,8 +704,8 @@ function Bf(e) {
|
|
|
704
704
|
function Ff() {
|
|
705
705
|
const e = g(at, this).pending;
|
|
706
706
|
e && (this.is_pending = !0, F(Le, this, Ce(() => e(g(et, this)))), ct(() => {
|
|
707
|
-
var t = F(ar, this, document.createDocumentFragment()), r =
|
|
708
|
-
t.append(r), F(lt, this, Y(Se, this, ns).call(this, () => Ce(() => g(
|
|
707
|
+
var t = F(ar, this, document.createDocumentFragment()), r = Ee();
|
|
708
|
+
t.append(r), F(lt, this, Y(Se, this, ns).call(this, () => Ce(() => g(En, this).call(this, r)))), g(lr, this) === 0 && (g(et, this).before(t), F(ar, this, null), wr(g(Le, this), () => {
|
|
709
709
|
F(Le, this, null);
|
|
710
710
|
}), Y(Se, this, Os).call(this, j));
|
|
711
711
|
}));
|
|
@@ -713,7 +713,7 @@ function Ff() {
|
|
|
713
713
|
function Ql() {
|
|
714
714
|
try {
|
|
715
715
|
if (this.is_pending = this.has_pending_snippet(), F(lr, this, 0), F(Lr, this, 0), F(lt, this, Ce(() => {
|
|
716
|
-
g(
|
|
716
|
+
g(En, this).call(this, g(et, this));
|
|
717
717
|
})), g(lr, this) > 0) {
|
|
718
718
|
var e = F(ar, this, document.createDocumentFragment());
|
|
719
719
|
zs(g(lt, this), e);
|
|
@@ -916,7 +916,7 @@ function Vf(e) {
|
|
|
916
916
|
}
|
|
917
917
|
function Ps(e) {
|
|
918
918
|
var t, r = G, n = e.parent;
|
|
919
|
-
if (!
|
|
919
|
+
if (!Et && n !== null && e.v !== ve && (n.f & 24576) !== 0)
|
|
920
920
|
return wf(), e.v;
|
|
921
921
|
ut(n);
|
|
922
922
|
try {
|
|
@@ -928,11 +928,11 @@ function Ps(e) {
|
|
|
928
928
|
}
|
|
929
929
|
function rc(e) {
|
|
930
930
|
var t = Ps(e);
|
|
931
|
-
if (!e.equals(t) && (e.wv = _c(), (!j?.is_fork || e.deps === null) && (j !== null ? (j.capture(e, t, !0),
|
|
932
|
-
|
|
931
|
+
if (!e.equals(t) && (e.wv = _c(), (!j?.is_fork || e.deps === null) && (j !== null ? (j.capture(e, t, !0), xn?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
|
|
932
|
+
ce(e, Be);
|
|
933
933
|
return;
|
|
934
934
|
}
|
|
935
|
-
|
|
935
|
+
Et || (xe !== null ? ($s() || j?.is_fork) && xe.set(e, t) : Es(e));
|
|
936
936
|
}
|
|
937
937
|
function Uf(e) {
|
|
938
938
|
if (e.effects !== null)
|
|
@@ -976,11 +976,11 @@ function _(e, t, r = !1) {
|
|
|
976
976
|
}
|
|
977
977
|
function jr(e, t, r = null) {
|
|
978
978
|
if (!e.equals(t)) {
|
|
979
|
-
cr.set(e,
|
|
979
|
+
cr.set(e, Et ? t : e.v);
|
|
980
980
|
var n = _r.ensure();
|
|
981
981
|
if (n.capture(e, t), (e.f & 2) !== 0) {
|
|
982
982
|
const i = e;
|
|
983
|
-
(e.f & 2048) !== 0 && Ps(i),
|
|
983
|
+
(e.f & 2048) !== 0 && Ps(i), xe === null && Es(i);
|
|
984
984
|
}
|
|
985
985
|
e.wv = _c(), sc(e, je, r), In() && G !== null && (G.f & 1024) !== 0 && (G.f & 96) === 0 && (Ne === null ? lh([e]) : Ne.push(e)), !n.is_fork && ki.size > 0 && !ic && qf();
|
|
986
986
|
}
|
|
@@ -989,7 +989,7 @@ function jr(e, t, r = null) {
|
|
|
989
989
|
function qf() {
|
|
990
990
|
ic = !1;
|
|
991
991
|
for (const e of ki) {
|
|
992
|
-
(e.f & 1024) !== 0 &&
|
|
992
|
+
(e.f & 1024) !== 0 && ce(e, br);
|
|
993
993
|
let t;
|
|
994
994
|
try {
|
|
995
995
|
t = Ln(e);
|
|
@@ -1010,10 +1010,10 @@ function sc(e, t, r) {
|
|
|
1010
1010
|
var a = n[s], l = a.f;
|
|
1011
1011
|
if (!(!i && a === G)) {
|
|
1012
1012
|
var f = (l & je) === 0;
|
|
1013
|
-
if (f &&
|
|
1013
|
+
if (f && ce(a, t), (l & 131072) !== 0) ki.add(a);
|
|
1014
1014
|
else if ((l & 2) !== 0) {
|
|
1015
1015
|
var d = a;
|
|
1016
|
-
|
|
1016
|
+
xe?.delete(d), (l & 65536) === 0 && (l & 512 && (G === null || (G.f & 2097152) === 0) && (a.f |= Cn), sc(d, br, r));
|
|
1017
1017
|
} else if (f) {
|
|
1018
1018
|
var p = a;
|
|
1019
1019
|
(l & 16) !== 0 && st !== null && st.add(p), r !== null ? r.push(p) : Cs(p);
|
|
@@ -1067,8 +1067,8 @@ function He(e) {
|
|
|
1067
1067
|
if (v === or) return e;
|
|
1068
1068
|
var T = r.get(v), S = v in p;
|
|
1069
1069
|
if (T === void 0 && (!S || ir(p, v)?.writable) && (T = a(() => {
|
|
1070
|
-
var
|
|
1071
|
-
return
|
|
1070
|
+
var x = /* @__PURE__ */ W(He(S ? p[v] : ve), o);
|
|
1071
|
+
return x;
|
|
1072
1072
|
}), r.set(v, T)), T !== void 0) {
|
|
1073
1073
|
var w = u(T);
|
|
1074
1074
|
return w === ve ? void 0 : w;
|
|
@@ -1101,9 +1101,9 @@ function He(e) {
|
|
|
1101
1101
|
},
|
|
1102
1102
|
set(p, v, y, T) {
|
|
1103
1103
|
var S = r.get(v), w = v in p;
|
|
1104
|
-
if (n && v === "length") for (var
|
|
1105
|
-
var R = r.get(
|
|
1106
|
-
R !== void 0 ? _(R, ve) :
|
|
1104
|
+
if (n && v === "length") for (var x = y; x < S.v; x += 1) {
|
|
1105
|
+
var R = r.get(x + "");
|
|
1106
|
+
R !== void 0 ? _(R, ve) : x in p && (R = a(() => /* @__PURE__ */ W(ve, o)), r.set(x + "", R));
|
|
1107
1107
|
}
|
|
1108
1108
|
if (S === void 0)
|
|
1109
1109
|
(!w || ir(p, v)?.writable) && (S = a(() => /* @__PURE__ */ W(void 0, o)), _(S, He(y)), r.set(v, S));
|
|
@@ -1157,11 +1157,11 @@ function is() {
|
|
|
1157
1157
|
lc = ir(t, "firstChild").get, cc = ir(t, "nextSibling").get, za(e) && (e[Xo] = void 0, e[Yo] = null, e[Jo] = void 0, e.__e = void 0), za(r) && (r[ii] = void 0);
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Ee(e = "") {
|
|
1161
1161
|
return document.createTextNode(e);
|
|
1162
1162
|
}
|
|
1163
1163
|
// @__NO_SIDE_EFFECTS__
|
|
1164
|
-
function
|
|
1164
|
+
function xt(e) {
|
|
1165
1165
|
return lc.call(e);
|
|
1166
1166
|
}
|
|
1167
1167
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1169,23 +1169,23 @@ function dt(e) {
|
|
|
1169
1169
|
return cc.call(e);
|
|
1170
1170
|
}
|
|
1171
1171
|
function O(e, t) {
|
|
1172
|
-
if (!D) return /* @__PURE__ */
|
|
1173
|
-
var r = /* @__PURE__ */
|
|
1174
|
-
if (r === null) r = J.appendChild(
|
|
1172
|
+
if (!D) return /* @__PURE__ */ xt(e);
|
|
1173
|
+
var r = /* @__PURE__ */ xt(J);
|
|
1174
|
+
if (r === null) r = J.appendChild(Ee());
|
|
1175
1175
|
else if (t && r.nodeType !== 3) {
|
|
1176
|
-
var n =
|
|
1176
|
+
var n = Ee();
|
|
1177
1177
|
return r?.before(n), me(n), n;
|
|
1178
1178
|
}
|
|
1179
1179
|
return t && zi(r), me(r), r;
|
|
1180
1180
|
}
|
|
1181
1181
|
function Jf(e, t = !1) {
|
|
1182
1182
|
if (!D) {
|
|
1183
|
-
var r = /* @__PURE__ */
|
|
1183
|
+
var r = /* @__PURE__ */ xt(e);
|
|
1184
1184
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ dt(r) : r;
|
|
1185
1185
|
}
|
|
1186
1186
|
if (t) {
|
|
1187
1187
|
if (J?.nodeType !== 3) {
|
|
1188
|
-
var n =
|
|
1188
|
+
var n = Ee();
|
|
1189
1189
|
return J?.before(n), me(n), n;
|
|
1190
1190
|
}
|
|
1191
1191
|
zi(J);
|
|
@@ -1199,7 +1199,7 @@ function A(e, t = 1, r = !1) {
|
|
|
1199
1199
|
if (!D) return n;
|
|
1200
1200
|
if (r) {
|
|
1201
1201
|
if (n?.nodeType !== 3) {
|
|
1202
|
-
var o =
|
|
1202
|
+
var o = Ee();
|
|
1203
1203
|
return n === null ? i?.after(o) : n.before(o), me(o), o;
|
|
1204
1204
|
}
|
|
1205
1205
|
zi(n);
|
|
@@ -1230,7 +1230,7 @@ function Qf(e, t) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
function Zf(e) {
|
|
1233
|
-
D && /* @__PURE__ */
|
|
1233
|
+
D && /* @__PURE__ */ xt(e) !== null && Rs(e);
|
|
1234
1234
|
}
|
|
1235
1235
|
var Ka = !1;
|
|
1236
1236
|
function dc() {
|
|
@@ -1257,7 +1257,7 @@ function Ls(e, t, r, n = r) {
|
|
|
1257
1257
|
} : e[wn] = () => n(!0), dc();
|
|
1258
1258
|
}
|
|
1259
1259
|
function eh(e) {
|
|
1260
|
-
G === null && (X === null && hf(e), ff()),
|
|
1260
|
+
G === null && (X === null && hf(e), ff()), Et && df(e);
|
|
1261
1261
|
}
|
|
1262
1262
|
function th(e, t) {
|
|
1263
1263
|
var r = t.last;
|
|
@@ -1304,7 +1304,7 @@ function $s() {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
function Ns(e) {
|
|
1306
1306
|
const t = rt(8, null);
|
|
1307
|
-
return
|
|
1307
|
+
return ce(t, Be), t.teardown = e, t;
|
|
1308
1308
|
}
|
|
1309
1309
|
function si(e) {
|
|
1310
1310
|
eh("$effect");
|
|
@@ -1361,7 +1361,7 @@ function Ce(e) {
|
|
|
1361
1361
|
function pc(e) {
|
|
1362
1362
|
var t = e.teardown;
|
|
1363
1363
|
if (t !== null) {
|
|
1364
|
-
const r =
|
|
1364
|
+
const r = Et, n = X;
|
|
1365
1365
|
Ya(!0), De(null);
|
|
1366
1366
|
try {
|
|
1367
1367
|
t.call(null);
|
|
@@ -1389,7 +1389,7 @@ function oh(e) {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
function ye(e, t = !0) {
|
|
1391
1391
|
var r = !1;
|
|
1392
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (sh(e.nodes.start, e.nodes.end), r = !0),
|
|
1392
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (sh(e.nodes.start, e.nodes.end), r = !0), ce(e, Ha), Ws(e, t && !r), Mn(e, 0);
|
|
1393
1393
|
var n = e.nodes && e.nodes.t;
|
|
1394
1394
|
if (n !== null) for (const o of n) o.stop();
|
|
1395
1395
|
pc(e), e.f ^= Ha, e.f |= nf;
|
|
@@ -1433,12 +1433,12 @@ function gc(e, t, r) {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function xi(e) {
|
|
1437
1437
|
mc(e, !0);
|
|
1438
1438
|
}
|
|
1439
1439
|
function mc(e, t) {
|
|
1440
1440
|
if ((e.f & 8192) !== 0) {
|
|
1441
|
-
e.f ^= Ss, (e.f & 1024) === 0 && (
|
|
1441
|
+
e.f ^= Ss, (e.f & 1024) === 0 && (ce(e, je), _r.ensure().schedule(e));
|
|
1442
1442
|
for (var r = e.first; r !== null; ) {
|
|
1443
1443
|
var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
|
|
1444
1444
|
mc(r, i ? t : !1), r = n;
|
|
@@ -1455,9 +1455,9 @@ function zs(e, t) {
|
|
|
1455
1455
|
t.append(r), r = i;
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
|
-
var ah = null, ai = !1,
|
|
1458
|
+
var ah = null, ai = !1, Et = !1;
|
|
1459
1459
|
function Ya(e) {
|
|
1460
|
-
|
|
1460
|
+
Et = e;
|
|
1461
1461
|
}
|
|
1462
1462
|
var X = null, Ze = !1;
|
|
1463
1463
|
function De(e) {
|
|
@@ -1490,7 +1490,7 @@ function Ln(e) {
|
|
|
1490
1490
|
var o = r[i];
|
|
1491
1491
|
if (Ln(o) && rc(o), o.wv > e.wv) return !0;
|
|
1492
1492
|
}
|
|
1493
|
-
(t & 512) !== 0 &&
|
|
1493
|
+
(t & 512) !== 0 && xe === null && ce(e, Be);
|
|
1494
1494
|
}
|
|
1495
1495
|
return !1;
|
|
1496
1496
|
}
|
|
@@ -1499,7 +1499,7 @@ function wc(e, t, r = !0) {
|
|
|
1499
1499
|
if (n !== null && !(!Fe && tt !== null && tt.has(e)))
|
|
1500
1500
|
for (var i = 0; i < n.length; i++) {
|
|
1501
1501
|
var o = n[i];
|
|
1502
|
-
(o.f & 2) !== 0 ? wc(o, t, !1) : t === o && (r ?
|
|
1502
|
+
(o.f & 2) !== 0 ? wc(o, t, !1) : t === o && (r ? ce(o, je) : (o.f & 1024) !== 0 && ce(o, br), Cs(o));
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
function Tc(e) {
|
|
@@ -1546,7 +1546,7 @@ function ch(e, t) {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
if (r === null && (t.f & 2) !== 0 && (Me === null || !fi.call(Me, t))) {
|
|
1548
1548
|
var o = t;
|
|
1549
|
-
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~Cn), o.v !== ve &&
|
|
1549
|
+
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~Cn), o.v !== ve && Es(o), Uf(o), Mn(o, 0);
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
function Mn(e, t) {
|
|
@@ -1557,7 +1557,7 @@ function Mn(e, t) {
|
|
|
1557
1557
|
function Vr(e) {
|
|
1558
1558
|
var t = e.f;
|
|
1559
1559
|
if ((t & 16384) === 0) {
|
|
1560
|
-
|
|
1560
|
+
ce(e, Be);
|
|
1561
1561
|
var r = G, n = ai;
|
|
1562
1562
|
if (G = e, ai = !0, 0)
|
|
1563
1563
|
var i, o;
|
|
@@ -1598,17 +1598,17 @@ function u(e) {
|
|
|
1598
1598
|
var s, a;
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
|
-
if (
|
|
1601
|
+
if (Et && cr.has(e)) return cr.get(e);
|
|
1602
1602
|
if (t) {
|
|
1603
1603
|
var l = e;
|
|
1604
|
-
if (
|
|
1604
|
+
if (Et) {
|
|
1605
1605
|
var f = l.v;
|
|
1606
1606
|
return ((l.f & 1024) === 0 && l.reactions !== null || kc(l)) && (f = Ps(l)), cr.set(l, f), f;
|
|
1607
1607
|
}
|
|
1608
1608
|
var d = (l.f & 512) === 0 && !Ze && X !== null && (ai || (X.f & 512) !== 0), p = (l.f & ks) === 0;
|
|
1609
1609
|
Ln(l) && (d && (l.f |= 512), rc(l)), d && !p && (nc(l), Sc(l));
|
|
1610
1610
|
}
|
|
1611
|
-
if (
|
|
1611
|
+
if (xe?.has(e)) return xe.get(e);
|
|
1612
1612
|
if ((e.f & 8388608) !== 0) throw e.v;
|
|
1613
1613
|
return e.v;
|
|
1614
1614
|
}
|
|
@@ -1632,7 +1632,7 @@ function Dt(e) {
|
|
|
1632
1632
|
Ze = t;
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
-
var Wr = /* @__PURE__ */ Symbol("events"),
|
|
1635
|
+
var Wr = /* @__PURE__ */ Symbol("events"), xc = /* @__PURE__ */ new Set(), os = /* @__PURE__ */ new Set();
|
|
1636
1636
|
function dh(e, t, r, n = {}) {
|
|
1637
1637
|
function i(o) {
|
|
1638
1638
|
if (n.capture || ss.call(t, o), !o.cancelBubble) return Hi(() => r?.call(this, o));
|
|
@@ -1644,8 +1644,8 @@ function dh(e, t, r, n = {}) {
|
|
|
1644
1644
|
function we(e, t, r) {
|
|
1645
1645
|
(t[Wr] ?? (t[Wr] = {}))[e] = r;
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1648
|
-
for (var t = 0; t < e.length; t++)
|
|
1647
|
+
function Ec(e) {
|
|
1648
|
+
for (var t = 0; t < e.length; t++) xc.add(e[t]);
|
|
1649
1649
|
for (var r of os) r(e);
|
|
1650
1650
|
}
|
|
1651
1651
|
var Ja = null;
|
|
@@ -1717,10 +1717,10 @@ function Te(e, t) {
|
|
|
1717
1717
|
return () => {
|
|
1718
1718
|
if (D)
|
|
1719
1719
|
return kt(J, null), J;
|
|
1720
|
-
i === void 0 && (i = ph(o ? e : "<!>" + e), r || (i = /* @__PURE__ */
|
|
1720
|
+
i === void 0 && (i = ph(o ? e : "<!>" + e), r || (i = /* @__PURE__ */ xt(i)));
|
|
1721
1721
|
var s = n || ac ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1722
1722
|
if (r) {
|
|
1723
|
-
var a = /* @__PURE__ */
|
|
1723
|
+
var a = /* @__PURE__ */ xt(s), l = s.lastChild;
|
|
1724
1724
|
kt(a, l);
|
|
1725
1725
|
} else kt(s, s);
|
|
1726
1726
|
return s;
|
|
@@ -1728,16 +1728,16 @@ function Te(e, t) {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
function Yt(e = "") {
|
|
1730
1730
|
if (!D) {
|
|
1731
|
-
var t =
|
|
1731
|
+
var t = Ee(e + "");
|
|
1732
1732
|
return kt(t, t), t;
|
|
1733
1733
|
}
|
|
1734
1734
|
var r = J;
|
|
1735
|
-
return r.nodeType !== 3 ? (r.before(r =
|
|
1735
|
+
return r.nodeType !== 3 ? (r.before(r = Ee()), me(r)) : zi(r), kt(r, r), r;
|
|
1736
1736
|
}
|
|
1737
1737
|
function vh() {
|
|
1738
1738
|
if (D)
|
|
1739
1739
|
return kt(J, null), J;
|
|
1740
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1740
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = Ee();
|
|
1741
1741
|
return e.append(t, r), kt(t, r), e;
|
|
1742
1742
|
}
|
|
1743
1743
|
function ee(e, t) {
|
|
@@ -1866,14 +1866,14 @@ var kh = [
|
|
|
1866
1866
|
"$inspect().with",
|
|
1867
1867
|
"$inspect.trace",
|
|
1868
1868
|
"$host"
|
|
1869
|
-
],
|
|
1869
|
+
], xh = [
|
|
1870
1870
|
"textarea",
|
|
1871
1871
|
"script",
|
|
1872
1872
|
"style",
|
|
1873
1873
|
"title"
|
|
1874
1874
|
];
|
|
1875
|
-
function
|
|
1876
|
-
return
|
|
1875
|
+
function Eh(e) {
|
|
1876
|
+
return xh.includes(e);
|
|
1877
1877
|
}
|
|
1878
1878
|
var as = !0;
|
|
1879
1879
|
function ei(e) {
|
|
@@ -1890,7 +1890,7 @@ function Ah(e, t) {
|
|
|
1890
1890
|
is(), t.intro = t.intro ?? !1;
|
|
1891
1891
|
const r = t.target, n = D, i = J;
|
|
1892
1892
|
try {
|
|
1893
|
-
for (var o = /* @__PURE__ */
|
|
1893
|
+
for (var o = /* @__PURE__ */ xt(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ dt(o);
|
|
1894
1894
|
if (!o) throw Hr;
|
|
1895
1895
|
Re(!0), me(o);
|
|
1896
1896
|
const s = Mc(e, {
|
|
@@ -1910,7 +1910,7 @@ var ti = /* @__PURE__ */ new Map();
|
|
|
1910
1910
|
function Mc(e, { target: t, anchor: r, props: n = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1911
1911
|
is();
|
|
1912
1912
|
var l = void 0, f = nh(() => {
|
|
1913
|
-
var d = r ?? t.appendChild(
|
|
1913
|
+
var d = r ?? t.appendChild(Ee());
|
|
1914
1914
|
Wf(d, { pending: () => {
|
|
1915
1915
|
} }, (y) => {
|
|
1916
1916
|
zl({});
|
|
@@ -1926,15 +1926,15 @@ function Mc(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1926
1926
|
p.add(S);
|
|
1927
1927
|
var w = Sh(S);
|
|
1928
1928
|
for (const Z of [t, document]) {
|
|
1929
|
-
var
|
|
1930
|
-
|
|
1931
|
-
var R =
|
|
1932
|
-
R === void 0 ? (Z.addEventListener(S, ss, { passive: w }),
|
|
1929
|
+
var x = ti.get(Z);
|
|
1930
|
+
x === void 0 && (x = /* @__PURE__ */ new Map(), ti.set(Z, x));
|
|
1931
|
+
var R = x.get(S);
|
|
1932
|
+
R === void 0 ? (Z.addEventListener(S, ss, { passive: w }), x.set(S, 1)) : x.set(S, R + 1);
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
1936
|
};
|
|
1937
|
-
return v(Pi(
|
|
1937
|
+
return v(Pi(xc)), os.add(v), () => {
|
|
1938
1938
|
for (var y of p) for (const w of [t, document]) {
|
|
1939
1939
|
var T = ti.get(w), S = T.get(y);
|
|
1940
1940
|
--S == 0 ? (w.removeEventListener(y, ss), T.delete(y), T.size === 0 && ti.delete(w)) : T.set(y, S);
|
|
@@ -1951,14 +1951,14 @@ function Mh(e, t) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
var Tt = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), cn = /* @__PURE__ */ new WeakMap(), $o = /* @__PURE__ */ new WeakMap(), No = /* @__PURE__ */ new WeakMap(), Qa = /* @__PURE__ */ new WeakMap(), Cc = class {
|
|
1953
1953
|
constructor(e, t = !0) {
|
|
1954
|
-
|
|
1954
|
+
E(this, "anchor", void 0), q(this, Tt, /* @__PURE__ */ new Map()), q(this, Nt, /* @__PURE__ */ new Map()), q(this, Xe, /* @__PURE__ */ new Map()), q(this, cn, /* @__PURE__ */ new Set()), q(this, $o, !0), q(this, No, (r) => {
|
|
1955
1955
|
if (g(Tt, this).has(r)) {
|
|
1956
1956
|
var n = g(Tt, this).get(r), i = g(Nt, this).get(n);
|
|
1957
1957
|
if (i)
|
|
1958
|
-
|
|
1958
|
+
xi(i), g(cn, this).delete(n);
|
|
1959
1959
|
else {
|
|
1960
1960
|
var o = g(Xe, this).get(n);
|
|
1961
|
-
o && (
|
|
1961
|
+
o && (xi(o.effect), g(Nt, this).set(n, o.effect), g(Xe, this).delete(n), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
1962
1962
|
}
|
|
1963
1963
|
for (const [s, a] of g(Tt, this)) {
|
|
1964
1964
|
if (g(Tt, this).delete(s), s === r) break;
|
|
@@ -1970,7 +1970,7 @@ var Tt = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Xe =
|
|
|
1970
1970
|
const l = () => {
|
|
1971
1971
|
if (Array.from(g(Tt, this).values()).includes(s)) {
|
|
1972
1972
|
var f = document.createDocumentFragment();
|
|
1973
|
-
zs(a, f), f.append(
|
|
1973
|
+
zs(a, f), f.append(Ee()), g(Xe, this).set(s, {
|
|
1974
1974
|
effect: a,
|
|
1975
1975
|
fragment: f
|
|
1976
1976
|
});
|
|
@@ -1989,7 +1989,7 @@ var Tt = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Xe =
|
|
|
1989
1989
|
ensure(e, t) {
|
|
1990
1990
|
var r = j, n = uc();
|
|
1991
1991
|
if (t && !g(Nt, this).has(e) && !g(Xe, this).has(e)) if (n) {
|
|
1992
|
-
var i = document.createDocumentFragment(), o =
|
|
1992
|
+
var i = document.createDocumentFragment(), o = Ee();
|
|
1993
1993
|
i.append(o), g(Xe, this).set(e, {
|
|
1994
1994
|
effect: Ce(() => t(o)),
|
|
1995
1995
|
fragment: i
|
|
@@ -2004,13 +2004,13 @@ var Tt = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Xe =
|
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
2006
2006
|
function Oc(e) {
|
|
2007
|
-
se === null &&
|
|
2007
|
+
se === null && xs("onMount"), On && se.l !== null ? Ph(se).m.push(e) : si(() => {
|
|
2008
2008
|
const t = Dt(e);
|
|
2009
2009
|
if (typeof t == "function") return t;
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
2012
|
function Ch(e) {
|
|
2013
|
-
se === null &&
|
|
2013
|
+
se === null && xs("onDestroy"), Oc(() => () => Dt(e));
|
|
2014
2014
|
}
|
|
2015
2015
|
function Oh(e, t, { bubbles: r = !1, cancelable: n = !1 } = {}) {
|
|
2016
2016
|
return new CustomEvent(e, {
|
|
@@ -2021,7 +2021,7 @@ function Oh(e, t, { bubbles: r = !1, cancelable: n = !1 } = {}) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
function Ih() {
|
|
2023
2023
|
const e = se;
|
|
2024
|
-
return e === null &&
|
|
2024
|
+
return e === null && xs("createEventDispatcher"), (t, r, n) => {
|
|
2025
2025
|
const i = e.s.$$events?.[t];
|
|
2026
2026
|
if (i) {
|
|
2027
2027
|
const o = Ii(i) ? i.slice() : [i], s = Oh(t, r, n);
|
|
@@ -2105,36 +2105,36 @@ function Cr(e, t, r, n, i, o = null) {
|
|
|
2105
2105
|
var s = e, a = /* @__PURE__ */ new Map();
|
|
2106
2106
|
if ((t & 4) !== 0) {
|
|
2107
2107
|
var l = e;
|
|
2108
|
-
s = D ? me(/* @__PURE__ */
|
|
2108
|
+
s = D ? me(/* @__PURE__ */ xt(l)) : l.appendChild(Ee());
|
|
2109
2109
|
}
|
|
2110
2110
|
D && Br();
|
|
2111
2111
|
var f = null, d = /* @__PURE__ */ Is(() => {
|
|
2112
|
-
var
|
|
2113
|
-
return Ii(
|
|
2112
|
+
var x = r();
|
|
2113
|
+
return Ii(x) ? x : x == null ? [] : Pi(x);
|
|
2114
2114
|
}), p, v = /* @__PURE__ */ new Map(), y = !0;
|
|
2115
|
-
function T(
|
|
2116
|
-
(w.effect.f & 16384) === 0 && (w.pending.delete(
|
|
2115
|
+
function T(x) {
|
|
2116
|
+
(w.effect.f & 16384) === 0 && (w.pending.delete(x), w.fallback = f, Lh(w, p, s, t, n), f !== null && (p.length === 0 ? (f.f & 33554432) === 0 ? xi(f) : (f.f ^= _n, yn(f, null, s)) : wr(f, () => {
|
|
2117
2117
|
f = null;
|
|
2118
2118
|
})));
|
|
2119
2119
|
}
|
|
2120
|
-
function S(
|
|
2121
|
-
w.pending.delete(
|
|
2120
|
+
function S(x) {
|
|
2121
|
+
w.pending.delete(x);
|
|
2122
2122
|
}
|
|
2123
2123
|
var w = {
|
|
2124
2124
|
effect: Bi(() => {
|
|
2125
2125
|
p = u(d);
|
|
2126
|
-
var
|
|
2126
|
+
var x = p.length;
|
|
2127
2127
|
let R = !1;
|
|
2128
|
-
D && $l(s) === "[!" != (
|
|
2129
|
-
for (var Z = /* @__PURE__ */ new Set(), M = j, z = uc(), U = 0; U <
|
|
2128
|
+
D && $l(s) === "[!" != (x === 0) && (s = gi(), me(s), Re(!1), R = !0);
|
|
2129
|
+
for (var Z = /* @__PURE__ */ new Set(), M = j, z = uc(), U = 0; U < x; U += 1) {
|
|
2130
2130
|
D && J.nodeType === 8 && J.data === "]" && (s = J, R = !0, Re(!1));
|
|
2131
2131
|
var ne = p[U], K = n(ne, U);
|
|
2132
2132
|
if (0)
|
|
2133
2133
|
var be;
|
|
2134
2134
|
var ae = y ? null : a.get(K);
|
|
2135
|
-
ae ? (ae.v && jr(ae.v, ne), ae.i && jr(ae.i, U), z && M.unskip_effect(ae.e)) : (ae = $h(a, y ? s : ri ?? (ri =
|
|
2135
|
+
ae ? (ae.v && jr(ae.v, ne), ae.i && jr(ae.i, U), z && M.unskip_effect(ae.e)) : (ae = $h(a, y ? s : ri ?? (ri = Ee()), ne, K, U, i, t, r), y || (ae.e.f |= _n), a.set(K, ae)), Z.add(K);
|
|
2136
2136
|
}
|
|
2137
|
-
if (
|
|
2137
|
+
if (x === 0 && o && !f && (y ? f = Ce(() => o(s)) : (f = Ce(() => o(ri ?? (ri = Ee()))), f.f |= _n)), x > Z.size && uf("", "", ""), D && x > 0 && me(gi()), !y)
|
|
2138
2138
|
if (v.set(M, Z), z) {
|
|
2139
2139
|
for (const [Yr, Ve] of a) Z.has(Yr) || M.skip_effect(Ve.e);
|
|
2140
2140
|
M.oncommit(T), M.ondiscard(S);
|
|
@@ -2154,13 +2154,13 @@ function un(e) {
|
|
|
2154
2154
|
return e;
|
|
2155
2155
|
}
|
|
2156
2156
|
function Lh(e, t, r, n, i) {
|
|
2157
|
-
var o = (n & 8) !== 0, s = t.length, a = e.items, l = un(e.effect.first), f, d = null, p, v = [], y = [], T, S, w,
|
|
2158
|
-
if (o) for (
|
|
2159
|
-
T = t[
|
|
2160
|
-
for (
|
|
2161
|
-
if (T = t[
|
|
2157
|
+
var o = (n & 8) !== 0, s = t.length, a = e.items, l = un(e.effect.first), f, d = null, p, v = [], y = [], T, S, w, x;
|
|
2158
|
+
if (o) for (x = 0; x < s; x += 1)
|
|
2159
|
+
T = t[x], S = i(T, x), w = a.get(S).e, (w.f & 33554432) === 0 && (w.nodes?.a?.measure(), (p ?? (p = /* @__PURE__ */ new Set())).add(w));
|
|
2160
|
+
for (x = 0; x < s; x += 1) {
|
|
2161
|
+
if (T = t[x], S = i(T, x), w = a.get(S).e, e.outrogroups !== null) for (const ae of e.outrogroups)
|
|
2162
2162
|
ae.pending.delete(w), ae.done.delete(w);
|
|
2163
|
-
if ((w.f & 8192) !== 0 && (
|
|
2163
|
+
if ((w.f & 8192) !== 0 && (xi(w), o && (w.nodes?.a?.unfix(), (p ?? (p = /* @__PURE__ */ new Set())).delete(w))), (w.f & 33554432) !== 0)
|
|
2164
2164
|
if (w.f ^= _n, w === l) yn(w, null, r);
|
|
2165
2165
|
else {
|
|
2166
2166
|
var R = d ? d.next : l;
|
|
@@ -2175,7 +2175,7 @@ function Lh(e, t, r, n, i) {
|
|
|
2175
2175
|
var z = v[0], U = v[v.length - 1];
|
|
2176
2176
|
for (M = 0; M < v.length; M += 1) yn(v[M], Z, r);
|
|
2177
2177
|
for (M = 0; M < y.length; M += 1) f.delete(y[M]);
|
|
2178
|
-
Wt(e, z.prev, U.next), Wt(e, d, z), Wt(e, U, Z), l = Z, d = U,
|
|
2178
|
+
Wt(e, z.prev, U.next), Wt(e, d, z), Wt(e, U, Z), l = Z, d = U, x -= 1, v = [], y = [];
|
|
2179
2179
|
} else
|
|
2180
2180
|
f.delete(w), yn(w, l, r), Wt(e, w.prev, w.next), Wt(e, w, d === null ? e.effect.first : d.next), Wt(e, d, w), d = w;
|
|
2181
2181
|
continue;
|
|
@@ -2200,8 +2200,8 @@ function Lh(e, t, r, n, i) {
|
|
|
2200
2200
|
if (K > 0) {
|
|
2201
2201
|
var be = (n & 4) !== 0 && s === 0 ? r : null;
|
|
2202
2202
|
if (o) {
|
|
2203
|
-
for (
|
|
2204
|
-
for (
|
|
2203
|
+
for (x = 0; x < K; x += 1) ne[x].nodes?.a?.measure();
|
|
2204
|
+
for (x = 0; x < K; x += 1) ne[x].nodes?.a?.fix();
|
|
2205
2205
|
}
|
|
2206
2206
|
Rh(e, ne, be);
|
|
2207
2207
|
}
|
|
@@ -2253,8 +2253,8 @@ function Wh(e, t, r, n, i, o) {
|
|
|
2253
2253
|
if (v) {
|
|
2254
2254
|
if (l = D ? l : Wi(v, y), kt(l, l), n) {
|
|
2255
2255
|
var S = null;
|
|
2256
|
-
D &&
|
|
2257
|
-
var w = D ? /* @__PURE__ */
|
|
2256
|
+
D && Eh(v) && l.append(S = document.createComment(""));
|
|
2257
|
+
var w = D ? /* @__PURE__ */ xt(l) : l.appendChild(Ee());
|
|
2258
2258
|
D && (w === null ? Re(!1) : me(w)), Za(d), n(l, w), S?.remove(), Za(null);
|
|
2259
2259
|
}
|
|
2260
2260
|
G.nodes.end = l, T.before(l);
|
|
@@ -2381,7 +2381,7 @@ function Rc(e, t, r, n) {
|
|
|
2381
2381
|
} else n && (Array.isArray(n) ? (zo(e, r?.[0], n[0]), zo(e, r?.[1], n[1], "important")) : zo(e, r, n));
|
|
2382
2382
|
return n;
|
|
2383
2383
|
}
|
|
2384
|
-
function
|
|
2384
|
+
function Ei(e, t, r = !1) {
|
|
2385
2385
|
if (e.multiple) {
|
|
2386
2386
|
if (t == null) return;
|
|
2387
2387
|
if (!Ii(t)) return Tf();
|
|
@@ -2396,7 +2396,7 @@ function xi(e, t, r = !1) {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
function Lc(e) {
|
|
2398
2398
|
var t = new MutationObserver(() => {
|
|
2399
|
-
|
|
2399
|
+
Ei(e, e.__value);
|
|
2400
2400
|
});
|
|
2401
2401
|
t.observe(e, {
|
|
2402
2402
|
childList: !0,
|
|
@@ -2420,10 +2420,10 @@ function Je(e, t, r = t) {
|
|
|
2420
2420
|
}), Pn(() => {
|
|
2421
2421
|
var o = t();
|
|
2422
2422
|
if (e === document.activeElement) {
|
|
2423
|
-
var s = Fe ?
|
|
2423
|
+
var s = Fe ? xn : j;
|
|
2424
2424
|
if (n.has(s)) return;
|
|
2425
2425
|
}
|
|
2426
|
-
if (
|
|
2426
|
+
if (Ei(e, o, i), i && o === void 0) {
|
|
2427
2427
|
var a = e.querySelector(":checked");
|
|
2428
2428
|
a !== null && (o = kn(a), r(o));
|
|
2429
2429
|
}
|
|
@@ -2496,13 +2496,13 @@ function Kh(e, t, r, n, i = !1, o = !1) {
|
|
|
2496
2496
|
if (w === "on") {
|
|
2497
2497
|
const U = {}, ne = "$$" + M;
|
|
2498
2498
|
let K = M.slice(2);
|
|
2499
|
-
var
|
|
2500
|
-
if (gh(K) && (K = K.slice(0, -7), U.capture = !0), !
|
|
2499
|
+
var x = yh(K);
|
|
2500
|
+
if (gh(K) && (K = K.slice(0, -7), U.capture = !0), !x && S) {
|
|
2501
2501
|
if (z != null) continue;
|
|
2502
2502
|
e.removeEventListener(K, p[ne], U), p[ne] = null;
|
|
2503
2503
|
}
|
|
2504
|
-
if (
|
|
2505
|
-
we(K, e, z),
|
|
2504
|
+
if (x)
|
|
2505
|
+
we(K, e, z), Ec([K]);
|
|
2506
2506
|
else if (z != null) {
|
|
2507
2507
|
let be = function(ae) {
|
|
2508
2508
|
p[M].call(this, ae);
|
|
@@ -2540,17 +2540,17 @@ function Yh(e, t, r = [], n = [], i = [], o, s = !1, a = !1) {
|
|
|
2540
2540
|
var f = void 0, d = {}, p = e.nodeName === qh, v = !1;
|
|
2541
2541
|
if (hc(() => {
|
|
2542
2542
|
var T = t(...l.map(u)), S = Kh(e, f, T, o, s, a);
|
|
2543
|
-
v && p && "value" in T &&
|
|
2544
|
-
for (let
|
|
2545
|
-
for (let
|
|
2546
|
-
var w = T[
|
|
2547
|
-
|
|
2543
|
+
v && p && "value" in T && Ei(e, T.value);
|
|
2544
|
+
for (let x of Object.getOwnPropertySymbols(d)) T[x] || ye(d[x]);
|
|
2545
|
+
for (let x of Object.getOwnPropertySymbols(T)) {
|
|
2546
|
+
var w = T[x];
|
|
2547
|
+
x.description === "@attach" && (!f || w !== f[x]) && (d[x] && ye(d[x]), d[x] = Ce(() => Hh(e, () => w))), S[x] = w;
|
|
2548
2548
|
}
|
|
2549
2549
|
f = S;
|
|
2550
2550
|
}), p) {
|
|
2551
2551
|
var y = e;
|
|
2552
2552
|
Pn(() => {
|
|
2553
|
-
|
|
2553
|
+
Ei(y, f.value, !0), Lc(y);
|
|
2554
2554
|
});
|
|
2555
2555
|
}
|
|
2556
2556
|
v = !0;
|
|
@@ -2589,7 +2589,7 @@ function Or(e, t, r = t) {
|
|
|
2589
2589
|
}), (D && e.defaultValue !== e.value || Dt(t) == null && e.value) && (r(Ho(e) ? Bo(e.value) : e.value), j !== null && n.add(j)), Rn(() => {
|
|
2590
2590
|
var i = t();
|
|
2591
2591
|
if (e === document.activeElement) {
|
|
2592
|
-
var o = Fe ?
|
|
2592
|
+
var o = Fe ? xn : j;
|
|
2593
2593
|
if (n.has(o)) return;
|
|
2594
2594
|
}
|
|
2595
2595
|
Ho(e) && i === Bo(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
|
|
@@ -2631,7 +2631,7 @@ function Jh() {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
}));
|
|
2633
2633
|
}
|
|
2634
|
-
|
|
2634
|
+
E(Bc, "entries", /* @__PURE__ */ new WeakMap());
|
|
2635
2635
|
function Do(e, t) {
|
|
2636
2636
|
return e === t || e?.[or] === t;
|
|
2637
2637
|
}
|
|
@@ -2678,15 +2678,15 @@ function hn(e, t, r, n) {
|
|
|
2678
2678
|
return arguments.length > 0 ? ((!i || !z || w || T) && p(z ? S() : M), M) : S();
|
|
2679
2679
|
});
|
|
2680
2680
|
}
|
|
2681
|
-
var
|
|
2681
|
+
var x = !1, R = ((r & 1) !== 0 ? An : Is)(() => (x = !1, S()));
|
|
2682
2682
|
o && u(R);
|
|
2683
2683
|
var Z = G;
|
|
2684
2684
|
return (function(M, z) {
|
|
2685
2685
|
if (arguments.length > 0) {
|
|
2686
2686
|
const U = z ? u(R) : i && o ? He(M) : M;
|
|
2687
|
-
return _(R, U),
|
|
2687
|
+
return _(R, U), x = !0, a !== void 0 && (a = U), M;
|
|
2688
2688
|
}
|
|
2689
|
-
return
|
|
2689
|
+
return Et && x || (Z.f & 16384) !== 0 ? R.v : u(R);
|
|
2690
2690
|
});
|
|
2691
2691
|
}
|
|
2692
2692
|
function Qh(e) {
|
|
@@ -2754,7 +2754,7 @@ var Xt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), Zh =
|
|
|
2754
2754
|
}, Fc;
|
|
2755
2755
|
typeof HTMLElement == "function" && (Fc = class extends HTMLElement {
|
|
2756
2756
|
constructor(e, t, r) {
|
|
2757
|
-
super(),
|
|
2757
|
+
super(), E(this, "$$ctor", void 0), E(this, "$$s", void 0), E(this, "$$c", void 0), E(this, "$$cn", !1), E(this, "$$d", {}), E(this, "$$r", !1), E(this, "$$p_d", {}), E(this, "$$l", {}), E(this, "$$l_u", /* @__PURE__ */ new Map()), E(this, "$$me", void 0), E(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
2758
2758
|
}
|
|
2759
2759
|
addEventListener(e, t, r) {
|
|
2760
2760
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
@@ -2957,7 +2957,7 @@ var zr;
|
|
|
2957
2957
|
})(zr || (zr = {}));
|
|
2958
2958
|
var Dc = class us {
|
|
2959
2959
|
constructor(t = {}) {
|
|
2960
|
-
if (
|
|
2960
|
+
if (E(this, "config", void 0), E(this, "ttsWordHighlight", null), E(this, "ttsSentenceHighlight", null), E(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), E(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), E(this, "annotations", /* @__PURE__ */ new Map()), E(this, "colorHighlights", /* @__PURE__ */ new Map()), E(this, "nextAnnotationId", 1), E(this, "supported", !1), E(this, "rangeSerializer", void 0), E(this, "themeObserver", null), E(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new rp(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2961
2961
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2962
2962
|
return;
|
|
2963
2963
|
}
|
|
@@ -3074,7 +3074,7 @@ var Dc = class us {
|
|
|
3074
3074
|
}
|
|
3075
3075
|
be > v && (v = be, p = z);
|
|
3076
3076
|
}
|
|
3077
|
-
const y = Math.max(0.24, Math.min(0.85, p * 0.55)), T = Math.max(0.55, Math.min(0.95, p + 0.2)), S = Math.max(0.22, Math.min(0.6, p * 0.45)), w = l,
|
|
3077
|
+
const y = Math.max(0.24, Math.min(0.85, p * 0.55)), T = Math.max(0.55, Math.min(0.95, p + 0.2)), S = Math.max(0.22, Math.min(0.6, p * 0.45)), w = l, x = this.blend(w, a, T), R = this.contrastRatio(x, a), Z = this.relativeLuminance(a) > 0.45 ? [
|
|
3078
3078
|
0,
|
|
3079
3079
|
0,
|
|
3080
3080
|
0
|
|
@@ -3367,8 +3367,8 @@ var Dc = class us {
|
|
|
3367
3367
|
}
|
|
3368
3368
|
}
|
|
3369
3369
|
};
|
|
3370
|
-
|
|
3371
|
-
|
|
3370
|
+
E(Dc, "SENTENCE_FALLBACK_SELECTOR", "math, mjx-container, svg, img, canvas, [role='img']");
|
|
3371
|
+
E(Dc, "WORD_FALLBACK_SELECTOR", "svg, img, canvas, [role='img']");
|
|
3372
3372
|
function jc(e) {
|
|
3373
3373
|
return (...t) => {
|
|
3374
3374
|
console.debug(`[${e}]`, ...t);
|
|
@@ -3509,7 +3509,7 @@ function il(e) {
|
|
|
3509
3509
|
}
|
|
3510
3510
|
var fp = class {
|
|
3511
3511
|
constructor() {
|
|
3512
|
-
|
|
3512
|
+
E(this, "tools", /* @__PURE__ */ new Map()), E(this, "pnpIndex", /* @__PURE__ */ new Map()), E(this, "componentOverrides", {}), E(this, "moduleLoaders", /* @__PURE__ */ new Map()), E(this, "loadedToolModules", /* @__PURE__ */ new Set()), E(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
3513
3513
|
}
|
|
3514
3514
|
normalizeToolId(e) {
|
|
3515
3515
|
return Vc(e);
|
|
@@ -3792,7 +3792,7 @@ function Bs(e, t, r) {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
var _p = class {
|
|
3794
3794
|
constructor() {
|
|
3795
|
-
|
|
3795
|
+
E(this, "providerId", "desmos-calculator"), E(this, "providerName", "Desmos Calculator"), E(this, "category", "calculator"), E(this, "version", "1.10"), E(this, "requiresAuth", !0), E(this, "desmosProvider", null), E(this, "config", null);
|
|
3796
3796
|
}
|
|
3797
3797
|
async emitTelemetry(e, t) {
|
|
3798
3798
|
try {
|
|
@@ -3916,7 +3916,7 @@ var _p = class {
|
|
|
3916
3916
|
return e[0] || null;
|
|
3917
3917
|
}, Sp = (e) => !e.default, Kc = class {
|
|
3918
3918
|
constructor() {
|
|
3919
|
-
|
|
3919
|
+
E(this, "providerId", "browser"), E(this, "providerName", "Browser Speech Synthesis"), E(this, "version", "1.0.0");
|
|
3920
3920
|
}
|
|
3921
3921
|
async initialize(e) {
|
|
3922
3922
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
@@ -3941,7 +3941,7 @@ var _p = class {
|
|
|
3941
3941
|
}
|
|
3942
3942
|
}, kp = class {
|
|
3943
3943
|
constructor(e) {
|
|
3944
|
-
|
|
3944
|
+
E(this, "utterance", null), E(this, "config", null), E(this, "_isPlaying", !1), E(this, "_isPaused", !1), E(this, "speakRunId", 0), E(this, "onWordBoundary", void 0), this.config = e;
|
|
3945
3945
|
}
|
|
3946
3946
|
async speak(e) {
|
|
3947
3947
|
if (!this.config) throw new Error("TTS not initialized");
|
|
@@ -4081,7 +4081,7 @@ var _p = class {
|
|
|
4081
4081
|
...e.providerOptions || {}
|
|
4082
4082
|
});
|
|
4083
4083
|
}
|
|
4084
|
-
},
|
|
4084
|
+
}, xp = class {
|
|
4085
4085
|
async emitTelemetry(e, t) {
|
|
4086
4086
|
try {
|
|
4087
4087
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -4090,7 +4090,7 @@ var _p = class {
|
|
|
4090
4090
|
}
|
|
4091
4091
|
}
|
|
4092
4092
|
constructor(e = "browser") {
|
|
4093
|
-
|
|
4093
|
+
E(this, "providerId", "tts-service"), E(this, "providerName", "Text-to-Speech"), E(this, "category", "tts"), E(this, "version", "1.0"), E(this, "requiresAuth", void 0), E(this, "ttsProvider", null), E(this, "config", null), this.requiresAuth = e !== "browser";
|
|
4094
4094
|
}
|
|
4095
4095
|
async initialize(e) {
|
|
4096
4096
|
if (this.ttsProvider) {
|
|
@@ -4171,7 +4171,7 @@ var _p = class {
|
|
|
4171
4171
|
destroy() {
|
|
4172
4172
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
4173
4173
|
}
|
|
4174
|
-
},
|
|
4174
|
+
}, Ep = /* @__PURE__ */ new Set([
|
|
4175
4175
|
"annotation-xml",
|
|
4176
4176
|
"color-profile",
|
|
4177
4177
|
"font-face",
|
|
@@ -4186,7 +4186,7 @@ var _p = class {
|
|
|
4186
4186
|
if (!r) throw new Error(`Invalid ${t}: tag is empty`);
|
|
4187
4187
|
if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
|
|
4188
4188
|
if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
|
|
4189
|
-
if (
|
|
4189
|
+
if (Ep.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
4190
4190
|
if (!Ap.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
4191
4191
|
return r;
|
|
4192
4192
|
}, Yc = {
|
|
@@ -4310,7 +4310,7 @@ var Lp = {
|
|
|
4310
4310
|
}
|
|
4311
4311
|
};
|
|
4312
4312
|
}
|
|
4313
|
-
},
|
|
4313
|
+
}, le = (e) => e.trim().replace(/\s+/g, " "), Xc = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Jc = (e) => {
|
|
4314
4314
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
4315
4315
|
const t = e.classList;
|
|
4316
4316
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -4359,26 +4359,26 @@ var Lp = {
|
|
|
4359
4359
|
const y = v.textContent || "", T = y.match(/\S/), S = T ? T[0] : null;
|
|
4360
4360
|
!o && !s && Qc(l, S, t) && (n.push(" "), a && r.set(i, a), i++, s = !0);
|
|
4361
4361
|
for (let w = 0; w < y.length; w++) {
|
|
4362
|
-
const
|
|
4363
|
-
o ? R || (o = !1, n.push(
|
|
4362
|
+
const x = y[w], R = /\s/.test(x);
|
|
4363
|
+
o ? R || (o = !1, n.push(x), r.set(i, {
|
|
4364
4364
|
node: v,
|
|
4365
4365
|
offset: w
|
|
4366
4366
|
}), a = {
|
|
4367
4367
|
node: v,
|
|
4368
4368
|
offset: w
|
|
4369
|
-
}, i++, s = !1, l =
|
|
4369
|
+
}, i++, s = !1, l = x) : R ? (s || (n.push(" "), r.set(i, {
|
|
4370
4370
|
node: v,
|
|
4371
4371
|
offset: w
|
|
4372
4372
|
}), a = {
|
|
4373
4373
|
node: v,
|
|
4374
4374
|
offset: w
|
|
4375
|
-
}, i++), s = !0) : (n.push(
|
|
4375
|
+
}, i++), s = !0) : (n.push(x), r.set(i, {
|
|
4376
4376
|
node: v,
|
|
4377
4377
|
offset: w
|
|
4378
4378
|
}), a = {
|
|
4379
4379
|
node: v,
|
|
4380
4380
|
offset: w
|
|
4381
|
-
}, i++, s = !1, l =
|
|
4381
|
+
}, i++, s = !1, l = x);
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
4384
|
d = f.nextNode();
|
|
@@ -4426,7 +4426,7 @@ var Lp = {
|
|
|
4426
4426
|
}
|
|
4427
4427
|
}, eu = async (e, t = {}) => {
|
|
4428
4428
|
if (!e.some((f) => f.type === "math")) return {
|
|
4429
|
-
speechText:
|
|
4429
|
+
speechText: le(e.map((f) => f.type === "text" ? f.text : f.fallbackText).join(" ")),
|
|
4430
4430
|
usedMathSpeech: !1,
|
|
4431
4431
|
usedFallback: !1
|
|
4432
4432
|
};
|
|
@@ -4439,7 +4439,7 @@ var Lp = {
|
|
|
4439
4439
|
}
|
|
4440
4440
|
try {
|
|
4441
4441
|
r || (r = await o());
|
|
4442
|
-
const d =
|
|
4442
|
+
const d = le(await Zc(r, f.mathml, t.language, "none", t.mathSpeech));
|
|
4443
4443
|
if (d) {
|
|
4444
4444
|
s.push(d), n = !0;
|
|
4445
4445
|
continue;
|
|
@@ -4449,7 +4449,7 @@ var Lp = {
|
|
|
4449
4449
|
i = !0, console.debug("[TTSService] Math speech generation failed; using visible fallback", { message: d instanceof Error ? d.message : String(d) }), s.push(f.fallbackText);
|
|
4450
4450
|
}
|
|
4451
4451
|
}
|
|
4452
|
-
const a =
|
|
4452
|
+
const a = le(s.join(" "));
|
|
4453
4453
|
let l;
|
|
4454
4454
|
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await Fp(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
4455
4455
|
speechText: a,
|
|
@@ -4605,7 +4605,7 @@ var Lp = {
|
|
|
4605
4605
|
icon: "volume-up",
|
|
4606
4606
|
provider: {
|
|
4607
4607
|
getProviderId: () => "tts",
|
|
4608
|
-
createProvider: (e) => new
|
|
4608
|
+
createProvider: (e) => new xp(fs(ui(e))),
|
|
4609
4609
|
getInitConfig: (e) => {
|
|
4610
4610
|
const t = ui(e), r = fs(t), n = ru(t, r);
|
|
4611
4611
|
return {
|
|
@@ -5385,7 +5385,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
5385
5385
|
}
|
|
5386
5386
|
const o = yv(t);
|
|
5387
5387
|
return {
|
|
5388
|
-
spokenText:
|
|
5388
|
+
spokenText: le(o.text),
|
|
5389
5389
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
5390
5390
|
unsupportedSemantic: r,
|
|
5391
5391
|
hasMarkup: n
|
|
@@ -5541,12 +5541,12 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
5541
5541
|
score: l.score
|
|
5542
5542
|
};
|
|
5543
5543
|
});
|
|
5544
|
-
},
|
|
5544
|
+
}, xv = (e, t, r) => {
|
|
5545
5545
|
if (e.length === 0) return 0;
|
|
5546
5546
|
const n = e.length / Math.max(1, Math.min(t.length, r.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
5547
5547
|
return Math.min(1, n * i);
|
|
5548
5548
|
}, lu = (e) => {
|
|
5549
|
-
const t = su(e.speechText), r =
|
|
5549
|
+
const t = su(e.speechText), r = le(e.visibleText), n = t.spokenText, i = hs(n), o = hs(r), s = t.unsupportedSemantic ? [] : kv(i, o), a = xv(s, i, o), l = n === r && n.length > 0, f = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, d = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || f) && a >= 0.12 ? "anchor-span" : "region-fallback", p = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
5550
5550
|
return {
|
|
5551
5551
|
speechText: e.speechText,
|
|
5552
5552
|
spokenText: n,
|
|
@@ -5592,7 +5592,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
5592
5592
|
start: t,
|
|
5593
5593
|
length: Math.min(r, n.end - t)
|
|
5594
5594
|
} : null;
|
|
5595
|
-
},
|
|
5595
|
+
}, Ev = (e, t, r = 1, n) => {
|
|
5596
5596
|
if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
|
|
5597
5597
|
const i = Math.max(1, Number.isFinite(r) ? r : 1);
|
|
5598
5598
|
if (n && /^<[^>]+>$/.test(n.trim())) return null;
|
|
@@ -6299,7 +6299,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6299
6299
|
if (!bu(o))
|
|
6300
6300
|
for (const s of Array.from(o.childNodes)) n(s);
|
|
6301
6301
|
};
|
|
6302
|
-
return n(t.documentElement),
|
|
6302
|
+
return n(t.documentElement), le(r.join(" "));
|
|
6303
6303
|
}, bg = (e, t, r) => {
|
|
6304
6304
|
const n = gu(r), i = (a) => {
|
|
6305
6305
|
if (Kr(a, e)) return;
|
|
@@ -6313,7 +6313,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6313
6313
|
for (const f of Array.from(l.childNodes)) i(f);
|
|
6314
6314
|
};
|
|
6315
6315
|
i(e), Tu(n);
|
|
6316
|
-
const o =
|
|
6316
|
+
const o = le(n.chars.join(""));
|
|
6317
6317
|
if (o) return {
|
|
6318
6318
|
text: o,
|
|
6319
6319
|
map: n.map
|
|
@@ -6330,7 +6330,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6330
6330
|
const r = gu(t), n = [];
|
|
6331
6331
|
let i = 0, o, s = !1;
|
|
6332
6332
|
const a = () => {
|
|
6333
|
-
const d =
|
|
6333
|
+
const d = le(r.chars.slice(i, r.chars.length).join(""));
|
|
6334
6334
|
d && n.push({
|
|
6335
6335
|
type: "text",
|
|
6336
6336
|
text: d,
|
|
@@ -6351,7 +6351,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6351
6351
|
a();
|
|
6352
6352
|
const y = bg(p, v, t);
|
|
6353
6353
|
mg(r, y);
|
|
6354
|
-
const T =
|
|
6354
|
+
const T = le(y.text);
|
|
6355
6355
|
n.push({
|
|
6356
6356
|
type: "math",
|
|
6357
6357
|
mathml: v,
|
|
@@ -6401,15 +6401,15 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6401
6401
|
"listitem",
|
|
6402
6402
|
"option",
|
|
6403
6403
|
"radio"
|
|
6404
|
-
]),
|
|
6404
|
+
]), xg = (e) => {
|
|
6405
6405
|
if (e.type !== "text" || !e.sourceElement) return !1;
|
|
6406
6406
|
const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
6407
6407
|
return Sg.has(t) || kg.has(r);
|
|
6408
|
-
},
|
|
6408
|
+
}, Eg = async (e) => {
|
|
6409
6409
|
const t = e.resolveMathSpeech ?? wg, { visibleText: r } = e, n = [];
|
|
6410
6410
|
let i = 0;
|
|
6411
6411
|
const o = (a) => {
|
|
6412
|
-
const l =
|
|
6412
|
+
const l = le(a), f = r.indexOf(l, i), d = f >= 0 ? f : i, p = d + l.length;
|
|
6413
6413
|
return i = p, {
|
|
6414
6414
|
start: d,
|
|
6415
6415
|
end: p
|
|
@@ -6418,12 +6418,12 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6418
6418
|
for (let a = 0; a < e.chunks.length; a++) {
|
|
6419
6419
|
const l = e.chunks[a];
|
|
6420
6420
|
if (l.type === "text") {
|
|
6421
|
-
const y =
|
|
6421
|
+
const y = xg(l) ? [{
|
|
6422
6422
|
text: l.text,
|
|
6423
6423
|
offset: 0
|
|
6424
6424
|
}] : Fs(l.text, { locale: e.language });
|
|
6425
6425
|
for (const T of y) {
|
|
6426
|
-
const S =
|
|
6426
|
+
const S = le(T.text);
|
|
6427
6427
|
if (!S) continue;
|
|
6428
6428
|
const w = o(S);
|
|
6429
6429
|
n.push({
|
|
@@ -6460,7 +6460,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6460
6460
|
segments: n,
|
|
6461
6461
|
locale: Tg(e.language),
|
|
6462
6462
|
visibleText: r,
|
|
6463
|
-
plainSpeechText:
|
|
6463
|
+
plainSpeechText: le(s.join(" "))
|
|
6464
6464
|
};
|
|
6465
6465
|
}, Ag = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Mg = "sre-v1", Cg = 256, ys = (e) => Array.isArray(e) ? `array:[${e.map(ys).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${ys(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, Sl = (e, t, r, n) => `${Mg}\0${Ag(e)}\0${t ? "ssml" : "plain"}\0${ys(r ?? null)}\0${n}`, Og = (e = {}) => {
|
|
6466
6466
|
const t = Math.max(1, e.maxEntries ?? Cg), r = e.resolve ?? ((o, s) => eu([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
@@ -6522,7 +6522,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6522
6522
|
};
|
|
6523
6523
|
let n, i;
|
|
6524
6524
|
if (e.catalogAlignment)
|
|
6525
|
-
n =
|
|
6525
|
+
n = Ev(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
|
|
6526
6526
|
else {
|
|
6527
6527
|
const o = Pg(e, t);
|
|
6528
6528
|
n = o.boundary, i = o.spokenText;
|
|
@@ -6572,7 +6572,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6572
6572
|
["mn", "mjx-mn"],
|
|
6573
6573
|
["mo", "mjx-mo"],
|
|
6574
6574
|
["mtext", "mjx-mtext"]
|
|
6575
|
-
]), bs = "mi,mn,mo,mtext", ku = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext",
|
|
6575
|
+
]), bs = "mi,mn,mo,mtext", ku = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", xu = [
|
|
6576
6576
|
"mjx-mfrac",
|
|
6577
6577
|
"mjx-msqrt",
|
|
6578
6578
|
"mjx-mroot",
|
|
@@ -6580,7 +6580,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6580
6580
|
"mjx-munder",
|
|
6581
6581
|
"mjx-mover",
|
|
6582
6582
|
"mjx-munderover"
|
|
6583
|
-
].join(","),
|
|
6583
|
+
].join(","), Eu = (e) => e.type === "text-range" ? e.node.parentElement : e.element, Ui = (e) => {
|
|
6584
6584
|
let t = e;
|
|
6585
6585
|
for (; t; ) {
|
|
6586
6586
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
@@ -6605,7 +6605,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6605
6605
|
}
|
|
6606
6606
|
return !0;
|
|
6607
6607
|
}, $g = (e, t) => {
|
|
6608
|
-
if (!e || !Su.has(e.localName.toLowerCase()) || t.querySelector(
|
|
6608
|
+
if (!e || !Su.has(e.localName.toLowerCase()) || t.querySelector(xu)) return null;
|
|
6609
6609
|
const r = _s(e), n = t.querySelector("mjx-math");
|
|
6610
6610
|
if (!r || !n) return null;
|
|
6611
6611
|
const i = Array.from(r.querySelectorAll(bs)), o = i.indexOf(e);
|
|
@@ -6617,7 +6617,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6617
6617
|
}, Ng = (e) => {
|
|
6618
6618
|
const t = Ui(e);
|
|
6619
6619
|
if (t) {
|
|
6620
|
-
if (t.querySelector(
|
|
6620
|
+
if (t.querySelector(xu)) return "expression";
|
|
6621
6621
|
const n = _s(e) ?? e, i = t.querySelector("mjx-math");
|
|
6622
6622
|
if (!i) return "expression";
|
|
6623
6623
|
const o = Array.from(n.querySelectorAll(bs)), s = Array.from(i.querySelectorAll(ku));
|
|
@@ -6626,7 +6626,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6626
6626
|
const r = _s(e) ?? e;
|
|
6627
6627
|
return Array.from(r.querySelectorAll(bs)).some((n) => !Kr(n)) ? "token" : "expression";
|
|
6628
6628
|
}, ws = (e) => {
|
|
6629
|
-
const t =
|
|
6629
|
+
const t = Eu(e), r = Ui(t);
|
|
6630
6630
|
if (r) {
|
|
6631
6631
|
const n = $g(t, r);
|
|
6632
6632
|
return n ? {
|
|
@@ -6653,7 +6653,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6653
6653
|
}, Wg = ws, zg = () => {
|
|
6654
6654
|
const e = /* @__PURE__ */ new WeakMap();
|
|
6655
6655
|
return (t) => {
|
|
6656
|
-
const r =
|
|
6656
|
+
const r = Eu(t), n = Ui(r);
|
|
6657
6657
|
if (!r || !n) return ws(t);
|
|
6658
6658
|
if (e.has(r)) return e.get(r) ?? null;
|
|
6659
6659
|
const i = ws(t);
|
|
@@ -6706,7 +6706,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6706
6706
|
type: "element",
|
|
6707
6707
|
quality: "region",
|
|
6708
6708
|
element: e.regionElement
|
|
6709
|
-
} : null,
|
|
6709
|
+
} : null, xl = (e, t = e.chunk.mathAlignments) => {
|
|
6710
6710
|
if (t.length !== 1) return null;
|
|
6711
6711
|
const r = t[0]?.alignment.result.fallbackTarget;
|
|
6712
6712
|
return r ? e.renderedMathTargetResolver(r) : null;
|
|
@@ -6716,7 +6716,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6716
6716
|
} catch {
|
|
6717
6717
|
return !1;
|
|
6718
6718
|
}
|
|
6719
|
-
}) : t.mathAlignments,
|
|
6719
|
+
}) : t.mathAlignments, El = () => ({
|
|
6720
6720
|
activeTarget: null,
|
|
6721
6721
|
regionTarget: null,
|
|
6722
6722
|
quality: "region",
|
|
@@ -6738,11 +6738,11 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6738
6738
|
chunks: e.chunks,
|
|
6739
6739
|
resolveInitial(n) {
|
|
6740
6740
|
const i = r.get(n);
|
|
6741
|
-
if (!i) return
|
|
6741
|
+
if (!i) return El();
|
|
6742
6742
|
const o = i.chunk.mathAlignments, s = o.length === 1 ? o[0].element : null, a = s ? i.mathCapabilityByElement.get(s) : null;
|
|
6743
6743
|
return Ir(a === "expression" ? {
|
|
6744
6744
|
semanticTarget: null,
|
|
6745
|
-
expressionTarget:
|
|
6745
|
+
expressionTarget: xl(i),
|
|
6746
6746
|
regionTarget: i.regionTarget,
|
|
6747
6747
|
confidence: 0.5,
|
|
6748
6748
|
reason: "initial expression (sticky expression mode)"
|
|
@@ -6756,7 +6756,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6756
6756
|
},
|
|
6757
6757
|
resolveBoundary(n) {
|
|
6758
6758
|
const i = r.get(n.chunkId);
|
|
6759
|
-
if (!i) return
|
|
6759
|
+
if (!i) return El();
|
|
6760
6760
|
const { chunk: o } = i, s = Lg(o, n), a = Bg(o, s), l = Dg(a, o), f = (!a || l.length > 0 ? Hg(o, s, n, l, i.renderedMathTargetResolver) : null) || null, d = t && f && f.quality !== "expression" ? f : null, p = f && f.quality === "expression" ? f : null;
|
|
6761
6761
|
if (d) {
|
|
6762
6762
|
const v = Al(l);
|
|
@@ -6787,7 +6787,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6787
6787
|
}
|
|
6788
6788
|
return Ir({
|
|
6789
6789
|
semanticTarget: null,
|
|
6790
|
-
expressionTarget: p ??
|
|
6790
|
+
expressionTarget: p ?? xl(i, l),
|
|
6791
6791
|
regionTarget: i.regionTarget,
|
|
6792
6792
|
confidence: s.confidence,
|
|
6793
6793
|
reason: s.reason
|
|
@@ -6841,7 +6841,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6841
6841
|
}
|
|
6842
6842
|
return n;
|
|
6843
6843
|
}, Zg = async (e) => {
|
|
6844
|
-
const t = bn(e.contentRoot, e.textProcessingOptions), r = await
|
|
6844
|
+
const t = bn(e.contentRoot, e.textProcessingOptions), r = await Eg({
|
|
6845
6845
|
chunks: t.chunks,
|
|
6846
6846
|
visibleText: t.visibleText,
|
|
6847
6847
|
language: e.language,
|
|
@@ -6929,7 +6929,7 @@ var gv = /* @__PURE__ */ new Set([
|
|
|
6929
6929
|
})(re || (re = {}));
|
|
6930
6930
|
var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, im = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Pu(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, om = class Ts {
|
|
6931
6931
|
constructor() {
|
|
6932
|
-
|
|
6932
|
+
E(this, "currentProvider", null), E(this, "provider", null), E(this, "highlightCoordinator", null), E(this, "highlightTargetResolverProvider", null), E(this, "catalogResolver", null), E(this, "state", re.IDLE), E(this, "ttsConfig", {}), E(this, "currentText", null), E(this, "currentContentElement", null), E(this, "normalizedToDOM", /* @__PURE__ */ new Map()), E(this, "listeners", /* @__PURE__ */ new Map()), E(this, "lastError", null), E(this, "speakRunId", 0), E(this, "currentBoundaryOffset", 0), E(this, "activeWordBoundaryOffset", 0), E(this, "seekSegments", []), E(this, "playbackChunks", []), E(this, "sentenceHighlightSegments", []), E(this, "currentSeekSegmentIndex", 0), E(this, "activeSentenceStartOffset", null), E(this, "activeHighlightMode", "word"), E(this, "lastRenderedRegionTarget", null), E(this, "telemetryReporter", null), E(this, "generatedMathSpeechResolver", Og());
|
|
6933
6933
|
}
|
|
6934
6934
|
debugLog(t, r) {
|
|
6935
6935
|
Ts.debugEnabled && (r === void 0 ? console.debug(t) : console.debug(t, r));
|
|
@@ -7304,6 +7304,17 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7304
7304
|
const n = t.playbackSegments.map((i) => i.startOffset).filter((i) => i > 0);
|
|
7305
7305
|
return this.splitSegmentsAtBoundaries(r, n, t.contentToSpeak);
|
|
7306
7306
|
}
|
|
7307
|
+
createSeekSegmentsFromSpeechChunks(t) {
|
|
7308
|
+
let r = 0;
|
|
7309
|
+
return t.map((n) => {
|
|
7310
|
+
const i = le(n.plainFallback?.speechText || (this.hasExplicitBreakSemantics(n.speechText) ? n.visibleText : n.speechText) || n.visibleText) || n.visibleText || "", o = {
|
|
7311
|
+
text: i,
|
|
7312
|
+
startOffset: r,
|
|
7313
|
+
pauseMsAfter: 0
|
|
7314
|
+
};
|
|
7315
|
+
return r += Math.max(1, i.length + 1), o;
|
|
7316
|
+
});
|
|
7317
|
+
}
|
|
7307
7318
|
getCurrentSeekSegmentIndex() {
|
|
7308
7319
|
if (this.seekSegments.length === 0) return 0;
|
|
7309
7320
|
let t = 0;
|
|
@@ -7403,7 +7414,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7403
7414
|
const y = r?.highlightModeOverride || (p ? this.resolveHighlightMode() : "sentence");
|
|
7404
7415
|
this.activeHighlightMode = y, this.activeWordBoundaryOffset = r?.wordBoundaryOffset || 0;
|
|
7405
7416
|
const T = this.hasExplicitBreakSemantics(o), S = !!this.currentContentElement && !f && !T && p;
|
|
7406
|
-
if (this.seekSegments = T || !p ? [] : S && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = T ? [] : this.createSentenceHighlightSegments({
|
|
7417
|
+
if (this.playbackChunks = v?.length ? v : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : T || !p ? [] : S && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = T ? [] : this.createSentenceHighlightSegments({
|
|
7407
7418
|
contentToSpeak: a,
|
|
7408
7419
|
shouldUsePlan: S,
|
|
7409
7420
|
playbackSegments: this.seekSegments
|
|
@@ -7482,7 +7493,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7482
7493
|
}, "updateSettings" in this.provider && typeof this.provider.updateSettings == "function" && await this.provider.updateSettings({ providerOptions: o });
|
|
7483
7494
|
}
|
|
7484
7495
|
async resolveSpeechContent(t, r) {
|
|
7485
|
-
const n =
|
|
7496
|
+
const n = le(t);
|
|
7486
7497
|
if (r?.ignoreCatalogs) return {
|
|
7487
7498
|
contentToSpeak: n,
|
|
7488
7499
|
speechText: n,
|
|
@@ -7502,7 +7513,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7502
7513
|
context: r.catalogContext
|
|
7503
7514
|
});
|
|
7504
7515
|
if (o) {
|
|
7505
|
-
const s = r?.contentElement && bn(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a =
|
|
7516
|
+
const s = r?.contentElement && bn(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a = le(o.content);
|
|
7506
7517
|
return this.debugLog(`[TTSService] Using catalog content for "${r.catalogId}" (${o.language})`), {
|
|
7507
7518
|
contentToSpeak: o.content,
|
|
7508
7519
|
speechText: o.content,
|
|
@@ -7536,7 +7547,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7536
7547
|
if (!this.catalogResolver) return null;
|
|
7537
7548
|
const i = this.collectCatalogSpeechChunks(t, n);
|
|
7538
7549
|
if (!i.some((a) => a.sourceElement)) return null;
|
|
7539
|
-
const o =
|
|
7550
|
+
const o = le(i.map((a) => a.speechText).join(" ")), s = bn(t, this.getTextProcessingOptions(n.language)).visibleText || r;
|
|
7540
7551
|
return {
|
|
7541
7552
|
contentToSpeak: o,
|
|
7542
7553
|
speechText: o,
|
|
@@ -7554,7 +7565,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7554
7565
|
const n = [];
|
|
7555
7566
|
let i = "";
|
|
7556
7567
|
const o = () => {
|
|
7557
|
-
const d =
|
|
7568
|
+
const d = le(i);
|
|
7558
7569
|
i = "", d && n.push({
|
|
7559
7570
|
speechText: d,
|
|
7560
7571
|
visibleText: d,
|
|
@@ -7572,7 +7583,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7572
7583
|
}, a = (d, p) => {
|
|
7573
7584
|
const v = l(d);
|
|
7574
7585
|
if (v.length !== 1) return null;
|
|
7575
|
-
const y = v[0], T = bn(y, this.getTextProcessingOptions(r.language)).visibleText ||
|
|
7586
|
+
const y = v[0], T = bn(y, this.getTextProcessingOptions(r.language)).visibleText || le(y.textContent || ""), S = (w) => le(w).replace(/\s+/g, "");
|
|
7576
7587
|
return S(T) === S(p) ? y : null;
|
|
7577
7588
|
}, l = (d) => {
|
|
7578
7589
|
const p = Array.from(d.querySelectorAll("math"));
|
|
@@ -7587,19 +7598,19 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7587
7598
|
const p = d, v = s(p);
|
|
7588
7599
|
if (v) {
|
|
7589
7600
|
o();
|
|
7590
|
-
const y = bn(p, this.getTextProcessingOptions(r.language)), T = y.visibleText ||
|
|
7601
|
+
const y = bn(p, this.getTextProcessingOptions(r.language)), T = y.visibleText || le(p.textContent || ""), S = lu({
|
|
7591
7602
|
speechText: v.content,
|
|
7592
7603
|
visibleText: T
|
|
7593
|
-
}), w = a(p, T),
|
|
7604
|
+
}), w = a(p, T), x = w ? Oi({
|
|
7594
7605
|
mathElement: w,
|
|
7595
7606
|
speechText: v.content
|
|
7596
|
-
}) : void 0, R =
|
|
7607
|
+
}) : void 0, R = x ? void 0 : l(p).map((M) => ({
|
|
7597
7608
|
element: M,
|
|
7598
7609
|
alignment: Oi({
|
|
7599
7610
|
mathElement: M,
|
|
7600
7611
|
speechText: v.content
|
|
7601
7612
|
})
|
|
7602
|
-
})), Z =
|
|
7613
|
+
})), Z = le(v.content);
|
|
7603
7614
|
n.push({
|
|
7604
7615
|
speechText: v.content,
|
|
7605
7616
|
visibleText: T,
|
|
@@ -7608,7 +7619,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7608
7619
|
speechMatchesVisibleText: Z === T,
|
|
7609
7620
|
playbackMode: S.playbackMode,
|
|
7610
7621
|
alignment: S,
|
|
7611
|
-
mathAlignment:
|
|
7622
|
+
mathAlignment: x,
|
|
7612
7623
|
mathAlignments: R,
|
|
7613
7624
|
visibleMap: y.map
|
|
7614
7625
|
});
|
|
@@ -7662,7 +7673,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7662
7673
|
});
|
|
7663
7674
|
}
|
|
7664
7675
|
initializeSpeakTracking(t, r) {
|
|
7665
|
-
this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7676
|
+
this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.playbackChunks = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7666
7677
|
}
|
|
7667
7678
|
prepareHighlightsForSpeak(t) {
|
|
7668
7679
|
if (!this.currentContentElement || !this.highlightCoordinator || (this.buildPositionMap(this.currentContentElement, t.contentToSpeak, t.options?.language), t.highlightMode === "sentence" && t.shouldUsePlan)) return;
|
|
@@ -7807,9 +7818,13 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7807
7818
|
}
|
|
7808
7819
|
async executeSpeakPlayback(t) {
|
|
7809
7820
|
if (t.speechChunks?.length && this.provider) {
|
|
7810
|
-
for (
|
|
7821
|
+
for (let r = 0; r < t.speechChunks.length; r++) {
|
|
7811
7822
|
if (t.runId !== this.speakRunId) return;
|
|
7812
|
-
|
|
7823
|
+
this.currentSeekSegmentIndex = r;
|
|
7824
|
+
const n = this.seekSegments[r];
|
|
7825
|
+
n && (this.currentBoundaryOffset = n.startOffset);
|
|
7826
|
+
const i = t.speechChunks[r];
|
|
7827
|
+
await this.speakCatalogChunk(i, t.runId);
|
|
7813
7828
|
}
|
|
7814
7829
|
return;
|
|
7815
7830
|
}
|
|
@@ -7821,7 +7836,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7821
7836
|
this.provider && await this.provider.speak(t.contentToSpeak);
|
|
7822
7837
|
}
|
|
7823
7838
|
clearHighlightsAndTracking() {
|
|
7824
|
-
this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7839
|
+
this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7825
7840
|
}
|
|
7826
7841
|
async speakRange(t, r) {
|
|
7827
7842
|
if (!this.provider) throw new Error("TTS service not initialized");
|
|
@@ -7835,7 +7850,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7835
7850
|
if (!i) return;
|
|
7836
7851
|
const o = document.createRange();
|
|
7837
7852
|
o.selectNodeContents(i), o.setEnd(t.startContainer, t.startOffset);
|
|
7838
|
-
const s = o.toString(), a =
|
|
7853
|
+
const s = o.toString(), a = le(s), l = a.length + (/\s$/.test(s) && a ? 1 : 0);
|
|
7839
7854
|
this.debugLog("[TTSService] speakRange offset calculation:", {
|
|
7840
7855
|
selectedText: n,
|
|
7841
7856
|
textBeforeRange: s.substring(0, 100),
|
|
@@ -7858,19 +7873,27 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7858
7873
|
}
|
|
7859
7874
|
async restartFromSeekIndex(t) {
|
|
7860
7875
|
if (!this.provider || this.seekSegments.length === 0) return;
|
|
7861
|
-
const r = Math.max(0, Math.min(this.seekSegments.length - 1, t));
|
|
7876
|
+
const r = Math.max(0, Math.min(this.seekSegments.length - 1, t)), n = this.playbackChunks.length ? this.playbackChunks.slice(r) : null;
|
|
7862
7877
|
this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = r;
|
|
7863
|
-
const
|
|
7878
|
+
const i = ++this.speakRunId, o = this.seekSegments.slice(r);
|
|
7864
7879
|
this.setState(re.PLAYING);
|
|
7865
7880
|
try {
|
|
7866
7881
|
if (this.configureWordBoundaryHighlighting({
|
|
7867
7882
|
highlightMode: this.activeHighlightMode,
|
|
7868
7883
|
wordBoundaryOffset: this.activeWordBoundaryOffset
|
|
7869
|
-
}),
|
|
7884
|
+
}), n) for (let s = 0; s < n.length; s++) {
|
|
7885
|
+
if (i !== this.speakRunId) return;
|
|
7886
|
+
const a = r + s;
|
|
7887
|
+
this.currentSeekSegmentIndex = a;
|
|
7888
|
+
const l = this.seekSegments[a];
|
|
7889
|
+
l && (this.currentBoundaryOffset = l.startOffset), await this.speakCatalogChunk(n[s], i);
|
|
7890
|
+
}
|
|
7891
|
+
else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
|
|
7892
|
+
if (i !== this.speakRunId) return;
|
|
7870
7893
|
this.setState(re.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
|
|
7871
|
-
} catch (
|
|
7872
|
-
if (
|
|
7873
|
-
throw this.lastError =
|
|
7894
|
+
} catch (s) {
|
|
7895
|
+
if (i !== this.speakRunId) return;
|
|
7896
|
+
throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(re.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
|
|
7874
7897
|
}
|
|
7875
7898
|
}
|
|
7876
7899
|
async setPlaybackRate(t) {
|
|
@@ -7893,7 +7916,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7893
7916
|
await this.seekBy(-r);
|
|
7894
7917
|
}
|
|
7895
7918
|
stop() {
|
|
7896
|
-
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(re.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7919
|
+
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(re.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7897
7920
|
}
|
|
7898
7921
|
requestControlHandoff() {
|
|
7899
7922
|
typeof window > "u" || window.dispatchEvent(new CustomEvent(nm, { detail: { source: "host" } }));
|
|
@@ -7967,7 +7990,7 @@ var Pu = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7967
7990
|
});
|
|
7968
7991
|
}
|
|
7969
7992
|
};
|
|
7970
|
-
|
|
7993
|
+
E(om, "debugEnabled", (() => {
|
|
7971
7994
|
try {
|
|
7972
7995
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7973
7996
|
} catch {
|
|
@@ -7997,7 +8020,7 @@ var zm = lp({
|
|
|
7997
8020
|
function wm(e, t) {
|
|
7998
8021
|
zl(t, !0), zh(e, _m);
|
|
7999
8022
|
const r = Ih(), n = "/api/tts", i = "pie:section-player-tools:tts-settings";
|
|
8000
|
-
let o = hn(t, "toolkitCoordinator", 7, null), s = hn(t, "apiEndpoint", 7, "/api/tts"), a = hn(t, "storageKey", 7, i), l = hn(t, "adapters", 23, () => ({})), f = hn(t, "customProviders", 23, () => []), d = /* @__PURE__ */ W("browser"), p = /* @__PURE__ */ W(null), v = /* @__PURE__ */ W(null), y = /* @__PURE__ */ W(!1), T = /* @__PURE__ */ W(!1), S = /* @__PURE__ */ W(null), w = /* @__PURE__ */ W(null),
|
|
8023
|
+
let o = hn(t, "toolkitCoordinator", 7, null), s = hn(t, "apiEndpoint", 7, "/api/tts"), a = hn(t, "storageKey", 7, i), l = hn(t, "adapters", 23, () => ({})), f = hn(t, "customProviders", 23, () => []), d = /* @__PURE__ */ W("browser"), p = /* @__PURE__ */ W(null), v = /* @__PURE__ */ W(null), y = /* @__PURE__ */ W(!1), T = /* @__PURE__ */ W(!1), S = /* @__PURE__ */ W(null), w = /* @__PURE__ */ W(null), x = /* @__PURE__ */ W("plain"), R = /* @__PURE__ */ W(""), Z = /* @__PURE__ */ W(null), M = /* @__PURE__ */ W(-1), z = /* @__PURE__ */ W(0), U = /* @__PURE__ */ W(He({})), ne = /* @__PURE__ */ W(He({})), K = /* @__PURE__ */ W(He({})), be = /* @__PURE__ */ W(""), ae = /* @__PURE__ */ W(1), Yr = /* @__PURE__ */ W(1), Ve = /* @__PURE__ */ W("left-aligned"), ht = /* @__PURE__ */ W(""), Xr = /* @__PURE__ */ W(void 0), Nn = /* @__PURE__ */ W(""), pt = /* @__PURE__ */ W(!0), jt = /* @__PURE__ */ W(""), It = /* @__PURE__ */ W("en-US"), Jr = /* @__PURE__ */ W(""), nt = /* @__PURE__ */ W("neural"), Tr = /* @__PURE__ */ W(24e3), Sr = /* @__PURE__ */ W("mp3"), Qr = /* @__PURE__ */ W("word"), vt = /* @__PURE__ */ W(""), qi = /* @__PURE__ */ W(1), Vt = /* @__PURE__ */ W(""), Pt = /* @__PURE__ */ W("en-US"), Ut = /* @__PURE__ */ W(""), qt = /* @__PURE__ */ W("wavenet"), gt = /* @__PURE__ */ W(""), Gi = /* @__PURE__ */ W(1), mt = /* @__PURE__ */ W(He({
|
|
8001
8024
|
checked: !1,
|
|
8002
8025
|
loading: !1,
|
|
8003
8026
|
available: !1,
|
|
@@ -8018,7 +8041,7 @@ function wm(e, t) {
|
|
|
8018
8041
|
message: null,
|
|
8019
8042
|
detail: null,
|
|
8020
8043
|
voices: []
|
|
8021
|
-
})), bt = null, kr = null, Ki = null, ge = null, Wn = 0, Yi = /* @__PURE__ */ W(null), zn = /* @__PURE__ */ W(null), Hn = /* @__PURE__ */ W(null),
|
|
8044
|
+
})), bt = null, kr = null, Ki = null, ge = null, Wn = 0, Yi = /* @__PURE__ */ W(null), zn = /* @__PURE__ */ W(null), Hn = /* @__PURE__ */ W(null), xr = null;
|
|
8022
8045
|
function Ru(c, h = {}) {
|
|
8023
8046
|
const m = () => Array.from(c.querySelectorAll("button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])")).filter(($) => $.offsetParent !== null || $.getClientRects().length > 0), b = document.activeElement, k = ($) => {
|
|
8024
8047
|
if ($.key === "Escape") {
|
|
@@ -8063,7 +8086,7 @@ function wm(e, t) {
|
|
|
8063
8086
|
console.debug(`${Bn} ${c}`);
|
|
8064
8087
|
}
|
|
8065
8088
|
}
|
|
8066
|
-
function
|
|
8089
|
+
function Er(c, h) {
|
|
8067
8090
|
if (!(typeof console > "u")) {
|
|
8068
8091
|
if (h) {
|
|
8069
8092
|
console.info(`${Bn} browser:${c}`, h);
|
|
@@ -8626,10 +8649,10 @@ function wm(e, t) {
|
|
|
8626
8649
|
function Un() {
|
|
8627
8650
|
if (!_t(u(d))) {
|
|
8628
8651
|
const c = `This is a ${u(Oe)?.label || "custom"} TTS provider sample.`;
|
|
8629
|
-
u(
|
|
8652
|
+
u(x) === "ssml" ? _(R, `<speak>${c}</speak>`) : _(R, c);
|
|
8630
8653
|
return;
|
|
8631
8654
|
}
|
|
8632
|
-
if (u(
|
|
8655
|
+
if (u(x) === "ssml") {
|
|
8633
8656
|
if (u(d) === "browser") {
|
|
8634
8657
|
_(R, qs.browser, !0);
|
|
8635
8658
|
return;
|
|
@@ -8640,7 +8663,7 @@ function wm(e, t) {
|
|
|
8640
8663
|
_(R, qs[u(d)], !0);
|
|
8641
8664
|
}
|
|
8642
8665
|
function oa(c) {
|
|
8643
|
-
u(
|
|
8666
|
+
u(x) !== c && (nn(), _(x, c, !0), _(S, null), _(Z, null), Un());
|
|
8644
8667
|
}
|
|
8645
8668
|
function sa(c, h) {
|
|
8646
8669
|
ge !== null && window.clearInterval(ge);
|
|
@@ -8671,7 +8694,7 @@ function wm(e, t) {
|
|
|
8671
8694
|
}, 40);
|
|
8672
8695
|
}
|
|
8673
8696
|
function nn() {
|
|
8674
|
-
lo(), _(S, null), _(Z, null), Ki?.(), Ki = null, kr && typeof window < "u" && "speechSynthesis" in window && (
|
|
8697
|
+
lo(), _(S, null), _(Z, null), Ki?.(), Ki = null, kr && typeof window < "u" && "speechSynthesis" in window && (Er("cancel"), window.speechSynthesis.cancel()), kr = null, bt && (bt.pause(), bt.src = "", bt = null), _(T, !1), _(w, null);
|
|
8675
8698
|
}
|
|
8676
8699
|
function ud(c, h) {
|
|
8677
8700
|
if (c.length === 0) return c;
|
|
@@ -8746,7 +8769,7 @@ function wm(e, t) {
|
|
|
8746
8769
|
}), bt = null;
|
|
8747
8770
|
}
|
|
8748
8771
|
async function aa(c) {
|
|
8749
|
-
const h = Lt(u(c === "polly" ? jt : Vt), it()), m = !(c === "google" && u(
|
|
8772
|
+
const h = Lt(u(c === "polly" ? jt : Vt), it()), m = !(c === "google" && u(x) === "ssml"), b = {
|
|
8750
8773
|
text: u(R).trim() || ia(c),
|
|
8751
8774
|
provider: c,
|
|
8752
8775
|
rate: Ar(u(c === "polly" ? qi : Gi)),
|
|
@@ -8784,13 +8807,13 @@ function wm(e, t) {
|
|
|
8784
8807
|
}
|
|
8785
8808
|
async function hd() {
|
|
8786
8809
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("Browser speech synthesis is unavailable.");
|
|
8787
|
-
if (u(
|
|
8810
|
+
if (u(x) === "ssml") throw new Error("SSML preview is not supported in the Browser backend.");
|
|
8788
8811
|
const c = window.speechSynthesis, h = new SpeechSynthesisUtterance(u(R).trim() || ia("browser"));
|
|
8789
8812
|
kr = h, Ki = null, h.rate = Ar(u(ae)), h.pitch = ro(u(Yr));
|
|
8790
8813
|
const m = c.getVoices(), b = Wu(m, u(be) || void 0);
|
|
8791
8814
|
b && zu(b) && (h.voice = b);
|
|
8792
8815
|
const k = ld(u(R));
|
|
8793
|
-
|
|
8816
|
+
Er("prepare", {
|
|
8794
8817
|
textLength: h.text.length,
|
|
8795
8818
|
rate: h.rate,
|
|
8796
8819
|
pitch: h.pitch,
|
|
@@ -8804,7 +8827,7 @@ function wm(e, t) {
|
|
|
8804
8827
|
L || (L = !0, kr === h && (kr = null), P());
|
|
8805
8828
|
};
|
|
8806
8829
|
h.onstart = () => {
|
|
8807
|
-
|
|
8830
|
+
Er("start");
|
|
8808
8831
|
const P = k[0];
|
|
8809
8832
|
P && (_(M, P.start, !0), _(z, Math.max(1, P.end - P.start), !0));
|
|
8810
8833
|
}, h.onboundary = (P) => {
|
|
@@ -8812,15 +8835,15 @@ function wm(e, t) {
|
|
|
8812
8835
|
const N = Number(P.charIndex || 0), B = k.find((ie) => N >= ie.start && N < ie.end);
|
|
8813
8836
|
B && (_(M, B.start, !0), _(z, Math.max(1, B.end - B.start), !0));
|
|
8814
8837
|
}, h.onend = () => {
|
|
8815
|
-
|
|
8838
|
+
Er("end"), V($);
|
|
8816
8839
|
}, h.onerror = (P) => {
|
|
8817
8840
|
const N = String(P?.error || "");
|
|
8818
|
-
if (
|
|
8841
|
+
if (Er("error", { error: N || "unknown" }), N === "interrupted" || N === "canceled") {
|
|
8819
8842
|
V($);
|
|
8820
8843
|
return;
|
|
8821
8844
|
}
|
|
8822
8845
|
V(() => I(/* @__PURE__ */ new Error("Failed to play browser voice preview.")));
|
|
8823
|
-
},
|
|
8846
|
+
}, Er("speak"), c.speak(h);
|
|
8824
8847
|
});
|
|
8825
8848
|
}
|
|
8826
8849
|
async function la() {
|
|
@@ -8836,7 +8859,7 @@ function wm(e, t) {
|
|
|
8836
8859
|
_(S, "Enter preview text before starting playback.");
|
|
8837
8860
|
return;
|
|
8838
8861
|
}
|
|
8839
|
-
if (u(d) === "browser" && u(
|
|
8862
|
+
if (u(d) === "browser" && u(x) === "ssml") {
|
|
8840
8863
|
_(S, "SSML preview is not supported in the Browser backend.");
|
|
8841
8864
|
return;
|
|
8842
8865
|
}
|
|
@@ -8845,11 +8868,11 @@ function wm(e, t) {
|
|
|
8845
8868
|
_(T, !0), _(w, u(d), !0);
|
|
8846
8869
|
try {
|
|
8847
8870
|
if (_t(u(d)))
|
|
8848
|
-
u(d) === "browser" ? await hd() : u(d) === "polly" ? (u(
|
|
8871
|
+
u(d) === "browser" ? await hd() : u(d) === "polly" ? (u(x) === "ssml" && _(Z, "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails."), await aa("polly")) : (u(x) === "ssml" && _(Z, "Google SSML preview preserves authored SSML, so word tracking is disabled."), await aa("google"));
|
|
8849
8872
|
else {
|
|
8850
8873
|
const h = to(u(d)), m = await h.preview?.(eo(h.id, {
|
|
8851
8874
|
previewText: u(R),
|
|
8852
|
-
previewMode: u(
|
|
8875
|
+
previewMode: u(x)
|
|
8853
8876
|
})), b = m || null;
|
|
8854
8877
|
if (b?.audioUrl && typeof b.audioUrl == "string") {
|
|
8855
8878
|
const k = Array.isArray(b.speechMarks) ? b.speechMarks : [], $ = typeof b.trackingText == "string" ? b.trackingText : null;
|
|
@@ -8973,13 +8996,13 @@ function wm(e, t) {
|
|
|
8973
8996
|
td(), ea(), oo();
|
|
8974
8997
|
}), si(() => {
|
|
8975
8998
|
if (u(zn))
|
|
8976
|
-
return
|
|
8999
|
+
return xr?.(), xr = Ru(u(zn), {
|
|
8977
9000
|
initialFocus: u(Hn),
|
|
8978
9001
|
onEscape: Dn
|
|
8979
9002
|
}), queueMicrotask(() => {
|
|
8980
9003
|
u(Hn)?.focus?.();
|
|
8981
9004
|
}), () => {
|
|
8982
|
-
|
|
9005
|
+
xr?.(), xr = null;
|
|
8983
9006
|
};
|
|
8984
9007
|
}), si(() => {
|
|
8985
9008
|
u(tn), Dt(() => {
|
|
@@ -8998,7 +9021,7 @@ function wm(e, t) {
|
|
|
8998
9021
|
h.removeEventListener("availability", m), h.removeEventListener("apply-request", b), h.removeEventListener("preview-request", k);
|
|
8999
9022
|
};
|
|
9000
9023
|
}), Ch(() => {
|
|
9001
|
-
|
|
9024
|
+
xr?.(), xr = null, nn();
|
|
9002
9025
|
});
|
|
9003
9026
|
var pd = {
|
|
9004
9027
|
get toolkitCoordinator() {
|
|
@@ -9083,7 +9106,7 @@ function wm(e, t) {
|
|
|
9083
9106
|
Ie(ya, (c) => {
|
|
9084
9107
|
u(kd) && c(Sd);
|
|
9085
9108
|
});
|
|
9086
|
-
var ba = A(ya, 2),
|
|
9109
|
+
var ba = A(ya, 2), xd = (c) => {
|
|
9087
9110
|
var h = dm(), m = O(h), b = A(O(m), 2), k = O(b);
|
|
9088
9111
|
k.value = k.__value = "";
|
|
9089
9112
|
var $ = A(k), I = (H) => {
|
|
@@ -9092,8 +9115,8 @@ function wm(e, t) {
|
|
|
9092
9115
|
var fe = ni(), qe = O(fe, !0);
|
|
9093
9116
|
C(fe);
|
|
9094
9117
|
var Ge = {};
|
|
9095
|
-
he(($t,
|
|
9096
|
-
pe(qe, $t), Ge !== (Ge =
|
|
9118
|
+
he(($t, ue) => {
|
|
9119
|
+
pe(qe, $t), Ge !== (Ge = ue) && (fe.value = (fe.__value = ue) ?? "");
|
|
9097
9120
|
}, [() => Ji(u(Ae)), () => en(u(Ae))]), ee(oe, fe);
|
|
9098
9121
|
}), C(te), ee(H, te);
|
|
9099
9122
|
};
|
|
@@ -9106,8 +9129,8 @@ function wm(e, t) {
|
|
|
9106
9129
|
var fe = ni(), qe = O(fe, !0);
|
|
9107
9130
|
C(fe);
|
|
9108
9131
|
var Ge = {};
|
|
9109
|
-
he(($t,
|
|
9110
|
-
pe(qe, $t), Ge !== (Ge =
|
|
9132
|
+
he(($t, ue) => {
|
|
9133
|
+
pe(qe, $t), Ge !== (Ge = ue) && (fe.value = (fe.__value = ue) ?? "");
|
|
9111
9134
|
}, [() => Ji(u(Ae)), () => en(u(Ae))]), ee(oe, fe);
|
|
9112
9135
|
}), C(te), ee(H, te);
|
|
9113
9136
|
};
|
|
@@ -9127,7 +9150,7 @@ function wm(e, t) {
|
|
|
9127
9150
|
Ie(N, (H) => {
|
|
9128
9151
|
u(be) ? H(B) : u(Ks) ? H(ie, 1) : H(Q, -1);
|
|
9129
9152
|
}), C(P), C(m), C(h), he(() => h.disabled = !u(mt).available), Je(b, () => u(be), (H) => _(be, H)), ee(c, h);
|
|
9130
|
-
},
|
|
9153
|
+
}, Ed = (c) => {
|
|
9131
9154
|
var h = fm(), m = O(h), b = A(O(m), 2);
|
|
9132
9155
|
Qt(b), C(m);
|
|
9133
9156
|
var k = A(m, 2), $ = O(k), I = A(O($), 2);
|
|
@@ -9155,13 +9178,13 @@ function wm(e, t) {
|
|
|
9155
9178
|
pe(Fd, `${(u(Gt).name || u(Gt).id) ?? ""} (${(u(Gt).languageCode || "n/a") ?? ""})`), $a !== ($a = u(Gt).id || u(Gt).name || "") && (ln.value = (ln.__value = u(Gt).id || u(Gt).name || "") ?? "");
|
|
9156
9179
|
}), ee(_e, ln);
|
|
9157
9180
|
}), C(fe), C(Ae);
|
|
9158
|
-
var $t = A(Ae, 2),
|
|
9181
|
+
var $t = A(Ae, 2), ue = O($t), Ke = A(O(ue), 2), wt = O(Ke);
|
|
9159
9182
|
wt.value = wt.__value = "mp3";
|
|
9160
9183
|
var sn = A(wt);
|
|
9161
9184
|
sn.value = sn.__value = "ogg";
|
|
9162
9185
|
var an = A(sn);
|
|
9163
|
-
an.value = an.__value = "pcm", C(Ke), C(
|
|
9164
|
-
var Ao = A(
|
|
9186
|
+
an.value = an.__value = "pcm", C(Ke), C(ue);
|
|
9187
|
+
var Ao = A(ue, 2), Mo = A(O(Ao), 2), Co = O(Mo);
|
|
9165
9188
|
Co.value = Co.__value = 8e3;
|
|
9166
9189
|
var Oo = A(Co);
|
|
9167
9190
|
Oo.value = Oo.__value = 16e3;
|
|
@@ -9195,14 +9218,14 @@ function wm(e, t) {
|
|
|
9195
9218
|
var fe = A(k, 2), qe = A(O(fe), 2), Ge = O(qe);
|
|
9196
9219
|
Ge.value = Ge.__value = "";
|
|
9197
9220
|
var $t = A(Ge);
|
|
9198
|
-
Cr($t, 17, () => u(yt).voices, Mr, (
|
|
9221
|
+
Cr($t, 17, () => u(yt).voices, Mr, (ue, Ke) => {
|
|
9199
9222
|
var wt = ni(), sn = O(wt);
|
|
9200
9223
|
C(wt);
|
|
9201
9224
|
var an = {};
|
|
9202
9225
|
he(() => {
|
|
9203
9226
|
pe(sn, `${(u(Ke).name || u(Ke).id) ?? ""} (${(u(Ke).languageCode || "n/a") ?? ""})`), an !== (an = u(Ke).id || u(Ke).name || "") && (wt.value = (wt.__value = u(Ke).id || u(Ke).name || "") ?? "");
|
|
9204
|
-
}), ee(
|
|
9205
|
-
}), C(qe), C(fe), C(h), he(() => h.disabled = !u(yt).available), Or(b, () => u(Vt), (
|
|
9227
|
+
}), ee(ue, wt);
|
|
9228
|
+
}), C(qe), C(fe), C(h), he(() => h.disabled = !u(yt).available), Or(b, () => u(Vt), (ue) => _(Vt, ue)), we("change", I, ao), Or(I, () => u(Pt), (ue) => _(Pt, ue)), we("change", V, ao), Je(V, () => u(Ut), (ue) => _(Ut, ue)), we("change", H, ao), Je(H, () => u(qt), (ue) => _(qt, ue)), Je(qe, () => u(gt), (ue) => _(gt, ue)), ee(c, h);
|
|
9206
9229
|
}, Md = (c) => {
|
|
9207
9230
|
var h = gm(), m = O(h), b = O(m), k = O(b, !0);
|
|
9208
9231
|
C(b);
|
|
@@ -9235,16 +9258,16 @@ function wm(e, t) {
|
|
|
9235
9258
|
}, [() => !Ue().available]), ee(c, h);
|
|
9236
9259
|
};
|
|
9237
9260
|
Ie(ba, (c) => {
|
|
9238
|
-
u(d) === "browser" ? c(
|
|
9261
|
+
u(d) === "browser" ? c(xd) : u(d) === "polly" ? c(Ed, 1) : u(d) === "google" ? c(Ad, 2) : u(Oe) && c(Md, 3);
|
|
9239
9262
|
});
|
|
9240
9263
|
var To = A(ba, 2), So = O(To), _a = A(O(So), 2), Kn = O(_a);
|
|
9241
9264
|
let wa;
|
|
9242
9265
|
var ko = A(Kn, 2);
|
|
9243
9266
|
let Ta;
|
|
9244
9267
|
C(_a), C(So);
|
|
9245
|
-
var
|
|
9246
|
-
Zf(
|
|
9247
|
-
var
|
|
9268
|
+
var xo = A(So, 4);
|
|
9269
|
+
Zf(xo);
|
|
9270
|
+
var Eo = A(xo, 2), Sa = O(Eo), ka = A(Sa, 2), Cd = O(ka), Od = (c) => {
|
|
9248
9271
|
var h = Yt("SSML is unsupported in Browser preview.");
|
|
9249
9272
|
ee(c, h);
|
|
9250
9273
|
}, Id = (c) => {
|
|
@@ -9258,25 +9281,25 @@ function wm(e, t) {
|
|
|
9258
9281
|
ee(c, h);
|
|
9259
9282
|
};
|
|
9260
9283
|
Ie(Cd, (c) => {
|
|
9261
|
-
u(d) === "browser" && u(
|
|
9262
|
-
}), C(ka), C(
|
|
9263
|
-
var
|
|
9264
|
-
Cr(
|
|
9284
|
+
u(d) === "browser" && u(x) === "ssml" ? c(Od) : u(d) === "google" && u(x) === "ssml" ? c(Id, 1) : u(Rd) ? c(Pd, 2) : c(Ld, -1);
|
|
9285
|
+
}), C(ka), C(Eo);
|
|
9286
|
+
var xa = A(Eo, 2);
|
|
9287
|
+
Cr(xa, 21, () => cd(u(R)), Mr, (c, h) => {
|
|
9265
9288
|
var m = Ml();
|
|
9266
9289
|
let b;
|
|
9267
9290
|
var k = O(m, !0);
|
|
9268
9291
|
C(m), he(() => {
|
|
9269
9292
|
b = $r(m, 1, "svelte-3sm1sy", null, b, { "pie-tts-preview-active": u(h).active }), pe(k, u(h).text);
|
|
9270
9293
|
}), ee(c, m);
|
|
9271
|
-
}), C(
|
|
9272
|
-
var
|
|
9294
|
+
}), C(xa), C(To);
|
|
9295
|
+
var Ea = A(To, 2), $d = (c) => {
|
|
9273
9296
|
var h = mm(), m = O(h), b = O(m, !0);
|
|
9274
9297
|
C(m), C(h), he(() => pe(b, u(p))), ee(c, h);
|
|
9275
9298
|
};
|
|
9276
|
-
Ie(
|
|
9299
|
+
Ie(Ea, (c) => {
|
|
9277
9300
|
u(p) && c($d);
|
|
9278
9301
|
});
|
|
9279
|
-
var Aa = A(
|
|
9302
|
+
var Aa = A(Ea, 2), Nd = (c) => {
|
|
9280
9303
|
var h = Cl(), m = O(h), b = O(m, !0);
|
|
9281
9304
|
C(m), C(h), he(() => pe(b, u(v))), ee(c, h);
|
|
9282
9305
|
};
|
|
@@ -9301,16 +9324,16 @@ function wm(e, t) {
|
|
|
9301
9324
|
C(on);
|
|
9302
9325
|
var Yn = A(on, 2), Bd = O(Yn, !0);
|
|
9303
9326
|
return C(Yn), C(Oa), C(co), jo(co, (c) => _(zn, c), () => u(zn)), C(qn), he((c, h) => {
|
|
9304
|
-
pe(vd, `Item header row reservation: ${u(rd) ? "Enabled" : "Disabled"}`), pe(md, u(pt) ? "Highlighting each part of a formula as it is read, falling back to the whole formula when alignment is uncertain." : "Highlighting each formula as a single block instead of breaking it into parts."), wa = $r(Kn, 1, "btn btn-xs join-item", null, wa, { "btn-active": u(
|
|
9327
|
+
pe(vd, `Item header row reservation: ${u(rd) ? "Enabled" : "Disabled"}`), pe(md, u(pt) ? "Highlighting each part of a formula as it is read, falling back to the whole formula when alignment is uncertain." : "Highlighting each formula as a single block instead of breaking it into parts."), wa = $r(Kn, 1, "btn btn-xs join-item", null, wa, { "btn-active": u(x) === "plain" }), dr(Kn, "aria-pressed", u(x) === "plain"), Ta = $r(ko, 1, "btn btn-xs join-item", null, Ta, { "btn-active": u(x) === "ssml" }), dr(ko, "aria-pressed", u(x) === "ssml"), on.disabled = c, pe(Hd, u(T) && u(w) === u(d) ? "Stop preview" : "Preview voice"), Yn.disabled = h, pe(Bd, u(y) ? "Applying..." : "Apply");
|
|
9305
9328
|
}, [() => !Ue().available || u(y) || !ad(), () => u(y) || !Ue().available]), we("click", ua, Dn), Je(Gn, () => u(Ve), (c) => _(Ve, c)), Or(yo, () => u(ht), (c) => _(ht, c)), we("click", gd, Du), Xh(bo, () => u(pt), (c) => _(pt, c)), we("click", Td, () => {
|
|
9306
9329
|
oo();
|
|
9307
|
-
}), we("click", Kn, () => oa("plain")), we("click", ko, () => oa("ssml")), Or(
|
|
9330
|
+
}), we("click", Kn, () => oa("plain")), we("click", ko, () => oa("ssml")), Or(xo, () => u(R), (c) => _(R, c)), we("click", Sa, Un), we("click", Ia, Dn), we("click", on, () => {
|
|
9308
9331
|
la();
|
|
9309
9332
|
}), we("click", Yn, () => {
|
|
9310
9333
|
ca();
|
|
9311
9334
|
}), ee(e, qn), Hl(pd);
|
|
9312
9335
|
}
|
|
9313
|
-
|
|
9336
|
+
Ec(["click", "change"]);
|
|
9314
9337
|
customElements.define("pie-section-player-tools-tts-settings", tp(wm, {
|
|
9315
9338
|
toolkitCoordinator: {
|
|
9316
9339
|
attribute: "toolkit-coordinator",
|