@pie-players/pie-tool-annotation-toolbar 0.3.46 → 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.
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as m } from "./defineProperty-Dt7ri80W.js";
|
|
2
|
-
var
|
|
2
|
+
var va = Object.create, mo = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, ba = Object.getOwnPropertyNames, ya = Object.getPrototypeOf, _a = Object.prototype.hasOwnProperty, Eh = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ta = (e, t, n, r) => {
|
|
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], !_a.call(e, a) && a !== n && mo(e, a, {
|
|
6
6
|
get: ((l) => t[l]).bind(null, a),
|
|
7
|
-
enumerable: !(r =
|
|
7
|
+
enumerable: !(r = ma(t, a)) || r.enumerable
|
|
8
8
|
});
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, Sa = (e, t, n) => (n = e != null ? va(ya(e)) : {}, Ta(t || !e || !e.__esModule ? mo(n, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : n, e)),
|
|
13
|
+
}) : n, e)), xh = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : 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
|
});
|
|
@@ -19,9 +19,9 @@ if (typeof window < "u") {
|
|
|
19
19
|
((wi = (ki = window).__svelte ?? (ki.__svelte = {})).v ?? (wi.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Ct = {}, j = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var bo = Array.isArray,
|
|
22
|
+
var bo = Array.isArray, wa = Array.prototype.indexOf, Cn = Array.prototype.includes, Un = Array.from, Mn = Object.keys, On = Object.defineProperty, it = Object.getOwnPropertyDescriptor, ka = Object.getOwnPropertyDescriptors, Ea = Object.prototype, xa = Array.prototype, yo = Object.getPrototypeOf, Ei = Object.isExtensible, Aa = () => {
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function Ca(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
26
26
|
}
|
|
27
27
|
function _o() {
|
|
@@ -34,55 +34,55 @@ function _o() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var Ah = 1 << 24, ce = 1024, he = 2048, bt = 4096, Ur = 8192, Ma = 16384, Gr = 32768, xi = 1 << 25, Kr = 65536, Ch = 1 << 17, Mh = 1 << 18, Lt = 1 << 19, Oa = 1 << 20, Yt = 1 << 25, nn = 65536, Ai = 1 << 21, Ia = 1 << 22, In = 1 << 23, Xt = /* @__PURE__ */ Symbol("$state"), To = /* @__PURE__ */ Symbol("legacy props"), $a = /* @__PURE__ */ Symbol(""), Ra = /* @__PURE__ */ Symbol("proxy path"), _r = /* @__PURE__ */ Symbol("attributes"), La = /* @__PURE__ */ Symbol("class"), Tr = /* @__PURE__ */ Symbol("style"), _n = /* @__PURE__ */ Symbol("text");
|
|
38
38
|
var Gn = new class extends Error {
|
|
39
39
|
constructor(...t) {
|
|
40
40
|
super(...t), m(this, "name", "StaleReactionError"), m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
41
41
|
}
|
|
42
|
-
}(),
|
|
43
|
-
function
|
|
42
|
+
}(), Pa = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
43
|
+
function Na() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Wa(e, t, n) {
|
|
47
47
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function za(e) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Ha() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ba(e) {
|
|
56
56
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Da() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Fa() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ja(e) {
|
|
65
65
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function qa() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Va() {
|
|
71
71
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ua() {
|
|
74
74
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Ga() {
|
|
77
77
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ka() {
|
|
80
80
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
81
81
|
}
|
|
82
82
|
function Kn(e) {
|
|
83
83
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ya() {
|
|
86
86
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
87
87
|
}
|
|
88
88
|
var L = !1;
|
|
@@ -105,7 +105,7 @@ function dn(e) {
|
|
|
105
105
|
R = e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Xa(e = 1) {
|
|
109
109
|
if (L) {
|
|
110
110
|
for (var t = e, n = R; t--; ) n = /* @__PURE__ */ xe(n);
|
|
111
111
|
R = n;
|
|
@@ -132,18 +132,18 @@ function So(e) {
|
|
|
132
132
|
function wo(e) {
|
|
133
133
|
return e === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ja(e, t) {
|
|
136
136
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
137
137
|
}
|
|
138
138
|
function ko(e) {
|
|
139
|
-
return !
|
|
139
|
+
return !Ja(e, this.v);
|
|
140
140
|
}
|
|
141
141
|
var Re = !1, Xn = !1;
|
|
142
142
|
function Ci(e, t) {
|
|
143
|
-
return e.label = t,
|
|
143
|
+
return e.label = t, Qa(e.v, t), e;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return e?.[
|
|
145
|
+
function Qa(e, t) {
|
|
146
|
+
return e?.[Ra]?.(t), e;
|
|
147
147
|
}
|
|
148
148
|
var F = null;
|
|
149
149
|
function Mt(e) {
|
|
@@ -179,7 +179,7 @@ function rn() {
|
|
|
179
179
|
var Ze = [];
|
|
180
180
|
function Ao() {
|
|
181
181
|
var e = Ze;
|
|
182
|
-
Ze = [],
|
|
182
|
+
Ze = [], Ca(e);
|
|
183
183
|
}
|
|
184
184
|
function ht(e) {
|
|
185
185
|
if (Ze.length === 0 && !Jt) {
|
|
@@ -190,7 +190,7 @@ function ht(e) {
|
|
|
190
190
|
}
|
|
191
191
|
Ze.push(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function Za() {
|
|
194
194
|
for (; Ze.length > 0; ) Ao();
|
|
195
195
|
}
|
|
196
196
|
function Co(e) {
|
|
@@ -216,9 +216,9 @@ function Ue(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
throw e;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var el = ~(he | bt | ce);
|
|
220
220
|
function H(e, t) {
|
|
221
|
-
e.f = e.f &
|
|
221
|
+
e.f = e.f & el | t;
|
|
222
222
|
}
|
|
223
223
|
function Yr(e) {
|
|
224
224
|
(e.f & 512) !== 0 || e.deps === null ? H(e, ce) : H(e, bt);
|
|
@@ -231,8 +231,8 @@ function Mo(e) {
|
|
|
231
231
|
function Oo(e, t, n) {
|
|
232
232
|
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && n.add(e), Mo(e.deps), H(e, ce);
|
|
233
233
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
234
|
+
var tl = !1, hn = !1;
|
|
235
|
+
function nl(e) {
|
|
236
236
|
var t = hn;
|
|
237
237
|
try {
|
|
238
238
|
return hn = !1, [e(), hn];
|
|
@@ -256,30 +256,30 @@ function A(e, t, n) {
|
|
|
256
256
|
function w(e, t, n) {
|
|
257
257
|
return e.set(A(e, t), n), n;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function f(e, t) {
|
|
260
260
|
return e.get(A(e, t));
|
|
261
261
|
}
|
|
262
262
|
var $o, Rn = null, wt = null, C = null, Sr = null, X = null, wr = null, Jt = !1, ir = !1, Ot = null, Ln = null, Ro = 0;
|
|
263
|
-
var
|
|
263
|
+
var rl = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), yt = class Lo {
|
|
264
264
|
constructor() {
|
|
265
|
-
Xr(this, B), m(this, "id",
|
|
265
|
+
Xr(this, B), m(this, "id", rl++), E(this, Pn, !1), m(this, "linked", !0), E(this, ot, null), E(this, et, null), m(this, "async_deriveds", /* @__PURE__ */ new Map()), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), E(this, Nn, /* @__PURE__ */ new Set()), E(this, fn, /* @__PURE__ */ new Set()), E(this, kt, 0), E(this, Qe, /* @__PURE__ */ new Map()), E(this, qt, null), E(this, se, []), E(this, kr, []), E(this, ft, /* @__PURE__ */ new Set()), E(this, $e, /* @__PURE__ */ new Set()), E(this, Ve, /* @__PURE__ */ new Map()), E(this, Tn, /* @__PURE__ */ new Set()), m(this, "is_fork", !1), E(this, Vt, !1), wt === null ? Rn = wt = this : (w(et, wt, this), w(ot, this, wt)), wt = this;
|
|
266
266
|
}
|
|
267
267
|
skip_effect(t) {
|
|
268
|
-
|
|
268
|
+
f(Ve, this).has(t) || f(Ve, this).set(t, {
|
|
269
269
|
d: [],
|
|
270
270
|
m: []
|
|
271
|
-
}),
|
|
271
|
+
}), f(Tn, this).delete(t);
|
|
272
272
|
}
|
|
273
273
|
unskip_effect(t, n = (r) => this.schedule(r)) {
|
|
274
|
-
var r =
|
|
274
|
+
var r = f(Ve, this).get(t);
|
|
275
275
|
if (r) {
|
|
276
|
-
|
|
276
|
+
f(Ve, this).delete(t);
|
|
277
277
|
for (var i of r.d)
|
|
278
278
|
H(i, he), n(i);
|
|
279
279
|
for (i of r.m)
|
|
280
280
|
H(i, bt), n(i);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
f(Tn, this).add(t);
|
|
283
283
|
}
|
|
284
284
|
capture(t, n, r = !1) {
|
|
285
285
|
t.v !== j && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [n, r]), X?.set(t, n)), this.is_fork || (t.v = n);
|
|
@@ -298,58 +298,58 @@ var nl = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
discard() {
|
|
301
|
-
for (const t of
|
|
302
|
-
|
|
301
|
+
for (const t of f(fn, this)) t(this);
|
|
302
|
+
f(fn, this).clear(), A(B, this, zn).call(this), f(qt, this)?.resolve();
|
|
303
303
|
}
|
|
304
304
|
register_created_effect(t) {
|
|
305
|
-
|
|
305
|
+
f(kr, this).push(t);
|
|
306
306
|
}
|
|
307
307
|
increment(t, n) {
|
|
308
|
-
if (w(kt, this,
|
|
309
|
-
let r =
|
|
310
|
-
|
|
308
|
+
if (w(kt, this, f(kt, this) + 1), t) {
|
|
309
|
+
let r = f(Qe, this).get(n) ?? 0;
|
|
310
|
+
f(Qe, this).set(n, r + 1);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
decrement(t, n) {
|
|
314
|
-
if (w(kt, this,
|
|
315
|
-
let r =
|
|
316
|
-
r === 1 ?
|
|
314
|
+
if (w(kt, this, f(kt, this) - 1), t) {
|
|
315
|
+
let r = f(Qe, this).get(n) ?? 0;
|
|
316
|
+
r === 1 ? f(Qe, this).delete(n) : f(Qe, this).set(n, r - 1);
|
|
317
317
|
}
|
|
318
|
-
|
|
318
|
+
f(Vt, this) || (w(Vt, this, !0), ht(() => {
|
|
319
319
|
w(Vt, this, !1), this.linked && this.flush();
|
|
320
320
|
}));
|
|
321
321
|
}
|
|
322
322
|
transfer_effects(t, n) {
|
|
323
|
-
for (const r of t)
|
|
324
|
-
for (const r of n)
|
|
323
|
+
for (const r of t) f(ft, this).add(r);
|
|
324
|
+
for (const r of n) f($e, this).add(r);
|
|
325
325
|
t.clear(), n.clear();
|
|
326
326
|
}
|
|
327
327
|
oncommit(t) {
|
|
328
|
-
|
|
328
|
+
f(Nn, this).add(t);
|
|
329
329
|
}
|
|
330
330
|
ondiscard(t) {
|
|
331
|
-
|
|
331
|
+
f(fn, this).add(t);
|
|
332
332
|
}
|
|
333
333
|
settled() {
|
|
334
|
-
return (
|
|
334
|
+
return (f(qt, this) ?? w(qt, this, _o())).promise;
|
|
335
335
|
}
|
|
336
336
|
static ensure() {
|
|
337
337
|
if (C === null) {
|
|
338
338
|
const t = C = new Lo();
|
|
339
339
|
!ir && !Jt && ht(() => {
|
|
340
|
-
|
|
340
|
+
f(Pn, t) || t.flush();
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
return C;
|
|
344
344
|
}
|
|
345
345
|
apply() {
|
|
346
|
-
if (!Re || !this.is_fork &&
|
|
346
|
+
if (!Re || !this.is_fork && f(ot, this) === null && f(et, this) === null) {
|
|
347
347
|
X = null;
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
350
|
X = /* @__PURE__ */ new Map();
|
|
351
351
|
for (const [n, [r]] of this.current) X.set(n, r);
|
|
352
|
-
for (let n = Rn; n !== null; n =
|
|
352
|
+
for (let n = Rn; n !== null; n = f(et, n))
|
|
353
353
|
if (!(n === this || n.is_fork)) {
|
|
354
354
|
var t = !1;
|
|
355
355
|
if (n.id < this.id) {
|
|
@@ -371,22 +371,22 @@ var nl = 1, Pn = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap
|
|
|
371
371
|
for (var n = t; n.parent !== null; ) {
|
|
372
372
|
n = n.parent;
|
|
373
373
|
var r = n.f;
|
|
374
|
-
if (Ot !== null && n === x && (Re || (M === null || (M.f & 2) === 0) && !
|
|
374
|
+
if (Ot !== null && n === x && (Re || (M === null || (M.f & 2) === 0) && !tl))
|
|
375
375
|
return;
|
|
376
376
|
if ((r & 96) !== 0) {
|
|
377
377
|
if ((r & 1024) === 0) return;
|
|
378
378
|
n.f ^= ce;
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
f(se, this).push(n);
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
$o = yt;
|
|
385
385
|
function Mi() {
|
|
386
386
|
if (this.is_fork) return !0;
|
|
387
|
-
for (const n of
|
|
387
|
+
for (const n of f(Qe, this).keys()) {
|
|
388
388
|
for (var e = n, t = !1; e.parent !== null; ) {
|
|
389
|
-
if (
|
|
389
|
+
if (f(Ve, this).has(e)) {
|
|
390
390
|
t = !0;
|
|
391
391
|
break;
|
|
392
392
|
}
|
|
@@ -397,12 +397,12 @@ function Mi() {
|
|
|
397
397
|
return !1;
|
|
398
398
|
}
|
|
399
399
|
function Wn() {
|
|
400
|
-
w(Pn, this, !0), Ro++ > 1e3 && (A(B, this, zn).call(this),
|
|
401
|
-
for (const a of
|
|
402
|
-
|
|
403
|
-
for (const a of
|
|
400
|
+
w(Pn, this, !0), Ro++ > 1e3 && (A(B, this, zn).call(this), al());
|
|
401
|
+
for (const a of f(ft, this))
|
|
402
|
+
f($e, this).delete(a), H(a, he), this.schedule(a);
|
|
403
|
+
for (const a of f($e, this))
|
|
404
404
|
H(a, bt), this.schedule(a);
|
|
405
|
-
const e =
|
|
405
|
+
const e = f(se, this);
|
|
406
406
|
w(se, this, []), this.apply();
|
|
407
407
|
var t = Ot = [], n = [], r = Ln = [];
|
|
408
408
|
for (const a of e) try {
|
|
@@ -416,22 +416,22 @@ function Wn() {
|
|
|
416
416
|
}
|
|
417
417
|
if (Ot = null, Ln = null, A(B, this, Mi).call(this)) {
|
|
418
418
|
A(B, this, Ut).call(this, n), A(B, this, Ut).call(this, t);
|
|
419
|
-
for (const [a, l] of
|
|
419
|
+
for (const [a, l] of f(Ve, this)) Wo(a, l);
|
|
420
420
|
r.length > 0 && A(B, C, Wn).call(C);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const o = A(B, this,
|
|
423
|
+
const o = A(B, this, il).call(this);
|
|
424
424
|
if (o) {
|
|
425
|
-
A(B, this, Ut).call(this, n), A(B, this, Ut).call(this, t), A(B, o,
|
|
425
|
+
A(B, this, Ut).call(this, n), A(B, this, Ut).call(this, t), A(B, o, ol).call(o, this);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
|
-
|
|
429
|
-
for (const a of
|
|
430
|
-
|
|
428
|
+
f(ft, this).clear(), f($e, this).clear();
|
|
429
|
+
for (const a of f(Nn, this)) a(this);
|
|
430
|
+
f(Nn, this).clear(), Sr = this, Oi(n), Oi(t), Sr = null, f(qt, this)?.resolve();
|
|
431
431
|
var s = C;
|
|
432
|
-
if (
|
|
432
|
+
if (f(kt, this) === 0 && (f(se, this).length === 0 || s !== null) && (A(B, this, zn).call(this), Re && (A(B, this, sl).call(this), C = s)), f(se, this).length > 0) if (s !== null) {
|
|
433
433
|
const a = s;
|
|
434
|
-
|
|
434
|
+
f(se, a).push(...f(se, this).filter((l) => !f(se, a).includes(l)));
|
|
435
435
|
} else s = this;
|
|
436
436
|
s !== null && A(B, s, Wn).call(s);
|
|
437
437
|
}
|
|
@@ -439,8 +439,8 @@ function Po(e, t, n) {
|
|
|
439
439
|
e.f ^= ce;
|
|
440
440
|
for (var r = e.first; r !== null; ) {
|
|
441
441
|
var i = r.f, o = (i & 96) !== 0;
|
|
442
|
-
if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 ||
|
|
443
|
-
o ? r.f ^= ce : (i & 4) !== 0 ? t.push(r) : Re && (i & 16777224) !== 0 ? n.push(r) : on(r) && ((i & 16) !== 0 &&
|
|
442
|
+
if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 || f(Ve, this).has(r)) && r.fn !== null) {
|
|
443
|
+
o ? r.f ^= ce : (i & 4) !== 0 ? t.push(r) : Re && (i & 16777224) !== 0 ? n.push(r) : on(r) && ((i & 16) !== 0 && f($e, this).add(r), $t(r));
|
|
444
444
|
var s = r.first;
|
|
445
445
|
if (s !== null) {
|
|
446
446
|
r = s;
|
|
@@ -457,23 +457,23 @@ function Po(e, t, n) {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
for (var e =
|
|
460
|
+
function il() {
|
|
461
|
+
for (var e = f(ot, this); e !== null; ) {
|
|
462
462
|
if (!e.is_fork) {
|
|
463
463
|
for (const [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
|
|
464
464
|
}
|
|
465
|
-
e =
|
|
465
|
+
e = f(ot, e);
|
|
466
466
|
}
|
|
467
467
|
return null;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ol(e) {
|
|
470
470
|
for (const [n, r] of e.current)
|
|
471
471
|
!this.previous.has(n) && e.previous.has(n) && this.previous.set(n, e.previous.get(n)), this.current.set(n, r);
|
|
472
472
|
for (const [n, r] of e.async_deriveds) {
|
|
473
473
|
const i = this.async_deriveds.get(n);
|
|
474
474
|
i && r.promise.then(i.resolve).catch(i.reject);
|
|
475
475
|
}
|
|
476
|
-
this.transfer_effects(
|
|
476
|
+
this.transfer_effects(f(ft, e), f($e, e));
|
|
477
477
|
const t = (n) => {
|
|
478
478
|
var r = n.reactions;
|
|
479
479
|
if (r !== null)
|
|
@@ -482,7 +482,7 @@ function il(e) {
|
|
|
482
482
|
if ((i & 2) !== 0) t(s);
|
|
483
483
|
else {
|
|
484
484
|
var o = s;
|
|
485
|
-
i & 4194320 && !this.async_deriveds.has(o) && (
|
|
485
|
+
i & 4194320 && !this.async_deriveds.has(o) && (f($e, this).delete(o), H(o, he), this.schedule(o));
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
};
|
|
@@ -490,29 +490,29 @@ function il(e) {
|
|
|
490
490
|
this.oncommit(() => e.discard()), A(B, e, zn).call(e), C = this, A(B, this, Wn).call(this);
|
|
491
491
|
}
|
|
492
492
|
function Ut(e) {
|
|
493
|
-
for (var t = 0; t < e.length; t += 1) Oo(e[t],
|
|
493
|
+
for (var t = 0; t < e.length; t += 1) Oo(e[t], f(ft, this), f($e, this));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
for (let c = Rn; c !== null; c =
|
|
495
|
+
function sl() {
|
|
496
|
+
for (let c = Rn; c !== null; c = f(et, c)) {
|
|
497
497
|
var e = c.id < this.id, t = [];
|
|
498
|
-
for (const [u, [d,
|
|
498
|
+
for (const [u, [d, h]] of this.current) {
|
|
499
499
|
if (c.current.has(u)) {
|
|
500
500
|
var n = c.current.get(u)[0];
|
|
501
|
-
if (e && d !== n) c.current.set(u, [d,
|
|
501
|
+
if (e && d !== n) c.current.set(u, [d, h]);
|
|
502
502
|
else continue;
|
|
503
503
|
}
|
|
504
504
|
t.push(u);
|
|
505
505
|
}
|
|
506
506
|
if (e) for (const [u, d] of this.async_deriveds) {
|
|
507
|
-
const
|
|
508
|
-
|
|
507
|
+
const h = c.async_deriveds.get(u);
|
|
508
|
+
h && d.promise.then(h.resolve).catch(h.reject);
|
|
509
509
|
}
|
|
510
|
-
if (
|
|
510
|
+
if (f(Pn, c)) {
|
|
511
511
|
var r = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
|
|
512
512
|
if (r.length === 0)
|
|
513
513
|
e && c.discard();
|
|
514
514
|
else if (t.length > 0) {
|
|
515
|
-
if (e) for (const u of
|
|
515
|
+
if (e) for (const u of f(Tn, this)) c.unskip_effect(u, (d) => {
|
|
516
516
|
(d.f & 4194320) !== 0 ? c.schedule(d) : A(B, c, Ut).call(c, [d]);
|
|
517
517
|
});
|
|
518
518
|
c.activate();
|
|
@@ -520,14 +520,14 @@ function ol() {
|
|
|
520
520
|
for (var s of t) No(s, r, i, o);
|
|
521
521
|
o = /* @__PURE__ */ new Map();
|
|
522
522
|
var a = [...c.current].filter(([u, d]) => {
|
|
523
|
-
const
|
|
524
|
-
return
|
|
523
|
+
const h = this.current.get(u);
|
|
524
|
+
return h ? h[0] !== d[0] || h[1] !== d[1] : !0;
|
|
525
525
|
}).map(([u]) => u);
|
|
526
526
|
if (a.length > 0)
|
|
527
|
-
for (const u of
|
|
528
|
-
if (
|
|
527
|
+
for (const u of f(kr, this)) (u.f & 155648) === 0 && Jr(u, a, o) && ((u.f & 4194320) !== 0 ? (H(u, he), c.schedule(u)) : f(ft, c).add(u));
|
|
528
|
+
if (f(se, c).length > 0 && !f(Vt, c)) {
|
|
529
529
|
c.apply();
|
|
530
|
-
for (var l of
|
|
530
|
+
for (var l of f(se, c)) A(B, c, Po).call(c, l, [], []);
|
|
531
531
|
w(se, c, []);
|
|
532
532
|
}
|
|
533
533
|
c.deactivate();
|
|
@@ -537,7 +537,7 @@ function ol() {
|
|
|
537
537
|
}
|
|
538
538
|
function zn() {
|
|
539
539
|
if (this.linked) {
|
|
540
|
-
var e =
|
|
540
|
+
var e = f(ot, this), t = f(et, this);
|
|
541
541
|
e === null ? Rn = t : w(et, e, t), t === null ? wt = e : w(ot, t, e), this.linked = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
@@ -547,21 +547,21 @@ function Sn(e) {
|
|
|
547
547
|
try {
|
|
548
548
|
var n;
|
|
549
549
|
for (e && (C !== null && !C.is_fork && C.flush(), n = e()); ; ) {
|
|
550
|
-
if (
|
|
550
|
+
if (Za(), C === null) return n;
|
|
551
551
|
C.flush();
|
|
552
552
|
}
|
|
553
553
|
} finally {
|
|
554
554
|
Jt = t;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function al() {
|
|
558
558
|
if (0) {
|
|
559
559
|
var e;
|
|
560
560
|
for (const n of C.current.keys()) for (const [r, i] of n.updated ?? [])
|
|
561
561
|
var t;
|
|
562
562
|
}
|
|
563
563
|
try {
|
|
564
|
-
|
|
564
|
+
Da();
|
|
565
565
|
} catch (n) {
|
|
566
566
|
Ue(n, wr);
|
|
567
567
|
}
|
|
@@ -623,7 +623,7 @@ function zo(e) {
|
|
|
623
623
|
for (var t = e.first; t !== null; )
|
|
624
624
|
zo(t), t = t.next;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function ll(e) {
|
|
627
627
|
let t = 0, n = pt(0), r;
|
|
628
628
|
return () => {
|
|
629
629
|
ii() && (_(n), oi(() => (t === 0 && (r = ci(() => e(() => Qt(n)))), t += 1, () => {
|
|
@@ -633,72 +633,72 @@ function al(e) {
|
|
|
633
633
|
})));
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
638
|
-
new
|
|
636
|
+
var cl = Kr | Lt;
|
|
637
|
+
function ul(e, t, n, r) {
|
|
638
|
+
new dl(e, t, n, r);
|
|
639
639
|
}
|
|
640
|
-
var be = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(),
|
|
640
|
+
var be = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), dl = class {
|
|
641
641
|
constructor(e, t, n, r) {
|
|
642
|
-
Xr(this, G), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), E(this, be, void 0), E(this, Er, L ? R : null), E(this, we, void 0), E(this, Zt, void 0), E(this, ae, void 0), E(this, ke, null), E(this, re, null), E(this, ve, null), E(this, st, null), E(this, Et, 0), E(this, at, 0), E(this, pn, !1), E(this, xr, /* @__PURE__ */ new Set()), E(this, Ar, /* @__PURE__ */ new Set()), E(this, Xe, null), E(this, Ii,
|
|
642
|
+
Xr(this, G), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), E(this, be, void 0), E(this, Er, L ? R : null), E(this, we, void 0), E(this, Zt, void 0), E(this, ae, void 0), E(this, ke, null), E(this, re, null), E(this, ve, null), E(this, st, null), E(this, Et, 0), E(this, at, 0), E(this, pn, !1), E(this, xr, /* @__PURE__ */ new Set()), E(this, Ar, /* @__PURE__ */ new Set()), E(this, Xe, null), E(this, Ii, ll(() => (w(Xe, this, pt(f(Et, this))), () => {
|
|
643
643
|
w(Xe, this, null);
|
|
644
644
|
}))), w(be, this, e), w(we, this, t), w(Zt, this, (i) => {
|
|
645
645
|
var o = x;
|
|
646
646
|
o.b = this, o.f |= 128, n(i);
|
|
647
647
|
}), this.parent = x.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), w(ae, this, si(() => {
|
|
648
648
|
if (L) {
|
|
649
|
-
const i =
|
|
649
|
+
const i = f(Er, this);
|
|
650
650
|
Yn();
|
|
651
651
|
const o = i.data === "[!";
|
|
652
652
|
if (i.data.startsWith("[?")) {
|
|
653
653
|
const s = JSON.parse(i.data.slice(2));
|
|
654
|
-
A(G, this,
|
|
655
|
-
} else o ? A(G, this,
|
|
654
|
+
A(G, this, fl).call(this, s);
|
|
655
|
+
} else o ? A(G, this, pl).call(this) : A(G, this, hl).call(this);
|
|
656
656
|
} else A(G, this, Ho).call(this);
|
|
657
|
-
},
|
|
657
|
+
}, cl)), L && w(be, this, R);
|
|
658
658
|
}
|
|
659
659
|
defer_effect(e) {
|
|
660
|
-
Oo(e,
|
|
660
|
+
Oo(e, f(xr, this), f(Ar, this));
|
|
661
661
|
}
|
|
662
662
|
is_rendered() {
|
|
663
663
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
664
664
|
}
|
|
665
665
|
has_pending_snippet() {
|
|
666
|
-
return !!
|
|
666
|
+
return !!f(we, this).pending;
|
|
667
667
|
}
|
|
668
668
|
update_pending_count(e, t) {
|
|
669
|
-
A(G, this, Bo).call(this, e, t), w(Et, this,
|
|
670
|
-
w(pn, this, !1),
|
|
669
|
+
A(G, this, Bo).call(this, e, t), w(Et, this, f(Et, this) + e), !(!f(Xe, this) || f(pn, this)) && (w(pn, this, !0), ht(() => {
|
|
670
|
+
w(pn, this, !1), f(Xe, this) && It(f(Xe, this), f(Et, this));
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
get_effect_pending() {
|
|
674
|
-
return
|
|
674
|
+
return f(Ii, this).call(this), _(f(Xe, this));
|
|
675
675
|
}
|
|
676
676
|
error(e) {
|
|
677
|
-
if (!
|
|
678
|
-
C?.is_fork ? (
|
|
677
|
+
if (!f(we, this).onerror && !f(we, this).failed) throw e;
|
|
678
|
+
C?.is_fork ? (f(ke, this) && C.skip_effect(f(ke, this)), f(re, this) && C.skip_effect(f(re, this)), f(ve, this) && C.skip_effect(f(ve, this)), C.oncommit(() => {
|
|
679
679
|
A(G, this, $i).call(this, e);
|
|
680
680
|
})) : A(G, this, $i).call(this, e);
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
|
-
function
|
|
683
|
+
function hl() {
|
|
684
684
|
try {
|
|
685
|
-
w(ke, this, ue(() =>
|
|
685
|
+
w(ke, this, ue(() => f(Zt, this).call(this, f(be, this))));
|
|
686
686
|
} catch (e) {
|
|
687
687
|
this.error(e);
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
const t =
|
|
690
|
+
function fl(e) {
|
|
691
|
+
const t = f(we, this).failed;
|
|
692
692
|
t && w(ve, this, ue(() => {
|
|
693
|
-
t(
|
|
693
|
+
t(f(be, this), () => e, () => () => {
|
|
694
694
|
});
|
|
695
695
|
}));
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
const e =
|
|
699
|
-
e && (this.is_pending = !0, w(re, this, ue(() => e(
|
|
697
|
+
function pl() {
|
|
698
|
+
const e = f(we, this).pending;
|
|
699
|
+
e && (this.is_pending = !0, w(re, this, ue(() => e(f(be, this)))), ht(() => {
|
|
700
700
|
var t = w(st, this, document.createDocumentFragment()), n = ye();
|
|
701
|
-
t.append(n), w(ke, this, A(G, this, Cr).call(this, () => ue(() =>
|
|
701
|
+
t.append(n), w(ke, this, A(G, this, Cr).call(this, () => ue(() => f(Zt, this).call(this, n)))), f(at, this) === 0 && (f(be, this).before(t), w(st, this, null), _t(f(re, this), () => {
|
|
702
702
|
w(re, this, null);
|
|
703
703
|
}), A(G, this, Zr).call(this, C));
|
|
704
704
|
}));
|
|
@@ -706,23 +706,23 @@ function fl() {
|
|
|
706
706
|
function Ho() {
|
|
707
707
|
try {
|
|
708
708
|
if (this.is_pending = this.has_pending_snippet(), w(at, this, 0), w(Et, this, 0), w(ke, this, ue(() => {
|
|
709
|
-
|
|
710
|
-
})),
|
|
709
|
+
f(Zt, this).call(this, f(be, this));
|
|
710
|
+
})), f(at, this) > 0) {
|
|
711
711
|
var e = w(st, this, document.createDocumentFragment());
|
|
712
|
-
li(
|
|
713
|
-
const t =
|
|
714
|
-
w(re, this, ue(() => t(
|
|
712
|
+
li(f(ke, this), e);
|
|
713
|
+
const t = f(we, this).pending;
|
|
714
|
+
w(re, this, ue(() => t(f(be, this))));
|
|
715
715
|
} else A(G, this, Zr).call(this, C);
|
|
716
716
|
} catch (t) {
|
|
717
717
|
this.error(t);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
function Zr(e) {
|
|
721
|
-
this.is_pending = !1, e.transfer_effects(
|
|
721
|
+
this.is_pending = !1, e.transfer_effects(f(xr, this), f(Ar, this));
|
|
722
722
|
}
|
|
723
723
|
function Cr(e) {
|
|
724
724
|
var t = x, n = M, r = F;
|
|
725
|
-
Ee(
|
|
725
|
+
Ee(f(ae, this)), de(f(ae, this)), Mt(f(ae, this).ctx);
|
|
726
726
|
try {
|
|
727
727
|
return yt.ensure(), e();
|
|
728
728
|
} catch (i) {
|
|
@@ -739,21 +739,21 @@ function Bo(e, t) {
|
|
|
739
739
|
}
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
|
-
w(at, this,
|
|
742
|
+
w(at, this, f(at, this) + e), f(at, this) === 0 && (A(G, this, Zr).call(this, t), f(re, this) && _t(f(re, this), () => {
|
|
743
743
|
w(re, this, null);
|
|
744
|
-
}),
|
|
744
|
+
}), f(st, this) && (f(be, this).before(f(st, this)), w(st, this, null)));
|
|
745
745
|
}
|
|
746
746
|
function $i(e) {
|
|
747
|
-
|
|
748
|
-
var t =
|
|
749
|
-
let n =
|
|
747
|
+
f(ke, this) && (J(f(ke, this)), w(ke, this, null)), f(re, this) && (J(f(re, this)), w(re, this, null)), f(ve, this) && (J(f(ve, this)), w(ve, this, null)), L && (Z(f(Er, this)), Xa(), Z($n()));
|
|
748
|
+
var t = f(we, this).onerror;
|
|
749
|
+
let n = f(we, this).failed;
|
|
750
750
|
var r = !1, i = !1;
|
|
751
751
|
const o = () => {
|
|
752
752
|
if (r) {
|
|
753
|
-
|
|
753
|
+
Ya();
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
r = !0, i &&
|
|
756
|
+
r = !0, i && Ga(), f(ve, this) !== null && _t(f(ve, this), () => {
|
|
757
757
|
w(ve, this, null);
|
|
758
758
|
}), A(G, this, Cr).call(this, () => {
|
|
759
759
|
A(G, this, Ho).call(this);
|
|
@@ -762,16 +762,16 @@ function $i(e) {
|
|
|
762
762
|
try {
|
|
763
763
|
i = !0, t?.(a, o), i = !1;
|
|
764
764
|
} catch (l) {
|
|
765
|
-
Ue(l,
|
|
765
|
+
Ue(l, f(ae, this) && f(ae, this).parent);
|
|
766
766
|
}
|
|
767
767
|
n && w(ve, this, A(G, this, Cr).call(this, () => {
|
|
768
768
|
try {
|
|
769
769
|
return ue(() => {
|
|
770
770
|
var l = x;
|
|
771
|
-
l.b = this, l.f |= 128, n(
|
|
771
|
+
l.b = this, l.f |= 128, n(f(be, this), () => a, () => o);
|
|
772
772
|
});
|
|
773
773
|
} catch (l) {
|
|
774
|
-
return Ue(l,
|
|
774
|
+
return Ue(l, f(ae, this).parent), null;
|
|
775
775
|
}
|
|
776
776
|
}));
|
|
777
777
|
};
|
|
@@ -780,25 +780,25 @@ function $i(e) {
|
|
|
780
780
|
try {
|
|
781
781
|
a = this.transform_error(e);
|
|
782
782
|
} catch (l) {
|
|
783
|
-
Ue(l,
|
|
783
|
+
Ue(l, f(ae, this) && f(ae, this).parent);
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => Ue(l,
|
|
786
|
+
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => Ue(l, f(ae, this) && f(ae, this).parent)) : s(a);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function gl(e, t, n, r) {
|
|
790
790
|
const i = rn() ? en : ei;
|
|
791
|
-
var o = e.filter((
|
|
791
|
+
var o = e.filter((h) => !h.settled);
|
|
792
792
|
if (n.length === 0 && o.length === 0) {
|
|
793
793
|
r(t.map(i));
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
var s = x, a =
|
|
797
|
-
function c(
|
|
796
|
+
var s = x, a = vl(), l = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((h) => h.promise)) : null;
|
|
797
|
+
function c(h) {
|
|
798
798
|
if ((s.f & 16384) === 0) {
|
|
799
799
|
a();
|
|
800
800
|
try {
|
|
801
|
-
r(
|
|
801
|
+
r(h);
|
|
802
802
|
} catch (p) {
|
|
803
803
|
Ue(p, s);
|
|
804
804
|
}
|
|
@@ -811,13 +811,13 @@ function pl(e, t, n, r) {
|
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
813
|
function d() {
|
|
814
|
-
Promise.all(n.map((
|
|
814
|
+
Promise.all(n.map((h) => /* @__PURE__ */ ml(h))).then((h) => c([...t.map(i), ...h])).catch((h) => Ue(h, s)).finally(u);
|
|
815
815
|
}
|
|
816
816
|
l ? l.then(() => {
|
|
817
817
|
a(), d(), Hn();
|
|
818
818
|
}) : d();
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function vl() {
|
|
821
821
|
var e = x, t = M, n = F, r = C;
|
|
822
822
|
if (0) var i;
|
|
823
823
|
return function(s = !0) {
|
|
@@ -853,11 +853,11 @@ function en(e) {
|
|
|
853
853
|
}
|
|
854
854
|
var gn = /* @__PURE__ */ Symbol("obsolete");
|
|
855
855
|
// @__NO_SIDE_EFFECTS__
|
|
856
|
-
function
|
|
856
|
+
function ml(e, t, n) {
|
|
857
857
|
let r = x;
|
|
858
|
-
r === null &&
|
|
858
|
+
r === null && Na();
|
|
859
859
|
var i = void 0, o = pt(j), s = !M, a = /* @__PURE__ */ new Set();
|
|
860
|
-
return
|
|
860
|
+
return Ml(() => {
|
|
861
861
|
var l = x, c = _o();
|
|
862
862
|
i = c.promise;
|
|
863
863
|
try {
|
|
@@ -874,11 +874,11 @@ function vl(e, t, n) {
|
|
|
874
874
|
else for (const p of a.values()) p.reject(gn);
|
|
875
875
|
a.add(c), u.async_deriveds.set(l, c);
|
|
876
876
|
}
|
|
877
|
-
const
|
|
877
|
+
const h = (p, v = void 0) => {
|
|
878
878
|
d?.(), a.delete(c), v !== gn && (u.activate(), v ? (o.f |= In, It(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= In), It(o, p)), u.deactivate());
|
|
879
879
|
};
|
|
880
|
-
c.promise.then(
|
|
881
|
-
}),
|
|
880
|
+
c.promise.then(h, (p) => h(null, p || "unknown"));
|
|
881
|
+
}), xl(() => {
|
|
882
882
|
for (const l of a) l.reject(gn);
|
|
883
883
|
}), new Promise((l) => {
|
|
884
884
|
function c(u) {
|
|
@@ -900,7 +900,7 @@ function ei(e) {
|
|
|
900
900
|
const t = /* @__PURE__ */ en(e);
|
|
901
901
|
return t.equals = ko, t;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function bl(e) {
|
|
904
904
|
var t = e.effects;
|
|
905
905
|
if (t !== null) {
|
|
906
906
|
e.effects = null;
|
|
@@ -910,10 +910,10 @@ function ml(e) {
|
|
|
910
910
|
function ti(e) {
|
|
911
911
|
var t, n = x, r = e.parent;
|
|
912
912
|
if (!Le && r !== null && e.v !== j && (r.f & 24576) !== 0)
|
|
913
|
-
return
|
|
913
|
+
return Ka(), e.v;
|
|
914
914
|
Ee(r);
|
|
915
915
|
try {
|
|
916
|
-
e.f &= ~nn,
|
|
916
|
+
e.f &= ~nn, bl(e), t = cs(e);
|
|
917
917
|
} finally {
|
|
918
918
|
Ee(n);
|
|
919
919
|
}
|
|
@@ -927,9 +927,9 @@ function Fo(e) {
|
|
|
927
927
|
}
|
|
928
928
|
Le || (X !== null ? (ii() || C?.is_fork) && X.set(e, t) : Yr(e));
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function yl(e) {
|
|
931
931
|
if (e.effects !== null)
|
|
932
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Gn), t.fn !== null && (t.teardown =
|
|
932
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Gn), t.fn !== null && (t.teardown = Aa), t.ac = null, tn(t, 0), ai(t));
|
|
933
933
|
}
|
|
934
934
|
function jo(e) {
|
|
935
935
|
if (e.effects !== null)
|
|
@@ -963,7 +963,7 @@ function Vo(e, t = !1, n = !0) {
|
|
|
963
963
|
return r;
|
|
964
964
|
}
|
|
965
965
|
function I(e, t, n = !1) {
|
|
966
|
-
M !== null && (!me || (M.f & 131072) !== 0) && rn() && (M.f & 4325394) !== 0 && (_e === null || !_e.has(e)) &&
|
|
966
|
+
M !== null && (!me || (M.f & 131072) !== 0) && rn() && (M.f & 4325394) !== 0 && (_e === null || !_e.has(e)) && Ua();
|
|
967
967
|
let r = n ? tt(t) : t;
|
|
968
968
|
return It(e, r, Ln);
|
|
969
969
|
}
|
|
@@ -975,11 +975,11 @@ function It(e, t, n = null) {
|
|
|
975
975
|
const i = e;
|
|
976
976
|
(e.f & 2048) !== 0 && ti(i), X === null && Yr(i);
|
|
977
977
|
}
|
|
978
|
-
e.wv = as(), Uo(e, he, n), rn() && x !== null && (x.f & 1024) !== 0 && (x.f & 96) === 0 && (oe === null ?
|
|
978
|
+
e.wv = as(), Uo(e, he, n), rn() && x !== null && (x.f & 1024) !== 0 && (x.f & 96) === 0 && (oe === null ? Rl([e]) : oe.push(e)), !r.is_fork && Bn.size > 0 && !qo && _l();
|
|
979
979
|
}
|
|
980
980
|
return t;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function _l() {
|
|
983
983
|
qo = !1;
|
|
984
984
|
for (const e of Bn) {
|
|
985
985
|
(e.f & 1024) !== 0 && H(e, bt);
|
|
@@ -1014,17 +1014,17 @@ function Uo(e, t, n) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1017
|
+
var Tl = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
1018
1018
|
function tt(e) {
|
|
1019
1019
|
if (typeof e != "object" || e === null || Xt in e) return e;
|
|
1020
1020
|
const t = yo(e);
|
|
1021
|
-
if (t !==
|
|
1021
|
+
if (t !== Ea && t !== xa) return e;
|
|
1022
1022
|
var n = /* @__PURE__ */ new Map(), r = bo(e), i = /* @__PURE__ */ V(0), o = null, s = ct, a = (d) => {
|
|
1023
1023
|
if (ct === s) return d();
|
|
1024
|
-
var
|
|
1024
|
+
var h = M, p = ct;
|
|
1025
1025
|
de(null), Ni(s);
|
|
1026
1026
|
var v = d();
|
|
1027
|
-
return de(
|
|
1027
|
+
return de(h), Ni(p), v;
|
|
1028
1028
|
};
|
|
1029
1029
|
r && n.set("length", /* @__PURE__ */ V(e.length, o));
|
|
1030
1030
|
var l = "";
|
|
@@ -1032,49 +1032,49 @@ function tt(e) {
|
|
|
1032
1032
|
function u(d) {
|
|
1033
1033
|
if (!c) {
|
|
1034
1034
|
c = !0, l = d, Ci(i, `${l} version`);
|
|
1035
|
-
for (const [
|
|
1035
|
+
for (const [h, p] of n) Ci(p, Sl(l, h));
|
|
1036
1036
|
c = !1;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
return new Proxy(e, {
|
|
1040
|
-
defineProperty(d,
|
|
1041
|
-
(!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) &&
|
|
1042
|
-
var v = n.get(
|
|
1040
|
+
defineProperty(d, h, p) {
|
|
1041
|
+
(!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) && qa();
|
|
1042
|
+
var v = n.get(h);
|
|
1043
1043
|
return v === void 0 ? a(() => {
|
|
1044
1044
|
var b = /* @__PURE__ */ V(p.value, o);
|
|
1045
|
-
return n.set(
|
|
1045
|
+
return n.set(h, b), b;
|
|
1046
1046
|
}) : I(v, p.value, !0), !0;
|
|
1047
1047
|
},
|
|
1048
|
-
deleteProperty(d,
|
|
1049
|
-
var p = n.get(
|
|
1048
|
+
deleteProperty(d, h) {
|
|
1049
|
+
var p = n.get(h);
|
|
1050
1050
|
if (p === void 0) {
|
|
1051
|
-
if (
|
|
1051
|
+
if (h in d) {
|
|
1052
1052
|
const v = a(() => /* @__PURE__ */ V(j, o));
|
|
1053
|
-
n.set(
|
|
1053
|
+
n.set(h, v), Qt(i);
|
|
1054
1054
|
}
|
|
1055
1055
|
} else
|
|
1056
1056
|
I(p, j), Qt(i);
|
|
1057
1057
|
return !0;
|
|
1058
1058
|
},
|
|
1059
|
-
get(d,
|
|
1060
|
-
if (
|
|
1061
|
-
var v = n.get(
|
|
1062
|
-
if (v === void 0 && (!b || it(d,
|
|
1063
|
-
var y = /* @__PURE__ */ V(tt(b ? d[
|
|
1059
|
+
get(d, h, p) {
|
|
1060
|
+
if (h === Xt) return e;
|
|
1061
|
+
var v = n.get(h), b = h in d;
|
|
1062
|
+
if (v === void 0 && (!b || it(d, h)?.writable) && (v = a(() => {
|
|
1063
|
+
var y = /* @__PURE__ */ V(tt(b ? d[h] : j), o);
|
|
1064
1064
|
return y;
|
|
1065
|
-
}), n.set(
|
|
1065
|
+
}), n.set(h, v)), v !== void 0) {
|
|
1066
1066
|
var g = _(v);
|
|
1067
1067
|
return g === j ? void 0 : g;
|
|
1068
1068
|
}
|
|
1069
|
-
return Reflect.get(d,
|
|
1069
|
+
return Reflect.get(d, h, p);
|
|
1070
1070
|
},
|
|
1071
|
-
getOwnPropertyDescriptor(d,
|
|
1072
|
-
var p = Reflect.getOwnPropertyDescriptor(d,
|
|
1071
|
+
getOwnPropertyDescriptor(d, h) {
|
|
1072
|
+
var p = Reflect.getOwnPropertyDescriptor(d, h);
|
|
1073
1073
|
if (p && "value" in p) {
|
|
1074
|
-
var v = n.get(
|
|
1074
|
+
var v = n.get(h);
|
|
1075
1075
|
v && (p.value = _(v));
|
|
1076
1076
|
} else if (p === void 0) {
|
|
1077
|
-
var b = n.get(
|
|
1077
|
+
var b = n.get(h), g = b?.v;
|
|
1078
1078
|
if (b !== void 0 && g !== j) return {
|
|
1079
1079
|
enumerable: !0,
|
|
1080
1080
|
configurable: !0,
|
|
@@ -1084,31 +1084,31 @@ function tt(e) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
return p;
|
|
1086
1086
|
},
|
|
1087
|
-
has(d,
|
|
1088
|
-
if (
|
|
1089
|
-
var p = n.get(
|
|
1090
|
-
return (p !== void 0 || x !== null && (!v || it(d,
|
|
1091
|
-
var b = /* @__PURE__ */ V(v ? tt(d[
|
|
1087
|
+
has(d, h) {
|
|
1088
|
+
if (h === Xt) return !0;
|
|
1089
|
+
var p = n.get(h), v = p !== void 0 && p.v !== j || Reflect.has(d, h);
|
|
1090
|
+
return (p !== void 0 || x !== null && (!v || it(d, h)?.writable)) && (p === void 0 && (p = a(() => {
|
|
1091
|
+
var b = /* @__PURE__ */ V(v ? tt(d[h]) : j, o);
|
|
1092
1092
|
return b;
|
|
1093
|
-
}), n.set(
|
|
1093
|
+
}), n.set(h, p)), _(p) === j) ? !1 : v;
|
|
1094
1094
|
},
|
|
1095
|
-
set(d,
|
|
1096
|
-
var b = n.get(
|
|
1097
|
-
if (r &&
|
|
1095
|
+
set(d, h, p, v) {
|
|
1096
|
+
var b = n.get(h), g = h in d;
|
|
1097
|
+
if (r && h === "length") for (var y = p; y < b.v; y += 1) {
|
|
1098
1098
|
var O = n.get(y + "");
|
|
1099
1099
|
O !== void 0 ? I(O, j) : y in d && (O = a(() => /* @__PURE__ */ V(j, o)), n.set(y + "", O));
|
|
1100
1100
|
}
|
|
1101
1101
|
if (b === void 0)
|
|
1102
|
-
(!g || it(d,
|
|
1102
|
+
(!g || it(d, h)?.writable) && (b = a(() => /* @__PURE__ */ V(void 0, o)), I(b, tt(p)), n.set(h, b));
|
|
1103
1103
|
else {
|
|
1104
1104
|
g = b.v !== j;
|
|
1105
1105
|
var N = a(() => tt(p));
|
|
1106
1106
|
I(b, N);
|
|
1107
1107
|
}
|
|
1108
|
-
var S = Reflect.getOwnPropertyDescriptor(d,
|
|
1108
|
+
var S = Reflect.getOwnPropertyDescriptor(d, h);
|
|
1109
1109
|
if (S?.set && S.set.call(v, p), !g) {
|
|
1110
|
-
if (r && typeof
|
|
1111
|
-
var z = n.get("length"), W = Number(
|
|
1110
|
+
if (r && typeof h == "string") {
|
|
1111
|
+
var z = n.get("length"), W = Number(h);
|
|
1112
1112
|
Number.isInteger(W) && W >= z.v && I(z, W + 1);
|
|
1113
1113
|
}
|
|
1114
1114
|
Qt(i);
|
|
@@ -1117,27 +1117,27 @@ function tt(e) {
|
|
|
1117
1117
|
},
|
|
1118
1118
|
ownKeys(d) {
|
|
1119
1119
|
_(i);
|
|
1120
|
-
var
|
|
1120
|
+
var h = Reflect.ownKeys(d).filter((b) => {
|
|
1121
1121
|
var g = n.get(b);
|
|
1122
1122
|
return g === void 0 || g.v !== j;
|
|
1123
1123
|
});
|
|
1124
|
-
for (var [p, v] of n) v.v !== j && !(p in d) &&
|
|
1125
|
-
return
|
|
1124
|
+
for (var [p, v] of n) v.v !== j && !(p in d) && h.push(p);
|
|
1125
|
+
return h;
|
|
1126
1126
|
},
|
|
1127
1127
|
setPrototypeOf() {
|
|
1128
|
-
|
|
1128
|
+
Va();
|
|
1129
1129
|
}
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` :
|
|
1132
|
+
function Sl(e, t) {
|
|
1133
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Tl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1134
1134
|
}
|
|
1135
|
-
var Ri,
|
|
1135
|
+
var Ri, wl, Go, Ko, Yo;
|
|
1136
1136
|
function Mr() {
|
|
1137
1137
|
if (Ri === void 0) {
|
|
1138
|
-
Ri = window,
|
|
1138
|
+
Ri = window, wl = document, Go = /Firefox/.test(navigator.userAgent);
|
|
1139
1139
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1140
|
-
Ko = it(t, "firstChild").get, Yo = it(t, "nextSibling").get, Ei(e) && (e[
|
|
1140
|
+
Ko = it(t, "firstChild").get, Yo = it(t, "nextSibling").get, Ei(e) && (e[La] = void 0, e[_r] = null, e[Tr] = void 0, e.__e = void 0), Ei(n) && (n[_n] = void 0);
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
function ye(e = "") {
|
|
@@ -1213,10 +1213,10 @@ function Qo(e) {
|
|
|
1213
1213
|
de(t), Ee(n);
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
x === null && (M === null &&
|
|
1216
|
+
function kl(e) {
|
|
1217
|
+
x === null && (M === null && Ba(e), Ha()), Le && za(e);
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function El(e, t) {
|
|
1220
1220
|
var n = t.last;
|
|
1221
1221
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1222
1222
|
}
|
|
@@ -1250,7 +1250,7 @@ function Ae(e, t) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
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 |= Kr));
|
|
1252
1252
|
}
|
|
1253
|
-
if (i !== null && (i.parent = n, n !== null &&
|
|
1253
|
+
if (i !== null && (i.parent = n, n !== null && El(i, n), M !== null && (M.f & 2) !== 0 && (e & 64) === 0)) {
|
|
1254
1254
|
var o = M;
|
|
1255
1255
|
(o.effects ?? (o.effects = [])).push(i);
|
|
1256
1256
|
}
|
|
@@ -1259,12 +1259,12 @@ function Ae(e, t) {
|
|
|
1259
1259
|
function ii() {
|
|
1260
1260
|
return M !== null && !me;
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function xl(e) {
|
|
1263
1263
|
const t = Ae(8, null);
|
|
1264
1264
|
return H(t, ce), t.teardown = e, t;
|
|
1265
1265
|
}
|
|
1266
1266
|
function Li(e) {
|
|
1267
|
-
|
|
1267
|
+
kl("$effect");
|
|
1268
1268
|
var t = x.f;
|
|
1269
1269
|
if (!M && (t & 32) !== 0 && F !== null && !F.i) {
|
|
1270
1270
|
var n = F;
|
|
@@ -1272,16 +1272,16 @@ function Li(e) {
|
|
|
1272
1272
|
} else return Zo(e);
|
|
1273
1273
|
}
|
|
1274
1274
|
function Zo(e) {
|
|
1275
|
-
return Ae(4 |
|
|
1275
|
+
return Ae(4 | Oa, e);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function Al(e) {
|
|
1278
1278
|
yt.ensure();
|
|
1279
1279
|
const t = Ae(64 | Lt, e);
|
|
1280
1280
|
return () => {
|
|
1281
1281
|
J(t);
|
|
1282
1282
|
};
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function Cl(e) {
|
|
1285
1285
|
yt.ensure();
|
|
1286
1286
|
const t = Ae(64 | Lt, e);
|
|
1287
1287
|
return (n = {}) => new Promise((r) => {
|
|
@@ -1293,14 +1293,14 @@ function Al(e) {
|
|
|
1293
1293
|
function es(e) {
|
|
1294
1294
|
return Ae(4, e);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return Ae(
|
|
1296
|
+
function Ml(e) {
|
|
1297
|
+
return Ae(Ia | Lt, e);
|
|
1298
1298
|
}
|
|
1299
1299
|
function oi(e, t = 0) {
|
|
1300
1300
|
return Ae(8 | t, e);
|
|
1301
1301
|
}
|
|
1302
1302
|
function mn(e, t = [], n = [], r = []) {
|
|
1303
|
-
|
|
1303
|
+
gl(r, t, n, (i) => {
|
|
1304
1304
|
Ae(8, () => e(...i.map(_)));
|
|
1305
1305
|
});
|
|
1306
1306
|
}
|
|
@@ -1334,7 +1334,7 @@ function ai(e, t = !1) {
|
|
|
1334
1334
|
(n.f & 64) !== 0 ? n.parent = null : J(n, t), n = r;
|
|
1335
1335
|
}
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Ol(e) {
|
|
1338
1338
|
for (var t = e.first; t !== null; ) {
|
|
1339
1339
|
var n = t.next;
|
|
1340
1340
|
(t.f & 32) === 0 && J(t), t = n;
|
|
@@ -1342,14 +1342,14 @@ function Ml(e) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
function J(e, t = !0) {
|
|
1344
1344
|
var n = !1;
|
|
1345
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (
|
|
1345
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Il(e.nodes.start, e.nodes.end), n = !0), H(e, xi), ai(e, t && !n), tn(e, 0);
|
|
1346
1346
|
var r = e.nodes && e.nodes.t;
|
|
1347
1347
|
if (r !== null) for (const o of r) o.stop();
|
|
1348
|
-
ts(e), e.f ^= xi, e.f |=
|
|
1348
|
+
ts(e), e.f ^= xi, e.f |= Ma;
|
|
1349
1349
|
var i = e.parent;
|
|
1350
1350
|
i !== null && i.first !== null && ns(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1352
|
+
function Il(e, t) {
|
|
1353
1353
|
for (; e !== null; ) {
|
|
1354
1354
|
var n = e === t ? null : /* @__PURE__ */ xe(e);
|
|
1355
1355
|
e.remove(), e = n;
|
|
@@ -1408,7 +1408,7 @@ function li(e, t) {
|
|
|
1408
1408
|
t.append(n), n = i;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
var
|
|
1411
|
+
var $l = null, wn = !1, Le = !1;
|
|
1412
1412
|
function Pi(e) {
|
|
1413
1413
|
Le = e;
|
|
1414
1414
|
}
|
|
@@ -1425,7 +1425,7 @@ function os(e) {
|
|
|
1425
1425
|
M !== null && (!Re || (M.f & 2) !== 0) && (_e ?? (_e = /* @__PURE__ */ new Set())).add(e);
|
|
1426
1426
|
}
|
|
1427
1427
|
var Q = null, ne = 0, oe = null;
|
|
1428
|
-
function
|
|
1428
|
+
function Rl(e) {
|
|
1429
1429
|
oe = e;
|
|
1430
1430
|
}
|
|
1431
1431
|
var ss = 1, nt = 0, ct = nt;
|
|
@@ -1464,18 +1464,18 @@ function cs(e) {
|
|
|
1464
1464
|
e.f |= Ai;
|
|
1465
1465
|
var u = e.fn, d = u();
|
|
1466
1466
|
e.f |= Gr;
|
|
1467
|
-
var
|
|
1467
|
+
var h = e.deps, p = C?.is_fork;
|
|
1468
1468
|
if (Q !== null) {
|
|
1469
1469
|
var v;
|
|
1470
|
-
if (p || tn(e, ne),
|
|
1471
|
-
for (
|
|
1472
|
-
else e.deps =
|
|
1473
|
-
if (ii() && (e.f & 512) !== 0) for (v = ne; v <
|
|
1470
|
+
if (p || tn(e, ne), h !== null && ne > 0)
|
|
1471
|
+
for (h.length = ne + Q.length, v = 0; v < Q.length; v++) h[ne + v] = Q[v];
|
|
1472
|
+
else e.deps = h = Q;
|
|
1473
|
+
if (ii() && (e.f & 512) !== 0) for (v = ne; v < h.length; v++) {
|
|
1474
1474
|
var b;
|
|
1475
|
-
((b =
|
|
1475
|
+
((b = h[v]).reactions ?? (b.reactions = [])).push(e);
|
|
1476
1476
|
}
|
|
1477
|
-
} else !p &&
|
|
1478
|
-
if (rn() && oe !== null && !me &&
|
|
1477
|
+
} else !p && h !== null && ne < h.length && (tn(e, ne), h.length = ne);
|
|
1478
|
+
if (rn() && oe !== null && !me && h !== null && (e.f & 6146) === 0) for (v = 0; v < oe.length; v++) ls(oe[v], e);
|
|
1479
1479
|
if (i !== null && i !== e) {
|
|
1480
1480
|
if (nt++, i.deps !== null) for (let g = 0; g < n; g += 1) i.deps[g].rv = nt;
|
|
1481
1481
|
if (t !== null) for (const g of t) g.rv = nt;
|
|
@@ -1488,10 +1488,10 @@ function cs(e) {
|
|
|
1488
1488
|
e.f ^= Ai, Q = t, ne = n, oe = r, M = i, _e = o, Mt(s), me = a, ct = l;
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function Ll(e, t) {
|
|
1492
1492
|
let n = t.reactions;
|
|
1493
1493
|
if (n !== null) {
|
|
1494
|
-
var r =
|
|
1494
|
+
var r = wa.call(n, e);
|
|
1495
1495
|
if (r !== -1) {
|
|
1496
1496
|
var i = n.length - 1;
|
|
1497
1497
|
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
@@ -1499,13 +1499,13 @@ function Rl(e, t) {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
if (n === null && (t.f & 2) !== 0 && (Q === null || !Cn.call(Q, t))) {
|
|
1501
1501
|
var o = t;
|
|
1502
|
-
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~nn), o.v !== j && Yr(o),
|
|
1502
|
+
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~nn), o.v !== j && Yr(o), yl(o), tn(o, 0);
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
function tn(e, t) {
|
|
1506
1506
|
var n = e.deps;
|
|
1507
1507
|
if (n !== null)
|
|
1508
|
-
for (var r = t; r < n.length; r++)
|
|
1508
|
+
for (var r = t; r < n.length; r++) Ll(e, n[r]);
|
|
1509
1509
|
}
|
|
1510
1510
|
function $t(e) {
|
|
1511
1511
|
var t = e.f;
|
|
@@ -1515,7 +1515,7 @@ function $t(e) {
|
|
|
1515
1515
|
if (x = e, wn = !0, 0)
|
|
1516
1516
|
var i, o;
|
|
1517
1517
|
try {
|
|
1518
|
-
(t & 16777232) !== 0 ?
|
|
1518
|
+
(t & 16777232) !== 0 ? Ol(e) : ai(e), ts(e);
|
|
1519
1519
|
var s = cs(e);
|
|
1520
1520
|
if (e.teardown = typeof s == "function" ? s : null, e.wv = ss, 0)
|
|
1521
1521
|
for (var a of e.deps) ;
|
|
@@ -1526,7 +1526,7 @@ function $t(e) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
function _(e) {
|
|
1528
1528
|
var t = (e.f & 2) !== 0;
|
|
1529
|
-
if (
|
|
1529
|
+
if ($l?.add(e), M !== null && !me && !(x !== null && (x.f & 16384) !== 0) && (_e === null || !_e.has(e))) {
|
|
1530
1530
|
var n = M.deps;
|
|
1531
1531
|
if ((M.f & 2097152) !== 0)
|
|
1532
1532
|
e.rv < nt && (e.rv = nt, Q === null && n !== null && n[ne] === e ? ne++ : Q === null ? Q = [e] : Q.push(e));
|
|
@@ -1583,7 +1583,7 @@ var At = /* @__PURE__ */ Symbol("events"), hs = /* @__PURE__ */ new Set(), Or =
|
|
|
1583
1583
|
function Ht(e, t, n) {
|
|
1584
1584
|
(t[At] ?? (t[At] = {}))[e] = n;
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Pl(e) {
|
|
1587
1587
|
for (var t = 0; t < e.length; t++) hs.add(e[t]);
|
|
1588
1588
|
for (var n of Or) n(e);
|
|
1589
1589
|
}
|
|
@@ -1612,34 +1612,34 @@ function zi(e) {
|
|
|
1612
1612
|
var u = M, d = x;
|
|
1613
1613
|
de(null), Ee(null);
|
|
1614
1614
|
try {
|
|
1615
|
-
for (var
|
|
1615
|
+
for (var h, p = []; o !== null && o !== t; ) {
|
|
1616
1616
|
try {
|
|
1617
1617
|
var v = o[At]?.[r];
|
|
1618
1618
|
v != null && (!o.disabled || e.target === o) && v.call(o, e);
|
|
1619
1619
|
} catch (b) {
|
|
1620
|
-
|
|
1620
|
+
h ? p.push(b) : h = b;
|
|
1621
1621
|
}
|
|
1622
1622
|
if (e.cancelBubble) break;
|
|
1623
1623
|
s++, o = s < i.length ? i[s] : null;
|
|
1624
1624
|
}
|
|
1625
|
-
if (
|
|
1625
|
+
if (h) {
|
|
1626
1626
|
for (let b of p) queueMicrotask(() => {
|
|
1627
1627
|
throw b;
|
|
1628
1628
|
});
|
|
1629
|
-
throw
|
|
1629
|
+
throw h;
|
|
1630
1630
|
}
|
|
1631
1631
|
} finally {
|
|
1632
1632
|
e[At] = t, delete e.currentTarget, de(u), Ee(d);
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
|
-
var
|
|
1637
|
-
function Nl(e) {
|
|
1638
|
-
return Pl?.createHTML(e) ?? e;
|
|
1639
|
-
}
|
|
1636
|
+
var Nl = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1640
1637
|
function Wl(e) {
|
|
1638
|
+
return Nl?.createHTML(e) ?? e;
|
|
1639
|
+
}
|
|
1640
|
+
function zl(e) {
|
|
1641
1641
|
var t = ni("template");
|
|
1642
|
-
return t.innerHTML =
|
|
1642
|
+
return t.innerHTML = Wl(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1643
1643
|
}
|
|
1644
1644
|
function kn(e, t) {
|
|
1645
1645
|
var n = x;
|
|
@@ -1656,7 +1656,7 @@ function Tt(e, t) {
|
|
|
1656
1656
|
return () => {
|
|
1657
1657
|
if (L)
|
|
1658
1658
|
return kn(R, null), R;
|
|
1659
|
-
i === void 0 && (i =
|
|
1659
|
+
i === void 0 && (i = zl(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ gt(i)));
|
|
1660
1660
|
var s = r || Go ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1661
1661
|
if (n) {
|
|
1662
1662
|
var a = /* @__PURE__ */ gt(s), l = s.lastChild;
|
|
@@ -1673,7 +1673,7 @@ function qe(e, t) {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
e !== null && e.before(t);
|
|
1675
1675
|
}
|
|
1676
|
-
var
|
|
1676
|
+
var Hl = [
|
|
1677
1677
|
"allowfullscreen",
|
|
1678
1678
|
"async",
|
|
1679
1679
|
"autofocus",
|
|
@@ -1702,8 +1702,8 @@ var zl = [
|
|
|
1702
1702
|
"defer",
|
|
1703
1703
|
"disablepictureinpicture",
|
|
1704
1704
|
"disableremoteplayback"
|
|
1705
|
-
],
|
|
1706
|
-
...
|
|
1705
|
+
], Ih = [
|
|
1706
|
+
...Hl,
|
|
1707
1707
|
"formNoValidate",
|
|
1708
1708
|
"isMap",
|
|
1709
1709
|
"noModule",
|
|
@@ -1718,17 +1718,17 @@ var zl = [
|
|
|
1718
1718
|
"allowFullscreen",
|
|
1719
1719
|
"disablePictureInPicture",
|
|
1720
1720
|
"disableRemotePlayback"
|
|
1721
|
-
],
|
|
1722
|
-
function
|
|
1723
|
-
return
|
|
1721
|
+
], Bl = ["touchstart", "touchmove"];
|
|
1722
|
+
function Dl(e) {
|
|
1723
|
+
return Bl.includes(e);
|
|
1724
1724
|
}
|
|
1725
|
-
var
|
|
1725
|
+
var Fl = [
|
|
1726
1726
|
"$state",
|
|
1727
1727
|
"$state.raw",
|
|
1728
1728
|
"$derived",
|
|
1729
1729
|
"$derived.by"
|
|
1730
|
-
],
|
|
1731
|
-
...
|
|
1730
|
+
], $h = [
|
|
1731
|
+
...Fl,
|
|
1732
1732
|
"$state.eager",
|
|
1733
1733
|
"$state.snapshot",
|
|
1734
1734
|
"$props",
|
|
@@ -1751,7 +1751,7 @@ function Bi(e, t) {
|
|
|
1751
1751
|
function fs(e, t) {
|
|
1752
1752
|
return ps(e, t);
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function jl(e, t) {
|
|
1755
1755
|
Mr(), t.intro = t.intro ?? !1;
|
|
1756
1756
|
const n = t.target, r = L, i = R;
|
|
1757
1757
|
try {
|
|
@@ -1766,7 +1766,7 @@ function Fl(e, t) {
|
|
|
1766
1766
|
} catch (s) {
|
|
1767
1767
|
if (s instanceof Error && s.message.split(`
|
|
1768
1768
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1769
|
-
return s !== Ct && console.warn("Failed to hydrate: ", s), t.recover === !1 &&
|
|
1769
|
+
return s !== Ct && console.warn("Failed to hydrate: ", s), t.recover === !1 && Fa(), Mr(), Xo(n), Ie(!1), fs(e, t);
|
|
1770
1770
|
} finally {
|
|
1771
1771
|
Ie(r), Z(i);
|
|
1772
1772
|
}
|
|
@@ -1774,9 +1774,9 @@ function Fl(e, t) {
|
|
|
1774
1774
|
var bn = /* @__PURE__ */ new Map();
|
|
1775
1775
|
function ps(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1776
1776
|
Mr();
|
|
1777
|
-
var l = void 0, c =
|
|
1777
|
+
var l = void 0, c = Cl(() => {
|
|
1778
1778
|
var u = n ?? t.appendChild(ye());
|
|
1779
|
-
|
|
1779
|
+
ul(u, { pending: () => {
|
|
1780
1780
|
} }, (p) => {
|
|
1781
1781
|
Eo({});
|
|
1782
1782
|
var v = F;
|
|
@@ -1784,12 +1784,12 @@ function ps(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
|
|
|
1784
1784
|
throw Kn(), Ct;
|
|
1785
1785
|
xo();
|
|
1786
1786
|
}, a);
|
|
1787
|
-
var d = /* @__PURE__ */ new Set(),
|
|
1787
|
+
var d = /* @__PURE__ */ new Set(), h = (p) => {
|
|
1788
1788
|
for (var v = 0; v < p.length; v++) {
|
|
1789
1789
|
var b = p[v];
|
|
1790
1790
|
if (!d.has(b)) {
|
|
1791
1791
|
d.add(b);
|
|
1792
|
-
var g =
|
|
1792
|
+
var g = Dl(b);
|
|
1793
1793
|
for (const N of [t, document]) {
|
|
1794
1794
|
var y = bn.get(N);
|
|
1795
1795
|
y === void 0 && (y = /* @__PURE__ */ new Map(), bn.set(N, y));
|
|
@@ -1799,79 +1799,79 @@ function ps(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
|
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
return
|
|
1802
|
+
return h(Un(hs)), Or.add(h), () => {
|
|
1803
1803
|
for (var p of d) for (const g of [t, document]) {
|
|
1804
1804
|
var v = bn.get(g), b = v.get(p);
|
|
1805
1805
|
--b == 0 ? (g.removeEventListener(p, zi), v.delete(p), v.size === 0 && bn.delete(g)) : v.set(p, b);
|
|
1806
1806
|
}
|
|
1807
|
-
Or.delete(
|
|
1807
|
+
Or.delete(h), u !== n && u.parentNode?.removeChild(u);
|
|
1808
1808
|
};
|
|
1809
1809
|
});
|
|
1810
1810
|
return Ir.set(l, c), l;
|
|
1811
1811
|
}
|
|
1812
1812
|
var Ir = /* @__PURE__ */ new WeakMap();
|
|
1813
|
-
function
|
|
1813
|
+
function ql(e, t) {
|
|
1814
1814
|
const n = Ir.get(e);
|
|
1815
1815
|
return n ? (Ir.delete(e), n(t)) : Promise.resolve();
|
|
1816
1816
|
}
|
|
1817
|
-
var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(),
|
|
1817
|
+
var Oe = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), lr = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Vl = class {
|
|
1818
1818
|
constructor(e, t = !0) {
|
|
1819
1819
|
m(this, "anchor", void 0), E(this, Oe, /* @__PURE__ */ new Map()), E(this, Be, /* @__PURE__ */ new Map()), E(this, ge, /* @__PURE__ */ new Map()), E(this, Bt, /* @__PURE__ */ new Set()), E(this, ar, !0), E(this, lr, (n) => {
|
|
1820
|
-
if (
|
|
1821
|
-
var r =
|
|
1820
|
+
if (f(Oe, this).has(n)) {
|
|
1821
|
+
var r = f(Oe, this).get(n), i = f(Be, this).get(r);
|
|
1822
1822
|
if (i)
|
|
1823
|
-
Dn(i),
|
|
1823
|
+
Dn(i), f(Bt, this).delete(r);
|
|
1824
1824
|
else {
|
|
1825
|
-
var o =
|
|
1826
|
-
o && (Dn(o.effect),
|
|
1825
|
+
var o = f(ge, this).get(r);
|
|
1826
|
+
o && (Dn(o.effect), f(Be, this).set(r, o.effect), f(ge, this).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
1827
1827
|
}
|
|
1828
|
-
for (const [s, a] of
|
|
1829
|
-
if (
|
|
1830
|
-
const l =
|
|
1831
|
-
l && (J(l.effect),
|
|
1828
|
+
for (const [s, a] of f(Oe, this)) {
|
|
1829
|
+
if (f(Oe, this).delete(s), s === n) break;
|
|
1830
|
+
const l = f(ge, this).get(a);
|
|
1831
|
+
l && (J(l.effect), f(ge, this).delete(a));
|
|
1832
1832
|
}
|
|
1833
|
-
for (const [s, a] of
|
|
1834
|
-
if (s === r ||
|
|
1833
|
+
for (const [s, a] of f(Be, this)) {
|
|
1834
|
+
if (s === r || f(Bt, this).has(s)) continue;
|
|
1835
1835
|
const l = () => {
|
|
1836
|
-
if (Array.from(
|
|
1836
|
+
if (Array.from(f(Oe, this).values()).includes(s)) {
|
|
1837
1837
|
var c = document.createDocumentFragment();
|
|
1838
|
-
li(a, c), c.append(ye()),
|
|
1838
|
+
li(a, c), c.append(ye()), f(ge, this).set(s, {
|
|
1839
1839
|
effect: a,
|
|
1840
1840
|
fragment: c
|
|
1841
1841
|
});
|
|
1842
1842
|
} else J(a);
|
|
1843
|
-
|
|
1843
|
+
f(Bt, this).delete(s), f(Be, this).delete(s);
|
|
1844
1844
|
};
|
|
1845
|
-
|
|
1845
|
+
f(ar, this) || !i ? (f(Bt, this).add(s), _t(a, l, !1)) : l();
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
1848
|
}), E(this, Di, (n) => {
|
|
1849
|
-
|
|
1850
|
-
const r = Array.from(
|
|
1851
|
-
for (const [i, o] of
|
|
1849
|
+
f(Oe, this).delete(n);
|
|
1850
|
+
const r = Array.from(f(Oe, this).values());
|
|
1851
|
+
for (const [i, o] of f(ge, this)) r.includes(i) || (J(o.effect), f(ge, this).delete(i));
|
|
1852
1852
|
}), this.anchor = e, w(ar, this, t);
|
|
1853
1853
|
}
|
|
1854
1854
|
ensure(e, t) {
|
|
1855
1855
|
var n = C, r = Jo();
|
|
1856
|
-
if (t && !
|
|
1856
|
+
if (t && !f(Be, this).has(e) && !f(ge, this).has(e)) if (r) {
|
|
1857
1857
|
var i = document.createDocumentFragment(), o = ye();
|
|
1858
|
-
i.append(o),
|
|
1858
|
+
i.append(o), f(ge, this).set(e, {
|
|
1859
1859
|
effect: ue(() => t(o)),
|
|
1860
1860
|
fragment: i
|
|
1861
1861
|
});
|
|
1862
|
-
} else
|
|
1863
|
-
if (
|
|
1864
|
-
for (const [s, a] of
|
|
1865
|
-
for (const [s, a] of
|
|
1866
|
-
n.oncommit(
|
|
1862
|
+
} else f(Be, this).set(e, ue(() => t(this.anchor)));
|
|
1863
|
+
if (f(Oe, this).set(n, e), r) {
|
|
1864
|
+
for (const [s, a] of f(Be, this)) s === e ? n.unskip_effect(a) : n.skip_effect(a);
|
|
1865
|
+
for (const [s, a] of f(ge, this)) s === e ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
|
|
1866
|
+
n.oncommit(f(lr, this)), n.ondiscard(f(Di, this));
|
|
1867
1867
|
} else
|
|
1868
|
-
L && (this.anchor = R),
|
|
1868
|
+
L && (this.anchor = R), f(lr, this).call(this, n);
|
|
1869
1869
|
}
|
|
1870
1870
|
};
|
|
1871
1871
|
function Dt(e, t, n = !1) {
|
|
1872
1872
|
var r;
|
|
1873
1873
|
L && (r = R, Yn());
|
|
1874
|
-
var i = new
|
|
1874
|
+
var i = new Vl(e), o = n ? Kr : 0;
|
|
1875
1875
|
function s(a, l) {
|
|
1876
1876
|
if (L) {
|
|
1877
1877
|
var c = So(r);
|
|
@@ -1890,17 +1890,17 @@ function Dt(e, t, n = !1) {
|
|
|
1890
1890
|
}), a || s(-1, null);
|
|
1891
1891
|
}, o);
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function Ul(e, t) {
|
|
1894
1894
|
return t;
|
|
1895
1895
|
}
|
|
1896
|
-
function
|
|
1896
|
+
function Gl(e, t, n) {
|
|
1897
1897
|
for (var r = [], i = t.length, o, s = t.length, a = 0; a < i; a++) {
|
|
1898
1898
|
let d = t[a];
|
|
1899
1899
|
_t(d, () => {
|
|
1900
1900
|
if (o) {
|
|
1901
1901
|
if (o.pending.delete(d), o.done.add(d), o.pending.size === 0) {
|
|
1902
|
-
var
|
|
1903
|
-
$r(e, Un(o.done)),
|
|
1902
|
+
var h = e.outrogroups;
|
|
1903
|
+
$r(e, Un(o.done)), h.delete(o), h.size === 0 && (e.outrogroups = null);
|
|
1904
1904
|
}
|
|
1905
1905
|
} else s -= 1;
|
|
1906
1906
|
}, !1);
|
|
@@ -1930,7 +1930,7 @@ function $r(e, t, n = !0) {
|
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
1932
|
var yn;
|
|
1933
|
-
function
|
|
1933
|
+
function Kl(e, t, n, r, i, o = null) {
|
|
1934
1934
|
var s = e, a = /* @__PURE__ */ new Map();
|
|
1935
1935
|
if ((t & 4) !== 0) {
|
|
1936
1936
|
var l = e;
|
|
@@ -1940,9 +1940,9 @@ function Gl(e, t, n, r, i, o = null) {
|
|
|
1940
1940
|
var c = null, u = /* @__PURE__ */ ei(() => {
|
|
1941
1941
|
var y = n();
|
|
1942
1942
|
return bo(y) ? y : y == null ? [] : Un(y);
|
|
1943
|
-
}), d,
|
|
1943
|
+
}), d, h = /* @__PURE__ */ new Map(), p = !0;
|
|
1944
1944
|
function v(y) {
|
|
1945
|
-
(g.effect.f & 16384) === 0 && (g.pending.delete(y), g.fallback = c,
|
|
1945
|
+
(g.effect.f & 16384) === 0 && (g.pending.delete(y), g.fallback = c, Yl(g, d, s, t, r), c !== null && (d.length === 0 ? (c.f & 33554432) === 0 ? Dn(c) : (c.f ^= Yt, Gt(c, null, s)) : _t(c, () => {
|
|
1946
1946
|
c = null;
|
|
1947
1947
|
})));
|
|
1948
1948
|
}
|
|
@@ -1961,10 +1961,10 @@ function Gl(e, t, n, r, i, o = null) {
|
|
|
1961
1961
|
if (0)
|
|
1962
1962
|
var Ge;
|
|
1963
1963
|
var q = p ? null : a.get(ee);
|
|
1964
|
-
q ? (q.v && It(q.v, U), q.i && It(q.i, W), z && S.unskip_effect(q.e)) : (q =
|
|
1964
|
+
q ? (q.v && It(q.v, U), q.i && It(q.i, W), z && S.unskip_effect(q.e)) : (q = Xl(a, p ? s : yn ?? (yn = ye()), U, ee, W, i, t, n), p || (q.e.f |= Yt), a.set(ee, q)), N.add(ee);
|
|
1965
1965
|
}
|
|
1966
|
-
if (y === 0 && o && !c && (p ? c = ue(() => o(s)) : (c = ue(() => o(yn ?? (yn = ye()))), c.f |= Yt)), y > N.size &&
|
|
1967
|
-
if (
|
|
1966
|
+
if (y === 0 && o && !c && (p ? c = ue(() => o(s)) : (c = ue(() => o(yn ?? (yn = ye()))), c.f |= Yt)), y > N.size && Wa("", "", ""), L && y > 0 && Z($n()), !p)
|
|
1967
|
+
if (h.set(S, N), z) {
|
|
1968
1968
|
for (const [an, nr] of a) N.has(an) || S.skip_effect(nr.e);
|
|
1969
1969
|
S.oncommit(v), S.ondiscard(b);
|
|
1970
1970
|
} else v(S);
|
|
@@ -1972,7 +1972,7 @@ function Gl(e, t, n, r, i, o = null) {
|
|
|
1972
1972
|
}),
|
|
1973
1973
|
flags: t,
|
|
1974
1974
|
items: a,
|
|
1975
|
-
pending:
|
|
1975
|
+
pending: h,
|
|
1976
1976
|
outrogroups: null,
|
|
1977
1977
|
fallback: c
|
|
1978
1978
|
};
|
|
@@ -1982,8 +1982,8 @@ function Ft(e) {
|
|
|
1982
1982
|
for (; e !== null && (e.f & 32) === 0; ) e = e.next;
|
|
1983
1983
|
return e;
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1986
|
-
var o = (r & 8) !== 0, s = t.length, a = e.items, l = Ft(e.effect.first), c, u = null, d,
|
|
1985
|
+
function Yl(e, t, n, r, i) {
|
|
1986
|
+
var o = (r & 8) !== 0, s = t.length, a = e.items, l = Ft(e.effect.first), c, u = null, d, h = [], p = [], v, b, g, y;
|
|
1987
1987
|
if (o) for (y = 0; y < s; y += 1)
|
|
1988
1988
|
v = t[y], b = i(v, y), g = a.get(b).e, (g.f & 33554432) === 0 && (g.nodes?.a?.measure(), (d ?? (d = /* @__PURE__ */ new Set())).add(g));
|
|
1989
1989
|
for (y = 0; y < s; y += 1) {
|
|
@@ -1993,27 +1993,27 @@ function Kl(e, t, n, r, i) {
|
|
|
1993
1993
|
if (g.f ^= Yt, g === l) Gt(g, null, n);
|
|
1994
1994
|
else {
|
|
1995
1995
|
var O = u ? u.next : l;
|
|
1996
|
-
g === e.effect.last && (e.effect.last = g.prev), g.prev && (g.prev.next = g.next), g.next && (g.next.prev = g.prev), De(e, u, g), De(e, g, O), Gt(g, O, n), u = g,
|
|
1996
|
+
g === e.effect.last && (e.effect.last = g.prev), g.prev && (g.prev.next = g.next), g.next && (g.next.prev = g.prev), De(e, u, g), De(e, g, O), Gt(g, O, n), u = g, h = [], p = [], l = Ft(u.next);
|
|
1997
1997
|
continue;
|
|
1998
1998
|
}
|
|
1999
1999
|
if (g !== l) {
|
|
2000
2000
|
if (c !== void 0 && c.has(g)) {
|
|
2001
|
-
if (
|
|
2001
|
+
if (h.length < p.length) {
|
|
2002
2002
|
var N = p[0], S;
|
|
2003
2003
|
u = N.prev;
|
|
2004
|
-
var z =
|
|
2005
|
-
for (S = 0; S <
|
|
2004
|
+
var z = h[0], W = h[h.length - 1];
|
|
2005
|
+
for (S = 0; S < h.length; S += 1) Gt(h[S], N, n);
|
|
2006
2006
|
for (S = 0; S < p.length; S += 1) c.delete(p[S]);
|
|
2007
|
-
De(e, z.prev, W.next), De(e, u, z), De(e, W, N), l = N, u = W, y -= 1,
|
|
2007
|
+
De(e, z.prev, W.next), De(e, u, z), De(e, W, N), l = N, u = W, y -= 1, h = [], p = [];
|
|
2008
2008
|
} else
|
|
2009
2009
|
c.delete(g), Gt(g, l, n), De(e, g.prev, g.next), De(e, g, u === null ? e.effect.first : u.next), De(e, u, g), u = g;
|
|
2010
2010
|
continue;
|
|
2011
2011
|
}
|
|
2012
|
-
for (
|
|
2012
|
+
for (h = [], p = []; l !== null && l !== g; )
|
|
2013
2013
|
(c ?? (c = /* @__PURE__ */ new Set())).add(l), p.push(l), l = Ft(l.next);
|
|
2014
2014
|
if (l === null) continue;
|
|
2015
2015
|
}
|
|
2016
|
-
(g.f & 33554432) === 0 &&
|
|
2016
|
+
(g.f & 33554432) === 0 && h.push(g), u = g, l = Ft(g.next);
|
|
2017
2017
|
}
|
|
2018
2018
|
if (e.outrogroups !== null) {
|
|
2019
2019
|
for (const q of e.outrogroups) q.pending.size === 0 && ($r(e, Un(q.done)), e.outrogroups?.delete(q));
|
|
@@ -2032,7 +2032,7 @@ function Kl(e, t, n, r, i) {
|
|
|
2032
2032
|
for (y = 0; y < ee; y += 1) U[y].nodes?.a?.measure();
|
|
2033
2033
|
for (y = 0; y < ee; y += 1) U[y].nodes?.a?.fix();
|
|
2034
2034
|
}
|
|
2035
|
-
|
|
2035
|
+
Gl(e, U, Ge);
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
2038
|
o && ht(() => {
|
|
@@ -2040,7 +2040,7 @@ function Kl(e, t, n, r, i) {
|
|
|
2040
2040
|
for (g of d) g.nodes?.a?.apply();
|
|
2041
2041
|
});
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function Xl(e, t, n, r, i, o, s, a) {
|
|
2044
2044
|
var l = (s & 1) !== 0 ? (s & 16) === 0 ? /* @__PURE__ */ Vo(n, !1, !1) : pt(n) : null, c = (s & 2) !== 0 ? pt(i) : null;
|
|
2045
2045
|
return {
|
|
2046
2046
|
v: l,
|
|
@@ -2061,7 +2061,7 @@ function Gt(e, t, n) {
|
|
|
2061
2061
|
function De(e, t, n) {
|
|
2062
2062
|
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function Jl(e, t) {
|
|
2065
2065
|
es(() => {
|
|
2066
2066
|
var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
|
|
2067
2067
|
if (!r.querySelector("#" + t.hash)) {
|
|
@@ -2081,7 +2081,7 @@ function Fi(e, t = !1) {
|
|
|
2081
2081
|
function cr(e) {
|
|
2082
2082
|
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function Ql(e, t) {
|
|
2085
2085
|
if (t) {
|
|
2086
2086
|
var n = "", r, i;
|
|
2087
2087
|
if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
|
|
@@ -2091,14 +2091,14 @@ function Jl(e, t) {
|
|
|
2091
2091
|
var c = 0, u = -1;
|
|
2092
2092
|
const b = e.length;
|
|
2093
2093
|
for (var d = 0; d < b; d++) {
|
|
2094
|
-
var
|
|
2095
|
-
if (a ?
|
|
2096
|
-
if (
|
|
2097
|
-
else if (
|
|
2094
|
+
var h = e[d];
|
|
2095
|
+
if (a ? h === "/" && e[d - 1] === "*" && (a = !1) : o ? o === h && (o = !1) : h === "/" && e[d + 1] === "*" ? a = !0 : h === '"' || h === "'" ? o = h : h === "(" ? s++ : h === ")" && s--, !a && o === !1 && s === 0) {
|
|
2096
|
+
if (h === ":" && u === -1) u = d;
|
|
2097
|
+
else if (h === ";" || d === b - 1) {
|
|
2098
2098
|
if (u !== -1) {
|
|
2099
2099
|
var p = cr(e.substring(c, u).trim());
|
|
2100
2100
|
if (!l.includes(p)) {
|
|
2101
|
-
|
|
2101
|
+
h !== ";" && d++;
|
|
2102
2102
|
var v = e.substring(c, d).trim();
|
|
2103
2103
|
n += " " + v + ";";
|
|
2104
2104
|
}
|
|
@@ -2121,34 +2121,34 @@ function ur(e, t = {}, n, r) {
|
|
|
2121
2121
|
function ji(e, t, n, r) {
|
|
2122
2122
|
var i = e[Tr];
|
|
2123
2123
|
if (L || i !== t) {
|
|
2124
|
-
var o =
|
|
2124
|
+
var o = Ql(t, r);
|
|
2125
2125
|
(!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[Tr] = t;
|
|
2126
2126
|
} else r && (Array.isArray(r) ? (ur(e, n?.[0], r[0]), ur(e, n?.[1], r[1], "important")) : ur(e, n, r));
|
|
2127
2127
|
return r;
|
|
2128
2128
|
}
|
|
2129
|
-
var
|
|
2129
|
+
var Zl = /* @__PURE__ */ Symbol("is custom element"), ec = /* @__PURE__ */ Symbol("is html"), tc = Pa ? "link" : "LINK";
|
|
2130
2130
|
function qi(e, t, n, r) {
|
|
2131
|
-
var i =
|
|
2132
|
-
if (L && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName ===
|
|
2131
|
+
var i = nc(e);
|
|
2132
|
+
if (L && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === tc)) {
|
|
2133
2133
|
r || void 0;
|
|
2134
2134
|
return;
|
|
2135
2135
|
}
|
|
2136
|
-
i[t] !== (i[t] = n) && (t === "loading" && (e[
|
|
2136
|
+
i[t] !== (i[t] = n) && (t === "loading" && (e[$a] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && rc(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function nc(e) {
|
|
2139
2139
|
var t;
|
|
2140
2140
|
return (t = e)[_r] ?? (t[_r] = {
|
|
2141
|
-
[
|
|
2142
|
-
[
|
|
2141
|
+
[Zl]: e.nodeName.includes("-"),
|
|
2142
|
+
[ec]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
2145
|
var Vi = /* @__PURE__ */ new Map();
|
|
2146
|
-
function
|
|
2146
|
+
function rc(e) {
|
|
2147
2147
|
var t = e.getAttribute("is") || e.nodeName, n = Vi.get(t);
|
|
2148
2148
|
if (n) return n;
|
|
2149
2149
|
Vi.set(t, n = []);
|
|
2150
2150
|
for (var r, i = e, o = Element.prototype; o !== i; ) {
|
|
2151
|
-
r =
|
|
2151
|
+
r = ka(i);
|
|
2152
2152
|
for (var s in r) r[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && n.push(s);
|
|
2153
2153
|
i = yo(i);
|
|
2154
2154
|
}
|
|
@@ -2159,19 +2159,19 @@ var gs, xt = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(),
|
|
|
2159
2159
|
Xr(this, Ui), E(this, xt, /* @__PURE__ */ new WeakMap()), E(this, Fn, void 0), E(this, dr, void 0), w(dr, this, e);
|
|
2160
2160
|
}
|
|
2161
2161
|
observe(e, t) {
|
|
2162
|
-
var n =
|
|
2163
|
-
return n.add(t),
|
|
2164
|
-
var r =
|
|
2165
|
-
r.delete(t), r.size === 0 && (
|
|
2162
|
+
var n = f(xt, this).get(e) || /* @__PURE__ */ new Set();
|
|
2163
|
+
return n.add(t), f(xt, this).set(e, n), A(Ui, this, ic).call(this).observe(e, f(dr, this)), () => {
|
|
2164
|
+
var r = f(xt, this).get(e);
|
|
2165
|
+
r.delete(t), r.size === 0 && (f(xt, this).delete(e), f(Fn, this).unobserve(e));
|
|
2166
2166
|
};
|
|
2167
2167
|
}
|
|
2168
2168
|
};
|
|
2169
2169
|
gs = vs;
|
|
2170
|
-
function
|
|
2171
|
-
return
|
|
2170
|
+
function ic() {
|
|
2171
|
+
return f(Fn, this) ?? w(Fn, this, new ResizeObserver((e) => {
|
|
2172
2172
|
for (var t of e) {
|
|
2173
2173
|
gs.entries.set(t.target, t);
|
|
2174
|
-
for (var n of
|
|
2174
|
+
for (var n of f(xt, this).get(t.target) || []) n(t);
|
|
2175
2175
|
}
|
|
2176
2176
|
}));
|
|
2177
2177
|
}
|
|
@@ -2203,11 +2203,11 @@ function fr(e, t, n, r) {
|
|
|
2203
2203
|
var i = !Xn || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ en(r)), _(c)) : (l && (l = !1, a = s ? ci(r) : r), a);
|
|
2204
2204
|
let d;
|
|
2205
2205
|
if (o) {
|
|
2206
|
-
var
|
|
2207
|
-
d = it(e, t)?.set ?? (
|
|
2206
|
+
var h = Xt in e || To in e;
|
|
2207
|
+
d = it(e, t)?.set ?? (h && t in e ? (S) => e[t] = S : void 0);
|
|
2208
2208
|
}
|
|
2209
2209
|
var p, v = !1;
|
|
2210
|
-
o ? [p, v] =
|
|
2210
|
+
o ? [p, v] = nl(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), d && (i && ja(t), d(p)));
|
|
2211
2211
|
var b;
|
|
2212
2212
|
if (i ? b = () => {
|
|
2213
2213
|
var S = e[t];
|
|
@@ -2233,10 +2233,10 @@ function fr(e, t, n, r) {
|
|
|
2233
2233
|
return Le && y || (N.f & 16384) !== 0 ? O.v : _(O);
|
|
2234
2234
|
});
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2237
|
-
return new
|
|
2236
|
+
function oc(e) {
|
|
2237
|
+
return new sc(e);
|
|
2238
2238
|
}
|
|
2239
|
-
var Je = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(),
|
|
2239
|
+
var Je = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), sc = class {
|
|
2240
2240
|
constructor(e) {
|
|
2241
2241
|
E(this, Je, void 0), E(this, Te, void 0);
|
|
2242
2242
|
var t = /* @__PURE__ */ new Map(), n = (i, o) => {
|
|
@@ -2257,7 +2257,7 @@ var Je = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), oc =
|
|
|
2257
2257
|
return I(t.get(o) ?? n(o, s), s), Reflect.set(i, o, s);
|
|
2258
2258
|
}
|
|
2259
2259
|
});
|
|
2260
|
-
w(Te, this, (e.hydrate ?
|
|
2260
|
+
w(Te, this, (e.hydrate ? jl : fs)(e.component, {
|
|
2261
2261
|
target: e.target,
|
|
2262
2262
|
anchor: e.anchor,
|
|
2263
2263
|
props: r,
|
|
@@ -2266,34 +2266,34 @@ var Je = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), oc =
|
|
|
2266
2266
|
recover: e.recover,
|
|
2267
2267
|
transformError: e.transformError
|
|
2268
2268
|
})), !Re && (!e?.props?.$$host || e.sync === !1) && Sn(), w(Je, this, r.$$events);
|
|
2269
|
-
for (const i of Object.keys(
|
|
2269
|
+
for (const i of Object.keys(f(Te, this)))
|
|
2270
2270
|
i === "$set" || i === "$destroy" || i === "$on" || On(this, i, {
|
|
2271
2271
|
get() {
|
|
2272
|
-
return
|
|
2272
|
+
return f(Te, this)[i];
|
|
2273
2273
|
},
|
|
2274
2274
|
set(o) {
|
|
2275
|
-
|
|
2275
|
+
f(Te, this)[i] = o;
|
|
2276
2276
|
},
|
|
2277
2277
|
enumerable: !0
|
|
2278
2278
|
});
|
|
2279
|
-
|
|
2279
|
+
f(Te, this).$set = (i) => {
|
|
2280
2280
|
Object.assign(r, i);
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2281
|
+
}, f(Te, this).$destroy = () => {
|
|
2282
|
+
ql(f(Te, this));
|
|
2283
2283
|
};
|
|
2284
2284
|
}
|
|
2285
2285
|
$set(e) {
|
|
2286
|
-
|
|
2286
|
+
f(Te, this).$set(e);
|
|
2287
2287
|
}
|
|
2288
2288
|
$on(e, t) {
|
|
2289
|
-
|
|
2289
|
+
f(Je, this)[e] = f(Je, this)[e] || [];
|
|
2290
2290
|
const n = (...r) => t.call(this, ...r);
|
|
2291
|
-
return
|
|
2292
|
-
|
|
2291
|
+
return f(Je, this)[e].push(n), () => {
|
|
2292
|
+
f(Je, this)[e] = f(Je, this)[e].filter((r) => r !== n);
|
|
2293
2293
|
};
|
|
2294
2294
|
}
|
|
2295
2295
|
$destroy() {
|
|
2296
|
-
|
|
2296
|
+
f(Te, this).$destroy();
|
|
2297
2297
|
}
|
|
2298
2298
|
}, ms;
|
|
2299
2299
|
typeof HTMLElement == "function" && (ms = class extends HTMLElement {
|
|
@@ -2322,14 +2322,14 @@ typeof HTMLElement == "function" && (ms = class extends HTMLElement {
|
|
|
2322
2322
|
};
|
|
2323
2323
|
};
|
|
2324
2324
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2325
|
-
const t = {}, n =
|
|
2325
|
+
const t = {}, n = ac(this);
|
|
2326
2326
|
for (const r of this.$$s) r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
|
|
2327
2327
|
for (const r of this.attributes) {
|
|
2328
2328
|
const i = this.$$g_p(r.name);
|
|
2329
2329
|
i in this.$$d || (this.$$d[i] = En(i, r.value, this.$$p_d, "toProp"));
|
|
2330
2330
|
}
|
|
2331
2331
|
for (const r in this.$$p_d) !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2332
|
-
this.$$c =
|
|
2332
|
+
this.$$c = oc({
|
|
2333
2333
|
component: this.$$ctor,
|
|
2334
2334
|
target: this.$$shadowRoot || this,
|
|
2335
2335
|
props: {
|
|
@@ -2337,7 +2337,7 @@ typeof HTMLElement == "function" && (ms = class extends HTMLElement {
|
|
|
2337
2337
|
$$slots: t,
|
|
2338
2338
|
$$host: this
|
|
2339
2339
|
}
|
|
2340
|
-
}), this.$$me =
|
|
2340
|
+
}), this.$$me = Al(() => {
|
|
2341
2341
|
oi(() => {
|
|
2342
2342
|
this.$$r = !0;
|
|
2343
2343
|
for (const r of Mn(this.$$c)) {
|
|
@@ -2394,13 +2394,13 @@ function En(e, t, n, r) {
|
|
|
2394
2394
|
return t;
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function ac(e) {
|
|
2398
2398
|
const t = {};
|
|
2399
2399
|
return e.childNodes.forEach((n) => {
|
|
2400
2400
|
t[n.slot || "default"] = !0;
|
|
2401
2401
|
}), t;
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2403
|
+
function lc(e, t, n, r, i, o) {
|
|
2404
2404
|
let s = class extends ms {
|
|
2405
2405
|
constructor() {
|
|
2406
2406
|
super(e, n, i), this.$$p_d = t;
|
|
@@ -2426,14 +2426,14 @@ function ac(e, t, n, r, i, o) {
|
|
|
2426
2426
|
} });
|
|
2427
2427
|
}), o && (s = o(s)), e.element = s, s;
|
|
2428
2428
|
}
|
|
2429
|
-
var
|
|
2429
|
+
var cc = class extends Event {
|
|
2430
2430
|
constructor(e, t, n, r) {
|
|
2431
2431
|
super("context-request", {
|
|
2432
2432
|
bubbles: !0,
|
|
2433
2433
|
composed: !0
|
|
2434
2434
|
}), m(this, "context", void 0), m(this, "contextTarget", void 0), m(this, "callback", void 0), m(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = n, this.subscribe = r ?? !1;
|
|
2435
2435
|
}
|
|
2436
|
-
},
|
|
2436
|
+
}, uc = class {
|
|
2437
2437
|
constructor(e, t) {
|
|
2438
2438
|
m(this, "host", void 0), m(this, "context", void 0), m(this, "subscribe", void 0), m(this, "onValue", void 0), m(this, "isConnected", !1), m(this, "unsubscribe", void 0), m(this, "currentValue", void 0), m(this, "handleValue", (n, r) => {
|
|
2439
2439
|
r !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = r), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = n, this.onValue?.(n);
|
|
@@ -2449,12 +2449,12 @@ var lc = class extends Event {
|
|
|
2449
2449
|
return this.currentValue;
|
|
2450
2450
|
}
|
|
2451
2451
|
requestValue() {
|
|
2452
|
-
this.host.dispatchEvent(new
|
|
2452
|
+
this.host.dispatchEvent(new cc(this.context, this.host, this.handleValue, this.subscribe));
|
|
2453
2453
|
}
|
|
2454
|
-
}, Jn = (e) => e,
|
|
2454
|
+
}, Jn = (e) => e, Rh = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Lh = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), dc = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), hc = Jn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
2455
2455
|
function bs(e, t, n) {
|
|
2456
2456
|
let r = !1;
|
|
2457
|
-
const i = new
|
|
2457
|
+
const i = new uc(e, {
|
|
2458
2458
|
context: t,
|
|
2459
2459
|
subscribe: !0,
|
|
2460
2460
|
onValue: (c) => {
|
|
@@ -2478,13 +2478,13 @@ function bs(e, t, n) {
|
|
|
2478
2478
|
globalThis.clearInterval(l), e.removeEventListener("context-provider", o), i.disconnect();
|
|
2479
2479
|
};
|
|
2480
2480
|
}
|
|
2481
|
-
function hc(e, t) {
|
|
2482
|
-
return bs(e, uc, t);
|
|
2483
|
-
}
|
|
2484
2481
|
function fc(e, t) {
|
|
2485
2482
|
return bs(e, dc, t);
|
|
2486
2483
|
}
|
|
2487
|
-
|
|
2484
|
+
function pc(e, t) {
|
|
2485
|
+
return bs(e, hc, t);
|
|
2486
|
+
}
|
|
2487
|
+
var gc = class {
|
|
2488
2488
|
serialize(e, t) {
|
|
2489
2489
|
return {
|
|
2490
2490
|
startContainer: this.getNodePath(e.startContainer, t),
|
|
@@ -2559,7 +2559,7 @@ var le;
|
|
|
2559
2559
|
})(le || (le = {}));
|
|
2560
2560
|
var ys = class Rr {
|
|
2561
2561
|
constructor(t = {}) {
|
|
2562
|
-
if (m(this, "config", void 0), m(this, "ttsWordHighlight", null), m(this, "ttsSentenceHighlight", null), m(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), m(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), m(this, "annotations", /* @__PURE__ */ new Map()), m(this, "colorHighlights", /* @__PURE__ */ new Map()), m(this, "nextAnnotationId", 1), m(this, "supported", !1), m(this, "rangeSerializer", void 0), m(this, "themeObserver", null), m(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new
|
|
2562
|
+
if (m(this, "config", void 0), m(this, "ttsWordHighlight", null), m(this, "ttsSentenceHighlight", null), m(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), m(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), m(this, "annotations", /* @__PURE__ */ new Map()), m(this, "colorHighlights", /* @__PURE__ */ new Map()), m(this, "nextAnnotationId", 1), m(this, "supported", !1), m(this, "rangeSerializer", void 0), m(this, "themeObserver", null), m(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new gc(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2563
2563
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2564
2564
|
return;
|
|
2565
2565
|
}
|
|
@@ -2667,14 +2667,14 @@ var ys = class Rr {
|
|
|
2667
2667
|
0.56,
|
|
2668
2668
|
0.5
|
|
2669
2669
|
];
|
|
2670
|
-
let d = u[u.length - 1],
|
|
2670
|
+
let d = u[u.length - 1], h = -1 / 0;
|
|
2671
2671
|
for (const z of u) {
|
|
2672
2672
|
const W = this.blend(c, a, z), U = this.contrastRatio(W, a), ee = this.contrastRatio(W, l), Ge = U * 1.2 + ee * 0.8;
|
|
2673
2673
|
if (U >= 1.25 && ee >= 2.4) {
|
|
2674
2674
|
d = z;
|
|
2675
2675
|
break;
|
|
2676
2676
|
}
|
|
2677
|
-
Ge >
|
|
2677
|
+
Ge > h && (h = Ge, d = z);
|
|
2678
2678
|
}
|
|
2679
2679
|
const p = Math.max(0.24, Math.min(0.85, d * 0.55)), v = Math.max(0.55, Math.min(0.95, d + 0.2)), b = Math.max(0.22, Math.min(0.6, d * 0.45)), g = l, y = this.blend(g, a, v), O = this.contrastRatio(y, a), N = this.relativeLuminance(a) > 0.45 ? [
|
|
2680
2680
|
0,
|
|
@@ -2969,7 +2969,7 @@ function _s(e) {
|
|
|
2969
2969
|
console.debug(`[${e}]`, ...t);
|
|
2970
2970
|
};
|
|
2971
2971
|
}
|
|
2972
|
-
var
|
|
2972
|
+
var Ph = _s("I18nService"), pr = {
|
|
2973
2973
|
assessment: [],
|
|
2974
2974
|
section: [],
|
|
2975
2975
|
item: [],
|
|
@@ -2990,19 +2990,19 @@ function Fe(e, t) {
|
|
|
2990
2990
|
if (e.find((n) => typeof n != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
2991
2991
|
return e;
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2993
|
+
function vc(e) {
|
|
2994
2994
|
if (e != null) {
|
|
2995
2995
|
if (!ut(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
2996
2996
|
return e;
|
|
2997
2997
|
}
|
|
2998
2998
|
}
|
|
2999
|
-
function
|
|
2999
|
+
function mc(e) {
|
|
3000
3000
|
if (e != null) {
|
|
3001
3001
|
if (!ut(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
3002
3002
|
return e;
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3005
|
+
function bc(e, t) {
|
|
3006
3006
|
if (t == null) return;
|
|
3007
3007
|
if (!ut(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
|
|
3008
3008
|
const n = t, r = (i) => i === "polly" || i === "google" || i === "custom";
|
|
@@ -3011,11 +3011,11 @@ function mc(e, t) {
|
|
|
3011
3011
|
if ("provider" in n && n.provider !== void 0 && !ut(n.provider) && !(e === "textToSpeech" && r(n.provider))) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
|
|
3012
3012
|
return n;
|
|
3013
3013
|
}
|
|
3014
|
-
function
|
|
3014
|
+
function yc(e) {
|
|
3015
3015
|
if (e == null) return {};
|
|
3016
3016
|
if (!ut(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
3017
3017
|
const t = {};
|
|
3018
|
-
for (const [n, r] of Object.entries(e)) t[n] =
|
|
3018
|
+
for (const [n, r] of Object.entries(e)) t[n] = bc(n, r);
|
|
3019
3019
|
return t;
|
|
3020
3020
|
}
|
|
3021
3021
|
function Ts(e) {
|
|
@@ -3032,15 +3032,15 @@ function je(e) {
|
|
|
3032
3032
|
}
|
|
3033
3033
|
return Array.from(t);
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3035
|
+
function _c(e, t) {
|
|
3036
3036
|
if (e != null) {
|
|
3037
3037
|
if (e === "on" || e === "off") return e;
|
|
3038
3038
|
throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function Tc(e) {
|
|
3042
3042
|
if (e != null && !ut(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
3043
|
-
const t =
|
|
3043
|
+
const t = mc(e?.policy), n = vc(e?.placement), r = yc(e?.providers), i = _c(e?.pnpEnforcement, "pnpEnforcement"), o = {
|
|
3044
3044
|
policy: {
|
|
3045
3045
|
allowed: je(Fe(t?.allowed, "policy.allowed")),
|
|
3046
3046
|
blocked: je(Fe(t?.blocked, "policy.blocked"))
|
|
@@ -3054,7 +3054,7 @@ function _c(e) {
|
|
|
3054
3054
|
};
|
|
3055
3055
|
return i && (o.pnpEnforcement = i), o;
|
|
3056
3056
|
}
|
|
3057
|
-
var
|
|
3057
|
+
var Sc = [
|
|
3058
3058
|
"assessment",
|
|
3059
3059
|
"section",
|
|
3060
3060
|
"item",
|
|
@@ -3065,7 +3065,7 @@ var Tc = [
|
|
|
3065
3065
|
function xn(e, t) {
|
|
3066
3066
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
3067
3067
|
}
|
|
3068
|
-
var
|
|
3068
|
+
var wc = [
|
|
3069
3069
|
{
|
|
3070
3070
|
pattern: /<script\b/i,
|
|
3071
3071
|
reason: "contains a <script> tag"
|
|
@@ -3083,17 +3083,17 @@ var Sc = [
|
|
|
3083
3083
|
reason: "contains a <foreignObject> element"
|
|
3084
3084
|
}
|
|
3085
3085
|
];
|
|
3086
|
-
function
|
|
3086
|
+
function kc(e, t, n) {
|
|
3087
3087
|
const r = t.trimStart(), i = r.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(r);
|
|
3088
3088
|
if (/^data:/i.test(r)) throw new Error(`Invalid tool registration "${e}": "${n}" may not be a data: URL.`);
|
|
3089
3089
|
if (!(!i && !o)) {
|
|
3090
|
-
for (const { pattern: s, reason: a } of
|
|
3090
|
+
for (const { pattern: s, reason: a } of wc) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${n}" ${a}. Inline SVG icons must not include scriptable content.`);
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
3093
|
function Ki(e) {
|
|
3094
3094
|
if (xn(e.toolId, "toolId"), xn(e.name, "name"), xn(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.`);
|
|
3095
|
-
if (typeof e.icon == "string" &&
|
|
3096
|
-
const t = e.supportedLevels.find((n) => !
|
|
3095
|
+
if (typeof e.icon == "string" && kc(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.`);
|
|
3096
|
+
const t = e.supportedLevels.find((n) => !Sc.includes(n));
|
|
3097
3097
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
3098
3098
|
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)}".`);
|
|
3099
3099
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -3102,7 +3102,7 @@ function Ki(e) {
|
|
|
3102
3102
|
if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
|
|
3103
3103
|
if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3105
|
+
var Ec = class {
|
|
3106
3106
|
constructor() {
|
|
3107
3107
|
m(this, "tools", /* @__PURE__ */ new Map()), m(this, "pnpIndex", /* @__PURE__ */ new Map()), m(this, "componentOverrides", {}), m(this, "moduleLoaders", /* @__PURE__ */ new Map()), m(this, "loadedToolModules", /* @__PURE__ */ new Set()), m(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
3108
3108
|
}
|
|
@@ -3248,10 +3248,10 @@ var kc = class {
|
|
|
3248
3248
|
function Ss(e) {
|
|
3249
3249
|
return e.level === "item";
|
|
3250
3250
|
}
|
|
3251
|
-
function
|
|
3251
|
+
function xc(e) {
|
|
3252
3252
|
return e.level === "passage";
|
|
3253
3253
|
}
|
|
3254
|
-
function
|
|
3254
|
+
function Ac(e) {
|
|
3255
3255
|
return e.level === "rubric";
|
|
3256
3256
|
}
|
|
3257
3257
|
function ws(e) {
|
|
@@ -3292,7 +3292,7 @@ function ui(e) {
|
|
|
3292
3292
|
}
|
|
3293
3293
|
return r.filter(Boolean).join(" ").trim();
|
|
3294
3294
|
}
|
|
3295
|
-
if (
|
|
3295
|
+
if (xc(e)) {
|
|
3296
3296
|
const t = e.passage;
|
|
3297
3297
|
if (!t?.config) return "";
|
|
3298
3298
|
const n = t.config, r = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
@@ -3311,7 +3311,7 @@ function ui(e) {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
return r.filter(Boolean).join(" ").trim();
|
|
3313
3313
|
}
|
|
3314
|
-
if (
|
|
3314
|
+
if (Ac(e)) {
|
|
3315
3315
|
const t = e.rubricBlock;
|
|
3316
3316
|
return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3317
3317
|
}
|
|
@@ -3328,7 +3328,7 @@ function Qn(e) {
|
|
|
3328
3328
|
/\d+\s*[+\-*/=]\s*\d+/
|
|
3329
3329
|
].some((n) => n.test(t));
|
|
3330
3330
|
}
|
|
3331
|
-
function
|
|
3331
|
+
function Cc(e) {
|
|
3332
3332
|
const t = [
|
|
3333
3333
|
"pie-multiple-choice",
|
|
3334
3334
|
"pie-inline-choice",
|
|
@@ -3358,7 +3358,7 @@ function Ac(e) {
|
|
|
3358
3358
|
function Zn(e) {
|
|
3359
3359
|
return ui(e).trim().length >= 10;
|
|
3360
3360
|
}
|
|
3361
|
-
function
|
|
3361
|
+
function Mc(e) {
|
|
3362
3362
|
const t = ui(e);
|
|
3363
3363
|
return [
|
|
3364
3364
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
@@ -3369,23 +3369,23 @@ function Cc(e) {
|
|
|
3369
3369
|
/physics|force|energy|velocity|acceleration/i
|
|
3370
3370
|
].some((n) => n.test(t));
|
|
3371
3371
|
}
|
|
3372
|
-
var
|
|
3372
|
+
var Oc = [
|
|
3373
3373
|
"assessment",
|
|
3374
3374
|
"section",
|
|
3375
3375
|
"item",
|
|
3376
3376
|
"passage",
|
|
3377
3377
|
"rubric"
|
|
3378
|
-
],
|
|
3379
|
-
function
|
|
3380
|
-
return
|
|
3378
|
+
], Ic = new Set(Oc);
|
|
3379
|
+
function $c(e) {
|
|
3380
|
+
return Ic.has(e);
|
|
3381
3381
|
}
|
|
3382
3382
|
function di(e, t, n) {
|
|
3383
3383
|
const r = e.trim(), i = n.trim();
|
|
3384
3384
|
if (!r || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3385
|
-
if (
|
|
3385
|
+
if (!$c(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
3386
3386
|
return `${r}:${t}:${i}`;
|
|
3387
3387
|
}
|
|
3388
|
-
var
|
|
3388
|
+
var Rc = class {
|
|
3389
3389
|
constructor() {
|
|
3390
3390
|
m(this, "providerId", "desmos-calculator"), m(this, "providerName", "Desmos Calculator"), m(this, "category", "calculator"), m(this, "version", "1.10"), m(this, "requiresAuth", !0), m(this, "desmosProvider", null), m(this, "config", null);
|
|
3391
3391
|
}
|
|
@@ -3489,14 +3489,34 @@ var $c = class {
|
|
|
3489
3489
|
text: e,
|
|
3490
3490
|
offset: 0
|
|
3491
3491
|
}];
|
|
3492
|
-
}, ks =
|
|
3492
|
+
}, ks = (e) => String(e || "").trim().toLowerCase(), Lc = () => ks((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), Pc = (e, t) => {
|
|
3493
|
+
if (t) {
|
|
3494
|
+
const s = e.find((a) => a.name === t);
|
|
3495
|
+
if (s) return s;
|
|
3496
|
+
}
|
|
3497
|
+
const n = Lc(), r = n.split("-")[0] || "en", i = (s) => {
|
|
3498
|
+
const a = ks(s.lang);
|
|
3499
|
+
return a === n || a.startsWith(`${r}-`);
|
|
3500
|
+
}, o = [
|
|
3501
|
+
(s) => s.localService && i(s),
|
|
3502
|
+
(s) => s.default && i(s),
|
|
3503
|
+
(s) => i(s),
|
|
3504
|
+
(s) => s.localService,
|
|
3505
|
+
(s) => s.default
|
|
3506
|
+
];
|
|
3507
|
+
for (const s of o) {
|
|
3508
|
+
const a = e.find(s);
|
|
3509
|
+
if (a) return a;
|
|
3510
|
+
}
|
|
3511
|
+
return e[0] || null;
|
|
3512
|
+
}, Nc = (e) => !e.default, Es = class {
|
|
3493
3513
|
constructor() {
|
|
3494
3514
|
m(this, "providerId", "browser"), m(this, "providerName", "Browser Speech Synthesis"), m(this, "version", "1.0.0");
|
|
3495
3515
|
}
|
|
3496
3516
|
async initialize(e) {
|
|
3497
3517
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
3498
3518
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
3499
|
-
return new
|
|
3519
|
+
return new Wc(e);
|
|
3500
3520
|
}
|
|
3501
3521
|
supportsFeature(e) {
|
|
3502
3522
|
return !0;
|
|
@@ -3514,7 +3534,7 @@ var $c = class {
|
|
|
3514
3534
|
}
|
|
3515
3535
|
destroy() {
|
|
3516
3536
|
}
|
|
3517
|
-
},
|
|
3537
|
+
}, Wc = class {
|
|
3518
3538
|
constructor(e) {
|
|
3519
3539
|
m(this, "utterance", null), m(this, "config", null), m(this, "_isPlaying", !1), m(this, "_isPaused", !1), m(this, "speakRunId", 0), m(this, "onWordBoundary", void 0), this.config = e;
|
|
3520
3540
|
}
|
|
@@ -3599,37 +3619,40 @@ var $c = class {
|
|
|
3599
3619
|
r(!1);
|
|
3600
3620
|
return;
|
|
3601
3621
|
}
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3622
|
+
const o = new SpeechSynthesisUtterance(e);
|
|
3623
|
+
this.utterance = o;
|
|
3624
|
+
const s = Pc(speechSynthesis.getVoices(), this.config?.voice);
|
|
3625
|
+
s && Nc(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
|
|
3626
|
+
const a = () => {
|
|
3627
|
+
this.utterance === o && (this.utterance = null);
|
|
3628
|
+
};
|
|
3629
|
+
o.onstart = () => {
|
|
3607
3630
|
n === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
3608
|
-
},
|
|
3609
|
-
if (n !== this.speakRunId) {
|
|
3631
|
+
}, o.onend = () => {
|
|
3632
|
+
if (a(), n !== this.speakRunId) {
|
|
3610
3633
|
r(!1);
|
|
3611
3634
|
return;
|
|
3612
3635
|
}
|
|
3613
3636
|
this._isPlaying = !1, this._isPaused = !1, r(!0);
|
|
3614
|
-
},
|
|
3615
|
-
if (n !== this.speakRunId) {
|
|
3637
|
+
}, o.onerror = (l) => {
|
|
3638
|
+
if (a(), n !== this.speakRunId) {
|
|
3616
3639
|
r(!1);
|
|
3617
3640
|
return;
|
|
3618
3641
|
}
|
|
3619
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
3642
|
+
if (this._isPlaying = !1, this._isPaused = !1, l.error === "interrupted" || l.error === "canceled") {
|
|
3620
3643
|
r(!1);
|
|
3621
3644
|
return;
|
|
3622
3645
|
}
|
|
3623
|
-
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${
|
|
3624
|
-
},
|
|
3646
|
+
i(/* @__PURE__ */ new Error(`Speech synthesis error: ${l.error}`));
|
|
3647
|
+
}, o.onpause = () => {
|
|
3625
3648
|
n === this.speakRunId && (this._isPaused = !0);
|
|
3626
|
-
},
|
|
3649
|
+
}, o.onresume = () => {
|
|
3627
3650
|
n === this.speakRunId && (this._isPaused = !1);
|
|
3628
|
-
},
|
|
3629
|
-
if (n !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
3630
|
-
const
|
|
3631
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:",
|
|
3632
|
-
}, speechSynthesis.speak(
|
|
3651
|
+
}, o.onboundary = (l) => {
|
|
3652
|
+
if (n !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", l.name, "charIndex:", l.charIndex, "charLength:", l.charLength), l.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
3653
|
+
const c = Math.max(0, Math.min(l.charIndex, Math.max(0, e.length - 1))), u = Number(l.charLength || 0), d = this.inferWordLength(e, c), h = Number.isFinite(u) && u > 0 && u <= 80 && c + u <= e.length ? u : d, p = e.substring(c, Math.min(e.length, c + h)).trim(), v = t + c;
|
|
3654
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", p, "at position:", v), this.onWordBoundary(p, v, h);
|
|
3655
|
+
}, speechSynthesis.speak(o);
|
|
3633
3656
|
});
|
|
3634
3657
|
}
|
|
3635
3658
|
pause() {
|
|
@@ -3639,7 +3662,7 @@ var $c = class {
|
|
|
3639
3662
|
this._isPlaying && this._isPaused && speechSynthesis.resume();
|
|
3640
3663
|
}
|
|
3641
3664
|
stop() {
|
|
3642
|
-
this.speakRunId += 1, this._isPlaying && speechSynthesis.cancel(), this._isPlaying = !1, this._isPaused = !1;
|
|
3665
|
+
this.speakRunId += 1, (this._isPlaying || this.utterance) && speechSynthesis.cancel(), this.utterance = null, this._isPlaying = !1, this._isPaused = !1;
|
|
3643
3666
|
}
|
|
3644
3667
|
isPlaying() {
|
|
3645
3668
|
return this._isPlaying && !this._isPaused;
|
|
@@ -3653,7 +3676,7 @@ var $c = class {
|
|
|
3653
3676
|
...e.providerOptions || {}
|
|
3654
3677
|
});
|
|
3655
3678
|
}
|
|
3656
|
-
},
|
|
3679
|
+
}, zc = class {
|
|
3657
3680
|
async emitTelemetry(e, t) {
|
|
3658
3681
|
try {
|
|
3659
3682
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -3685,7 +3708,7 @@ var $c = class {
|
|
|
3685
3708
|
}
|
|
3686
3709
|
async _initializeBrowserTTS(e) {
|
|
3687
3710
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3688
|
-
this.ttsProvider = new
|
|
3711
|
+
this.ttsProvider = new Es(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3689
3712
|
}
|
|
3690
3713
|
async _initializeServerTTS(e) {
|
|
3691
3714
|
if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
@@ -3743,7 +3766,7 @@ var $c = class {
|
|
|
3743
3766
|
destroy() {
|
|
3744
3767
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3745
3768
|
}
|
|
3746
|
-
},
|
|
3769
|
+
}, Hc = /* @__PURE__ */ new Set([
|
|
3747
3770
|
"annotation-xml",
|
|
3748
3771
|
"color-profile",
|
|
3749
3772
|
"font-face",
|
|
@@ -3752,16 +3775,16 @@ var $c = class {
|
|
|
3752
3775
|
"font-face-format",
|
|
3753
3776
|
"font-face-name",
|
|
3754
3777
|
"missing-glyph"
|
|
3755
|
-
]),
|
|
3778
|
+
]), Bc = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Dc = (e, t = "custom element tag") => {
|
|
3756
3779
|
if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
|
|
3757
3780
|
const n = e.trim();
|
|
3758
3781
|
if (!n) throw new Error(`Invalid ${t}: tag is empty`);
|
|
3759
3782
|
if (n !== n.toLowerCase()) throw new Error(`Invalid ${t} "${n}": custom element names must be lowercase`);
|
|
3760
3783
|
if (!n.includes("-")) throw new Error(`Invalid ${t} "${n}": custom element names must include a hyphen`);
|
|
3761
|
-
if (
|
|
3762
|
-
if (!
|
|
3784
|
+
if (Hc.has(n)) throw new Error(`Invalid ${t} "${n}": this name is reserved by the HTML spec`);
|
|
3785
|
+
if (!Bc.test(n)) throw new Error(`Invalid ${t} "${n}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3763
3786
|
return n;
|
|
3764
|
-
},
|
|
3787
|
+
}, xs = {
|
|
3765
3788
|
calculator: "pie-tool-calculator",
|
|
3766
3789
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3767
3790
|
ruler: "pie-tool-ruler",
|
|
@@ -3773,21 +3796,21 @@ var $c = class {
|
|
|
3773
3796
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3774
3797
|
graph: "pie-tool-graph",
|
|
3775
3798
|
periodicTable: "pie-tool-periodic-table"
|
|
3776
|
-
},
|
|
3777
|
-
const i =
|
|
3799
|
+
}, Fc = (e, t) => Dc(t?.toolTagMap?.[e] ?? xs[e] ?? e, `tool component tag for "${e}"`), jc = (e) => document.createElement(e), Ce = (e, t, n, r) => {
|
|
3800
|
+
const i = Fc(e, r), o = r?.toolComponentFactories?.[e] ?? r?.toolComponentFactory;
|
|
3778
3801
|
return o ? o({
|
|
3779
3802
|
toolId: e,
|
|
3780
3803
|
tagName: i,
|
|
3781
3804
|
context: t,
|
|
3782
3805
|
toolbarContext: n
|
|
3783
|
-
}) :
|
|
3806
|
+
}) : jc(i);
|
|
3784
3807
|
}, Lr = /* @__PURE__ */ new WeakMap();
|
|
3785
|
-
function
|
|
3808
|
+
function qc(e, t) {
|
|
3786
3809
|
if (!e) return null;
|
|
3787
3810
|
const n = Lr.get(e), r = n?.get(t);
|
|
3788
3811
|
return r ? r.isConnected ? r : (n?.delete(t), null) : null;
|
|
3789
3812
|
}
|
|
3790
|
-
function
|
|
3813
|
+
function Vc(e, t, n) {
|
|
3791
3814
|
if (!e) return;
|
|
3792
3815
|
let r = Lr.get(e);
|
|
3793
3816
|
r || (r = /* @__PURE__ */ new Map(), Lr.set(e, r)), r.set(t, n);
|
|
@@ -3795,7 +3818,7 @@ function Dc(e, t, n) {
|
|
|
3795
3818
|
function Yi(e) {
|
|
3796
3819
|
return e === "basic" || e === "scientific" ? e : null;
|
|
3797
3820
|
}
|
|
3798
|
-
function
|
|
3821
|
+
function Uc(e) {
|
|
3799
3822
|
const t = e.getToolRenderParams?.("calculator") ?? {}, n = Yi(t.calculatorType), r = t.availableTypes;
|
|
3800
3823
|
return {
|
|
3801
3824
|
calculatorType: n,
|
|
@@ -3807,14 +3830,14 @@ function Xi(e, t, n) {
|
|
|
3807
3830
|
const r = e;
|
|
3808
3831
|
t ? (r.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete r.calculatorType, e.removeAttribute("calculator-type")), n && n.length > 0 ? r.availableTypes = n : delete r.availableTypes;
|
|
3809
3832
|
}
|
|
3810
|
-
var
|
|
3833
|
+
var Gc = {
|
|
3811
3834
|
toolId: "calculator",
|
|
3812
3835
|
name: "Calculator",
|
|
3813
3836
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3814
3837
|
icon: "calculator",
|
|
3815
3838
|
provider: {
|
|
3816
3839
|
getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
|
|
3817
|
-
createProvider: () => new
|
|
3840
|
+
createProvider: () => new Rc(),
|
|
3818
3841
|
getInitConfig: (e) => e?.provider?.init ?? {},
|
|
3819
3842
|
getAuthFetcher: (e) => {
|
|
3820
3843
|
const t = e?.provider?.runtime?.authFetcher;
|
|
@@ -3840,8 +3863,8 @@ var jc = {
|
|
|
3840
3863
|
return Qn(e);
|
|
3841
3864
|
},
|
|
3842
3865
|
renderToolbar(e, t) {
|
|
3843
|
-
const { calculatorType: n, availableTypes: r, displayName: i } =
|
|
3844
|
-
a ||
|
|
3866
|
+
const { calculatorType: n, availableTypes: r, displayName: i } = Uc(t), o = di(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = qc(t.toolCoordinator, o), l = a ?? Ce(this.toolId, e, t, s);
|
|
3867
|
+
a || Vc(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Xi(l, n, r);
|
|
3845
3868
|
const c = n === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = n === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, d = {
|
|
3846
3869
|
toolId: this.toolId,
|
|
3847
3870
|
label: i,
|
|
@@ -3852,7 +3875,7 @@ var jc = {
|
|
|
3852
3875
|
onClick: () => t.toggleTool(this.toolId),
|
|
3853
3876
|
active: t.isToolVisible(o)
|
|
3854
3877
|
};
|
|
3855
|
-
let
|
|
3878
|
+
let h = d.active;
|
|
3856
3879
|
return l.visible !== d.active && (l.visible = d.active), {
|
|
3857
3880
|
toolId: this.toolId,
|
|
3858
3881
|
elements: [{
|
|
@@ -3874,7 +3897,7 @@ var jc = {
|
|
|
3874
3897
|
button: d,
|
|
3875
3898
|
sync: () => {
|
|
3876
3899
|
const p = t.isToolVisible(o);
|
|
3877
|
-
d.active = p, d.label = i, d.ariaLabel = p ? u : c, d.tooltip = p ? `Close ${i.toLowerCase()}` : i,
|
|
3900
|
+
d.active = p, d.label = i, d.ariaLabel = p ? u : c, d.tooltip = p ? `Close ${i.toLowerCase()}` : i, h !== p && (l.visible = p, h = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Xi(l, n, r);
|
|
3878
3901
|
},
|
|
3879
3902
|
subscribeActive: (p) => t.subscribeVisibility ? t.subscribeVisibility(() => {
|
|
3880
3903
|
p(t.isToolVisible(o));
|
|
@@ -3882,7 +3905,7 @@ var jc = {
|
|
|
3882
3905
|
}
|
|
3883
3906
|
};
|
|
3884
3907
|
}
|
|
3885
|
-
}, D = (e) => e.trim().replace(/\s+/g, " "),
|
|
3908
|
+
}, D = (e) => e.trim().replace(/\s+/g, " "), As = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Cs = (e) => {
|
|
3886
3909
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
3887
3910
|
const t = e.classList;
|
|
3888
3911
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -3896,12 +3919,12 @@ var jc = {
|
|
|
3896
3919
|
}, Pt = (e, t) => {
|
|
3897
3920
|
let n = e.nodeType === 1 ? e : e.parentElement;
|
|
3898
3921
|
for (; n; ) {
|
|
3899
|
-
if (
|
|
3922
|
+
if (Cs(n)) return !0;
|
|
3900
3923
|
if (t && n === t) break;
|
|
3901
3924
|
n = n.parentElement;
|
|
3902
3925
|
}
|
|
3903
3926
|
return !1;
|
|
3904
|
-
},
|
|
3927
|
+
}, Ms = (e, t, n) => {
|
|
3905
3928
|
if (!e || !t || /\s/.test(e) || /\s/.test(t)) return !1;
|
|
3906
3929
|
const r = n?.boundarySpacingMode ?? "segmenterPreferred";
|
|
3907
3930
|
if (r === "none") return !1;
|
|
@@ -3926,29 +3949,29 @@ var jc = {
|
|
|
3926
3949
|
const c = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
3927
3950
|
let u = c.nextNode();
|
|
3928
3951
|
for (; u; ) {
|
|
3929
|
-
const
|
|
3930
|
-
if (
|
|
3931
|
-
const p =
|
|
3932
|
-
!o && !s &&
|
|
3952
|
+
const h = u;
|
|
3953
|
+
if (h.parentElement && !Pt(h, e)) {
|
|
3954
|
+
const p = h.textContent || "", v = p.match(/\S/), b = v ? v[0] : null;
|
|
3955
|
+
!o && !s && Ms(l, b, t) && (r.push(" "), a && n.set(i, a), i++, s = !0);
|
|
3933
3956
|
for (let g = 0; g < p.length; g++) {
|
|
3934
3957
|
const y = p[g], O = /\s/.test(y);
|
|
3935
3958
|
o ? O || (o = !1, r.push(y), n.set(i, {
|
|
3936
|
-
node:
|
|
3959
|
+
node: h,
|
|
3937
3960
|
offset: g
|
|
3938
3961
|
}), a = {
|
|
3939
|
-
node:
|
|
3962
|
+
node: h,
|
|
3940
3963
|
offset: g
|
|
3941
3964
|
}, i++, s = !1, l = y) : O ? (s || (r.push(" "), n.set(i, {
|
|
3942
|
-
node:
|
|
3965
|
+
node: h,
|
|
3943
3966
|
offset: g
|
|
3944
3967
|
}), a = {
|
|
3945
|
-
node:
|
|
3968
|
+
node: h,
|
|
3946
3969
|
offset: g
|
|
3947
3970
|
}, i++), s = !0) : (r.push(y), n.set(i, {
|
|
3948
|
-
node:
|
|
3971
|
+
node: h,
|
|
3949
3972
|
offset: g
|
|
3950
3973
|
}), a = {
|
|
3951
|
-
node:
|
|
3974
|
+
node: h,
|
|
3952
3975
|
offset: g
|
|
3953
3976
|
}, i++, s = !1, l = y);
|
|
3954
3977
|
}
|
|
@@ -3961,11 +3984,11 @@ var jc = {
|
|
|
3961
3984
|
text: d,
|
|
3962
3985
|
map: n
|
|
3963
3986
|
};
|
|
3964
|
-
}, vr = null, Ji = Promise.resolve(),
|
|
3987
|
+
}, vr = null, Ji = Promise.resolve(), Kc = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Yc = async () => (vr || (vr = import("./sre-CXN7ed6H.js").then((e) => /* @__PURE__ */ Sa(e.default, 1)).then((e) => {
|
|
3965
3988
|
const t = e.default || e;
|
|
3966
3989
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
3967
3990
|
return t;
|
|
3968
|
-
})), vr),
|
|
3991
|
+
})), vr), Xc = (e) => e === "en" ? "clearspeak" : "mathspeak", Qi = (e) => !!e && typeof e == "object" && !Array.isArray(e), Zi = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, er = (e) => {
|
|
3969
3992
|
if (!Qi(e)) return;
|
|
3970
3993
|
const t = Zi(e.domain), n = Zi(e.style), r = Qi(e.engineOptions) ? e.engineOptions : void 0;
|
|
3971
3994
|
if (!(!t && !n && !r))
|
|
@@ -3974,36 +3997,36 @@ var jc = {
|
|
|
3974
3997
|
...n ? { style: n } : {},
|
|
3975
3998
|
...r ? { engineOptions: r } : {}
|
|
3976
3999
|
};
|
|
3977
|
-
},
|
|
3978
|
-
const i =
|
|
4000
|
+
}, Jc = async (e, t, n, r) => {
|
|
4001
|
+
const i = Kc(t), o = er(r);
|
|
3979
4002
|
await e.setupEngine?.({
|
|
3980
4003
|
...o?.engineOptions || {},
|
|
3981
4004
|
locale: i,
|
|
3982
|
-
domain: o?.domain ||
|
|
4005
|
+
domain: o?.domain || Xc(i),
|
|
3983
4006
|
...o?.style ? { style: o.style } : {},
|
|
3984
4007
|
modality: "speech",
|
|
3985
4008
|
markup: n
|
|
3986
4009
|
}), await e.engineReady?.();
|
|
3987
|
-
},
|
|
4010
|
+
}, Qc = async (e) => {
|
|
3988
4011
|
const t = Ji.then(e, e);
|
|
3989
4012
|
return Ji = t.then(() => {
|
|
3990
4013
|
}, () => {
|
|
3991
4014
|
}), t;
|
|
3992
|
-
},
|
|
4015
|
+
}, Os = async (e, t, n, r, i) => Qc(async () => (await Jc(e, n, r, i), e.toSpeech(t))), Zc = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), eu = async (e, t, n, r) => {
|
|
3993
4016
|
try {
|
|
3994
|
-
const i =
|
|
4017
|
+
const i = Zc(await Os(e, t, n, "ssml", r));
|
|
3995
4018
|
return i.includes("<speak") ? i : null;
|
|
3996
4019
|
} catch (i) {
|
|
3997
4020
|
return console.debug("[TTSService] Math SSML generation failed; using plain", { message: i instanceof Error ? i.message : String(i) }), null;
|
|
3998
4021
|
}
|
|
3999
|
-
},
|
|
4022
|
+
}, Is = async (e, t = {}) => {
|
|
4000
4023
|
if (!e.some((c) => c.type === "math")) return {
|
|
4001
4024
|
speechText: D(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
4002
4025
|
usedMathSpeech: !1,
|
|
4003
4026
|
usedFallback: !1
|
|
4004
4027
|
};
|
|
4005
4028
|
let n = null, r = !1, i = !1;
|
|
4006
|
-
const o = t.loadSre ||
|
|
4029
|
+
const o = t.loadSre || Yc, s = [];
|
|
4007
4030
|
for (const c of e) {
|
|
4008
4031
|
if (c.type === "text") {
|
|
4009
4032
|
s.push(c.text);
|
|
@@ -4011,7 +4034,7 @@ var jc = {
|
|
|
4011
4034
|
}
|
|
4012
4035
|
try {
|
|
4013
4036
|
n || (n = await o());
|
|
4014
|
-
const u = D(await
|
|
4037
|
+
const u = D(await Os(n, c.mathml, t.language, "none", t.mathSpeech));
|
|
4015
4038
|
if (u) {
|
|
4016
4039
|
s.push(u), r = !0;
|
|
4017
4040
|
continue;
|
|
@@ -4023,18 +4046,18 @@ var jc = {
|
|
|
4023
4046
|
}
|
|
4024
4047
|
const a = D(s.join(" "));
|
|
4025
4048
|
let l;
|
|
4026
|
-
return t.produceSsml && n && r && e.length === 1 && e[0].type === "math" && (l = await
|
|
4049
|
+
return t.produceSsml && n && r && e.length === 1 && e[0].type === "math" && (l = await eu(n, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
4027
4050
|
speechText: a,
|
|
4028
4051
|
usedMathSpeech: r,
|
|
4029
4052
|
usedFallback: i,
|
|
4030
4053
|
ssml: l
|
|
4031
4054
|
};
|
|
4032
|
-
},
|
|
4055
|
+
}, tu = /* @__PURE__ */ new Set([
|
|
4033
4056
|
"reserved-row",
|
|
4034
4057
|
"expanding-row",
|
|
4035
4058
|
"floating-overlay",
|
|
4036
4059
|
"left-aligned"
|
|
4037
|
-
]), eo = (e) => e && typeof e == "object" ? e : {},
|
|
4060
|
+
]), eo = (e) => e && typeof e == "object" ? e : {}, nu = (e) => e === "polly" || e === "google" || e === "server", ie = (e, t) => e === void 0 ? t : e, qn = (e, t = "left-aligned") => typeof e == "string" && tu.has(e) ? e : t, to = Object.freeze([0.8, 1.25]), mr = (e) => {
|
|
4038
4061
|
if (!Array.isArray(e)) return [...to];
|
|
4039
4062
|
if (e.length === 0) return [];
|
|
4040
4063
|
const t = /* @__PURE__ */ new Set();
|
|
@@ -4044,12 +4067,12 @@ var jc = {
|
|
|
4044
4067
|
r !== 1 && t.add(r);
|
|
4045
4068
|
}
|
|
4046
4069
|
return t.size ? Array.from(t) : [...to];
|
|
4047
|
-
},
|
|
4070
|
+
}, ru = (e) => {
|
|
4048
4071
|
const t = {
|
|
4049
4072
|
...e,
|
|
4050
4073
|
layoutMode: qn(e.layoutMode)
|
|
4051
4074
|
}, n = e.backend || "browser";
|
|
4052
|
-
if (!
|
|
4075
|
+
if (!nu(n)) return t;
|
|
4053
4076
|
const r = {
|
|
4054
4077
|
...t,
|
|
4055
4078
|
apiEndpoint: ie(t.apiEndpoint, "/api/tts"),
|
|
@@ -4072,12 +4095,12 @@ var jc = {
|
|
|
4072
4095
|
} : r;
|
|
4073
4096
|
}, br = (e) => {
|
|
4074
4097
|
const t = eo(e), n = eo(t.settings);
|
|
4075
|
-
return
|
|
4098
|
+
return ru({
|
|
4076
4099
|
...t,
|
|
4077
4100
|
...n
|
|
4078
4101
|
});
|
|
4079
|
-
}, Pr = (e) => e.backend || "browser",
|
|
4080
|
-
const t = Pr(e), n =
|
|
4102
|
+
}, Pr = (e) => e.backend || "browser", $s = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, Rs = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), iu = (e) => {
|
|
4103
|
+
const t = Pr(e), n = $s(e, t), r = Rs(e, n), i = er(e.mathSpeech);
|
|
4081
4104
|
return {
|
|
4082
4105
|
voice: e.defaultVoice,
|
|
4083
4106
|
rate: e.rate,
|
|
@@ -4103,8 +4126,8 @@ var jc = {
|
|
|
4103
4126
|
validateEndpoint: e.validateEndpoint,
|
|
4104
4127
|
...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
|
|
4105
4128
|
};
|
|
4106
|
-
},
|
|
4107
|
-
switch (
|
|
4129
|
+
}, Ls = (e) => qn(e.layoutMode), ou = (e) => {
|
|
4130
|
+
switch (Ls(e)) {
|
|
4108
4131
|
case "reserved-row":
|
|
4109
4132
|
return {
|
|
4110
4133
|
mount: "before-buttons",
|
|
@@ -4130,21 +4153,21 @@ var jc = {
|
|
|
4130
4153
|
}
|
|
4131
4154
|
};
|
|
4132
4155
|
}
|
|
4133
|
-
}, jt = /* @__PURE__ */ new Map(),
|
|
4156
|
+
}, jt = /* @__PURE__ */ new Map(), su = "__pieToolElementUnmount", no = "pie-tool-active-change", au = {
|
|
4134
4157
|
toolId: "textToSpeech",
|
|
4135
4158
|
name: "Text to Speech",
|
|
4136
4159
|
description: "Read content aloud",
|
|
4137
4160
|
icon: "volume-up",
|
|
4138
4161
|
provider: {
|
|
4139
4162
|
getProviderId: () => "tts",
|
|
4140
|
-
createProvider: (e) => new
|
|
4163
|
+
createProvider: (e) => new zc(Pr(br(e))),
|
|
4141
4164
|
getInitConfig: (e) => {
|
|
4142
|
-
const t = br(e), n = Pr(t), r =
|
|
4165
|
+
const t = br(e), n = Pr(t), r = $s(t, n);
|
|
4143
4166
|
return {
|
|
4144
4167
|
backend: n,
|
|
4145
4168
|
serverProvider: r,
|
|
4146
|
-
transportMode:
|
|
4147
|
-
...
|
|
4169
|
+
transportMode: Rs(t, r),
|
|
4170
|
+
...iu(t)
|
|
4148
4171
|
};
|
|
4149
4172
|
},
|
|
4150
4173
|
getAuthFetcher: (e) => {
|
|
@@ -4170,12 +4193,12 @@ var jc = {
|
|
|
4170
4193
|
return Zn(e);
|
|
4171
4194
|
},
|
|
4172
4195
|
renderToolbar(e, t) {
|
|
4173
|
-
const n = () => br(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => mr(n().speedOptions), i = () =>
|
|
4196
|
+
const n = () => br(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => mr(n().speedOptions), i = () => Ls(n()), o = () => ou(n()), s = di(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
|
|
4174
4197
|
const u = t.ui?.size;
|
|
4175
4198
|
return u === "sm" || u === "lg" ? u : "md";
|
|
4176
4199
|
}, l = () => {
|
|
4177
4200
|
let u = jt.get(s);
|
|
4178
|
-
return u && typeof u.isConnected == "boolean" && !u.isConnected && (jt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[
|
|
4201
|
+
return u && typeof u.isConnected == "boolean" && !u.isConnected && (jt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[su] = () => {
|
|
4179
4202
|
jt.get(s) === u && jt.delete(s);
|
|
4180
4203
|
}, jt.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 = r(), u;
|
|
4181
4204
|
}, c = o();
|
|
@@ -4191,12 +4214,12 @@ var jc = {
|
|
|
4191
4214
|
} }
|
|
4192
4215
|
}],
|
|
4193
4216
|
subscribeActive: (u) => {
|
|
4194
|
-
const d = l(),
|
|
4217
|
+
const d = l(), h = (p) => {
|
|
4195
4218
|
const v = p.detail;
|
|
4196
4219
|
u(v?.active === !0);
|
|
4197
4220
|
};
|
|
4198
|
-
return d.addEventListener(no,
|
|
4199
|
-
d.removeEventListener(no,
|
|
4221
|
+
return d.addEventListener(no, h), () => {
|
|
4222
|
+
d.removeEventListener(no, h);
|
|
4200
4223
|
};
|
|
4201
4224
|
},
|
|
4202
4225
|
sync: () => {
|
|
@@ -4224,7 +4247,7 @@ function ze(e) {
|
|
|
4224
4247
|
function fi(e, t) {
|
|
4225
4248
|
e.setAttribute("data-pie-tool-surface", t);
|
|
4226
4249
|
}
|
|
4227
|
-
var
|
|
4250
|
+
var lu = {
|
|
4228
4251
|
toolId: "ruler",
|
|
4229
4252
|
name: "Ruler",
|
|
4230
4253
|
description: "On-screen ruler for measurements",
|
|
@@ -4266,7 +4289,7 @@ var iu = {
|
|
|
4266
4289
|
subscribeActive: n.subscribeActive
|
|
4267
4290
|
};
|
|
4268
4291
|
}
|
|
4269
|
-
},
|
|
4292
|
+
}, cu = {
|
|
4270
4293
|
toolId: "protractor",
|
|
4271
4294
|
name: "Protractor",
|
|
4272
4295
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4308,7 +4331,7 @@ var iu = {
|
|
|
4308
4331
|
subscribeActive: n.subscribeActive
|
|
4309
4332
|
};
|
|
4310
4333
|
}
|
|
4311
|
-
},
|
|
4334
|
+
}, uu = {
|
|
4312
4335
|
toolId: "answerEliminator",
|
|
4313
4336
|
name: "Answer Eliminator",
|
|
4314
4337
|
description: "Strike through answer choices",
|
|
@@ -4321,7 +4344,7 @@ var iu = {
|
|
|
4321
4344
|
"choiceMasking"
|
|
4322
4345
|
],
|
|
4323
4346
|
isVisibleInContext(e) {
|
|
4324
|
-
return
|
|
4347
|
+
return Cc(e);
|
|
4325
4348
|
},
|
|
4326
4349
|
renderToolbar(e, t) {
|
|
4327
4350
|
const n = We(this.toolId, t), r = t.componentOverrides ?? {}, i = Ce(this.toolId, e, t, r);
|
|
@@ -4355,7 +4378,7 @@ var iu = {
|
|
|
4355
4378
|
subscribeActive: n.subscribeActive
|
|
4356
4379
|
};
|
|
4357
4380
|
}
|
|
4358
|
-
},
|
|
4381
|
+
}, du = {
|
|
4359
4382
|
toolId: "highlighter",
|
|
4360
4383
|
name: "Highlighter",
|
|
4361
4384
|
description: "Highlight text",
|
|
@@ -4406,7 +4429,7 @@ var iu = {
|
|
|
4406
4429
|
subscribeActive: n.subscribeActive
|
|
4407
4430
|
};
|
|
4408
4431
|
}
|
|
4409
|
-
},
|
|
4432
|
+
}, hu = {
|
|
4410
4433
|
toolId: "lineReader",
|
|
4411
4434
|
name: "Line Reader",
|
|
4412
4435
|
description: "Reading guide overlay",
|
|
@@ -4455,7 +4478,7 @@ var iu = {
|
|
|
4455
4478
|
subscribeActive: n.subscribeActive
|
|
4456
4479
|
};
|
|
4457
4480
|
}
|
|
4458
|
-
},
|
|
4481
|
+
}, fu = {
|
|
4459
4482
|
toolId: "theme",
|
|
4460
4483
|
name: "Theme",
|
|
4461
4484
|
description: "Accessible themes and contrast",
|
|
@@ -4510,7 +4533,7 @@ var iu = {
|
|
|
4510
4533
|
subscribeActive: n.subscribeActive
|
|
4511
4534
|
};
|
|
4512
4535
|
}
|
|
4513
|
-
},
|
|
4536
|
+
}, pu = {
|
|
4514
4537
|
toolId: "annotationToolbar",
|
|
4515
4538
|
name: "Highlighter",
|
|
4516
4539
|
description: "Highlight and annotate text",
|
|
@@ -4561,7 +4584,7 @@ var iu = {
|
|
|
4561
4584
|
subscribeActive: n.subscribeActive
|
|
4562
4585
|
};
|
|
4563
4586
|
}
|
|
4564
|
-
},
|
|
4587
|
+
}, gu = {
|
|
4565
4588
|
toolId: "graph",
|
|
4566
4589
|
name: "Graph",
|
|
4567
4590
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4614,7 +4637,7 @@ var iu = {
|
|
|
4614
4637
|
subscribeActive: n.subscribeActive
|
|
4615
4638
|
};
|
|
4616
4639
|
}
|
|
4617
|
-
},
|
|
4640
|
+
}, vu = {
|
|
4618
4641
|
toolId: "periodicTable",
|
|
4619
4642
|
name: "Periodic Table",
|
|
4620
4643
|
description: "Chemistry periodic table reference",
|
|
@@ -4626,7 +4649,7 @@ var iu = {
|
|
|
4626
4649
|
"elementReference"
|
|
4627
4650
|
],
|
|
4628
4651
|
isVisibleInContext(e) {
|
|
4629
|
-
return
|
|
4652
|
+
return Mc(e);
|
|
4630
4653
|
},
|
|
4631
4654
|
renderToolbar(e, t) {
|
|
4632
4655
|
const n = We(this.toolId, t), r = {
|
|
@@ -4666,54 +4689,54 @@ var iu = {
|
|
|
4666
4689
|
subscribeActive: n.subscribeActive
|
|
4667
4690
|
};
|
|
4668
4691
|
}
|
|
4669
|
-
},
|
|
4670
|
-
|
|
4671
|
-
ru,
|
|
4672
|
-
iu,
|
|
4673
|
-
ou,
|
|
4674
|
-
su,
|
|
4692
|
+
}, mu = [
|
|
4693
|
+
Gc,
|
|
4675
4694
|
au,
|
|
4676
4695
|
lu,
|
|
4677
4696
|
cu,
|
|
4678
4697
|
uu,
|
|
4679
4698
|
du,
|
|
4680
|
-
hu
|
|
4699
|
+
hu,
|
|
4700
|
+
fu,
|
|
4701
|
+
pu,
|
|
4702
|
+
gu,
|
|
4703
|
+
vu
|
|
4681
4704
|
];
|
|
4682
|
-
function
|
|
4683
|
-
const t = new
|
|
4705
|
+
function bu(e = {}) {
|
|
4706
|
+
const t = new Ec(), n = {
|
|
4684
4707
|
toolTagMap: {
|
|
4685
|
-
...
|
|
4708
|
+
...xs,
|
|
4686
4709
|
...e.toolTagMap || {}
|
|
4687
4710
|
},
|
|
4688
4711
|
toolComponentFactory: e.toolComponentFactory,
|
|
4689
4712
|
toolComponentFactories: e.toolComponentFactories
|
|
4690
4713
|
}, r = (i) => e.overrides?.[i.toolId] || i;
|
|
4691
|
-
return e.includePackagedTools &&
|
|
4714
|
+
return e.includePackagedTools && yu(t, {
|
|
4692
4715
|
toolIds: e.toolIds,
|
|
4693
4716
|
applyOverrides: r
|
|
4694
4717
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(n), t;
|
|
4695
4718
|
}
|
|
4696
|
-
function
|
|
4719
|
+
function yu(e, t = {}) {
|
|
4697
4720
|
const n = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, r = t.applyOverrides || ((i) => i);
|
|
4698
|
-
for (const i of
|
|
4721
|
+
for (const i of mu)
|
|
4699
4722
|
n && !n.has(i.toolId) || e.register(r(i));
|
|
4700
4723
|
}
|
|
4701
|
-
function
|
|
4702
|
-
return
|
|
4724
|
+
function _u(e = {}) {
|
|
4725
|
+
return bu({
|
|
4703
4726
|
...e,
|
|
4704
4727
|
includePackagedTools: !0
|
|
4705
4728
|
});
|
|
4706
4729
|
}
|
|
4707
|
-
function
|
|
4708
|
-
const e =
|
|
4730
|
+
function Tu() {
|
|
4731
|
+
const e = _u(), t = /* @__PURE__ */ new Set();
|
|
4709
4732
|
for (const n of e.getAllTools()) for (const r of n.pnpSupportIds || []) t.add(r);
|
|
4710
4733
|
return [...t].sort();
|
|
4711
4734
|
}
|
|
4712
|
-
var
|
|
4713
|
-
supports: [...
|
|
4735
|
+
var Su = Tu(), Nh = {
|
|
4736
|
+
supports: [...Su],
|
|
4714
4737
|
prohibitedSupports: [],
|
|
4715
4738
|
activateAtInit: []
|
|
4716
|
-
},
|
|
4739
|
+
}, wu = {
|
|
4717
4740
|
visual: {
|
|
4718
4741
|
magnification: "magnification",
|
|
4719
4742
|
screenMagnifier: "screenMagnifier",
|
|
@@ -4826,11 +4849,11 @@ var bu = mu(), $h = {
|
|
|
4826
4849
|
itemGlossary: "itemGlossary",
|
|
4827
4850
|
tutorialAvailable: "tutorialAvailable"
|
|
4828
4851
|
}
|
|
4829
|
-
},
|
|
4852
|
+
}, Wh = Object.values(wu).flatMap((e) => Object.values(e)), zh = _s("ToolCoordinator"), ro;
|
|
4830
4853
|
(function(e) {
|
|
4831
4854
|
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";
|
|
4832
4855
|
})(ro || (ro = {}));
|
|
4833
|
-
var
|
|
4856
|
+
var ku = /* @__PURE__ */ new Set([
|
|
4834
4857
|
"speak",
|
|
4835
4858
|
"p",
|
|
4836
4859
|
"s",
|
|
@@ -4839,20 +4862,20 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
4839
4862
|
"say-as",
|
|
4840
4863
|
"voice",
|
|
4841
4864
|
"lang"
|
|
4842
|
-
]), io = /* @__PURE__ */ new Set(["audio", "phoneme"]),
|
|
4865
|
+
]), io = /* @__PURE__ */ new Set(["audio", "phoneme"]), Ps = (e) => e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), An = (e, t, n) => {
|
|
4843
4866
|
for (let r = 0; r < t.length; r++) e.push({
|
|
4844
4867
|
char: t[r],
|
|
4845
4868
|
rawOffset: n === null ? null : n + r
|
|
4846
4869
|
});
|
|
4847
|
-
},
|
|
4870
|
+
}, Eu = (e, t, n) => {
|
|
4848
4871
|
const r = t.slice(n).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
|
|
4849
|
-
return r ? (An(e,
|
|
4872
|
+
return r ? (An(e, Ps(r[0]), n), r[0].length) : 0;
|
|
4850
4873
|
}, oo = (e) => {
|
|
4851
4874
|
e.push({
|
|
4852
4875
|
char: " ",
|
|
4853
4876
|
rawOffset: null
|
|
4854
4877
|
});
|
|
4855
|
-
},
|
|
4878
|
+
}, xu = (e) => {
|
|
4856
4879
|
const t = /* @__PURE__ */ new Map(), n = [];
|
|
4857
4880
|
let r = !0;
|
|
4858
4881
|
for (const i of e) {
|
|
@@ -4868,19 +4891,19 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
4868
4891
|
text: n.join(""),
|
|
4869
4892
|
rawToSpokenOffsetMap: t
|
|
4870
4893
|
};
|
|
4871
|
-
},
|
|
4894
|
+
}, Au = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", Cu = (e, t) => {
|
|
4872
4895
|
const n = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), r = e.match(n);
|
|
4873
|
-
return
|
|
4874
|
-
},
|
|
4896
|
+
return Ps(r?.[2] ?? r?.[3] ?? "") || null;
|
|
4897
|
+
}, Ns = (e) => {
|
|
4875
4898
|
const t = [];
|
|
4876
4899
|
let n = !1, r = !1, i = 0;
|
|
4877
4900
|
for (; i < e.length; ) {
|
|
4878
4901
|
const s = e[i];
|
|
4879
4902
|
if (s !== "<") {
|
|
4880
4903
|
if (s === "&") {
|
|
4881
|
-
const
|
|
4882
|
-
if (
|
|
4883
|
-
i +=
|
|
4904
|
+
const h = Eu(t, e, i);
|
|
4905
|
+
if (h > 0) {
|
|
4906
|
+
i += h;
|
|
4884
4907
|
continue;
|
|
4885
4908
|
}
|
|
4886
4909
|
}
|
|
@@ -4893,14 +4916,14 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
4893
4916
|
continue;
|
|
4894
4917
|
}
|
|
4895
4918
|
r = !0;
|
|
4896
|
-
const l = e.slice(i, a + 1), c =
|
|
4919
|
+
const l = e.slice(i, a + 1), c = Au(l), u = /^<\s*\//.test(l), d = /\/\s*>$/.test(l);
|
|
4897
4920
|
if (!u && c === "sub") {
|
|
4898
|
-
const
|
|
4899
|
-
if (!
|
|
4921
|
+
const h = Cu(l, "alias");
|
|
4922
|
+
if (!h) {
|
|
4900
4923
|
n = !0, i = a + 1;
|
|
4901
4924
|
continue;
|
|
4902
4925
|
}
|
|
4903
|
-
An(t,
|
|
4926
|
+
An(t, h, null);
|
|
4904
4927
|
const p = e.toLowerCase().indexOf("</sub>", a + 1);
|
|
4905
4928
|
i = p >= 0 ? p + 6 : a + 1;
|
|
4906
4929
|
continue;
|
|
@@ -4913,16 +4936,16 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
4913
4936
|
i = a + 1;
|
|
4914
4937
|
continue;
|
|
4915
4938
|
}
|
|
4916
|
-
c && !
|
|
4939
|
+
c && !ku.has(c) && !io.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && oo(t), i = a + 1;
|
|
4917
4940
|
}
|
|
4918
|
-
const o =
|
|
4941
|
+
const o = xu(t);
|
|
4919
4942
|
return {
|
|
4920
4943
|
spokenText: D(o.text),
|
|
4921
4944
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
4922
4945
|
unsupportedSemantic: n,
|
|
4923
4946
|
hasMarkup: r
|
|
4924
4947
|
};
|
|
4925
|
-
},
|
|
4948
|
+
}, Mu = As(), Ws = /* @__PURE__ */ new Map([
|
|
4926
4949
|
["zero", "0"],
|
|
4927
4950
|
["one", "1"],
|
|
4928
4951
|
["two", "2"],
|
|
@@ -4934,7 +4957,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
4934
4957
|
["eight", "8"],
|
|
4935
4958
|
["nine", "9"],
|
|
4936
4959
|
["ten", "10"]
|
|
4937
|
-
]),
|
|
4960
|
+
]), Ou = [
|
|
4938
4961
|
{
|
|
4939
4962
|
phrase: [
|
|
4940
4963
|
"plus",
|
|
@@ -5011,7 +5034,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5011
5034
|
}
|
|
5012
5035
|
], Nr = (e) => {
|
|
5013
5036
|
const t = [];
|
|
5014
|
-
for (const n of e.matchAll(
|
|
5037
|
+
for (const n of e.matchAll(Mu)) {
|
|
5015
5038
|
const r = n[0], i = n.index ?? 0;
|
|
5016
5039
|
t.push({
|
|
5017
5040
|
text: r,
|
|
@@ -5021,7 +5044,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5021
5044
|
});
|
|
5022
5045
|
}
|
|
5023
5046
|
return t;
|
|
5024
|
-
}, Wr = (e) =>
|
|
5047
|
+
}, Wr = (e) => Ws.get(e.normalized) || e.normalized, Iu = (e, t) => {
|
|
5025
5048
|
const n = [];
|
|
5026
5049
|
for (let r = 0; r < e.length; r++) {
|
|
5027
5050
|
for (let i = 0; i < t.length; i++) Wr(e[r]) === Wr(t[i]) && n.push({
|
|
@@ -5030,7 +5053,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5030
5053
|
visibleToken: i,
|
|
5031
5054
|
score: 10
|
|
5032
5055
|
});
|
|
5033
|
-
for (const i of
|
|
5056
|
+
for (const i of Ou) {
|
|
5034
5057
|
const o = e.slice(r, r + i.phrase.length);
|
|
5035
5058
|
if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
|
|
5036
5059
|
for (let s = 0; s < t.length; s++)
|
|
@@ -5043,15 +5066,15 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5043
5066
|
}
|
|
5044
5067
|
}
|
|
5045
5068
|
return n;
|
|
5046
|
-
},
|
|
5047
|
-
const n =
|
|
5069
|
+
}, $u = (e, t) => {
|
|
5070
|
+
const n = Iu(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
|
|
5048
5071
|
for (let l = 0; l < n.length; l++) {
|
|
5049
5072
|
const c = n[l];
|
|
5050
5073
|
r[l] = c.score;
|
|
5051
5074
|
for (let u = 0; u < l; u++) {
|
|
5052
5075
|
const d = n[u];
|
|
5053
5076
|
if (d.spokenEndToken <= c.spokenStartToken && d.visibleToken < c.visibleToken) {
|
|
5054
|
-
const
|
|
5077
|
+
const h = c.spokenStartToken - d.spokenEndToken, p = c.visibleToken - d.visibleToken - 1, v = Math.max(0, Math.abs(h - p) - 2), b = r[u] + c.score - v;
|
|
5055
5078
|
b > r[l] && (r[l] = b, i[l] = u);
|
|
5056
5079
|
}
|
|
5057
5080
|
}
|
|
@@ -5073,12 +5096,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5073
5096
|
score: l.score
|
|
5074
5097
|
};
|
|
5075
5098
|
});
|
|
5076
|
-
},
|
|
5099
|
+
}, Ru = (e, t, n) => {
|
|
5077
5100
|
if (e.length === 0) return 0;
|
|
5078
5101
|
const r = e.length / Math.max(1, Math.min(t.length, n.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
5079
5102
|
return Math.min(1, r * i);
|
|
5080
|
-
},
|
|
5081
|
-
const t =
|
|
5103
|
+
}, zs = (e) => {
|
|
5104
|
+
const t = Ns(e.speechText), n = D(e.visibleText), r = t.spokenText, i = Nr(r), o = Nr(n), s = t.unsupportedSemantic ? [] : $u(i, o), a = Ru(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", d = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
5082
5105
|
return {
|
|
5083
5106
|
speechText: e.speechText,
|
|
5084
5107
|
spokenText: r,
|
|
@@ -5091,12 +5114,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5091
5114
|
visibleTokens: o,
|
|
5092
5115
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
|
|
5093
5116
|
};
|
|
5094
|
-
}, pi = (e, t) => e.find((n) => n.start <= t && t < n.end) || null,
|
|
5117
|
+
}, pi = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, Hs = (e) => {
|
|
5095
5118
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5096
5119
|
const t = Nr(e)[0];
|
|
5097
|
-
return t ?
|
|
5120
|
+
return t ? Ws.get(t.normalized) || t.normalized : null;
|
|
5098
5121
|
}, so = (e, t, n) => {
|
|
5099
|
-
const r =
|
|
5122
|
+
const r = Hs(n);
|
|
5100
5123
|
if (!t || !r) return !1;
|
|
5101
5124
|
const i = pi(e.spokenTokens, t.start);
|
|
5102
5125
|
return i ? Wr(i) === r : !1;
|
|
@@ -5124,7 +5147,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5124
5147
|
start: t,
|
|
5125
5148
|
length: Math.min(n, r.end - t)
|
|
5126
5149
|
} : null;
|
|
5127
|
-
},
|
|
5150
|
+
}, Lu = (e, t, n = 1, r) => {
|
|
5128
5151
|
if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
|
|
5129
5152
|
const i = Math.max(1, Number.isFinite(n) ? n : 1);
|
|
5130
5153
|
if (r && /^<[^>]+>$/.test(r.trim())) return null;
|
|
@@ -5133,12 +5156,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5133
5156
|
if (r) {
|
|
5134
5157
|
if (so(e, o, r)) return o;
|
|
5135
5158
|
if (so(e, s, r)) return s;
|
|
5136
|
-
if (
|
|
5159
|
+
if (Hs(r)) return null;
|
|
5137
5160
|
}
|
|
5138
5161
|
return o || s;
|
|
5139
5162
|
}
|
|
5140
5163
|
return co(e, t, i) || lo(e, t, i);
|
|
5141
|
-
},
|
|
5164
|
+
}, Pu = (e, t) => {
|
|
5142
5165
|
if (e.playbackMode === "region-fallback") return null;
|
|
5143
5166
|
const n = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
|
|
5144
5167
|
if (n) return {
|
|
@@ -5160,7 +5183,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5160
5183
|
start: Math.min(r.visibleStart, i.visibleStart),
|
|
5161
5184
|
end: Math.max(r.visibleEnd, i.visibleEnd)
|
|
5162
5185
|
} : null;
|
|
5163
|
-
},
|
|
5186
|
+
}, Nu = /* @__PURE__ */ new Map([
|
|
5164
5187
|
["+", ["plus"]],
|
|
5165
5188
|
["-", ["minus", "negative"]],
|
|
5166
5189
|
["−", ["minus", "negative"]],
|
|
@@ -5184,12 +5207,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5184
5207
|
["•", ["times"]],
|
|
5185
5208
|
["·", ["times"]],
|
|
5186
5209
|
["", ["times", "multiplied by"]]
|
|
5187
|
-
]),
|
|
5210
|
+
]), Wu = /* @__PURE__ */ new Map([
|
|
5188
5211
|
["", "function-application"],
|
|
5189
5212
|
["", "implicit-multiply"],
|
|
5190
5213
|
["", "invisible-separator"],
|
|
5191
5214
|
["", "invisible-plus"]
|
|
5192
|
-
]),
|
|
5215
|
+
]), Bs = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), zu = /* @__PURE__ */ new Map([
|
|
5193
5216
|
["msqrt", "radical"],
|
|
5194
5217
|
["mroot", "radical"],
|
|
5195
5218
|
["msub", "subscript"],
|
|
@@ -5199,11 +5222,11 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5199
5222
|
["munderover", "underoverscript"],
|
|
5200
5223
|
["mmultiscripts", "multiscript"],
|
|
5201
5224
|
["menclose", "enclosure"]
|
|
5202
|
-
]),
|
|
5225
|
+
]), Hu = (e) => e.replace(/\s+/g, " ").trim(), dt = (e) => (e.localName || e.tagName || "").toLowerCase(), Bu = (e) => e.nodeType === Node.ELEMENT_NODE, Rt = (e) => Array.from(e.childNodes).filter(Bu), gi = (e) => Hu(e.textContent || ""), Pe = (e, t) => ({
|
|
5203
5226
|
type: "element-range",
|
|
5204
5227
|
quality: t,
|
|
5205
5228
|
element: e
|
|
5206
|
-
}),
|
|
5229
|
+
}), Du = (e) => {
|
|
5207
5230
|
switch (e) {
|
|
5208
5231
|
case "mi":
|
|
5209
5232
|
return "identifier";
|
|
@@ -5219,15 +5242,15 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5219
5242
|
default:
|
|
5220
5243
|
return "unknown";
|
|
5221
5244
|
}
|
|
5222
|
-
},
|
|
5223
|
-
const t = e.normalized ??
|
|
5245
|
+
}, Fu = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), ju = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? Bs.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? Nu.get(e) || [] : [], vt = (e) => {
|
|
5246
|
+
const t = e.normalized ?? Fu(e.text, e.kind || "unknown");
|
|
5224
5247
|
return {
|
|
5225
5248
|
id: `math-token-${e.state.nextId++}`,
|
|
5226
5249
|
kind: e.kind,
|
|
5227
5250
|
role: e.role,
|
|
5228
5251
|
text: e.text,
|
|
5229
5252
|
normalized: t,
|
|
5230
|
-
spokenAliases:
|
|
5253
|
+
spokenAliases: ju(e.text, e.kind, e.role),
|
|
5231
5254
|
sourceElement: e.sourceElement,
|
|
5232
5255
|
path: e.path,
|
|
5233
5256
|
target: e.target || Pe(e.sourceElement, "element-range"),
|
|
@@ -5235,9 +5258,9 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5235
5258
|
};
|
|
5236
5259
|
}, mt = (e, t, n = "tokens") => {
|
|
5237
5260
|
e[n].push(t);
|
|
5238
|
-
},
|
|
5261
|
+
}, Ds = (e, t, n) => {
|
|
5239
5262
|
Rt(e).forEach((r, i) => Ne(r, t, `${n}/${dt(r)}[${i}]`));
|
|
5240
|
-
},
|
|
5263
|
+
}, qu = (e, t, n) => {
|
|
5241
5264
|
const r = Rt(e);
|
|
5242
5265
|
r[0] && Ne(r[0], t, `${n}/numerator`), mt(t, vt({
|
|
5243
5266
|
state: t,
|
|
@@ -5248,7 +5271,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5248
5271
|
path: n,
|
|
5249
5272
|
target: Pe(e, "element-range")
|
|
5250
5273
|
})), r[1] && Ne(r[1], t, `${n}/denominator`);
|
|
5251
|
-
},
|
|
5274
|
+
}, Vu = (e, t, n) => {
|
|
5252
5275
|
const r = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
|
|
5253
5276
|
mt(t, vt({
|
|
5254
5277
|
state: t,
|
|
@@ -5258,7 +5281,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5258
5281
|
sourceElement: e,
|
|
5259
5282
|
path: `${n}/open`,
|
|
5260
5283
|
target: Pe(e, "element-range")
|
|
5261
|
-
})),
|
|
5284
|
+
})), Ds(e, t, n), mt(t, vt({
|
|
5262
5285
|
state: t,
|
|
5263
5286
|
kind: "operator",
|
|
5264
5287
|
role: i === "|" ? "absolute-value-fence" : "close-fence",
|
|
@@ -5267,13 +5290,13 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5267
5290
|
path: `${n}/close`,
|
|
5268
5291
|
target: Pe(e, "element-range")
|
|
5269
5292
|
}));
|
|
5270
|
-
},
|
|
5293
|
+
}, Uu = (e, t, n) => {
|
|
5271
5294
|
const r = Rt(e);
|
|
5272
5295
|
r[0] && Ne(r[0], t, `${n}/base`);
|
|
5273
5296
|
const i = r[1];
|
|
5274
5297
|
if (!i) return;
|
|
5275
5298
|
const o = gi(i);
|
|
5276
|
-
if (
|
|
5299
|
+
if (Bs.has(o)) {
|
|
5277
5300
|
mt(t, vt({
|
|
5278
5301
|
state: t,
|
|
5279
5302
|
kind: "structure",
|
|
@@ -5287,7 +5310,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5287
5310
|
return;
|
|
5288
5311
|
}
|
|
5289
5312
|
Ne(i, t, `${n}/exponent`);
|
|
5290
|
-
},
|
|
5313
|
+
}, Gu = (e, t, n, r) => {
|
|
5291
5314
|
mt(t, vt({
|
|
5292
5315
|
state: t,
|
|
5293
5316
|
kind: "structure",
|
|
@@ -5298,7 +5321,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5298
5321
|
path: n,
|
|
5299
5322
|
target: Pe(e, "element-range")
|
|
5300
5323
|
}));
|
|
5301
|
-
},
|
|
5324
|
+
}, Ku = (e, t, n) => {
|
|
5302
5325
|
let r = 0;
|
|
5303
5326
|
for (const i of Rt(e))
|
|
5304
5327
|
(dt(i) === "mtr" || dt(i) === "mlabeledtr") && (r++, mt(t, vt({
|
|
@@ -5311,10 +5334,10 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5311
5334
|
path: `${n}/row[${r}]`,
|
|
5312
5335
|
target: Pe(i, "region-fallback")
|
|
5313
5336
|
}), "layoutTargets")), Ne(i, t, `${n}/${dt(i)}[${r}]`);
|
|
5314
|
-
},
|
|
5337
|
+
}, Yu = (e, t, n) => {
|
|
5315
5338
|
const r = gi(e);
|
|
5316
5339
|
if (!r) return;
|
|
5317
|
-
const i =
|
|
5340
|
+
const i = Du(dt(e)), o = i === "operator" ? Wu.get(r) : void 0, s = o ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
|
|
5318
5341
|
mt(t, vt({
|
|
5319
5342
|
state: t,
|
|
5320
5343
|
kind: i,
|
|
@@ -5345,19 +5368,19 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5345
5368
|
case "mtext":
|
|
5346
5369
|
case "ms":
|
|
5347
5370
|
case "mspace":
|
|
5348
|
-
|
|
5371
|
+
Yu(e, t, n);
|
|
5349
5372
|
return;
|
|
5350
5373
|
case "mfrac":
|
|
5351
|
-
|
|
5374
|
+
qu(e, t, n);
|
|
5352
5375
|
return;
|
|
5353
5376
|
case "msup":
|
|
5354
|
-
|
|
5377
|
+
Uu(e, t, n);
|
|
5355
5378
|
return;
|
|
5356
5379
|
case "mfenced":
|
|
5357
|
-
|
|
5380
|
+
Vu(e, t, n);
|
|
5358
5381
|
return;
|
|
5359
5382
|
case "mtable":
|
|
5360
|
-
|
|
5383
|
+
Ku(e, t, n);
|
|
5361
5384
|
return;
|
|
5362
5385
|
case "mphantom":
|
|
5363
5386
|
return;
|
|
@@ -5367,15 +5390,15 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5367
5390
|
return;
|
|
5368
5391
|
}
|
|
5369
5392
|
default: {
|
|
5370
|
-
const i =
|
|
5393
|
+
const i = zu.get(r);
|
|
5371
5394
|
if (i) {
|
|
5372
|
-
|
|
5395
|
+
Gu(e, t, n, i);
|
|
5373
5396
|
return;
|
|
5374
5397
|
}
|
|
5375
|
-
|
|
5398
|
+
Ds(e, t, n);
|
|
5376
5399
|
}
|
|
5377
5400
|
}
|
|
5378
|
-
},
|
|
5401
|
+
}, Xu = (e) => {
|
|
5379
5402
|
const t = {
|
|
5380
5403
|
tokens: [],
|
|
5381
5404
|
layoutTargets: [],
|
|
@@ -5386,7 +5409,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5386
5409
|
layoutTargets: t.layoutTargets,
|
|
5387
5410
|
expressionTarget: Pe(e, "region-fallback")
|
|
5388
5411
|
};
|
|
5389
|
-
},
|
|
5412
|
+
}, Ju = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Qu = 0.95, Zu = (e) => {
|
|
5390
5413
|
const t = [], n = /* @__PURE__ */ new Set(), r = (i) => {
|
|
5391
5414
|
const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
5392
5415
|
if (o.length === 0) return;
|
|
@@ -5411,11 +5434,11 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5411
5434
|
o && (r = i.length);
|
|
5412
5435
|
}
|
|
5413
5436
|
return r;
|
|
5414
|
-
},
|
|
5437
|
+
}, ed = (e, t) => {
|
|
5415
5438
|
const n = [];
|
|
5416
5439
|
let r = 0;
|
|
5417
5440
|
for (const i of t) {
|
|
5418
|
-
const o =
|
|
5441
|
+
const o = Zu(i);
|
|
5419
5442
|
if (i.optional) {
|
|
5420
5443
|
const s = uo(e, r, o);
|
|
5421
5444
|
s > 0 && (n.push({
|
|
@@ -5437,23 +5460,23 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5437
5460
|
}
|
|
5438
5461
|
}
|
|
5439
5462
|
return n;
|
|
5440
|
-
},
|
|
5463
|
+
}, td = (e, t, n) => {
|
|
5441
5464
|
const r = n.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
|
|
5442
5465
|
return r > 0 && i === r && o === t.length;
|
|
5443
|
-
},
|
|
5466
|
+
}, nd = (e) => e.map(({ speechTokens: t, math: n }) => ({
|
|
5444
5467
|
speechTokenIds: t.map((r) => r.id),
|
|
5445
5468
|
mathTokenIds: [n.id],
|
|
5446
5469
|
score: 1,
|
|
5447
5470
|
confidence: 1,
|
|
5448
5471
|
target: n.target
|
|
5449
|
-
})),
|
|
5450
|
-
const t = e.minExactWordConfidence ??
|
|
5472
|
+
})), rd = (e) => {
|
|
5473
|
+
const t = e.minExactWordConfidence ?? Qu, n = ed(e.speech.tokens, e.math.tokens), r = td(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5451
5474
|
return {
|
|
5452
|
-
segments: r >= t ?
|
|
5475
|
+
segments: r >= t ? nd(n) : [],
|
|
5453
5476
|
confidence: r,
|
|
5454
5477
|
fallbackTarget: e.math.expressionTarget
|
|
5455
5478
|
};
|
|
5456
|
-
},
|
|
5479
|
+
}, Fs = As(), id = /* @__PURE__ */ new Map([
|
|
5457
5480
|
["zero", "0"],
|
|
5458
5481
|
["one", "1"],
|
|
5459
5482
|
["two", "2"],
|
|
@@ -5465,17 +5488,17 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5465
5488
|
["eight", "8"],
|
|
5466
5489
|
["nine", "9"],
|
|
5467
5490
|
["ten", "10"]
|
|
5468
|
-
]),
|
|
5491
|
+
]), js = (e) => {
|
|
5469
5492
|
const t = e.toLowerCase();
|
|
5470
|
-
return
|
|
5471
|
-
},
|
|
5493
|
+
return id.get(t) || t;
|
|
5494
|
+
}, od = (e) => {
|
|
5472
5495
|
const t = [];
|
|
5473
|
-
for (const n of e.matchAll(
|
|
5496
|
+
for (const n of e.matchAll(Fs)) {
|
|
5474
5497
|
const r = n[0], i = n.index ?? 0;
|
|
5475
5498
|
t.push({
|
|
5476
5499
|
id: `speech-token-${t.length}`,
|
|
5477
5500
|
text: r,
|
|
5478
|
-
normalized:
|
|
5501
|
+
normalized: js(r),
|
|
5479
5502
|
start: i,
|
|
5480
5503
|
end: i + r.length,
|
|
5481
5504
|
sourceStart: i,
|
|
@@ -5485,11 +5508,11 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5485
5508
|
}
|
|
5486
5509
|
return t;
|
|
5487
5510
|
}, sn = (e) => {
|
|
5488
|
-
const t =
|
|
5511
|
+
const t = Ns(e.speechText);
|
|
5489
5512
|
return {
|
|
5490
5513
|
speechText: e.speechText,
|
|
5491
5514
|
spokenText: t.spokenText,
|
|
5492
|
-
tokens:
|
|
5515
|
+
tokens: od(t.spokenText),
|
|
5493
5516
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
|
|
5494
5517
|
boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
|
|
5495
5518
|
unsupportedSemantic: t.unsupportedSemantic,
|
|
@@ -5497,9 +5520,9 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5497
5520
|
};
|
|
5498
5521
|
}, vi = (e) => {
|
|
5499
5522
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5500
|
-
const t = e.match(
|
|
5501
|
-
return t?.[0] ?
|
|
5502
|
-
},
|
|
5523
|
+
const t = e.match(Fs);
|
|
5524
|
+
return t?.[0] ? js(t[0]) : null;
|
|
5525
|
+
}, sd = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, ad = (e, t) => {
|
|
5503
5526
|
const n = e.rawToSpokenOffsetMap.get(t);
|
|
5504
5527
|
if (n !== void 0) return n;
|
|
5505
5528
|
for (let r = t; r < e.speechText.length; r++) {
|
|
@@ -5510,7 +5533,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5510
5533
|
return null;
|
|
5511
5534
|
}, zr = (e, t, n) => {
|
|
5512
5535
|
if (t === null) return null;
|
|
5513
|
-
const r =
|
|
5536
|
+
const r = sd(e.tokens, t);
|
|
5514
5537
|
return r ? {
|
|
5515
5538
|
token: r,
|
|
5516
5539
|
start: t,
|
|
@@ -5520,9 +5543,9 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5520
5543
|
}, Hr = (e, t) => {
|
|
5521
5544
|
const n = vi(t);
|
|
5522
5545
|
return !!(e && n && e.token.normalized === n);
|
|
5523
|
-
},
|
|
5546
|
+
}, ld = (e) => {
|
|
5524
5547
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5525
|
-
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = zr(e.tokenization,
|
|
5548
|
+
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = zr(e.tokenization, ad(e.tokenization, e.position), t), r = zr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5526
5549
|
return Hr(n, e.boundaryWord) ? {
|
|
5527
5550
|
...n,
|
|
5528
5551
|
confidence: 1
|
|
@@ -5530,7 +5553,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5530
5553
|
...r,
|
|
5531
5554
|
confidence: 1
|
|
5532
5555
|
} : e.boundaryWord && vi(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
|
|
5533
|
-
},
|
|
5556
|
+
}, cd = (e) => {
|
|
5534
5557
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5535
5558
|
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = zr(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5536
5559
|
return Hr(n, e.boundaryWord) ? {
|
|
@@ -5538,27 +5561,27 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5538
5561
|
confidence: 1
|
|
5539
5562
|
} : e.boundaryWord && vi(e.boundaryWord) ? null : n;
|
|
5540
5563
|
}, Vn = (e) => {
|
|
5541
|
-
const t = sn({ speechText: e.speechText }), n =
|
|
5564
|
+
const t = sn({ speechText: e.speechText }), n = Xu(e.mathElement);
|
|
5542
5565
|
return {
|
|
5543
5566
|
speech: t,
|
|
5544
5567
|
math: n,
|
|
5545
|
-
result:
|
|
5568
|
+
result: rd({
|
|
5546
5569
|
speech: t,
|
|
5547
5570
|
math: n
|
|
5548
5571
|
})
|
|
5549
5572
|
};
|
|
5550
|
-
},
|
|
5551
|
-
const n =
|
|
5573
|
+
}, ud = (e, t) => {
|
|
5574
|
+
const n = cd({
|
|
5552
5575
|
tokenization: e.speech,
|
|
5553
5576
|
position: t.position,
|
|
5554
5577
|
length: t.length,
|
|
5555
5578
|
boundaryWord: t.boundaryWord
|
|
5556
5579
|
});
|
|
5557
|
-
return
|
|
5580
|
+
return Ju({
|
|
5558
5581
|
alignment: e.result,
|
|
5559
5582
|
boundary: n
|
|
5560
5583
|
});
|
|
5561
|
-
},
|
|
5584
|
+
}, dd = (e, t) => {
|
|
5562
5585
|
if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
5563
5586
|
const n = sn({ speechText: t.boundaryWord }).tokens[0];
|
|
5564
5587
|
if (!n) return null;
|
|
@@ -5567,7 +5590,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5567
5590
|
return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
|
|
5568
5591
|
});
|
|
5569
5592
|
return r.length === 1 ? r[0].target : null;
|
|
5570
|
-
}, Br = "http://www.w3.org/1998/Math/MathML",
|
|
5593
|
+
}, Br = "http://www.w3.org/1998/Math/MathML", hd = /* @__PURE__ */ new Set([
|
|
5571
5594
|
"math",
|
|
5572
5595
|
"maction",
|
|
5573
5596
|
"menclose",
|
|
@@ -5601,7 +5624,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5601
5624
|
"semantics",
|
|
5602
5625
|
"annotation",
|
|
5603
5626
|
"annotation-xml"
|
|
5604
|
-
]),
|
|
5627
|
+
]), fd = /* @__PURE__ */ new Set([
|
|
5605
5628
|
"accent",
|
|
5606
5629
|
"accentunder",
|
|
5607
5630
|
"align",
|
|
@@ -5653,44 +5676,44 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5653
5676
|
"width",
|
|
5654
5677
|
"xmlns",
|
|
5655
5678
|
"xml:lang"
|
|
5656
|
-
]),
|
|
5679
|
+
]), qs = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), pd = (e) => qs(e).replace(/"/g, """), gd = (e, t) => {
|
|
5657
5680
|
const n = e.toLowerCase(), r = t.trim().toLowerCase();
|
|
5658
|
-
return !!(n.startsWith("on") || !
|
|
5659
|
-
},
|
|
5681
|
+
return !!(n.startsWith("on") || !fd.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
|
|
5682
|
+
}, vd = (e) => {
|
|
5660
5683
|
const t = e.localName.toLowerCase();
|
|
5661
|
-
if (!
|
|
5684
|
+
if (!hd.has(t)) return !1;
|
|
5662
5685
|
const n = e.namespaceURI;
|
|
5663
5686
|
return !n || n === Br || n === "http://www.w3.org/1999/xhtml";
|
|
5664
|
-
},
|
|
5665
|
-
if (e.nodeType === Node.TEXT_NODE) return
|
|
5687
|
+
}, Vs = (e) => {
|
|
5688
|
+
if (e.nodeType === Node.TEXT_NODE) return qs(e.textContent || "");
|
|
5666
5689
|
if (e.nodeType === Node.COMMENT_NODE) return "";
|
|
5667
5690
|
if (e.nodeType !== Node.ELEMENT_NODE) return null;
|
|
5668
5691
|
const t = e;
|
|
5669
|
-
if (!
|
|
5692
|
+
if (!vd(t)) return null;
|
|
5670
5693
|
const n = t.localName.toLowerCase(), r = [];
|
|
5671
5694
|
for (const o of Array.from(t.attributes)) {
|
|
5672
5695
|
const s = o.name.toLowerCase();
|
|
5673
|
-
if (!
|
|
5696
|
+
if (!gd(s, o.value)) {
|
|
5674
5697
|
if (s === "xmlns" && o.value !== Br) return null;
|
|
5675
|
-
r.push(`${s}="${
|
|
5698
|
+
r.push(`${s}="${pd(o.value)}"`);
|
|
5676
5699
|
}
|
|
5677
5700
|
}
|
|
5678
5701
|
n === "math" && !r.some((o) => o.startsWith("xmlns=")) && r.unshift(`xmlns="${Br}"`);
|
|
5679
5702
|
const i = [];
|
|
5680
5703
|
for (const o of Array.from(t.childNodes)) {
|
|
5681
|
-
const s =
|
|
5704
|
+
const s = Vs(o);
|
|
5682
5705
|
if (s === null) return null;
|
|
5683
5706
|
i.push(s);
|
|
5684
5707
|
}
|
|
5685
5708
|
return `<${n}${r.length > 0 ? ` ${r.join(" ")}` : ""}>${i.join("")}</${n}>`;
|
|
5686
|
-
},
|
|
5709
|
+
}, md = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, yr = (e) => {
|
|
5687
5710
|
const t = String(e || "").trim();
|
|
5688
5711
|
if (!t) return null;
|
|
5689
|
-
const n =
|
|
5712
|
+
const n = md(t);
|
|
5690
5713
|
if (!n || n.getElementsByTagName("parsererror").length > 0) return null;
|
|
5691
5714
|
const r = n.documentElement;
|
|
5692
|
-
return !r || r.localName.toLowerCase() !== "math" ? null :
|
|
5693
|
-
},
|
|
5715
|
+
return !r || r.localName.toLowerCase() !== "math" ? null : Vs(r);
|
|
5716
|
+
}, Us = (e) => ({
|
|
5694
5717
|
chars: [],
|
|
5695
5718
|
map: /* @__PURE__ */ new Map(),
|
|
5696
5719
|
position: 0,
|
|
@@ -5698,28 +5721,28 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5698
5721
|
lastCharWasWhitespace: !1,
|
|
5699
5722
|
lastMapped: null,
|
|
5700
5723
|
options: e
|
|
5701
|
-
}),
|
|
5724
|
+
}), Gs = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Ks = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Ys = (e) => {
|
|
5702
5725
|
const t = e.tagName?.toLowerCase();
|
|
5703
5726
|
return t === "annotation" || t === "annotation-xml";
|
|
5704
|
-
},
|
|
5727
|
+
}, bd = (e) => {
|
|
5705
5728
|
const t = e.getAttribute("data-mathml");
|
|
5706
5729
|
return t && t.trim() ? t : null;
|
|
5707
|
-
},
|
|
5730
|
+
}, yd = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, _d = (e) => {
|
|
5708
5731
|
if (e.tagName.toLowerCase() === "math") return yr(e.outerHTML);
|
|
5709
|
-
const t =
|
|
5732
|
+
const t = bd(e);
|
|
5710
5733
|
if (t) {
|
|
5711
5734
|
const n = yr(t);
|
|
5712
5735
|
if (n) return n;
|
|
5713
5736
|
}
|
|
5714
|
-
if (
|
|
5715
|
-
const n =
|
|
5737
|
+
if (Gs(e)) {
|
|
5738
|
+
const n = yd(e);
|
|
5716
5739
|
if (n) {
|
|
5717
5740
|
const r = yr(n);
|
|
5718
5741
|
if (r) return r;
|
|
5719
5742
|
}
|
|
5720
5743
|
}
|
|
5721
5744
|
return null;
|
|
5722
|
-
},
|
|
5745
|
+
}, Td = /* @__PURE__ */ new Set([
|
|
5723
5746
|
"P",
|
|
5724
5747
|
"H1",
|
|
5725
5748
|
"H2",
|
|
@@ -5735,7 +5758,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5735
5758
|
"FIGCAPTION",
|
|
5736
5759
|
"LABEL",
|
|
5737
5760
|
"BUTTON"
|
|
5738
|
-
]),
|
|
5761
|
+
]), Sd = /* @__PURE__ */ new Set([
|
|
5739
5762
|
"heading",
|
|
5740
5763
|
"listitem",
|
|
5741
5764
|
"option",
|
|
@@ -5744,24 +5767,24 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5744
5767
|
"cell",
|
|
5745
5768
|
"columnheader",
|
|
5746
5769
|
"rowheader"
|
|
5747
|
-
]),
|
|
5770
|
+
]), wd = (e, t) => {
|
|
5748
5771
|
let n = e.parentElement, r = null;
|
|
5749
5772
|
for (; n && n !== t; ) {
|
|
5750
5773
|
const i = (n.getAttribute("role") || "").toLowerCase(), o = n.tagName.toUpperCase();
|
|
5751
|
-
if (
|
|
5774
|
+
if (Td.has(o) || Sd.has(i)) {
|
|
5752
5775
|
r = n;
|
|
5753
5776
|
break;
|
|
5754
5777
|
}
|
|
5755
5778
|
n = n.parentElement;
|
|
5756
5779
|
}
|
|
5757
5780
|
return r || t;
|
|
5758
|
-
},
|
|
5781
|
+
}, kd = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Gs(e), rt = (e, t, n) => {
|
|
5759
5782
|
/[.,;:!?]/.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), n ? (e.map.set(e.position, n), e.lastMapped = n) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
|
|
5760
|
-
},
|
|
5783
|
+
}, Xs = (e, t) => {
|
|
5761
5784
|
if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
|
|
5762
5785
|
const n = e.chars[e.chars.length - 1];
|
|
5763
|
-
return
|
|
5764
|
-
},
|
|
5786
|
+
return Ms(n, t, e.options);
|
|
5787
|
+
}, Js = (e, t) => {
|
|
5765
5788
|
const n = t.textContent || "";
|
|
5766
5789
|
let r = !1;
|
|
5767
5790
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -5780,7 +5803,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5780
5803
|
}), e.lastCharWasWhitespace = !0;
|
|
5781
5804
|
continue;
|
|
5782
5805
|
}
|
|
5783
|
-
!r &&
|
|
5806
|
+
!r && Xs(e, o) && rt(e, " ", {
|
|
5784
5807
|
node: t,
|
|
5785
5808
|
offset: i
|
|
5786
5809
|
}), rt(e, o, {
|
|
@@ -5788,7 +5811,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5788
5811
|
offset: i
|
|
5789
5812
|
}), r = !0, e.lastCharWasWhitespace = !1;
|
|
5790
5813
|
}
|
|
5791
|
-
},
|
|
5814
|
+
}, Ed = (e, t) => {
|
|
5792
5815
|
for (let n = 0; n < t.text.length; n++) {
|
|
5793
5816
|
const r = t.text[n], i = /\s/.test(r), o = t.map.get(n) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
|
|
5794
5817
|
node: o.node,
|
|
@@ -5805,7 +5828,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5805
5828
|
e.lastCharWasWhitespace || rt(e, " ", l), e.lastCharWasWhitespace = !0;
|
|
5806
5829
|
continue;
|
|
5807
5830
|
}
|
|
5808
|
-
n === 0 &&
|
|
5831
|
+
n === 0 && Xs(e, r) && rt(e, " ", l), rt(e, r, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
|
|
5809
5832
|
node: o.node,
|
|
5810
5833
|
offset: o.offset
|
|
5811
5834
|
}), e.lastMapped = {
|
|
@@ -5816,7 +5839,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5816
5839
|
offset: a
|
|
5817
5840
|
});
|
|
5818
5841
|
}
|
|
5819
|
-
},
|
|
5842
|
+
}, xd = (e) => {
|
|
5820
5843
|
if (typeof DOMParser > "u") return "";
|
|
5821
5844
|
const t = new DOMParser().parseFromString(e, "application/xml");
|
|
5822
5845
|
if (t.getElementsByTagName("parsererror").length > 0) return "";
|
|
@@ -5828,38 +5851,38 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5828
5851
|
}
|
|
5829
5852
|
if (i.nodeType !== 1) return;
|
|
5830
5853
|
const o = i;
|
|
5831
|
-
if (!
|
|
5854
|
+
if (!Ys(o))
|
|
5832
5855
|
for (const s of Array.from(o.childNodes)) r(s);
|
|
5833
5856
|
};
|
|
5834
5857
|
return r(t.documentElement), D(n.join(" "));
|
|
5835
|
-
},
|
|
5836
|
-
const r =
|
|
5858
|
+
}, Ad = (e, t, n) => {
|
|
5859
|
+
const r = Us(n), i = (a) => {
|
|
5837
5860
|
if (Pt(a, e)) return;
|
|
5838
5861
|
if (a.nodeType === 3) {
|
|
5839
|
-
|
|
5862
|
+
Js(r, a);
|
|
5840
5863
|
return;
|
|
5841
5864
|
}
|
|
5842
5865
|
if (a.nodeType !== 1) return;
|
|
5843
5866
|
const l = a;
|
|
5844
|
-
if (!(
|
|
5867
|
+
if (!(Ks(l) || Ys(l)))
|
|
5845
5868
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5846
5869
|
};
|
|
5847
|
-
i(e),
|
|
5870
|
+
i(e), Qs(r);
|
|
5848
5871
|
const o = D(r.chars.join(""));
|
|
5849
5872
|
if (o) return {
|
|
5850
5873
|
text: o,
|
|
5851
5874
|
map: r.map
|
|
5852
5875
|
};
|
|
5853
|
-
const s =
|
|
5876
|
+
const s = xd(t);
|
|
5854
5877
|
return s ? {
|
|
5855
5878
|
text: s,
|
|
5856
5879
|
map: /* @__PURE__ */ new Map()
|
|
5857
5880
|
} : jn(e, n);
|
|
5858
|
-
},
|
|
5881
|
+
}, Qs = (e) => {
|
|
5859
5882
|
for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
|
|
5860
5883
|
e.chars.pop(), e.position--, e.map.delete(e.position);
|
|
5861
|
-
},
|
|
5862
|
-
const n =
|
|
5884
|
+
}, Cd = (e, t) => {
|
|
5885
|
+
const n = Us(t), r = [];
|
|
5863
5886
|
let i = 0, o, s = !1;
|
|
5864
5887
|
const a = () => {
|
|
5865
5888
|
const u = D(n.chars.slice(i, n.chars.length).join(""));
|
|
@@ -5871,22 +5894,22 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5871
5894
|
}, l = (u) => {
|
|
5872
5895
|
if (Pt(u, e)) return;
|
|
5873
5896
|
if (u.nodeType === Node.TEXT_NODE) {
|
|
5874
|
-
const p =
|
|
5875
|
-
o && p !== o && a(), o = p,
|
|
5897
|
+
const p = wd(u, e);
|
|
5898
|
+
o && p !== o && a(), o = p, Js(n, u);
|
|
5876
5899
|
return;
|
|
5877
5900
|
}
|
|
5878
5901
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
5879
5902
|
const d = u;
|
|
5880
|
-
if (
|
|
5881
|
-
const
|
|
5882
|
-
if (
|
|
5903
|
+
if (Ks(d)) return;
|
|
5904
|
+
const h = _d(d);
|
|
5905
|
+
if (h) {
|
|
5883
5906
|
a();
|
|
5884
|
-
const p =
|
|
5885
|
-
|
|
5907
|
+
const p = Ad(d, h, t);
|
|
5908
|
+
Ed(n, p);
|
|
5886
5909
|
const v = D(p.text);
|
|
5887
5910
|
r.push({
|
|
5888
5911
|
type: "math",
|
|
5889
|
-
mathml:
|
|
5912
|
+
mathml: h,
|
|
5890
5913
|
fallbackText: v,
|
|
5891
5914
|
sourceElement: d
|
|
5892
5915
|
}), i = n.chars.length, s = !0;
|
|
@@ -5895,7 +5918,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5895
5918
|
for (const p of Array.from(d.childNodes)) l(p);
|
|
5896
5919
|
};
|
|
5897
5920
|
for (const u of Array.from(e.childNodes)) l(u);
|
|
5898
|
-
|
|
5921
|
+
Qs(n), a();
|
|
5899
5922
|
const c = n.chars.join("");
|
|
5900
5923
|
for (; n.map.has(c.length); ) n.map.delete(c.length);
|
|
5901
5924
|
return {
|
|
@@ -5905,7 +5928,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5905
5928
|
containsMathMarkup: s
|
|
5906
5929
|
};
|
|
5907
5930
|
}, Kt = (e, t) => {
|
|
5908
|
-
if (!
|
|
5931
|
+
if (!kd(e)) {
|
|
5909
5932
|
const { text: n, map: r } = jn(e, t);
|
|
5910
5933
|
return {
|
|
5911
5934
|
visibleText: n,
|
|
@@ -5917,8 +5940,8 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5917
5940
|
containsMathMarkup: !1
|
|
5918
5941
|
};
|
|
5919
5942
|
}
|
|
5920
|
-
return
|
|
5921
|
-
},
|
|
5943
|
+
return Cd(e, t);
|
|
5944
|
+
}, Md = (e, t) => Is([e], t), Od = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Id = /* @__PURE__ */ new Set([
|
|
5922
5945
|
"H1",
|
|
5923
5946
|
"H2",
|
|
5924
5947
|
"H3",
|
|
@@ -5928,17 +5951,17 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5928
5951
|
"LI",
|
|
5929
5952
|
"LABEL",
|
|
5930
5953
|
"BUTTON"
|
|
5931
|
-
]),
|
|
5954
|
+
]), $d = /* @__PURE__ */ new Set([
|
|
5932
5955
|
"heading",
|
|
5933
5956
|
"listitem",
|
|
5934
5957
|
"option",
|
|
5935
5958
|
"radio"
|
|
5936
|
-
]),
|
|
5959
|
+
]), Rd = (e) => {
|
|
5937
5960
|
if (e.type !== "text" || !e.sourceElement) return !1;
|
|
5938
5961
|
const t = e.sourceElement.tagName.toUpperCase(), n = (e.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
5939
|
-
return
|
|
5940
|
-
},
|
|
5941
|
-
const t = e.resolveMathSpeech ??
|
|
5962
|
+
return Id.has(t) || $d.has(n);
|
|
5963
|
+
}, Ld = async (e) => {
|
|
5964
|
+
const t = e.resolveMathSpeech ?? Md, { visibleText: n } = e, r = [];
|
|
5942
5965
|
let i = 0;
|
|
5943
5966
|
const o = (a) => {
|
|
5944
5967
|
const l = D(a), c = n.indexOf(l, i), u = c >= 0 ? c : i, d = u + l.length;
|
|
@@ -5950,7 +5973,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5950
5973
|
for (let a = 0; a < e.chunks.length; a++) {
|
|
5951
5974
|
const l = e.chunks[a];
|
|
5952
5975
|
if (l.type === "text") {
|
|
5953
|
-
const p =
|
|
5976
|
+
const p = Rd(l) ? [{
|
|
5954
5977
|
text: l.text,
|
|
5955
5978
|
offset: 0
|
|
5956
5979
|
}] : hi(l.text, { locale: e.language });
|
|
@@ -5974,28 +5997,28 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
5974
5997
|
language: e.language,
|
|
5975
5998
|
produceSsml: e.produceSsml,
|
|
5976
5999
|
mathSpeech: e.mathSpeech
|
|
5977
|
-
}), d = !u.speechText,
|
|
6000
|
+
}), d = !u.speechText, h = u.speechText || l.fallbackText;
|
|
5978
6001
|
r.push({
|
|
5979
6002
|
sourceChunkIndex: a,
|
|
5980
6003
|
segment: {
|
|
5981
6004
|
kind: "math",
|
|
5982
|
-
spokenText:
|
|
6005
|
+
spokenText: h,
|
|
5983
6006
|
mathml: l.mathml,
|
|
5984
6007
|
fallbackText: l.fallbackText,
|
|
5985
6008
|
visibleSpan: c,
|
|
5986
6009
|
usedFallback: d,
|
|
5987
6010
|
ssml: u.ssml
|
|
5988
6011
|
}
|
|
5989
|
-
}), s.push(
|
|
6012
|
+
}), s.push(h);
|
|
5990
6013
|
}
|
|
5991
6014
|
return {
|
|
5992
6015
|
segments: r,
|
|
5993
|
-
locale:
|
|
6016
|
+
locale: Od(e.language),
|
|
5994
6017
|
visibleText: n,
|
|
5995
6018
|
plainSpeechText: D(s.join(" "))
|
|
5996
6019
|
};
|
|
5997
|
-
},
|
|
5998
|
-
const t = Math.max(1, e.maxEntries ??
|
|
6020
|
+
}, Pd = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Nd = "sre-v1", Wd = 256, Dr = (e) => Array.isArray(e) ? `array:[${e.map(Dr).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Dr(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, ho = (e, t, n, r) => `${Nd}\0${Pd(e)}\0${t ? "ssml" : "plain"}\0${Dr(n ?? null)}\0${r}`, zd = (e = {}) => {
|
|
6021
|
+
const t = Math.max(1, e.maxEntries ?? Wd), n = e.resolve ?? ((o, s) => Is([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
5999
6022
|
for (r.delete(o), r.set(o, s); r.size > t; ) {
|
|
6000
6023
|
const a = r.keys().next().value;
|
|
6001
6024
|
a !== void 0 && r.delete(a);
|
|
@@ -6015,13 +6038,13 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6015
6038
|
usedFallback: d.usedFallback
|
|
6016
6039
|
}), i(c, d), d;
|
|
6017
6040
|
};
|
|
6018
|
-
},
|
|
6041
|
+
}, Hd = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : sn({ speechText: e }).tokens[0]?.normalized || null, Bd = (e, t) => {
|
|
6019
6042
|
const n = sn({ speechText: e.speechText });
|
|
6020
6043
|
if (!Number.isFinite(t.position)) return {
|
|
6021
6044
|
boundary: null,
|
|
6022
6045
|
spokenText: n.spokenText
|
|
6023
6046
|
};
|
|
6024
|
-
const r =
|
|
6047
|
+
const r = ld({
|
|
6025
6048
|
tokenization: n,
|
|
6026
6049
|
position: t.position,
|
|
6027
6050
|
length: t.length,
|
|
@@ -6034,8 +6057,8 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6034
6057
|
} : null,
|
|
6035
6058
|
spokenText: n.spokenText
|
|
6036
6059
|
};
|
|
6037
|
-
},
|
|
6038
|
-
const n =
|
|
6060
|
+
}, Dd = (e, t, n) => n ? sn({ speechText: e }).tokens.find((r) => r.start <= t && t < r.end)?.normalized === n : !0, Fd = (e, t) => {
|
|
6061
|
+
const n = Hd(t.word);
|
|
6039
6062
|
if (e.id !== t.chunkId) return {
|
|
6040
6063
|
chunkId: t.chunkId,
|
|
6041
6064
|
normalizedWord: n,
|
|
@@ -6054,12 +6077,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6054
6077
|
};
|
|
6055
6078
|
let r, i;
|
|
6056
6079
|
if (e.catalogAlignment)
|
|
6057
|
-
r =
|
|
6080
|
+
r = Lu(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
|
|
6058
6081
|
else {
|
|
6059
|
-
const o =
|
|
6082
|
+
const o = Bd(e, t);
|
|
6060
6083
|
r = o.boundary, i = o.spokenText;
|
|
6061
6084
|
}
|
|
6062
|
-
return r ?
|
|
6085
|
+
return r ? Dd(i, r.start, n) ? {
|
|
6063
6086
|
chunkId: e.id,
|
|
6064
6087
|
normalizedWord: n,
|
|
6065
6088
|
chunkSpokenStart: r.start,
|
|
@@ -6099,12 +6122,12 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6099
6122
|
quality: "region",
|
|
6100
6123
|
confidence: e.confidence,
|
|
6101
6124
|
reason: e.reason
|
|
6102
|
-
},
|
|
6125
|
+
}, Zs = /* @__PURE__ */ new Map([
|
|
6103
6126
|
["mi", "mjx-mi"],
|
|
6104
6127
|
["mn", "mjx-mn"],
|
|
6105
6128
|
["mo", "mjx-mo"],
|
|
6106
6129
|
["mtext", "mjx-mtext"]
|
|
6107
|
-
]), Fr = "mi,mn,mo,mtext",
|
|
6130
|
+
]), Fr = "mi,mn,mo,mtext", ea = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", ta = [
|
|
6108
6131
|
"mjx-mfrac",
|
|
6109
6132
|
"mjx-msqrt",
|
|
6110
6133
|
"mjx-mroot",
|
|
@@ -6112,14 +6135,14 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6112
6135
|
"mjx-munder",
|
|
6113
6136
|
"mjx-mover",
|
|
6114
6137
|
"mjx-munderover"
|
|
6115
|
-
].join(","),
|
|
6138
|
+
].join(","), na = (e) => e.type === "text-range" ? e.node.parentElement : e.element, tr = (e) => {
|
|
6116
6139
|
let t = e;
|
|
6117
6140
|
for (; t; ) {
|
|
6118
6141
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
6119
6142
|
t = t.parentElement;
|
|
6120
6143
|
}
|
|
6121
6144
|
return null;
|
|
6122
|
-
}, fo = (e) => !e || tr(e) ? !1 : !Pt(e),
|
|
6145
|
+
}, fo = (e) => !e || tr(e) ? !1 : !Pt(e), ra = (e) => {
|
|
6123
6146
|
const t = e.getBoundingClientRect?.();
|
|
6124
6147
|
return !!(t && t.width > 0 && t.height > 0);
|
|
6125
6148
|
}, jr = (e) => {
|
|
@@ -6129,38 +6152,38 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6129
6152
|
t = t.parentElement;
|
|
6130
6153
|
}
|
|
6131
6154
|
return null;
|
|
6132
|
-
},
|
|
6155
|
+
}, ia = (e, t) => {
|
|
6133
6156
|
if (e.length === 0 || e.length !== t.length) return !1;
|
|
6134
6157
|
for (let n = 0; n < e.length; n += 1) {
|
|
6135
|
-
const r =
|
|
6158
|
+
const r = Zs.get(e[n].localName.toLowerCase());
|
|
6136
6159
|
if (!r || t[n].localName.toLowerCase() !== r) return !1;
|
|
6137
6160
|
}
|
|
6138
6161
|
return !0;
|
|
6139
|
-
},
|
|
6140
|
-
if (!e || !
|
|
6162
|
+
}, jd = (e, t) => {
|
|
6163
|
+
if (!e || !Zs.has(e.localName.toLowerCase()) || t.querySelector(ta)) return null;
|
|
6141
6164
|
const n = jr(e), r = t.querySelector("mjx-math");
|
|
6142
6165
|
if (!n || !r) return null;
|
|
6143
6166
|
const i = Array.from(n.querySelectorAll(Fr)), o = i.indexOf(e);
|
|
6144
6167
|
if (o < 0) return null;
|
|
6145
|
-
const s = Array.from(r.querySelectorAll(
|
|
6146
|
-
if (!
|
|
6168
|
+
const s = Array.from(r.querySelectorAll(ea));
|
|
6169
|
+
if (!ia(i, s)) return null;
|
|
6147
6170
|
const a = s[o];
|
|
6148
|
-
return !a || !
|
|
6149
|
-
},
|
|
6171
|
+
return !a || !ra(a) ? null : a;
|
|
6172
|
+
}, qd = (e) => {
|
|
6150
6173
|
const t = tr(e);
|
|
6151
6174
|
if (t) {
|
|
6152
|
-
if (t.querySelector(
|
|
6175
|
+
if (t.querySelector(ta)) return "expression";
|
|
6153
6176
|
const r = jr(e) ?? e, i = t.querySelector("mjx-math");
|
|
6154
6177
|
if (!i) return "expression";
|
|
6155
|
-
const o = Array.from(r.querySelectorAll(Fr)), s = Array.from(i.querySelectorAll(
|
|
6156
|
-
return
|
|
6178
|
+
const o = Array.from(r.querySelectorAll(Fr)), s = Array.from(i.querySelectorAll(ea));
|
|
6179
|
+
return ia(o, s) && s.some((a) => ra(a)) ? "token" : "expression";
|
|
6157
6180
|
}
|
|
6158
6181
|
const n = jr(e) ?? e;
|
|
6159
6182
|
return Array.from(n.querySelectorAll(Fr)).some((r) => !Pt(r)) ? "token" : "expression";
|
|
6160
6183
|
}, qr = (e) => {
|
|
6161
|
-
const t =
|
|
6184
|
+
const t = na(e), n = tr(t);
|
|
6162
6185
|
if (n) {
|
|
6163
|
-
const r =
|
|
6186
|
+
const r = jd(t, n);
|
|
6164
6187
|
return r ? {
|
|
6165
6188
|
type: "element",
|
|
6166
6189
|
quality: "semantic-token",
|
|
@@ -6182,24 +6205,24 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6182
6205
|
quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
|
|
6183
6206
|
element: e.element
|
|
6184
6207
|
} : null;
|
|
6185
|
-
},
|
|
6208
|
+
}, Vd = qr, Ud = () => {
|
|
6186
6209
|
const e = /* @__PURE__ */ new WeakMap();
|
|
6187
6210
|
return (t) => {
|
|
6188
|
-
const n =
|
|
6211
|
+
const n = na(t), r = tr(n);
|
|
6189
6212
|
if (!n || !r) return qr(t);
|
|
6190
6213
|
if (e.has(n)) return e.get(n) ?? null;
|
|
6191
6214
|
const i = qr(t);
|
|
6192
6215
|
return e.set(n, i), i;
|
|
6193
6216
|
};
|
|
6194
|
-
},
|
|
6217
|
+
}, Gd = (e, t, n, r = e.mathAlignments, i = Vd) => {
|
|
6195
6218
|
if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
|
|
6196
6219
|
let o = null;
|
|
6197
6220
|
for (const s of r) {
|
|
6198
|
-
const a =
|
|
6221
|
+
const a = ud(s.alignment, {
|
|
6199
6222
|
position: t.chunkSpokenStart,
|
|
6200
6223
|
length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
|
|
6201
6224
|
boundaryWord: n.word
|
|
6202
|
-
}) ||
|
|
6225
|
+
}) || dd(s.alignment, { boundaryWord: n.word });
|
|
6203
6226
|
if (!a) continue;
|
|
6204
6227
|
const l = i(a);
|
|
6205
6228
|
if (l) {
|
|
@@ -6208,7 +6231,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6208
6231
|
}
|
|
6209
6232
|
}
|
|
6210
6233
|
return o;
|
|
6211
|
-
},
|
|
6234
|
+
}, oa = (e, t, n) => {
|
|
6212
6235
|
if (!e || typeof document > "u" || n <= t) return null;
|
|
6213
6236
|
const r = e.get(t);
|
|
6214
6237
|
let i = e.get(Math.max(t, n - 1));
|
|
@@ -6220,17 +6243,17 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6220
6243
|
} catch {
|
|
6221
6244
|
return null;
|
|
6222
6245
|
}
|
|
6223
|
-
},
|
|
6246
|
+
}, Kd = (e, t) => {
|
|
6224
6247
|
if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
|
|
6225
|
-
const n =
|
|
6248
|
+
const n = Pu(e.catalogAlignment, t.chunkSpokenStart);
|
|
6226
6249
|
if (!n) return null;
|
|
6227
|
-
const r =
|
|
6250
|
+
const r = oa(e.visibleMap, n.start, n.end);
|
|
6228
6251
|
return r ? {
|
|
6229
6252
|
type: "range",
|
|
6230
6253
|
quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
|
|
6231
6254
|
range: r
|
|
6232
6255
|
} : null;
|
|
6233
|
-
},
|
|
6256
|
+
}, Yd = (e) => e.regionRange ? {
|
|
6234
6257
|
type: "range",
|
|
6235
6258
|
quality: "region",
|
|
6236
6259
|
range: e.regionRange
|
|
@@ -6242,7 +6265,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6242
6265
|
if (t.length !== 1) return null;
|
|
6243
6266
|
const n = t[0]?.alignment.result.fallbackTarget;
|
|
6244
6267
|
return n ? e.renderedMathTargetResolver(n) : null;
|
|
6245
|
-
},
|
|
6268
|
+
}, Xd = (e, t) => e ? t.mathAlignments.filter(({ element: n }) => {
|
|
6246
6269
|
try {
|
|
6247
6270
|
return e.type === "range" ? e.range.intersectsNode(n) : e.type === "element" ? e.element === n || e.element.contains(n) : e.node.parentElement?.contains(n) || !1;
|
|
6248
6271
|
} catch {
|
|
@@ -6254,18 +6277,18 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6254
6277
|
quality: "region",
|
|
6255
6278
|
confidence: 0,
|
|
6256
6279
|
reason: "boundary chunk id was not found"
|
|
6257
|
-
}), vo = (e) => e.length === 1 ? e[0].element : null,
|
|
6280
|
+
}), vo = (e) => e.length === 1 ? e[0].element : null, Jd = (e, t) => t.length > 0 && t.every(({ element: n }) => e.mathCapabilityByElement.get(n) === "token"), Qd = 3, Zd = (e, t, n) => {
|
|
6258
6281
|
if (!t || t.type !== "range") return !1;
|
|
6259
6282
|
const { startContainer: r, endContainer: i } = t.range;
|
|
6260
|
-
return r === i && r.nodeType ===
|
|
6261
|
-
},
|
|
6283
|
+
return r === i && r.nodeType === Qd ? !1 : n.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(r) && o.contains(i));
|
|
6284
|
+
}, eh = (e, t) => ({
|
|
6262
6285
|
chunk: e,
|
|
6263
|
-
regionTarget:
|
|
6264
|
-
renderedMathTargetResolver:
|
|
6265
|
-
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ?
|
|
6286
|
+
regionTarget: Yd(e),
|
|
6287
|
+
renderedMathTargetResolver: Ud(),
|
|
6288
|
+
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? qd(n) : "expression"])),
|
|
6266
6289
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
6267
|
-
}),
|
|
6268
|
-
const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id,
|
|
6290
|
+
}), th = (e) => {
|
|
6291
|
+
const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, eh(r, t)]));
|
|
6269
6292
|
return {
|
|
6270
6293
|
chunks: e.chunks,
|
|
6271
6294
|
resolveInitial(r) {
|
|
@@ -6289,10 +6312,10 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6289
6312
|
resolveBoundary(r) {
|
|
6290
6313
|
const i = n.get(r.chunkId);
|
|
6291
6314
|
if (!i) return go();
|
|
6292
|
-
const { chunk: o } = i, s =
|
|
6315
|
+
const { chunk: o } = i, s = Fd(o, r), a = Kd(o, s), l = Xd(a, o), c = (!a || l.length > 0 ? Gd(o, s, r, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, d = c && c.quality === "expression" ? c : null;
|
|
6293
6316
|
if (u) {
|
|
6294
|
-
const
|
|
6295
|
-
return
|
|
6317
|
+
const h = vo(l);
|
|
6318
|
+
return h && i.heldTokenByElement.set(h, u), St({
|
|
6296
6319
|
semanticTarget: u,
|
|
6297
6320
|
expressionTarget: null,
|
|
6298
6321
|
regionTarget: i.regionTarget,
|
|
@@ -6300,15 +6323,15 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6300
6323
|
reason: s.reason
|
|
6301
6324
|
});
|
|
6302
6325
|
}
|
|
6303
|
-
if (a && (t ? !
|
|
6326
|
+
if (a && (t ? !Zd(i, a, l) : l.length === 0)) return St({
|
|
6304
6327
|
semanticTarget: a,
|
|
6305
6328
|
expressionTarget: null,
|
|
6306
6329
|
regionTarget: i.regionTarget,
|
|
6307
6330
|
confidence: s.confidence,
|
|
6308
6331
|
reason: s.reason
|
|
6309
6332
|
});
|
|
6310
|
-
if (
|
|
6311
|
-
const
|
|
6333
|
+
if (Jd(i, l)) {
|
|
6334
|
+
const h = vo(l), p = h ? i.heldTokenByElement.get(h) ?? null : null;
|
|
6312
6335
|
return St({
|
|
6313
6336
|
semanticTarget: p,
|
|
6314
6337
|
expressionTarget: null,
|
|
@@ -6326,14 +6349,14 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6326
6349
|
});
|
|
6327
6350
|
}
|
|
6328
6351
|
};
|
|
6329
|
-
},
|
|
6352
|
+
}, nh = (e) => {
|
|
6330
6353
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
6331
6354
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
6332
6355
|
return t || "plain-spoken-text";
|
|
6333
|
-
},
|
|
6356
|
+
}, rh = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
6334
6357
|
element: e.sourceElement,
|
|
6335
6358
|
alignment: e.mathAlignment
|
|
6336
|
-
}] : [],
|
|
6359
|
+
}] : [], ih = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
6337
6360
|
speechText: e.speechText || "",
|
|
6338
6361
|
visibleText: e.visibleText || e.speechText || "",
|
|
6339
6362
|
sourceElement: e.sourceElement || e.contentRoot,
|
|
@@ -6350,9 +6373,9 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6350
6373
|
regionRange: t.regionRange,
|
|
6351
6374
|
visibleMap: t.visibleMap,
|
|
6352
6375
|
catalogAlignment: t.alignment,
|
|
6353
|
-
mathAlignments:
|
|
6354
|
-
offsetSpace:
|
|
6355
|
-
})),
|
|
6376
|
+
mathAlignments: rh(t),
|
|
6377
|
+
offsetSpace: nh(t)
|
|
6378
|
+
})), oh = [
|
|
6356
6379
|
"[data-pie-tts-region]",
|
|
6357
6380
|
"[data-catalog-region]",
|
|
6358
6381
|
"li",
|
|
@@ -6362,18 +6385,18 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6362
6385
|
"[role='group']",
|
|
6363
6386
|
"[role='region']",
|
|
6364
6387
|
"div"
|
|
6365
|
-
].join(","),
|
|
6366
|
-
const n = e.closest(
|
|
6388
|
+
].join(","), sa = (e, t) => {
|
|
6389
|
+
const n = e.closest(oh);
|
|
6367
6390
|
return n && t.contains(n) ? n : e;
|
|
6368
|
-
},
|
|
6391
|
+
}, sh = (e, t, n) => {
|
|
6369
6392
|
const r = /* @__PURE__ */ new Map();
|
|
6370
6393
|
for (let i = t; i < n; i++) {
|
|
6371
6394
|
const o = e.get(i);
|
|
6372
6395
|
o && r.set(i - t, o);
|
|
6373
6396
|
}
|
|
6374
6397
|
return r;
|
|
6375
|
-
},
|
|
6376
|
-
const t = Kt(e.contentRoot, e.textProcessingOptions), n = await
|
|
6398
|
+
}, ah = async (e) => {
|
|
6399
|
+
const t = Kt(e.contentRoot, e.textProcessingOptions), n = await Ld({
|
|
6377
6400
|
chunks: t.chunks,
|
|
6378
6401
|
visibleText: t.visibleText,
|
|
6379
6402
|
language: e.language,
|
|
@@ -6391,8 +6414,8 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6391
6414
|
segment: r,
|
|
6392
6415
|
anchor: {
|
|
6393
6416
|
sourceElement: a,
|
|
6394
|
-
regionElement:
|
|
6395
|
-
visibleMap:
|
|
6417
|
+
regionElement: sa(a, e.contentRoot),
|
|
6418
|
+
visibleMap: sh(t.map, r.visibleSpan.start, r.visibleSpan.end)
|
|
6396
6419
|
}
|
|
6397
6420
|
};
|
|
6398
6421
|
}
|
|
@@ -6412,8 +6435,8 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6412
6435
|
containsMathMarkup: t.containsMathMarkup,
|
|
6413
6436
|
visibleText: t.visibleText
|
|
6414
6437
|
};
|
|
6415
|
-
},
|
|
6416
|
-
const n =
|
|
6438
|
+
}, lh = (e, t) => {
|
|
6439
|
+
const n = zs({
|
|
6417
6440
|
speechText: e.spokenText,
|
|
6418
6441
|
visibleText: e.spokenText
|
|
6419
6442
|
});
|
|
@@ -6422,13 +6445,13 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6422
6445
|
visibleText: e.visibleText,
|
|
6423
6446
|
sourceElement: t.sourceElement,
|
|
6424
6447
|
regionElement: t.regionElement,
|
|
6425
|
-
regionRange:
|
|
6448
|
+
regionRange: oa(t.visibleMap, 0, e.visibleText.length) ?? void 0,
|
|
6426
6449
|
speechMatchesVisibleText: !0,
|
|
6427
6450
|
playbackMode: n.playbackMode,
|
|
6428
6451
|
alignment: n,
|
|
6429
6452
|
visibleMap: t.visibleMap
|
|
6430
6453
|
};
|
|
6431
|
-
},
|
|
6454
|
+
}, aa = (e, t) => {
|
|
6432
6455
|
const n = t.sourceElement;
|
|
6433
6456
|
return {
|
|
6434
6457
|
speechText: e.spokenText,
|
|
@@ -6441,7 +6464,7 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6441
6464
|
speechText: e.spokenText
|
|
6442
6465
|
}) : void 0
|
|
6443
6466
|
};
|
|
6444
|
-
},
|
|
6467
|
+
}, ch = (e, t, n) => {
|
|
6445
6468
|
const r = t.sourceElement;
|
|
6446
6469
|
return {
|
|
6447
6470
|
speechText: n,
|
|
@@ -6453,15 +6476,15 @@ var _u = /* @__PURE__ */ new Set([
|
|
|
6453
6476
|
mathElement: r,
|
|
6454
6477
|
speechText: n
|
|
6455
6478
|
}) : void 0,
|
|
6456
|
-
plainFallback:
|
|
6479
|
+
plainFallback: aa(e, t)
|
|
6457
6480
|
};
|
|
6458
|
-
},
|
|
6481
|
+
}, uh = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? lh(n, r) : t.format === "ssml" && n.ssml ? ch(n, r, n.ssml) : aa(n, r)), dh = "pie-tts-control-handoff", P;
|
|
6459
6482
|
(function(e) {
|
|
6460
6483
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
6461
6484
|
})(P || (P = {}));
|
|
6462
|
-
var
|
|
6485
|
+
var hh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, fh = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? hh(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, ph = class Vr {
|
|
6463
6486
|
constructor() {
|
|
6464
|
-
m(this, "currentProvider", null), m(this, "provider", null), m(this, "highlightCoordinator", null), m(this, "catalogResolver", null), m(this, "state", P.IDLE), m(this, "ttsConfig", {}), m(this, "currentText", null), m(this, "currentContentElement", null), m(this, "normalizedToDOM", /* @__PURE__ */ new Map()), m(this, "listeners", /* @__PURE__ */ new Map()), m(this, "lastError", null), m(this, "speakRunId", 0), m(this, "currentBoundaryOffset", 0), m(this, "seekSegments", []), m(this, "sentenceHighlightSegments", []), m(this, "currentSeekSegmentIndex", 0), m(this, "activeSentenceStartOffset", null), m(this, "activeHighlightMode", "word"), m(this, "lastRenderedRegionTarget", null), m(this, "telemetryReporter", null), m(this, "generatedMathSpeechResolver",
|
|
6487
|
+
m(this, "currentProvider", null), m(this, "provider", null), m(this, "highlightCoordinator", null), m(this, "catalogResolver", null), m(this, "state", P.IDLE), m(this, "ttsConfig", {}), m(this, "currentText", null), m(this, "currentContentElement", null), m(this, "normalizedToDOM", /* @__PURE__ */ new Map()), m(this, "listeners", /* @__PURE__ */ new Map()), m(this, "lastError", null), m(this, "speakRunId", 0), m(this, "currentBoundaryOffset", 0), m(this, "seekSegments", []), m(this, "sentenceHighlightSegments", []), m(this, "currentSeekSegmentIndex", 0), m(this, "activeSentenceStartOffset", null), m(this, "activeHighlightMode", "word"), m(this, "lastRenderedRegionTarget", null), m(this, "telemetryReporter", null), m(this, "generatedMathSpeechResolver", zd());
|
|
6465
6488
|
}
|
|
6466
6489
|
debugLog(t, n) {
|
|
6467
6490
|
Vr.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
|
|
@@ -6584,7 +6607,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6584
6607
|
return t.includes("<") ? /<\s*break\b|<\s*speak\b|<\s*prosody\b|<\s*p\b|<\s*s\b/i.test(t) : !1;
|
|
6585
6608
|
}
|
|
6586
6609
|
isElementHidden(t) {
|
|
6587
|
-
return
|
|
6610
|
+
return Cs(t);
|
|
6588
6611
|
}
|
|
6589
6612
|
getBoundaryStrength(t) {
|
|
6590
6613
|
const n = Number(t.getAttribute("data-tts-break-ms"));
|
|
@@ -6637,8 +6660,8 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6637
6660
|
for (; a; ) {
|
|
6638
6661
|
const c = a, u = c.parentElement;
|
|
6639
6662
|
if (u && !this.isElementHidden(u)) {
|
|
6640
|
-
const d = this.getBoundaryAnchor(c, t),
|
|
6641
|
-
d &&
|
|
6663
|
+
const d = this.getBoundaryAnchor(c, t), h = o.get(c);
|
|
6664
|
+
d && h !== void 0 && d.anchor !== l && h > 0 && (r.set(h, Math.max(r.get(h) || 0, d.units)), l = d.anchor);
|
|
6642
6665
|
}
|
|
6643
6666
|
a = s.nextNode();
|
|
6644
6667
|
}
|
|
@@ -6653,12 +6676,12 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6653
6676
|
const r = Array.from(n.keys()).filter((l) => l > 0 && l < t.length).sort((l, c) => l - c), i = [];
|
|
6654
6677
|
let o = 0;
|
|
6655
6678
|
for (const l of r) {
|
|
6656
|
-
const c = t.substring(o, l), u = c.match(/^\s*/)?.[0].length || 0, d = c.match(/\s*$/)?.[0].length || 0,
|
|
6657
|
-
if (p >
|
|
6658
|
-
const v = t.substring(
|
|
6679
|
+
const c = t.substring(o, l), u = c.match(/^\s*/)?.[0].length || 0, d = c.match(/\s*$/)?.[0].length || 0, h = o + u, p = l - d;
|
|
6680
|
+
if (p > h) {
|
|
6681
|
+
const v = t.substring(h, p);
|
|
6659
6682
|
i.push({
|
|
6660
6683
|
text: v,
|
|
6661
|
-
startOffset:
|
|
6684
|
+
startOffset: h,
|
|
6662
6685
|
pauseMsAfter: this.resolvePauseMsFromUnits(n.get(l) || 0)
|
|
6663
6686
|
});
|
|
6664
6687
|
}
|
|
@@ -6697,7 +6720,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6697
6720
|
}
|
|
6698
6721
|
let u = a;
|
|
6699
6722
|
for (const d of [...c, l]) {
|
|
6700
|
-
const
|
|
6723
|
+
const h = r.substring(u, d), p = h.match(/^\s*/)?.[0].length || 0, v = h.match(/\s*$/)?.[0].length || 0, b = u + p, g = d - v;
|
|
6701
6724
|
g > b && o.push({
|
|
6702
6725
|
text: r.substring(b, g),
|
|
6703
6726
|
startOffset: b,
|
|
@@ -6799,7 +6822,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6799
6822
|
if (await this.applyLanguageSettings(n), r !== this.speakRunId) return;
|
|
6800
6823
|
const i = await this.resolveSpeechContent(t, n);
|
|
6801
6824
|
if (r !== this.speakRunId) return;
|
|
6802
|
-
const { contentToSpeak: o, speechText: s, highlightText: a, normalizedText: l, usedCatalogSpoken: c, speechSource: u, speechMatchesVisibleText: d, speechChunks:
|
|
6825
|
+
const { contentToSpeak: o, speechText: s, highlightText: a, normalizedText: l, usedCatalogSpoken: c, speechSource: u, speechMatchesVisibleText: d, speechChunks: h } = i;
|
|
6803
6826
|
this.logResolvedSpeechContent({
|
|
6804
6827
|
contentToSpeak: o,
|
|
6805
6828
|
speechSource: u,
|
|
@@ -6825,7 +6848,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6825
6848
|
runId: r,
|
|
6826
6849
|
highlightMode: p,
|
|
6827
6850
|
contentToSpeak: s,
|
|
6828
|
-
speechChunks:
|
|
6851
|
+
speechChunks: h
|
|
6829
6852
|
}), r !== this.speakRunId) return;
|
|
6830
6853
|
this.setState(P.IDLE), this.clearHighlightsAndTracking();
|
|
6831
6854
|
} catch (i) {
|
|
@@ -6836,7 +6859,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6836
6859
|
}
|
|
6837
6860
|
async switchProviderToBrowser(t, n) {
|
|
6838
6861
|
if (!this.currentProvider) return !1;
|
|
6839
|
-
const r = new
|
|
6862
|
+
const r = new Es(), i = this.currentProvider.providerId, o = { ...this.ttsConfig }, s = n?.operation || "tts-initialize", a = n?.contentToSpeak ?? "", l = a.replace(/\s+/g, " ").trim().slice(0, 120), c = a.length > 0 ? {
|
|
6840
6863
|
textLength: a.length,
|
|
6841
6864
|
textPreview: l.length < a.length ? `${l}…` : l
|
|
6842
6865
|
} : {};
|
|
@@ -6975,9 +6998,9 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6975
6998
|
context: n.catalogContext
|
|
6976
6999
|
}) : null;
|
|
6977
7000
|
}, a = (u, d) => {
|
|
6978
|
-
const
|
|
6979
|
-
if (
|
|
6980
|
-
const p =
|
|
7001
|
+
const h = l(u);
|
|
7002
|
+
if (h.length !== 1) return null;
|
|
7003
|
+
const p = h[0], v = Kt(p, this.getTextProcessingOptions(n.language)).visibleText || D(p.textContent || ""), b = (g) => D(g).replace(/\s+/g, "");
|
|
6981
7004
|
return b(v) === b(d) ? p : null;
|
|
6982
7005
|
}, l = (u) => {
|
|
6983
7006
|
const d = Array.from(u.querySelectorAll("math"));
|
|
@@ -6989,27 +7012,27 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6989
7012
|
return;
|
|
6990
7013
|
}
|
|
6991
7014
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
6992
|
-
const d = u,
|
|
6993
|
-
if (
|
|
7015
|
+
const d = u, h = s(d);
|
|
7016
|
+
if (h) {
|
|
6994
7017
|
o();
|
|
6995
|
-
const p = Kt(d, this.getTextProcessingOptions(n.language)), v = p.visibleText || D(d.textContent || ""), b =
|
|
6996
|
-
speechText:
|
|
7018
|
+
const p = Kt(d, this.getTextProcessingOptions(n.language)), v = p.visibleText || D(d.textContent || ""), b = zs({
|
|
7019
|
+
speechText: h.content,
|
|
6997
7020
|
visibleText: v
|
|
6998
7021
|
}), g = a(d, v), y = g ? Vn({
|
|
6999
7022
|
mathElement: g,
|
|
7000
|
-
speechText:
|
|
7023
|
+
speechText: h.content
|
|
7001
7024
|
}) : void 0, O = y ? void 0 : l(d).map((S) => ({
|
|
7002
7025
|
element: S,
|
|
7003
7026
|
alignment: Vn({
|
|
7004
7027
|
mathElement: S,
|
|
7005
|
-
speechText:
|
|
7028
|
+
speechText: h.content
|
|
7006
7029
|
})
|
|
7007
|
-
})), N = D(
|
|
7030
|
+
})), N = D(h.content);
|
|
7008
7031
|
r.push({
|
|
7009
|
-
speechText:
|
|
7032
|
+
speechText: h.content,
|
|
7010
7033
|
visibleText: v,
|
|
7011
7034
|
sourceElement: d,
|
|
7012
|
-
regionElement:
|
|
7035
|
+
regionElement: sa(d, t),
|
|
7013
7036
|
speechMatchesVisibleText: N === v,
|
|
7014
7037
|
playbackMode: b.playbackMode,
|
|
7015
7038
|
alignment: b,
|
|
@@ -7028,7 +7051,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7028
7051
|
return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
|
|
7029
7052
|
}
|
|
7030
7053
|
async resolveGeneratedSpeechContent(t, n, r) {
|
|
7031
|
-
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await
|
|
7054
|
+
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await ah({
|
|
7032
7055
|
contentRoot: t,
|
|
7033
7056
|
language: r,
|
|
7034
7057
|
mathSpeech: this.getMathSpeechOptions(),
|
|
@@ -7045,7 +7068,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7045
7068
|
containsMathMarkup: !1,
|
|
7046
7069
|
speechMatchesVisibleText: !0
|
|
7047
7070
|
};
|
|
7048
|
-
const c =
|
|
7071
|
+
const c = uh(o, { format: i }), u = o.plainSpeechText;
|
|
7049
7072
|
return {
|
|
7050
7073
|
contentToSpeak: u,
|
|
7051
7074
|
speechText: u,
|
|
@@ -7118,7 +7141,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7118
7141
|
}
|
|
7119
7142
|
}
|
|
7120
7143
|
highlightRenderableRegionTarget(t) {
|
|
7121
|
-
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !
|
|
7144
|
+
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !fh(this.lastRenderedRegionTarget, t))
|
|
7122
7145
|
try {
|
|
7123
7146
|
const n = document.createRange();
|
|
7124
7147
|
if (t.type === "element") n.selectNodeContents(t.element);
|
|
@@ -7169,10 +7192,10 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7169
7192
|
async speakCatalogChunkOnce(t, n) {
|
|
7170
7193
|
if (!this.provider) return;
|
|
7171
7194
|
this.lastRenderedRegionTarget = null;
|
|
7172
|
-
const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ?
|
|
7195
|
+
const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? ih({
|
|
7173
7196
|
contentRoot: r,
|
|
7174
7197
|
chunks: [t]
|
|
7175
|
-
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ?
|
|
7198
|
+
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? th({
|
|
7176
7199
|
chunks: [i],
|
|
7177
7200
|
mathTokenHighlighting: o
|
|
7178
7201
|
}) : null;
|
|
@@ -7186,14 +7209,14 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7186
7209
|
}
|
|
7187
7210
|
return;
|
|
7188
7211
|
}
|
|
7189
|
-
const a = this.provider, l = a.onWordBoundary, c = (u, d,
|
|
7212
|
+
const a = this.provider, l = a.onWordBoundary, c = (u, d, h) => {
|
|
7190
7213
|
if (n === this.speakRunId && s && i) {
|
|
7191
7214
|
const p = i.offsetSpace === "unsupported" ? "unknown" : i.offsetSpace;
|
|
7192
7215
|
this.renderHighlightDecision(s.resolveBoundary({
|
|
7193
7216
|
chunkId: i.id,
|
|
7194
7217
|
word: u,
|
|
7195
7218
|
position: d,
|
|
7196
|
-
length:
|
|
7219
|
+
length: h,
|
|
7197
7220
|
providerOffsetSpace: p
|
|
7198
7221
|
}));
|
|
7199
7222
|
return;
|
|
@@ -7283,7 +7306,7 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7283
7306
|
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.setState(P.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);
|
|
7284
7307
|
}
|
|
7285
7308
|
requestControlHandoff() {
|
|
7286
|
-
typeof window > "u" || window.dispatchEvent(new CustomEvent(
|
|
7309
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent(dh, { detail: { source: "host" } }));
|
|
7287
7310
|
}
|
|
7288
7311
|
isPlaying() {
|
|
7289
7312
|
return this.state === P.PLAYING;
|
|
@@ -7354,14 +7377,14 @@ var lh = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7354
7377
|
});
|
|
7355
7378
|
}
|
|
7356
7379
|
};
|
|
7357
|
-
m(
|
|
7380
|
+
m(ph, "debugEnabled", (() => {
|
|
7358
7381
|
try {
|
|
7359
7382
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7360
7383
|
} catch {
|
|
7361
7384
|
}
|
|
7362
7385
|
return globalThis.__PIE_TTS_DEBUG__ === !0;
|
|
7363
7386
|
})());
|
|
7364
|
-
var
|
|
7387
|
+
var Hh = Tc({
|
|
7365
7388
|
policy: {
|
|
7366
7389
|
allowed: [],
|
|
7367
7390
|
blocked: []
|
|
@@ -7372,7 +7395,7 @@ var Ph = _c({
|
|
|
7372
7395
|
passage: []
|
|
7373
7396
|
},
|
|
7374
7397
|
providers: {}
|
|
7375
|
-
}),
|
|
7398
|
+
}), gh = /* @__PURE__ */ Tt('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), vh = /* @__PURE__ */ Tt('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), mh = /* @__PURE__ */ Tt('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), bh = /* @__PURE__ */ Tt('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), yh = /* @__PURE__ */ Tt('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), _h = /* @__PURE__ */ Tt('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Th = /* @__PURE__ */ Tt('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Sh = {
|
|
7376
7399
|
hash: "svelte-g8qu62",
|
|
7377
7400
|
code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
|
|
7378
7401
|
|
|
@@ -7380,8 +7403,8 @@ var Ph = _c({
|
|
|
7380
7403
|
|
|
7381
7404
|
/* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
|
|
7382
7405
|
};
|
|
7383
|
-
function
|
|
7384
|
-
Eo(t, !0),
|
|
7406
|
+
function wh(e, t) {
|
|
7407
|
+
Eo(t, !0), Jl(e, Sh);
|
|
7385
7408
|
let n = fr(t, "enabled", 7, !0), r = fr(t, "highlightCoordinator", 7, null), i = fr(t, "ttsService", 7, null);
|
|
7386
7409
|
const o = typeof window < "u", s = "pie-annotations", a = [
|
|
7387
7410
|
{
|
|
@@ -7415,7 +7438,7 @@ function yh(e, t) {
|
|
|
7415
7438
|
'[role="button"]',
|
|
7416
7439
|
'[role="textbox"]'
|
|
7417
7440
|
];
|
|
7418
|
-
let c = /* @__PURE__ */ V(null), u = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null),
|
|
7441
|
+
let c = /* @__PURE__ */ V(null), u = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null), h = /* @__PURE__ */ V(null), p = /* @__PURE__ */ V(tt({
|
|
7419
7442
|
isVisible: !1,
|
|
7420
7443
|
selectedText: "",
|
|
7421
7444
|
selectedRange: null,
|
|
@@ -7423,7 +7446,7 @@ function yh(e, t) {
|
|
|
7423
7446
|
x: 0,
|
|
7424
7447
|
y: 0
|
|
7425
7448
|
}
|
|
7426
|
-
})), v = /* @__PURE__ */ V(!1), b = /* @__PURE__ */ V(!1), g = /* @__PURE__ */ V(""), y = /* @__PURE__ */ V(0), O = /* @__PURE__ */ V(null), N = /* @__PURE__ */ or(() => _(y) > 0), S = /* @__PURE__ */ or(() => _(O) !== null), z = /* @__PURE__ */ or(() => _(
|
|
7449
|
+
})), v = /* @__PURE__ */ V(!1), b = /* @__PURE__ */ V(!1), g = /* @__PURE__ */ V(""), y = /* @__PURE__ */ V(0), O = /* @__PURE__ */ V(null), N = /* @__PURE__ */ or(() => _(y) > 0), S = /* @__PURE__ */ or(() => _(O) !== null), z = /* @__PURE__ */ or(() => _(h)?.scopeElement || _(d)?.scopeElement || null);
|
|
7427
7450
|
function W() {
|
|
7428
7451
|
const T = _(c)?.ownerDocument;
|
|
7429
7452
|
return _(z) || T?.documentElement || document.documentElement;
|
|
@@ -7506,7 +7529,7 @@ function yh(e, t) {
|
|
|
7506
7529
|
I(g, "");
|
|
7507
7530
|
}, 3e3), Me();
|
|
7508
7531
|
}
|
|
7509
|
-
function
|
|
7532
|
+
function la() {
|
|
7510
7533
|
if (!_(O) || !r()) {
|
|
7511
7534
|
console.warn("[AnnotationToolbar] No overlapping annotation to remove");
|
|
7512
7535
|
return;
|
|
@@ -7526,13 +7549,13 @@ function yh(e, t) {
|
|
|
7526
7549
|
I(g, "");
|
|
7527
7550
|
}, 3e3), Me();
|
|
7528
7551
|
}
|
|
7529
|
-
function
|
|
7552
|
+
function ca() {
|
|
7530
7553
|
const T = _(y);
|
|
7531
7554
|
r()?.clearAnnotations(), I(y, 0), sessionStorage.removeItem(U()), I(g, `${T} annotation${T === 1 ? "" : "s"} cleared`), setTimeout(() => {
|
|
7532
7555
|
I(g, "");
|
|
7533
7556
|
}, 3e3), Me();
|
|
7534
7557
|
}
|
|
7535
|
-
async function
|
|
7558
|
+
async function ua() {
|
|
7536
7559
|
if (!(!_(p).selectedRange || !i())) {
|
|
7537
7560
|
I(v, !0);
|
|
7538
7561
|
try {
|
|
@@ -7560,16 +7583,16 @@ function yh(e, t) {
|
|
|
7560
7583
|
};
|
|
7561
7584
|
}), Li(() => {
|
|
7562
7585
|
if (!_(c)) return;
|
|
7563
|
-
const T =
|
|
7586
|
+
const T = fc(_(c), ($) => {
|
|
7564
7587
|
I(d, $, !0);
|
|
7565
|
-
}), k =
|
|
7566
|
-
I(
|
|
7588
|
+
}), k = pc(_(c), ($) => {
|
|
7589
|
+
I(h, $, !0);
|
|
7567
7590
|
});
|
|
7568
7591
|
return () => {
|
|
7569
7592
|
k(), T();
|
|
7570
7593
|
};
|
|
7571
7594
|
});
|
|
7572
|
-
var
|
|
7595
|
+
var da = {
|
|
7573
7596
|
get enabled() {
|
|
7574
7597
|
return n();
|
|
7575
7598
|
},
|
|
@@ -7588,51 +7611,51 @@ function yh(e, t) {
|
|
|
7588
7611
|
set ttsService(T = null) {
|
|
7589
7612
|
i(T), Sn();
|
|
7590
7613
|
}
|
|
7591
|
-
}, yi =
|
|
7614
|
+
}, yi = Th(), _i = sr(yi);
|
|
7592
7615
|
Gi(_i, (T) => I(c, T), () => _(c));
|
|
7593
|
-
var Ti = He(_i, 2),
|
|
7594
|
-
var k =
|
|
7595
|
-
|
|
7596
|
-
var te =
|
|
7616
|
+
var Ti = He(_i, 2), ha = (T) => {
|
|
7617
|
+
var k = _h(), $ = vn(k);
|
|
7618
|
+
Kl($, 17, () => a, Ul, (fe, pe) => {
|
|
7619
|
+
var te = gh(), un = vn(te), rr = vn(un, !0);
|
|
7597
7620
|
dn(un), dn(te), mn(() => {
|
|
7598
7621
|
ji(te, `background-color: ${_(pe).hex ?? ""};`), qi(te, "aria-label", _(pe).label), qi(te, "title", _(pe).label), Bi(rr, _(pe).label);
|
|
7599
7622
|
}), Ht("click", te, () => mi(_(pe).name)), qe(fe, te);
|
|
7600
7623
|
});
|
|
7601
7624
|
var K = He($, 2), Ke = He(K, 2), Nt = (fe) => {
|
|
7602
|
-
var pe =
|
|
7603
|
-
mn(() => te.disabled = _(v)), Ht("click", te,
|
|
7625
|
+
var pe = vh(), te = He(sr(pe), 2);
|
|
7626
|
+
mn(() => te.disabled = _(v)), Ht("click", te, ua), qe(fe, pe);
|
|
7604
7627
|
};
|
|
7605
7628
|
Dt(Ke, (fe) => {
|
|
7606
7629
|
i() && fe(Nt);
|
|
7607
7630
|
});
|
|
7608
|
-
var Wt = He(Ke, 2),
|
|
7609
|
-
var pe =
|
|
7610
|
-
var zt =
|
|
7611
|
-
Ht("click", zt,
|
|
7631
|
+
var Wt = He(Ke, 2), pa = (fe) => {
|
|
7632
|
+
var pe = yh(), te = He(sr(pe), 2), un = (Ye) => {
|
|
7633
|
+
var zt = mh();
|
|
7634
|
+
Ht("click", zt, la), qe(Ye, zt);
|
|
7612
7635
|
};
|
|
7613
7636
|
Dt(te, (Ye) => {
|
|
7614
7637
|
_(S) && Ye(un);
|
|
7615
7638
|
});
|
|
7616
|
-
var rr = He(te, 2),
|
|
7617
|
-
var zt =
|
|
7618
|
-
Ht("click", zt,
|
|
7639
|
+
var rr = He(te, 2), ga = (Ye) => {
|
|
7640
|
+
var zt = bh();
|
|
7641
|
+
Ht("click", zt, ca), qe(Ye, zt);
|
|
7619
7642
|
};
|
|
7620
7643
|
Dt(rr, (Ye) => {
|
|
7621
|
-
_(N) && Ye(
|
|
7644
|
+
_(N) && Ye(ga);
|
|
7622
7645
|
}), qe(fe, pe);
|
|
7623
7646
|
};
|
|
7624
7647
|
Dt(Wt, (fe) => {
|
|
7625
|
-
(_(S) || _(N)) && fe(
|
|
7648
|
+
(_(S) || _(N)) && fe(pa);
|
|
7626
7649
|
}), dn(k), Gi(k, (fe) => I(u, fe), () => _(u)), mn(() => ji(k, `left:${_(p).toolbarPosition.x}px; top:${_(p).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Ht("click", K, () => mi(le.UNDERLINE)), qe(T, k);
|
|
7627
7650
|
};
|
|
7628
7651
|
Dt(Ti, (T) => {
|
|
7629
|
-
_(p).isVisible && T(
|
|
7652
|
+
_(p).isVisible && T(ha);
|
|
7630
7653
|
});
|
|
7631
|
-
var Si = He(Ti, 2),
|
|
7632
|
-
return dn(Si), mn(() => Bi(
|
|
7654
|
+
var Si = He(Ti, 2), fa = vn(Si, !0);
|
|
7655
|
+
return dn(Si), mn(() => Bi(fa, _(g))), qe(e, yi), xo(da);
|
|
7633
7656
|
}
|
|
7634
|
-
|
|
7635
|
-
customElements.define("pie-tool-annotation-toolbar",
|
|
7657
|
+
Pl(["click"]);
|
|
7658
|
+
customElements.define("pie-tool-annotation-toolbar", lc(wh, {
|
|
7636
7659
|
enabled: {
|
|
7637
7660
|
attribute: "enabled",
|
|
7638
7661
|
type: "Boolean"
|
|
@@ -7641,7 +7664,7 @@ customElements.define("pie-tool-annotation-toolbar", ac(yh, {
|
|
|
7641
7664
|
ttsService: { type: "Object" }
|
|
7642
7665
|
}, [], [], { mode: "open" }));
|
|
7643
7666
|
export {
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7667
|
+
wh as default,
|
|
7668
|
+
xh as n,
|
|
7669
|
+
Eh as t
|
|
7647
7670
|
};
|