@pie-players/pie-tool-text-to-speech 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.
- package/dist/tool-text-to-speech.js +278 -255
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ if (typeof window < "u") {
|
|
|
19
19
|
((Yo = (Xo = window).__svelte ?? (Xo.__svelte = {})).v ?? (Yo.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Cn = {}, Q = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var Sc = Array.isArray, wc = Array.prototype.indexOf, $r = Array.prototype.includes,
|
|
22
|
+
var Sc = Array.isArray, wc = Array.prototype.indexOf, $r = Array.prototype.includes, kc = Array.from, zr = Object.keys, Dr = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, Ec = Object.getOwnPropertyDescriptors, xc = Object.prototype, Ac = Array.prototype, ia = Object.getPrototypeOf, Ko = Object.isExtensible, Cc = () => {
|
|
23
23
|
};
|
|
24
24
|
function Mc(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
@@ -86,7 +86,7 @@ function Yc() {
|
|
|
86
86
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
87
87
|
}
|
|
88
88
|
var D = !1;
|
|
89
|
-
function
|
|
89
|
+
function En(e) {
|
|
90
90
|
D = e;
|
|
91
91
|
}
|
|
92
92
|
var $;
|
|
@@ -217,11 +217,11 @@ function Ct(e, t) {
|
|
|
217
217
|
throw e;
|
|
218
218
|
}
|
|
219
219
|
var Qc = ~(Le | on | Me);
|
|
220
|
-
function
|
|
220
|
+
function V(e, t) {
|
|
221
221
|
e.f = e.f & Qc | t;
|
|
222
222
|
}
|
|
223
223
|
function _o(e) {
|
|
224
|
-
(e.f & 512) !== 0 || e.deps === null ?
|
|
224
|
+
(e.f & 512) !== 0 || e.deps === null ? V(e, Me) : V(e, on);
|
|
225
225
|
}
|
|
226
226
|
function ma(e) {
|
|
227
227
|
if (e !== null)
|
|
@@ -229,7 +229,7 @@ function ma(e) {
|
|
|
229
229
|
(t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= cr, ma(t.deps));
|
|
230
230
|
}
|
|
231
231
|
function va(e, t, n) {
|
|
232
|
-
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && n.add(e), ma(e.deps),
|
|
232
|
+
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && n.add(e), ma(e.deps), V(e, Me);
|
|
233
233
|
}
|
|
234
234
|
var eu = !1, yr = !1;
|
|
235
235
|
function tu(e) {
|
|
@@ -253,16 +253,16 @@ function O(e, t, n) {
|
|
|
253
253
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
254
254
|
throw new TypeError("Private element is not present on this object");
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function E(e, t, n) {
|
|
257
257
|
return e.set(O(e, t), n), n;
|
|
258
258
|
}
|
|
259
259
|
function h(e, t) {
|
|
260
260
|
return e.get(O(e, t));
|
|
261
261
|
}
|
|
262
262
|
var ba, Hr = null, Tn = null, R = null, Di = null, de = null, Wi = null, ir = !1, mi = !1, On = null, Fr = null, ya = 0;
|
|
263
|
-
var nu = 1, Br = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(),
|
|
263
|
+
var nu = 1, Br = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakSet(), sn = class Ta {
|
|
264
264
|
constructor() {
|
|
265
|
-
bo(this,
|
|
265
|
+
bo(this, q), v(this, "id", nu++), A(this, Br, !1), v(this, "linked", !0), A(this, qt, null), A(this, Ut, null), v(this, "async_deriveds", /* @__PURE__ */ new Map()), v(this, "current", /* @__PURE__ */ new Map()), v(this, "previous", /* @__PURE__ */ new Map()), A(this, Ur, /* @__PURE__ */ new Set()), A(this, Tr, /* @__PURE__ */ new Set()), A(this, Sn, 0), A(this, Ft, /* @__PURE__ */ new Map()), A(this, Jn, null), A(this, Ae, []), A(this, Hi, []), A(this, tn, /* @__PURE__ */ new Set()), A(this, ct, /* @__PURE__ */ new Set()), A(this, At, /* @__PURE__ */ new Map()), A(this, Mr, /* @__PURE__ */ new Set()), v(this, "is_fork", !1), A(this, Zn, !1), Tn === null ? Hr = Tn = this : (E(Ut, Tn, this), E(qt, this, Tn)), Tn = this;
|
|
266
266
|
}
|
|
267
267
|
skip_effect(t) {
|
|
268
268
|
h(At, this).has(t) || h(At, this).set(t, {
|
|
@@ -275,9 +275,9 @@ var nu = 1, Br = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
275
275
|
if (r) {
|
|
276
276
|
h(At, this).delete(t);
|
|
277
277
|
for (var i of r.d)
|
|
278
|
-
|
|
278
|
+
V(i, Le), n(i);
|
|
279
279
|
for (i of r.m)
|
|
280
|
-
|
|
280
|
+
V(i, on), n(i);
|
|
281
281
|
}
|
|
282
282
|
h(Mr, this).add(t);
|
|
283
283
|
}
|
|
@@ -292,31 +292,31 @@ var nu = 1, Br = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
292
292
|
}
|
|
293
293
|
flush() {
|
|
294
294
|
try {
|
|
295
|
-
mi = !0, R = this, O(
|
|
295
|
+
mi = !0, R = this, O(q, this, jr).call(this);
|
|
296
296
|
} finally {
|
|
297
297
|
ya = 0, Wi = null, On = null, Fr = null, mi = !1, R = null, de = null, Kt.clear();
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
discard() {
|
|
301
301
|
for (const t of h(Tr, this)) t(this);
|
|
302
|
-
h(Tr, this).clear(), O(
|
|
302
|
+
h(Tr, this).clear(), O(q, this, Gr).call(this), h(Jn, this)?.resolve();
|
|
303
303
|
}
|
|
304
304
|
register_created_effect(t) {
|
|
305
305
|
h(Hi, this).push(t);
|
|
306
306
|
}
|
|
307
307
|
increment(t, n) {
|
|
308
|
-
if (
|
|
308
|
+
if (E(Sn, this, h(Sn, this) + 1), t) {
|
|
309
309
|
let r = h(Ft, this).get(n) ?? 0;
|
|
310
310
|
h(Ft, this).set(n, r + 1);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
decrement(t, n) {
|
|
314
|
-
if (
|
|
314
|
+
if (E(Sn, this, h(Sn, this) - 1), t) {
|
|
315
315
|
let r = h(Ft, this).get(n) ?? 0;
|
|
316
316
|
r === 1 ? h(Ft, this).delete(n) : h(Ft, this).set(n, r - 1);
|
|
317
317
|
}
|
|
318
|
-
h(Zn, this) || (
|
|
319
|
-
|
|
318
|
+
h(Zn, this) || (E(Zn, this, !0), en(() => {
|
|
319
|
+
E(Zn, this, !1), this.linked && this.flush();
|
|
320
320
|
}));
|
|
321
321
|
}
|
|
322
322
|
transfer_effects(t, n) {
|
|
@@ -331,7 +331,7 @@ var nu = 1, Br = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
331
331
|
h(Tr, this).add(t);
|
|
332
332
|
}
|
|
333
333
|
settled() {
|
|
334
|
-
return (h(Jn, this) ??
|
|
334
|
+
return (h(Jn, this) ?? E(Jn, this, oa())).promise;
|
|
335
335
|
}
|
|
336
336
|
static ensure() {
|
|
337
337
|
if (R === null) {
|
|
@@ -397,43 +397,43 @@ function es() {
|
|
|
397
397
|
return !1;
|
|
398
398
|
}
|
|
399
399
|
function jr() {
|
|
400
|
-
|
|
400
|
+
E(Br, this, !0), ya++ > 1e3 && (O(q, this, Gr).call(this), su());
|
|
401
401
|
for (const a of h(tn, this))
|
|
402
|
-
h(ct, this).delete(a),
|
|
402
|
+
h(ct, this).delete(a), V(a, Le), this.schedule(a);
|
|
403
403
|
for (const a of h(ct, this))
|
|
404
|
-
|
|
404
|
+
V(a, on), this.schedule(a);
|
|
405
405
|
const e = h(Ae, this);
|
|
406
|
-
|
|
406
|
+
E(Ae, this, []), this.apply();
|
|
407
407
|
var t = On = [], n = [], r = Fr = [];
|
|
408
408
|
for (const a of e) try {
|
|
409
|
-
O(
|
|
409
|
+
O(q, this, Sa).call(this, a, t, n);
|
|
410
410
|
} catch (l) {
|
|
411
|
-
throw
|
|
411
|
+
throw Ea(a), O(q, this, es).call(this) || this.discard(), l;
|
|
412
412
|
}
|
|
413
413
|
if (R = null, r.length > 0) {
|
|
414
414
|
var i = ba.ensure();
|
|
415
415
|
for (const a of r) i.schedule(a);
|
|
416
416
|
}
|
|
417
|
-
if (On = null, Fr = null, O(
|
|
418
|
-
O(
|
|
419
|
-
for (const [a, l] of h(At, this))
|
|
420
|
-
r.length > 0 && O(
|
|
417
|
+
if (On = null, Fr = null, O(q, this, es).call(this)) {
|
|
418
|
+
O(q, this, Qn).call(this, n), O(q, this, Qn).call(this, t);
|
|
419
|
+
for (const [a, l] of h(At, this)) ka(a, l);
|
|
420
|
+
r.length > 0 && O(q, R, jr).call(R);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const o = O(
|
|
423
|
+
const o = O(q, this, ru).call(this);
|
|
424
424
|
if (o) {
|
|
425
|
-
O(
|
|
425
|
+
O(q, this, Qn).call(this, n), O(q, this, Qn).call(this, t), O(q, o, iu).call(o, this);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
h(tn, this).clear(), h(ct, this).clear();
|
|
429
429
|
for (const a of h(Ur, this)) a(this);
|
|
430
430
|
h(Ur, this).clear(), Di = this, ts(n), ts(t), Di = null, h(Jn, this)?.resolve();
|
|
431
431
|
var s = R;
|
|
432
|
-
if (h(Sn, this) === 0 && (h(Ae, this).length === 0 || s !== null) && (O(
|
|
432
|
+
if (h(Sn, this) === 0 && (h(Ae, this).length === 0 || s !== null) && (O(q, this, Gr).call(this), ut && (O(q, this, ou).call(this), R = s)), h(Ae, this).length > 0) if (s !== null) {
|
|
433
433
|
const a = s;
|
|
434
434
|
h(Ae, a).push(...h(Ae, this).filter((l) => !h(Ae, a).includes(l)));
|
|
435
435
|
} else s = this;
|
|
436
|
-
s !== null && O(
|
|
436
|
+
s !== null && O(q, s, jr).call(s);
|
|
437
437
|
}
|
|
438
438
|
function Sa(e, t, n) {
|
|
439
439
|
e.f ^= Me;
|
|
@@ -482,12 +482,12 @@ function iu(e) {
|
|
|
482
482
|
if ((i & 2) !== 0) t(s);
|
|
483
483
|
else {
|
|
484
484
|
var o = s;
|
|
485
|
-
i & 4194320 && !this.async_deriveds.has(o) && (h(ct, this).delete(o),
|
|
485
|
+
i & 4194320 && !this.async_deriveds.has(o) && (h(ct, this).delete(o), V(o, Le), this.schedule(o));
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
for (const n of this.current.keys()) t(n);
|
|
490
|
-
this.oncommit(() => e.discard()), O(
|
|
490
|
+
this.oncommit(() => e.discard()), O(q, e, Gr).call(e), R = this, O(q, this, jr).call(this);
|
|
491
491
|
}
|
|
492
492
|
function Qn(e) {
|
|
493
493
|
for (var t = 0; t < e.length; t += 1) va(e[t], h(tn, this), h(ct, this));
|
|
@@ -513,7 +513,7 @@ function ou() {
|
|
|
513
513
|
e && c.discard();
|
|
514
514
|
else if (t.length > 0) {
|
|
515
515
|
if (e) for (const u of h(Mr, this)) c.unskip_effect(u, (f) => {
|
|
516
|
-
(f.f & 4194320) !== 0 ? c.schedule(f) : O(
|
|
516
|
+
(f.f & 4194320) !== 0 ? c.schedule(f) : O(q, c, Qn).call(c, [f]);
|
|
517
517
|
});
|
|
518
518
|
c.activate();
|
|
519
519
|
var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
@@ -524,11 +524,11 @@ function ou() {
|
|
|
524
524
|
return p ? p[0] !== f[0] || p[1] !== f[1] : !0;
|
|
525
525
|
}).map(([u]) => u);
|
|
526
526
|
if (a.length > 0)
|
|
527
|
-
for (const u of h(Hi, this)) (u.f & 155648) === 0 && yo(u, a, o) && ((u.f & 4194320) !== 0 ? (
|
|
527
|
+
for (const u of h(Hi, this)) (u.f & 155648) === 0 && yo(u, a, o) && ((u.f & 4194320) !== 0 ? (V(u, Le), c.schedule(u)) : h(tn, c).add(u));
|
|
528
528
|
if (h(Ae, c).length > 0 && !h(Zn, c)) {
|
|
529
529
|
c.apply();
|
|
530
|
-
for (var l of h(Ae, c)) O(
|
|
531
|
-
|
|
530
|
+
for (var l of h(Ae, c)) O(q, c, Sa).call(c, l, [], []);
|
|
531
|
+
E(Ae, c, []);
|
|
532
532
|
}
|
|
533
533
|
c.deactivate();
|
|
534
534
|
}
|
|
@@ -538,7 +538,7 @@ function ou() {
|
|
|
538
538
|
function Gr() {
|
|
539
539
|
if (this.linked) {
|
|
540
540
|
var e = h(qt, this), t = h(Ut, this);
|
|
541
|
-
e === null ? Hr = t :
|
|
541
|
+
e === null ? Hr = t : E(Ut, e, t), t === null ? Tn = e : E(qt, t, e), this.linked = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
function er(e) {
|
|
@@ -595,7 +595,7 @@ function wa(e, t, n, r) {
|
|
|
595
595
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
596
596
|
for (const i of e.reactions) {
|
|
597
597
|
const o = i.f;
|
|
598
|
-
(o & 2) !== 0 ? wa(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && yo(i, t, r) && (
|
|
598
|
+
(o & 2) !== 0 ? wa(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && yo(i, t, r) && (V(i, Le), To(i));
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
function yo(e, t, n) {
|
|
@@ -611,22 +611,22 @@ function yo(e, t, n) {
|
|
|
611
611
|
function To(e) {
|
|
612
612
|
R.schedule(e);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function ka(e, t) {
|
|
615
615
|
if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
|
|
616
|
-
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e),
|
|
616
|
+
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), V(e, Me);
|
|
617
617
|
for (var n = e.first; n !== null; )
|
|
618
|
-
|
|
618
|
+
ka(n, t), n = n.next;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
|
|
621
|
+
function Ea(e) {
|
|
622
|
+
V(e, Me);
|
|
623
623
|
for (var t = e.first; t !== null; )
|
|
624
|
-
|
|
624
|
+
Ea(t), t = t.next;
|
|
625
625
|
}
|
|
626
626
|
function au(e) {
|
|
627
627
|
let t = 0, n = fr(0), r;
|
|
628
628
|
return () => {
|
|
629
|
-
|
|
629
|
+
Eo() && (y(n), xo(() => (t === 0 && (r = ni(() => e(() => or(n)))), t += 1, () => {
|
|
630
630
|
en(() => {
|
|
631
631
|
t -= 1, t === 0 && (r?.(), r = void 0, or(n));
|
|
632
632
|
});
|
|
@@ -639,12 +639,12 @@ function cu(e, t, n, r) {
|
|
|
639
639
|
}
|
|
640
640
|
var He = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), ns = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakSet(), uu = class {
|
|
641
641
|
constructor(e, t, n, r) {
|
|
642
|
-
bo(this, ae), v(this, "parent", void 0), v(this, "is_pending", !1), v(this, "transform_error", void 0), A(this, He, void 0), A(this, Fi, D ? $ : null), A(this, Ye, void 0), A(this, sr, void 0), A(this, Ce, void 0), A(this, Xe, null), A(this, _e, null), A(this, De, null), A(this, Yt, null), A(this, wn, 0), A(this, Xt, 0), A(this, Sr, !1), A(this, Bi, /* @__PURE__ */ new Set()), A(this, Ui, /* @__PURE__ */ new Set()), A(this, Wt, null), A(this, ns, au(() => (
|
|
643
|
-
|
|
644
|
-
}))),
|
|
642
|
+
bo(this, ae), v(this, "parent", void 0), v(this, "is_pending", !1), v(this, "transform_error", void 0), A(this, He, void 0), A(this, Fi, D ? $ : null), A(this, Ye, void 0), A(this, sr, void 0), A(this, Ce, void 0), A(this, Xe, null), A(this, _e, null), A(this, De, null), A(this, Yt, null), A(this, wn, 0), A(this, Xt, 0), A(this, Sr, !1), A(this, Bi, /* @__PURE__ */ new Set()), A(this, Ui, /* @__PURE__ */ new Set()), A(this, Wt, null), A(this, ns, au(() => (E(Wt, this, fr(h(wn, this))), () => {
|
|
643
|
+
E(Wt, this, null);
|
|
644
|
+
}))), E(He, this, e), E(Ye, this, t), E(sr, this, (i) => {
|
|
645
645
|
var o = C;
|
|
646
646
|
o.b = this, o.f |= 128, n(i);
|
|
647
|
-
}), this.parent = C.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i),
|
|
647
|
+
}), this.parent = C.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), E(Ce, this, Ha(() => {
|
|
648
648
|
if (D) {
|
|
649
649
|
const i = h(Fi, this);
|
|
650
650
|
vo();
|
|
@@ -654,7 +654,7 @@ var He = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ye =
|
|
|
654
654
|
O(ae, this, fu).call(this, s);
|
|
655
655
|
} else o ? O(ae, this, hu).call(this) : O(ae, this, du).call(this);
|
|
656
656
|
} else O(ae, this, xa).call(this);
|
|
657
|
-
}, lu)), D &&
|
|
657
|
+
}, lu)), D && E(He, this, $);
|
|
658
658
|
}
|
|
659
659
|
defer_effect(e) {
|
|
660
660
|
va(e, h(Bi, this), h(Ui, this));
|
|
@@ -666,8 +666,8 @@ var He = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ye =
|
|
|
666
666
|
return !!h(Ye, this).pending;
|
|
667
667
|
}
|
|
668
668
|
update_pending_count(e, t) {
|
|
669
|
-
O(ae, this, Aa).call(this, e, t),
|
|
670
|
-
|
|
669
|
+
O(ae, this, Aa).call(this, e, t), E(wn, this, h(wn, this) + e), !(!h(Wt, this) || h(Sr, this)) && (E(Sr, this, !0), en(() => {
|
|
670
|
+
E(Sr, this, !1), h(Wt, this) && Yr(h(Wt, this), h(wn, this));
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
get_effect_pending() {
|
|
@@ -682,36 +682,36 @@ var He = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ye =
|
|
|
682
682
|
};
|
|
683
683
|
function du() {
|
|
684
684
|
try {
|
|
685
|
-
|
|
685
|
+
E(Xe, this, dt(() => h(sr, this).call(this, h(He, this))));
|
|
686
686
|
} catch (e) {
|
|
687
687
|
this.error(e);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
function fu(e) {
|
|
691
691
|
const t = h(Ye, this).failed;
|
|
692
|
-
t &&
|
|
692
|
+
t && E(De, this, dt(() => {
|
|
693
693
|
t(h(He, this), () => e, () => () => {
|
|
694
694
|
});
|
|
695
695
|
}));
|
|
696
696
|
}
|
|
697
697
|
function hu() {
|
|
698
698
|
const e = h(Ye, this).pending;
|
|
699
|
-
e && (this.is_pending = !0,
|
|
700
|
-
var t =
|
|
701
|
-
t.append(n),
|
|
702
|
-
|
|
699
|
+
e && (this.is_pending = !0, E(_e, this, dt(() => e(h(He, this)))), en(() => {
|
|
700
|
+
var t = E(Yt, this, document.createDocumentFragment()), n = Be();
|
|
701
|
+
t.append(n), E(Xe, this, O(ae, this, ji).call(this, () => dt(() => h(sr, this).call(this, n)))), h(Xt, this) === 0 && (h(He, this).before(t), E(Yt, this, null), hr(h(_e, this), () => {
|
|
702
|
+
E(_e, this, null);
|
|
703
703
|
}), O(ae, this, So).call(this, R));
|
|
704
704
|
}));
|
|
705
705
|
}
|
|
706
706
|
function xa() {
|
|
707
707
|
try {
|
|
708
|
-
if (this.is_pending = this.has_pending_snippet(),
|
|
708
|
+
if (this.is_pending = this.has_pending_snippet(), E(Xt, this, 0), E(wn, this, 0), E(Xe, this, dt(() => {
|
|
709
709
|
h(sr, this).call(this, h(He, this));
|
|
710
710
|
})), h(Xt, this) > 0) {
|
|
711
|
-
var e =
|
|
711
|
+
var e = E(Yt, this, document.createDocumentFragment());
|
|
712
712
|
Ga(h(Xe, this), e);
|
|
713
713
|
const t = h(Ye, this).pending;
|
|
714
|
-
|
|
714
|
+
E(_e, this, dt(() => t(h(He, this))));
|
|
715
715
|
} else O(ae, this, So).call(this, R);
|
|
716
716
|
} catch (t) {
|
|
717
717
|
this.error(t);
|
|
@@ -739,12 +739,12 @@ function Aa(e, t) {
|
|
|
739
739
|
}
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
}), h(Yt, this) && (h(He, this).before(h(Yt, this)),
|
|
742
|
+
E(Xt, this, h(Xt, this) + e), h(Xt, this) === 0 && (O(ae, this, So).call(this, t), h(_e, this) && hr(h(_e, this), () => {
|
|
743
|
+
E(_e, this, null);
|
|
744
|
+
}), h(Yt, this) && (h(He, this).before(h(Yt, this)), E(Yt, this, null)));
|
|
745
745
|
}
|
|
746
746
|
function rs(e) {
|
|
747
|
-
h(Xe, this) && (ge(h(Xe, this)),
|
|
747
|
+
h(Xe, this) && (ge(h(Xe, this)), E(Xe, this, null)), h(_e, this) && (ge(h(_e, this)), E(_e, this, null)), h(De, this) && (ge(h(De, this)), E(De, this, null)), D && (Oe(h(Fi, this)), zi(), Oe(ca()));
|
|
748
748
|
var t = h(Ye, this).onerror;
|
|
749
749
|
let n = h(Ye, this).failed;
|
|
750
750
|
var r = !1, i = !1;
|
|
@@ -754,7 +754,7 @@ function rs(e) {
|
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
756
|
r = !0, i && Vc(), h(De, this) !== null && hr(h(De, this), () => {
|
|
757
|
-
|
|
757
|
+
E(De, this, null);
|
|
758
758
|
}), O(ae, this, ji).call(this, () => {
|
|
759
759
|
O(ae, this, xa).call(this);
|
|
760
760
|
});
|
|
@@ -764,7 +764,7 @@ function rs(e) {
|
|
|
764
764
|
} catch (l) {
|
|
765
765
|
Ct(l, h(Ce, this) && h(Ce, this).parent);
|
|
766
766
|
}
|
|
767
|
-
n &&
|
|
767
|
+
n && E(De, this, O(ae, this, ji).call(this, () => {
|
|
768
768
|
try {
|
|
769
769
|
return dt(() => {
|
|
770
770
|
var l = C;
|
|
@@ -922,10 +922,10 @@ function wo(e) {
|
|
|
922
922
|
function Oa(e) {
|
|
923
923
|
var t = wo(e);
|
|
924
924
|
if (!e.equals(t) && (e.wv = Ya(), (!R?.is_fork || e.deps === null) && (R !== null ? (R.capture(e, t, !0), Di?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
|
|
925
|
-
|
|
925
|
+
V(e, Me);
|
|
926
926
|
return;
|
|
927
927
|
}
|
|
928
|
-
ft || (de !== null ? (
|
|
928
|
+
ft || (de !== null ? (Eo() || R?.is_fork) && de.set(e, t) : _o(e));
|
|
929
929
|
}
|
|
930
930
|
function bu(e) {
|
|
931
931
|
if (e.effects !== null)
|
|
@@ -949,7 +949,7 @@ function fr(e, t) {
|
|
|
949
949
|
return n;
|
|
950
950
|
}
|
|
951
951
|
// @__NO_SIDE_EFFECTS__
|
|
952
|
-
function
|
|
952
|
+
function Y(e, t) {
|
|
953
953
|
const n = fr(e, t);
|
|
954
954
|
return Va(n), n;
|
|
955
955
|
}
|
|
@@ -982,7 +982,7 @@ function Yr(e, t, n = null) {
|
|
|
982
982
|
function Tu() {
|
|
983
983
|
Ra = !1;
|
|
984
984
|
for (const e of qr) {
|
|
985
|
-
(e.f & 1024) !== 0 &&
|
|
985
|
+
(e.f & 1024) !== 0 && V(e, on);
|
|
986
986
|
let t;
|
|
987
987
|
try {
|
|
988
988
|
t = pr(e);
|
|
@@ -1003,7 +1003,7 @@ function La(e, t, n) {
|
|
|
1003
1003
|
var a = r[s], l = a.f;
|
|
1004
1004
|
if (!(!i && a === C)) {
|
|
1005
1005
|
var c = (l & Le) === 0;
|
|
1006
|
-
if (c &&
|
|
1006
|
+
if (c && V(a, t), (l & 131072) !== 0) qr.add(a);
|
|
1007
1007
|
else if ((l & 2) !== 0) {
|
|
1008
1008
|
var u = a;
|
|
1009
1009
|
de?.delete(u), (l & 65536) === 0 && (l & 512 && (C === null || (C.f & 2097152) === 0) && (a.f |= cr), La(u, on, n));
|
|
@@ -1019,14 +1019,14 @@ function Mt(e) {
|
|
|
1019
1019
|
if (typeof e != "object" || e === null || rr in e) return e;
|
|
1020
1020
|
const t = ia(e);
|
|
1021
1021
|
if (t !== xc && t !== Ac) return e;
|
|
1022
|
-
var n = /* @__PURE__ */ new Map(), r = Sc(e), i = /* @__PURE__ */
|
|
1022
|
+
var n = /* @__PURE__ */ new Map(), r = Sc(e), i = /* @__PURE__ */ Y(0), o = null, s = Jt, a = (f) => {
|
|
1023
1023
|
if (Jt === s) return f();
|
|
1024
1024
|
var p = L, g = Jt;
|
|
1025
1025
|
Ie(null), cs(s);
|
|
1026
1026
|
var m = f();
|
|
1027
1027
|
return Ie(p), cs(g), m;
|
|
1028
1028
|
};
|
|
1029
|
-
r && n.set("length", /* @__PURE__ */
|
|
1029
|
+
r && n.set("length", /* @__PURE__ */ Y(e.length, o));
|
|
1030
1030
|
var l = "";
|
|
1031
1031
|
let c = !1;
|
|
1032
1032
|
function u(f) {
|
|
@@ -1041,7 +1041,7 @@ function Mt(e) {
|
|
|
1041
1041
|
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && Uc();
|
|
1042
1042
|
var m = n.get(p);
|
|
1043
1043
|
return m === void 0 ? a(() => {
|
|
1044
|
-
var b = /* @__PURE__ */
|
|
1044
|
+
var b = /* @__PURE__ */ Y(g.value, o);
|
|
1045
1045
|
return n.set(p, b), b;
|
|
1046
1046
|
}) : P(m, g.value, !0), !0;
|
|
1047
1047
|
},
|
|
@@ -1049,7 +1049,7 @@ function Mt(e) {
|
|
|
1049
1049
|
var g = n.get(p);
|
|
1050
1050
|
if (g === void 0) {
|
|
1051
1051
|
if (p in f) {
|
|
1052
|
-
const m = a(() => /* @__PURE__ */
|
|
1052
|
+
const m = a(() => /* @__PURE__ */ Y(Q, o));
|
|
1053
1053
|
n.set(p, m), or(i);
|
|
1054
1054
|
}
|
|
1055
1055
|
} else
|
|
@@ -1060,7 +1060,7 @@ function Mt(e) {
|
|
|
1060
1060
|
if (p === rr) return e;
|
|
1061
1061
|
var m = n.get(p), b = p in f;
|
|
1062
1062
|
if (m === void 0 && (!b || Vt(f, p)?.writable) && (m = a(() => {
|
|
1063
|
-
var I = /* @__PURE__ */
|
|
1063
|
+
var I = /* @__PURE__ */ Y(Mt(b ? f[p] : Q), o);
|
|
1064
1064
|
return I;
|
|
1065
1065
|
}), n.set(p, m)), m !== void 0) {
|
|
1066
1066
|
var T = y(m);
|
|
@@ -1088,7 +1088,7 @@ function Mt(e) {
|
|
|
1088
1088
|
if (p === rr) return !0;
|
|
1089
1089
|
var g = n.get(p), m = g !== void 0 && g.v !== Q || Reflect.has(f, p);
|
|
1090
1090
|
return (g !== void 0 || C !== null && (!m || Vt(f, p)?.writable)) && (g === void 0 && (g = a(() => {
|
|
1091
|
-
var b = /* @__PURE__ */
|
|
1091
|
+
var b = /* @__PURE__ */ Y(m ? Mt(f[p]) : Q, o);
|
|
1092
1092
|
return b;
|
|
1093
1093
|
}), n.set(p, g)), y(g) === Q) ? !1 : m;
|
|
1094
1094
|
},
|
|
@@ -1096,10 +1096,10 @@ function Mt(e) {
|
|
|
1096
1096
|
var b = n.get(p), T = p in f;
|
|
1097
1097
|
if (r && p === "length") for (var I = g; I < b.v; I += 1) {
|
|
1098
1098
|
var W = n.get(I + "");
|
|
1099
|
-
W !== void 0 ? P(W, Q) : I in f && (W = a(() => /* @__PURE__ */
|
|
1099
|
+
W !== void 0 ? P(W, Q) : I in f && (W = a(() => /* @__PURE__ */ Y(Q, o)), n.set(I + "", W));
|
|
1100
1100
|
}
|
|
1101
1101
|
if (b === void 0)
|
|
1102
|
-
(!T || Vt(f, p)?.writable) && (b = a(() => /* @__PURE__ */
|
|
1102
|
+
(!T || Vt(f, p)?.writable) && (b = a(() => /* @__PURE__ */ Y(void 0, o)), P(b, Mt(g)), n.set(p, b));
|
|
1103
1103
|
else {
|
|
1104
1104
|
T = b.v !== Q;
|
|
1105
1105
|
var J = a(() => Mt(g));
|
|
@@ -1132,10 +1132,10 @@ function Mt(e) {
|
|
|
1132
1132
|
function wu(e, t) {
|
|
1133
1133
|
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Su.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1134
1134
|
}
|
|
1135
|
-
var is,
|
|
1135
|
+
var is, ku, Pa, Na, $a;
|
|
1136
1136
|
function Gi() {
|
|
1137
1137
|
if (is === void 0) {
|
|
1138
|
-
is = window,
|
|
1138
|
+
is = window, ku = document, Pa = /Firefox/.test(navigator.userAgent);
|
|
1139
1139
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1140
1140
|
Na = Vt(t, "firstChild").get, $a = Vt(t, "nextSibling").get, Ko(e) && (e[Ni] = void 0, e[Pi] = null, e[$i] = void 0, e.__e = void 0), Ko(n) && (n[Cr] = void 0);
|
|
1141
1141
|
}
|
|
@@ -1175,7 +1175,7 @@ function os(e, t = !1) {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
return $;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function ke(e, t = 1, n = !1) {
|
|
1179
1179
|
let r = D ? $ : e;
|
|
1180
1180
|
for (var i; t--; )
|
|
1181
1181
|
i = r, r = /* @__PURE__ */ gt(r);
|
|
@@ -1189,13 +1189,13 @@ function Ee(e, t = 1, n = !1) {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
return Oe(r), r;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function Eu(e) {
|
|
1193
1193
|
e.textContent = "";
|
|
1194
1194
|
}
|
|
1195
1195
|
function xu() {
|
|
1196
1196
|
return !ut || qe !== null ? !1 : (C.f & go) !== 0;
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function ko(e, t, n) {
|
|
1199
1199
|
return t == null || t === "http://www.w3.org/1999/xhtml" ? n ? document.createElement(e, { is: n }) : document.createElement(e) : n ? document.createElementNS(t, e, { is: n }) : document.createElementNS(t, e);
|
|
1200
1200
|
}
|
|
1201
1201
|
function ti(e) {
|
|
@@ -1264,12 +1264,12 @@ function Je(e, t) {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
return r;
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function Eo() {
|
|
1268
1268
|
return L !== null && !We;
|
|
1269
1269
|
}
|
|
1270
1270
|
function Ou(e) {
|
|
1271
1271
|
const t = Je(8, null);
|
|
1272
|
-
return
|
|
1272
|
+
return V(t, Me), t.teardown = e, t;
|
|
1273
1273
|
}
|
|
1274
1274
|
function Or(e) {
|
|
1275
1275
|
Cu("$effect");
|
|
@@ -1350,7 +1350,7 @@ function Pu(e) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
function ge(e, t = !0) {
|
|
1352
1352
|
var n = !1;
|
|
1353
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Nu(e.nodes.start, e.nodes.end), n = !0),
|
|
1353
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Nu(e.nodes.start, e.nodes.end), n = !0), V(e, Jo), Ao(e, t && !n), lr(e, 0);
|
|
1354
1354
|
var r = e.nodes && e.nodes.t;
|
|
1355
1355
|
if (r !== null) for (const o of r) o.stop();
|
|
1356
1356
|
Fa(e), e.f ^= Jo, e.f |= Oc;
|
|
@@ -1399,7 +1399,7 @@ function as(e) {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
function ja(e, t) {
|
|
1401
1401
|
if ((e.f & 8192) !== 0) {
|
|
1402
|
-
e.f ^= po, (e.f & 1024) === 0 && (
|
|
1402
|
+
e.f ^= po, (e.f & 1024) === 0 && (V(e, Le), sn.ensure().schedule(e));
|
|
1403
1403
|
for (var n = e.first; n !== null; ) {
|
|
1404
1404
|
var r = n.next, i = (n.f & 65536) !== 0 || (n.f & 32) !== 0;
|
|
1405
1405
|
ja(n, i ? t : !1), n = r;
|
|
@@ -1451,7 +1451,7 @@ function pr(e) {
|
|
|
1451
1451
|
var o = n[i];
|
|
1452
1452
|
if (pr(o) && Oa(o), o.wv > e.wv) return !0;
|
|
1453
1453
|
}
|
|
1454
|
-
(t & 512) !== 0 && de === null &&
|
|
1454
|
+
(t & 512) !== 0 && de === null && V(e, Me);
|
|
1455
1455
|
}
|
|
1456
1456
|
return !1;
|
|
1457
1457
|
}
|
|
@@ -1460,7 +1460,7 @@ function Xa(e, t, n = !0) {
|
|
|
1460
1460
|
if (r !== null && !(!ut && Fe !== null && Fe.has(e)))
|
|
1461
1461
|
for (var i = 0; i < r.length; i++) {
|
|
1462
1462
|
var o = r[i];
|
|
1463
|
-
(o.f & 2) !== 0 ? Xa(o, t, !1) : t === o && (n ?
|
|
1463
|
+
(o.f & 2) !== 0 ? Xa(o, t, !1) : t === o && (n ? V(o, Le) : (o.f & 1024) !== 0 && V(o, on), To(o));
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
1466
|
function Ka(e) {
|
|
@@ -1478,7 +1478,7 @@ function Ka(e) {
|
|
|
1478
1478
|
if (g || lr(e, ve), p !== null && ve > 0)
|
|
1479
1479
|
for (p.length = ve + pe.length, m = 0; m < pe.length; m++) p[ve + m] = pe[m];
|
|
1480
1480
|
else e.deps = p = pe;
|
|
1481
|
-
if (
|
|
1481
|
+
if (Eo() && (e.f & 512) !== 0) for (m = ve; m < p.length; m++) {
|
|
1482
1482
|
var b;
|
|
1483
1483
|
((b = p[m]).reactions ?? (b.reactions = [])).push(e);
|
|
1484
1484
|
}
|
|
@@ -1518,7 +1518,7 @@ function lr(e, t) {
|
|
|
1518
1518
|
function Rn(e) {
|
|
1519
1519
|
var t = e.f;
|
|
1520
1520
|
if ((t & 16384) === 0) {
|
|
1521
|
-
|
|
1521
|
+
V(e, Me);
|
|
1522
1522
|
var n = C, r = Ir;
|
|
1523
1523
|
if (C = e, Ir = !0, 0)
|
|
1524
1524
|
var i, o;
|
|
@@ -1646,7 +1646,7 @@ function Fu(e) {
|
|
|
1646
1646
|
return Hu?.createHTML(e) ?? e;
|
|
1647
1647
|
}
|
|
1648
1648
|
function Bu(e) {
|
|
1649
|
-
var t =
|
|
1649
|
+
var t = ko("template");
|
|
1650
1650
|
return t.innerHTML = Fu(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1651
1651
|
}
|
|
1652
1652
|
function Ot(e, t) {
|
|
@@ -1766,7 +1766,7 @@ var Yu = [
|
|
|
1766
1766
|
"$inspect.trace",
|
|
1767
1767
|
"$host"
|
|
1768
1768
|
], fs = !0;
|
|
1769
|
-
function
|
|
1769
|
+
function kr(e, t) {
|
|
1770
1770
|
var n, r = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1771
1771
|
r !== ((n = e)[Cr] ?? (n[Cr] = e.nodeValue)) && (e[Cr] = r, e.nodeValue = `${r}`);
|
|
1772
1772
|
}
|
|
@@ -1779,21 +1779,21 @@ function Xu(e, t) {
|
|
|
1779
1779
|
try {
|
|
1780
1780
|
for (var o = /* @__PURE__ */ In(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ gt(o);
|
|
1781
1781
|
if (!o) throw Cn;
|
|
1782
|
-
|
|
1782
|
+
En(!0), Oe(o);
|
|
1783
1783
|
const s = tl(e, {
|
|
1784
1784
|
...t,
|
|
1785
1785
|
anchor: o
|
|
1786
1786
|
});
|
|
1787
|
-
return
|
|
1787
|
+
return En(!1), s;
|
|
1788
1788
|
} catch (s) {
|
|
1789
1789
|
if (s instanceof Error && s.message.split(`
|
|
1790
1790
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1791
|
-
return s !== Cn && console.warn("Failed to hydrate: ", s), t.recover === !1 && Fc(), Gi(),
|
|
1791
|
+
return s !== Cn && console.warn("Failed to hydrate: ", s), t.recover === !1 && Fc(), Gi(), Eu(n), En(!1), el(e, t);
|
|
1792
1792
|
} finally {
|
|
1793
|
-
|
|
1793
|
+
En(r), Oe(i);
|
|
1794
1794
|
}
|
|
1795
1795
|
}
|
|
1796
|
-
var
|
|
1796
|
+
var Er = /* @__PURE__ */ new Map();
|
|
1797
1797
|
function tl(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1798
1798
|
Gi();
|
|
1799
1799
|
var l = void 0, c = Ru(() => {
|
|
@@ -1813,18 +1813,18 @@ function tl(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
|
|
|
1813
1813
|
f.add(b);
|
|
1814
1814
|
var T = qu(b);
|
|
1815
1815
|
for (const J of [t, document]) {
|
|
1816
|
-
var I =
|
|
1817
|
-
I === void 0 && (I = /* @__PURE__ */ new Map(),
|
|
1816
|
+
var I = Er.get(J);
|
|
1817
|
+
I === void 0 && (I = /* @__PURE__ */ new Map(), Er.set(J, I));
|
|
1818
1818
|
var W = I.get(b);
|
|
1819
1819
|
W === void 0 ? (J.addEventListener(b, ds, { passive: T }), I.set(b, 1)) : I.set(b, W + 1);
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
|
-
return p(
|
|
1824
|
+
return p(kc(Qa)), Vi.add(p), () => {
|
|
1825
1825
|
for (var g of f) for (const T of [t, document]) {
|
|
1826
|
-
var m =
|
|
1827
|
-
--b == 0 ? (T.removeEventListener(g, ds), m.delete(g), m.size === 0 &&
|
|
1826
|
+
var m = Er.get(T), b = m.get(g);
|
|
1827
|
+
--b == 0 ? (T.removeEventListener(g, ds), m.delete(g), m.size === 0 && Er.delete(T)) : m.set(g, b);
|
|
1828
1828
|
}
|
|
1829
1829
|
Vi.delete(p), u !== n && u.parentNode?.removeChild(u);
|
|
1830
1830
|
};
|
|
@@ -1836,23 +1836,23 @@ function Ku(e, t) {
|
|
|
1836
1836
|
const n = qi.get(e);
|
|
1837
1837
|
return n ? (qi.delete(e), n(t)) : Promise.resolve();
|
|
1838
1838
|
}
|
|
1839
|
-
var lt = /* @__PURE__ */ new WeakMap(),
|
|
1839
|
+
var lt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(), _i = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakMap(), Ju = class {
|
|
1840
1840
|
constructor(e, t = !0) {
|
|
1841
|
-
v(this, "anchor", void 0), A(this, lt, /* @__PURE__ */ new Map()), A(this,
|
|
1841
|
+
v(this, "anchor", void 0), A(this, lt, /* @__PURE__ */ new Map()), A(this, kt, /* @__PURE__ */ new Map()), A(this, $e, /* @__PURE__ */ new Map()), A(this, jn, /* @__PURE__ */ new Set()), A(this, vi, !0), A(this, _i, (n) => {
|
|
1842
1842
|
if (h(lt, this).has(n)) {
|
|
1843
|
-
var r = h(lt, this).get(n), i = h(
|
|
1843
|
+
var r = h(lt, this).get(n), i = h(kt, this).get(r);
|
|
1844
1844
|
if (i)
|
|
1845
1845
|
as(i), h(jn, this).delete(r);
|
|
1846
1846
|
else {
|
|
1847
1847
|
var o = h($e, this).get(r);
|
|
1848
|
-
o && (as(o.effect), h(
|
|
1848
|
+
o && (as(o.effect), h(kt, this).set(r, o.effect), h($e, this).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
1849
1849
|
}
|
|
1850
1850
|
for (const [s, a] of h(lt, this)) {
|
|
1851
1851
|
if (h(lt, this).delete(s), s === n) break;
|
|
1852
1852
|
const l = h($e, this).get(a);
|
|
1853
1853
|
l && (ge(l.effect), h($e, this).delete(a));
|
|
1854
1854
|
}
|
|
1855
|
-
for (const [s, a] of h(
|
|
1855
|
+
for (const [s, a] of h(kt, this)) {
|
|
1856
1856
|
if (s === r || h(jn, this).has(s)) continue;
|
|
1857
1857
|
const l = () => {
|
|
1858
1858
|
if (Array.from(h(lt, this).values()).includes(s)) {
|
|
@@ -1862,7 +1862,7 @@ var lt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), $e =
|
|
|
1862
1862
|
fragment: c
|
|
1863
1863
|
});
|
|
1864
1864
|
} else ge(a);
|
|
1865
|
-
h(jn, this).delete(s), h(
|
|
1865
|
+
h(jn, this).delete(s), h(kt, this).delete(s);
|
|
1866
1866
|
};
|
|
1867
1867
|
h(vi, this) || !i ? (h(jn, this).add(s), hr(a, l, !1)) : l();
|
|
1868
1868
|
}
|
|
@@ -1871,19 +1871,19 @@ var lt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), $e =
|
|
|
1871
1871
|
h(lt, this).delete(n);
|
|
1872
1872
|
const r = Array.from(h(lt, this).values());
|
|
1873
1873
|
for (const [i, o] of h($e, this)) r.includes(i) || (ge(o.effect), h($e, this).delete(i));
|
|
1874
|
-
}), this.anchor = e,
|
|
1874
|
+
}), this.anchor = e, E(vi, this, t);
|
|
1875
1875
|
}
|
|
1876
1876
|
ensure(e, t) {
|
|
1877
1877
|
var n = R, r = xu();
|
|
1878
|
-
if (t && !h(
|
|
1878
|
+
if (t && !h(kt, this).has(e) && !h($e, this).has(e)) if (r) {
|
|
1879
1879
|
var i = document.createDocumentFragment(), o = Be();
|
|
1880
1880
|
i.append(o), h($e, this).set(e, {
|
|
1881
1881
|
effect: dt(() => t(o)),
|
|
1882
1882
|
fragment: i
|
|
1883
1883
|
});
|
|
1884
|
-
} else h(
|
|
1884
|
+
} else h(kt, this).set(e, dt(() => t(this.anchor)));
|
|
1885
1885
|
if (h(lt, this).set(n, e), r) {
|
|
1886
|
-
for (const [s, a] of h(
|
|
1886
|
+
for (const [s, a] of h(kt, this)) s === e ? n.unskip_effect(a) : n.skip_effect(a);
|
|
1887
1887
|
for (const [s, a] of h($e, this)) s === e ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
|
|
1888
1888
|
n.oncommit(h(_i, this)), n.ondiscard(h(hs, this));
|
|
1889
1889
|
} else
|
|
@@ -1913,7 +1913,7 @@ function _n(e, t, n = !1) {
|
|
|
1913
1913
|
var c = Xc(r);
|
|
1914
1914
|
if (a !== parseInt(c.substring(1))) {
|
|
1915
1915
|
var u = ca();
|
|
1916
|
-
Oe(u), i.anchor = u,
|
|
1916
|
+
Oe(u), i.anchor = u, En(!1), i.ensure(a, l), En(!0);
|
|
1917
1917
|
return;
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
@@ -1930,7 +1930,7 @@ function ed(e, t) {
|
|
|
1930
1930
|
Wa(() => {
|
|
1931
1931
|
var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
|
|
1932
1932
|
if (!r.querySelector("#" + t.hash)) {
|
|
1933
|
-
const i =
|
|
1933
|
+
const i = ko("style");
|
|
1934
1934
|
i.id = t.hash, i.textContent = t.code, r.appendChild(i);
|
|
1935
1935
|
}
|
|
1936
1936
|
});
|
|
@@ -2059,30 +2059,30 @@ function dd(e) {
|
|
|
2059
2059
|
if (n) return n;
|
|
2060
2060
|
ms.set(t, n = []);
|
|
2061
2061
|
for (var r, i = e, o = Element.prototype; o !== i; ) {
|
|
2062
|
-
r =
|
|
2062
|
+
r = Ec(i);
|
|
2063
2063
|
for (var s in r) r[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && n.push(s);
|
|
2064
2064
|
i = ia(i);
|
|
2065
2065
|
}
|
|
2066
2066
|
return n;
|
|
2067
2067
|
}
|
|
2068
|
-
var rl,
|
|
2068
|
+
var rl, kn = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), vs = /* @__PURE__ */ new WeakSet(), il = class {
|
|
2069
2069
|
constructor(e) {
|
|
2070
|
-
bo(this, vs), A(this,
|
|
2070
|
+
bo(this, vs), A(this, kn, /* @__PURE__ */ new WeakMap()), A(this, Xr, void 0), A(this, Ti, void 0), E(Ti, this, e);
|
|
2071
2071
|
}
|
|
2072
2072
|
observe(e, t) {
|
|
2073
|
-
var n = h(
|
|
2074
|
-
return n.add(t), h(
|
|
2075
|
-
var r = h(
|
|
2076
|
-
r.delete(t), r.size === 0 && (h(
|
|
2073
|
+
var n = h(kn, this).get(e) || /* @__PURE__ */ new Set();
|
|
2074
|
+
return n.add(t), h(kn, this).set(e, n), O(vs, this, fd).call(this).observe(e, h(Ti, this)), () => {
|
|
2075
|
+
var r = h(kn, this).get(e);
|
|
2076
|
+
r.delete(t), r.size === 0 && (h(kn, this).delete(e), h(Xr, this).unobserve(e));
|
|
2077
2077
|
};
|
|
2078
2078
|
}
|
|
2079
2079
|
};
|
|
2080
2080
|
rl = il;
|
|
2081
2081
|
function fd() {
|
|
2082
|
-
return h(Xr, this) ??
|
|
2082
|
+
return h(Xr, this) ?? E(Xr, this, new ResizeObserver((e) => {
|
|
2083
2083
|
for (var t of e) {
|
|
2084
2084
|
rl.entries.set(t.target, t);
|
|
2085
|
-
for (var n of h(
|
|
2085
|
+
for (var n of h(kn, this).get(t.target) || []) n(t);
|
|
2086
2086
|
}
|
|
2087
2087
|
}));
|
|
2088
2088
|
}
|
|
@@ -2168,7 +2168,7 @@ var Ht = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), pd =
|
|
|
2168
2168
|
return P(t.get(o) ?? n(o, s), s), Reflect.set(i, o, s);
|
|
2169
2169
|
}
|
|
2170
2170
|
});
|
|
2171
|
-
|
|
2171
|
+
E(Ge, this, (e.hydrate ? Xu : el)(e.component, {
|
|
2172
2172
|
target: e.target,
|
|
2173
2173
|
anchor: e.anchor,
|
|
2174
2174
|
props: r,
|
|
@@ -2176,7 +2176,7 @@ var Ht = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), pd =
|
|
|
2176
2176
|
intro: e.intro ?? !1,
|
|
2177
2177
|
recover: e.recover,
|
|
2178
2178
|
transformError: e.transformError
|
|
2179
|
-
})), !ut && (!e?.props?.$$host || e.sync === !1) && er(),
|
|
2179
|
+
})), !ut && (!e?.props?.$$host || e.sync === !1) && er(), E(Ht, this, r.$$events);
|
|
2180
2180
|
for (const i of Object.keys(h(Ge, this)))
|
|
2181
2181
|
i === "$set" || i === "$destroy" || i === "$on" || Dr(this, i, {
|
|
2182
2182
|
get() {
|
|
@@ -2228,7 +2228,7 @@ typeof HTMLElement == "function" && (ol = class extends HTMLElement {
|
|
|
2228
2228
|
if (this.$$cn = !0, !this.$$c) {
|
|
2229
2229
|
let e = function(r) {
|
|
2230
2230
|
return (i) => {
|
|
2231
|
-
const o =
|
|
2231
|
+
const o = ko("slot");
|
|
2232
2232
|
r !== "default" && (o.name = r), me(i, o);
|
|
2233
2233
|
};
|
|
2234
2234
|
};
|
|
@@ -2829,14 +2829,14 @@ function al(e) {
|
|
|
2829
2829
|
console.debug(`[${e}]`, ...t);
|
|
2830
2830
|
};
|
|
2831
2831
|
}
|
|
2832
|
-
var
|
|
2832
|
+
var kg = al("I18nService"), wi = {
|
|
2833
2833
|
assessment: [],
|
|
2834
2834
|
section: [],
|
|
2835
2835
|
item: [],
|
|
2836
2836
|
passage: [],
|
|
2837
2837
|
rubric: [],
|
|
2838
2838
|
element: []
|
|
2839
|
-
},
|
|
2839
|
+
}, ki = {
|
|
2840
2840
|
section: [...wi.section],
|
|
2841
2841
|
item: [...wi.item],
|
|
2842
2842
|
passage: [...wi.passage]
|
|
@@ -2844,7 +2844,7 @@ var Eg = al("I18nService"), wi = {
|
|
|
2844
2844
|
function Zt(e) {
|
|
2845
2845
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2846
2846
|
}
|
|
2847
|
-
function
|
|
2847
|
+
function Et(e, t) {
|
|
2848
2848
|
if (e == null) return [];
|
|
2849
2849
|
if (!Array.isArray(e)) throw new Error(`Invalid tools config at "${t}": expected an array of tool ids.`);
|
|
2850
2850
|
if (e.find((n) => typeof n != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
@@ -2902,19 +2902,19 @@ function wd(e) {
|
|
|
2902
2902
|
if (e != null && !Zt(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
2903
2903
|
const t = bd(e?.policy), n = _d(e?.placement), r = Td(e?.providers), i = Sd(e?.pnpEnforcement, "pnpEnforcement"), o = {
|
|
2904
2904
|
policy: {
|
|
2905
|
-
allowed: xt(
|
|
2906
|
-
blocked: xt(
|
|
2905
|
+
allowed: xt(Et(t?.allowed, "policy.allowed")),
|
|
2906
|
+
blocked: xt(Et(t?.blocked, "policy.blocked"))
|
|
2907
2907
|
},
|
|
2908
2908
|
placement: {
|
|
2909
|
-
section: xt(
|
|
2910
|
-
item: xt(
|
|
2911
|
-
passage: xt(
|
|
2909
|
+
section: xt(Et(n?.section, "placement.section")).length ? xt(Et(n?.section, "placement.section")) : [...ki.section],
|
|
2910
|
+
item: xt(Et(n?.item, "placement.item")).length ? xt(Et(n?.item, "placement.item")) : [...ki.item],
|
|
2911
|
+
passage: xt(Et(n?.passage, "placement.passage")).length ? xt(Et(n?.passage, "placement.passage")) : [...ki.passage]
|
|
2912
2912
|
},
|
|
2913
2913
|
providers: r
|
|
2914
2914
|
};
|
|
2915
2915
|
return i && (o.pnpEnforcement = i), o;
|
|
2916
2916
|
}
|
|
2917
|
-
var
|
|
2917
|
+
var kd = [
|
|
2918
2918
|
"assessment",
|
|
2919
2919
|
"section",
|
|
2920
2920
|
"item",
|
|
@@ -2925,7 +2925,7 @@ var Ed = [
|
|
|
2925
2925
|
function Lr(e, t) {
|
|
2926
2926
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
2927
2927
|
}
|
|
2928
|
-
var
|
|
2928
|
+
var Ed = [
|
|
2929
2929
|
{
|
|
2930
2930
|
pattern: /<script\b/i,
|
|
2931
2931
|
reason: "contains a <script> tag"
|
|
@@ -2947,13 +2947,13 @@ function xd(e, t, n) {
|
|
|
2947
2947
|
const r = t.trimStart(), i = r.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(r);
|
|
2948
2948
|
if (/^data:/i.test(r)) throw new Error(`Invalid tool registration "${e}": "${n}" may not be a data: URL.`);
|
|
2949
2949
|
if (!(!i && !o)) {
|
|
2950
|
-
for (const { pattern: s, reason: a } of
|
|
2950
|
+
for (const { pattern: s, reason: a } of Ed) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${n}" ${a}. Inline SVG icons must not include scriptable content.`);
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
2953
|
function bs(e) {
|
|
2954
2954
|
if (Lr(e.toolId, "toolId"), Lr(e.name, "name"), Lr(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
|
|
2955
2955
|
if (typeof e.icon == "string" && xd(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2956
|
-
const t = e.supportedLevels.find((n) => !
|
|
2956
|
+
const t = e.supportedLevels.find((n) => !kd.includes(n));
|
|
2957
2957
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
2958
2958
|
if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
|
|
2959
2959
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -3765,7 +3765,7 @@ var Xd = {
|
|
|
3765
3765
|
}
|
|
3766
3766
|
};
|
|
3767
3767
|
}
|
|
3768
|
-
},
|
|
3768
|
+
}, G = (e) => e.trim().replace(/\s+/g, " "), hl = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, pl = (e) => {
|
|
3769
3769
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
3770
3770
|
const t = e.classList;
|
|
3771
3771
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -3844,13 +3844,13 @@ var Xd = {
|
|
|
3844
3844
|
text: f,
|
|
3845
3845
|
map: n
|
|
3846
3846
|
};
|
|
3847
|
-
},
|
|
3847
|
+
}, Ei = null, Ss = Promise.resolve(), Kd = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Jd = async () => (Ei || (Ei = import("./sre-5M5pQS1Z.js").then((e) => /* @__PURE__ */ Tc(e.default, 1)).then((e) => {
|
|
3848
3848
|
const t = e.default || e;
|
|
3849
3849
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
3850
3850
|
return t;
|
|
3851
|
-
})),
|
|
3851
|
+
})), Ei), Zd = (e) => e === "en" ? "clearspeak" : "mathspeak", ws = (e) => !!e && typeof e == "object" && !Array.isArray(e), ks = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, si = (e) => {
|
|
3852
3852
|
if (!ws(e)) return;
|
|
3853
|
-
const t =
|
|
3853
|
+
const t = ks(e.domain), n = ks(e.style), r = ws(e.engineOptions) ? e.engineOptions : void 0;
|
|
3854
3854
|
if (!(!t && !n && !r))
|
|
3855
3855
|
return {
|
|
3856
3856
|
...t ? { domain: t } : {},
|
|
@@ -3881,7 +3881,7 @@ var Xd = {
|
|
|
3881
3881
|
}
|
|
3882
3882
|
}, vl = async (e, t = {}) => {
|
|
3883
3883
|
if (!e.some((c) => c.type === "math")) return {
|
|
3884
|
-
speechText:
|
|
3884
|
+
speechText: G(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
3885
3885
|
usedMathSpeech: !1,
|
|
3886
3886
|
usedFallback: !1
|
|
3887
3887
|
};
|
|
@@ -3894,7 +3894,7 @@ var Xd = {
|
|
|
3894
3894
|
}
|
|
3895
3895
|
try {
|
|
3896
3896
|
n || (n = await o());
|
|
3897
|
-
const u =
|
|
3897
|
+
const u = G(await ml(n, c.mathml, t.language, "none", t.mathSpeech));
|
|
3898
3898
|
if (u) {
|
|
3899
3899
|
s.push(u), r = !0;
|
|
3900
3900
|
continue;
|
|
@@ -3904,7 +3904,7 @@ var Xd = {
|
|
|
3904
3904
|
i = !0, console.debug("[TTSService] Math speech generation failed; using visible fallback", { message: u instanceof Error ? u.message : String(u) }), s.push(c.fallbackText);
|
|
3905
3905
|
}
|
|
3906
3906
|
}
|
|
3907
|
-
const a =
|
|
3907
|
+
const a = G(s.join(" "));
|
|
3908
3908
|
let l;
|
|
3909
3909
|
return t.produceSsml && n && r && e.length === 1 && e[0].type === "math" && (l = await nf(n, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
3910
3910
|
speechText: a,
|
|
@@ -3917,7 +3917,7 @@ var Xd = {
|
|
|
3917
3917
|
"expanding-row",
|
|
3918
3918
|
"floating-overlay",
|
|
3919
3919
|
"left-aligned"
|
|
3920
|
-
]),
|
|
3920
|
+
]), Es = (e) => e && typeof e == "object" ? e : {}, of = (e) => e === "polly" || e === "google" || e === "server", Ee = (e, t) => e === void 0 ? t : e, Jr = (e, t = "left-aligned") => typeof e == "string" && rf.has(e) ? e : t, xs = Object.freeze([0.8, 1.25]), As = (e) => {
|
|
3921
3921
|
if (typeof e != "number" || !Number.isFinite(e) || e <= 0) return;
|
|
3922
3922
|
const t = Math.round(e * 100) / 100;
|
|
3923
3923
|
return t === 1 ? void 0 : t;
|
|
@@ -3970,26 +3970,26 @@ var Xd = {
|
|
|
3970
3970
|
if (!of(n)) return t;
|
|
3971
3971
|
const r = {
|
|
3972
3972
|
...t,
|
|
3973
|
-
apiEndpoint:
|
|
3974
|
-
transportMode:
|
|
3975
|
-
endpointValidationMode:
|
|
3976
|
-
validateEndpoint:
|
|
3977
|
-
includeAuthOnAssetFetch:
|
|
3978
|
-
rate:
|
|
3979
|
-
language:
|
|
3973
|
+
apiEndpoint: Ee(t.apiEndpoint, "/api/tts"),
|
|
3974
|
+
transportMode: Ee(t.transportMode, "pie"),
|
|
3975
|
+
endpointValidationMode: Ee(t.endpointValidationMode, "voices"),
|
|
3976
|
+
validateEndpoint: Ee(t.validateEndpoint, !0),
|
|
3977
|
+
includeAuthOnAssetFetch: Ee(t.includeAuthOnAssetFetch, !1),
|
|
3978
|
+
rate: Ee(t.rate, 1),
|
|
3979
|
+
language: Ee(t.language, "en-US")
|
|
3980
3980
|
};
|
|
3981
3981
|
return n === "polly" ? {
|
|
3982
3982
|
...r,
|
|
3983
|
-
defaultVoice:
|
|
3984
|
-
engine:
|
|
3985
|
-
format:
|
|
3986
|
-
speechMarksMode:
|
|
3983
|
+
defaultVoice: Ee(r.defaultVoice, "Joanna"),
|
|
3984
|
+
engine: Ee(r.engine, "neural"),
|
|
3985
|
+
format: Ee(r.format, "mp3"),
|
|
3986
|
+
speechMarksMode: Ee(r.speechMarksMode, "word+sentence")
|
|
3987
3987
|
} : n === "google" ? {
|
|
3988
3988
|
...r,
|
|
3989
|
-
defaultVoice:
|
|
3989
|
+
defaultVoice: Ee(r.defaultVoice, "en-US-Wavenet-A")
|
|
3990
3990
|
} : r;
|
|
3991
3991
|
}, xi = (e) => {
|
|
3992
|
-
const t =
|
|
3992
|
+
const t = Es(e), n = Es(t.settings);
|
|
3993
3993
|
return cf({
|
|
3994
3994
|
...t,
|
|
3995
3995
|
...n
|
|
@@ -4597,7 +4597,7 @@ var pf = {
|
|
|
4597
4597
|
Tf,
|
|
4598
4598
|
Sf
|
|
4599
4599
|
];
|
|
4600
|
-
function
|
|
4600
|
+
function kf(e = {}) {
|
|
4601
4601
|
const t = new Ad(), n = {
|
|
4602
4602
|
toolTagMap: {
|
|
4603
4603
|
...fl,
|
|
@@ -4606,18 +4606,18 @@ function Ef(e = {}) {
|
|
|
4606
4606
|
toolComponentFactory: e.toolComponentFactory,
|
|
4607
4607
|
toolComponentFactories: e.toolComponentFactories
|
|
4608
4608
|
}, r = (i) => e.overrides?.[i.toolId] || i;
|
|
4609
|
-
return e.includePackagedTools &&
|
|
4609
|
+
return e.includePackagedTools && Ef(t, {
|
|
4610
4610
|
toolIds: e.toolIds,
|
|
4611
4611
|
applyOverrides: r
|
|
4612
4612
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(n), t;
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4614
|
+
function Ef(e, t = {}) {
|
|
4615
4615
|
const n = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, r = t.applyOverrides || ((i) => i);
|
|
4616
4616
|
for (const i of wf)
|
|
4617
4617
|
n && !n.has(i.toolId) || e.register(r(i));
|
|
4618
4618
|
}
|
|
4619
4619
|
function xf(e = {}) {
|
|
4620
|
-
return
|
|
4620
|
+
return kf({
|
|
4621
4621
|
...e,
|
|
4622
4622
|
includePackagedTools: !0
|
|
4623
4623
|
});
|
|
@@ -4627,7 +4627,7 @@ function Af() {
|
|
|
4627
4627
|
for (const n of e.getAllTools()) for (const r of n.pnpSupportIds || []) t.add(r);
|
|
4628
4628
|
return [...t].sort();
|
|
4629
4629
|
}
|
|
4630
|
-
var Cf = Af(),
|
|
4630
|
+
var Cf = Af(), Eg = {
|
|
4631
4631
|
supports: [...Cf],
|
|
4632
4632
|
prohibitedSupports: [],
|
|
4633
4633
|
activateAtInit: []
|
|
@@ -4835,12 +4835,12 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
4835
4835
|
}
|
|
4836
4836
|
const o = Rf(t);
|
|
4837
4837
|
return {
|
|
4838
|
-
spokenText:
|
|
4838
|
+
spokenText: G(o.text),
|
|
4839
4839
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
4840
4840
|
unsupportedSemantic: n,
|
|
4841
4841
|
hasMarkup: r
|
|
4842
4842
|
};
|
|
4843
|
-
}, Nf = hl(),
|
|
4843
|
+
}, Nf = hl(), kl = /* @__PURE__ */ new Map([
|
|
4844
4844
|
["zero", "0"],
|
|
4845
4845
|
["one", "1"],
|
|
4846
4846
|
["two", "2"],
|
|
@@ -4939,7 +4939,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
4939
4939
|
});
|
|
4940
4940
|
}
|
|
4941
4941
|
return t;
|
|
4942
|
-
}, to = (e) =>
|
|
4942
|
+
}, to = (e) => kl.get(e.normalized) || e.normalized, zf = (e, t) => {
|
|
4943
4943
|
const n = [];
|
|
4944
4944
|
for (let r = 0; r < e.length; r++) {
|
|
4945
4945
|
for (let i = 0; i < t.length; i++) to(e[r]) === to(t[i]) && n.push({
|
|
@@ -4995,8 +4995,8 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
4995
4995
|
if (e.length === 0) return 0;
|
|
4996
4996
|
const r = e.length / Math.max(1, Math.min(t.length, n.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
4997
4997
|
return Math.min(1, r * i);
|
|
4998
|
-
},
|
|
4999
|
-
const t = wl(e.speechText), n =
|
|
4998
|
+
}, El = (e) => {
|
|
4999
|
+
const t = wl(e.speechText), n = G(e.visibleText), r = t.spokenText, i = eo(r), o = eo(n), s = t.unsupportedSemantic ? [] : Df(i, o), a = Wf(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", f = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
5000
5000
|
return {
|
|
5001
5001
|
speechText: e.speechText,
|
|
5002
5002
|
spokenText: r,
|
|
@@ -5012,7 +5012,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5012
5012
|
}, Lo = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, xl = (e) => {
|
|
5013
5013
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5014
5014
|
const t = eo(e)[0];
|
|
5015
|
-
return t ?
|
|
5015
|
+
return t ? kl.get(t.normalized) || t.normalized : null;
|
|
5016
5016
|
}, Ls = (e, t, n) => {
|
|
5017
5017
|
const r = xl(n);
|
|
5018
5018
|
if (!t || !r) return !1;
|
|
@@ -5619,18 +5619,18 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5619
5619
|
}), Pl = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Nl = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", $l = (e) => {
|
|
5620
5620
|
const t = e.tagName?.toLowerCase();
|
|
5621
5621
|
return t === "annotation" || t === "annotation-xml";
|
|
5622
|
-
},
|
|
5622
|
+
}, kh = (e) => {
|
|
5623
5623
|
const t = e.getAttribute("data-mathml");
|
|
5624
5624
|
return t && t.trim() ? t : null;
|
|
5625
|
-
},
|
|
5625
|
+
}, Eh = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, xh = (e) => {
|
|
5626
5626
|
if (e.tagName.toLowerCase() === "math") return Ai(e.outerHTML);
|
|
5627
|
-
const t =
|
|
5627
|
+
const t = kh(e);
|
|
5628
5628
|
if (t) {
|
|
5629
5629
|
const n = Ai(t);
|
|
5630
5630
|
if (n) return n;
|
|
5631
5631
|
}
|
|
5632
5632
|
if (Pl(e)) {
|
|
5633
|
-
const n =
|
|
5633
|
+
const n = Eh(e);
|
|
5634
5634
|
if (n) {
|
|
5635
5635
|
const r = Ai(n);
|
|
5636
5636
|
if (r) return r;
|
|
@@ -5749,7 +5749,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5749
5749
|
if (!$l(o))
|
|
5750
5750
|
for (const s of Array.from(o.childNodes)) r(s);
|
|
5751
5751
|
};
|
|
5752
|
-
return r(t.documentElement),
|
|
5752
|
+
return r(t.documentElement), G(n.join(" "));
|
|
5753
5753
|
}, Lh = (e, t, n) => {
|
|
5754
5754
|
const r = Ll(n), i = (a) => {
|
|
5755
5755
|
if (Nn(a, e)) return;
|
|
@@ -5763,7 +5763,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5763
5763
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5764
5764
|
};
|
|
5765
5765
|
i(e), Wl(r);
|
|
5766
|
-
const o =
|
|
5766
|
+
const o = G(r.chars.join(""));
|
|
5767
5767
|
if (o) return {
|
|
5768
5768
|
text: o,
|
|
5769
5769
|
map: r.map
|
|
@@ -5780,7 +5780,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5780
5780
|
const n = Ll(t), r = [];
|
|
5781
5781
|
let i = 0, o, s = !1;
|
|
5782
5782
|
const a = () => {
|
|
5783
|
-
const u =
|
|
5783
|
+
const u = G(n.chars.slice(i, n.chars.length).join(""));
|
|
5784
5784
|
u && r.push({
|
|
5785
5785
|
type: "text",
|
|
5786
5786
|
text: u,
|
|
@@ -5801,7 +5801,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5801
5801
|
a();
|
|
5802
5802
|
const g = Lh(f, p, t);
|
|
5803
5803
|
Ih(n, g);
|
|
5804
|
-
const m =
|
|
5804
|
+
const m = G(g.text);
|
|
5805
5805
|
r.push({
|
|
5806
5806
|
type: "math",
|
|
5807
5807
|
mathml: p,
|
|
@@ -5859,7 +5859,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5859
5859
|
const t = e.resolveMathSpeech ?? Nh, { visibleText: n } = e, r = [];
|
|
5860
5860
|
let i = 0;
|
|
5861
5861
|
const o = (a) => {
|
|
5862
|
-
const l =
|
|
5862
|
+
const l = G(a), c = n.indexOf(l, i), u = c >= 0 ? c : i, f = u + l.length;
|
|
5863
5863
|
return i = f, {
|
|
5864
5864
|
start: u,
|
|
5865
5865
|
end: f
|
|
@@ -5873,7 +5873,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5873
5873
|
offset: 0
|
|
5874
5874
|
}] : Oo(l.text, { locale: e.language });
|
|
5875
5875
|
for (const m of g) {
|
|
5876
|
-
const b =
|
|
5876
|
+
const b = G(m.text);
|
|
5877
5877
|
if (!b) continue;
|
|
5878
5878
|
const T = o(b);
|
|
5879
5879
|
r.push({
|
|
@@ -5910,7 +5910,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
5910
5910
|
segments: r,
|
|
5911
5911
|
locale: $h(e.language),
|
|
5912
5912
|
visibleText: n,
|
|
5913
|
-
plainSpeechText:
|
|
5913
|
+
plainSpeechText: G(s.join(" "))
|
|
5914
5914
|
};
|
|
5915
5915
|
}, Fh = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Bh = "sre-v1", Uh = 256, oo = (e) => Array.isArray(e) ? `array:[${e.map(oo).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${oo(n)}`).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)}`, Ds = (e, t, n, r) => `${Bh}\0${Fh(e)}\0${t ? "ssml" : "plain"}\0${oo(n ?? null)}\0${r}`, jh = (e = {}) => {
|
|
5916
5916
|
const t = Math.max(1, e.maxEntries ?? Uh), n = e.resolve ?? ((o, s) => vl([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
@@ -6331,7 +6331,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
6331
6331
|
visibleText: t.visibleText
|
|
6332
6332
|
};
|
|
6333
6333
|
}, pp = (e, t) => {
|
|
6334
|
-
const n =
|
|
6334
|
+
const n = El({
|
|
6335
6335
|
speechText: e.spokenText,
|
|
6336
6336
|
visibleText: e.spokenText
|
|
6337
6337
|
});
|
|
@@ -6379,7 +6379,7 @@ var Of = /* @__PURE__ */ new Set([
|
|
|
6379
6379
|
})(z || (z = {}));
|
|
6380
6380
|
var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, _p = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Xl(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, bp = class co {
|
|
6381
6381
|
constructor() {
|
|
6382
|
-
v(this, "currentProvider", null), v(this, "provider", null), v(this, "highlightCoordinator", null), v(this, "highlightTargetResolverProvider", null), v(this, "catalogResolver", null), v(this, "state", z.IDLE), v(this, "ttsConfig", {}), v(this, "currentText", null), v(this, "currentContentElement", null), v(this, "normalizedToDOM", /* @__PURE__ */ new Map()), v(this, "listeners", /* @__PURE__ */ new Map()), v(this, "lastError", null), v(this, "speakRunId", 0), v(this, "currentBoundaryOffset", 0), v(this, "activeWordBoundaryOffset", 0), v(this, "seekSegments", []), v(this, "sentenceHighlightSegments", []), v(this, "currentSeekSegmentIndex", 0), v(this, "activeSentenceStartOffset", null), v(this, "activeHighlightMode", "word"), v(this, "lastRenderedRegionTarget", null), v(this, "telemetryReporter", null), v(this, "generatedMathSpeechResolver", jh());
|
|
6382
|
+
v(this, "currentProvider", null), v(this, "provider", null), v(this, "highlightCoordinator", null), v(this, "highlightTargetResolverProvider", null), v(this, "catalogResolver", null), v(this, "state", z.IDLE), v(this, "ttsConfig", {}), v(this, "currentText", null), v(this, "currentContentElement", null), v(this, "normalizedToDOM", /* @__PURE__ */ new Map()), v(this, "listeners", /* @__PURE__ */ new Map()), v(this, "lastError", null), v(this, "speakRunId", 0), v(this, "currentBoundaryOffset", 0), v(this, "activeWordBoundaryOffset", 0), v(this, "seekSegments", []), v(this, "playbackChunks", []), v(this, "sentenceHighlightSegments", []), v(this, "currentSeekSegmentIndex", 0), v(this, "activeSentenceStartOffset", null), v(this, "activeHighlightMode", "word"), v(this, "lastRenderedRegionTarget", null), v(this, "telemetryReporter", null), v(this, "generatedMathSpeechResolver", jh());
|
|
6383
6383
|
}
|
|
6384
6384
|
debugLog(t, n) {
|
|
6385
6385
|
co.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
|
|
@@ -6754,6 +6754,17 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6754
6754
|
const r = t.playbackSegments.map((i) => i.startOffset).filter((i) => i > 0);
|
|
6755
6755
|
return this.splitSegmentsAtBoundaries(n, r, t.contentToSpeak);
|
|
6756
6756
|
}
|
|
6757
|
+
createSeekSegmentsFromSpeechChunks(t) {
|
|
6758
|
+
let n = 0;
|
|
6759
|
+
return t.map((r) => {
|
|
6760
|
+
const i = G(r.plainFallback?.speechText || (this.hasExplicitBreakSemantics(r.speechText) ? r.visibleText : r.speechText) || r.visibleText) || r.visibleText || "", o = {
|
|
6761
|
+
text: i,
|
|
6762
|
+
startOffset: n,
|
|
6763
|
+
pauseMsAfter: 0
|
|
6764
|
+
};
|
|
6765
|
+
return n += Math.max(1, i.length + 1), o;
|
|
6766
|
+
});
|
|
6767
|
+
}
|
|
6757
6768
|
getCurrentSeekSegmentIndex() {
|
|
6758
6769
|
if (this.seekSegments.length === 0) return 0;
|
|
6759
6770
|
let t = 0;
|
|
@@ -6853,7 +6864,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6853
6864
|
const g = n?.highlightModeOverride || (f ? this.resolveHighlightMode() : "sentence");
|
|
6854
6865
|
this.activeHighlightMode = g, this.activeWordBoundaryOffset = n?.wordBoundaryOffset || 0;
|
|
6855
6866
|
const m = this.hasExplicitBreakSemantics(o), b = !!this.currentContentElement && !c && !m && f;
|
|
6856
|
-
if (this.seekSegments = m || !f ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = m ? [] : this.createSentenceHighlightSegments({
|
|
6867
|
+
if (this.playbackChunks = p?.length ? p : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : m || !f ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = m ? [] : this.createSentenceHighlightSegments({
|
|
6857
6868
|
contentToSpeak: a,
|
|
6858
6869
|
shouldUsePlan: b,
|
|
6859
6870
|
playbackSegments: this.seekSegments
|
|
@@ -6932,7 +6943,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6932
6943
|
}, "updateSettings" in this.provider && typeof this.provider.updateSettings == "function" && await this.provider.updateSettings({ providerOptions: o });
|
|
6933
6944
|
}
|
|
6934
6945
|
async resolveSpeechContent(t, n) {
|
|
6935
|
-
const r =
|
|
6946
|
+
const r = G(t);
|
|
6936
6947
|
if (n?.ignoreCatalogs) return {
|
|
6937
6948
|
contentToSpeak: r,
|
|
6938
6949
|
speechText: r,
|
|
@@ -6952,7 +6963,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6952
6963
|
context: n.catalogContext
|
|
6953
6964
|
});
|
|
6954
6965
|
if (o) {
|
|
6955
|
-
const s = n?.contentElement && tr(n.contentElement, this.getTextProcessingOptions(n.language)).visibleText || r, a =
|
|
6966
|
+
const s = n?.contentElement && tr(n.contentElement, this.getTextProcessingOptions(n.language)).visibleText || r, a = G(o.content);
|
|
6956
6967
|
return this.debugLog(`[TTSService] Using catalog content for "${n.catalogId}" (${o.language})`), {
|
|
6957
6968
|
contentToSpeak: o.content,
|
|
6958
6969
|
speechText: o.content,
|
|
@@ -6986,7 +6997,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6986
6997
|
if (!this.catalogResolver) return null;
|
|
6987
6998
|
const i = this.collectCatalogSpeechChunks(t, r);
|
|
6988
6999
|
if (!i.some((a) => a.sourceElement)) return null;
|
|
6989
|
-
const o =
|
|
7000
|
+
const o = G(i.map((a) => a.speechText).join(" ")), s = tr(t, this.getTextProcessingOptions(r.language)).visibleText || n;
|
|
6990
7001
|
return {
|
|
6991
7002
|
contentToSpeak: o,
|
|
6992
7003
|
speechText: o,
|
|
@@ -7004,7 +7015,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7004
7015
|
const r = [];
|
|
7005
7016
|
let i = "";
|
|
7006
7017
|
const o = () => {
|
|
7007
|
-
const u =
|
|
7018
|
+
const u = G(i);
|
|
7008
7019
|
i = "", u && r.push({
|
|
7009
7020
|
speechText: u,
|
|
7010
7021
|
visibleText: u,
|
|
@@ -7022,7 +7033,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7022
7033
|
}, a = (u, f) => {
|
|
7023
7034
|
const p = l(u);
|
|
7024
7035
|
if (p.length !== 1) return null;
|
|
7025
|
-
const g = p[0], m = tr(g, this.getTextProcessingOptions(n.language)).visibleText ||
|
|
7036
|
+
const g = p[0], m = tr(g, this.getTextProcessingOptions(n.language)).visibleText || G(g.textContent || ""), b = (T) => G(T).replace(/\s+/g, "");
|
|
7026
7037
|
return b(m) === b(f) ? g : null;
|
|
7027
7038
|
}, l = (u) => {
|
|
7028
7039
|
const f = Array.from(u.querySelectorAll("math"));
|
|
@@ -7037,7 +7048,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7037
7048
|
const f = u, p = s(f);
|
|
7038
7049
|
if (p) {
|
|
7039
7050
|
o();
|
|
7040
|
-
const g = tr(f, this.getTextProcessingOptions(n.language)), m = g.visibleText ||
|
|
7051
|
+
const g = tr(f, this.getTextProcessingOptions(n.language)), m = g.visibleText || G(f.textContent || ""), b = El({
|
|
7041
7052
|
speechText: p.content,
|
|
7042
7053
|
visibleText: m
|
|
7043
7054
|
}), T = a(f, m), I = T ? Zr({
|
|
@@ -7049,7 +7060,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7049
7060
|
mathElement: w,
|
|
7050
7061
|
speechText: p.content
|
|
7051
7062
|
})
|
|
7052
|
-
})), J =
|
|
7063
|
+
})), J = G(p.content);
|
|
7053
7064
|
r.push({
|
|
7054
7065
|
speechText: p.content,
|
|
7055
7066
|
visibleText: m,
|
|
@@ -7112,7 +7123,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7112
7123
|
});
|
|
7113
7124
|
}
|
|
7114
7125
|
initializeSpeakTracking(t, n) {
|
|
7115
|
-
this.currentText = t, this.currentContentElement = n?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7126
|
+
this.currentText = t, this.currentContentElement = n?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.playbackChunks = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7116
7127
|
}
|
|
7117
7128
|
prepareHighlightsForSpeak(t) {
|
|
7118
7129
|
if (!this.currentContentElement || !this.highlightCoordinator || (this.buildPositionMap(this.currentContentElement, t.contentToSpeak, t.options?.language), t.highlightMode === "sentence" && t.shouldUsePlan)) return;
|
|
@@ -7257,9 +7268,13 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7257
7268
|
}
|
|
7258
7269
|
async executeSpeakPlayback(t) {
|
|
7259
7270
|
if (t.speechChunks?.length && this.provider) {
|
|
7260
|
-
for (
|
|
7271
|
+
for (let n = 0; n < t.speechChunks.length; n++) {
|
|
7261
7272
|
if (t.runId !== this.speakRunId) return;
|
|
7262
|
-
|
|
7273
|
+
this.currentSeekSegmentIndex = n;
|
|
7274
|
+
const r = this.seekSegments[n];
|
|
7275
|
+
r && (this.currentBoundaryOffset = r.startOffset);
|
|
7276
|
+
const i = t.speechChunks[n];
|
|
7277
|
+
await this.speakCatalogChunk(i, t.runId);
|
|
7263
7278
|
}
|
|
7264
7279
|
return;
|
|
7265
7280
|
}
|
|
@@ -7271,7 +7286,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7271
7286
|
this.provider && await this.provider.speak(t.contentToSpeak);
|
|
7272
7287
|
}
|
|
7273
7288
|
clearHighlightsAndTracking() {
|
|
7274
|
-
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;
|
|
7289
|
+
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;
|
|
7275
7290
|
}
|
|
7276
7291
|
async speakRange(t, n) {
|
|
7277
7292
|
if (!this.provider) throw new Error("TTS service not initialized");
|
|
@@ -7285,7 +7300,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7285
7300
|
if (!i) return;
|
|
7286
7301
|
const o = document.createRange();
|
|
7287
7302
|
o.selectNodeContents(i), o.setEnd(t.startContainer, t.startOffset);
|
|
7288
|
-
const s = o.toString(), a =
|
|
7303
|
+
const s = o.toString(), a = G(s), l = a.length + (/\s$/.test(s) && a ? 1 : 0);
|
|
7289
7304
|
this.debugLog("[TTSService] speakRange offset calculation:", {
|
|
7290
7305
|
selectedText: r,
|
|
7291
7306
|
textBeforeRange: s.substring(0, 100),
|
|
@@ -7308,19 +7323,27 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7308
7323
|
}
|
|
7309
7324
|
async restartFromSeekIndex(t) {
|
|
7310
7325
|
if (!this.provider || this.seekSegments.length === 0) return;
|
|
7311
|
-
const n = Math.max(0, Math.min(this.seekSegments.length - 1, t));
|
|
7326
|
+
const n = Math.max(0, Math.min(this.seekSegments.length - 1, t)), r = this.playbackChunks.length ? this.playbackChunks.slice(n) : null;
|
|
7312
7327
|
this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = n;
|
|
7313
|
-
const
|
|
7328
|
+
const i = ++this.speakRunId, o = this.seekSegments.slice(n);
|
|
7314
7329
|
this.setState(z.PLAYING);
|
|
7315
7330
|
try {
|
|
7316
7331
|
if (this.configureWordBoundaryHighlighting({
|
|
7317
7332
|
highlightMode: this.activeHighlightMode,
|
|
7318
7333
|
wordBoundaryOffset: this.activeWordBoundaryOffset
|
|
7319
|
-
}),
|
|
7334
|
+
}), r) for (let s = 0; s < r.length; s++) {
|
|
7335
|
+
if (i !== this.speakRunId) return;
|
|
7336
|
+
const a = n + s;
|
|
7337
|
+
this.currentSeekSegmentIndex = a;
|
|
7338
|
+
const l = this.seekSegments[a];
|
|
7339
|
+
l && (this.currentBoundaryOffset = l.startOffset), await this.speakCatalogChunk(r[s], i);
|
|
7340
|
+
}
|
|
7341
|
+
else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
|
|
7342
|
+
if (i !== this.speakRunId) return;
|
|
7320
7343
|
this.setState(z.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
|
|
7321
|
-
} catch (
|
|
7322
|
-
if (
|
|
7323
|
-
throw this.lastError =
|
|
7344
|
+
} catch (s) {
|
|
7345
|
+
if (i !== this.speakRunId) return;
|
|
7346
|
+
throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(z.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
|
|
7324
7347
|
}
|
|
7325
7348
|
}
|
|
7326
7349
|
async setPlaybackRate(t) {
|
|
@@ -7343,7 +7366,7 @@ var Xl = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7343
7366
|
await this.seekBy(-n);
|
|
7344
7367
|
}
|
|
7345
7368
|
stop() {
|
|
7346
|
-
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(z.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);
|
|
7369
|
+
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(z.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);
|
|
7347
7370
|
}
|
|
7348
7371
|
requestControlHandoff() {
|
|
7349
7372
|
typeof window > "u" || window.dispatchEvent(new CustomEvent(vp, { detail: { source: "host" } }));
|
|
@@ -7452,7 +7475,7 @@ function Jl(e) {
|
|
|
7452
7475
|
var Mg = typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || Jl("PUBLIC_BUILDER_ORIGIN_URL") || Kl, Tp = typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || Jl("PUBLIC_BUILDER_BUNDLE_URL") || yp, Sp = {
|
|
7453
7476
|
retryDelayMs: 3e3,
|
|
7454
7477
|
timeoutMs: 12e4
|
|
7455
|
-
}, { entries: Zl, setPrototypeOf: Us, isFrozen: wp, getPrototypeOf:
|
|
7478
|
+
}, { entries: Zl, setPrototypeOf: Us, isFrozen: wp, getPrototypeOf: kp, getOwnPropertyDescriptor: Ep } = Object, { freeze: fe, seal: Re, create: nr } = Object, { apply: uo, construct: fo } = typeof Reflect < "u" && Reflect;
|
|
7456
7479
|
fe || (fe = function(t) {
|
|
7457
7480
|
return t;
|
|
7458
7481
|
});
|
|
@@ -7506,12 +7529,12 @@ function Ve(e) {
|
|
|
7506
7529
|
}
|
|
7507
7530
|
function Xn(e, t) {
|
|
7508
7531
|
for (; e !== null; ) {
|
|
7509
|
-
const r =
|
|
7532
|
+
const r = Ep(e, t);
|
|
7510
7533
|
if (r) {
|
|
7511
7534
|
if (r.get) return he(r.get);
|
|
7512
7535
|
if (typeof r.value == "function") return he(r.value);
|
|
7513
7536
|
}
|
|
7514
|
-
e =
|
|
7537
|
+
e = kp(e);
|
|
7515
7538
|
}
|
|
7516
7539
|
function n() {
|
|
7517
7540
|
return null;
|
|
@@ -8203,14 +8226,14 @@ var Gs = fe([
|
|
|
8203
8226
|
};
|
|
8204
8227
|
function tc() {
|
|
8205
8228
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Bp();
|
|
8206
|
-
const t = (
|
|
8229
|
+
const t = (k) => tc(k);
|
|
8207
8230
|
if (t.version = "3.4.0", t.removed = [], !e || !e.document || e.document.nodeType !== Kn.document || !e.Element)
|
|
8208
8231
|
return t.isSupported = !1, t;
|
|
8209
8232
|
let { document: n } = e;
|
|
8210
8233
|
const r = n, i = r.currentScript, { DocumentFragment: o, HTMLTemplateElement: s, Node: a, Element: l, NodeFilter: c, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: g } = e, m = l.prototype, b = Xn(m, "cloneNode"), T = Xn(m, "remove"), I = Xn(m, "nextSibling"), W = Xn(m, "childNodes"), J = Xn(m, "parentNode");
|
|
8211
8234
|
if (typeof s == "function") {
|
|
8212
|
-
const
|
|
8213
|
-
|
|
8235
|
+
const k = n.createElement("template");
|
|
8236
|
+
k.content && k.content.ownerDocument && (n = k.content.ownerDocument);
|
|
8214
8237
|
}
|
|
8215
8238
|
let w, X = "";
|
|
8216
8239
|
const { implementation: le, createNodeIterator: an, createDocumentFragment: ln, getElementsByTagName: cn } = n, { importNode: li } = r;
|
|
@@ -8430,8 +8453,8 @@ function tc() {
|
|
|
8430
8453
|
}, gi = function(d) {
|
|
8431
8454
|
return typeof a == "function" && d instanceof a;
|
|
8432
8455
|
};
|
|
8433
|
-
function at(
|
|
8434
|
-
Vn(
|
|
8456
|
+
function at(k, d, _) {
|
|
8457
|
+
Vn(k, (S) => {
|
|
8435
8458
|
S.call(t, d, _, mn);
|
|
8436
8459
|
});
|
|
8437
8460
|
}
|
|
@@ -8555,28 +8578,28 @@ function tc() {
|
|
|
8555
8578
|
at(te.uponSanitizeShadowNode, _, null), Fo(_), jo(_), _.content instanceof o && Go(_.content);
|
|
8556
8579
|
at(te.afterSanitizeShadowDOM, d, null);
|
|
8557
8580
|
};
|
|
8558
|
-
return t.sanitize = function(
|
|
8581
|
+
return t.sanitize = function(k) {
|
|
8559
8582
|
let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = null, S = null, j = null, H = null;
|
|
8560
|
-
if (Wn = !
|
|
8561
|
-
if (
|
|
8583
|
+
if (Wn = !k, Wn && (k = "<!-->"), typeof k != "string" && !gi(k)) if (typeof k.toString == "function") {
|
|
8584
|
+
if (k = k.toString(), typeof k != "string") throw Yn("dirty is not a string, aborting");
|
|
8562
8585
|
} else throw Yn("toString is not a function");
|
|
8563
|
-
if (!t.isSupported) return
|
|
8564
|
-
if ($t || hi(d), t.removed = [], typeof
|
|
8565
|
-
if (
|
|
8566
|
-
const ee = Z(
|
|
8586
|
+
if (!t.isSupported) return k;
|
|
8587
|
+
if ($t || hi(d), t.removed = [], typeof k == "string" && (zt = !1), zt) {
|
|
8588
|
+
if (k.nodeName) {
|
|
8589
|
+
const ee = Z(k.nodeName);
|
|
8567
8590
|
if (!N[ee] || Pt[ee]) throw Yn("root node is forbidden and cannot be sanitized in-place");
|
|
8568
8591
|
}
|
|
8569
|
-
} else if (
|
|
8570
|
-
_ = Wo("<!---->"), S = _.ownerDocument.importNode(
|
|
8592
|
+
} else if (k instanceof a)
|
|
8593
|
+
_ = Wo("<!---->"), S = _.ownerDocument.importNode(k, !0), S.nodeType === Kn.element && S.nodeName === "BODY" || S.nodeName === "HTML" ? _ = S : _.appendChild(S);
|
|
8571
8594
|
else {
|
|
8572
|
-
if (!Tt && !tt && !Pe &&
|
|
8573
|
-
if (_ = Wo(
|
|
8595
|
+
if (!Tt && !tt && !Pe && k.indexOf("<") === -1) return w && St ? w.createHTML(k) : k;
|
|
8596
|
+
if (_ = Wo(k), !_) return Tt ? null : St ? X : "";
|
|
8574
8597
|
}
|
|
8575
8598
|
_ && fn && Ne(_.firstChild);
|
|
8576
|
-
const Se = Ho(zt ?
|
|
8599
|
+
const Se = Ho(zt ? k : _);
|
|
8577
8600
|
for (; j = Se.nextNode(); )
|
|
8578
8601
|
Fo(j), jo(j), j.content instanceof o && Go(j.content);
|
|
8579
|
-
if (zt) return
|
|
8602
|
+
if (zt) return k;
|
|
8580
8603
|
if (Tt) {
|
|
8581
8604
|
if (tt) {
|
|
8582
8605
|
_.normalize();
|
|
@@ -8607,18 +8630,18 @@ function tc() {
|
|
|
8607
8630
|
hi(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), $t = !0;
|
|
8608
8631
|
}, t.clearConfig = function() {
|
|
8609
8632
|
mn = null, $t = !1;
|
|
8610
|
-
}, t.isValidAttribute = function(
|
|
8611
|
-
return mn || hi({}), Bo(Z(
|
|
8612
|
-
}, t.addHook = function(
|
|
8613
|
-
typeof d == "function" && qn(te[
|
|
8614
|
-
}, t.removeHook = function(
|
|
8633
|
+
}, t.isValidAttribute = function(k, d, _) {
|
|
8634
|
+
return mn || hi({}), Bo(Z(k), Z(d), _);
|
|
8635
|
+
}, t.addHook = function(k, d) {
|
|
8636
|
+
typeof d == "function" && qn(te[k], d);
|
|
8637
|
+
}, t.removeHook = function(k, d) {
|
|
8615
8638
|
if (d !== void 0) {
|
|
8616
|
-
const _ = xp(te[
|
|
8617
|
-
return _ === -1 ? void 0 : Ap(te[
|
|
8639
|
+
const _ = xp(te[k], d);
|
|
8640
|
+
return _ === -1 ? void 0 : Ap(te[k], _, 1)[0];
|
|
8618
8641
|
}
|
|
8619
|
-
return js(te[
|
|
8620
|
-
}, t.removeHooks = function(
|
|
8621
|
-
te[
|
|
8642
|
+
return js(te[k]);
|
|
8643
|
+
}, t.removeHooks = function(k) {
|
|
8644
|
+
te[k] = [];
|
|
8622
8645
|
}, t.removeAllHooks = function() {
|
|
8623
8646
|
te = Ks();
|
|
8624
8647
|
}, t;
|
|
@@ -8852,13 +8875,13 @@ function ug(e, t) {
|
|
|
8852
8875
|
fa(t, !0), ed(e, cg);
|
|
8853
8876
|
let n = xr(t, "visible", 7, !1), r = xr(t, "toolId", 7, "textToSpeech"), i = xr(t, "coordinator", 7), o = xr(t, "ttsService", 7);
|
|
8854
8877
|
const s = typeof window < "u";
|
|
8855
|
-
let a = /* @__PURE__ */
|
|
8878
|
+
let a = /* @__PURE__ */ Y(void 0), l = /* @__PURE__ */ Y(void 0), c = /* @__PURE__ */ Y(!1), u = /* @__PURE__ */ Y(Mt({
|
|
8856
8879
|
x: s ? window.innerWidth - 320 : 400,
|
|
8857
8880
|
y: 100
|
|
8858
|
-
})), f = /* @__PURE__ */
|
|
8881
|
+
})), f = /* @__PURE__ */ Y(Mt({
|
|
8859
8882
|
x: 0,
|
|
8860
8883
|
y: 0
|
|
8861
|
-
})), p = /* @__PURE__ */
|
|
8884
|
+
})), p = /* @__PURE__ */ Y(!1), g = /* @__PURE__ */ Y(!1), m = /* @__PURE__ */ Y(!1), b = /* @__PURE__ */ Y(""), T = /* @__PURE__ */ Y(1), I = /* @__PURE__ */ Y(!1), W = /* @__PURE__ */ Y(null), J = /* @__PURE__ */ Y(!1), w = null;
|
|
8862
8885
|
Or(() => {
|
|
8863
8886
|
i() && r() && !y(J) && (i().registerTool(r(), "Text-to-Speech", void 0, Qi.MODAL), P(J, !0));
|
|
8864
8887
|
}), Zu(async () => {
|
|
@@ -8974,18 +8997,18 @@ function ug(e, t) {
|
|
|
8974
8997
|
o(x), er();
|
|
8975
8998
|
}
|
|
8976
8999
|
}, mr = ju(), vr = os(mr), di = (x) => {
|
|
8977
|
-
var N = lg(), yt = se(N), U =
|
|
9000
|
+
var N = lg(), yt = se(N), U = ke(se(yt), 2);
|
|
8978
9001
|
_s(U, (ie) => P(l, ie), () => y(l)), oe(yt);
|
|
8979
|
-
var $n =
|
|
8980
|
-
var be = Qp(), et =
|
|
8981
|
-
oe(et), oe(be), Un(() =>
|
|
9002
|
+
var $n = ke(yt, 2), F = se($n), Pt = (ie) => {
|
|
9003
|
+
var be = Qp(), et = ke(se(be), 2), dn = se(et, !0);
|
|
9004
|
+
oe(et), oe(be), Un(() => kr(dn, y(W))), me(ie, be);
|
|
8982
9005
|
}, un = (ie) => {
|
|
8983
9006
|
var be = eg();
|
|
8984
9007
|
me(ie, be);
|
|
8985
9008
|
}, Ue = (ie) => {
|
|
8986
9009
|
var be = ag(), et = os(be), dn = se(et), tt = (K) => {
|
|
8987
|
-
var ne = tg(), ot =
|
|
8988
|
-
oe(ot), oe(ne), Un(() =>
|
|
9010
|
+
var ne = tg(), ot = ke(se(ne), 2), wt = se(ot);
|
|
9011
|
+
oe(ot), oe(ne), Un(() => kr(wt, `${y(b).length ?? ""} characters selected`)), me(K, ne);
|
|
8989
9012
|
}, Nt = (K) => {
|
|
8990
9013
|
var ne = ng();
|
|
8991
9014
|
me(K, ne);
|
|
@@ -8993,11 +9016,11 @@ function ug(e, t) {
|
|
|
8993
9016
|
_n(dn, (K) => {
|
|
8994
9017
|
y(I) ? K(tt) : K(Nt, -1);
|
|
8995
9018
|
}), oe(et);
|
|
8996
|
-
var Pe =
|
|
9019
|
+
var Pe = ke(et, 2), $t = se(Pe), fn = ke(se($t), 2), Tt = se(fn, !0);
|
|
8997
9020
|
oe(fn), oe($t);
|
|
8998
|
-
var nt =
|
|
9021
|
+
var nt = ke($t, 2);
|
|
8999
9022
|
cd(nt), oe(Pe);
|
|
9000
|
-
var St =
|
|
9023
|
+
var St = ke(Pe, 2), hn = se(St), rt = ke(hn, 2), fi = se(rt), zn = (K) => {
|
|
9001
9024
|
var ne = rg();
|
|
9002
9025
|
zi(2), me(K, ne);
|
|
9003
9026
|
}, zt = (K) => {
|
|
@@ -9007,9 +9030,9 @@ function ug(e, t) {
|
|
|
9007
9030
|
_n(fi, (K) => {
|
|
9008
9031
|
y(m) ? K(zn) : K(zt, -1);
|
|
9009
9032
|
}), oe(rt);
|
|
9010
|
-
var it =
|
|
9033
|
+
var it = ke(rt, 2);
|
|
9011
9034
|
oe(St);
|
|
9012
|
-
var ye =
|
|
9035
|
+
var ye = ke(St, 2), Dn = (K) => {
|
|
9013
9036
|
var ne = sg();
|
|
9014
9037
|
let ot;
|
|
9015
9038
|
var wt = se(ne), pn = se(wt), gn = (je) => {
|
|
@@ -9022,15 +9045,15 @@ function ug(e, t) {
|
|
|
9022
9045
|
_n(pn, (je) => {
|
|
9023
9046
|
y(m) ? je(gn) : je(Te, -1);
|
|
9024
9047
|
}), oe(wt);
|
|
9025
|
-
var st =
|
|
9048
|
+
var st = ke(wt, 2), Wn = se(st, !0);
|
|
9026
9049
|
oe(st), oe(ne), Un(() => {
|
|
9027
|
-
ot = rd(ne, 1, "pie-tool-text-to-speech__status-indicator svelte-xk676z", null, ot, { "pie-tool-text-to-speech__status-indicator--paused": y(m) }),
|
|
9050
|
+
ot = rd(ne, 1, "pie-tool-text-to-speech__status-indicator svelte-xk676z", null, ot, { "pie-tool-text-to-speech__status-indicator--paused": y(m) }), kr(Wn, y(m) ? "Paused" : "Speaking...");
|
|
9028
9051
|
}), me(K, ne);
|
|
9029
9052
|
};
|
|
9030
9053
|
_n(ye, (K) => {
|
|
9031
9054
|
y(g) && K(Dn);
|
|
9032
9055
|
}), Un(() => {
|
|
9033
|
-
|
|
9056
|
+
kr(Tt, y(ci)), ud(nt, y(T)), nt.disabled = y(g), hn.disabled = !y(I) || y(g), rt.disabled = !y(g), Yi(rt, "aria-label", y(m) ? "Resume" : "Pause"), it.disabled = !y(g);
|
|
9034
9057
|
}), vn("input", nt, cn), vn("click", hn, le), vn("click", rt, an), vn("click", it, ln), me(ie, be);
|
|
9035
9058
|
};
|
|
9036
9059
|
_n(F, (ie) => {
|