@pie-players/pie-tool-graph 0.3.47 → 0.3.48
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-graph.js +823 -800
- package/package.json +4 -4
package/dist/tool-graph.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { t as y } from "./defineProperty-Dt7ri80W.js";
|
|
2
|
-
var
|
|
2
|
+
var Wa = Object.create, Lo = Object.defineProperty, Ha = Object.getOwnPropertyDescriptor, Ba = Object.getOwnPropertyNames, Da = Object.getPrototypeOf, Fa = Object.prototype.hasOwnProperty, sh = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ja = (e, t, r, n) => {
|
|
3
3
|
if (t && typeof t == "object" || typeof t == "function")
|
|
4
|
-
for (var i =
|
|
5
|
-
a = i[o], !
|
|
4
|
+
for (var i = Ba(t), o = 0, s = i.length, a; o < s; o++)
|
|
5
|
+
a = i[o], !Fa.call(e, a) && a !== r && Lo(e, a, {
|
|
6
6
|
get: ((l) => t[l]).bind(null, a),
|
|
7
|
-
enumerable: !(n =
|
|
7
|
+
enumerable: !(n = Ha(t, a)) || n.enumerable
|
|
8
8
|
});
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, Va = (e, t, r) => (r = e != null ? Wa(Da(e)) : {}, ja(t || !e || !e.__esModule ? Lo(r, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : r, e)),
|
|
13
|
+
}) : r, e)), ah = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
|
|
14
14
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
15
15
|
throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
16
16
|
});
|
|
17
17
|
if (typeof window < "u") {
|
|
18
|
-
var
|
|
19
|
-
((
|
|
18
|
+
var Di, Fi;
|
|
19
|
+
((Di = (Fi = window).__svelte ?? (Fi.__svelte = {})).v ?? (Di.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Vt = {}, J = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var Po = Array.isArray,
|
|
22
|
+
var Po = Array.isArray, qa = Array.prototype.indexOf, Nr = Array.prototype.includes, rn = Array.from, zr = Object.keys, Wr = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, Ua = Object.getOwnPropertyDescriptors, Ga = Object.prototype, Ya = Array.prototype, No = Object.getPrototypeOf, ji = Object.isExtensible, Ka = () => {
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function Xa(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
26
26
|
}
|
|
27
27
|
function zo() {
|
|
@@ -34,55 +34,55 @@ function zo() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var lh = 1 << 24, be = 1024, we = 2048, Lt = 4096, fi = 8192, Ja = 16384, di = 32768, Vi = 1 << 25, hi = 65536, ch = 1 << 17, uh = 1 << 18, Xt = 1 << 19, Qa = 1 << 20, ur = 1 << 25, yr = 65536, qi = 1 << 21, Za = 1 << 22, Hr = 1 << 23, fr = /* @__PURE__ */ Symbol("$state"), Wo = /* @__PURE__ */ Symbol("legacy props"), el = /* @__PURE__ */ Symbol(""), tl = /* @__PURE__ */ Symbol("proxy path"), Wn = /* @__PURE__ */ Symbol("attributes"), Hn = /* @__PURE__ */ Symbol("class"), Bn = /* @__PURE__ */ Symbol("style"), Or = /* @__PURE__ */ Symbol("text"), dr = /* @__PURE__ */ Symbol("form reset");
|
|
38
38
|
var nn = new class extends Error {
|
|
39
39
|
constructor(...t) {
|
|
40
40
|
super(...t), y(this, "name", "StaleReactionError"), y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
41
41
|
}
|
|
42
|
-
}(),
|
|
43
|
-
function
|
|
42
|
+
}(), rl = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
43
|
+
function nl() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function il(e, t, r) {
|
|
47
47
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ol(e) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function sl() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function al(e) {
|
|
56
56
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ll() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function cl() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ul(e) {
|
|
65
65
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function fl() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function dl() {
|
|
71
71
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function hl() {
|
|
74
74
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function pl() {
|
|
77
77
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function gl() {
|
|
80
80
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
81
81
|
}
|
|
82
82
|
function on(e) {
|
|
83
83
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function vl() {
|
|
86
86
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
87
87
|
}
|
|
88
88
|
var L = !1;
|
|
@@ -105,13 +105,13 @@ function de(e) {
|
|
|
105
105
|
P = e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ml(e = 1) {
|
|
109
109
|
if (L) {
|
|
110
110
|
for (var t = e, r = P; t--; ) r = /* @__PURE__ */ We(r);
|
|
111
111
|
P = r;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Br(e = !0) {
|
|
115
115
|
for (var t = 0, r = P; ; ) {
|
|
116
116
|
if (r.nodeType === 8) {
|
|
117
117
|
var n = r.data;
|
|
@@ -129,21 +129,21 @@ function Ho(e) {
|
|
|
129
129
|
throw on(), Vt;
|
|
130
130
|
return e.data;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Bo(e) {
|
|
133
133
|
return e === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function yl(e, t) {
|
|
136
136
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
return !
|
|
138
|
+
function Do(e) {
|
|
139
|
+
return !yl(e, this.v);
|
|
140
140
|
}
|
|
141
141
|
var Ce = !1, an = !1;
|
|
142
142
|
function Ui(e, t) {
|
|
143
|
-
return e.label = t,
|
|
143
|
+
return e.label = t, bl(e.v, t), e;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return e?.[
|
|
145
|
+
function bl(e, t) {
|
|
146
|
+
return e?.[tl]?.(t), e;
|
|
147
147
|
}
|
|
148
148
|
var K = null;
|
|
149
149
|
function qt(e) {
|
|
@@ -179,7 +179,7 @@ function br() {
|
|
|
179
179
|
var yt = [];
|
|
180
180
|
function Vo() {
|
|
181
181
|
var e = yt;
|
|
182
|
-
yt = [],
|
|
182
|
+
yt = [], Xa(e);
|
|
183
183
|
}
|
|
184
184
|
function Ye(e) {
|
|
185
185
|
if (yt.length === 0 && !hr) {
|
|
@@ -190,7 +190,7 @@ function Ye(e) {
|
|
|
190
190
|
}
|
|
191
191
|
yt.push(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function _l() {
|
|
194
194
|
for (; yt.length > 0; ) Vo();
|
|
195
195
|
}
|
|
196
196
|
function qo(e) {
|
|
@@ -216,9 +216,9 @@ function lt(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
throw e;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var Tl = ~(we | Lt | be);
|
|
220
220
|
function V(e, t) {
|
|
221
|
-
e.f = e.f &
|
|
221
|
+
e.f = e.f & Tl | t;
|
|
222
222
|
}
|
|
223
223
|
function pi(e) {
|
|
224
224
|
(e.f & 512) !== 0 || e.deps === null ? V(e, be) : V(e, Lt);
|
|
@@ -231,8 +231,8 @@ function Uo(e) {
|
|
|
231
231
|
function Go(e, t, r) {
|
|
232
232
|
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Uo(e.deps), V(e, be);
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
234
|
+
var wl = !1, Sr = !1;
|
|
235
|
+
function Sl(e) {
|
|
236
236
|
var t = Sr;
|
|
237
237
|
try {
|
|
238
238
|
return Sr = !1, [e(), Sr];
|
|
@@ -259,10 +259,10 @@ function k(e, t, r) {
|
|
|
259
259
|
function h(e, t) {
|
|
260
260
|
return e.get(O(e, t));
|
|
261
261
|
}
|
|
262
|
-
var Ko,
|
|
263
|
-
var
|
|
262
|
+
var Ko, Dr = null, Wt = null, E = null, Fr = null, oe = null, Dn = null, hr = !1, _n = !1, Ut = null, jr = null, Xo = 0;
|
|
263
|
+
var kl = 1, Vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakSet(), Pt = class Jo {
|
|
264
264
|
constructor() {
|
|
265
|
-
gi(this, q), y(this, "id",
|
|
265
|
+
gi(this, q), y(this, "id", kl++), x(this, Vr, !1), y(this, "linked", !0), x(this, St, null), x(this, bt, null), y(this, "async_deriveds", /* @__PURE__ */ new Map()), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), x(this, qr, /* @__PURE__ */ new Set()), x(this, kr, /* @__PURE__ */ new Set()), x(this, Ht, 0), x(this, mt, /* @__PURE__ */ new Map()), x(this, or, null), x(this, ge, []), x(this, Fn, []), x(this, Ot, /* @__PURE__ */ new Set()), x(this, Ue, /* @__PURE__ */ new Set()), x(this, at, /* @__PURE__ */ new Map()), x(this, Ir, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), x(this, sr, !1), Wt === null ? Dr = Wt = this : (k(bt, Wt, this), k(St, this, Wt)), Wt = this;
|
|
266
266
|
}
|
|
267
267
|
skip_effect(t) {
|
|
268
268
|
h(at, this).has(t) || h(at, this).set(t, {
|
|
@@ -294,7 +294,7 @@ var Sl = 1, Vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap
|
|
|
294
294
|
try {
|
|
295
295
|
_n = !0, E = this, O(q, this, Ur).call(this);
|
|
296
296
|
} finally {
|
|
297
|
-
Xo = 0,
|
|
297
|
+
Xo = 0, Dn = null, Ut = null, jr = null, _n = !1, E = null, oe = null, Et.clear();
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
discard() {
|
|
@@ -349,7 +349,7 @@ var Sl = 1, Vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap
|
|
|
349
349
|
}
|
|
350
350
|
oe = /* @__PURE__ */ new Map();
|
|
351
351
|
for (const [r, [n]] of this.current) oe.set(r, n);
|
|
352
|
-
for (let r =
|
|
352
|
+
for (let r = Dr; r !== null; r = h(bt, r))
|
|
353
353
|
if (!(r === this || r.is_fork)) {
|
|
354
354
|
var t = !1;
|
|
355
355
|
if (r.id < this.id) {
|
|
@@ -364,14 +364,14 @@ var Sl = 1, Vr = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
schedule(t) {
|
|
367
|
-
if (
|
|
367
|
+
if (Dn = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
|
|
368
368
|
t.b.defer_effect(t);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
371
|
for (var r = t; r.parent !== null; ) {
|
|
372
372
|
r = r.parent;
|
|
373
373
|
var n = r.f;
|
|
374
|
-
if (Ut !== null && r === C && (Ce || (R === null || (R.f & 2) === 0) && !
|
|
374
|
+
if (Ut !== null && r === C && (Ce || (R === null || (R.f & 2) === 0) && !wl))
|
|
375
375
|
return;
|
|
376
376
|
if ((n & 96) !== 0) {
|
|
377
377
|
if ((n & 1024) === 0) return;
|
|
@@ -397,7 +397,7 @@ function Gi() {
|
|
|
397
397
|
return !1;
|
|
398
398
|
}
|
|
399
399
|
function Ur() {
|
|
400
|
-
k(Vr, this, !0), Xo++ > 1e3 && (O(q, this, Gr).call(this),
|
|
400
|
+
k(Vr, this, !0), Xo++ > 1e3 && (O(q, this, Gr).call(this), Ml());
|
|
401
401
|
for (const a of h(Ot, this))
|
|
402
402
|
h(Ue, this).delete(a), V(a, we), this.schedule(a);
|
|
403
403
|
for (const a of h(Ue, this))
|
|
@@ -420,16 +420,16 @@ function Ur() {
|
|
|
420
420
|
n.length > 0 && O(q, E, Ur).call(E);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const o = O(q, this,
|
|
423
|
+
const o = O(q, this, xl).call(this);
|
|
424
424
|
if (o) {
|
|
425
|
-
O(q, this, ar).call(this, r), O(q, this, ar).call(this, t), O(q, o,
|
|
425
|
+
O(q, this, ar).call(this, r), O(q, this, ar).call(this, t), O(q, o, El).call(o, this);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
h(Ot, this).clear(), h(Ue, this).clear();
|
|
429
429
|
for (const a of h(qr, this)) a(this);
|
|
430
430
|
h(qr, this).clear(), Fr = this, Yi(r), Yi(t), Fr = null, h(or, this)?.resolve();
|
|
431
431
|
var s = E;
|
|
432
|
-
if (h(Ht, this) === 0 && (h(ge, this).length === 0 || s !== null) && (O(q, this, Gr).call(this), Ce && (O(q, this,
|
|
432
|
+
if (h(Ht, this) === 0 && (h(ge, this).length === 0 || s !== null) && (O(q, this, Gr).call(this), Ce && (O(q, this, Al).call(this), E = s)), h(ge, this).length > 0) if (s !== null) {
|
|
433
433
|
const a = s;
|
|
434
434
|
h(ge, a).push(...h(ge, this).filter((l) => !h(ge, a).includes(l)));
|
|
435
435
|
} else s = this;
|
|
@@ -457,7 +457,7 @@ function Qo(e, t, r) {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function xl() {
|
|
461
461
|
for (var e = h(St, this); e !== null; ) {
|
|
462
462
|
if (!e.is_fork) {
|
|
463
463
|
for (const [t, [, r]] of this.current) if (e.current.has(t) && !r) return e;
|
|
@@ -466,7 +466,7 @@ function kl() {
|
|
|
466
466
|
}
|
|
467
467
|
return null;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function El(e) {
|
|
470
470
|
for (const [r, n] of e.current)
|
|
471
471
|
!this.previous.has(r) && e.previous.has(r) && this.previous.set(r, e.previous.get(r)), this.current.set(r, n);
|
|
472
472
|
for (const [r, n] of e.async_deriveds) {
|
|
@@ -492,8 +492,8 @@ function xl(e) {
|
|
|
492
492
|
function ar(e) {
|
|
493
493
|
for (var t = 0; t < e.length; t += 1) Go(e[t], h(Ot, this), h(Ue, this));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
for (let c =
|
|
495
|
+
function Al() {
|
|
496
|
+
for (let c = Dr; c !== null; c = h(bt, c)) {
|
|
497
497
|
var e = c.id < this.id, t = [];
|
|
498
498
|
for (const [u, [f, d]] of this.current) {
|
|
499
499
|
if (c.current.has(u)) {
|
|
@@ -538,7 +538,7 @@ function El() {
|
|
|
538
538
|
function Gr() {
|
|
539
539
|
if (this.linked) {
|
|
540
540
|
var e = h(St, this), t = h(bt, this);
|
|
541
|
-
e === null ?
|
|
541
|
+
e === null ? Dr = t : k(bt, e, t), t === null ? Wt = e : k(St, t, e), this.linked = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
function Yr(e) {
|
|
@@ -547,23 +547,23 @@ function Yr(e) {
|
|
|
547
547
|
try {
|
|
548
548
|
var r;
|
|
549
549
|
for (e && (E !== null && !E.is_fork && E.flush(), r = e()); ; ) {
|
|
550
|
-
if (
|
|
550
|
+
if (_l(), E === null) return r;
|
|
551
551
|
E.flush();
|
|
552
552
|
}
|
|
553
553
|
} finally {
|
|
554
554
|
hr = t;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Ml() {
|
|
558
558
|
if (0) {
|
|
559
559
|
var e;
|
|
560
560
|
for (const r of E.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
561
561
|
var t;
|
|
562
562
|
}
|
|
563
563
|
try {
|
|
564
|
-
|
|
564
|
+
ll();
|
|
565
565
|
} catch (r) {
|
|
566
|
-
lt(r,
|
|
566
|
+
lt(r, Dn);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
var Le = null;
|
|
@@ -623,7 +623,7 @@ function ts(e) {
|
|
|
623
623
|
for (var t = e.first; t !== null; )
|
|
624
624
|
ts(t), t = t.next;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Cl(e) {
|
|
627
627
|
let t = 0, r = It(0), n;
|
|
628
628
|
return () => {
|
|
629
629
|
Si() && (g(r), cn(() => (t === 0 && (n = un(() => e(() => pr(r)))), t += 1, () => {
|
|
@@ -633,13 +633,13 @@ function Ml(e) {
|
|
|
633
633
|
})));
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
638
|
-
new
|
|
636
|
+
var Ol = hi | Xt;
|
|
637
|
+
function Il(e, t, r, n) {
|
|
638
|
+
new $l(e, t, r, n);
|
|
639
639
|
}
|
|
640
|
-
var Ae = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(),
|
|
640
|
+
var Ae = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), $l = class {
|
|
641
641
|
constructor(e, t, r, n) {
|
|
642
|
-
gi(this, ne), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), x(this, Ae, void 0), x(this, jn, L ? P : null), x(this, Pe, void 0), x(this, gr, void 0), x(this, ve, void 0), x(this, Ne, null), x(this, ue, null), x(this, xe, null), x(this, kt, null), x(this,
|
|
642
|
+
gi(this, ne), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), x(this, Ae, void 0), x(this, jn, L ? P : null), x(this, Pe, void 0), x(this, gr, void 0), x(this, ve, void 0), x(this, Ne, null), x(this, ue, null), x(this, xe, null), x(this, kt, null), x(this, Bt, 0), x(this, xt, 0), x(this, xr, !1), x(this, Vn, /* @__PURE__ */ new Set()), x(this, qn, /* @__PURE__ */ new Set()), x(this, ht, null), x(this, Ki, Cl(() => (k(ht, this, It(h(Bt, this))), () => {
|
|
643
643
|
k(ht, this, null);
|
|
644
644
|
}))), k(Ae, this, e), k(Pe, this, t), k(gr, this, (i) => {
|
|
645
645
|
var o = C;
|
|
@@ -651,10 +651,10 @@ var Ae = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe =
|
|
|
651
651
|
const o = i.data === "[!";
|
|
652
652
|
if (i.data.startsWith("[?")) {
|
|
653
653
|
const s = JSON.parse(i.data.slice(2));
|
|
654
|
-
O(ne, this,
|
|
655
|
-
} else o ? O(ne, this,
|
|
654
|
+
O(ne, this, Ll).call(this, s);
|
|
655
|
+
} else o ? O(ne, this, Pl).call(this) : O(ne, this, Rl).call(this);
|
|
656
656
|
} else O(ne, this, rs).call(this);
|
|
657
|
-
},
|
|
657
|
+
}, Ol)), L && k(Ae, this, P);
|
|
658
658
|
}
|
|
659
659
|
defer_effect(e) {
|
|
660
660
|
Go(e, h(Vn, this), h(qn, this));
|
|
@@ -666,8 +666,8 @@ var Ae = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe =
|
|
|
666
666
|
return !!h(Pe, this).pending;
|
|
667
667
|
}
|
|
668
668
|
update_pending_count(e, t) {
|
|
669
|
-
O(ne, this, ns).call(this, e, t), k(
|
|
670
|
-
k(xr, this, !1), h(ht, this) && Gt(h(ht, this), h(
|
|
669
|
+
O(ne, this, ns).call(this, e, t), k(Bt, this, h(Bt, this) + e), !(!h(ht, this) || h(xr, this)) && (k(xr, this, !0), Ye(() => {
|
|
670
|
+
k(xr, this, !1), h(ht, this) && Gt(h(ht, this), h(Bt, this));
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
get_effect_pending() {
|
|
@@ -680,21 +680,21 @@ var Ae = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe =
|
|
|
680
680
|
})) : O(ne, this, Xi).call(this, e);
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
|
-
function
|
|
683
|
+
function Rl() {
|
|
684
684
|
try {
|
|
685
685
|
k(Ne, this, _e(() => h(gr, this).call(this, h(Ae, this))));
|
|
686
686
|
} catch (e) {
|
|
687
687
|
this.error(e);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Ll(e) {
|
|
691
691
|
const t = h(Pe, this).failed;
|
|
692
692
|
t && k(xe, this, _e(() => {
|
|
693
693
|
t(h(Ae, this), () => e, () => () => {
|
|
694
694
|
});
|
|
695
695
|
}));
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Pl() {
|
|
698
698
|
const e = h(Pe, this).pending;
|
|
699
699
|
e && (this.is_pending = !0, k(ue, this, _e(() => e(h(Ae, this)))), Ye(() => {
|
|
700
700
|
var t = k(kt, this, document.createDocumentFragment()), r = ye();
|
|
@@ -705,7 +705,7 @@ function Ll() {
|
|
|
705
705
|
}
|
|
706
706
|
function rs() {
|
|
707
707
|
try {
|
|
708
|
-
if (this.is_pending = this.has_pending_snippet(), k(xt, this, 0), k(
|
|
708
|
+
if (this.is_pending = this.has_pending_snippet(), k(xt, this, 0), k(Bt, this, 0), k(Ne, this, _e(() => {
|
|
709
709
|
h(gr, this).call(this, h(Ae, this));
|
|
710
710
|
})), h(xt, this) > 0) {
|
|
711
711
|
var e = k(kt, this, document.createDocumentFragment());
|
|
@@ -744,16 +744,16 @@ function ns(e, t) {
|
|
|
744
744
|
}), h(kt, this) && (h(Ae, this).before(h(kt, this)), k(kt, this, null)));
|
|
745
745
|
}
|
|
746
746
|
function Xi(e) {
|
|
747
|
-
h(Ne, this) && (se(h(Ne, this)), k(Ne, this, null)), h(ue, this) && (se(h(ue, this)), k(ue, this, null)), h(xe, this) && (se(h(xe, this)), k(xe, this, null)), L && (le(h(jn, this)),
|
|
747
|
+
h(Ne, this) && (se(h(Ne, this)), k(Ne, this, null)), h(ue, this) && (se(h(ue, this)), k(ue, this, null)), h(xe, this) && (se(h(xe, this)), k(xe, this, null)), L && (le(h(jn, this)), ml(), le(Br()));
|
|
748
748
|
var t = h(Pe, this).onerror;
|
|
749
749
|
let r = h(Pe, this).failed;
|
|
750
750
|
var n = !1, i = !1;
|
|
751
751
|
const o = () => {
|
|
752
752
|
if (n) {
|
|
753
|
-
|
|
753
|
+
vl();
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
n = !0, i &&
|
|
756
|
+
n = !0, i && pl(), h(xe, this) !== null && Nt(h(xe, this), () => {
|
|
757
757
|
k(xe, this, null);
|
|
758
758
|
}), O(ne, this, Un).call(this, () => {
|
|
759
759
|
O(ne, this, rs).call(this);
|
|
@@ -786,14 +786,14 @@ function Xi(e) {
|
|
|
786
786
|
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => lt(l, h(ve, this) && h(ve, this).parent)) : s(a);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function Nl(e, t, r, n) {
|
|
790
790
|
const i = br() ? vr : bi;
|
|
791
791
|
var o = e.filter((d) => !d.settled);
|
|
792
792
|
if (r.length === 0 && o.length === 0) {
|
|
793
793
|
n(t.map(i));
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
var s = C, a =
|
|
796
|
+
var s = C, a = zl(), l = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((d) => d.promise)) : null;
|
|
797
797
|
function c(d) {
|
|
798
798
|
if ((s.f & 16384) === 0) {
|
|
799
799
|
a();
|
|
@@ -811,13 +811,13 @@ function Pl(e, t, r, n) {
|
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
813
|
function f() {
|
|
814
|
-
Promise.all(r.map((d) => /* @__PURE__ */
|
|
814
|
+
Promise.all(r.map((d) => /* @__PURE__ */ Wl(d))).then((d) => c([...t.map(i), ...d])).catch((d) => lt(d, s)).finally(u);
|
|
815
815
|
}
|
|
816
816
|
l ? l.then(() => {
|
|
817
817
|
a(), f(), Kr();
|
|
818
818
|
}) : f();
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function zl() {
|
|
821
821
|
var e = C, t = R, r = K, n = E;
|
|
822
822
|
if (0) var i;
|
|
823
823
|
return function(s = !0) {
|
|
@@ -840,7 +840,7 @@ function vr(e) {
|
|
|
840
840
|
ctx: K,
|
|
841
841
|
deps: null,
|
|
842
842
|
effects: null,
|
|
843
|
-
equals:
|
|
843
|
+
equals: Bo,
|
|
844
844
|
f: t,
|
|
845
845
|
fn: e,
|
|
846
846
|
reactions: null,
|
|
@@ -853,11 +853,11 @@ function vr(e) {
|
|
|
853
853
|
}
|
|
854
854
|
var Er = /* @__PURE__ */ Symbol("obsolete");
|
|
855
855
|
// @__NO_SIDE_EFFECTS__
|
|
856
|
-
function
|
|
856
|
+
function Wl(e, t, r) {
|
|
857
857
|
let n = C;
|
|
858
|
-
n === null &&
|
|
858
|
+
n === null && nl();
|
|
859
859
|
var i = void 0, o = It(J), s = !R, a = /* @__PURE__ */ new Set();
|
|
860
|
-
return
|
|
860
|
+
return Jl(() => {
|
|
861
861
|
var l = C, c = zo();
|
|
862
862
|
i = c.promise;
|
|
863
863
|
try {
|
|
@@ -874,8 +874,8 @@ function zl(e, t, r) {
|
|
|
874
874
|
else for (const p of a.values()) p.reject(Er);
|
|
875
875
|
a.add(c), u.async_deriveds.set(l, c);
|
|
876
876
|
}
|
|
877
|
-
const d = (p,
|
|
878
|
-
f?.(), a.delete(c),
|
|
877
|
+
const d = (p, v = void 0) => {
|
|
878
|
+
f?.(), a.delete(c), v !== Er && (u.activate(), v ? (o.f |= Hr, Gt(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= Hr), Gt(o, p)), u.deactivate());
|
|
879
879
|
};
|
|
880
880
|
c.promise.then(d, (p) => d(null, p || "unknown"));
|
|
881
881
|
}), vs(() => {
|
|
@@ -898,9 +898,9 @@ function er(e) {
|
|
|
898
898
|
// @__NO_SIDE_EFFECTS__
|
|
899
899
|
function bi(e) {
|
|
900
900
|
const t = /* @__PURE__ */ vr(e);
|
|
901
|
-
return t.equals =
|
|
901
|
+
return t.equals = Do, t;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function Hl(e) {
|
|
904
904
|
var t = e.effects;
|
|
905
905
|
if (t !== null) {
|
|
906
906
|
e.effects = null;
|
|
@@ -910,10 +910,10 @@ function Wl(e) {
|
|
|
910
910
|
function _i(e) {
|
|
911
911
|
var t, r = C, n = e.parent;
|
|
912
912
|
if (!Ke && n !== null && e.v !== J && (n.f & 24576) !== 0)
|
|
913
|
-
return
|
|
913
|
+
return gl(), e.v;
|
|
914
914
|
ze(n);
|
|
915
915
|
try {
|
|
916
|
-
e.f &= ~yr,
|
|
916
|
+
e.f &= ~yr, Hl(e), t = As(e);
|
|
917
917
|
} finally {
|
|
918
918
|
ze(r);
|
|
919
919
|
}
|
|
@@ -927,9 +927,9 @@ function os(e) {
|
|
|
927
927
|
}
|
|
928
928
|
Ke || (oe !== null ? (Si() || E?.is_fork) && oe.set(e, t) : pi(e));
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Bl(e) {
|
|
931
931
|
if (e.effects !== null)
|
|
932
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(nn), t.fn !== null && (t.teardown =
|
|
932
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(nn), t.fn !== null && (t.teardown = Ka), t.ac = null, mr(t, 0), xi(t));
|
|
933
933
|
}
|
|
934
934
|
function ss(e) {
|
|
935
935
|
if (e.effects !== null)
|
|
@@ -942,7 +942,7 @@ function It(e, t) {
|
|
|
942
942
|
f: 0,
|
|
943
943
|
v: e,
|
|
944
944
|
reactions: null,
|
|
945
|
-
equals:
|
|
945
|
+
equals: Bo,
|
|
946
946
|
rv: 0,
|
|
947
947
|
wv: 0
|
|
948
948
|
};
|
|
@@ -956,14 +956,14 @@ function U(e, t) {
|
|
|
956
956
|
// @__NO_SIDE_EFFECTS__
|
|
957
957
|
function ls(e, t = !1, r = !0) {
|
|
958
958
|
const n = It(e);
|
|
959
|
-
if (t || (n.equals =
|
|
959
|
+
if (t || (n.equals = Do), an && r && K !== null && K.l !== null) {
|
|
960
960
|
var i;
|
|
961
961
|
((i = K.l).s ?? (i.s = [])).push(n);
|
|
962
962
|
}
|
|
963
963
|
return n;
|
|
964
964
|
}
|
|
965
965
|
function M(e, t, r = !1) {
|
|
966
|
-
R !== null && (!Ee || (R.f & 131072) !== 0) && br() && (R.f & 4325394) !== 0 && (Me === null || !Me.has(e)) &&
|
|
966
|
+
R !== null && (!Ee || (R.f & 131072) !== 0) && br() && (R.f & 4325394) !== 0 && (Me === null || !Me.has(e)) && hl();
|
|
967
967
|
let n = r ? ct(t) : t;
|
|
968
968
|
return Gt(e, n, jr);
|
|
969
969
|
}
|
|
@@ -975,7 +975,7 @@ function Gt(e, t, r = null) {
|
|
|
975
975
|
const i = e;
|
|
976
976
|
(e.f & 2048) !== 0 && _i(i), oe === null && pi(i);
|
|
977
977
|
}
|
|
978
|
-
e.wv = xs(), cs(e, we, r), br() && C !== null && (C.f & 1024) !== 0 && (C.f & 96) === 0 && (pe === null ?
|
|
978
|
+
e.wv = xs(), cs(e, we, r), br() && C !== null && (C.f & 1024) !== 0 && (C.f & 96) === 0 && (pe === null ? tc([e]) : pe.push(e)), !n.is_fork && Xr.size > 0 && !as && Dl();
|
|
979
979
|
}
|
|
980
980
|
return t;
|
|
981
981
|
}
|
|
@@ -993,7 +993,7 @@ function Dl() {
|
|
|
993
993
|
}
|
|
994
994
|
Xr.clear();
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Fl(e, t = 1) {
|
|
997
997
|
var r = g(e), n = t === 1 ? r++ : r--;
|
|
998
998
|
return M(e, r), n;
|
|
999
999
|
}
|
|
@@ -1018,17 +1018,17 @@ function cs(e, t, r) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
var
|
|
1021
|
+
var jl = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
1022
1022
|
function ct(e) {
|
|
1023
1023
|
if (typeof e != "object" || e === null || fr in e) return e;
|
|
1024
1024
|
const t = No(e);
|
|
1025
|
-
if (t !==
|
|
1025
|
+
if (t !== Ga && t !== Ya) return e;
|
|
1026
1026
|
var r = /* @__PURE__ */ new Map(), n = Po(e), i = /* @__PURE__ */ U(0), o = null, s = At, a = (f) => {
|
|
1027
1027
|
if (At === s) return f();
|
|
1028
1028
|
var d = R, p = At;
|
|
1029
1029
|
Te(null), to(s);
|
|
1030
|
-
var
|
|
1031
|
-
return Te(d), to(p),
|
|
1030
|
+
var v = f();
|
|
1031
|
+
return Te(d), to(p), v;
|
|
1032
1032
|
};
|
|
1033
1033
|
n && r.set("length", /* @__PURE__ */ U(e.length, o));
|
|
1034
1034
|
var l = "";
|
|
@@ -1036,25 +1036,25 @@ function ct(e) {
|
|
|
1036
1036
|
function u(f) {
|
|
1037
1037
|
if (!c) {
|
|
1038
1038
|
c = !0, l = f, Ui(i, `${l} version`);
|
|
1039
|
-
for (const [d, p] of r) Ui(p,
|
|
1039
|
+
for (const [d, p] of r) Ui(p, Vl(l, d));
|
|
1040
1040
|
c = !1;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
return new Proxy(e, {
|
|
1044
1044
|
defineProperty(f, d, p) {
|
|
1045
|
-
(!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) &&
|
|
1046
|
-
var
|
|
1047
|
-
return
|
|
1045
|
+
(!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) && fl();
|
|
1046
|
+
var v = r.get(d);
|
|
1047
|
+
return v === void 0 ? a(() => {
|
|
1048
1048
|
var b = /* @__PURE__ */ U(p.value, o);
|
|
1049
1049
|
return r.set(d, b), b;
|
|
1050
|
-
}) : M(
|
|
1050
|
+
}) : M(v, p.value, !0), !0;
|
|
1051
1051
|
},
|
|
1052
1052
|
deleteProperty(f, d) {
|
|
1053
1053
|
var p = r.get(d);
|
|
1054
1054
|
if (p === void 0) {
|
|
1055
1055
|
if (d in f) {
|
|
1056
|
-
const
|
|
1057
|
-
r.set(d,
|
|
1056
|
+
const v = a(() => /* @__PURE__ */ U(J, o));
|
|
1057
|
+
r.set(d, v), pr(i);
|
|
1058
1058
|
}
|
|
1059
1059
|
} else
|
|
1060
1060
|
M(p, J), pr(i);
|
|
@@ -1062,27 +1062,27 @@ function ct(e) {
|
|
|
1062
1062
|
},
|
|
1063
1063
|
get(f, d, p) {
|
|
1064
1064
|
if (d === fr) return e;
|
|
1065
|
-
var
|
|
1066
|
-
if (
|
|
1065
|
+
var v = r.get(d), b = d in f;
|
|
1066
|
+
if (v === void 0 && (!b || wt(f, d)?.writable) && (v = a(() => {
|
|
1067
1067
|
var _ = /* @__PURE__ */ U(ct(b ? f[d] : J), o);
|
|
1068
1068
|
return _;
|
|
1069
|
-
}), r.set(d,
|
|
1070
|
-
var
|
|
1071
|
-
return
|
|
1069
|
+
}), r.set(d, v)), v !== void 0) {
|
|
1070
|
+
var m = g(v);
|
|
1071
|
+
return m === J ? void 0 : m;
|
|
1072
1072
|
}
|
|
1073
1073
|
return Reflect.get(f, d, p);
|
|
1074
1074
|
},
|
|
1075
1075
|
getOwnPropertyDescriptor(f, d) {
|
|
1076
1076
|
var p = Reflect.getOwnPropertyDescriptor(f, d);
|
|
1077
1077
|
if (p && "value" in p) {
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1078
|
+
var v = r.get(d);
|
|
1079
|
+
v && (p.value = g(v));
|
|
1080
1080
|
} else if (p === void 0) {
|
|
1081
|
-
var b = r.get(d),
|
|
1082
|
-
if (b !== void 0 &&
|
|
1081
|
+
var b = r.get(d), m = b?.v;
|
|
1082
|
+
if (b !== void 0 && m !== J) return {
|
|
1083
1083
|
enumerable: !0,
|
|
1084
1084
|
configurable: !0,
|
|
1085
|
-
value:
|
|
1085
|
+
value: m,
|
|
1086
1086
|
writable: !0
|
|
1087
1087
|
};
|
|
1088
1088
|
}
|
|
@@ -1090,27 +1090,27 @@ function ct(e) {
|
|
|
1090
1090
|
},
|
|
1091
1091
|
has(f, d) {
|
|
1092
1092
|
if (d === fr) return !0;
|
|
1093
|
-
var p = r.get(d),
|
|
1094
|
-
return (p !== void 0 || C !== null && (!
|
|
1095
|
-
var b = /* @__PURE__ */ U(
|
|
1093
|
+
var p = r.get(d), v = p !== void 0 && p.v !== J || Reflect.has(f, d);
|
|
1094
|
+
return (p !== void 0 || C !== null && (!v || wt(f, d)?.writable)) && (p === void 0 && (p = a(() => {
|
|
1095
|
+
var b = /* @__PURE__ */ U(v ? ct(f[d]) : J, o);
|
|
1096
1096
|
return b;
|
|
1097
|
-
}), r.set(d, p)), g(p) === J) ? !1 :
|
|
1097
|
+
}), r.set(d, p)), g(p) === J) ? !1 : v;
|
|
1098
1098
|
},
|
|
1099
|
-
set(f, d, p,
|
|
1100
|
-
var b = r.get(d),
|
|
1099
|
+
set(f, d, p, v) {
|
|
1100
|
+
var b = r.get(d), m = d in f;
|
|
1101
1101
|
if (n && d === "length") for (var _ = p; _ < b.v; _ += 1) {
|
|
1102
1102
|
var N = r.get(_ + "");
|
|
1103
1103
|
N !== void 0 ? M(N, J) : _ in f && (N = a(() => /* @__PURE__ */ U(J, o)), r.set(_ + "", N));
|
|
1104
1104
|
}
|
|
1105
1105
|
if (b === void 0)
|
|
1106
|
-
(!
|
|
1106
|
+
(!m || wt(f, d)?.writable) && (b = a(() => /* @__PURE__ */ U(void 0, o)), M(b, ct(p)), r.set(d, b));
|
|
1107
1107
|
else {
|
|
1108
|
-
|
|
1109
|
-
var
|
|
1110
|
-
M(b,
|
|
1108
|
+
m = b.v !== J;
|
|
1109
|
+
var B = a(() => ct(p));
|
|
1110
|
+
M(b, B);
|
|
1111
1111
|
}
|
|
1112
1112
|
var w = Reflect.getOwnPropertyDescriptor(f, d);
|
|
1113
|
-
if (w?.set && w.set.call(
|
|
1113
|
+
if (w?.set && w.set.call(v, p), !m) {
|
|
1114
1114
|
if (n && typeof d == "string") {
|
|
1115
1115
|
var F = r.get("length"), j = Number(d);
|
|
1116
1116
|
Number.isInteger(j) && j >= F.v && M(F, j + 1);
|
|
@@ -1122,26 +1122,26 @@ function ct(e) {
|
|
|
1122
1122
|
ownKeys(f) {
|
|
1123
1123
|
g(i);
|
|
1124
1124
|
var d = Reflect.ownKeys(f).filter((b) => {
|
|
1125
|
-
var
|
|
1126
|
-
return
|
|
1125
|
+
var m = r.get(b);
|
|
1126
|
+
return m === void 0 || m.v !== J;
|
|
1127
1127
|
});
|
|
1128
|
-
for (var [p,
|
|
1128
|
+
for (var [p, v] of r) v.v !== J && !(p in f) && d.push(p);
|
|
1129
1129
|
return d;
|
|
1130
1130
|
},
|
|
1131
1131
|
setPrototypeOf() {
|
|
1132
|
-
|
|
1132
|
+
dl();
|
|
1133
1133
|
}
|
|
1134
1134
|
});
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` :
|
|
1136
|
+
function Vl(e, t) {
|
|
1137
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : jl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1138
1138
|
}
|
|
1139
|
-
var Ji,
|
|
1139
|
+
var Ji, ql, us, fs, ds;
|
|
1140
1140
|
function Gn() {
|
|
1141
1141
|
if (Ji === void 0) {
|
|
1142
|
-
Ji = window,
|
|
1142
|
+
Ji = window, ql = document, us = /Firefox/.test(navigator.userAgent);
|
|
1143
1143
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1144
|
-
fs = wt(t, "firstChild").get, ds = wt(t, "nextSibling").get, ji(e) && (e[Hn] = void 0, e[Wn] = null, e[
|
|
1144
|
+
fs = wt(t, "firstChild").get, ds = wt(t, "nextSibling").get, ji(e) && (e[Hn] = void 0, e[Wn] = null, e[Bn] = void 0, e.__e = void 0), ji(r) && (r[Or] = void 0);
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
function ye(e = "") {
|
|
@@ -1225,17 +1225,17 @@ function ln(e) {
|
|
|
1225
1225
|
Te(t), ze(r);
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1228
|
+
function Ul(e, t, r, n = r) {
|
|
1229
1229
|
e.addEventListener(t, () => ln(r));
|
|
1230
1230
|
const i = e[dr];
|
|
1231
1231
|
i ? e[dr] = () => {
|
|
1232
1232
|
i(), n(!0);
|
|
1233
1233
|
} : e[dr] = () => n(!0), gs();
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
C === null && (R === null &&
|
|
1235
|
+
function Gl(e) {
|
|
1236
|
+
C === null && (R === null && al(e), sl()), Ke && ol(e);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function Yl(e, t) {
|
|
1239
1239
|
var r = t.last;
|
|
1240
1240
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1241
1241
|
}
|
|
@@ -1269,7 +1269,7 @@ function He(e, t) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= hi));
|
|
1271
1271
|
}
|
|
1272
|
-
if (i !== null && (i.parent = r, r !== null &&
|
|
1272
|
+
if (i !== null && (i.parent = r, r !== null && Yl(i, r), R !== null && (R.f & 2) !== 0 && (e & 64) === 0)) {
|
|
1273
1273
|
var o = R;
|
|
1274
1274
|
(o.effects ?? (o.effects = [])).push(i);
|
|
1275
1275
|
}
|
|
@@ -1283,7 +1283,7 @@ function vs(e) {
|
|
|
1283
1283
|
return V(t, be), t.teardown = e, t;
|
|
1284
1284
|
}
|
|
1285
1285
|
function Zi(e) {
|
|
1286
|
-
|
|
1286
|
+
Gl("$effect");
|
|
1287
1287
|
var t = C.f;
|
|
1288
1288
|
if (!R && (t & 32) !== 0 && K !== null && !K.i) {
|
|
1289
1289
|
var r = K;
|
|
@@ -1291,16 +1291,16 @@ function Zi(e) {
|
|
|
1291
1291
|
} else return ms(e);
|
|
1292
1292
|
}
|
|
1293
1293
|
function ms(e) {
|
|
1294
|
-
return He(4 |
|
|
1294
|
+
return He(4 | Qa, e);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function Kl(e) {
|
|
1297
1297
|
Pt.ensure();
|
|
1298
1298
|
const t = He(64 | Xt, e);
|
|
1299
1299
|
return () => {
|
|
1300
1300
|
se(t);
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Xl(e) {
|
|
1304
1304
|
Pt.ensure();
|
|
1305
1305
|
const t = He(64 | Xt, e);
|
|
1306
1306
|
return (r = {}) => new Promise((n) => {
|
|
@@ -1312,14 +1312,14 @@ function Kl(e) {
|
|
|
1312
1312
|
function ys(e) {
|
|
1313
1313
|
return He(4, e);
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
return He(
|
|
1315
|
+
function Jl(e) {
|
|
1316
|
+
return He(Za | Xt, e);
|
|
1317
1317
|
}
|
|
1318
1318
|
function cn(e, t = 0) {
|
|
1319
1319
|
return He(8 | t, e);
|
|
1320
1320
|
}
|
|
1321
1321
|
function je(e, t = [], r = [], n = []) {
|
|
1322
|
-
|
|
1322
|
+
Nl(n, t, r, (i) => {
|
|
1323
1323
|
He(8, () => e(...i.map(g)));
|
|
1324
1324
|
});
|
|
1325
1325
|
}
|
|
@@ -1353,7 +1353,7 @@ function xi(e, t = !1) {
|
|
|
1353
1353
|
(r.f & 64) !== 0 ? r.parent = null : se(r, t), r = n;
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Ql(e) {
|
|
1357
1357
|
for (var t = e.first; t !== null; ) {
|
|
1358
1358
|
var r = t.next;
|
|
1359
1359
|
(t.f & 32) === 0 && se(t), t = r;
|
|
@@ -1361,14 +1361,14 @@ function Jl(e) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
function se(e, t = !0) {
|
|
1363
1363
|
var r = !1;
|
|
1364
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (
|
|
1364
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Zl(e.nodes.start, e.nodes.end), r = !0), V(e, Vi), xi(e, t && !r), mr(e, 0);
|
|
1365
1365
|
var n = e.nodes && e.nodes.t;
|
|
1366
1366
|
if (n !== null) for (const o of n) o.stop();
|
|
1367
|
-
bs(e), e.f ^= Vi, e.f |=
|
|
1367
|
+
bs(e), e.f ^= Vi, e.f |= Ja;
|
|
1368
1368
|
var i = e.parent;
|
|
1369
1369
|
i !== null && i.first !== null && _s(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Zl(e, t) {
|
|
1372
1372
|
for (; e !== null; ) {
|
|
1373
1373
|
var r = e === t ? null : /* @__PURE__ */ We(e);
|
|
1374
1374
|
e.remove(), e = r;
|
|
@@ -1427,7 +1427,7 @@ function Ei(e, t) {
|
|
|
1427
1427
|
t.append(r), r = i;
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
|
-
var
|
|
1430
|
+
var ec = null, $r = !1, Ke = !1;
|
|
1431
1431
|
function eo(e) {
|
|
1432
1432
|
Ke = e;
|
|
1433
1433
|
}
|
|
@@ -1444,7 +1444,7 @@ function Ss(e) {
|
|
|
1444
1444
|
R !== null && (!Ce || (R.f & 2) !== 0) && (Me ?? (Me = /* @__PURE__ */ new Set())).add(e);
|
|
1445
1445
|
}
|
|
1446
1446
|
var ae = null, ce = 0, pe = null;
|
|
1447
|
-
function
|
|
1447
|
+
function tc(e) {
|
|
1448
1448
|
pe = e;
|
|
1449
1449
|
}
|
|
1450
1450
|
var ks = 1, _t = 0, At = _t;
|
|
@@ -1485,32 +1485,32 @@ function As(e) {
|
|
|
1485
1485
|
e.f |= di;
|
|
1486
1486
|
var d = e.deps, p = E?.is_fork;
|
|
1487
1487
|
if (ae !== null) {
|
|
1488
|
-
var
|
|
1488
|
+
var v;
|
|
1489
1489
|
if (p || mr(e, ce), d !== null && ce > 0)
|
|
1490
|
-
for (d.length = ce + ae.length,
|
|
1490
|
+
for (d.length = ce + ae.length, v = 0; v < ae.length; v++) d[ce + v] = ae[v];
|
|
1491
1491
|
else e.deps = d = ae;
|
|
1492
|
-
if (Si() && (e.f & 512) !== 0) for (
|
|
1492
|
+
if (Si() && (e.f & 512) !== 0) for (v = ce; v < d.length; v++) {
|
|
1493
1493
|
var b;
|
|
1494
|
-
((b = d[
|
|
1494
|
+
((b = d[v]).reactions ?? (b.reactions = [])).push(e);
|
|
1495
1495
|
}
|
|
1496
1496
|
} else !p && d !== null && ce < d.length && (mr(e, ce), d.length = ce);
|
|
1497
|
-
if (br() && pe !== null && !Ee && d !== null && (e.f & 6146) === 0) for (
|
|
1497
|
+
if (br() && pe !== null && !Ee && d !== null && (e.f & 6146) === 0) for (v = 0; v < pe.length; v++) Es(pe[v], e);
|
|
1498
1498
|
if (i !== null && i !== e) {
|
|
1499
|
-
if (_t++, i.deps !== null) for (let
|
|
1500
|
-
if (t !== null) for (const
|
|
1499
|
+
if (_t++, i.deps !== null) for (let m = 0; m < r; m += 1) i.deps[m].rv = _t;
|
|
1500
|
+
if (t !== null) for (const m of t) m.rv = _t;
|
|
1501
1501
|
pe !== null && (n === null ? n = pe : n.push(...pe));
|
|
1502
1502
|
}
|
|
1503
1503
|
return (e.f & 8388608) !== 0 && (e.f ^= Hr), f;
|
|
1504
|
-
} catch (
|
|
1505
|
-
return qo(
|
|
1504
|
+
} catch (m) {
|
|
1505
|
+
return qo(m);
|
|
1506
1506
|
} finally {
|
|
1507
1507
|
e.f ^= qi, ae = t, ce = r, pe = n, R = i, Me = o, qt(s), Ee = a, At = l;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function rc(e, t) {
|
|
1511
1511
|
let r = t.reactions;
|
|
1512
1512
|
if (r !== null) {
|
|
1513
|
-
var n =
|
|
1513
|
+
var n = qa.call(r, e);
|
|
1514
1514
|
if (n !== -1) {
|
|
1515
1515
|
var i = r.length - 1;
|
|
1516
1516
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
@@ -1518,13 +1518,13 @@ function tc(e, t) {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
if (r === null && (t.f & 2) !== 0 && (ae === null || !Nr.call(ae, t))) {
|
|
1520
1520
|
var o = t;
|
|
1521
|
-
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~yr), o.v !== J && pi(o),
|
|
1521
|
+
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~yr), o.v !== J && pi(o), Bl(o), mr(o, 0);
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
function mr(e, t) {
|
|
1525
1525
|
var r = e.deps;
|
|
1526
1526
|
if (r !== null)
|
|
1527
|
-
for (var n = t; n < r.length; n++)
|
|
1527
|
+
for (var n = t; n < r.length; n++) rc(e, r[n]);
|
|
1528
1528
|
}
|
|
1529
1529
|
function Yt(e) {
|
|
1530
1530
|
var t = e.f;
|
|
@@ -1534,7 +1534,7 @@ function Yt(e) {
|
|
|
1534
1534
|
if (C = e, $r = !0, 0)
|
|
1535
1535
|
var i, o;
|
|
1536
1536
|
try {
|
|
1537
|
-
(t & 16777232) !== 0 ?
|
|
1537
|
+
(t & 16777232) !== 0 ? Ql(e) : xi(e), bs(e);
|
|
1538
1538
|
var s = As(e);
|
|
1539
1539
|
if (e.teardown = typeof s == "function" ? s : null, e.wv = ks, 0)
|
|
1540
1540
|
for (var a of e.deps) ;
|
|
@@ -1543,7 +1543,7 @@ function Yt(e) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
async function
|
|
1546
|
+
async function nc() {
|
|
1547
1547
|
if (Ce) return new Promise((e) => {
|
|
1548
1548
|
requestAnimationFrame(() => e()), setTimeout(() => e());
|
|
1549
1549
|
});
|
|
@@ -1551,7 +1551,7 @@ async function rc() {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
function g(e) {
|
|
1553
1553
|
var t = (e.f & 2) !== 0;
|
|
1554
|
-
if (
|
|
1554
|
+
if (ec?.add(e), R !== null && !Ee && !(C !== null && (C.f & 16384) !== 0) && (Me === null || !Me.has(e))) {
|
|
1555
1555
|
var r = R.deps;
|
|
1556
1556
|
if ((R.f & 2097152) !== 0)
|
|
1557
1557
|
e.rv < _t && (e.rv = _t, ae === null && r !== null && r[ce] === e ? ce++ : ae === null ? ae = [e] : ae.push(e));
|
|
@@ -1605,7 +1605,7 @@ function un(e) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
var Ft = /* @__PURE__ */ Symbol("events"), Os = /* @__PURE__ */ new Set(), Yn = /* @__PURE__ */ new Set();
|
|
1608
|
-
function
|
|
1608
|
+
function ic(e, t, r, n = {}) {
|
|
1609
1609
|
function i(o) {
|
|
1610
1610
|
if (n.capture || Kn.call(t, o), !o.cancelBubble) return ln(() => r?.call(this, o));
|
|
1611
1611
|
}
|
|
@@ -1613,11 +1613,11 @@ function nc(e, t, r, n = {}) {
|
|
|
1613
1613
|
t.addEventListener(e, i, n);
|
|
1614
1614
|
}) : t.addEventListener(e, i, n), i;
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function oc(e, t, r, n, i) {
|
|
1617
1617
|
var o = {
|
|
1618
1618
|
capture: n,
|
|
1619
1619
|
passive: i
|
|
1620
|
-
}, s =
|
|
1620
|
+
}, s = ic(e, t, r, o);
|
|
1621
1621
|
(t === document.body || t === window || t === document || t instanceof HTMLMediaElement) && vs(() => {
|
|
1622
1622
|
t.removeEventListener(e, s, o);
|
|
1623
1623
|
});
|
|
@@ -1625,7 +1625,7 @@ function ic(e, t, r, n, i) {
|
|
|
1625
1625
|
function pt(e, t, r) {
|
|
1626
1626
|
(t[Ft] ?? (t[Ft] = {}))[e] = r;
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function sc(e) {
|
|
1629
1629
|
for (var t = 0; t < e.length; t++) Os.add(e[t]);
|
|
1630
1630
|
for (var r of Yn) r(e);
|
|
1631
1631
|
}
|
|
@@ -1656,8 +1656,8 @@ function Kn(e) {
|
|
|
1656
1656
|
try {
|
|
1657
1657
|
for (var d, p = []; o !== null && o !== t; ) {
|
|
1658
1658
|
try {
|
|
1659
|
-
var
|
|
1660
|
-
|
|
1659
|
+
var v = o[Ft]?.[n];
|
|
1660
|
+
v != null && (!o.disabled || e.target === o) && v.call(o, e);
|
|
1661
1661
|
} catch (b) {
|
|
1662
1662
|
d ? p.push(b) : d = b;
|
|
1663
1663
|
}
|
|
@@ -1675,13 +1675,13 @@ function Kn(e) {
|
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
var
|
|
1679
|
-
function
|
|
1680
|
-
return
|
|
1678
|
+
var ac = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1679
|
+
function lc(e) {
|
|
1680
|
+
return ac?.createHTML(e) ?? e;
|
|
1681
1681
|
}
|
|
1682
1682
|
function Is(e) {
|
|
1683
1683
|
var t = Ti("template");
|
|
1684
|
-
return t.innerHTML =
|
|
1684
|
+
return t.innerHTML = lc(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1685
1685
|
}
|
|
1686
1686
|
function Ge(e, t) {
|
|
1687
1687
|
var r = C;
|
|
@@ -1708,7 +1708,7 @@ function $s(e, t) {
|
|
|
1708
1708
|
};
|
|
1709
1709
|
}
|
|
1710
1710
|
// @__NO_SIDE_EFFECTS__
|
|
1711
|
-
function
|
|
1711
|
+
function cc(e, t, r = "svg") {
|
|
1712
1712
|
var n = !e.startsWith("<!>"), i = (t & 1) !== 0, o = `<${r}>${n ? e : "<!>" + e}</${r}>`, s;
|
|
1713
1713
|
return () => {
|
|
1714
1714
|
if (L)
|
|
@@ -1729,7 +1729,7 @@ function lc(e, t, r = "svg") {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
// @__NO_SIDE_EFFECTS__
|
|
1731
1731
|
function Oe(e, t) {
|
|
1732
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ cc(e, t, "svg");
|
|
1733
1733
|
}
|
|
1734
1734
|
function wn() {
|
|
1735
1735
|
if (L)
|
|
@@ -1745,7 +1745,7 @@ function ee(e, t) {
|
|
|
1745
1745
|
}
|
|
1746
1746
|
e !== null && e.before(t);
|
|
1747
1747
|
}
|
|
1748
|
-
var
|
|
1748
|
+
var uc = [
|
|
1749
1749
|
"allowfullscreen",
|
|
1750
1750
|
"async",
|
|
1751
1751
|
"autofocus",
|
|
@@ -1774,8 +1774,8 @@ var cc = [
|
|
|
1774
1774
|
"defer",
|
|
1775
1775
|
"disablepictureinpicture",
|
|
1776
1776
|
"disableremoteplayback"
|
|
1777
|
-
],
|
|
1778
|
-
...
|
|
1777
|
+
], dh = [
|
|
1778
|
+
...uc,
|
|
1779
1779
|
"formNoValidate",
|
|
1780
1780
|
"isMap",
|
|
1781
1781
|
"noModule",
|
|
@@ -1790,17 +1790,17 @@ var cc = [
|
|
|
1790
1790
|
"allowFullscreen",
|
|
1791
1791
|
"disablePictureInPicture",
|
|
1792
1792
|
"disableRemotePlayback"
|
|
1793
|
-
],
|
|
1794
|
-
function
|
|
1795
|
-
return
|
|
1793
|
+
], fc = ["touchstart", "touchmove"];
|
|
1794
|
+
function dc(e) {
|
|
1795
|
+
return fc.includes(e);
|
|
1796
1796
|
}
|
|
1797
|
-
var
|
|
1797
|
+
var hc = [
|
|
1798
1798
|
"$state",
|
|
1799
1799
|
"$state.raw",
|
|
1800
1800
|
"$derived",
|
|
1801
1801
|
"$derived.by"
|
|
1802
|
-
],
|
|
1803
|
-
...
|
|
1802
|
+
], hh = [
|
|
1803
|
+
...hc,
|
|
1804
1804
|
"$state.eager",
|
|
1805
1805
|
"$state.snapshot",
|
|
1806
1806
|
"$props",
|
|
@@ -1816,14 +1816,14 @@ var dc = [
|
|
|
1816
1816
|
"$inspect.trace",
|
|
1817
1817
|
"$host"
|
|
1818
1818
|
], no = !0;
|
|
1819
|
-
function
|
|
1819
|
+
function pc(e, t) {
|
|
1820
1820
|
var r, n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1821
1821
|
n !== ((r = e)[Or] ?? (r[Or] = e.nodeValue)) && (e[Or] = n, e.nodeValue = `${n}`);
|
|
1822
1822
|
}
|
|
1823
1823
|
function Rs(e, t) {
|
|
1824
1824
|
return Ls(e, t);
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function gc(e, t) {
|
|
1827
1827
|
Gn(), t.intro = t.intro ?? !1;
|
|
1828
1828
|
const r = t.target, n = L, i = P;
|
|
1829
1829
|
try {
|
|
@@ -1838,7 +1838,7 @@ function pc(e, t) {
|
|
|
1838
1838
|
} catch (s) {
|
|
1839
1839
|
if (s instanceof Error && s.message.split(`
|
|
1840
1840
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1841
|
-
return s !== Vt && console.warn("Failed to hydrate: ", s), t.recover === !1 &&
|
|
1841
|
+
return s !== Vt && console.warn("Failed to hydrate: ", s), t.recover === !1 && cl(), Gn(), hs(r), qe(!1), Rs(e, t);
|
|
1842
1842
|
} finally {
|
|
1843
1843
|
qe(n), le(i);
|
|
1844
1844
|
}
|
|
@@ -1846,35 +1846,35 @@ function pc(e, t) {
|
|
|
1846
1846
|
var Ar = /* @__PURE__ */ new Map();
|
|
1847
1847
|
function Ls(e, { target: t, anchor: r, props: n = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1848
1848
|
Gn();
|
|
1849
|
-
var l = void 0, c =
|
|
1849
|
+
var l = void 0, c = Xl(() => {
|
|
1850
1850
|
var u = r ?? t.appendChild(ye());
|
|
1851
|
-
|
|
1851
|
+
Il(u, { pending: () => {
|
|
1852
1852
|
} }, (p) => {
|
|
1853
1853
|
Fo({});
|
|
1854
|
-
var
|
|
1855
|
-
if (o && (
|
|
1854
|
+
var v = K;
|
|
1855
|
+
if (o && (v.c = o), i && (n.$$events = i), L && Ge(p, null), no = s, l = e(p, n) || {}, no = !0, L && (C.nodes.end = P, P === null || P.nodeType !== 8 || P.data !== "]"))
|
|
1856
1856
|
throw on(), Vt;
|
|
1857
1857
|
jo();
|
|
1858
1858
|
}, a);
|
|
1859
1859
|
var f = /* @__PURE__ */ new Set(), d = (p) => {
|
|
1860
|
-
for (var
|
|
1861
|
-
var b = p[
|
|
1860
|
+
for (var v = 0; v < p.length; v++) {
|
|
1861
|
+
var b = p[v];
|
|
1862
1862
|
if (!f.has(b)) {
|
|
1863
1863
|
f.add(b);
|
|
1864
|
-
var
|
|
1865
|
-
for (const
|
|
1866
|
-
var _ = Ar.get(
|
|
1867
|
-
_ === void 0 && (_ = /* @__PURE__ */ new Map(), Ar.set(
|
|
1864
|
+
var m = dc(b);
|
|
1865
|
+
for (const B of [t, document]) {
|
|
1866
|
+
var _ = Ar.get(B);
|
|
1867
|
+
_ === void 0 && (_ = /* @__PURE__ */ new Map(), Ar.set(B, _));
|
|
1868
1868
|
var N = _.get(b);
|
|
1869
|
-
N === void 0 ? (
|
|
1869
|
+
N === void 0 ? (B.addEventListener(b, Kn, { passive: m }), _.set(b, 1)) : _.set(b, N + 1);
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
1873
|
};
|
|
1874
1874
|
return d(rn(Os)), Yn.add(d), () => {
|
|
1875
|
-
for (var p of f) for (const
|
|
1876
|
-
var
|
|
1877
|
-
--b == 0 ? (
|
|
1875
|
+
for (var p of f) for (const m of [t, document]) {
|
|
1876
|
+
var v = Ar.get(m), b = v.get(p);
|
|
1877
|
+
--b == 0 ? (m.removeEventListener(p, Kn), v.delete(p), v.size === 0 && Ar.delete(m)) : v.set(p, b);
|
|
1878
1878
|
}
|
|
1879
1879
|
Yn.delete(d), u !== r && u.parentNode?.removeChild(u);
|
|
1880
1880
|
};
|
|
@@ -1882,11 +1882,11 @@ function Ls(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1882
1882
|
return Xn.set(l, c), l;
|
|
1883
1883
|
}
|
|
1884
1884
|
var Xn = /* @__PURE__ */ new WeakMap();
|
|
1885
|
-
function
|
|
1885
|
+
function vc(e, t) {
|
|
1886
1886
|
const r = Xn.get(e);
|
|
1887
1887
|
return r ? (Xn.delete(e), r(t)) : Promise.resolve();
|
|
1888
1888
|
}
|
|
1889
|
-
var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(),
|
|
1889
|
+
var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(), mc = class {
|
|
1890
1890
|
constructor(e, t = !0) {
|
|
1891
1891
|
y(this, "anchor", void 0), x(this, Ve, /* @__PURE__ */ new Map()), x(this, nt, /* @__PURE__ */ new Map()), x(this, ke, /* @__PURE__ */ new Map()), x(this, tr, /* @__PURE__ */ new Set()), x(this, Sn, !0), x(this, kn, (r) => {
|
|
1892
1892
|
if (h(Ve, this).has(r)) {
|
|
@@ -1943,12 +1943,12 @@ var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke =
|
|
|
1943
1943
|
function rr(e, t, r = !1) {
|
|
1944
1944
|
var n;
|
|
1945
1945
|
L && (n = P, sn());
|
|
1946
|
-
var i = new
|
|
1946
|
+
var i = new mc(e), o = r ? hi : 0;
|
|
1947
1947
|
function s(a, l) {
|
|
1948
1948
|
if (L) {
|
|
1949
1949
|
var c = Ho(n);
|
|
1950
1950
|
if (a !== parseInt(c.substring(1))) {
|
|
1951
|
-
var u =
|
|
1951
|
+
var u = Br();
|
|
1952
1952
|
le(u), i.anchor = u, qe(!1), i.ensure(a, l), qe(!0);
|
|
1953
1953
|
return;
|
|
1954
1954
|
}
|
|
@@ -1965,7 +1965,7 @@ function rr(e, t, r = !1) {
|
|
|
1965
1965
|
function Mr(e, t) {
|
|
1966
1966
|
return t;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function yc(e, t, r) {
|
|
1969
1969
|
for (var n = [], i = t.length, o, s = t.length, a = 0; a < i; a++) {
|
|
1970
1970
|
let f = t[a];
|
|
1971
1971
|
Nt(f, () => {
|
|
@@ -2013,33 +2013,33 @@ function gt(e, t, r, n, i, o = null) {
|
|
|
2013
2013
|
var _ = r();
|
|
2014
2014
|
return Po(_) ? _ : _ == null ? [] : rn(_);
|
|
2015
2015
|
}), f, d = /* @__PURE__ */ new Map(), p = !0;
|
|
2016
|
-
function
|
|
2017
|
-
(
|
|
2016
|
+
function v(_) {
|
|
2017
|
+
(m.effect.f & 16384) === 0 && (m.pending.delete(_), m.fallback = c, bc(m, f, s, t, n), c !== null && (f.length === 0 ? (c.f & 33554432) === 0 ? Jr(c) : (c.f ^= ur, lr(c, null, s)) : Nt(c, () => {
|
|
2018
2018
|
c = null;
|
|
2019
2019
|
})));
|
|
2020
2020
|
}
|
|
2021
2021
|
function b(_) {
|
|
2022
|
-
|
|
2022
|
+
m.pending.delete(_);
|
|
2023
2023
|
}
|
|
2024
|
-
var
|
|
2024
|
+
var m = {
|
|
2025
2025
|
effect: ki(() => {
|
|
2026
2026
|
f = g(u);
|
|
2027
2027
|
var _ = f.length;
|
|
2028
2028
|
let N = !1;
|
|
2029
|
-
L && Ho(s) === "[!" != (_ === 0) && (s =
|
|
2030
|
-
for (var
|
|
2029
|
+
L && Ho(s) === "[!" != (_ === 0) && (s = Br(), le(s), qe(!1), N = !0);
|
|
2030
|
+
for (var B = /* @__PURE__ */ new Set(), w = E, F = ps(), j = 0; j < _; j += 1) {
|
|
2031
2031
|
L && P.nodeType === 8 && P.data === "]" && (s = P, N = !0, qe(!1));
|
|
2032
2032
|
var Q = f[j], te = n(Q, j);
|
|
2033
2033
|
if (0)
|
|
2034
2034
|
var et;
|
|
2035
2035
|
var X = p ? null : a.get(te);
|
|
2036
|
-
X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && w.unskip_effect(X.e)) : (X =
|
|
2036
|
+
X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && w.unskip_effect(X.e)) : (X = _c(a, p ? s : Cr ?? (Cr = ye()), Q, te, j, i, t, r), p || (X.e.f |= ur), a.set(te, X)), B.add(te);
|
|
2037
2037
|
}
|
|
2038
|
-
if (_ === 0 && o && !c && (p ? c = _e(() => o(s)) : (c = _e(() => o(Cr ?? (Cr = ye()))), c.f |= ur)), _ >
|
|
2039
|
-
if (d.set(w,
|
|
2040
|
-
for (const [vn, mn] of a)
|
|
2041
|
-
w.oncommit(
|
|
2042
|
-
} else
|
|
2038
|
+
if (_ === 0 && o && !c && (p ? c = _e(() => o(s)) : (c = _e(() => o(Cr ?? (Cr = ye()))), c.f |= ur)), _ > B.size && il("", "", ""), L && _ > 0 && le(Br()), !p)
|
|
2039
|
+
if (d.set(w, B), F) {
|
|
2040
|
+
for (const [vn, mn] of a) B.has(vn) || w.skip_effect(mn.e);
|
|
2041
|
+
w.oncommit(v), w.ondiscard(b);
|
|
2042
|
+
} else v(w);
|
|
2043
2043
|
N && qe(!0), g(u);
|
|
2044
2044
|
}),
|
|
2045
2045
|
flags: t,
|
|
@@ -2054,38 +2054,38 @@ function nr(e) {
|
|
|
2054
2054
|
for (; e !== null && (e.f & 32) === 0; ) e = e.next;
|
|
2055
2055
|
return e;
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2058
|
-
var o = (n & 8) !== 0, s = t.length, a = e.items, l = nr(e.effect.first), c, u = null, f, d = [], p = [],
|
|
2057
|
+
function bc(e, t, r, n, i) {
|
|
2058
|
+
var o = (n & 8) !== 0, s = t.length, a = e.items, l = nr(e.effect.first), c, u = null, f, d = [], p = [], v, b, m, _;
|
|
2059
2059
|
if (o) for (_ = 0; _ < s; _ += 1)
|
|
2060
|
-
|
|
2060
|
+
v = t[_], b = i(v, _), m = a.get(b).e, (m.f & 33554432) === 0 && (m.nodes?.a?.measure(), (f ?? (f = /* @__PURE__ */ new Set())).add(m));
|
|
2061
2061
|
for (_ = 0; _ < s; _ += 1) {
|
|
2062
|
-
if (
|
|
2063
|
-
X.pending.delete(
|
|
2064
|
-
if ((
|
|
2065
|
-
if (
|
|
2062
|
+
if (v = t[_], b = i(v, _), m = a.get(b).e, e.outrogroups !== null) for (const X of e.outrogroups)
|
|
2063
|
+
X.pending.delete(m), X.done.delete(m);
|
|
2064
|
+
if ((m.f & 8192) !== 0 && (Jr(m), o && (m.nodes?.a?.unfix(), (f ?? (f = /* @__PURE__ */ new Set())).delete(m))), (m.f & 33554432) !== 0)
|
|
2065
|
+
if (m.f ^= ur, m === l) lr(m, null, r);
|
|
2066
2066
|
else {
|
|
2067
2067
|
var N = u ? u.next : l;
|
|
2068
|
-
|
|
2068
|
+
m === e.effect.last && (e.effect.last = m.prev), m.prev && (m.prev.next = m.next), m.next && (m.next.prev = m.prev), it(e, u, m), it(e, m, N), lr(m, N, r), u = m, d = [], p = [], l = nr(u.next);
|
|
2069
2069
|
continue;
|
|
2070
2070
|
}
|
|
2071
|
-
if (
|
|
2072
|
-
if (c !== void 0 && c.has(
|
|
2071
|
+
if (m !== l) {
|
|
2072
|
+
if (c !== void 0 && c.has(m)) {
|
|
2073
2073
|
if (d.length < p.length) {
|
|
2074
|
-
var
|
|
2075
|
-
u =
|
|
2074
|
+
var B = p[0], w;
|
|
2075
|
+
u = B.prev;
|
|
2076
2076
|
var F = d[0], j = d[d.length - 1];
|
|
2077
|
-
for (w = 0; w < d.length; w += 1) lr(d[w],
|
|
2077
|
+
for (w = 0; w < d.length; w += 1) lr(d[w], B, r);
|
|
2078
2078
|
for (w = 0; w < p.length; w += 1) c.delete(p[w]);
|
|
2079
|
-
it(e, F.prev, j.next), it(e, u, F), it(e, j,
|
|
2079
|
+
it(e, F.prev, j.next), it(e, u, F), it(e, j, B), l = B, u = j, _ -= 1, d = [], p = [];
|
|
2080
2080
|
} else
|
|
2081
|
-
c.delete(
|
|
2081
|
+
c.delete(m), lr(m, l, r), it(e, m.prev, m.next), it(e, m, u === null ? e.effect.first : u.next), it(e, u, m), u = m;
|
|
2082
2082
|
continue;
|
|
2083
2083
|
}
|
|
2084
|
-
for (d = [], p = []; l !== null && l !==
|
|
2084
|
+
for (d = [], p = []; l !== null && l !== m; )
|
|
2085
2085
|
(c ?? (c = /* @__PURE__ */ new Set())).add(l), p.push(l), l = nr(l.next);
|
|
2086
2086
|
if (l === null) continue;
|
|
2087
2087
|
}
|
|
2088
|
-
(
|
|
2088
|
+
(m.f & 33554432) === 0 && d.push(m), u = m, l = nr(m.next);
|
|
2089
2089
|
}
|
|
2090
2090
|
if (e.outrogroups !== null) {
|
|
2091
2091
|
for (const X of e.outrogroups) X.pending.size === 0 && (Jn(e, rn(X.done)), e.outrogroups?.delete(X));
|
|
@@ -2094,7 +2094,7 @@ function yc(e, t, r, n, i) {
|
|
|
2094
2094
|
if (l !== null || c !== void 0) {
|
|
2095
2095
|
var Q = [];
|
|
2096
2096
|
if (c !== void 0)
|
|
2097
|
-
for (
|
|
2097
|
+
for (m of c) (m.f & 8192) === 0 && Q.push(m);
|
|
2098
2098
|
for (; l !== null; )
|
|
2099
2099
|
(l.f & 8192) === 0 && l !== e.fallback && Q.push(l), l = nr(l.next);
|
|
2100
2100
|
var te = Q.length;
|
|
@@ -2104,15 +2104,15 @@ function yc(e, t, r, n, i) {
|
|
|
2104
2104
|
for (_ = 0; _ < te; _ += 1) Q[_].nodes?.a?.measure();
|
|
2105
2105
|
for (_ = 0; _ < te; _ += 1) Q[_].nodes?.a?.fix();
|
|
2106
2106
|
}
|
|
2107
|
-
|
|
2107
|
+
yc(e, Q, et);
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
o && Ye(() => {
|
|
2111
2111
|
if (f !== void 0)
|
|
2112
|
-
for (
|
|
2112
|
+
for (m of f) m.nodes?.a?.apply();
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function _c(e, t, r, n, i, o, s, a) {
|
|
2116
2116
|
var l = (s & 1) !== 0 ? (s & 16) === 0 ? /* @__PURE__ */ ls(r, !1, !1) : It(r) : null, c = (s & 2) !== 0 ? It(i) : null;
|
|
2117
2117
|
return {
|
|
2118
2118
|
v: l,
|
|
@@ -2133,7 +2133,7 @@ function lr(e, t, r) {
|
|
|
2133
2133
|
function it(e, t, r) {
|
|
2134
2134
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2136
|
+
function Tc(e, t) {
|
|
2137
2137
|
ys(() => {
|
|
2138
2138
|
var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
|
|
2139
2139
|
if (!n.querySelector("#" + t.hash)) {
|
|
@@ -2144,7 +2144,7 @@ function _c(e, t) {
|
|
|
2144
2144
|
}
|
|
2145
2145
|
var oo = [...`
|
|
2146
2146
|
\r\f \v\uFEFF`];
|
|
2147
|
-
function
|
|
2147
|
+
function wc(e, t, r) {
|
|
2148
2148
|
var n = e == null ? "" : "" + e;
|
|
2149
2149
|
if (t && (n = n ? n + " " + t : t), r) {
|
|
2150
2150
|
for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
|
|
@@ -2167,7 +2167,7 @@ function so(e, t = !1) {
|
|
|
2167
2167
|
function xn(e) {
|
|
2168
2168
|
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function Sc(e, t) {
|
|
2171
2171
|
if (t) {
|
|
2172
2172
|
var r = "", n, i;
|
|
2173
2173
|
if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
|
|
@@ -2185,8 +2185,8 @@ function wc(e, t) {
|
|
|
2185
2185
|
var p = xn(e.substring(c, u).trim());
|
|
2186
2186
|
if (!l.includes(p)) {
|
|
2187
2187
|
d !== ";" && f++;
|
|
2188
|
-
var
|
|
2189
|
-
r += " " +
|
|
2188
|
+
var v = e.substring(c, f).trim();
|
|
2189
|
+
r += " " + v + ";";
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
c = f + 1, u = -1;
|
|
@@ -2201,7 +2201,7 @@ function wc(e, t) {
|
|
|
2201
2201
|
function ao(e, t, r, n, i, o) {
|
|
2202
2202
|
var s = e[Hn];
|
|
2203
2203
|
if (L || s !== r || s === void 0) {
|
|
2204
|
-
var a =
|
|
2204
|
+
var a = wc(r, n, o);
|
|
2205
2205
|
(!L || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[Hn] = r;
|
|
2206
2206
|
} else if (o && i !== o) for (var l in o) {
|
|
2207
2207
|
var c = !!o[l];
|
|
@@ -2215,16 +2215,16 @@ function En(e, t = {}, r, n) {
|
|
|
2215
2215
|
t[i] !== o && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, n));
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2219
|
-
var i = e[
|
|
2218
|
+
function kc(e, t, r, n) {
|
|
2219
|
+
var i = e[Bn];
|
|
2220
2220
|
if (L || i !== t) {
|
|
2221
|
-
var o =
|
|
2222
|
-
(!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[
|
|
2221
|
+
var o = Sc(t, n);
|
|
2222
|
+
(!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[Bn] = t;
|
|
2223
2223
|
} else n && (Array.isArray(n) ? (En(e, r?.[0], n[0]), En(e, r?.[1], n[1], "important")) : En(e, r, n));
|
|
2224
2224
|
return n;
|
|
2225
2225
|
}
|
|
2226
|
-
var
|
|
2227
|
-
function
|
|
2226
|
+
var xc = /* @__PURE__ */ Symbol("is custom element"), Ec = /* @__PURE__ */ Symbol("is html"), Ac = rl ? "link" : "LINK";
|
|
2227
|
+
function Mc(e) {
|
|
2228
2228
|
if (L) {
|
|
2229
2229
|
var t = !1, r = () => {
|
|
2230
2230
|
if (!t) {
|
|
@@ -2242,37 +2242,37 @@ function Ac(e) {
|
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
2244
|
function W(e, t, r, n) {
|
|
2245
|
-
var i =
|
|
2246
|
-
if (L && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName ===
|
|
2245
|
+
var i = Cc(e);
|
|
2246
|
+
if (L && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ac)) {
|
|
2247
2247
|
n || void 0;
|
|
2248
2248
|
return;
|
|
2249
2249
|
}
|
|
2250
|
-
i[t] !== (i[t] = r) && (t === "loading" && (e[
|
|
2250
|
+
i[t] !== (i[t] = r) && (t === "loading" && (e[el] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Oc(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function Cc(e) {
|
|
2253
2253
|
var t;
|
|
2254
2254
|
return (t = e)[Wn] ?? (t[Wn] = {
|
|
2255
|
-
[
|
|
2256
|
-
[
|
|
2255
|
+
[xc]: e.nodeName.includes("-"),
|
|
2256
|
+
[Ec]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
2259
|
var lo = /* @__PURE__ */ new Map();
|
|
2260
|
-
function
|
|
2260
|
+
function Oc(e) {
|
|
2261
2261
|
var t = e.getAttribute("is") || e.nodeName, r = lo.get(t);
|
|
2262
2262
|
if (r) return r;
|
|
2263
2263
|
lo.set(t, r = []);
|
|
2264
2264
|
for (var n, i = e, o = Element.prototype; o !== i; ) {
|
|
2265
|
-
n =
|
|
2265
|
+
n = Ua(i);
|
|
2266
2266
|
for (var s in n) n[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && r.push(s);
|
|
2267
2267
|
i = No(i);
|
|
2268
2268
|
}
|
|
2269
2269
|
return r;
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function Ic(e, t, r = t) {
|
|
2272
2272
|
var n = /* @__PURE__ */ new WeakSet();
|
|
2273
|
-
|
|
2273
|
+
Ul(e, "input", async (i) => {
|
|
2274
2274
|
var o = i ? e.defaultValue : e.value;
|
|
2275
|
-
if (o = An(e) ? Mn(o) : o, r(o), E !== null && n.add(E), await
|
|
2275
|
+
if (o = An(e) ? Mn(o) : o, r(o), E !== null && n.add(E), await nc(), o !== (o = t())) {
|
|
2276
2276
|
var s = e.selectionStart, a = e.selectionEnd, l = e.value.length;
|
|
2277
2277
|
if (e.value = o ?? "", a !== null) {
|
|
2278
2278
|
var c = e.value.length;
|
|
@@ -2295,24 +2295,24 @@ function An(e) {
|
|
|
2295
2295
|
function Mn(e) {
|
|
2296
2296
|
return e === "" ? null : +e;
|
|
2297
2297
|
}
|
|
2298
|
-
var Ps,
|
|
2298
|
+
var Ps, Dt = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), co = /* @__PURE__ */ new WeakSet(), Ns = class {
|
|
2299
2299
|
constructor(e) {
|
|
2300
|
-
gi(this, co), x(this,
|
|
2300
|
+
gi(this, co), x(this, Dt, /* @__PURE__ */ new WeakMap()), x(this, Qr, void 0), x(this, Cn, void 0), k(Cn, this, e);
|
|
2301
2301
|
}
|
|
2302
2302
|
observe(e, t) {
|
|
2303
|
-
var r = h(
|
|
2304
|
-
return r.add(t), h(
|
|
2305
|
-
var n = h(
|
|
2306
|
-
n.delete(t), n.size === 0 && (h(
|
|
2303
|
+
var r = h(Dt, this).get(e) || /* @__PURE__ */ new Set();
|
|
2304
|
+
return r.add(t), h(Dt, this).set(e, r), O(co, this, $c).call(this).observe(e, h(Cn, this)), () => {
|
|
2305
|
+
var n = h(Dt, this).get(e);
|
|
2306
|
+
n.delete(t), n.size === 0 && (h(Dt, this).delete(e), h(Qr, this).unobserve(e));
|
|
2307
2307
|
};
|
|
2308
2308
|
}
|
|
2309
2309
|
};
|
|
2310
2310
|
Ps = Ns;
|
|
2311
|
-
function
|
|
2311
|
+
function $c() {
|
|
2312
2312
|
return h(Qr, this) ?? k(Qr, this, new ResizeObserver((e) => {
|
|
2313
2313
|
for (var t of e) {
|
|
2314
2314
|
Ps.entries.set(t.target, t);
|
|
2315
|
-
for (var r of h(
|
|
2315
|
+
for (var r of h(Dt, this).get(t.target) || []) r(t);
|
|
2316
2316
|
}
|
|
2317
2317
|
}));
|
|
2318
2318
|
}
|
|
@@ -2347,8 +2347,8 @@ function uo(e, t, r, n) {
|
|
|
2347
2347
|
var d = fr in e || Wo in e;
|
|
2348
2348
|
f = wt(e, t)?.set ?? (d && t in e ? (w) => e[t] = w : void 0);
|
|
2349
2349
|
}
|
|
2350
|
-
var p,
|
|
2351
|
-
o ? [p,
|
|
2350
|
+
var p, v = !1;
|
|
2351
|
+
o ? [p, v] = Sl(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = u(), f && (i && ul(t), f(p)));
|
|
2352
2352
|
var b;
|
|
2353
2353
|
if (i ? b = () => {
|
|
2354
2354
|
var w = e[t];
|
|
@@ -2358,26 +2358,26 @@ function uo(e, t, r, n) {
|
|
|
2358
2358
|
return w !== void 0 && (a = void 0), w === void 0 ? a : w;
|
|
2359
2359
|
}, i && (r & 4) === 0) return b;
|
|
2360
2360
|
if (f) {
|
|
2361
|
-
var
|
|
2361
|
+
var m = e.$$legacy;
|
|
2362
2362
|
return (function(w, F) {
|
|
2363
|
-
return arguments.length > 0 ? ((!i || !F ||
|
|
2363
|
+
return arguments.length > 0 ? ((!i || !F || m || v) && f(F ? b() : w), w) : b();
|
|
2364
2364
|
});
|
|
2365
2365
|
}
|
|
2366
2366
|
var _ = !1, N = ((r & 1) !== 0 ? vr : bi)(() => (_ = !1, b()));
|
|
2367
2367
|
o && g(N);
|
|
2368
|
-
var
|
|
2368
|
+
var B = C;
|
|
2369
2369
|
return (function(w, F) {
|
|
2370
2370
|
if (arguments.length > 0) {
|
|
2371
2371
|
const j = F ? g(N) : i && o ? ct(w) : w;
|
|
2372
2372
|
return M(N, j), _ = !0, a !== void 0 && (a = j), w;
|
|
2373
2373
|
}
|
|
2374
|
-
return Ke && _ || (
|
|
2374
|
+
return Ke && _ || (B.f & 16384) !== 0 ? N.v : g(N);
|
|
2375
2375
|
});
|
|
2376
2376
|
}
|
|
2377
|
-
function
|
|
2378
|
-
return new
|
|
2377
|
+
function Rc(e) {
|
|
2378
|
+
return new Lc(e);
|
|
2379
2379
|
}
|
|
2380
|
-
var vt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(),
|
|
2380
|
+
var vt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Lc = class {
|
|
2381
2381
|
constructor(e) {
|
|
2382
2382
|
x(this, vt, void 0), x(this, Re, void 0);
|
|
2383
2383
|
var t = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
@@ -2398,7 +2398,7 @@ var vt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Rc =
|
|
|
2398
2398
|
return M(t.get(o) ?? r(o, s), s), Reflect.set(i, o, s);
|
|
2399
2399
|
}
|
|
2400
2400
|
});
|
|
2401
|
-
k(Re, this, (e.hydrate ?
|
|
2401
|
+
k(Re, this, (e.hydrate ? gc : Rs)(e.component, {
|
|
2402
2402
|
target: e.target,
|
|
2403
2403
|
anchor: e.anchor,
|
|
2404
2404
|
props: n,
|
|
@@ -2420,7 +2420,7 @@ var vt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Rc =
|
|
|
2420
2420
|
h(Re, this).$set = (i) => {
|
|
2421
2421
|
Object.assign(n, i);
|
|
2422
2422
|
}, h(Re, this).$destroy = () => {
|
|
2423
|
-
|
|
2423
|
+
vc(h(Re, this));
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
2426
|
$set(e) {
|
|
@@ -2463,14 +2463,14 @@ typeof HTMLElement == "function" && (zs = class extends HTMLElement {
|
|
|
2463
2463
|
};
|
|
2464
2464
|
};
|
|
2465
2465
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2466
|
-
const t = {}, r =
|
|
2466
|
+
const t = {}, r = Pc(this);
|
|
2467
2467
|
for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
|
|
2468
2468
|
for (const n of this.attributes) {
|
|
2469
2469
|
const i = this.$$g_p(n.name);
|
|
2470
2470
|
i in this.$$d || (this.$$d[i] = Rr(i, n.value, this.$$p_d, "toProp"));
|
|
2471
2471
|
}
|
|
2472
2472
|
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2473
|
-
this.$$c =
|
|
2473
|
+
this.$$c = Rc({
|
|
2474
2474
|
component: this.$$ctor,
|
|
2475
2475
|
target: this.$$shadowRoot || this,
|
|
2476
2476
|
props: {
|
|
@@ -2478,7 +2478,7 @@ typeof HTMLElement == "function" && (zs = class extends HTMLElement {
|
|
|
2478
2478
|
$$slots: t,
|
|
2479
2479
|
$$host: this
|
|
2480
2480
|
}
|
|
2481
|
-
}), this.$$me =
|
|
2481
|
+
}), this.$$me = Kl(() => {
|
|
2482
2482
|
cn(() => {
|
|
2483
2483
|
this.$$r = !0;
|
|
2484
2484
|
for (const n of zr(this.$$c)) {
|
|
@@ -2535,13 +2535,13 @@ function Rr(e, t, r, n) {
|
|
|
2535
2535
|
return t;
|
|
2536
2536
|
}
|
|
2537
2537
|
}
|
|
2538
|
-
function
|
|
2538
|
+
function Pc(e) {
|
|
2539
2539
|
const t = {};
|
|
2540
2540
|
return e.childNodes.forEach((r) => {
|
|
2541
2541
|
t[r.slot || "default"] = !0;
|
|
2542
2542
|
}), t;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function Nc(e, t, r, n, i, o) {
|
|
2545
2545
|
let s = class extends zs {
|
|
2546
2546
|
constructor() {
|
|
2547
2547
|
super(e, r, i), this.$$p_d = t;
|
|
@@ -2567,14 +2567,14 @@ function Pc(e, t, r, n, i, o) {
|
|
|
2567
2567
|
} });
|
|
2568
2568
|
}), o && (s = o(s)), e.element = s, s;
|
|
2569
2569
|
}
|
|
2570
|
-
var
|
|
2570
|
+
var zc = class extends Event {
|
|
2571
2571
|
constructor(e, t, r, n) {
|
|
2572
2572
|
super("context-request", {
|
|
2573
2573
|
bubbles: !0,
|
|
2574
2574
|
composed: !0
|
|
2575
2575
|
}), y(this, "context", void 0), y(this, "contextTarget", void 0), y(this, "callback", void 0), y(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = n ?? !1;
|
|
2576
2576
|
}
|
|
2577
|
-
},
|
|
2577
|
+
}, Wc = class {
|
|
2578
2578
|
constructor(e, t) {
|
|
2579
2579
|
y(this, "host", void 0), y(this, "context", void 0), y(this, "subscribe", void 0), y(this, "onValue", void 0), y(this, "isConnected", !1), y(this, "unsubscribe", void 0), y(this, "currentValue", void 0), y(this, "handleValue", (r, n) => {
|
|
2580
2580
|
n !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = n), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
|
|
@@ -2590,12 +2590,12 @@ var Nc = class extends Event {
|
|
|
2590
2590
|
return this.currentValue;
|
|
2591
2591
|
}
|
|
2592
2592
|
requestValue() {
|
|
2593
|
-
this.host.dispatchEvent(new
|
|
2593
|
+
this.host.dispatchEvent(new zc(this.context, this.host, this.handleValue, this.subscribe));
|
|
2594
2594
|
}
|
|
2595
|
-
}, fn = (e) => e,
|
|
2596
|
-
function
|
|
2595
|
+
}, fn = (e) => e, Hc = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), ph = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), gh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), vh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
2596
|
+
function Bc(e, t, r) {
|
|
2597
2597
|
let n = !1;
|
|
2598
|
-
const i = new
|
|
2598
|
+
const i = new Wc(e, {
|
|
2599
2599
|
context: t,
|
|
2600
2600
|
subscribe: !0,
|
|
2601
2601
|
onValue: (c) => {
|
|
@@ -2620,12 +2620,12 @@ function Hc(e, t, r) {
|
|
|
2620
2620
|
};
|
|
2621
2621
|
}
|
|
2622
2622
|
function Dc(e, t) {
|
|
2623
|
-
return
|
|
2623
|
+
return Bc(e, Hc, t);
|
|
2624
2624
|
}
|
|
2625
|
-
function
|
|
2625
|
+
function Fc(e, t) {
|
|
2626
2626
|
return Dc(e, t);
|
|
2627
2627
|
}
|
|
2628
|
-
var
|
|
2628
|
+
var jc = class {
|
|
2629
2629
|
serialize(e, t) {
|
|
2630
2630
|
return {
|
|
2631
2631
|
startContainer: this.getNodePath(e.startContainer, t),
|
|
@@ -2700,7 +2700,7 @@ var jt;
|
|
|
2700
2700
|
})(jt || (jt = {}));
|
|
2701
2701
|
var Ws = class Qn {
|
|
2702
2702
|
constructor(t = {}) {
|
|
2703
|
-
if (y(this, "config", void 0), y(this, "ttsWordHighlight", null), y(this, "ttsSentenceHighlight", null), y(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), y(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), y(this, "annotations", /* @__PURE__ */ new Map()), y(this, "colorHighlights", /* @__PURE__ */ new Map()), y(this, "nextAnnotationId", 1), y(this, "supported", !1), y(this, "rangeSerializer", void 0), y(this, "themeObserver", null), y(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new
|
|
2703
|
+
if (y(this, "config", void 0), y(this, "ttsWordHighlight", null), y(this, "ttsSentenceHighlight", null), y(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), y(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), y(this, "annotations", /* @__PURE__ */ new Map()), y(this, "colorHighlights", /* @__PURE__ */ new Map()), y(this, "nextAnnotationId", 1), y(this, "supported", !1), y(this, "rangeSerializer", void 0), y(this, "themeObserver", null), y(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new jc(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2704
2704
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2705
2705
|
return;
|
|
2706
2706
|
}
|
|
@@ -2817,7 +2817,7 @@ var Ws = class Qn {
|
|
|
2817
2817
|
}
|
|
2818
2818
|
et > d && (d = et, f = F);
|
|
2819
2819
|
}
|
|
2820
|
-
const p = Math.max(0.24, Math.min(0.85, f * 0.55)),
|
|
2820
|
+
const p = Math.max(0.24, Math.min(0.85, f * 0.55)), v = Math.max(0.55, Math.min(0.95, f + 0.2)), b = Math.max(0.22, Math.min(0.6, f * 0.45)), m = l, _ = this.blend(m, a, v), N = this.contrastRatio(_, a), B = this.relativeLuminance(a) > 0.45 ? [
|
|
2821
2821
|
0,
|
|
2822
2822
|
0,
|
|
2823
2823
|
0
|
|
@@ -2825,11 +2825,11 @@ var Ws = class Qn {
|
|
|
2825
2825
|
255,
|
|
2826
2826
|
255,
|
|
2827
2827
|
255
|
|
2828
|
-
], w = N >= 1.35 ?
|
|
2828
|
+
], w = N >= 1.35 ? m : B;
|
|
2829
2829
|
return {
|
|
2830
2830
|
wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${f})`,
|
|
2831
2831
|
sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${p})`,
|
|
2832
|
-
wordUnderline: `rgba(${w[0]}, ${w[1]}, ${w[2]}, ${
|
|
2832
|
+
wordUnderline: `rgba(${w[0]}, ${w[1]}, ${w[2]}, ${v})`,
|
|
2833
2833
|
wordShadow: `rgba(${w[0]}, ${w[1]}, ${w[2]}, ${b})`
|
|
2834
2834
|
};
|
|
2835
2835
|
}
|
|
@@ -3110,7 +3110,7 @@ function Hs(e) {
|
|
|
3110
3110
|
console.debug(`[${e}]`, ...t);
|
|
3111
3111
|
};
|
|
3112
3112
|
}
|
|
3113
|
-
var
|
|
3113
|
+
var mh = Hs("I18nService"), $n = {
|
|
3114
3114
|
assessment: [],
|
|
3115
3115
|
section: [],
|
|
3116
3116
|
item: [],
|
|
@@ -3131,19 +3131,19 @@ function ot(e, t) {
|
|
|
3131
3131
|
if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
3132
3132
|
return e;
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3134
|
+
function Vc(e) {
|
|
3135
3135
|
if (e != null) {
|
|
3136
3136
|
if (!Mt(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
3137
3137
|
return e;
|
|
3138
3138
|
}
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3140
|
+
function qc(e) {
|
|
3141
3141
|
if (e != null) {
|
|
3142
3142
|
if (!Mt(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
3143
3143
|
return e;
|
|
3144
3144
|
}
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Uc(e, t) {
|
|
3147
3147
|
if (t == null) return;
|
|
3148
3148
|
if (!Mt(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
|
|
3149
3149
|
const r = t, n = (i) => i === "polly" || i === "google" || i === "custom";
|
|
@@ -3152,14 +3152,14 @@ function qc(e, t) {
|
|
|
3152
3152
|
if ("provider" in r && r.provider !== void 0 && !Mt(r.provider) && !(e === "textToSpeech" && n(r.provider))) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
|
|
3153
3153
|
return r;
|
|
3154
3154
|
}
|
|
3155
|
-
function
|
|
3155
|
+
function Gc(e) {
|
|
3156
3156
|
if (e == null) return {};
|
|
3157
3157
|
if (!Mt(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
3158
3158
|
const t = {};
|
|
3159
|
-
for (const [r, n] of Object.entries(e)) t[r] =
|
|
3159
|
+
for (const [r, n] of Object.entries(e)) t[r] = Uc(r, n);
|
|
3160
3160
|
return t;
|
|
3161
3161
|
}
|
|
3162
|
-
function
|
|
3162
|
+
function Bs(e) {
|
|
3163
3163
|
const t = e.trim();
|
|
3164
3164
|
return t || "";
|
|
3165
3165
|
}
|
|
@@ -3168,20 +3168,20 @@ function st(e) {
|
|
|
3168
3168
|
const t = /* @__PURE__ */ new Set();
|
|
3169
3169
|
for (const r of e) {
|
|
3170
3170
|
if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
|
|
3171
|
-
const n =
|
|
3171
|
+
const n = Bs(r);
|
|
3172
3172
|
n && t.add(n);
|
|
3173
3173
|
}
|
|
3174
3174
|
return Array.from(t);
|
|
3175
3175
|
}
|
|
3176
|
-
function
|
|
3176
|
+
function Yc(e, t) {
|
|
3177
3177
|
if (e != null) {
|
|
3178
3178
|
if (e === "on" || e === "off") return e;
|
|
3179
3179
|
throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
|
|
3180
3180
|
}
|
|
3181
3181
|
}
|
|
3182
|
-
function
|
|
3182
|
+
function Kc(e) {
|
|
3183
3183
|
if (e != null && !Mt(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
3184
|
-
const t =
|
|
3184
|
+
const t = qc(e?.policy), r = Vc(e?.placement), n = Gc(e?.providers), i = Yc(e?.pnpEnforcement, "pnpEnforcement"), o = {
|
|
3185
3185
|
policy: {
|
|
3186
3186
|
allowed: st(ot(t?.allowed, "policy.allowed")),
|
|
3187
3187
|
blocked: st(ot(t?.blocked, "policy.blocked"))
|
|
@@ -3195,7 +3195,7 @@ function Yc(e) {
|
|
|
3195
3195
|
};
|
|
3196
3196
|
return i && (o.pnpEnforcement = i), o;
|
|
3197
3197
|
}
|
|
3198
|
-
var
|
|
3198
|
+
var Xc = [
|
|
3199
3199
|
"assessment",
|
|
3200
3200
|
"section",
|
|
3201
3201
|
"item",
|
|
@@ -3206,7 +3206,7 @@ var Kc = [
|
|
|
3206
3206
|
function Lr(e, t) {
|
|
3207
3207
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
3208
3208
|
}
|
|
3209
|
-
var
|
|
3209
|
+
var Jc = [
|
|
3210
3210
|
{
|
|
3211
3211
|
pattern: /<script\b/i,
|
|
3212
3212
|
reason: "contains a <script> tag"
|
|
@@ -3224,17 +3224,17 @@ var Xc = [
|
|
|
3224
3224
|
reason: "contains a <foreignObject> element"
|
|
3225
3225
|
}
|
|
3226
3226
|
];
|
|
3227
|
-
function
|
|
3227
|
+
function Qc(e, t, r) {
|
|
3228
3228
|
const n = t.trimStart(), i = n.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(n);
|
|
3229
3229
|
if (/^data:/i.test(n)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
|
|
3230
3230
|
if (!(!i && !o)) {
|
|
3231
|
-
for (const { pattern: s, reason: a } of
|
|
3231
|
+
for (const { pattern: s, reason: a } of Jc) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${a}. Inline SVG icons must not include scriptable content.`);
|
|
3232
3232
|
}
|
|
3233
3233
|
}
|
|
3234
3234
|
function fo(e) {
|
|
3235
3235
|
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.`);
|
|
3236
|
-
if (typeof e.icon == "string" &&
|
|
3237
|
-
const t = e.supportedLevels.find((r) => !
|
|
3236
|
+
if (typeof e.icon == "string" && Qc(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.`);
|
|
3237
|
+
const t = e.supportedLevels.find((r) => !Xc.includes(r));
|
|
3238
3238
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
3239
3239
|
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)}".`);
|
|
3240
3240
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -3243,12 +3243,12 @@ function fo(e) {
|
|
|
3243
3243
|
if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
|
|
3244
3244
|
if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
|
|
3245
3245
|
}
|
|
3246
|
-
var
|
|
3246
|
+
var Zc = class {
|
|
3247
3247
|
constructor() {
|
|
3248
3248
|
y(this, "tools", /* @__PURE__ */ new Map()), y(this, "pnpIndex", /* @__PURE__ */ new Map()), y(this, "componentOverrides", {}), y(this, "moduleLoaders", /* @__PURE__ */ new Map()), y(this, "loadedToolModules", /* @__PURE__ */ new Set()), y(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
3249
3249
|
}
|
|
3250
3250
|
normalizeToolId(e) {
|
|
3251
|
-
return
|
|
3251
|
+
return Bs(e);
|
|
3252
3252
|
}
|
|
3253
3253
|
normalizeToolIds(e) {
|
|
3254
3254
|
return e.map((t) => this.normalizeToolId(t));
|
|
@@ -3386,13 +3386,13 @@ var Qc = class {
|
|
|
3386
3386
|
return n.renderToolbar(t, i);
|
|
3387
3387
|
}
|
|
3388
3388
|
};
|
|
3389
|
-
function
|
|
3389
|
+
function Ds(e) {
|
|
3390
3390
|
return e.level === "item";
|
|
3391
3391
|
}
|
|
3392
|
-
function
|
|
3392
|
+
function eu(e) {
|
|
3393
3393
|
return e.level === "passage";
|
|
3394
3394
|
}
|
|
3395
|
-
function
|
|
3395
|
+
function tu(e) {
|
|
3396
3396
|
return e.level === "rubric";
|
|
3397
3397
|
}
|
|
3398
3398
|
function Fs(e) {
|
|
@@ -3414,7 +3414,7 @@ function Ai(e) {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
return r.filter(Boolean).join(" ").trim();
|
|
3416
3416
|
}
|
|
3417
|
-
if (
|
|
3417
|
+
if (Ds(e)) {
|
|
3418
3418
|
const t = e.item;
|
|
3419
3419
|
if (!t?.config) return "";
|
|
3420
3420
|
const r = t.config, n = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
@@ -3433,7 +3433,7 @@ function Ai(e) {
|
|
|
3433
3433
|
}
|
|
3434
3434
|
return n.filter(Boolean).join(" ").trim();
|
|
3435
3435
|
}
|
|
3436
|
-
if (
|
|
3436
|
+
if (eu(e)) {
|
|
3437
3437
|
const t = e.passage;
|
|
3438
3438
|
if (!t?.config) return "";
|
|
3439
3439
|
const r = t.config, n = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
@@ -3452,7 +3452,7 @@ function Ai(e) {
|
|
|
3452
3452
|
}
|
|
3453
3453
|
return n.filter(Boolean).join(" ").trim();
|
|
3454
3454
|
}
|
|
3455
|
-
if (
|
|
3455
|
+
if (tu(e)) {
|
|
3456
3456
|
const t = e.rubricBlock;
|
|
3457
3457
|
return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3458
3458
|
}
|
|
@@ -3469,7 +3469,7 @@ function dn(e) {
|
|
|
3469
3469
|
/\d+\s*[+\-*/=]\s*\d+/
|
|
3470
3470
|
].some((r) => r.test(t));
|
|
3471
3471
|
}
|
|
3472
|
-
function
|
|
3472
|
+
function ru(e) {
|
|
3473
3473
|
const t = [
|
|
3474
3474
|
"pie-multiple-choice",
|
|
3475
3475
|
"pie-inline-choice",
|
|
@@ -3486,7 +3486,7 @@ function tu(e) {
|
|
|
3486
3486
|
const i = n.element || "";
|
|
3487
3487
|
return t.includes(i);
|
|
3488
3488
|
}
|
|
3489
|
-
if (
|
|
3489
|
+
if (Ds(e)) {
|
|
3490
3490
|
const r = e.item.config?.models;
|
|
3491
3491
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((n) => {
|
|
3492
3492
|
if (!n || typeof n != "object") return !1;
|
|
@@ -3499,7 +3499,7 @@ function tu(e) {
|
|
|
3499
3499
|
function hn(e) {
|
|
3500
3500
|
return Ai(e).trim().length >= 10;
|
|
3501
3501
|
}
|
|
3502
|
-
function
|
|
3502
|
+
function nu(e) {
|
|
3503
3503
|
const t = Ai(e);
|
|
3504
3504
|
return [
|
|
3505
3505
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
@@ -3510,23 +3510,23 @@ function ru(e) {
|
|
|
3510
3510
|
/physics|force|energy|velocity|acceleration/i
|
|
3511
3511
|
].some((r) => r.test(t));
|
|
3512
3512
|
}
|
|
3513
|
-
var
|
|
3513
|
+
var iu = [
|
|
3514
3514
|
"assessment",
|
|
3515
3515
|
"section",
|
|
3516
3516
|
"item",
|
|
3517
3517
|
"passage",
|
|
3518
3518
|
"rubric"
|
|
3519
|
-
],
|
|
3520
|
-
function
|
|
3521
|
-
return
|
|
3519
|
+
], ou = new Set(iu);
|
|
3520
|
+
function su(e) {
|
|
3521
|
+
return ou.has(e);
|
|
3522
3522
|
}
|
|
3523
3523
|
function Mi(e, t, r) {
|
|
3524
3524
|
const n = e.trim(), i = r.trim();
|
|
3525
3525
|
if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3526
|
-
if (!
|
|
3526
|
+
if (!su(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
3527
3527
|
return `${n}:${t}:${i}`;
|
|
3528
3528
|
}
|
|
3529
|
-
var
|
|
3529
|
+
var au = class {
|
|
3530
3530
|
constructor() {
|
|
3531
3531
|
y(this, "providerId", "desmos-calculator"), y(this, "providerName", "Desmos Calculator"), y(this, "category", "calculator"), y(this, "version", "1.10"), y(this, "requiresAuth", !0), y(this, "desmosProvider", null), y(this, "config", null);
|
|
3532
3532
|
}
|
|
@@ -3630,14 +3630,34 @@ var su = class {
|
|
|
3630
3630
|
text: e,
|
|
3631
3631
|
offset: 0
|
|
3632
3632
|
}];
|
|
3633
|
-
}, js =
|
|
3633
|
+
}, js = (e) => String(e || "").trim().toLowerCase(), lu = () => js((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), cu = (e, t) => {
|
|
3634
|
+
if (t) {
|
|
3635
|
+
const s = e.find((a) => a.name === t);
|
|
3636
|
+
if (s) return s;
|
|
3637
|
+
}
|
|
3638
|
+
const r = lu(), n = r.split("-")[0] || "en", i = (s) => {
|
|
3639
|
+
const a = js(s.lang);
|
|
3640
|
+
return a === r || a.startsWith(`${n}-`);
|
|
3641
|
+
}, o = [
|
|
3642
|
+
(s) => s.localService && i(s),
|
|
3643
|
+
(s) => s.default && i(s),
|
|
3644
|
+
(s) => i(s),
|
|
3645
|
+
(s) => s.localService,
|
|
3646
|
+
(s) => s.default
|
|
3647
|
+
];
|
|
3648
|
+
for (const s of o) {
|
|
3649
|
+
const a = e.find(s);
|
|
3650
|
+
if (a) return a;
|
|
3651
|
+
}
|
|
3652
|
+
return e[0] || null;
|
|
3653
|
+
}, uu = (e) => !e.default, Vs = class {
|
|
3634
3654
|
constructor() {
|
|
3635
3655
|
y(this, "providerId", "browser"), y(this, "providerName", "Browser Speech Synthesis"), y(this, "version", "1.0.0");
|
|
3636
3656
|
}
|
|
3637
3657
|
async initialize(e) {
|
|
3638
3658
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
3639
3659
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
3640
|
-
return new
|
|
3660
|
+
return new fu(e);
|
|
3641
3661
|
}
|
|
3642
3662
|
supportsFeature(e) {
|
|
3643
3663
|
return !0;
|
|
@@ -3655,7 +3675,7 @@ var su = class {
|
|
|
3655
3675
|
}
|
|
3656
3676
|
destroy() {
|
|
3657
3677
|
}
|
|
3658
|
-
},
|
|
3678
|
+
}, fu = class {
|
|
3659
3679
|
constructor(e) {
|
|
3660
3680
|
y(this, "utterance", null), y(this, "config", null), y(this, "_isPlaying", !1), y(this, "_isPaused", !1), y(this, "speakRunId", 0), y(this, "onWordBoundary", void 0), this.config = e;
|
|
3661
3681
|
}
|
|
@@ -3740,37 +3760,40 @@ var su = class {
|
|
|
3740
3760
|
n(!1);
|
|
3741
3761
|
return;
|
|
3742
3762
|
}
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3763
|
+
const o = new SpeechSynthesisUtterance(e);
|
|
3764
|
+
this.utterance = o;
|
|
3765
|
+
const s = cu(speechSynthesis.getVoices(), this.config?.voice);
|
|
3766
|
+
s && uu(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
|
|
3767
|
+
const a = () => {
|
|
3768
|
+
this.utterance === o && (this.utterance = null);
|
|
3769
|
+
};
|
|
3770
|
+
o.onstart = () => {
|
|
3748
3771
|
r === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
3749
|
-
},
|
|
3750
|
-
if (r !== this.speakRunId) {
|
|
3772
|
+
}, o.onend = () => {
|
|
3773
|
+
if (a(), r !== this.speakRunId) {
|
|
3751
3774
|
n(!1);
|
|
3752
3775
|
return;
|
|
3753
3776
|
}
|
|
3754
3777
|
this._isPlaying = !1, this._isPaused = !1, n(!0);
|
|
3755
|
-
},
|
|
3756
|
-
if (r !== this.speakRunId) {
|
|
3778
|
+
}, o.onerror = (l) => {
|
|
3779
|
+
if (a(), r !== this.speakRunId) {
|
|
3757
3780
|
n(!1);
|
|
3758
3781
|
return;
|
|
3759
3782
|
}
|
|
3760
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
3783
|
+
if (this._isPlaying = !1, this._isPaused = !1, l.error === "interrupted" || l.error === "canceled") {
|
|
3761
3784
|
n(!1);
|
|
3762
3785
|
return;
|
|
3763
3786
|
}
|
|
3764
|
-
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${
|
|
3765
|
-
},
|
|
3787
|
+
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${l.error}`));
|
|
3788
|
+
}, o.onpause = () => {
|
|
3766
3789
|
r === this.speakRunId && (this._isPaused = !0);
|
|
3767
|
-
},
|
|
3790
|
+
}, o.onresume = () => {
|
|
3768
3791
|
r === this.speakRunId && (this._isPaused = !1);
|
|
3769
|
-
},
|
|
3770
|
-
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
3771
|
-
const
|
|
3772
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:",
|
|
3773
|
-
}, speechSynthesis.speak(
|
|
3792
|
+
}, o.onboundary = (l) => {
|
|
3793
|
+
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", l.name, "charIndex:", l.charIndex, "charLength:", l.charLength), l.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
3794
|
+
const c = Math.max(0, Math.min(l.charIndex, Math.max(0, e.length - 1))), u = Number(l.charLength || 0), f = this.inferWordLength(e, c), d = Number.isFinite(u) && u > 0 && u <= 80 && c + u <= e.length ? u : f, p = e.substring(c, Math.min(e.length, c + d)).trim(), v = t + c;
|
|
3795
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", p, "at position:", v), this.onWordBoundary(p, v, d);
|
|
3796
|
+
}, speechSynthesis.speak(o);
|
|
3774
3797
|
});
|
|
3775
3798
|
}
|
|
3776
3799
|
pause() {
|
|
@@ -3780,7 +3803,7 @@ var su = class {
|
|
|
3780
3803
|
this._isPlaying && this._isPaused && speechSynthesis.resume();
|
|
3781
3804
|
}
|
|
3782
3805
|
stop() {
|
|
3783
|
-
this.speakRunId += 1, this._isPlaying && speechSynthesis.cancel(), this._isPlaying = !1, this._isPaused = !1;
|
|
3806
|
+
this.speakRunId += 1, (this._isPlaying || this.utterance) && speechSynthesis.cancel(), this.utterance = null, this._isPlaying = !1, this._isPaused = !1;
|
|
3784
3807
|
}
|
|
3785
3808
|
isPlaying() {
|
|
3786
3809
|
return this._isPlaying && !this._isPaused;
|
|
@@ -3794,7 +3817,7 @@ var su = class {
|
|
|
3794
3817
|
...e.providerOptions || {}
|
|
3795
3818
|
});
|
|
3796
3819
|
}
|
|
3797
|
-
},
|
|
3820
|
+
}, du = class {
|
|
3798
3821
|
async emitTelemetry(e, t) {
|
|
3799
3822
|
try {
|
|
3800
3823
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -3826,7 +3849,7 @@ var su = class {
|
|
|
3826
3849
|
}
|
|
3827
3850
|
async _initializeBrowserTTS(e) {
|
|
3828
3851
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3829
|
-
this.ttsProvider = new
|
|
3852
|
+
this.ttsProvider = new Vs(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3830
3853
|
}
|
|
3831
3854
|
async _initializeServerTTS(e) {
|
|
3832
3855
|
if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
@@ -3884,7 +3907,7 @@ var su = class {
|
|
|
3884
3907
|
destroy() {
|
|
3885
3908
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3886
3909
|
}
|
|
3887
|
-
},
|
|
3910
|
+
}, hu = /* @__PURE__ */ new Set([
|
|
3888
3911
|
"annotation-xml",
|
|
3889
3912
|
"color-profile",
|
|
3890
3913
|
"font-face",
|
|
@@ -3893,16 +3916,16 @@ var su = class {
|
|
|
3893
3916
|
"font-face-format",
|
|
3894
3917
|
"font-face-name",
|
|
3895
3918
|
"missing-glyph"
|
|
3896
|
-
]),
|
|
3919
|
+
]), pu = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, gu = (e, t = "custom element tag") => {
|
|
3897
3920
|
if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
|
|
3898
3921
|
const r = e.trim();
|
|
3899
3922
|
if (!r) throw new Error(`Invalid ${t}: tag is empty`);
|
|
3900
3923
|
if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
|
|
3901
3924
|
if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
|
|
3902
|
-
if (
|
|
3903
|
-
if (!
|
|
3925
|
+
if (hu.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
3926
|
+
if (!pu.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3904
3927
|
return r;
|
|
3905
|
-
},
|
|
3928
|
+
}, qs = {
|
|
3906
3929
|
calculator: "pie-tool-calculator",
|
|
3907
3930
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3908
3931
|
ruler: "pie-tool-ruler",
|
|
@@ -3914,21 +3937,21 @@ var su = class {
|
|
|
3914
3937
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3915
3938
|
graph: "pie-tool-graph",
|
|
3916
3939
|
periodicTable: "pie-tool-periodic-table"
|
|
3917
|
-
},
|
|
3918
|
-
const i =
|
|
3940
|
+
}, vu = (e, t) => gu(t?.toolTagMap?.[e] ?? qs[e] ?? e, `tool component tag for "${e}"`), mu = (e) => document.createElement(e), Be = (e, t, r, n) => {
|
|
3941
|
+
const i = vu(e, n), o = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
|
|
3919
3942
|
return o ? o({
|
|
3920
3943
|
toolId: e,
|
|
3921
3944
|
tagName: i,
|
|
3922
3945
|
context: t,
|
|
3923
3946
|
toolbarContext: r
|
|
3924
|
-
}) :
|
|
3947
|
+
}) : mu(i);
|
|
3925
3948
|
}, Zn = /* @__PURE__ */ new WeakMap();
|
|
3926
|
-
function
|
|
3949
|
+
function yu(e, t) {
|
|
3927
3950
|
if (!e) return null;
|
|
3928
3951
|
const r = Zn.get(e), n = r?.get(t);
|
|
3929
3952
|
return n ? n.isConnected ? n : (r?.delete(t), null) : null;
|
|
3930
3953
|
}
|
|
3931
|
-
function
|
|
3954
|
+
function bu(e, t, r) {
|
|
3932
3955
|
if (!e) return;
|
|
3933
3956
|
let n = Zn.get(e);
|
|
3934
3957
|
n || (n = /* @__PURE__ */ new Map(), Zn.set(e, n)), n.set(t, r);
|
|
@@ -3936,7 +3959,7 @@ function gu(e, t, r) {
|
|
|
3936
3959
|
function ho(e) {
|
|
3937
3960
|
return e === "basic" || e === "scientific" ? e : null;
|
|
3938
3961
|
}
|
|
3939
|
-
function
|
|
3962
|
+
function _u(e) {
|
|
3940
3963
|
const t = e.getToolRenderParams?.("calculator") ?? {}, r = ho(t.calculatorType), n = t.availableTypes;
|
|
3941
3964
|
return {
|
|
3942
3965
|
calculatorType: r,
|
|
@@ -3948,14 +3971,14 @@ function po(e, t, r) {
|
|
|
3948
3971
|
const n = e;
|
|
3949
3972
|
t ? (n.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete n.calculatorType, e.removeAttribute("calculator-type")), r && r.length > 0 ? n.availableTypes = r : delete n.availableTypes;
|
|
3950
3973
|
}
|
|
3951
|
-
var
|
|
3974
|
+
var Tu = {
|
|
3952
3975
|
toolId: "calculator",
|
|
3953
3976
|
name: "Calculator",
|
|
3954
3977
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3955
3978
|
icon: "calculator",
|
|
3956
3979
|
provider: {
|
|
3957
3980
|
getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
|
|
3958
|
-
createProvider: () => new
|
|
3981
|
+
createProvider: () => new au(),
|
|
3959
3982
|
getInitConfig: (e) => e?.provider?.init ?? {},
|
|
3960
3983
|
getAuthFetcher: (e) => {
|
|
3961
3984
|
const t = e?.provider?.runtime?.authFetcher;
|
|
@@ -3981,8 +4004,8 @@ var mu = {
|
|
|
3981
4004
|
return dn(e);
|
|
3982
4005
|
},
|
|
3983
4006
|
renderToolbar(e, t) {
|
|
3984
|
-
const { calculatorType: r, availableTypes: n, displayName: i } =
|
|
3985
|
-
a ||
|
|
4007
|
+
const { calculatorType: r, availableTypes: n, displayName: i } = _u(t), o = Mi(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = yu(t.toolCoordinator, o), l = a ?? Be(this.toolId, e, t, s);
|
|
4008
|
+
a || bu(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, po(l, r, n);
|
|
3986
4009
|
const c = r === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = r === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, f = {
|
|
3987
4010
|
toolId: this.toolId,
|
|
3988
4011
|
label: i,
|
|
@@ -4023,7 +4046,7 @@ var mu = {
|
|
|
4023
4046
|
}
|
|
4024
4047
|
};
|
|
4025
4048
|
}
|
|
4026
|
-
}, G = (e) => e.trim().replace(/\s+/g, " "),
|
|
4049
|
+
}, G = (e) => e.trim().replace(/\s+/g, " "), Us = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Gs = (e) => {
|
|
4027
4050
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
4028
4051
|
const t = e.classList;
|
|
4029
4052
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -4037,12 +4060,12 @@ var mu = {
|
|
|
4037
4060
|
}, Jt = (e, t) => {
|
|
4038
4061
|
let r = e.nodeType === 1 ? e : e.parentElement;
|
|
4039
4062
|
for (; r; ) {
|
|
4040
|
-
if (
|
|
4063
|
+
if (Gs(r)) return !0;
|
|
4041
4064
|
if (t && r === t) break;
|
|
4042
4065
|
r = r.parentElement;
|
|
4043
4066
|
}
|
|
4044
4067
|
return !1;
|
|
4045
|
-
},
|
|
4068
|
+
}, Ys = (e, t, r) => {
|
|
4046
4069
|
if (!e || !t || /\s/.test(e) || /\s/.test(t)) return !1;
|
|
4047
4070
|
const n = r?.boundarySpacingMode ?? "segmenterPreferred";
|
|
4048
4071
|
if (n === "none") return !1;
|
|
@@ -4069,28 +4092,28 @@ var mu = {
|
|
|
4069
4092
|
for (; u; ) {
|
|
4070
4093
|
const d = u;
|
|
4071
4094
|
if (d.parentElement && !Jt(d, e)) {
|
|
4072
|
-
const p = d.textContent || "",
|
|
4073
|
-
!o && !s &&
|
|
4074
|
-
for (let
|
|
4075
|
-
const _ = p[
|
|
4095
|
+
const p = d.textContent || "", v = p.match(/\S/), b = v ? v[0] : null;
|
|
4096
|
+
!o && !s && Ys(l, b, t) && (n.push(" "), a && r.set(i, a), i++, s = !0);
|
|
4097
|
+
for (let m = 0; m < p.length; m++) {
|
|
4098
|
+
const _ = p[m], N = /\s/.test(_);
|
|
4076
4099
|
o ? N || (o = !1, n.push(_), r.set(i, {
|
|
4077
4100
|
node: d,
|
|
4078
|
-
offset:
|
|
4101
|
+
offset: m
|
|
4079
4102
|
}), a = {
|
|
4080
4103
|
node: d,
|
|
4081
|
-
offset:
|
|
4104
|
+
offset: m
|
|
4082
4105
|
}, i++, s = !1, l = _) : N ? (s || (n.push(" "), r.set(i, {
|
|
4083
4106
|
node: d,
|
|
4084
|
-
offset:
|
|
4107
|
+
offset: m
|
|
4085
4108
|
}), a = {
|
|
4086
4109
|
node: d,
|
|
4087
|
-
offset:
|
|
4110
|
+
offset: m
|
|
4088
4111
|
}, i++), s = !0) : (n.push(_), r.set(i, {
|
|
4089
4112
|
node: d,
|
|
4090
|
-
offset:
|
|
4113
|
+
offset: m
|
|
4091
4114
|
}), a = {
|
|
4092
4115
|
node: d,
|
|
4093
|
-
offset:
|
|
4116
|
+
offset: m
|
|
4094
4117
|
}, i++, s = !1, l = _);
|
|
4095
4118
|
}
|
|
4096
4119
|
}
|
|
@@ -4102,11 +4125,11 @@ var mu = {
|
|
|
4102
4125
|
text: f,
|
|
4103
4126
|
map: r
|
|
4104
4127
|
};
|
|
4105
|
-
}, Ln = null, go = Promise.resolve(),
|
|
4128
|
+
}, Ln = null, go = Promise.resolve(), wu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Su = async () => (Ln || (Ln = import("./sre-8x5k27Ii.js").then((e) => /* @__PURE__ */ Va(e.default, 1)).then((e) => {
|
|
4106
4129
|
const t = e.default || e;
|
|
4107
4130
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
4108
4131
|
return t;
|
|
4109
|
-
})), Ln),
|
|
4132
|
+
})), Ln), ku = (e) => e === "en" ? "clearspeak" : "mathspeak", vo = (e) => !!e && typeof e == "object" && !Array.isArray(e), mo = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, pn = (e) => {
|
|
4110
4133
|
if (!vo(e)) return;
|
|
4111
4134
|
const t = mo(e.domain), r = mo(e.style), n = vo(e.engineOptions) ? e.engineOptions : void 0;
|
|
4112
4135
|
if (!(!t && !r && !n))
|
|
@@ -4115,36 +4138,36 @@ var mu = {
|
|
|
4115
4138
|
...r ? { style: r } : {},
|
|
4116
4139
|
...n ? { engineOptions: n } : {}
|
|
4117
4140
|
};
|
|
4118
|
-
},
|
|
4119
|
-
const i =
|
|
4141
|
+
}, xu = async (e, t, r, n) => {
|
|
4142
|
+
const i = wu(t), o = pn(n);
|
|
4120
4143
|
await e.setupEngine?.({
|
|
4121
4144
|
...o?.engineOptions || {},
|
|
4122
4145
|
locale: i,
|
|
4123
|
-
domain: o?.domain ||
|
|
4146
|
+
domain: o?.domain || ku(i),
|
|
4124
4147
|
...o?.style ? { style: o.style } : {},
|
|
4125
4148
|
modality: "speech",
|
|
4126
4149
|
markup: r
|
|
4127
4150
|
}), await e.engineReady?.();
|
|
4128
|
-
},
|
|
4151
|
+
}, Eu = async (e) => {
|
|
4129
4152
|
const t = go.then(e, e);
|
|
4130
4153
|
return go = t.then(() => {
|
|
4131
4154
|
}, () => {
|
|
4132
4155
|
}), t;
|
|
4133
|
-
},
|
|
4156
|
+
}, Ks = async (e, t, r, n, i) => Eu(async () => (await xu(e, r, n, i), e.toSpeech(t))), Au = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), Mu = async (e, t, r, n) => {
|
|
4134
4157
|
try {
|
|
4135
|
-
const i =
|
|
4158
|
+
const i = Au(await Ks(e, t, r, "ssml", n));
|
|
4136
4159
|
return i.includes("<speak") ? i : null;
|
|
4137
4160
|
} catch (i) {
|
|
4138
4161
|
return console.debug("[TTSService] Math SSML generation failed; using plain", { message: i instanceof Error ? i.message : String(i) }), null;
|
|
4139
4162
|
}
|
|
4140
|
-
},
|
|
4163
|
+
}, Xs = async (e, t = {}) => {
|
|
4141
4164
|
if (!e.some((c) => c.type === "math")) return {
|
|
4142
4165
|
speechText: G(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
4143
4166
|
usedMathSpeech: !1,
|
|
4144
4167
|
usedFallback: !1
|
|
4145
4168
|
};
|
|
4146
4169
|
let r = null, n = !1, i = !1;
|
|
4147
|
-
const o = t.loadSre ||
|
|
4170
|
+
const o = t.loadSre || Su, s = [];
|
|
4148
4171
|
for (const c of e) {
|
|
4149
4172
|
if (c.type === "text") {
|
|
4150
4173
|
s.push(c.text);
|
|
@@ -4152,7 +4175,7 @@ var mu = {
|
|
|
4152
4175
|
}
|
|
4153
4176
|
try {
|
|
4154
4177
|
r || (r = await o());
|
|
4155
|
-
const u = G(await
|
|
4178
|
+
const u = G(await Ks(r, c.mathml, t.language, "none", t.mathSpeech));
|
|
4156
4179
|
if (u) {
|
|
4157
4180
|
s.push(u), n = !0;
|
|
4158
4181
|
continue;
|
|
@@ -4164,18 +4187,18 @@ var mu = {
|
|
|
4164
4187
|
}
|
|
4165
4188
|
const a = G(s.join(" "));
|
|
4166
4189
|
let l;
|
|
4167
|
-
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await
|
|
4190
|
+
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await Mu(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
4168
4191
|
speechText: a,
|
|
4169
4192
|
usedMathSpeech: n,
|
|
4170
4193
|
usedFallback: i,
|
|
4171
4194
|
ssml: l
|
|
4172
4195
|
};
|
|
4173
|
-
},
|
|
4196
|
+
}, Cu = /* @__PURE__ */ new Set([
|
|
4174
4197
|
"reserved-row",
|
|
4175
4198
|
"expanding-row",
|
|
4176
4199
|
"floating-overlay",
|
|
4177
4200
|
"left-aligned"
|
|
4178
|
-
]), yo = (e) => e && typeof e == "object" ? e : {},
|
|
4201
|
+
]), yo = (e) => e && typeof e == "object" ? e : {}, Ou = (e) => e === "polly" || e === "google" || e === "server", he = (e, t) => e === void 0 ? t : e, en = (e, t = "left-aligned") => typeof e == "string" && Cu.has(e) ? e : t, bo = Object.freeze([0.8, 1.25]), Pn = (e) => {
|
|
4179
4202
|
if (!Array.isArray(e)) return [...bo];
|
|
4180
4203
|
if (e.length === 0) return [];
|
|
4181
4204
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -4185,12 +4208,12 @@ var mu = {
|
|
|
4185
4208
|
n !== 1 && t.add(n);
|
|
4186
4209
|
}
|
|
4187
4210
|
return t.size ? Array.from(t) : [...bo];
|
|
4188
|
-
},
|
|
4211
|
+
}, Iu = (e) => {
|
|
4189
4212
|
const t = {
|
|
4190
4213
|
...e,
|
|
4191
4214
|
layoutMode: en(e.layoutMode)
|
|
4192
4215
|
}, r = e.backend || "browser";
|
|
4193
|
-
if (!
|
|
4216
|
+
if (!Ou(r)) return t;
|
|
4194
4217
|
const n = {
|
|
4195
4218
|
...t,
|
|
4196
4219
|
apiEndpoint: he(t.apiEndpoint, "/api/tts"),
|
|
@@ -4213,12 +4236,12 @@ var mu = {
|
|
|
4213
4236
|
} : n;
|
|
4214
4237
|
}, Nn = (e) => {
|
|
4215
4238
|
const t = yo(e), r = yo(t.settings);
|
|
4216
|
-
return
|
|
4239
|
+
return Iu({
|
|
4217
4240
|
...t,
|
|
4218
4241
|
...r
|
|
4219
4242
|
});
|
|
4220
|
-
}, ei = (e) => e.backend || "browser",
|
|
4221
|
-
const t = ei(e), r =
|
|
4243
|
+
}, ei = (e) => e.backend || "browser", Js = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Qs = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), $u = (e) => {
|
|
4244
|
+
const t = ei(e), r = Js(e, t), n = Qs(e, r), i = pn(e.mathSpeech);
|
|
4222
4245
|
return {
|
|
4223
4246
|
voice: e.defaultVoice,
|
|
4224
4247
|
rate: e.rate,
|
|
@@ -4244,8 +4267,8 @@ var mu = {
|
|
|
4244
4267
|
validateEndpoint: e.validateEndpoint,
|
|
4245
4268
|
...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
|
|
4246
4269
|
};
|
|
4247
|
-
},
|
|
4248
|
-
switch (
|
|
4270
|
+
}, Zs = (e) => en(e.layoutMode), Ru = (e) => {
|
|
4271
|
+
switch (Zs(e)) {
|
|
4249
4272
|
case "reserved-row":
|
|
4250
4273
|
return {
|
|
4251
4274
|
mount: "before-buttons",
|
|
@@ -4271,21 +4294,21 @@ var mu = {
|
|
|
4271
4294
|
}
|
|
4272
4295
|
};
|
|
4273
4296
|
}
|
|
4274
|
-
}, ir = /* @__PURE__ */ new Map(),
|
|
4297
|
+
}, ir = /* @__PURE__ */ new Map(), Lu = "__pieToolElementUnmount", _o = "pie-tool-active-change", Pu = {
|
|
4275
4298
|
toolId: "textToSpeech",
|
|
4276
4299
|
name: "Text to Speech",
|
|
4277
4300
|
description: "Read content aloud",
|
|
4278
4301
|
icon: "volume-up",
|
|
4279
4302
|
provider: {
|
|
4280
4303
|
getProviderId: () => "tts",
|
|
4281
|
-
createProvider: (e) => new
|
|
4304
|
+
createProvider: (e) => new du(ei(Nn(e))),
|
|
4282
4305
|
getInitConfig: (e) => {
|
|
4283
|
-
const t = Nn(e), r = ei(t), n =
|
|
4306
|
+
const t = Nn(e), r = ei(t), n = Js(t, r);
|
|
4284
4307
|
return {
|
|
4285
4308
|
backend: r,
|
|
4286
4309
|
serverProvider: n,
|
|
4287
|
-
transportMode:
|
|
4288
|
-
|
|
4310
|
+
transportMode: Qs(t, n),
|
|
4311
|
+
...$u(t)
|
|
4289
4312
|
};
|
|
4290
4313
|
},
|
|
4291
4314
|
getAuthFetcher: (e) => {
|
|
@@ -4311,12 +4334,12 @@ var mu = {
|
|
|
4311
4334
|
return hn(e);
|
|
4312
4335
|
},
|
|
4313
4336
|
renderToolbar(e, t) {
|
|
4314
|
-
const r = () => Nn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => Pn(r().speedOptions), i = () =>
|
|
4337
|
+
const r = () => Nn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => Pn(r().speedOptions), i = () => Zs(r()), o = () => Ru(r()), s = Mi(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
|
|
4315
4338
|
const u = t.ui?.size;
|
|
4316
4339
|
return u === "sm" || u === "lg" ? u : "md";
|
|
4317
4340
|
}, l = () => {
|
|
4318
4341
|
let u = ir.get(s);
|
|
4319
|
-
return u && typeof u.isConnected == "boolean" && !u.isConnected && (ir.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[
|
|
4342
|
+
return u && typeof u.isConnected == "boolean" && !u.isConnected && (ir.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Lu] = () => {
|
|
4320
4343
|
ir.get(s) === u && ir.delete(s);
|
|
4321
4344
|
}, ir.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n(), u;
|
|
4322
4345
|
}, c = o();
|
|
@@ -4333,8 +4356,8 @@ var mu = {
|
|
|
4333
4356
|
}],
|
|
4334
4357
|
subscribeActive: (u) => {
|
|
4335
4358
|
const f = l(), d = (p) => {
|
|
4336
|
-
const
|
|
4337
|
-
u(
|
|
4359
|
+
const v = p.detail;
|
|
4360
|
+
u(v?.active === !0);
|
|
4338
4361
|
};
|
|
4339
4362
|
return f.addEventListener(_o, d), () => {
|
|
4340
4363
|
f.removeEventListener(_o, d);
|
|
@@ -4365,7 +4388,7 @@ function Ze(e) {
|
|
|
4365
4388
|
function Oi(e, t) {
|
|
4366
4389
|
e.setAttribute("data-pie-tool-surface", t);
|
|
4367
4390
|
}
|
|
4368
|
-
var
|
|
4391
|
+
var Nu = {
|
|
4369
4392
|
toolId: "ruler",
|
|
4370
4393
|
name: "Ruler",
|
|
4371
4394
|
description: "On-screen ruler for measurements",
|
|
@@ -4389,7 +4412,7 @@ var $u = {
|
|
|
4389
4412
|
tooltip: "Ruler",
|
|
4390
4413
|
onClick: () => t.toggleTool(this.toolId),
|
|
4391
4414
|
active: r.isActive()
|
|
4392
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4415
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4393
4416
|
return o.setAttribute("tool-id", r.fullToolId), Oi(o, "frameless"), {
|
|
4394
4417
|
toolId: this.toolId,
|
|
4395
4418
|
button: n,
|
|
@@ -4407,7 +4430,7 @@ var $u = {
|
|
|
4407
4430
|
subscribeActive: r.subscribeActive
|
|
4408
4431
|
};
|
|
4409
4432
|
}
|
|
4410
|
-
},
|
|
4433
|
+
}, zu = {
|
|
4411
4434
|
toolId: "protractor",
|
|
4412
4435
|
name: "Protractor",
|
|
4413
4436
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4431,7 +4454,7 @@ var $u = {
|
|
|
4431
4454
|
tooltip: "Protractor",
|
|
4432
4455
|
onClick: () => t.toggleTool(this.toolId),
|
|
4433
4456
|
active: r.isActive()
|
|
4434
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4457
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4435
4458
|
return o.setAttribute("tool-id", r.fullToolId), Oi(o, "frameless"), {
|
|
4436
4459
|
toolId: this.toolId,
|
|
4437
4460
|
button: n,
|
|
@@ -4449,7 +4472,7 @@ var $u = {
|
|
|
4449
4472
|
subscribeActive: r.subscribeActive
|
|
4450
4473
|
};
|
|
4451
4474
|
}
|
|
4452
|
-
},
|
|
4475
|
+
}, Wu = {
|
|
4453
4476
|
toolId: "answerEliminator",
|
|
4454
4477
|
name: "Answer Eliminator",
|
|
4455
4478
|
description: "Strike through answer choices",
|
|
@@ -4462,10 +4485,10 @@ var $u = {
|
|
|
4462
4485
|
"choiceMasking"
|
|
4463
4486
|
],
|
|
4464
4487
|
isVisibleInContext(e) {
|
|
4465
|
-
return
|
|
4488
|
+
return ru(e);
|
|
4466
4489
|
},
|
|
4467
4490
|
renderToolbar(e, t) {
|
|
4468
|
-
const r = Qe(this.toolId, t), n = t.componentOverrides ?? {}, i =
|
|
4491
|
+
const r = Qe(this.toolId, t), n = t.componentOverrides ?? {}, i = Be(this.toolId, e, t, n);
|
|
4469
4492
|
i.setAttribute("tool-id", r.fullToolId), i.setAttribute("strategy", "strikethrough"), i.setAttribute("button-alignment", "inline");
|
|
4470
4493
|
const o = {
|
|
4471
4494
|
toolId: this.toolId,
|
|
@@ -4496,7 +4519,7 @@ var $u = {
|
|
|
4496
4519
|
subscribeActive: r.subscribeActive
|
|
4497
4520
|
};
|
|
4498
4521
|
}
|
|
4499
|
-
},
|
|
4522
|
+
}, Hu = {
|
|
4500
4523
|
toolId: "highlighter",
|
|
4501
4524
|
name: "Highlighter",
|
|
4502
4525
|
description: "Highlight text",
|
|
@@ -4526,7 +4549,7 @@ var $u = {
|
|
|
4526
4549
|
tooltip: "Highlight",
|
|
4527
4550
|
onClick: () => t.toggleTool(this.toolId),
|
|
4528
4551
|
active: r.isActive()
|
|
4529
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4552
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4530
4553
|
return o.setAttribute("tool-id", r.fullToolId), {
|
|
4531
4554
|
toolId: this.toolId,
|
|
4532
4555
|
button: n,
|
|
@@ -4547,7 +4570,7 @@ var $u = {
|
|
|
4547
4570
|
subscribeActive: r.subscribeActive
|
|
4548
4571
|
};
|
|
4549
4572
|
}
|
|
4550
|
-
},
|
|
4573
|
+
}, Bu = {
|
|
4551
4574
|
toolId: "lineReader",
|
|
4552
4575
|
name: "Line Reader",
|
|
4553
4576
|
description: "Reading guide overlay",
|
|
@@ -4578,7 +4601,7 @@ var $u = {
|
|
|
4578
4601
|
tooltip: "Line Reader",
|
|
4579
4602
|
onClick: () => t.toggleTool(this.toolId),
|
|
4580
4603
|
active: r.isActive()
|
|
4581
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4604
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4582
4605
|
return o.setAttribute("tool-id", r.fullToolId), Oi(o, "frameless"), {
|
|
4583
4606
|
toolId: this.toolId,
|
|
4584
4607
|
button: n,
|
|
@@ -4596,7 +4619,7 @@ var $u = {
|
|
|
4596
4619
|
subscribeActive: r.subscribeActive
|
|
4597
4620
|
};
|
|
4598
4621
|
}
|
|
4599
|
-
},
|
|
4622
|
+
}, Du = {
|
|
4600
4623
|
toolId: "theme",
|
|
4601
4624
|
name: "Theme",
|
|
4602
4625
|
description: "Accessible themes and contrast",
|
|
@@ -4623,7 +4646,7 @@ var $u = {
|
|
|
4623
4646
|
tooltip: "Theme",
|
|
4624
4647
|
onClick: () => t.toggleTool(this.toolId),
|
|
4625
4648
|
active: r.isActive()
|
|
4626
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4649
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4627
4650
|
return o.setAttribute("tool-id", r.fullToolId), {
|
|
4628
4651
|
toolId: this.toolId,
|
|
4629
4652
|
button: n,
|
|
@@ -4651,7 +4674,7 @@ var $u = {
|
|
|
4651
4674
|
subscribeActive: r.subscribeActive
|
|
4652
4675
|
};
|
|
4653
4676
|
}
|
|
4654
|
-
},
|
|
4677
|
+
}, Fu = {
|
|
4655
4678
|
toolId: "annotationToolbar",
|
|
4656
4679
|
name: "Highlighter",
|
|
4657
4680
|
description: "Highlight and annotate text",
|
|
@@ -4684,7 +4707,7 @@ var $u = {
|
|
|
4684
4707
|
tooltip: "Highlight",
|
|
4685
4708
|
onClick: () => t.toggleTool(this.toolId),
|
|
4686
4709
|
active: r.isActive()
|
|
4687
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4710
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4688
4711
|
return o.setAttribute("tool-id", r.fullToolId), {
|
|
4689
4712
|
toolId: this.toolId,
|
|
4690
4713
|
button: n,
|
|
@@ -4702,7 +4725,7 @@ var $u = {
|
|
|
4702
4725
|
subscribeActive: r.subscribeActive
|
|
4703
4726
|
};
|
|
4704
4727
|
}
|
|
4705
|
-
},
|
|
4728
|
+
}, ju = {
|
|
4706
4729
|
toolId: "graph",
|
|
4707
4730
|
name: "Graph",
|
|
4708
4731
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4727,7 +4750,7 @@ var $u = {
|
|
|
4727
4750
|
tooltip: "Graph",
|
|
4728
4751
|
onClick: () => t.toggleTool(this.toolId),
|
|
4729
4752
|
active: r.isActive()
|
|
4730
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4753
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4731
4754
|
return o.setAttribute("tool-id", r.fullToolId), {
|
|
4732
4755
|
toolId: this.toolId,
|
|
4733
4756
|
button: n,
|
|
@@ -4755,7 +4778,7 @@ var $u = {
|
|
|
4755
4778
|
subscribeActive: r.subscribeActive
|
|
4756
4779
|
};
|
|
4757
4780
|
}
|
|
4758
|
-
},
|
|
4781
|
+
}, Vu = {
|
|
4759
4782
|
toolId: "periodicTable",
|
|
4760
4783
|
name: "Periodic Table",
|
|
4761
4784
|
description: "Chemistry periodic table reference",
|
|
@@ -4767,7 +4790,7 @@ var $u = {
|
|
|
4767
4790
|
"elementReference"
|
|
4768
4791
|
],
|
|
4769
4792
|
isVisibleInContext(e) {
|
|
4770
|
-
return
|
|
4793
|
+
return nu(e);
|
|
4771
4794
|
},
|
|
4772
4795
|
renderToolbar(e, t) {
|
|
4773
4796
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4779,7 +4802,7 @@ var $u = {
|
|
|
4779
4802
|
tooltip: "Periodic Table",
|
|
4780
4803
|
onClick: () => t.toggleTool(this.toolId),
|
|
4781
4804
|
active: r.isActive()
|
|
4782
|
-
}, i = t.componentOverrides ?? {}, o =
|
|
4805
|
+
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4783
4806
|
return o.setAttribute("tool-id", r.fullToolId), {
|
|
4784
4807
|
toolId: this.toolId,
|
|
4785
4808
|
button: n,
|
|
@@ -4807,54 +4830,54 @@ var $u = {
|
|
|
4807
4830
|
subscribeActive: r.subscribeActive
|
|
4808
4831
|
};
|
|
4809
4832
|
}
|
|
4810
|
-
},
|
|
4811
|
-
|
|
4812
|
-
Iu,
|
|
4813
|
-
$u,
|
|
4814
|
-
Ru,
|
|
4815
|
-
Lu,
|
|
4833
|
+
}, qu = [
|
|
4834
|
+
Tu,
|
|
4816
4835
|
Pu,
|
|
4817
4836
|
Nu,
|
|
4818
4837
|
zu,
|
|
4819
4838
|
Wu,
|
|
4820
4839
|
Hu,
|
|
4821
|
-
|
|
4840
|
+
Bu,
|
|
4841
|
+
Du,
|
|
4842
|
+
Fu,
|
|
4843
|
+
ju,
|
|
4844
|
+
Vu
|
|
4822
4845
|
];
|
|
4823
|
-
function
|
|
4824
|
-
const t = new
|
|
4846
|
+
function Uu(e = {}) {
|
|
4847
|
+
const t = new Zc(), r = {
|
|
4825
4848
|
toolTagMap: {
|
|
4826
|
-
...
|
|
4849
|
+
...qs,
|
|
4827
4850
|
...e.toolTagMap || {}
|
|
4828
4851
|
},
|
|
4829
4852
|
toolComponentFactory: e.toolComponentFactory,
|
|
4830
4853
|
toolComponentFactories: e.toolComponentFactories
|
|
4831
4854
|
}, n = (i) => e.overrides?.[i.toolId] || i;
|
|
4832
|
-
return e.includePackagedTools &&
|
|
4855
|
+
return e.includePackagedTools && Gu(t, {
|
|
4833
4856
|
toolIds: e.toolIds,
|
|
4834
4857
|
applyOverrides: n
|
|
4835
4858
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
|
|
4836
4859
|
}
|
|
4837
|
-
function
|
|
4860
|
+
function Gu(e, t = {}) {
|
|
4838
4861
|
const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, n = t.applyOverrides || ((i) => i);
|
|
4839
|
-
for (const i of
|
|
4862
|
+
for (const i of qu)
|
|
4840
4863
|
r && !r.has(i.toolId) || e.register(n(i));
|
|
4841
4864
|
}
|
|
4842
|
-
function
|
|
4843
|
-
return
|
|
4865
|
+
function Yu(e = {}) {
|
|
4866
|
+
return Uu({
|
|
4844
4867
|
...e,
|
|
4845
4868
|
includePackagedTools: !0
|
|
4846
4869
|
});
|
|
4847
4870
|
}
|
|
4848
|
-
function
|
|
4849
|
-
const e =
|
|
4871
|
+
function Ku() {
|
|
4872
|
+
const e = Yu(), t = /* @__PURE__ */ new Set();
|
|
4850
4873
|
for (const r of e.getAllTools()) for (const n of r.pnpSupportIds || []) t.add(n);
|
|
4851
4874
|
return [...t].sort();
|
|
4852
4875
|
}
|
|
4853
|
-
var
|
|
4854
|
-
supports: [...
|
|
4876
|
+
var Xu = Ku(), yh = {
|
|
4877
|
+
supports: [...Xu],
|
|
4855
4878
|
prohibitedSupports: [],
|
|
4856
4879
|
activateAtInit: []
|
|
4857
|
-
},
|
|
4880
|
+
}, Ju = {
|
|
4858
4881
|
visual: {
|
|
4859
4882
|
magnification: "magnification",
|
|
4860
4883
|
screenMagnifier: "screenMagnifier",
|
|
@@ -4967,11 +4990,11 @@ var Uu = qu(), ph = {
|
|
|
4967
4990
|
itemGlossary: "itemGlossary",
|
|
4968
4991
|
tutorialAvailable: "tutorialAvailable"
|
|
4969
4992
|
}
|
|
4970
|
-
},
|
|
4993
|
+
}, bh = Object.values(Ju).flatMap((e) => Object.values(e)), _h = Hs("ToolCoordinator"), To;
|
|
4971
4994
|
(function(e) {
|
|
4972
4995
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4973
4996
|
})(To || (To = {}));
|
|
4974
|
-
var
|
|
4997
|
+
var Qu = /* @__PURE__ */ new Set([
|
|
4975
4998
|
"speak",
|
|
4976
4999
|
"p",
|
|
4977
5000
|
"s",
|
|
@@ -4980,20 +5003,20 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
4980
5003
|
"say-as",
|
|
4981
5004
|
"voice",
|
|
4982
5005
|
"lang"
|
|
4983
|
-
]), wo = /* @__PURE__ */ new Set(["audio", "phoneme"]),
|
|
5006
|
+
]), wo = /* @__PURE__ */ new Set(["audio", "phoneme"]), ea = (e) => e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), Pr = (e, t, r) => {
|
|
4984
5007
|
for (let n = 0; n < t.length; n++) e.push({
|
|
4985
5008
|
char: t[n],
|
|
4986
5009
|
rawOffset: r === null ? null : r + n
|
|
4987
5010
|
});
|
|
4988
|
-
},
|
|
5011
|
+
}, Zu = (e, t, r) => {
|
|
4989
5012
|
const n = t.slice(r).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
|
|
4990
|
-
return n ? (Pr(e,
|
|
5013
|
+
return n ? (Pr(e, ea(n[0]), r), n[0].length) : 0;
|
|
4991
5014
|
}, So = (e) => {
|
|
4992
5015
|
e.push({
|
|
4993
5016
|
char: " ",
|
|
4994
5017
|
rawOffset: null
|
|
4995
5018
|
});
|
|
4996
|
-
},
|
|
5019
|
+
}, ef = (e) => {
|
|
4997
5020
|
const t = /* @__PURE__ */ new Map(), r = [];
|
|
4998
5021
|
let n = !0;
|
|
4999
5022
|
for (const i of e) {
|
|
@@ -5009,17 +5032,17 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5009
5032
|
text: r.join(""),
|
|
5010
5033
|
rawToSpokenOffsetMap: t
|
|
5011
5034
|
};
|
|
5012
|
-
},
|
|
5035
|
+
}, tf = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", rf = (e, t) => {
|
|
5013
5036
|
const r = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), n = e.match(r);
|
|
5014
|
-
return
|
|
5015
|
-
},
|
|
5037
|
+
return ea(n?.[2] ?? n?.[3] ?? "") || null;
|
|
5038
|
+
}, ta = (e) => {
|
|
5016
5039
|
const t = [];
|
|
5017
5040
|
let r = !1, n = !1, i = 0;
|
|
5018
5041
|
for (; i < e.length; ) {
|
|
5019
5042
|
const s = e[i];
|
|
5020
5043
|
if (s !== "<") {
|
|
5021
5044
|
if (s === "&") {
|
|
5022
|
-
const d =
|
|
5045
|
+
const d = Zu(t, e, i);
|
|
5023
5046
|
if (d > 0) {
|
|
5024
5047
|
i += d;
|
|
5025
5048
|
continue;
|
|
@@ -5034,9 +5057,9 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5034
5057
|
continue;
|
|
5035
5058
|
}
|
|
5036
5059
|
n = !0;
|
|
5037
|
-
const l = e.slice(i, a + 1), c =
|
|
5060
|
+
const l = e.slice(i, a + 1), c = tf(l), u = /^<\s*\//.test(l), f = /\/\s*>$/.test(l);
|
|
5038
5061
|
if (!u && c === "sub") {
|
|
5039
|
-
const d =
|
|
5062
|
+
const d = rf(l, "alias");
|
|
5040
5063
|
if (!d) {
|
|
5041
5064
|
r = !0, i = a + 1;
|
|
5042
5065
|
continue;
|
|
@@ -5054,16 +5077,16 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5054
5077
|
i = a + 1;
|
|
5055
5078
|
continue;
|
|
5056
5079
|
}
|
|
5057
|
-
c && !
|
|
5080
|
+
c && !Qu.has(c) && !wo.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && So(t), i = a + 1;
|
|
5058
5081
|
}
|
|
5059
|
-
const o =
|
|
5082
|
+
const o = ef(t);
|
|
5060
5083
|
return {
|
|
5061
5084
|
spokenText: G(o.text),
|
|
5062
5085
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
5063
5086
|
unsupportedSemantic: r,
|
|
5064
5087
|
hasMarkup: n
|
|
5065
5088
|
};
|
|
5066
|
-
},
|
|
5089
|
+
}, nf = Us(), ra = /* @__PURE__ */ new Map([
|
|
5067
5090
|
["zero", "0"],
|
|
5068
5091
|
["one", "1"],
|
|
5069
5092
|
["two", "2"],
|
|
@@ -5075,7 +5098,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5075
5098
|
["eight", "8"],
|
|
5076
5099
|
["nine", "9"],
|
|
5077
5100
|
["ten", "10"]
|
|
5078
|
-
]),
|
|
5101
|
+
]), of = [
|
|
5079
5102
|
{
|
|
5080
5103
|
phrase: [
|
|
5081
5104
|
"plus",
|
|
@@ -5152,7 +5175,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5152
5175
|
}
|
|
5153
5176
|
], ti = (e) => {
|
|
5154
5177
|
const t = [];
|
|
5155
|
-
for (const r of e.matchAll(
|
|
5178
|
+
for (const r of e.matchAll(nf)) {
|
|
5156
5179
|
const n = r[0], i = r.index ?? 0;
|
|
5157
5180
|
t.push({
|
|
5158
5181
|
text: n,
|
|
@@ -5162,7 +5185,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5162
5185
|
});
|
|
5163
5186
|
}
|
|
5164
5187
|
return t;
|
|
5165
|
-
}, ri = (e) =>
|
|
5188
|
+
}, ri = (e) => ra.get(e.normalized) || e.normalized, sf = (e, t) => {
|
|
5166
5189
|
const r = [];
|
|
5167
5190
|
for (let n = 0; n < e.length; n++) {
|
|
5168
5191
|
for (let i = 0; i < t.length; i++) ri(e[n]) === ri(t[i]) && r.push({
|
|
@@ -5171,7 +5194,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5171
5194
|
visibleToken: i,
|
|
5172
5195
|
score: 10
|
|
5173
5196
|
});
|
|
5174
|
-
for (const i of
|
|
5197
|
+
for (const i of of) {
|
|
5175
5198
|
const o = e.slice(n, n + i.phrase.length);
|
|
5176
5199
|
if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
|
|
5177
5200
|
for (let s = 0; s < t.length; s++)
|
|
@@ -5184,15 +5207,15 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5184
5207
|
}
|
|
5185
5208
|
}
|
|
5186
5209
|
return r;
|
|
5187
|
-
},
|
|
5188
|
-
const r =
|
|
5210
|
+
}, af = (e, t) => {
|
|
5211
|
+
const r = sf(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
|
|
5189
5212
|
for (let l = 0; l < r.length; l++) {
|
|
5190
5213
|
const c = r[l];
|
|
5191
5214
|
n[l] = c.score;
|
|
5192
5215
|
for (let u = 0; u < l; u++) {
|
|
5193
5216
|
const f = r[u];
|
|
5194
5217
|
if (f.spokenEndToken <= c.spokenStartToken && f.visibleToken < c.visibleToken) {
|
|
5195
|
-
const d = c.spokenStartToken - f.spokenEndToken, p = c.visibleToken - f.visibleToken - 1,
|
|
5218
|
+
const d = c.spokenStartToken - f.spokenEndToken, p = c.visibleToken - f.visibleToken - 1, v = Math.max(0, Math.abs(d - p) - 2), b = n[u] + c.score - v;
|
|
5196
5219
|
b > n[l] && (n[l] = b, i[l] = u);
|
|
5197
5220
|
}
|
|
5198
5221
|
}
|
|
@@ -5214,12 +5237,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5214
5237
|
score: l.score
|
|
5215
5238
|
};
|
|
5216
5239
|
});
|
|
5217
|
-
},
|
|
5240
|
+
}, lf = (e, t, r) => {
|
|
5218
5241
|
if (e.length === 0) return 0;
|
|
5219
5242
|
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;
|
|
5220
5243
|
return Math.min(1, n * i);
|
|
5221
|
-
},
|
|
5222
|
-
const t =
|
|
5244
|
+
}, na = (e) => {
|
|
5245
|
+
const t = ta(e.speechText), r = G(e.visibleText), n = t.spokenText, i = ti(n), o = ti(r), s = t.unsupportedSemantic ? [] : af(i, o), a = lf(s, i, o), l = n === r && n.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";
|
|
5223
5246
|
return {
|
|
5224
5247
|
speechText: e.speechText,
|
|
5225
5248
|
spokenText: n,
|
|
@@ -5232,12 +5255,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5232
5255
|
visibleTokens: o,
|
|
5233
5256
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
|
|
5234
5257
|
};
|
|
5235
|
-
}, Ii = (e, t) => e.find((r) => r.start <= t && t < r.end) || null,
|
|
5258
|
+
}, Ii = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, ia = (e) => {
|
|
5236
5259
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5237
5260
|
const t = ti(e)[0];
|
|
5238
|
-
return t ?
|
|
5261
|
+
return t ? ra.get(t.normalized) || t.normalized : null;
|
|
5239
5262
|
}, ko = (e, t, r) => {
|
|
5240
|
-
const n =
|
|
5263
|
+
const n = ia(r);
|
|
5241
5264
|
if (!t || !n) return !1;
|
|
5242
5265
|
const i = Ii(e.spokenTokens, t.start);
|
|
5243
5266
|
return i ? ri(i) === n : !1;
|
|
@@ -5265,7 +5288,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5265
5288
|
start: t,
|
|
5266
5289
|
length: Math.min(r, n.end - t)
|
|
5267
5290
|
} : null;
|
|
5268
|
-
},
|
|
5291
|
+
}, cf = (e, t, r = 1, n) => {
|
|
5269
5292
|
if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
|
|
5270
5293
|
const i = Math.max(1, Number.isFinite(r) ? r : 1);
|
|
5271
5294
|
if (n && /^<[^>]+>$/.test(n.trim())) return null;
|
|
@@ -5274,12 +5297,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5274
5297
|
if (n) {
|
|
5275
5298
|
if (ko(e, o, n)) return o;
|
|
5276
5299
|
if (ko(e, s, n)) return s;
|
|
5277
|
-
if (
|
|
5300
|
+
if (ia(n)) return null;
|
|
5278
5301
|
}
|
|
5279
5302
|
return o || s;
|
|
5280
5303
|
}
|
|
5281
5304
|
return Ao(e, t, i) || Eo(e, t, i);
|
|
5282
|
-
},
|
|
5305
|
+
}, uf = (e, t) => {
|
|
5283
5306
|
if (e.playbackMode === "region-fallback") return null;
|
|
5284
5307
|
const r = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
|
|
5285
5308
|
if (r) return {
|
|
@@ -5301,7 +5324,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5301
5324
|
start: Math.min(n.visibleStart, i.visibleStart),
|
|
5302
5325
|
end: Math.max(n.visibleEnd, i.visibleEnd)
|
|
5303
5326
|
} : null;
|
|
5304
|
-
},
|
|
5327
|
+
}, ff = /* @__PURE__ */ new Map([
|
|
5305
5328
|
["+", ["plus"]],
|
|
5306
5329
|
["-", ["minus", "negative"]],
|
|
5307
5330
|
["−", ["minus", "negative"]],
|
|
@@ -5325,12 +5348,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5325
5348
|
["•", ["times"]],
|
|
5326
5349
|
["·", ["times"]],
|
|
5327
5350
|
["", ["times", "multiplied by"]]
|
|
5328
|
-
]),
|
|
5351
|
+
]), df = /* @__PURE__ */ new Map([
|
|
5329
5352
|
["", "function-application"],
|
|
5330
5353
|
["", "implicit-multiply"],
|
|
5331
5354
|
["", "invisible-separator"],
|
|
5332
5355
|
["", "invisible-plus"]
|
|
5333
|
-
]),
|
|
5356
|
+
]), oa = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), hf = /* @__PURE__ */ new Map([
|
|
5334
5357
|
["msqrt", "radical"],
|
|
5335
5358
|
["mroot", "radical"],
|
|
5336
5359
|
["msub", "subscript"],
|
|
@@ -5340,11 +5363,11 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5340
5363
|
["munderover", "underoverscript"],
|
|
5341
5364
|
["mmultiscripts", "multiscript"],
|
|
5342
5365
|
["menclose", "enclosure"]
|
|
5343
|
-
]),
|
|
5366
|
+
]), pf = (e) => e.replace(/\s+/g, " ").trim(), Ct = (e) => (e.localName || e.tagName || "").toLowerCase(), gf = (e) => e.nodeType === Node.ELEMENT_NODE, Kt = (e) => Array.from(e.childNodes).filter(gf), $i = (e) => pf(e.textContent || ""), Xe = (e, t) => ({
|
|
5344
5367
|
type: "element-range",
|
|
5345
5368
|
quality: t,
|
|
5346
5369
|
element: e
|
|
5347
|
-
}),
|
|
5370
|
+
}), vf = (e) => {
|
|
5348
5371
|
switch (e) {
|
|
5349
5372
|
case "mi":
|
|
5350
5373
|
return "identifier";
|
|
@@ -5360,15 +5383,15 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5360
5383
|
default:
|
|
5361
5384
|
return "unknown";
|
|
5362
5385
|
}
|
|
5363
|
-
},
|
|
5364
|
-
const t = e.normalized ??
|
|
5386
|
+
}, mf = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), yf = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? oa.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? ff.get(e) || [] : [], $t = (e) => {
|
|
5387
|
+
const t = e.normalized ?? mf(e.text, e.kind || "unknown");
|
|
5365
5388
|
return {
|
|
5366
5389
|
id: `math-token-${e.state.nextId++}`,
|
|
5367
5390
|
kind: e.kind,
|
|
5368
5391
|
role: e.role,
|
|
5369
5392
|
text: e.text,
|
|
5370
5393
|
normalized: t,
|
|
5371
|
-
spokenAliases:
|
|
5394
|
+
spokenAliases: yf(e.text, e.kind, e.role),
|
|
5372
5395
|
sourceElement: e.sourceElement,
|
|
5373
5396
|
path: e.path,
|
|
5374
5397
|
target: e.target || Xe(e.sourceElement, "element-range"),
|
|
@@ -5376,9 +5399,9 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5376
5399
|
};
|
|
5377
5400
|
}, Rt = (e, t, r = "tokens") => {
|
|
5378
5401
|
e[r].push(t);
|
|
5379
|
-
},
|
|
5402
|
+
}, sa = (e, t, r) => {
|
|
5380
5403
|
Kt(e).forEach((n, i) => Je(n, t, `${r}/${Ct(n)}[${i}]`));
|
|
5381
|
-
},
|
|
5404
|
+
}, bf = (e, t, r) => {
|
|
5382
5405
|
const n = Kt(e);
|
|
5383
5406
|
n[0] && Je(n[0], t, `${r}/numerator`), Rt(t, $t({
|
|
5384
5407
|
state: t,
|
|
@@ -5389,7 +5412,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5389
5412
|
path: r,
|
|
5390
5413
|
target: Xe(e, "element-range")
|
|
5391
5414
|
})), n[1] && Je(n[1], t, `${r}/denominator`);
|
|
5392
|
-
},
|
|
5415
|
+
}, _f = (e, t, r) => {
|
|
5393
5416
|
const n = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
|
|
5394
5417
|
Rt(t, $t({
|
|
5395
5418
|
state: t,
|
|
@@ -5399,7 +5422,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5399
5422
|
sourceElement: e,
|
|
5400
5423
|
path: `${r}/open`,
|
|
5401
5424
|
target: Xe(e, "element-range")
|
|
5402
|
-
})),
|
|
5425
|
+
})), sa(e, t, r), Rt(t, $t({
|
|
5403
5426
|
state: t,
|
|
5404
5427
|
kind: "operator",
|
|
5405
5428
|
role: i === "|" ? "absolute-value-fence" : "close-fence",
|
|
@@ -5408,13 +5431,13 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5408
5431
|
path: `${r}/close`,
|
|
5409
5432
|
target: Xe(e, "element-range")
|
|
5410
5433
|
}));
|
|
5411
|
-
},
|
|
5434
|
+
}, Tf = (e, t, r) => {
|
|
5412
5435
|
const n = Kt(e);
|
|
5413
5436
|
n[0] && Je(n[0], t, `${r}/base`);
|
|
5414
5437
|
const i = n[1];
|
|
5415
5438
|
if (!i) return;
|
|
5416
5439
|
const o = $i(i);
|
|
5417
|
-
if (
|
|
5440
|
+
if (oa.has(o)) {
|
|
5418
5441
|
Rt(t, $t({
|
|
5419
5442
|
state: t,
|
|
5420
5443
|
kind: "structure",
|
|
@@ -5428,7 +5451,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5428
5451
|
return;
|
|
5429
5452
|
}
|
|
5430
5453
|
Je(i, t, `${r}/exponent`);
|
|
5431
|
-
},
|
|
5454
|
+
}, wf = (e, t, r, n) => {
|
|
5432
5455
|
Rt(t, $t({
|
|
5433
5456
|
state: t,
|
|
5434
5457
|
kind: "structure",
|
|
@@ -5439,7 +5462,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5439
5462
|
path: r,
|
|
5440
5463
|
target: Xe(e, "element-range")
|
|
5441
5464
|
}));
|
|
5442
|
-
},
|
|
5465
|
+
}, Sf = (e, t, r) => {
|
|
5443
5466
|
let n = 0;
|
|
5444
5467
|
for (const i of Kt(e))
|
|
5445
5468
|
(Ct(i) === "mtr" || Ct(i) === "mlabeledtr") && (n++, Rt(t, $t({
|
|
@@ -5452,10 +5475,10 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5452
5475
|
path: `${r}/row[${n}]`,
|
|
5453
5476
|
target: Xe(i, "region-fallback")
|
|
5454
5477
|
}), "layoutTargets")), Je(i, t, `${r}/${Ct(i)}[${n}]`);
|
|
5455
|
-
},
|
|
5478
|
+
}, kf = (e, t, r) => {
|
|
5456
5479
|
const n = $i(e);
|
|
5457
5480
|
if (!n) return;
|
|
5458
|
-
const i =
|
|
5481
|
+
const i = vf(Ct(e)), o = i === "operator" ? df.get(n) : void 0, s = o ?? (i === "operator" && (n === "(" || n === ")") ? "grouping-fence" : i);
|
|
5459
5482
|
Rt(t, $t({
|
|
5460
5483
|
state: t,
|
|
5461
5484
|
kind: i,
|
|
@@ -5486,19 +5509,19 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5486
5509
|
case "mtext":
|
|
5487
5510
|
case "ms":
|
|
5488
5511
|
case "mspace":
|
|
5489
|
-
|
|
5512
|
+
kf(e, t, r);
|
|
5490
5513
|
return;
|
|
5491
5514
|
case "mfrac":
|
|
5492
|
-
|
|
5515
|
+
bf(e, t, r);
|
|
5493
5516
|
return;
|
|
5494
5517
|
case "msup":
|
|
5495
|
-
|
|
5518
|
+
Tf(e, t, r);
|
|
5496
5519
|
return;
|
|
5497
5520
|
case "mfenced":
|
|
5498
|
-
|
|
5521
|
+
_f(e, t, r);
|
|
5499
5522
|
return;
|
|
5500
5523
|
case "mtable":
|
|
5501
|
-
|
|
5524
|
+
Sf(e, t, r);
|
|
5502
5525
|
return;
|
|
5503
5526
|
case "mphantom":
|
|
5504
5527
|
return;
|
|
@@ -5508,15 +5531,15 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5508
5531
|
return;
|
|
5509
5532
|
}
|
|
5510
5533
|
default: {
|
|
5511
|
-
const i =
|
|
5534
|
+
const i = hf.get(n);
|
|
5512
5535
|
if (i) {
|
|
5513
|
-
|
|
5536
|
+
wf(e, t, r, i);
|
|
5514
5537
|
return;
|
|
5515
5538
|
}
|
|
5516
|
-
|
|
5539
|
+
sa(e, t, r);
|
|
5517
5540
|
}
|
|
5518
5541
|
}
|
|
5519
|
-
},
|
|
5542
|
+
}, xf = (e) => {
|
|
5520
5543
|
const t = {
|
|
5521
5544
|
tokens: [],
|
|
5522
5545
|
layoutTargets: [],
|
|
@@ -5527,7 +5550,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5527
5550
|
layoutTargets: t.layoutTargets,
|
|
5528
5551
|
expressionTarget: Xe(e, "region-fallback")
|
|
5529
5552
|
};
|
|
5530
|
-
},
|
|
5553
|
+
}, Ef = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Af = 0.95, Mf = (e) => {
|
|
5531
5554
|
const t = [], r = /* @__PURE__ */ new Set(), n = (i) => {
|
|
5532
5555
|
const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
5533
5556
|
if (o.length === 0) return;
|
|
@@ -5552,11 +5575,11 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5552
5575
|
o && (n = i.length);
|
|
5553
5576
|
}
|
|
5554
5577
|
return n;
|
|
5555
|
-
},
|
|
5578
|
+
}, Cf = (e, t) => {
|
|
5556
5579
|
const r = [];
|
|
5557
5580
|
let n = 0;
|
|
5558
5581
|
for (const i of t) {
|
|
5559
|
-
const o =
|
|
5582
|
+
const o = Mf(i);
|
|
5560
5583
|
if (i.optional) {
|
|
5561
5584
|
const s = Mo(e, n, o);
|
|
5562
5585
|
s > 0 && (r.push({
|
|
@@ -5578,23 +5601,23 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5578
5601
|
}
|
|
5579
5602
|
}
|
|
5580
5603
|
return r;
|
|
5581
|
-
},
|
|
5604
|
+
}, Of = (e, t, r) => {
|
|
5582
5605
|
const n = r.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
|
|
5583
5606
|
return n > 0 && i === n && o === t.length;
|
|
5584
|
-
},
|
|
5607
|
+
}, If = (e) => e.map(({ speechTokens: t, math: r }) => ({
|
|
5585
5608
|
speechTokenIds: t.map((n) => n.id),
|
|
5586
5609
|
mathTokenIds: [r.id],
|
|
5587
5610
|
score: 1,
|
|
5588
5611
|
confidence: 1,
|
|
5589
5612
|
target: r.target
|
|
5590
|
-
})),
|
|
5591
|
-
const t = e.minExactWordConfidence ??
|
|
5613
|
+
})), $f = (e) => {
|
|
5614
|
+
const t = e.minExactWordConfidence ?? Af, r = Cf(e.speech.tokens, e.math.tokens), n = Of(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5592
5615
|
return {
|
|
5593
|
-
segments: n >= t ?
|
|
5616
|
+
segments: n >= t ? If(r) : [],
|
|
5594
5617
|
confidence: n,
|
|
5595
5618
|
fallbackTarget: e.math.expressionTarget
|
|
5596
5619
|
};
|
|
5597
|
-
},
|
|
5620
|
+
}, aa = Us(), Rf = /* @__PURE__ */ new Map([
|
|
5598
5621
|
["zero", "0"],
|
|
5599
5622
|
["one", "1"],
|
|
5600
5623
|
["two", "2"],
|
|
@@ -5606,17 +5629,17 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5606
5629
|
["eight", "8"],
|
|
5607
5630
|
["nine", "9"],
|
|
5608
5631
|
["ten", "10"]
|
|
5609
|
-
]),
|
|
5632
|
+
]), la = (e) => {
|
|
5610
5633
|
const t = e.toLowerCase();
|
|
5611
|
-
return
|
|
5612
|
-
},
|
|
5634
|
+
return Rf.get(t) || t;
|
|
5635
|
+
}, Lf = (e) => {
|
|
5613
5636
|
const t = [];
|
|
5614
|
-
for (const r of e.matchAll(
|
|
5637
|
+
for (const r of e.matchAll(aa)) {
|
|
5615
5638
|
const n = r[0], i = r.index ?? 0;
|
|
5616
5639
|
t.push({
|
|
5617
5640
|
id: `speech-token-${t.length}`,
|
|
5618
5641
|
text: n,
|
|
5619
|
-
normalized:
|
|
5642
|
+
normalized: la(n),
|
|
5620
5643
|
start: i,
|
|
5621
5644
|
end: i + n.length,
|
|
5622
5645
|
sourceStart: i,
|
|
@@ -5626,11 +5649,11 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5626
5649
|
}
|
|
5627
5650
|
return t;
|
|
5628
5651
|
}, Tr = (e) => {
|
|
5629
|
-
const t =
|
|
5652
|
+
const t = ta(e.speechText);
|
|
5630
5653
|
return {
|
|
5631
5654
|
speechText: e.speechText,
|
|
5632
5655
|
spokenText: t.spokenText,
|
|
5633
|
-
tokens:
|
|
5656
|
+
tokens: Lf(t.spokenText),
|
|
5634
5657
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
|
|
5635
5658
|
boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
|
|
5636
5659
|
unsupportedSemantic: t.unsupportedSemantic,
|
|
@@ -5638,9 +5661,9 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5638
5661
|
};
|
|
5639
5662
|
}, Ri = (e) => {
|
|
5640
5663
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5641
|
-
const t = e.match(
|
|
5642
|
-
return t?.[0] ?
|
|
5643
|
-
},
|
|
5664
|
+
const t = e.match(aa);
|
|
5665
|
+
return t?.[0] ? la(t[0]) : null;
|
|
5666
|
+
}, Pf = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, Nf = (e, t) => {
|
|
5644
5667
|
const r = e.rawToSpokenOffsetMap.get(t);
|
|
5645
5668
|
if (r !== void 0) return r;
|
|
5646
5669
|
for (let n = t; n < e.speechText.length; n++) {
|
|
@@ -5651,7 +5674,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5651
5674
|
return null;
|
|
5652
5675
|
}, ni = (e, t, r) => {
|
|
5653
5676
|
if (t === null) return null;
|
|
5654
|
-
const n =
|
|
5677
|
+
const n = Pf(e.tokens, t);
|
|
5655
5678
|
return n ? {
|
|
5656
5679
|
token: n,
|
|
5657
5680
|
start: t,
|
|
@@ -5661,9 +5684,9 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5661
5684
|
}, ii = (e, t) => {
|
|
5662
5685
|
const r = Ri(t);
|
|
5663
5686
|
return !!(e && r && e.token.normalized === r);
|
|
5664
|
-
},
|
|
5687
|
+
}, zf = (e) => {
|
|
5665
5688
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5666
|
-
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ni(e.tokenization,
|
|
5689
|
+
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ni(e.tokenization, Nf(e.tokenization, e.position), t), n = ni(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5667
5690
|
return ii(r, e.boundaryWord) ? {
|
|
5668
5691
|
...r,
|
|
5669
5692
|
confidence: 1
|
|
@@ -5671,7 +5694,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5671
5694
|
...n,
|
|
5672
5695
|
confidence: 1
|
|
5673
5696
|
} : e.boundaryWord && Ri(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? r || n : n || r;
|
|
5674
|
-
},
|
|
5697
|
+
}, Wf = (e) => {
|
|
5675
5698
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5676
5699
|
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ni(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5677
5700
|
return ii(r, e.boundaryWord) ? {
|
|
@@ -5679,27 +5702,27 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5679
5702
|
confidence: 1
|
|
5680
5703
|
} : e.boundaryWord && Ri(e.boundaryWord) ? null : r;
|
|
5681
5704
|
}, tn = (e) => {
|
|
5682
|
-
const t = Tr({ speechText: e.speechText }), r =
|
|
5705
|
+
const t = Tr({ speechText: e.speechText }), r = xf(e.mathElement);
|
|
5683
5706
|
return {
|
|
5684
5707
|
speech: t,
|
|
5685
5708
|
math: r,
|
|
5686
|
-
result:
|
|
5709
|
+
result: $f({
|
|
5687
5710
|
speech: t,
|
|
5688
5711
|
math: r
|
|
5689
5712
|
})
|
|
5690
5713
|
};
|
|
5691
|
-
},
|
|
5692
|
-
const r =
|
|
5714
|
+
}, Hf = (e, t) => {
|
|
5715
|
+
const r = Wf({
|
|
5693
5716
|
tokenization: e.speech,
|
|
5694
5717
|
position: t.position,
|
|
5695
5718
|
length: t.length,
|
|
5696
5719
|
boundaryWord: t.boundaryWord
|
|
5697
5720
|
});
|
|
5698
|
-
return
|
|
5721
|
+
return Ef({
|
|
5699
5722
|
alignment: e.result,
|
|
5700
5723
|
boundary: r
|
|
5701
5724
|
});
|
|
5702
|
-
},
|
|
5725
|
+
}, Bf = (e, t) => {
|
|
5703
5726
|
if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
5704
5727
|
const r = Tr({ speechText: t.boundaryWord }).tokens[0];
|
|
5705
5728
|
if (!r) return null;
|
|
@@ -5708,7 +5731,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5708
5731
|
return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
|
|
5709
5732
|
});
|
|
5710
5733
|
return n.length === 1 ? n[0].target : null;
|
|
5711
|
-
}, oi = "http://www.w3.org/1998/Math/MathML",
|
|
5734
|
+
}, oi = "http://www.w3.org/1998/Math/MathML", Df = /* @__PURE__ */ new Set([
|
|
5712
5735
|
"math",
|
|
5713
5736
|
"maction",
|
|
5714
5737
|
"menclose",
|
|
@@ -5742,7 +5765,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5742
5765
|
"semantics",
|
|
5743
5766
|
"annotation",
|
|
5744
5767
|
"annotation-xml"
|
|
5745
|
-
]),
|
|
5768
|
+
]), Ff = /* @__PURE__ */ new Set([
|
|
5746
5769
|
"accent",
|
|
5747
5770
|
"accentunder",
|
|
5748
5771
|
"align",
|
|
@@ -5794,44 +5817,44 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5794
5817
|
"width",
|
|
5795
5818
|
"xmlns",
|
|
5796
5819
|
"xml:lang"
|
|
5797
|
-
]),
|
|
5820
|
+
]), ca = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), jf = (e) => ca(e).replace(/"/g, """), Vf = (e, t) => {
|
|
5798
5821
|
const r = e.toLowerCase(), n = t.trim().toLowerCase();
|
|
5799
|
-
return !!(r.startsWith("on") || !
|
|
5800
|
-
},
|
|
5822
|
+
return !!(r.startsWith("on") || !Ff.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
|
|
5823
|
+
}, qf = (e) => {
|
|
5801
5824
|
const t = e.localName.toLowerCase();
|
|
5802
|
-
if (!
|
|
5825
|
+
if (!Df.has(t)) return !1;
|
|
5803
5826
|
const r = e.namespaceURI;
|
|
5804
5827
|
return !r || r === oi || r === "http://www.w3.org/1999/xhtml";
|
|
5805
|
-
},
|
|
5806
|
-
if (e.nodeType === Node.TEXT_NODE) return
|
|
5828
|
+
}, ua = (e) => {
|
|
5829
|
+
if (e.nodeType === Node.TEXT_NODE) return ca(e.textContent || "");
|
|
5807
5830
|
if (e.nodeType === Node.COMMENT_NODE) return "";
|
|
5808
5831
|
if (e.nodeType !== Node.ELEMENT_NODE) return null;
|
|
5809
5832
|
const t = e;
|
|
5810
|
-
if (!
|
|
5833
|
+
if (!qf(t)) return null;
|
|
5811
5834
|
const r = t.localName.toLowerCase(), n = [];
|
|
5812
5835
|
for (const o of Array.from(t.attributes)) {
|
|
5813
5836
|
const s = o.name.toLowerCase();
|
|
5814
|
-
if (!
|
|
5837
|
+
if (!Vf(s, o.value)) {
|
|
5815
5838
|
if (s === "xmlns" && o.value !== oi) return null;
|
|
5816
|
-
n.push(`${s}="${
|
|
5839
|
+
n.push(`${s}="${jf(o.value)}"`);
|
|
5817
5840
|
}
|
|
5818
5841
|
}
|
|
5819
5842
|
r === "math" && !n.some((o) => o.startsWith("xmlns=")) && n.unshift(`xmlns="${oi}"`);
|
|
5820
5843
|
const i = [];
|
|
5821
5844
|
for (const o of Array.from(t.childNodes)) {
|
|
5822
|
-
const s =
|
|
5845
|
+
const s = ua(o);
|
|
5823
5846
|
if (s === null) return null;
|
|
5824
5847
|
i.push(s);
|
|
5825
5848
|
}
|
|
5826
5849
|
return `<${r}${n.length > 0 ? ` ${n.join(" ")}` : ""}>${i.join("")}</${r}>`;
|
|
5827
|
-
},
|
|
5850
|
+
}, Uf = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, zn = (e) => {
|
|
5828
5851
|
const t = String(e || "").trim();
|
|
5829
5852
|
if (!t) return null;
|
|
5830
|
-
const r =
|
|
5853
|
+
const r = Uf(t);
|
|
5831
5854
|
if (!r || r.getElementsByTagName("parsererror").length > 0) return null;
|
|
5832
5855
|
const n = r.documentElement;
|
|
5833
|
-
return !n || n.localName.toLowerCase() !== "math" ? null :
|
|
5834
|
-
},
|
|
5856
|
+
return !n || n.localName.toLowerCase() !== "math" ? null : ua(n);
|
|
5857
|
+
}, fa = (e) => ({
|
|
5835
5858
|
chars: [],
|
|
5836
5859
|
map: /* @__PURE__ */ new Map(),
|
|
5837
5860
|
position: 0,
|
|
@@ -5839,28 +5862,28 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5839
5862
|
lastCharWasWhitespace: !1,
|
|
5840
5863
|
lastMapped: null,
|
|
5841
5864
|
options: e
|
|
5842
|
-
}),
|
|
5865
|
+
}), da = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", ha = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", pa = (e) => {
|
|
5843
5866
|
const t = e.tagName?.toLowerCase();
|
|
5844
5867
|
return t === "annotation" || t === "annotation-xml";
|
|
5845
|
-
},
|
|
5868
|
+
}, Gf = (e) => {
|
|
5846
5869
|
const t = e.getAttribute("data-mathml");
|
|
5847
5870
|
return t && t.trim() ? t : null;
|
|
5848
|
-
},
|
|
5871
|
+
}, Yf = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, Kf = (e) => {
|
|
5849
5872
|
if (e.tagName.toLowerCase() === "math") return zn(e.outerHTML);
|
|
5850
|
-
const t =
|
|
5873
|
+
const t = Gf(e);
|
|
5851
5874
|
if (t) {
|
|
5852
5875
|
const r = zn(t);
|
|
5853
5876
|
if (r) return r;
|
|
5854
5877
|
}
|
|
5855
|
-
if (
|
|
5856
|
-
const r =
|
|
5878
|
+
if (da(e)) {
|
|
5879
|
+
const r = Yf(e);
|
|
5857
5880
|
if (r) {
|
|
5858
5881
|
const n = zn(r);
|
|
5859
5882
|
if (n) return n;
|
|
5860
5883
|
}
|
|
5861
5884
|
}
|
|
5862
5885
|
return null;
|
|
5863
|
-
},
|
|
5886
|
+
}, Xf = /* @__PURE__ */ new Set([
|
|
5864
5887
|
"P",
|
|
5865
5888
|
"H1",
|
|
5866
5889
|
"H2",
|
|
@@ -5876,7 +5899,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5876
5899
|
"FIGCAPTION",
|
|
5877
5900
|
"LABEL",
|
|
5878
5901
|
"BUTTON"
|
|
5879
|
-
]),
|
|
5902
|
+
]), Jf = /* @__PURE__ */ new Set([
|
|
5880
5903
|
"heading",
|
|
5881
5904
|
"listitem",
|
|
5882
5905
|
"option",
|
|
@@ -5885,24 +5908,24 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5885
5908
|
"cell",
|
|
5886
5909
|
"columnheader",
|
|
5887
5910
|
"rowheader"
|
|
5888
|
-
]),
|
|
5911
|
+
]), Qf = (e, t) => {
|
|
5889
5912
|
let r = e.parentElement, n = null;
|
|
5890
5913
|
for (; r && r !== t; ) {
|
|
5891
5914
|
const i = (r.getAttribute("role") || "").toLowerCase(), o = r.tagName.toUpperCase();
|
|
5892
|
-
if (
|
|
5915
|
+
if (Xf.has(o) || Jf.has(i)) {
|
|
5893
5916
|
n = r;
|
|
5894
5917
|
break;
|
|
5895
5918
|
}
|
|
5896
5919
|
r = r.parentElement;
|
|
5897
5920
|
}
|
|
5898
5921
|
return n || t;
|
|
5899
|
-
},
|
|
5922
|
+
}, Zf = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || da(e), Tt = (e, t, r) => {
|
|
5900
5923
|
/[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), r ? (e.map.set(e.position, r), e.lastMapped = r) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
|
|
5901
|
-
},
|
|
5924
|
+
}, ga = (e, t) => {
|
|
5902
5925
|
if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
|
|
5903
5926
|
const r = e.chars[e.chars.length - 1];
|
|
5904
|
-
return
|
|
5905
|
-
},
|
|
5927
|
+
return Ys(r, t, e.options);
|
|
5928
|
+
}, va = (e, t) => {
|
|
5906
5929
|
const r = t.textContent || "";
|
|
5907
5930
|
let n = !1;
|
|
5908
5931
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -5921,7 +5944,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5921
5944
|
}), e.lastCharWasWhitespace = !0;
|
|
5922
5945
|
continue;
|
|
5923
5946
|
}
|
|
5924
|
-
!n &&
|
|
5947
|
+
!n && ga(e, o) && Tt(e, " ", {
|
|
5925
5948
|
node: t,
|
|
5926
5949
|
offset: i
|
|
5927
5950
|
}), Tt(e, o, {
|
|
@@ -5929,7 +5952,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5929
5952
|
offset: i
|
|
5930
5953
|
}), n = !0, e.lastCharWasWhitespace = !1;
|
|
5931
5954
|
}
|
|
5932
|
-
},
|
|
5955
|
+
}, ed = (e, t) => {
|
|
5933
5956
|
for (let r = 0; r < t.text.length; r++) {
|
|
5934
5957
|
const n = t.text[r], i = /\s/.test(n), o = t.map.get(r) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
|
|
5935
5958
|
node: o.node,
|
|
@@ -5946,7 +5969,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5946
5969
|
e.lastCharWasWhitespace || Tt(e, " ", l), e.lastCharWasWhitespace = !0;
|
|
5947
5970
|
continue;
|
|
5948
5971
|
}
|
|
5949
|
-
r === 0 &&
|
|
5972
|
+
r === 0 && ga(e, n) && Tt(e, " ", l), Tt(e, n, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
|
|
5950
5973
|
node: o.node,
|
|
5951
5974
|
offset: o.offset
|
|
5952
5975
|
}), e.lastMapped = {
|
|
@@ -5957,7 +5980,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5957
5980
|
offset: a
|
|
5958
5981
|
});
|
|
5959
5982
|
}
|
|
5960
|
-
},
|
|
5983
|
+
}, td = (e) => {
|
|
5961
5984
|
if (typeof DOMParser > "u") return "";
|
|
5962
5985
|
const t = new DOMParser().parseFromString(e, "application/xml");
|
|
5963
5986
|
if (t.getElementsByTagName("parsererror").length > 0) return "";
|
|
@@ -5969,38 +5992,38 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
5969
5992
|
}
|
|
5970
5993
|
if (i.nodeType !== 1) return;
|
|
5971
5994
|
const o = i;
|
|
5972
|
-
if (!
|
|
5995
|
+
if (!pa(o))
|
|
5973
5996
|
for (const s of Array.from(o.childNodes)) n(s);
|
|
5974
5997
|
};
|
|
5975
5998
|
return n(t.documentElement), G(r.join(" "));
|
|
5976
|
-
},
|
|
5977
|
-
const n =
|
|
5999
|
+
}, rd = (e, t, r) => {
|
|
6000
|
+
const n = fa(r), i = (a) => {
|
|
5978
6001
|
if (Jt(a, e)) return;
|
|
5979
6002
|
if (a.nodeType === 3) {
|
|
5980
|
-
|
|
6003
|
+
va(n, a);
|
|
5981
6004
|
return;
|
|
5982
6005
|
}
|
|
5983
6006
|
if (a.nodeType !== 1) return;
|
|
5984
6007
|
const l = a;
|
|
5985
|
-
if (!(
|
|
6008
|
+
if (!(ha(l) || pa(l)))
|
|
5986
6009
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5987
6010
|
};
|
|
5988
|
-
i(e),
|
|
6011
|
+
i(e), ma(n);
|
|
5989
6012
|
const o = G(n.chars.join(""));
|
|
5990
6013
|
if (o) return {
|
|
5991
6014
|
text: o,
|
|
5992
6015
|
map: n.map
|
|
5993
6016
|
};
|
|
5994
|
-
const s =
|
|
6017
|
+
const s = td(t);
|
|
5995
6018
|
return s ? {
|
|
5996
6019
|
text: s,
|
|
5997
6020
|
map: /* @__PURE__ */ new Map()
|
|
5998
6021
|
} : Zr(e, r);
|
|
5999
|
-
},
|
|
6022
|
+
}, ma = (e) => {
|
|
6000
6023
|
for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
|
|
6001
6024
|
e.chars.pop(), e.position--, e.map.delete(e.position);
|
|
6002
|
-
},
|
|
6003
|
-
const r =
|
|
6025
|
+
}, nd = (e, t) => {
|
|
6026
|
+
const r = fa(t), n = [];
|
|
6004
6027
|
let i = 0, o, s = !1;
|
|
6005
6028
|
const a = () => {
|
|
6006
6029
|
const u = G(r.chars.slice(i, r.chars.length).join(""));
|
|
@@ -6012,23 +6035,23 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6012
6035
|
}, l = (u) => {
|
|
6013
6036
|
if (Jt(u, e)) return;
|
|
6014
6037
|
if (u.nodeType === Node.TEXT_NODE) {
|
|
6015
|
-
const p =
|
|
6016
|
-
o && p !== o && a(), o = p,
|
|
6038
|
+
const p = Qf(u, e);
|
|
6039
|
+
o && p !== o && a(), o = p, va(r, u);
|
|
6017
6040
|
return;
|
|
6018
6041
|
}
|
|
6019
6042
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
6020
6043
|
const f = u;
|
|
6021
|
-
if (
|
|
6022
|
-
const d =
|
|
6044
|
+
if (ha(f)) return;
|
|
6045
|
+
const d = Kf(f);
|
|
6023
6046
|
if (d) {
|
|
6024
6047
|
a();
|
|
6025
|
-
const p =
|
|
6026
|
-
|
|
6027
|
-
const
|
|
6048
|
+
const p = rd(f, d, t);
|
|
6049
|
+
ed(r, p);
|
|
6050
|
+
const v = G(p.text);
|
|
6028
6051
|
n.push({
|
|
6029
6052
|
type: "math",
|
|
6030
6053
|
mathml: d,
|
|
6031
|
-
fallbackText:
|
|
6054
|
+
fallbackText: v,
|
|
6032
6055
|
sourceElement: f
|
|
6033
6056
|
}), i = r.chars.length, s = !0;
|
|
6034
6057
|
return;
|
|
@@ -6036,7 +6059,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6036
6059
|
for (const p of Array.from(f.childNodes)) l(p);
|
|
6037
6060
|
};
|
|
6038
6061
|
for (const u of Array.from(e.childNodes)) l(u);
|
|
6039
|
-
|
|
6062
|
+
ma(r), a();
|
|
6040
6063
|
const c = r.chars.join("");
|
|
6041
6064
|
for (; r.map.has(c.length); ) r.map.delete(c.length);
|
|
6042
6065
|
return {
|
|
@@ -6046,7 +6069,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6046
6069
|
containsMathMarkup: s
|
|
6047
6070
|
};
|
|
6048
6071
|
}, cr = (e, t) => {
|
|
6049
|
-
if (!
|
|
6072
|
+
if (!Zf(e)) {
|
|
6050
6073
|
const { text: r, map: n } = Zr(e, t);
|
|
6051
6074
|
return {
|
|
6052
6075
|
visibleText: r,
|
|
@@ -6058,8 +6081,8 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6058
6081
|
containsMathMarkup: !1
|
|
6059
6082
|
};
|
|
6060
6083
|
}
|
|
6061
|
-
return
|
|
6062
|
-
},
|
|
6084
|
+
return nd(e, t);
|
|
6085
|
+
}, id = (e, t) => Xs([e], t), od = (e) => (e || "en").split("-")[0].toLowerCase() || "en", sd = /* @__PURE__ */ new Set([
|
|
6063
6086
|
"H1",
|
|
6064
6087
|
"H2",
|
|
6065
6088
|
"H3",
|
|
@@ -6069,17 +6092,17 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6069
6092
|
"LI",
|
|
6070
6093
|
"LABEL",
|
|
6071
6094
|
"BUTTON"
|
|
6072
|
-
]),
|
|
6095
|
+
]), ad = /* @__PURE__ */ new Set([
|
|
6073
6096
|
"heading",
|
|
6074
6097
|
"listitem",
|
|
6075
6098
|
"option",
|
|
6076
6099
|
"radio"
|
|
6077
|
-
]),
|
|
6100
|
+
]), ld = (e) => {
|
|
6078
6101
|
if (e.type !== "text" || !e.sourceElement) return !1;
|
|
6079
6102
|
const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
6080
|
-
return
|
|
6081
|
-
},
|
|
6082
|
-
const t = e.resolveMathSpeech ??
|
|
6103
|
+
return sd.has(t) || ad.has(r);
|
|
6104
|
+
}, cd = async (e) => {
|
|
6105
|
+
const t = e.resolveMathSpeech ?? id, { visibleText: r } = e, n = [];
|
|
6083
6106
|
let i = 0;
|
|
6084
6107
|
const o = (a) => {
|
|
6085
6108
|
const l = G(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, f = u + l.length;
|
|
@@ -6091,21 +6114,21 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6091
6114
|
for (let a = 0; a < e.chunks.length; a++) {
|
|
6092
6115
|
const l = e.chunks[a];
|
|
6093
6116
|
if (l.type === "text") {
|
|
6094
|
-
const p =
|
|
6117
|
+
const p = ld(l) ? [{
|
|
6095
6118
|
text: l.text,
|
|
6096
6119
|
offset: 0
|
|
6097
6120
|
}] : Ci(l.text, { locale: e.language });
|
|
6098
|
-
for (const
|
|
6099
|
-
const b = G(
|
|
6121
|
+
for (const v of p) {
|
|
6122
|
+
const b = G(v.text);
|
|
6100
6123
|
if (!b) continue;
|
|
6101
|
-
const
|
|
6124
|
+
const m = o(b);
|
|
6102
6125
|
n.push({
|
|
6103
6126
|
sourceChunkIndex: a,
|
|
6104
6127
|
segment: {
|
|
6105
6128
|
kind: "prose",
|
|
6106
6129
|
spokenText: b,
|
|
6107
6130
|
visibleText: b,
|
|
6108
|
-
visibleSpan:
|
|
6131
|
+
visibleSpan: m
|
|
6109
6132
|
}
|
|
6110
6133
|
}), s.push(b);
|
|
6111
6134
|
}
|
|
@@ -6131,12 +6154,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6131
6154
|
}
|
|
6132
6155
|
return {
|
|
6133
6156
|
segments: n,
|
|
6134
|
-
locale:
|
|
6157
|
+
locale: od(e.language),
|
|
6135
6158
|
visibleText: r,
|
|
6136
6159
|
plainSpeechText: G(s.join(" "))
|
|
6137
6160
|
};
|
|
6138
|
-
},
|
|
6139
|
-
const t = Math.max(1, e.maxEntries ??
|
|
6161
|
+
}, ud = (e) => (e || "en").split("-")[0].toLowerCase() || "en", fd = "sre-v1", dd = 256, si = (e) => Array.isArray(e) ? `array:[${e.map(si).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${si(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)}`, Co = (e, t, r, n) => `${fd}\0${ud(e)}\0${t ? "ssml" : "plain"}\0${si(r ?? null)}\0${n}`, hd = (e = {}) => {
|
|
6162
|
+
const t = Math.max(1, e.maxEntries ?? dd), r = e.resolve ?? ((o, s) => Xs([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
6140
6163
|
for (n.delete(o), n.set(o, s); n.size > t; ) {
|
|
6141
6164
|
const a = n.keys().next().value;
|
|
6142
6165
|
a !== void 0 && n.delete(a);
|
|
@@ -6156,13 +6179,13 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6156
6179
|
usedFallback: f.usedFallback
|
|
6157
6180
|
}), i(c, f), f;
|
|
6158
6181
|
};
|
|
6159
|
-
},
|
|
6182
|
+
}, pd = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Tr({ speechText: e }).tokens[0]?.normalized || null, gd = (e, t) => {
|
|
6160
6183
|
const r = Tr({ speechText: e.speechText });
|
|
6161
6184
|
if (!Number.isFinite(t.position)) return {
|
|
6162
6185
|
boundary: null,
|
|
6163
6186
|
spokenText: r.spokenText
|
|
6164
6187
|
};
|
|
6165
|
-
const n =
|
|
6188
|
+
const n = zf({
|
|
6166
6189
|
tokenization: r,
|
|
6167
6190
|
position: t.position,
|
|
6168
6191
|
length: t.length,
|
|
@@ -6175,8 +6198,8 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6175
6198
|
} : null,
|
|
6176
6199
|
spokenText: r.spokenText
|
|
6177
6200
|
};
|
|
6178
|
-
},
|
|
6179
|
-
const r =
|
|
6201
|
+
}, vd = (e, t, r) => r ? Tr({ speechText: e }).tokens.find((n) => n.start <= t && t < n.end)?.normalized === r : !0, md = (e, t) => {
|
|
6202
|
+
const r = pd(t.word);
|
|
6180
6203
|
if (e.id !== t.chunkId) return {
|
|
6181
6204
|
chunkId: t.chunkId,
|
|
6182
6205
|
normalizedWord: r,
|
|
@@ -6195,12 +6218,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6195
6218
|
};
|
|
6196
6219
|
let n, i;
|
|
6197
6220
|
if (e.catalogAlignment)
|
|
6198
|
-
n =
|
|
6221
|
+
n = cf(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
|
|
6199
6222
|
else {
|
|
6200
|
-
const o =
|
|
6223
|
+
const o = gd(e, t);
|
|
6201
6224
|
n = o.boundary, i = o.spokenText;
|
|
6202
6225
|
}
|
|
6203
|
-
return n ?
|
|
6226
|
+
return n ? vd(i, n.start, r) ? {
|
|
6204
6227
|
chunkId: e.id,
|
|
6205
6228
|
normalizedWord: r,
|
|
6206
6229
|
chunkSpokenStart: n.start,
|
|
@@ -6240,12 +6263,12 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6240
6263
|
quality: "region",
|
|
6241
6264
|
confidence: e.confidence,
|
|
6242
6265
|
reason: e.reason
|
|
6243
|
-
},
|
|
6266
|
+
}, ya = /* @__PURE__ */ new Map([
|
|
6244
6267
|
["mi", "mjx-mi"],
|
|
6245
6268
|
["mn", "mjx-mn"],
|
|
6246
6269
|
["mo", "mjx-mo"],
|
|
6247
6270
|
["mtext", "mjx-mtext"]
|
|
6248
|
-
]), ai = "mi,mn,mo,mtext",
|
|
6271
|
+
]), ai = "mi,mn,mo,mtext", ba = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", _a = [
|
|
6249
6272
|
"mjx-mfrac",
|
|
6250
6273
|
"mjx-msqrt",
|
|
6251
6274
|
"mjx-mroot",
|
|
@@ -6253,14 +6276,14 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6253
6276
|
"mjx-munder",
|
|
6254
6277
|
"mjx-mover",
|
|
6255
6278
|
"mjx-munderover"
|
|
6256
|
-
].join(","),
|
|
6279
|
+
].join(","), Ta = (e) => e.type === "text-range" ? e.node.parentElement : e.element, gn = (e) => {
|
|
6257
6280
|
let t = e;
|
|
6258
6281
|
for (; t; ) {
|
|
6259
6282
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
6260
6283
|
t = t.parentElement;
|
|
6261
6284
|
}
|
|
6262
6285
|
return null;
|
|
6263
|
-
}, Oo = (e) => !e || gn(e) ? !1 : !Jt(e),
|
|
6286
|
+
}, Oo = (e) => !e || gn(e) ? !1 : !Jt(e), wa = (e) => {
|
|
6264
6287
|
const t = e.getBoundingClientRect?.();
|
|
6265
6288
|
return !!(t && t.width > 0 && t.height > 0);
|
|
6266
6289
|
}, li = (e) => {
|
|
@@ -6270,38 +6293,38 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6270
6293
|
t = t.parentElement;
|
|
6271
6294
|
}
|
|
6272
6295
|
return null;
|
|
6273
|
-
},
|
|
6296
|
+
}, Sa = (e, t) => {
|
|
6274
6297
|
if (e.length === 0 || e.length !== t.length) return !1;
|
|
6275
6298
|
for (let r = 0; r < e.length; r += 1) {
|
|
6276
|
-
const n =
|
|
6299
|
+
const n = ya.get(e[r].localName.toLowerCase());
|
|
6277
6300
|
if (!n || t[r].localName.toLowerCase() !== n) return !1;
|
|
6278
6301
|
}
|
|
6279
6302
|
return !0;
|
|
6280
|
-
},
|
|
6281
|
-
if (!e || !
|
|
6303
|
+
}, yd = (e, t) => {
|
|
6304
|
+
if (!e || !ya.has(e.localName.toLowerCase()) || t.querySelector(_a)) return null;
|
|
6282
6305
|
const r = li(e), n = t.querySelector("mjx-math");
|
|
6283
6306
|
if (!r || !n) return null;
|
|
6284
6307
|
const i = Array.from(r.querySelectorAll(ai)), o = i.indexOf(e);
|
|
6285
6308
|
if (o < 0) return null;
|
|
6286
|
-
const s = Array.from(n.querySelectorAll(
|
|
6287
|
-
if (!
|
|
6309
|
+
const s = Array.from(n.querySelectorAll(ba));
|
|
6310
|
+
if (!Sa(i, s)) return null;
|
|
6288
6311
|
const a = s[o];
|
|
6289
|
-
return !a || !
|
|
6290
|
-
},
|
|
6312
|
+
return !a || !wa(a) ? null : a;
|
|
6313
|
+
}, bd = (e) => {
|
|
6291
6314
|
const t = gn(e);
|
|
6292
6315
|
if (t) {
|
|
6293
|
-
if (t.querySelector(
|
|
6316
|
+
if (t.querySelector(_a)) return "expression";
|
|
6294
6317
|
const n = li(e) ?? e, i = t.querySelector("mjx-math");
|
|
6295
6318
|
if (!i) return "expression";
|
|
6296
|
-
const o = Array.from(n.querySelectorAll(ai)), s = Array.from(i.querySelectorAll(
|
|
6297
|
-
return
|
|
6319
|
+
const o = Array.from(n.querySelectorAll(ai)), s = Array.from(i.querySelectorAll(ba));
|
|
6320
|
+
return Sa(o, s) && s.some((a) => wa(a)) ? "token" : "expression";
|
|
6298
6321
|
}
|
|
6299
6322
|
const r = li(e) ?? e;
|
|
6300
6323
|
return Array.from(r.querySelectorAll(ai)).some((n) => !Jt(n)) ? "token" : "expression";
|
|
6301
6324
|
}, ci = (e) => {
|
|
6302
|
-
const t =
|
|
6325
|
+
const t = Ta(e), r = gn(t);
|
|
6303
6326
|
if (r) {
|
|
6304
|
-
const n =
|
|
6327
|
+
const n = yd(t, r);
|
|
6305
6328
|
return n ? {
|
|
6306
6329
|
type: "element",
|
|
6307
6330
|
quality: "semantic-token",
|
|
@@ -6323,24 +6346,24 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6323
6346
|
quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
|
|
6324
6347
|
element: e.element
|
|
6325
6348
|
} : null;
|
|
6326
|
-
},
|
|
6349
|
+
}, _d = ci, Td = () => {
|
|
6327
6350
|
const e = /* @__PURE__ */ new WeakMap();
|
|
6328
6351
|
return (t) => {
|
|
6329
|
-
const r =
|
|
6352
|
+
const r = Ta(t), n = gn(r);
|
|
6330
6353
|
if (!r || !n) return ci(t);
|
|
6331
6354
|
if (e.has(r)) return e.get(r) ?? null;
|
|
6332
6355
|
const i = ci(t);
|
|
6333
6356
|
return e.set(r, i), i;
|
|
6334
6357
|
};
|
|
6335
|
-
},
|
|
6358
|
+
}, wd = (e, t, r, n = e.mathAlignments, i = _d) => {
|
|
6336
6359
|
if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
|
|
6337
6360
|
let o = null;
|
|
6338
6361
|
for (const s of n) {
|
|
6339
|
-
const a =
|
|
6362
|
+
const a = Hf(s.alignment, {
|
|
6340
6363
|
position: t.chunkSpokenStart,
|
|
6341
6364
|
length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
|
|
6342
6365
|
boundaryWord: r.word
|
|
6343
|
-
}) ||
|
|
6366
|
+
}) || Bf(s.alignment, { boundaryWord: r.word });
|
|
6344
6367
|
if (!a) continue;
|
|
6345
6368
|
const l = i(a);
|
|
6346
6369
|
if (l) {
|
|
@@ -6349,7 +6372,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6349
6372
|
}
|
|
6350
6373
|
}
|
|
6351
6374
|
return o;
|
|
6352
|
-
},
|
|
6375
|
+
}, ka = (e, t, r) => {
|
|
6353
6376
|
if (!e || typeof document > "u" || r <= t) return null;
|
|
6354
6377
|
const n = e.get(t);
|
|
6355
6378
|
let i = e.get(Math.max(t, r - 1));
|
|
@@ -6361,17 +6384,17 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6361
6384
|
} catch {
|
|
6362
6385
|
return null;
|
|
6363
6386
|
}
|
|
6364
|
-
},
|
|
6387
|
+
}, Sd = (e, t) => {
|
|
6365
6388
|
if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
|
|
6366
|
-
const r =
|
|
6389
|
+
const r = uf(e.catalogAlignment, t.chunkSpokenStart);
|
|
6367
6390
|
if (!r) return null;
|
|
6368
|
-
const n =
|
|
6391
|
+
const n = ka(e.visibleMap, r.start, r.end);
|
|
6369
6392
|
return n ? {
|
|
6370
6393
|
type: "range",
|
|
6371
6394
|
quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
|
|
6372
6395
|
range: n
|
|
6373
6396
|
} : null;
|
|
6374
|
-
},
|
|
6397
|
+
}, kd = (e) => e.regionRange ? {
|
|
6375
6398
|
type: "range",
|
|
6376
6399
|
quality: "region",
|
|
6377
6400
|
range: e.regionRange
|
|
@@ -6383,7 +6406,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6383
6406
|
if (t.length !== 1) return null;
|
|
6384
6407
|
const r = t[0]?.alignment.result.fallbackTarget;
|
|
6385
6408
|
return r ? e.renderedMathTargetResolver(r) : null;
|
|
6386
|
-
},
|
|
6409
|
+
}, xd = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
|
|
6387
6410
|
try {
|
|
6388
6411
|
return e.type === "range" ? e.range.intersectsNode(r) : e.type === "element" ? e.element === r || e.element.contains(r) : e.node.parentElement?.contains(r) || !1;
|
|
6389
6412
|
} catch {
|
|
@@ -6395,18 +6418,18 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6395
6418
|
quality: "region",
|
|
6396
6419
|
confidence: 0,
|
|
6397
6420
|
reason: "boundary chunk id was not found"
|
|
6398
|
-
}), Ro = (e) => e.length === 1 ? e[0].element : null,
|
|
6421
|
+
}), Ro = (e) => e.length === 1 ? e[0].element : null, Ed = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Ad = 3, Md = (e, t, r) => {
|
|
6399
6422
|
if (!t || t.type !== "range") return !1;
|
|
6400
6423
|
const { startContainer: n, endContainer: i } = t.range;
|
|
6401
|
-
return n === i && n.nodeType ===
|
|
6402
|
-
},
|
|
6424
|
+
return n === i && n.nodeType === Ad ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
|
|
6425
|
+
}, Cd = (e, t) => ({
|
|
6403
6426
|
chunk: e,
|
|
6404
|
-
regionTarget:
|
|
6405
|
-
renderedMathTargetResolver:
|
|
6406
|
-
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ?
|
|
6427
|
+
regionTarget: kd(e),
|
|
6428
|
+
renderedMathTargetResolver: Td(),
|
|
6429
|
+
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ? bd(r) : "expression"])),
|
|
6407
6430
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
6408
|
-
}),
|
|
6409
|
-
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id,
|
|
6431
|
+
}), Od = (e) => {
|
|
6432
|
+
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id, Cd(n, t)]));
|
|
6410
6433
|
return {
|
|
6411
6434
|
chunks: e.chunks,
|
|
6412
6435
|
resolveInitial(n) {
|
|
@@ -6430,7 +6453,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6430
6453
|
resolveBoundary(n) {
|
|
6431
6454
|
const i = r.get(n.chunkId);
|
|
6432
6455
|
if (!i) return $o();
|
|
6433
|
-
const { chunk: o } = i, s =
|
|
6456
|
+
const { chunk: o } = i, s = md(o, n), a = Sd(o, s), l = xd(a, o), c = (!a || l.length > 0 ? wd(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, f = c && c.quality === "expression" ? c : null;
|
|
6434
6457
|
if (u) {
|
|
6435
6458
|
const d = Ro(l);
|
|
6436
6459
|
return d && i.heldTokenByElement.set(d, u), zt({
|
|
@@ -6441,14 +6464,14 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6441
6464
|
reason: s.reason
|
|
6442
6465
|
});
|
|
6443
6466
|
}
|
|
6444
|
-
if (a && (t ? !
|
|
6467
|
+
if (a && (t ? !Md(i, a, l) : l.length === 0)) return zt({
|
|
6445
6468
|
semanticTarget: a,
|
|
6446
6469
|
expressionTarget: null,
|
|
6447
6470
|
regionTarget: i.regionTarget,
|
|
6448
6471
|
confidence: s.confidence,
|
|
6449
6472
|
reason: s.reason
|
|
6450
6473
|
});
|
|
6451
|
-
if (
|
|
6474
|
+
if (Ed(i, l)) {
|
|
6452
6475
|
const d = Ro(l), p = d ? i.heldTokenByElement.get(d) ?? null : null;
|
|
6453
6476
|
return zt({
|
|
6454
6477
|
semanticTarget: p,
|
|
@@ -6467,14 +6490,14 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6467
6490
|
});
|
|
6468
6491
|
}
|
|
6469
6492
|
};
|
|
6470
|
-
},
|
|
6493
|
+
}, Id = (e) => {
|
|
6471
6494
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
6472
6495
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
6473
6496
|
return t || "plain-spoken-text";
|
|
6474
|
-
},
|
|
6497
|
+
}, $d = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
6475
6498
|
element: e.sourceElement,
|
|
6476
6499
|
alignment: e.mathAlignment
|
|
6477
|
-
}] : [],
|
|
6500
|
+
}] : [], Rd = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
6478
6501
|
speechText: e.speechText || "",
|
|
6479
6502
|
visibleText: e.visibleText || e.speechText || "",
|
|
6480
6503
|
sourceElement: e.sourceElement || e.contentRoot,
|
|
@@ -6491,9 +6514,9 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6491
6514
|
regionRange: t.regionRange,
|
|
6492
6515
|
visibleMap: t.visibleMap,
|
|
6493
6516
|
catalogAlignment: t.alignment,
|
|
6494
|
-
mathAlignments:
|
|
6495
|
-
offsetSpace:
|
|
6496
|
-
})),
|
|
6517
|
+
mathAlignments: $d(t),
|
|
6518
|
+
offsetSpace: Id(t)
|
|
6519
|
+
})), Ld = [
|
|
6497
6520
|
"[data-pie-tts-region]",
|
|
6498
6521
|
"[data-catalog-region]",
|
|
6499
6522
|
"li",
|
|
@@ -6503,18 +6526,18 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6503
6526
|
"[role='group']",
|
|
6504
6527
|
"[role='region']",
|
|
6505
6528
|
"div"
|
|
6506
|
-
].join(","),
|
|
6507
|
-
const r = e.closest(
|
|
6529
|
+
].join(","), xa = (e, t) => {
|
|
6530
|
+
const r = e.closest(Ld);
|
|
6508
6531
|
return r && t.contains(r) ? r : e;
|
|
6509
|
-
},
|
|
6532
|
+
}, Pd = (e, t, r) => {
|
|
6510
6533
|
const n = /* @__PURE__ */ new Map();
|
|
6511
6534
|
for (let i = t; i < r; i++) {
|
|
6512
6535
|
const o = e.get(i);
|
|
6513
6536
|
o && n.set(i - t, o);
|
|
6514
6537
|
}
|
|
6515
6538
|
return n;
|
|
6516
|
-
},
|
|
6517
|
-
const t = cr(e.contentRoot, e.textProcessingOptions), r = await
|
|
6539
|
+
}, Nd = async (e) => {
|
|
6540
|
+
const t = cr(e.contentRoot, e.textProcessingOptions), r = await cd({
|
|
6518
6541
|
chunks: t.chunks,
|
|
6519
6542
|
visibleText: t.visibleText,
|
|
6520
6543
|
language: e.language,
|
|
@@ -6532,8 +6555,8 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6532
6555
|
segment: n,
|
|
6533
6556
|
anchor: {
|
|
6534
6557
|
sourceElement: a,
|
|
6535
|
-
regionElement:
|
|
6536
|
-
visibleMap:
|
|
6558
|
+
regionElement: xa(a, e.contentRoot),
|
|
6559
|
+
visibleMap: Pd(t.map, n.visibleSpan.start, n.visibleSpan.end)
|
|
6537
6560
|
}
|
|
6538
6561
|
};
|
|
6539
6562
|
}
|
|
@@ -6553,8 +6576,8 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6553
6576
|
containsMathMarkup: t.containsMathMarkup,
|
|
6554
6577
|
visibleText: t.visibleText
|
|
6555
6578
|
};
|
|
6556
|
-
},
|
|
6557
|
-
const r =
|
|
6579
|
+
}, zd = (e, t) => {
|
|
6580
|
+
const r = na({
|
|
6558
6581
|
speechText: e.spokenText,
|
|
6559
6582
|
visibleText: e.spokenText
|
|
6560
6583
|
});
|
|
@@ -6563,13 +6586,13 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6563
6586
|
visibleText: e.visibleText,
|
|
6564
6587
|
sourceElement: t.sourceElement,
|
|
6565
6588
|
regionElement: t.regionElement,
|
|
6566
|
-
regionRange:
|
|
6589
|
+
regionRange: ka(t.visibleMap, 0, e.visibleText.length) ?? void 0,
|
|
6567
6590
|
speechMatchesVisibleText: !0,
|
|
6568
6591
|
playbackMode: r.playbackMode,
|
|
6569
6592
|
alignment: r,
|
|
6570
6593
|
visibleMap: t.visibleMap
|
|
6571
6594
|
};
|
|
6572
|
-
},
|
|
6595
|
+
}, Ea = (e, t) => {
|
|
6573
6596
|
const r = t.sourceElement;
|
|
6574
6597
|
return {
|
|
6575
6598
|
speechText: e.spokenText,
|
|
@@ -6582,7 +6605,7 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6582
6605
|
speechText: e.spokenText
|
|
6583
6606
|
}) : void 0
|
|
6584
6607
|
};
|
|
6585
|
-
},
|
|
6608
|
+
}, Wd = (e, t, r) => {
|
|
6586
6609
|
const n = t.sourceElement;
|
|
6587
6610
|
return {
|
|
6588
6611
|
speechText: r,
|
|
@@ -6594,15 +6617,15 @@ var Yu = /* @__PURE__ */ new Set([
|
|
|
6594
6617
|
mathElement: n,
|
|
6595
6618
|
speechText: r
|
|
6596
6619
|
}) : void 0,
|
|
6597
|
-
plainFallback:
|
|
6620
|
+
plainFallback: Ea(e, t)
|
|
6598
6621
|
};
|
|
6599
|
-
},
|
|
6622
|
+
}, Hd = (e, t = {}) => e.items.map(({ segment: r, anchor: n }) => r.kind === "prose" ? zd(r, n) : t.format === "ssml" && r.ssml ? Wd(r, n, r.ssml) : Ea(r, n)), Bd = "pie-tts-control-handoff", H;
|
|
6600
6623
|
(function(e) {
|
|
6601
6624
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
6602
6625
|
})(H || (H = {}));
|
|
6603
|
-
var
|
|
6626
|
+
var Dd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Fd = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Dd(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, jd = class ui {
|
|
6604
6627
|
constructor() {
|
|
6605
|
-
y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver",
|
|
6628
|
+
y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver", hd());
|
|
6606
6629
|
}
|
|
6607
6630
|
debugLog(t, r) {
|
|
6608
6631
|
ui.debugEnabled && (r === void 0 ? console.debug(t) : console.debug(t, r));
|
|
@@ -6725,7 +6748,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6725
6748
|
return t.includes("<") ? /<\s*break\b|<\s*speak\b|<\s*prosody\b|<\s*p\b|<\s*s\b/i.test(t) : !1;
|
|
6726
6749
|
}
|
|
6727
6750
|
isElementHidden(t) {
|
|
6728
|
-
return
|
|
6751
|
+
return Gs(t);
|
|
6729
6752
|
}
|
|
6730
6753
|
getBoundaryStrength(t) {
|
|
6731
6754
|
const r = Number(t.getAttribute("data-tts-break-ms"));
|
|
@@ -6796,9 +6819,9 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6796
6819
|
for (const l of n) {
|
|
6797
6820
|
const c = t.substring(o, l), u = c.match(/^\s*/)?.[0].length || 0, f = c.match(/\s*$/)?.[0].length || 0, d = o + u, p = l - f;
|
|
6798
6821
|
if (p > d) {
|
|
6799
|
-
const
|
|
6822
|
+
const v = t.substring(d, p);
|
|
6800
6823
|
i.push({
|
|
6801
|
-
text:
|
|
6824
|
+
text: v,
|
|
6802
6825
|
startOffset: d,
|
|
6803
6826
|
pauseMsAfter: this.resolvePauseMsFromUnits(r.get(l) || 0)
|
|
6804
6827
|
});
|
|
@@ -6838,9 +6861,9 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6838
6861
|
}
|
|
6839
6862
|
let u = a;
|
|
6840
6863
|
for (const f of [...c, l]) {
|
|
6841
|
-
const d = n.substring(u, f), p = d.match(/^\s*/)?.[0].length || 0,
|
|
6842
|
-
|
|
6843
|
-
text: n.substring(b,
|
|
6864
|
+
const d = n.substring(u, f), p = d.match(/^\s*/)?.[0].length || 0, v = d.match(/\s*$/)?.[0].length || 0, b = u + p, m = f - v;
|
|
6865
|
+
m > b && o.push({
|
|
6866
|
+
text: n.substring(b, m),
|
|
6844
6867
|
startOffset: b,
|
|
6845
6868
|
pauseMsAfter: 0
|
|
6846
6869
|
}), u = f;
|
|
@@ -6948,8 +6971,8 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6948
6971
|
}), this.initializeSpeakTracking(a, r);
|
|
6949
6972
|
const p = r?.highlightModeOverride || (f ? this.resolveHighlightMode() : "sentence");
|
|
6950
6973
|
this.activeHighlightMode = p;
|
|
6951
|
-
const
|
|
6952
|
-
if (this.seekSegments =
|
|
6974
|
+
const v = this.hasExplicitBreakSemantics(o), b = !!this.currentContentElement && !c && !v && f;
|
|
6975
|
+
if (this.seekSegments = v || !f ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
|
|
6953
6976
|
contentToSpeak: a,
|
|
6954
6977
|
shouldUsePlan: b,
|
|
6955
6978
|
playbackSegments: this.seekSegments
|
|
@@ -6977,7 +7000,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6977
7000
|
}
|
|
6978
7001
|
async switchProviderToBrowser(t, r) {
|
|
6979
7002
|
if (!this.currentProvider) return !1;
|
|
6980
|
-
const n = new
|
|
7003
|
+
const n = new Vs(), i = this.currentProvider.providerId, o = { ...this.ttsConfig }, s = r?.operation || "tts-initialize", a = r?.contentToSpeak ?? "", l = a.replace(/\s+/g, " ").trim().slice(0, 120), c = a.length > 0 ? {
|
|
6981
7004
|
textLength: a.length,
|
|
6982
7005
|
textPreview: l.length < a.length ? `${l}…` : l
|
|
6983
7006
|
} : {};
|
|
@@ -7118,8 +7141,8 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7118
7141
|
}, a = (u, f) => {
|
|
7119
7142
|
const d = l(u);
|
|
7120
7143
|
if (d.length !== 1) return null;
|
|
7121
|
-
const p = d[0],
|
|
7122
|
-
return b(
|
|
7144
|
+
const p = d[0], v = cr(p, this.getTextProcessingOptions(r.language)).visibleText || G(p.textContent || ""), b = (m) => G(m).replace(/\s+/g, "");
|
|
7145
|
+
return b(v) === b(f) ? p : null;
|
|
7123
7146
|
}, l = (u) => {
|
|
7124
7147
|
const f = Array.from(u.querySelectorAll("math"));
|
|
7125
7148
|
return u.localName?.toLowerCase() === "math" ? [u, ...f] : f;
|
|
@@ -7133,11 +7156,11 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7133
7156
|
const f = u, d = s(f);
|
|
7134
7157
|
if (d) {
|
|
7135
7158
|
o();
|
|
7136
|
-
const p = cr(f, this.getTextProcessingOptions(r.language)),
|
|
7159
|
+
const p = cr(f, this.getTextProcessingOptions(r.language)), v = p.visibleText || G(f.textContent || ""), b = na({
|
|
7137
7160
|
speechText: d.content,
|
|
7138
|
-
visibleText:
|
|
7139
|
-
}),
|
|
7140
|
-
mathElement:
|
|
7161
|
+
visibleText: v
|
|
7162
|
+
}), m = a(f, v), _ = m ? tn({
|
|
7163
|
+
mathElement: m,
|
|
7141
7164
|
speechText: d.content
|
|
7142
7165
|
}) : void 0, N = _ ? void 0 : l(f).map((w) => ({
|
|
7143
7166
|
element: w,
|
|
@@ -7145,13 +7168,13 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7145
7168
|
mathElement: w,
|
|
7146
7169
|
speechText: d.content
|
|
7147
7170
|
})
|
|
7148
|
-
})),
|
|
7171
|
+
})), B = G(d.content);
|
|
7149
7172
|
n.push({
|
|
7150
7173
|
speechText: d.content,
|
|
7151
|
-
visibleText:
|
|
7174
|
+
visibleText: v,
|
|
7152
7175
|
sourceElement: f,
|
|
7153
|
-
regionElement:
|
|
7154
|
-
speechMatchesVisibleText:
|
|
7176
|
+
regionElement: xa(f, t),
|
|
7177
|
+
speechMatchesVisibleText: B === v,
|
|
7155
7178
|
playbackMode: b.playbackMode,
|
|
7156
7179
|
alignment: b,
|
|
7157
7180
|
mathAlignment: _,
|
|
@@ -7169,7 +7192,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7169
7192
|
return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
|
|
7170
7193
|
}
|
|
7171
7194
|
async resolveGeneratedSpeechContent(t, r, n) {
|
|
7172
|
-
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await
|
|
7195
|
+
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await Nd({
|
|
7173
7196
|
contentRoot: t,
|
|
7174
7197
|
language: n,
|
|
7175
7198
|
mathSpeech: this.getMathSpeechOptions(),
|
|
@@ -7186,7 +7209,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7186
7209
|
containsMathMarkup: !1,
|
|
7187
7210
|
speechMatchesVisibleText: !0
|
|
7188
7211
|
};
|
|
7189
|
-
const c =
|
|
7212
|
+
const c = Hd(o, { format: i }), u = o.plainSpeechText;
|
|
7190
7213
|
return {
|
|
7191
7214
|
contentToSpeak: u,
|
|
7192
7215
|
speechText: u,
|
|
@@ -7259,7 +7282,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7259
7282
|
}
|
|
7260
7283
|
}
|
|
7261
7284
|
highlightRenderableRegionTarget(t) {
|
|
7262
|
-
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !
|
|
7285
|
+
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !Fd(this.lastRenderedRegionTarget, t))
|
|
7263
7286
|
try {
|
|
7264
7287
|
const r = document.createRange();
|
|
7265
7288
|
if (t.type === "element") r.selectNodeContents(t.element);
|
|
@@ -7310,10 +7333,10 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7310
7333
|
async speakCatalogChunkOnce(t, r) {
|
|
7311
7334
|
if (!this.provider) return;
|
|
7312
7335
|
this.lastRenderedRegionTarget = null;
|
|
7313
|
-
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ?
|
|
7336
|
+
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ? Rd({
|
|
7314
7337
|
contentRoot: n,
|
|
7315
7338
|
chunks: [t]
|
|
7316
|
-
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ?
|
|
7339
|
+
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Od({
|
|
7317
7340
|
chunks: [i],
|
|
7318
7341
|
mathTokenHighlighting: o
|
|
7319
7342
|
}) : null;
|
|
@@ -7424,7 +7447,7 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7424
7447
|
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.setState(H.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7425
7448
|
}
|
|
7426
7449
|
requestControlHandoff() {
|
|
7427
|
-
typeof window > "u" || window.dispatchEvent(new CustomEvent(
|
|
7450
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent(Bd, { detail: { source: "host" } }));
|
|
7428
7451
|
}
|
|
7429
7452
|
isPlaying() {
|
|
7430
7453
|
return this.state === H.PLAYING;
|
|
@@ -7495,14 +7518,14 @@ var zd = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7495
7518
|
});
|
|
7496
7519
|
}
|
|
7497
7520
|
};
|
|
7498
|
-
y(
|
|
7521
|
+
y(jd, "debugEnabled", (() => {
|
|
7499
7522
|
try {
|
|
7500
7523
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7501
7524
|
} catch {
|
|
7502
7525
|
}
|
|
7503
7526
|
return globalThis.__PIE_TTS_DEBUG__ === !0;
|
|
7504
7527
|
})());
|
|
7505
|
-
var
|
|
7528
|
+
var Th = Kc({
|
|
7506
7529
|
policy: {
|
|
7507
7530
|
allowed: [],
|
|
7508
7531
|
blocked: []
|
|
@@ -7513,7 +7536,7 @@ var mh = Yc({
|
|
|
7513
7536
|
passage: []
|
|
7514
7537
|
},
|
|
7515
7538
|
providers: {}
|
|
7516
|
-
}),
|
|
7539
|
+
}), Vd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), qd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Ud = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), Gd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), Yd = /* @__PURE__ */ $s('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), Kd = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), Xd = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), Jd = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), Qd = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), Zd = /* @__PURE__ */ Oe('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), eh = /* @__PURE__ */ Oe('<circle r="2" role="button" tabindex="0"></circle>'), th = /* @__PURE__ */ Oe('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), rh = /* @__PURE__ */ $s('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'), nh = {
|
|
7517
7540
|
hash: "svelte-7afz7f",
|
|
7518
7541
|
code: `.pie-tool-graph.svelte-7afz7f {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
|
|
7519
7542
|
|
|
@@ -7525,13 +7548,13 @@ var mh = Yc({
|
|
|
7525
7548
|
|
|
7526
7549
|
/* User drawing styles */.pie-tool-graph__user-point.svelte-7afz7f {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-7afz7f {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-7afz7f {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-7afz7f {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`
|
|
7527
7550
|
};
|
|
7528
|
-
function
|
|
7529
|
-
Fo(t, !0),
|
|
7530
|
-
let r = uo(t, "visible", 7, !1), n = uo(t, "toolId", 7, "graph"), i = /* @__PURE__ */ U(void 0), o = /* @__PURE__ */ U(void 0), s = /* @__PURE__ */ U(void 0), a = /* @__PURE__ */ U("selector"), l = /* @__PURE__ */ U(ct([])), c = /* @__PURE__ */ U(ct([])), u = /* @__PURE__ */ U(1), f = /* @__PURE__ */ U(1), d = /* @__PURE__ */ U(null), p = /* @__PURE__ */ U(null),
|
|
7531
|
-
const b = 5,
|
|
7532
|
-
let
|
|
7533
|
-
if (g(w) <= 0 || g(
|
|
7534
|
-
const T = g(w) / 100, S = g(
|
|
7551
|
+
function ih(e, t) {
|
|
7552
|
+
Fo(t, !0), Tc(e, nh);
|
|
7553
|
+
let r = uo(t, "visible", 7, !1), n = uo(t, "toolId", 7, "graph"), i = /* @__PURE__ */ U(void 0), o = /* @__PURE__ */ U(void 0), s = /* @__PURE__ */ U(void 0), a = /* @__PURE__ */ U("selector"), l = /* @__PURE__ */ U(ct([])), c = /* @__PURE__ */ U(ct([])), u = /* @__PURE__ */ U(1), f = /* @__PURE__ */ U(1), d = /* @__PURE__ */ U(null), p = /* @__PURE__ */ U(null), v = /* @__PURE__ */ U(null);
|
|
7554
|
+
const b = 5, m = 5, _ = 100 / b, N = _ / m;
|
|
7555
|
+
let B = /* @__PURE__ */ U(0), w = /* @__PURE__ */ U(0), F = /* @__PURE__ */ er(() => {
|
|
7556
|
+
if (g(w) <= 0 || g(B) <= 0) return 100;
|
|
7557
|
+
const T = g(w) / 100, S = g(B) / T;
|
|
7535
7558
|
return Math.max(100, S);
|
|
7536
7559
|
});
|
|
7537
7560
|
const j = [
|
|
@@ -7562,11 +7585,11 @@ function eh(e, t) {
|
|
|
7562
7585
|
];
|
|
7563
7586
|
Zi(() => {
|
|
7564
7587
|
if (g(o))
|
|
7565
|
-
return
|
|
7588
|
+
return Fc(g(o), () => {
|
|
7566
7589
|
});
|
|
7567
7590
|
});
|
|
7568
7591
|
function Q() {
|
|
7569
|
-
return
|
|
7592
|
+
return Fl(u);
|
|
7570
7593
|
}
|
|
7571
7594
|
function te(T) {
|
|
7572
7595
|
if (T !== null)
|
|
@@ -7576,10 +7599,10 @@ function eh(e, t) {
|
|
|
7576
7599
|
if (!g(s)) return null;
|
|
7577
7600
|
const S = g(s).createSVGPoint();
|
|
7578
7601
|
S.x = T.clientX, S.y = T.clientY;
|
|
7579
|
-
const
|
|
7580
|
-
if (!
|
|
7602
|
+
const D = g(s).getScreenCTM();
|
|
7603
|
+
if (!D) return null;
|
|
7581
7604
|
try {
|
|
7582
|
-
const z = S.matrixTransform(
|
|
7605
|
+
const z = S.matrixTransform(D.inverse());
|
|
7583
7606
|
return z.y = Math.max(0, Math.min(100, z.y)), z.x = Math.max(0, Math.min(g(F), z.x)), {
|
|
7584
7607
|
x: z.x,
|
|
7585
7608
|
y: z.y
|
|
@@ -7589,11 +7612,11 @@ function eh(e, t) {
|
|
|
7589
7612
|
}
|
|
7590
7613
|
}
|
|
7591
7614
|
function X(T, S = 5) {
|
|
7592
|
-
const
|
|
7615
|
+
const D = S * S;
|
|
7593
7616
|
let z = null, re = 1 / 0;
|
|
7594
7617
|
for (const Y of g(l)) {
|
|
7595
7618
|
const tt = Y.x - T.x, Ie = Y.y - T.y, rt = tt * tt + Ie * Ie;
|
|
7596
|
-
rt < re && rt <
|
|
7619
|
+
rt < re && rt < D && (re = rt, z = Y);
|
|
7597
7620
|
}
|
|
7598
7621
|
return z;
|
|
7599
7622
|
}
|
|
@@ -7614,7 +7637,7 @@ function eh(e, t) {
|
|
|
7614
7637
|
id: Q(),
|
|
7615
7638
|
p1Id: g(d),
|
|
7616
7639
|
p2Id: T
|
|
7617
|
-
}], !0)), M(d, null), M(
|
|
7640
|
+
}], !0)), M(d, null), M(v, null);
|
|
7618
7641
|
}
|
|
7619
7642
|
}
|
|
7620
7643
|
let wr = /* @__PURE__ */ er(() => {
|
|
@@ -7626,26 +7649,26 @@ function eh(e, t) {
|
|
|
7626
7649
|
}, S = g(F);
|
|
7627
7650
|
for (let z = 0; z <= b; z++) {
|
|
7628
7651
|
const re = z * _;
|
|
7629
|
-
if (T.majorHorizontal.push(re), z < b) for (let Y = 1; Y <
|
|
7652
|
+
if (T.majorHorizontal.push(re), z < b) for (let Y = 1; Y < m; Y++) T.minorHorizontal.push(re + Y * N);
|
|
7630
7653
|
}
|
|
7631
|
-
let
|
|
7632
|
-
for (;
|
|
7633
|
-
if (T.majorVertical.push(
|
|
7634
|
-
const re =
|
|
7654
|
+
let D = 0;
|
|
7655
|
+
for (; D <= S; ) {
|
|
7656
|
+
if (T.majorVertical.push(D), D < S) for (let z = 1; z < m; z++) {
|
|
7657
|
+
const re = D + z * N;
|
|
7635
7658
|
if (re <= S) T.minorVertical.push(re);
|
|
7636
7659
|
else break;
|
|
7637
7660
|
}
|
|
7638
|
-
|
|
7661
|
+
D += _;
|
|
7639
7662
|
}
|
|
7640
7663
|
return T;
|
|
7641
7664
|
});
|
|
7642
|
-
function
|
|
7643
|
-
M(a, T, !0), M(d, null), M(p, null), M(
|
|
7665
|
+
function Aa(T) {
|
|
7666
|
+
M(a, T, !0), M(d, null), M(p, null), M(v, null);
|
|
7644
7667
|
}
|
|
7645
7668
|
function Li(T) {
|
|
7646
7669
|
const S = et(T);
|
|
7647
7670
|
if (!S) return;
|
|
7648
|
-
const
|
|
7671
|
+
const D = X(S, N);
|
|
7649
7672
|
switch (g(a)) {
|
|
7650
7673
|
case "point":
|
|
7651
7674
|
M(l, [...g(l), {
|
|
@@ -7655,50 +7678,50 @@ function eh(e, t) {
|
|
|
7655
7678
|
}], !0);
|
|
7656
7679
|
break;
|
|
7657
7680
|
case "line":
|
|
7658
|
-
const z =
|
|
7681
|
+
const z = D ?? {
|
|
7659
7682
|
id: Q(),
|
|
7660
7683
|
x: S.x,
|
|
7661
7684
|
y: S.y
|
|
7662
7685
|
};
|
|
7663
|
-
|
|
7686
|
+
D || M(l, [...g(l), z], !0), g(d) === null ? M(d, z.id, !0) : (g(d) !== z.id && (g(c).some((Y) => Y.p1Id === g(d) && Y.p2Id === z.id || Y.p1Id === z.id && Y.p2Id === g(d)) || M(c, [...g(c), {
|
|
7664
7687
|
id: Q(),
|
|
7665
7688
|
p1Id: g(d),
|
|
7666
7689
|
p2Id: z.id
|
|
7667
|
-
}], !0)), M(d, null), M(
|
|
7690
|
+
}], !0)), M(d, null), M(v, null));
|
|
7668
7691
|
break;
|
|
7669
7692
|
case "delete":
|
|
7670
7693
|
const re = X(S, 2);
|
|
7671
7694
|
re && (M(l, g(l).filter((Y) => Y.id !== re.id), !0), M(c, g(c).filter((Y) => Y.p1Id !== re.id && Y.p2Id !== re.id), !0));
|
|
7672
7695
|
break;
|
|
7673
7696
|
case "selector":
|
|
7674
|
-
M(d, null), M(
|
|
7697
|
+
M(d, null), M(v, null);
|
|
7675
7698
|
break;
|
|
7676
7699
|
}
|
|
7677
7700
|
}
|
|
7678
|
-
function
|
|
7701
|
+
function Ma(T, S) {
|
|
7679
7702
|
g(a) === "selector" && (M(p, T, !0), S.target.setPointerCapture(S.pointerId));
|
|
7680
7703
|
}
|
|
7681
|
-
function
|
|
7704
|
+
function Ca(T) {
|
|
7682
7705
|
const S = et(T);
|
|
7683
|
-
if (S && (M(
|
|
7684
|
-
const
|
|
7685
|
-
|
|
7706
|
+
if (S && (M(v, S, !0), g(p) !== null && g(a) === "selector")) {
|
|
7707
|
+
const D = te(g(p));
|
|
7708
|
+
D && (D.x = S.x, D.y = S.y, M(l, g(l), !0));
|
|
7686
7709
|
}
|
|
7687
7710
|
}
|
|
7688
7711
|
function Pi(T) {
|
|
7689
|
-
g(p) !== null && (T.target?.hasPointerCapture(T.pointerId) && T.target.releasePointerCapture(T.pointerId), M(p, null)), (g(a) !== "line" || g(d) === null) && M(
|
|
7712
|
+
g(p) !== null && (T.target?.hasPointerCapture(T.pointerId) && T.target.releasePointerCapture(T.pointerId), M(p, null)), (g(a) !== "line" || g(d) === null) && M(v, null);
|
|
7690
7713
|
}
|
|
7691
7714
|
let Qt = null;
|
|
7692
7715
|
Zi(() => {
|
|
7693
7716
|
if (g(i))
|
|
7694
7717
|
return Qt || (Qt = new ResizeObserver((T) => {
|
|
7695
|
-
const { width: S, height:
|
|
7696
|
-
(Math.abs(g(
|
|
7718
|
+
const { width: S, height: D } = T[0].contentRect;
|
|
7719
|
+
(Math.abs(g(B) - S) > 0.1 || Math.abs(g(w) - D) > 0.1) && (M(B, S, !0), M(w, D, !0));
|
|
7697
7720
|
})), Qt.observe(g(i)), () => {
|
|
7698
7721
|
Qt && Qt.disconnect();
|
|
7699
7722
|
};
|
|
7700
7723
|
});
|
|
7701
|
-
var
|
|
7724
|
+
var Oa = {
|
|
7702
7725
|
get visible() {
|
|
7703
7726
|
return r();
|
|
7704
7727
|
},
|
|
@@ -7711,58 +7734,58 @@ function eh(e, t) {
|
|
|
7711
7734
|
set toolId(T = "graph") {
|
|
7712
7735
|
n(T), Yr();
|
|
7713
7736
|
}
|
|
7714
|
-
}, Ni = wn(),
|
|
7715
|
-
var S =
|
|
7737
|
+
}, Ni = wn(), Ia = Tn(Ni), $a = (T) => {
|
|
7738
|
+
var S = rh(), D = Fe(S), z = Fe(D);
|
|
7716
7739
|
gt(z, 21, () => j, ($) => $.name, ($, I) => {
|
|
7717
|
-
var A =
|
|
7740
|
+
var A = Yd();
|
|
7718
7741
|
let Se;
|
|
7719
|
-
var Z = Fe(A), ut = Fe(Z),
|
|
7720
|
-
var dt =
|
|
7742
|
+
var Z = Fe(A), ut = Fe(Z), De = (fe) => {
|
|
7743
|
+
var dt = Vd();
|
|
7721
7744
|
ee(fe, dt);
|
|
7722
7745
|
}, Zt = (fe) => {
|
|
7723
|
-
var dt =
|
|
7746
|
+
var dt = qd();
|
|
7724
7747
|
ee(fe, dt);
|
|
7725
7748
|
}, ft = (fe) => {
|
|
7726
|
-
var dt =
|
|
7749
|
+
var dt = Ud();
|
|
7727
7750
|
ee(fe, dt);
|
|
7728
|
-
},
|
|
7729
|
-
var dt =
|
|
7751
|
+
}, Na = (fe) => {
|
|
7752
|
+
var dt = Gd();
|
|
7730
7753
|
ee(fe, dt);
|
|
7731
7754
|
};
|
|
7732
7755
|
rr(ut, (fe) => {
|
|
7733
|
-
g(I).name === "selector" ? fe(
|
|
7756
|
+
g(I).name === "selector" ? fe(De) : g(I).name === "point" ? fe(Zt, 1) : g(I).name === "line" ? fe(ft, 2) : g(I).name === "delete" && fe(Na, 3);
|
|
7734
7757
|
}), de(Z);
|
|
7735
|
-
var
|
|
7736
|
-
de(
|
|
7737
|
-
Se = ao(A, 1, "pie-tool-graph__tool-button svelte-7afz7f", null, Se, { "pie-tool-graph__tool-button--active": g(a) === g(I).name }), W(A, "title", g(I).title), W(A, "aria-label", g(I).title), W(A, "aria-pressed", g(a) === g(I).name),
|
|
7738
|
-
}), pt("click", A, () =>
|
|
7758
|
+
var Bi = $e(Z, 2), za = Fe(Bi, !0);
|
|
7759
|
+
de(Bi), de(A), je(() => {
|
|
7760
|
+
Se = ao(A, 1, "pie-tool-graph__tool-button svelte-7afz7f", null, Se, { "pie-tool-graph__tool-button--active": g(a) === g(I).name }), W(A, "title", g(I).title), W(A, "aria-label", g(I).title), W(A, "aria-pressed", g(a) === g(I).name), pc(za, g(I).label);
|
|
7761
|
+
}), pt("click", A, () => Aa(g(I).name)), ee($, A);
|
|
7739
7762
|
}), de(z);
|
|
7740
7763
|
var re = $e(z, 2), Y = $e(Fe(re), 2);
|
|
7741
|
-
|
|
7742
|
-
var tt = $e(
|
|
7764
|
+
Mc(Y), de(re), de(D);
|
|
7765
|
+
var tt = $e(D, 2), Ie = Fe(tt), rt = Fe(Ie), zi = Fe(rt);
|
|
7743
7766
|
gt(zi, 17, () => g(wr).minorHorizontal, Mr, ($, I) => {
|
|
7744
|
-
var A =
|
|
7767
|
+
var A = Kd();
|
|
7745
7768
|
je(() => {
|
|
7746
7769
|
W(A, "y1", g(I)), W(A, "x2", g(F)), W(A, "y2", g(I));
|
|
7747
7770
|
}), ee($, A);
|
|
7748
7771
|
});
|
|
7749
7772
|
var Wi = $e(zi);
|
|
7750
7773
|
gt(Wi, 17, () => g(wr).majorHorizontal, Mr, ($, I) => {
|
|
7751
|
-
var A =
|
|
7774
|
+
var A = Xd();
|
|
7752
7775
|
je(() => {
|
|
7753
7776
|
W(A, "y1", g(I)), W(A, "x2", g(F)), W(A, "y2", g(I));
|
|
7754
7777
|
}), ee($, A);
|
|
7755
7778
|
});
|
|
7756
7779
|
var Hi = $e(Wi);
|
|
7757
7780
|
gt(Hi, 17, () => g(wr).minorVertical, Mr, ($, I) => {
|
|
7758
|
-
var A =
|
|
7781
|
+
var A = Jd();
|
|
7759
7782
|
je(() => {
|
|
7760
7783
|
W(A, "x1", g(I)), W(A, "x2", g(I));
|
|
7761
7784
|
}), ee($, A);
|
|
7762
7785
|
});
|
|
7763
|
-
var
|
|
7764
|
-
gt(
|
|
7765
|
-
var A =
|
|
7786
|
+
var Ra = $e(Hi);
|
|
7787
|
+
gt(Ra, 17, () => g(wr).majorVertical, Mr, ($, I) => {
|
|
7788
|
+
var A = Qd();
|
|
7766
7789
|
je(() => {
|
|
7767
7790
|
W(A, "x1", g(I)), W(A, "x2", g(I));
|
|
7768
7791
|
}), ee($, A);
|
|
@@ -7770,60 +7793,60 @@ function eh(e, t) {
|
|
|
7770
7793
|
var yn = $e(rt);
|
|
7771
7794
|
gt(yn, 21, () => g(c), ($) => $.id, ($, I) => {
|
|
7772
7795
|
const A = /* @__PURE__ */ er(() => te(g(I).p1Id)), Se = /* @__PURE__ */ er(() => te(g(I).p2Id));
|
|
7773
|
-
var Z = wn(), ut = Tn(Z),
|
|
7774
|
-
var ft =
|
|
7796
|
+
var Z = wn(), ut = Tn(Z), De = (Zt) => {
|
|
7797
|
+
var ft = Zd();
|
|
7775
7798
|
je(() => {
|
|
7776
7799
|
W(ft, "x1", g(A).x), W(ft, "y1", g(A).y), W(ft, "x2", g(Se).x), W(ft, "y2", g(Se).y);
|
|
7777
7800
|
}), ee(Zt, ft);
|
|
7778
7801
|
};
|
|
7779
7802
|
rr(ut, (Zt) => {
|
|
7780
|
-
g(A) && g(Se) && Zt(
|
|
7803
|
+
g(A) && g(Se) && Zt(De);
|
|
7781
7804
|
}), ee($, Z);
|
|
7782
7805
|
}), de(yn);
|
|
7783
7806
|
var bn = $e(yn);
|
|
7784
7807
|
gt(bn, 21, () => g(l), ($) => $.id, ($, I) => {
|
|
7785
|
-
var A =
|
|
7808
|
+
var A = eh();
|
|
7786
7809
|
let Se;
|
|
7787
7810
|
je((Z) => {
|
|
7788
7811
|
W(A, "cx", g(I).x), W(A, "cy", g(I).y), Se = ao(A, 0, "pie-tool-graph__user-point svelte-7afz7f", null, Se, Z), W(A, "data-id", g(I).id), W(A, "aria-label", `Graph point ${g(I).id ?? ""}`);
|
|
7789
7812
|
}, [() => ({ "pie-tool-graph__user-point--highlight": vn(g(I).id) })]), pt("pointerdown", A, (Z) => {
|
|
7790
|
-
Z.stopPropagation(),
|
|
7813
|
+
Z.stopPropagation(), Ma(g(I).id, Z);
|
|
7791
7814
|
}), pt("keydown", A, (Z) => {
|
|
7792
7815
|
(Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), mn(g(I).id));
|
|
7793
7816
|
}), ee($, A);
|
|
7794
7817
|
}), de(bn);
|
|
7795
|
-
var
|
|
7818
|
+
var La = $e(bn), Pa = ($) => {
|
|
7796
7819
|
const I = /* @__PURE__ */ er(() => te(g(d)));
|
|
7797
7820
|
var A = wn(), Se = Tn(A), Z = (ut) => {
|
|
7798
|
-
var
|
|
7821
|
+
var De = th();
|
|
7799
7822
|
je(() => {
|
|
7800
|
-
W(
|
|
7801
|
-
}), ee(ut,
|
|
7823
|
+
W(De, "x1", g(I).x), W(De, "y1", g(I).y), W(De, "x2", g(v).x), W(De, "y2", g(v).y);
|
|
7824
|
+
}), ee(ut, De);
|
|
7802
7825
|
};
|
|
7803
7826
|
rr(Se, (ut) => {
|
|
7804
7827
|
g(I) && ut(Z);
|
|
7805
7828
|
}), ee($, A);
|
|
7806
7829
|
};
|
|
7807
|
-
rr(
|
|
7808
|
-
g(d) && g(
|
|
7830
|
+
rr(La, ($) => {
|
|
7831
|
+
g(d) && g(v) && $(Pa);
|
|
7809
7832
|
}), de(Ie), In(Ie, ($) => M(s, $), () => g(s)), de(tt), In(tt, ($) => M(i, $), () => g(i)), de(S), In(S, ($) => M(o, $), () => g(o)), je(() => {
|
|
7810
|
-
W(S, "data-tool-id", n()), W(Ie, "viewBox", `0 0 ${g(F) ?? ""} 100`),
|
|
7811
|
-
}),
|
|
7833
|
+
W(S, "data-tool-id", n()), W(Ie, "viewBox", `0 0 ${g(F) ?? ""} 100`), kc(rt, `opacity: ${g(f) ?? ""}`);
|
|
7834
|
+
}), Ic(Y, () => g(f), ($) => M(f, $)), pt("click", tt, Li), pt("keydown", tt, ($) => {
|
|
7812
7835
|
($.key === "Enter" || $.key === " ") && ($.preventDefault(), Li($));
|
|
7813
|
-
}), pt("pointermove", Ie,
|
|
7836
|
+
}), pt("pointermove", Ie, Ca), pt("pointerup", Ie, Pi), oc("pointerleave", Ie, Pi), ee(T, S);
|
|
7814
7837
|
};
|
|
7815
|
-
return rr(
|
|
7816
|
-
r() && T(
|
|
7817
|
-
}), ee(e, Ni), jo(
|
|
7838
|
+
return rr(Ia, (T) => {
|
|
7839
|
+
r() && T($a);
|
|
7840
|
+
}), ee(e, Ni), jo(Oa);
|
|
7818
7841
|
}
|
|
7819
|
-
|
|
7842
|
+
sc([
|
|
7820
7843
|
"click",
|
|
7821
7844
|
"keydown",
|
|
7822
7845
|
"pointermove",
|
|
7823
7846
|
"pointerup",
|
|
7824
7847
|
"pointerdown"
|
|
7825
7848
|
]);
|
|
7826
|
-
customElements.define("pie-tool-graph",
|
|
7849
|
+
customElements.define("pie-tool-graph", Nc(ih, {
|
|
7827
7850
|
visible: {
|
|
7828
7851
|
attribute: "visible",
|
|
7829
7852
|
type: "Boolean"
|
|
@@ -7834,7 +7857,7 @@ customElements.define("pie-tool-graph", Pc(eh, {
|
|
|
7834
7857
|
}
|
|
7835
7858
|
}, [], [], { mode: "open" }));
|
|
7836
7859
|
export {
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7860
|
+
ih as default,
|
|
7861
|
+
ah as n,
|
|
7862
|
+
sh as t
|
|
7840
7863
|
};
|