@pie-players/pie-tool-graph 0.3.52 → 0.3.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tool-graph.js +852 -809
- package/package.json +4 -4
package/dist/tool-graph.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as y } from "./defineProperty-Dt7ri80W.js";
|
|
2
|
-
var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, qa = Object.getOwnPropertyNames, Ua = Object.getPrototypeOf, Ga = Object.prototype.hasOwnProperty,
|
|
2
|
+
var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, qa = Object.getOwnPropertyNames, Ua = Object.getPrototypeOf, Ga = Object.prototype.hasOwnProperty, hf = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ya = (e, t, r, n) => {
|
|
3
3
|
if (t && typeof t == "object" || typeof t == "function")
|
|
4
4
|
for (var i = qa(t), o = 0, s = i.length, a; o < s; o++)
|
|
5
5
|
a = i[o], !Ga.call(e, a) && a !== r && zo(e, a, {
|
|
@@ -10,16 +10,16 @@ var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDe
|
|
|
10
10
|
}, Ka = (e, t, r) => (r = e != null ? ja(Ua(e)) : {}, Ya(t || !e || !e.__esModule ? zo(r, "default", {
|
|
11
11
|
value: e,
|
|
12
12
|
enumerable: !0
|
|
13
|
-
}) : r, e)),
|
|
13
|
+
}) : r, e)), df = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
|
|
14
14
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
15
15
|
throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
16
16
|
});
|
|
17
17
|
if (typeof window < "u") {
|
|
18
|
-
var
|
|
19
|
-
((
|
|
18
|
+
var Fi, ji;
|
|
19
|
+
((Fi = (ji = window).__svelte ?? (ji.__svelte = {})).v ?? (Fi.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Vt = {}, J = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var Wo = Array.isArray, Xa = Array.prototype.indexOf,
|
|
22
|
+
var Wo = Array.isArray, Xa = Array.prototype.indexOf, zr = Array.prototype.includes, nn = Array.from, Wr = Object.keys, Hr = Object.defineProperty, St = Object.getOwnPropertyDescriptor, Ja = Object.getOwnPropertyDescriptors, Qa = Object.prototype, Za = Array.prototype, Ho = Object.getPrototypeOf, Vi = Object.isExtensible, el = () => {
|
|
23
23
|
};
|
|
24
24
|
function tl(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
@@ -34,8 +34,8 @@ function Bo() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var ff = 1 << 24, be = 1024, Se = 2048, Lt = 4096, di = 8192, rl = 16384, fi = 32768, qi = 1 << 25, pi = 65536, pf = 1 << 17, gf = 1 << 18, Xt = 1 << 19, nl = 1 << 20, ur = 1 << 25, yr = 65536, Ui = 1 << 21, il = 1 << 22, Br = 1 << 23, hr = /* @__PURE__ */ Symbol("$state"), Do = /* @__PURE__ */ Symbol("legacy props"), ol = /* @__PURE__ */ Symbol(""), sl = /* @__PURE__ */ Symbol("proxy path"), Wn = /* @__PURE__ */ Symbol("attributes"), Hn = /* @__PURE__ */ Symbol("class"), Bn = /* @__PURE__ */ Symbol("style"), Or = /* @__PURE__ */ Symbol("text"), dr = /* @__PURE__ */ Symbol("form reset");
|
|
38
|
+
var on = new class extends Error {
|
|
39
39
|
constructor(...t) {
|
|
40
40
|
super(...t), y(this, "name", "StaleReactionError"), y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
41
41
|
}
|
|
@@ -79,7 +79,7 @@ function bl() {
|
|
|
79
79
|
function _l() {
|
|
80
80
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function sn(e) {
|
|
83
83
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
84
84
|
}
|
|
85
85
|
function Tl() {
|
|
@@ -92,16 +92,16 @@ function qe(e) {
|
|
|
92
92
|
var P;
|
|
93
93
|
function le(e) {
|
|
94
94
|
if (e === null)
|
|
95
|
-
throw
|
|
95
|
+
throw sn(), Vt;
|
|
96
96
|
return P = e;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function an() {
|
|
99
99
|
return le(/* @__PURE__ */ We(P));
|
|
100
100
|
}
|
|
101
101
|
function de(e) {
|
|
102
102
|
if (L) {
|
|
103
103
|
if (/* @__PURE__ */ We(P) !== null)
|
|
104
|
-
throw
|
|
104
|
+
throw sn(), Vt;
|
|
105
105
|
P = e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -111,7 +111,7 @@ function Sl(e = 1) {
|
|
|
111
111
|
P = r;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Dr(e = !0) {
|
|
115
115
|
for (var t = 0, r = P; ; ) {
|
|
116
116
|
if (r.nodeType === 8) {
|
|
117
117
|
var n = r.data;
|
|
@@ -126,7 +126,7 @@ function Br(e = !0) {
|
|
|
126
126
|
}
|
|
127
127
|
function Fo(e) {
|
|
128
128
|
if (!e || e.nodeType !== 8)
|
|
129
|
-
throw
|
|
129
|
+
throw sn(), Vt;
|
|
130
130
|
return e.data;
|
|
131
131
|
}
|
|
132
132
|
function jo(e) {
|
|
@@ -138,8 +138,8 @@ function wl(e, t) {
|
|
|
138
138
|
function Vo(e) {
|
|
139
139
|
return !wl(e, this.v);
|
|
140
140
|
}
|
|
141
|
-
var Me = !1,
|
|
142
|
-
function
|
|
141
|
+
var Me = !1, ln = !1;
|
|
142
|
+
function Gi(e, t) {
|
|
143
143
|
return e.label = t, kl(e.v, t), e;
|
|
144
144
|
}
|
|
145
145
|
function kl(e, t) {
|
|
@@ -158,7 +158,7 @@ function qo(e, t = !1, r) {
|
|
|
158
158
|
s: e,
|
|
159
159
|
x: null,
|
|
160
160
|
r: M,
|
|
161
|
-
l:
|
|
161
|
+
l: ln && !t ? {
|
|
162
162
|
s: null,
|
|
163
163
|
u: null,
|
|
164
164
|
$: []
|
|
@@ -174,7 +174,7 @@ function Uo(e) {
|
|
|
174
174
|
return e !== void 0 && (t.x = e), t.i = !0, K = t.p, e ?? {};
|
|
175
175
|
}
|
|
176
176
|
function br() {
|
|
177
|
-
return !
|
|
177
|
+
return !ln || K !== null && K.l === null;
|
|
178
178
|
}
|
|
179
179
|
var yt = [];
|
|
180
180
|
function Go() {
|
|
@@ -190,13 +190,13 @@ function Ye(e) {
|
|
|
190
190
|
}
|
|
191
191
|
yt.push(e);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function xl() {
|
|
194
194
|
for (; yt.length > 0; ) Go();
|
|
195
195
|
}
|
|
196
196
|
function Yo(e) {
|
|
197
197
|
var t = M;
|
|
198
198
|
if (t === null)
|
|
199
|
-
return $.f |=
|
|
199
|
+
return $.f |= Br, e;
|
|
200
200
|
if ((t.f & 32768) === 0 && (t.f & 4) === 0)
|
|
201
201
|
throw e;
|
|
202
202
|
lt(e, t);
|
|
@@ -216,12 +216,12 @@ function lt(e, t) {
|
|
|
216
216
|
}
|
|
217
217
|
throw e;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
220
|
-
function
|
|
221
|
-
e.f = e.f &
|
|
219
|
+
var El = ~(Se | Lt | be);
|
|
220
|
+
function q(e, t) {
|
|
221
|
+
e.f = e.f & El | t;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
(e.f & 512) !== 0 || e.deps === null ?
|
|
223
|
+
function gi(e) {
|
|
224
|
+
(e.f & 512) !== 0 || e.deps === null ? q(e, be) : q(e, Lt);
|
|
225
225
|
}
|
|
226
226
|
function Ko(e) {
|
|
227
227
|
if (e !== null)
|
|
@@ -229,7 +229,7 @@ function Ko(e) {
|
|
|
229
229
|
(t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= yr, Ko(t.deps));
|
|
230
230
|
}
|
|
231
231
|
function Xo(e, t, r) {
|
|
232
|
-
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Ko(e.deps),
|
|
232
|
+
(e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Ko(e.deps), q(e, be);
|
|
233
233
|
}
|
|
234
234
|
var Cl = !1, wr = !1;
|
|
235
235
|
function Al(e) {
|
|
@@ -243,10 +243,10 @@ function Al(e) {
|
|
|
243
243
|
function Jo(e, t) {
|
|
244
244
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function vi(e, t) {
|
|
247
247
|
Jo(e, t), t.add(e);
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function x(e, t, r) {
|
|
250
250
|
Jo(e, t), t.set(e, r);
|
|
251
251
|
}
|
|
252
252
|
function O(e, t, r) {
|
|
@@ -259,10 +259,10 @@ function k(e, t, r) {
|
|
|
259
259
|
function f(e, t) {
|
|
260
260
|
return e.get(O(e, t));
|
|
261
261
|
}
|
|
262
|
-
var Qo,
|
|
263
|
-
var Ml = 1,
|
|
262
|
+
var Qo, Fr = null, Wt = null, E = null, jr = null, oe = null, Dn = null, fr = !1, Tn = !1, Ut = null, Vr = null, Zo = 0;
|
|
263
|
+
var Ml = 1, qr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakSet(), Pt = class es {
|
|
264
264
|
constructor() {
|
|
265
|
-
|
|
265
|
+
vi(this, U), y(this, "id", Ml++), x(this, qr, !1), y(this, "linked", !0), x(this, wt, null), x(this, bt, null), y(this, "async_deriveds", /* @__PURE__ */ new Map()), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), x(this, Ur, /* @__PURE__ */ new Set()), x(this, kr, /* @__PURE__ */ new Set()), x(this, Ht, 0), x(this, mt, /* @__PURE__ */ new Map()), x(this, or, null), x(this, ge, []), x(this, Fn, []), x(this, Ot, /* @__PURE__ */ new Set()), x(this, Ue, /* @__PURE__ */ new Set()), x(this, at, /* @__PURE__ */ new Map()), x(this, Ir, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), x(this, sr, !1), Wt === null ? Fr = Wt = this : (k(bt, Wt, this), k(wt, this, Wt)), Wt = this;
|
|
266
266
|
}
|
|
267
267
|
skip_effect(t) {
|
|
268
268
|
f(at, this).has(t) || f(at, this).set(t, {
|
|
@@ -275,9 +275,9 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
275
275
|
if (n) {
|
|
276
276
|
f(at, this).delete(t);
|
|
277
277
|
for (var i of n.d)
|
|
278
|
-
|
|
278
|
+
q(i, Se), r(i);
|
|
279
279
|
for (i of n.m)
|
|
280
|
-
|
|
280
|
+
q(i, Lt), r(i);
|
|
281
281
|
}
|
|
282
282
|
f(Ir, this).add(t);
|
|
283
283
|
}
|
|
@@ -285,24 +285,24 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
285
285
|
t.v !== J && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), oe?.set(t, r)), this.is_fork || (t.v = r);
|
|
286
286
|
}
|
|
287
287
|
activate() {
|
|
288
|
-
|
|
288
|
+
E = this;
|
|
289
289
|
}
|
|
290
290
|
deactivate() {
|
|
291
|
-
|
|
291
|
+
E = null, oe = null;
|
|
292
292
|
}
|
|
293
293
|
flush() {
|
|
294
294
|
try {
|
|
295
|
-
|
|
295
|
+
Tn = !0, E = this, O(U, this, Gr).call(this);
|
|
296
296
|
} finally {
|
|
297
|
-
Zo = 0,
|
|
297
|
+
Zo = 0, Dn = null, Ut = null, Vr = null, Tn = !1, E = null, oe = null, Et.clear();
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
discard() {
|
|
301
301
|
for (const t of f(kr, this)) t(this);
|
|
302
|
-
f(kr, this).clear(), O(
|
|
302
|
+
f(kr, this).clear(), O(U, this, Yr).call(this), f(or, this)?.resolve();
|
|
303
303
|
}
|
|
304
304
|
register_created_effect(t) {
|
|
305
|
-
f(
|
|
305
|
+
f(Fn, this).push(t);
|
|
306
306
|
}
|
|
307
307
|
increment(t, r) {
|
|
308
308
|
if (k(Ht, this, f(Ht, this) + 1), t) {
|
|
@@ -325,7 +325,7 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
325
325
|
t.clear(), r.clear();
|
|
326
326
|
}
|
|
327
327
|
oncommit(t) {
|
|
328
|
-
f(
|
|
328
|
+
f(Ur, this).add(t);
|
|
329
329
|
}
|
|
330
330
|
ondiscard(t) {
|
|
331
331
|
f(kr, this).add(t);
|
|
@@ -334,13 +334,13 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
334
334
|
return (f(or, this) ?? k(or, this, Bo())).promise;
|
|
335
335
|
}
|
|
336
336
|
static ensure() {
|
|
337
|
-
if (
|
|
338
|
-
const t =
|
|
339
|
-
!
|
|
340
|
-
f(
|
|
337
|
+
if (E === null) {
|
|
338
|
+
const t = E = new es();
|
|
339
|
+
!Tn && !fr && Ye(() => {
|
|
340
|
+
f(qr, t) || t.flush();
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return E;
|
|
344
344
|
}
|
|
345
345
|
apply() {
|
|
346
346
|
if (!Me || !this.is_fork && f(wt, this) === null && f(bt, this) === null) {
|
|
@@ -349,7 +349,7 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
349
349
|
}
|
|
350
350
|
oe = /* @__PURE__ */ new Map();
|
|
351
351
|
for (const [r, [n]] of this.current) oe.set(r, n);
|
|
352
|
-
for (let r =
|
|
352
|
+
for (let r = Fr; r !== null; r = f(bt, r))
|
|
353
353
|
if (!(r === this || r.is_fork)) {
|
|
354
354
|
var t = !1;
|
|
355
355
|
if (r.id < this.id) {
|
|
@@ -364,7 +364,7 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
schedule(t) {
|
|
367
|
-
if (
|
|
367
|
+
if (Dn = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
|
|
368
368
|
t.b.defer_effect(t);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
@@ -382,7 +382,7 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
|
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
Qo = Pt;
|
|
385
|
-
function
|
|
385
|
+
function Yi() {
|
|
386
386
|
if (this.is_fork) return !0;
|
|
387
387
|
for (const r of f(mt, this).keys()) {
|
|
388
388
|
for (var e = r, t = !1; e.parent !== null; ) {
|
|
@@ -396,44 +396,44 @@ function Gi() {
|
|
|
396
396
|
}
|
|
397
397
|
return !1;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
k(
|
|
399
|
+
function Gr() {
|
|
400
|
+
k(qr, this, !0), Zo++ > 1e3 && (O(U, this, Yr).call(this), $l());
|
|
401
401
|
for (const a of f(Ot, this))
|
|
402
|
-
f(Ue, this).delete(a),
|
|
402
|
+
f(Ue, this).delete(a), q(a, Se), this.schedule(a);
|
|
403
403
|
for (const a of f(Ue, this))
|
|
404
|
-
|
|
404
|
+
q(a, Lt), this.schedule(a);
|
|
405
405
|
const e = f(ge, this);
|
|
406
406
|
k(ge, this, []), this.apply();
|
|
407
|
-
var t = Ut = [], r = [], n =
|
|
407
|
+
var t = Ut = [], r = [], n = Vr = [];
|
|
408
408
|
for (const a of e) try {
|
|
409
|
-
O(
|
|
409
|
+
O(U, this, ts).call(this, a, t, r);
|
|
410
410
|
} catch (l) {
|
|
411
|
-
throw is(a), O(
|
|
411
|
+
throw is(a), O(U, this, Yi).call(this) || this.discard(), l;
|
|
412
412
|
}
|
|
413
|
-
if (
|
|
413
|
+
if (E = null, n.length > 0) {
|
|
414
414
|
var i = Qo.ensure();
|
|
415
415
|
for (const a of n) i.schedule(a);
|
|
416
416
|
}
|
|
417
|
-
if (Ut = null,
|
|
418
|
-
O(
|
|
417
|
+
if (Ut = null, Vr = null, O(U, this, Yi).call(this)) {
|
|
418
|
+
O(U, this, ar).call(this, r), O(U, this, ar).call(this, t);
|
|
419
419
|
for (const [a, l] of f(at, this)) ns(a, l);
|
|
420
|
-
n.length > 0 && O(
|
|
420
|
+
n.length > 0 && O(U, E, Gr).call(E);
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const o = O(
|
|
423
|
+
const o = O(U, this, Ol).call(this);
|
|
424
424
|
if (o) {
|
|
425
|
-
O(
|
|
425
|
+
O(U, this, ar).call(this, r), O(U, this, ar).call(this, t), O(U, o, Il).call(o, this);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
428
|
f(Ot, this).clear(), f(Ue, this).clear();
|
|
429
|
-
for (const a of f(
|
|
430
|
-
f(
|
|
431
|
-
var s =
|
|
432
|
-
if (f(Ht, this) === 0 && (f(ge, this).length === 0 || s !== null) && (O(
|
|
429
|
+
for (const a of f(Ur, this)) a(this);
|
|
430
|
+
f(Ur, this).clear(), jr = this, Ki(r), Ki(t), jr = null, f(or, this)?.resolve();
|
|
431
|
+
var s = E;
|
|
432
|
+
if (f(Ht, this) === 0 && (f(ge, this).length === 0 || s !== null) && (O(U, this, Yr).call(this), Me && (O(U, this, Rl).call(this), E = s)), f(ge, this).length > 0) if (s !== null) {
|
|
433
433
|
const a = s;
|
|
434
434
|
f(ge, a).push(...f(ge, this).filter((l) => !f(ge, a).includes(l)));
|
|
435
435
|
} else s = this;
|
|
436
|
-
s !== null && O(
|
|
436
|
+
s !== null && O(U, s, Gr).call(s);
|
|
437
437
|
}
|
|
438
438
|
function ts(e, t, r) {
|
|
439
439
|
e.f ^= be;
|
|
@@ -482,18 +482,18 @@ 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) && (f(Ue, this).delete(o),
|
|
485
|
+
i & 4194320 && !this.async_deriveds.has(o) && (f(Ue, this).delete(o), q(o, Se), this.schedule(o));
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
for (const r of this.current.keys()) t(r);
|
|
490
|
-
this.oncommit(() => e.discard()), O(
|
|
490
|
+
this.oncommit(() => e.discard()), O(U, e, Yr).call(e), E = this, O(U, this, Gr).call(this);
|
|
491
491
|
}
|
|
492
492
|
function ar(e) {
|
|
493
493
|
for (var t = 0; t < e.length; t += 1) Xo(e[t], f(Ot, this), f(Ue, this));
|
|
494
494
|
}
|
|
495
495
|
function Rl() {
|
|
496
|
-
for (let c =
|
|
496
|
+
for (let c = Fr; c !== null; c = f(bt, c)) {
|
|
497
497
|
var e = c.id < this.id, t = [];
|
|
498
498
|
for (const [u, [h, d]] of this.current) {
|
|
499
499
|
if (c.current.has(u)) {
|
|
@@ -507,13 +507,13 @@ function Rl() {
|
|
|
507
507
|
const d = c.async_deriveds.get(u);
|
|
508
508
|
d && h.promise.then(d.resolve).catch(d.reject);
|
|
509
509
|
}
|
|
510
|
-
if (f(
|
|
510
|
+
if (f(qr, c)) {
|
|
511
511
|
var n = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
|
|
512
512
|
if (n.length === 0)
|
|
513
513
|
e && c.discard();
|
|
514
514
|
else if (t.length > 0) {
|
|
515
515
|
if (e) for (const u of f(Ir, this)) c.unskip_effect(u, (h) => {
|
|
516
|
-
(h.f & 4194320) !== 0 ? c.schedule(h) : O(
|
|
516
|
+
(h.f & 4194320) !== 0 ? c.schedule(h) : O(U, c, ar).call(c, [h]);
|
|
517
517
|
});
|
|
518
518
|
c.activate();
|
|
519
519
|
var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
@@ -524,10 +524,10 @@ function Rl() {
|
|
|
524
524
|
return d ? d[0] !== h[0] || d[1] !== h[1] : !0;
|
|
525
525
|
}).map(([u]) => u);
|
|
526
526
|
if (a.length > 0)
|
|
527
|
-
for (const u of f(
|
|
527
|
+
for (const u of f(Fn, this)) (u.f & 155648) === 0 && mi(u, a, o) && ((u.f & 4194320) !== 0 ? (q(u, Se), c.schedule(u)) : f(Ot, c).add(u));
|
|
528
528
|
if (f(ge, c).length > 0 && !f(sr, c)) {
|
|
529
529
|
c.apply();
|
|
530
|
-
for (var l of f(ge, c)) O(
|
|
530
|
+
for (var l of f(ge, c)) O(U, c, ts).call(c, l, [], []);
|
|
531
531
|
k(ge, c, []);
|
|
532
532
|
}
|
|
533
533
|
c.deactivate();
|
|
@@ -535,20 +535,20 @@ function Rl() {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Yr() {
|
|
539
539
|
if (this.linked) {
|
|
540
540
|
var e = f(wt, this), t = f(bt, this);
|
|
541
|
-
e === null ?
|
|
541
|
+
e === null ? Fr = t : k(bt, e, t), t === null ? Wt = e : k(wt, t, e), this.linked = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Kr(e) {
|
|
545
545
|
var t = fr;
|
|
546
546
|
fr = !0;
|
|
547
547
|
try {
|
|
548
548
|
var r;
|
|
549
|
-
for (e && (
|
|
550
|
-
if (
|
|
551
|
-
|
|
549
|
+
for (e && (E !== null && !E.is_fork && E.flush(), r = e()); ; ) {
|
|
550
|
+
if (xl(), E === null) return r;
|
|
551
|
+
E.flush();
|
|
552
552
|
}
|
|
553
553
|
} finally {
|
|
554
554
|
fr = t;
|
|
@@ -557,23 +557,23 @@ function Yr(e) {
|
|
|
557
557
|
function $l() {
|
|
558
558
|
if (0) {
|
|
559
559
|
var e;
|
|
560
|
-
for (const r of
|
|
560
|
+
for (const r of E.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
561
561
|
var t;
|
|
562
562
|
}
|
|
563
563
|
try {
|
|
564
564
|
fl();
|
|
565
565
|
} catch (r) {
|
|
566
|
-
lt(r,
|
|
566
|
+
lt(r, Dn);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
var Le = null;
|
|
570
|
-
function
|
|
570
|
+
function Ki(e) {
|
|
571
571
|
var t = e.length;
|
|
572
572
|
if (t !== 0) {
|
|
573
573
|
for (var r = 0; r < t; ) {
|
|
574
574
|
var n = e[r++];
|
|
575
575
|
if ((n.f & 24576) === 0 && _r(n) && (Le = /* @__PURE__ */ new Set(), Yt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && ws(n), Le?.size > 0)) {
|
|
576
|
-
|
|
576
|
+
Et.clear();
|
|
577
577
|
for (const i of Le) {
|
|
578
578
|
if ((i.f & 24576) !== 0) continue;
|
|
579
579
|
const o = [i];
|
|
@@ -595,59 +595,59 @@ function rs(e, t, r, n) {
|
|
|
595
595
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
596
596
|
for (const i of e.reactions) {
|
|
597
597
|
const o = i.f;
|
|
598
|
-
(o & 2) !== 0 ? rs(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 &&
|
|
598
|
+
(o & 2) !== 0 ? rs(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 && mi(i, t, n) && (q(i, Se), yi(i));
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function mi(e, t, r) {
|
|
602
602
|
const n = r.get(e);
|
|
603
603
|
if (n !== void 0) return n;
|
|
604
604
|
if (e.deps !== null) for (const i of e.deps) {
|
|
605
|
-
if (
|
|
606
|
-
if ((i.f & 2) !== 0 &&
|
|
605
|
+
if (zr.call(t, i)) return !0;
|
|
606
|
+
if ((i.f & 2) !== 0 && mi(i, t, r))
|
|
607
607
|
return r.set(i, !0), !0;
|
|
608
608
|
}
|
|
609
609
|
return r.set(e, !1), !1;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
612
|
-
|
|
611
|
+
function yi(e) {
|
|
612
|
+
E.schedule(e);
|
|
613
613
|
}
|
|
614
614
|
function ns(e, t) {
|
|
615
615
|
if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
|
|
616
|
-
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e),
|
|
616
|
+
(e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), q(e, be);
|
|
617
617
|
for (var r = e.first; r !== null; )
|
|
618
618
|
ns(r, t), r = r.next;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
function is(e) {
|
|
622
|
-
|
|
622
|
+
q(e, be);
|
|
623
623
|
for (var t = e.first; t !== null; )
|
|
624
624
|
is(t), t = t.next;
|
|
625
625
|
}
|
|
626
626
|
function Ll(e) {
|
|
627
627
|
let t = 0, r = It(0), n;
|
|
628
628
|
return () => {
|
|
629
|
-
|
|
629
|
+
ki() && (g(r), un(() => (t === 0 && (n = hn(() => e(() => pr(r)))), t += 1, () => {
|
|
630
630
|
Ye(() => {
|
|
631
631
|
t -= 1, t === 0 && (n?.(), n = void 0, pr(r));
|
|
632
632
|
});
|
|
633
633
|
})));
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
var Pl =
|
|
636
|
+
var Pl = pi | Xt;
|
|
637
637
|
function Nl(e, t, r, n) {
|
|
638
638
|
new zl(e, t, r, n);
|
|
639
639
|
}
|
|
640
|
-
var Ce = /* @__PURE__ */ new WeakMap(),
|
|
640
|
+
var Ce = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), zl = class {
|
|
641
641
|
constructor(e, t, r, n) {
|
|
642
|
-
|
|
642
|
+
vi(this, ne), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), x(this, Ce, void 0), x(this, jn, L ? P : null), x(this, Pe, void 0), x(this, gr, void 0), x(this, ve, void 0), x(this, Ne, null), x(this, ue, null), x(this, xe, null), x(this, kt, null), x(this, Bt, 0), x(this, xt, 0), x(this, xr, !1), x(this, Vn, /* @__PURE__ */ new Set()), x(this, qn, /* @__PURE__ */ new Set()), x(this, ft, null), x(this, Xi, Ll(() => (k(ft, this, It(f(Bt, this))), () => {
|
|
643
643
|
k(ft, this, null);
|
|
644
644
|
}))), k(Ce, this, e), k(Pe, this, t), k(gr, this, (i) => {
|
|
645
645
|
var o = M;
|
|
646
646
|
o.b = this, o.f |= 128, r(i);
|
|
647
|
-
}), this.parent = M.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), k(ve, this,
|
|
647
|
+
}), this.parent = M.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), k(ve, this, xi(() => {
|
|
648
648
|
if (L) {
|
|
649
|
-
const i = f(
|
|
650
|
-
|
|
649
|
+
const i = f(jn, this);
|
|
650
|
+
an();
|
|
651
651
|
const o = i.data === "[!";
|
|
652
652
|
if (i.data.startsWith("[?")) {
|
|
653
653
|
const s = JSON.parse(i.data.slice(2));
|
|
@@ -657,7 +657,7 @@ var Ce = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pe =
|
|
|
657
657
|
}, Pl)), L && k(Ce, this, P);
|
|
658
658
|
}
|
|
659
659
|
defer_effect(e) {
|
|
660
|
-
Xo(e, f(
|
|
660
|
+
Xo(e, f(Vn, this), f(qn, this));
|
|
661
661
|
}
|
|
662
662
|
is_rendered() {
|
|
663
663
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
@@ -666,18 +666,18 @@ var Ce = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pe =
|
|
|
666
666
|
return !!f(Pe, this).pending;
|
|
667
667
|
}
|
|
668
668
|
update_pending_count(e, t) {
|
|
669
|
-
O(ne, this, ss).call(this, e, t), k(Bt, this, f(Bt, this) + e), !(!f(ft, this) || f(
|
|
670
|
-
k(
|
|
669
|
+
O(ne, this, ss).call(this, e, t), k(Bt, this, f(Bt, this) + e), !(!f(ft, this) || f(xr, this)) && (k(xr, this, !0), Ye(() => {
|
|
670
|
+
k(xr, this, !1), f(ft, this) && Gt(f(ft, this), f(Bt, this));
|
|
671
671
|
}));
|
|
672
672
|
}
|
|
673
673
|
get_effect_pending() {
|
|
674
|
-
return f(
|
|
674
|
+
return f(Xi, this).call(this), g(f(ft, this));
|
|
675
675
|
}
|
|
676
676
|
error(e) {
|
|
677
677
|
if (!f(Pe, this).onerror && !f(Pe, this).failed) throw e;
|
|
678
|
-
|
|
679
|
-
O(ne, this,
|
|
680
|
-
})) : O(ne, this,
|
|
678
|
+
E?.is_fork ? (f(Ne, this) && E.skip_effect(f(Ne, this)), f(ue, this) && E.skip_effect(f(ue, this)), f(xe, this) && E.skip_effect(f(xe, this)), E.oncommit(() => {
|
|
679
|
+
O(ne, this, Ji).call(this, e);
|
|
680
|
+
})) : O(ne, this, Ji).call(this, e);
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
683
|
function Wl() {
|
|
@@ -689,7 +689,7 @@ function Wl() {
|
|
|
689
689
|
}
|
|
690
690
|
function Hl(e) {
|
|
691
691
|
const t = f(Pe, this).failed;
|
|
692
|
-
t && k(
|
|
692
|
+
t && k(xe, this, _e(() => {
|
|
693
693
|
t(f(Ce, this), () => e, () => () => {
|
|
694
694
|
});
|
|
695
695
|
}));
|
|
@@ -698,29 +698,29 @@ function Bl() {
|
|
|
698
698
|
const e = f(Pe, this).pending;
|
|
699
699
|
e && (this.is_pending = !0, k(ue, this, _e(() => e(f(Ce, this)))), Ye(() => {
|
|
700
700
|
var t = k(kt, this, document.createDocumentFragment()), r = ye();
|
|
701
|
-
t.append(r), k(Ne, this, O(ne, this,
|
|
701
|
+
t.append(r), k(Ne, this, O(ne, this, Un).call(this, () => _e(() => f(gr, this).call(this, r)))), f(xt, this) === 0 && (f(Ce, this).before(t), k(kt, this, null), Nt(f(ue, this), () => {
|
|
702
702
|
k(ue, this, null);
|
|
703
|
-
}), O(ne, this,
|
|
703
|
+
}), O(ne, this, bi).call(this, E));
|
|
704
704
|
}));
|
|
705
705
|
}
|
|
706
706
|
function os() {
|
|
707
707
|
try {
|
|
708
|
-
if (this.is_pending = this.has_pending_snippet(), k(
|
|
708
|
+
if (this.is_pending = this.has_pending_snippet(), k(xt, this, 0), k(Bt, this, 0), k(Ne, this, _e(() => {
|
|
709
709
|
f(gr, this).call(this, f(Ce, this));
|
|
710
|
-
})), f(
|
|
710
|
+
})), f(xt, this) > 0) {
|
|
711
711
|
var e = k(kt, this, document.createDocumentFragment());
|
|
712
|
-
|
|
712
|
+
Ci(f(Ne, this), e);
|
|
713
713
|
const t = f(Pe, this).pending;
|
|
714
714
|
k(ue, this, _e(() => t(f(Ce, this))));
|
|
715
|
-
} else O(ne, this,
|
|
715
|
+
} else O(ne, this, bi).call(this, E);
|
|
716
716
|
} catch (t) {
|
|
717
717
|
this.error(t);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
this.is_pending = !1, e.transfer_effects(f(
|
|
720
|
+
function bi(e) {
|
|
721
|
+
this.is_pending = !1, e.transfer_effects(f(Vn, this), f(qn, this));
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Un(e) {
|
|
724
724
|
var t = M, r = $, n = K;
|
|
725
725
|
ze(f(ve, this)), Te(f(ve, this)), qt(f(ve, this).ctx);
|
|
726
726
|
try {
|
|
@@ -739,12 +739,12 @@ function ss(e, t) {
|
|
|
739
739
|
}
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
|
-
k(
|
|
742
|
+
k(xt, this, f(xt, this) + e), f(xt, this) === 0 && (O(ne, this, bi).call(this, t), f(ue, this) && Nt(f(ue, this), () => {
|
|
743
743
|
k(ue, this, null);
|
|
744
744
|
}), f(kt, this) && (f(Ce, this).before(f(kt, this)), k(kt, this, null)));
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
f(Ne, this) && (se(f(Ne, this)), k(Ne, this, null)), f(ue, this) && (se(f(ue, this)), k(ue, this, null)), f(
|
|
746
|
+
function Ji(e) {
|
|
747
|
+
f(Ne, this) && (se(f(Ne, this)), k(Ne, this, null)), f(ue, this) && (se(f(ue, this)), k(ue, this, null)), f(xe, this) && (se(f(xe, this)), k(xe, this, null)), L && (le(f(jn, this)), Sl(), le(Dr()));
|
|
748
748
|
var t = f(Pe, this).onerror;
|
|
749
749
|
let r = f(Pe, this).failed;
|
|
750
750
|
var n = !1, i = !1;
|
|
@@ -753,9 +753,9 @@ function Xi(e) {
|
|
|
753
753
|
Tl();
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
n = !0, i && bl(), f(
|
|
757
|
-
k(
|
|
758
|
-
}), O(ne, this,
|
|
756
|
+
n = !0, i && bl(), f(xe, this) !== null && Nt(f(xe, this), () => {
|
|
757
|
+
k(xe, this, null);
|
|
758
|
+
}), O(ne, this, Un).call(this, () => {
|
|
759
759
|
O(ne, this, os).call(this);
|
|
760
760
|
});
|
|
761
761
|
}, s = (a) => {
|
|
@@ -764,7 +764,7 @@ function Xi(e) {
|
|
|
764
764
|
} catch (l) {
|
|
765
765
|
lt(l, f(ve, this) && f(ve, this).parent);
|
|
766
766
|
}
|
|
767
|
-
r && k(
|
|
767
|
+
r && k(xe, this, O(ne, this, Un).call(this, () => {
|
|
768
768
|
try {
|
|
769
769
|
return _e(() => {
|
|
770
770
|
var l = M;
|
|
@@ -787,7 +787,7 @@ function Xi(e) {
|
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
function Dl(e, t, r, n) {
|
|
790
|
-
const i = br() ? vr :
|
|
790
|
+
const i = br() ? vr : _i;
|
|
791
791
|
var o = e.filter((d) => !d.settled);
|
|
792
792
|
if (r.length === 0 && o.length === 0) {
|
|
793
793
|
n(t.map(i));
|
|
@@ -802,7 +802,7 @@ function Dl(e, t, r, n) {
|
|
|
802
802
|
} catch (p) {
|
|
803
803
|
lt(p, s);
|
|
804
804
|
}
|
|
805
|
-
|
|
805
|
+
Xr();
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
var u = as();
|
|
@@ -814,21 +814,21 @@ function Dl(e, t, r, n) {
|
|
|
814
814
|
Promise.all(r.map((d) => /* @__PURE__ */ jl(d))).then((d) => c([...t.map(i), ...d])).catch((d) => lt(d, s)).finally(u);
|
|
815
815
|
}
|
|
816
816
|
l ? l.then(() => {
|
|
817
|
-
a(), h(),
|
|
817
|
+
a(), h(), Xr();
|
|
818
818
|
}) : h();
|
|
819
819
|
}
|
|
820
820
|
function Fl() {
|
|
821
|
-
var e = M, t = $, r = K, n =
|
|
821
|
+
var e = M, t = $, r = K, n = E;
|
|
822
822
|
if (0) var i;
|
|
823
823
|
return function(s = !0) {
|
|
824
824
|
ze(e), Te(t), qt(r), s && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
ze(null), Te(null), qt(null), e &&
|
|
827
|
+
function Xr(e = !0) {
|
|
828
|
+
ze(null), Te(null), qt(null), e && E?.deactivate();
|
|
829
829
|
}
|
|
830
830
|
function as() {
|
|
831
|
-
var e = M, t = e.b, r =
|
|
831
|
+
var e = M, t = e.b, r = E, n = !!t?.is_rendered();
|
|
832
832
|
return t?.update_pending_count(1, r), r.increment(n, e), () => {
|
|
833
833
|
t?.update_pending_count(-1, r), r.decrement(n, e);
|
|
834
834
|
};
|
|
@@ -851,7 +851,7 @@ function vr(e) {
|
|
|
851
851
|
ac: null
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
var
|
|
854
|
+
var Er = /* @__PURE__ */ Symbol("obsolete");
|
|
855
855
|
// @__NO_SIDE_EFFECTS__
|
|
856
856
|
function jl(e, t, r) {
|
|
857
857
|
let n = M;
|
|
@@ -862,24 +862,24 @@ function jl(e, t, r) {
|
|
|
862
862
|
i = c.promise;
|
|
863
863
|
try {
|
|
864
864
|
Promise.resolve(e()).then(c.resolve, (p) => {
|
|
865
|
-
p !==
|
|
866
|
-
}).finally(
|
|
865
|
+
p !== on && c.reject(p);
|
|
866
|
+
}).finally(Xr);
|
|
867
867
|
} catch (p) {
|
|
868
|
-
c.reject(p),
|
|
868
|
+
c.reject(p), Xr();
|
|
869
869
|
}
|
|
870
|
-
var u =
|
|
870
|
+
var u = E;
|
|
871
871
|
if (s) {
|
|
872
872
|
if ((l.f & 32768) !== 0) var h = as();
|
|
873
|
-
if (n.b?.is_rendered()) u.async_deriveds.get(l)?.reject(
|
|
874
|
-
else for (const p of a.values()) p.reject(
|
|
873
|
+
if (n.b?.is_rendered()) u.async_deriveds.get(l)?.reject(Er);
|
|
874
|
+
else for (const p of a.values()) p.reject(Er);
|
|
875
875
|
a.add(c), u.async_deriveds.set(l, c);
|
|
876
876
|
}
|
|
877
877
|
const d = (p, v = void 0) => {
|
|
878
|
-
h?.(), a.delete(c), v !==
|
|
878
|
+
h?.(), a.delete(c), v !== Er && (u.activate(), v ? (o.f |= Br, Gt(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= Br), Gt(o, p)), u.deactivate());
|
|
879
879
|
};
|
|
880
880
|
c.promise.then(d, (p) => d(null, p || "unknown"));
|
|
881
881
|
}), bs(() => {
|
|
882
|
-
for (const l of a) l.reject(
|
|
882
|
+
for (const l of a) l.reject(Er);
|
|
883
883
|
}), new Promise((l) => {
|
|
884
884
|
function c(u) {
|
|
885
885
|
function h() {
|
|
@@ -893,10 +893,10 @@ function jl(e, t, r) {
|
|
|
893
893
|
// @__NO_SIDE_EFFECTS__
|
|
894
894
|
function er(e) {
|
|
895
895
|
const t = /* @__PURE__ */ vr(e);
|
|
896
|
-
return Me ||
|
|
896
|
+
return Me || Es(t), t;
|
|
897
897
|
}
|
|
898
898
|
// @__NO_SIDE_EFFECTS__
|
|
899
|
-
function
|
|
899
|
+
function _i(e) {
|
|
900
900
|
const t = /* @__PURE__ */ vr(e);
|
|
901
901
|
return t.equals = Vo, t;
|
|
902
902
|
}
|
|
@@ -907,7 +907,7 @@ function Vl(e) {
|
|
|
907
907
|
for (var r = 0; r < t.length; r += 1) se(t[r]);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Ti(e) {
|
|
911
911
|
var t, r = M, n = e.parent;
|
|
912
912
|
if (!Ke && n !== null && e.v !== J && (n.f & 24576) !== 0)
|
|
913
913
|
return _l(), e.v;
|
|
@@ -920,22 +920,22 @@ function _i(e) {
|
|
|
920
920
|
return t;
|
|
921
921
|
}
|
|
922
922
|
function ls(e) {
|
|
923
|
-
var t =
|
|
924
|
-
if (!e.equals(t) && (e.wv = As(), (!
|
|
925
|
-
|
|
923
|
+
var t = Ti(e);
|
|
924
|
+
if (!e.equals(t) && (e.wv = As(), (!E?.is_fork || e.deps === null) && (E !== null ? (E.capture(e, t, !0), jr?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
|
|
925
|
+
q(e, be);
|
|
926
926
|
return;
|
|
927
927
|
}
|
|
928
|
-
Ke || (oe !== null ? (
|
|
928
|
+
Ke || (oe !== null ? (ki() || E?.is_fork) && oe.set(e, t) : gi(e));
|
|
929
929
|
}
|
|
930
930
|
function ql(e) {
|
|
931
931
|
if (e.effects !== null)
|
|
932
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
932
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(on), t.fn !== null && (t.teardown = el), t.ac = null, mr(t, 0), Ei(t));
|
|
933
933
|
}
|
|
934
934
|
function cs(e) {
|
|
935
935
|
if (e.effects !== null)
|
|
936
936
|
for (const t of e.effects) t.teardown && t.fn !== null && Yt(t);
|
|
937
937
|
}
|
|
938
|
-
var
|
|
938
|
+
var Jr = /* @__PURE__ */ new Set(), Et = /* @__PURE__ */ new Map();
|
|
939
939
|
var us = !1;
|
|
940
940
|
function It(e, t) {
|
|
941
941
|
var r = {
|
|
@@ -949,40 +949,40 @@ function It(e, t) {
|
|
|
949
949
|
return r;
|
|
950
950
|
}
|
|
951
951
|
// @__NO_SIDE_EFFECTS__
|
|
952
|
-
function
|
|
952
|
+
function G(e, t) {
|
|
953
953
|
const r = It(e, t);
|
|
954
|
-
return
|
|
954
|
+
return Es(r), r;
|
|
955
955
|
}
|
|
956
956
|
// @__NO_SIDE_EFFECTS__
|
|
957
957
|
function hs(e, t = !1, r = !0) {
|
|
958
958
|
const n = It(e);
|
|
959
|
-
if (t || (n.equals = Vo),
|
|
959
|
+
if (t || (n.equals = Vo), ln && r && K !== null && K.l !== null) {
|
|
960
960
|
var i;
|
|
961
961
|
((i = K.l).s ?? (i.s = [])).push(n);
|
|
962
962
|
}
|
|
963
963
|
return n;
|
|
964
964
|
}
|
|
965
965
|
function A(e, t, r = !1) {
|
|
966
|
-
$ !== null && (!
|
|
966
|
+
$ !== null && (!Ee || ($.f & 131072) !== 0) && br() && ($.f & 4325394) !== 0 && (Ae === null || !Ae.has(e)) && yl();
|
|
967
967
|
let n = r ? ct(t) : t;
|
|
968
|
-
return Gt(e, n,
|
|
968
|
+
return Gt(e, n, Vr);
|
|
969
969
|
}
|
|
970
970
|
function Gt(e, t, r = null) {
|
|
971
971
|
if (!e.equals(t)) {
|
|
972
|
-
|
|
972
|
+
Et.set(e, Ke ? t : e.v);
|
|
973
973
|
var n = Pt.ensure();
|
|
974
974
|
if (n.capture(e, t), (e.f & 2) !== 0) {
|
|
975
975
|
const i = e;
|
|
976
|
-
(e.f & 2048) !== 0 &&
|
|
976
|
+
(e.f & 2048) !== 0 && Ti(i), oe === null && gi(i);
|
|
977
977
|
}
|
|
978
|
-
e.wv = As(), ds(e, Se, r), br() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (pe === null ? sc([e]) : pe.push(e)), !n.is_fork &&
|
|
978
|
+
e.wv = As(), ds(e, Se, r), br() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (pe === null ? sc([e]) : pe.push(e)), !n.is_fork && Jr.size > 0 && !us && Ul();
|
|
979
979
|
}
|
|
980
980
|
return t;
|
|
981
981
|
}
|
|
982
982
|
function Ul() {
|
|
983
983
|
us = !1;
|
|
984
|
-
for (const e of
|
|
985
|
-
(e.f & 1024) !== 0 &&
|
|
984
|
+
for (const e of Jr) {
|
|
985
|
+
(e.f & 1024) !== 0 && q(e, Lt);
|
|
986
986
|
let t;
|
|
987
987
|
try {
|
|
988
988
|
t = _r(e);
|
|
@@ -991,7 +991,7 @@ function Ul() {
|
|
|
991
991
|
}
|
|
992
992
|
t && Yt(e);
|
|
993
993
|
}
|
|
994
|
-
|
|
994
|
+
Jr.clear();
|
|
995
995
|
}
|
|
996
996
|
function Gl(e, t = 1) {
|
|
997
997
|
var r = g(e), n = t === 1 ? r++ : r--;
|
|
@@ -1007,13 +1007,13 @@ function ds(e, t, r) {
|
|
|
1007
1007
|
var a = n[s], l = a.f;
|
|
1008
1008
|
if (!(!i && a === M)) {
|
|
1009
1009
|
var c = (l & Se) === 0;
|
|
1010
|
-
if (c &&
|
|
1010
|
+
if (c && q(a, t), (l & 131072) !== 0) Jr.add(a);
|
|
1011
1011
|
else if ((l & 2) !== 0) {
|
|
1012
1012
|
var u = a;
|
|
1013
1013
|
oe?.delete(u), (l & 65536) === 0 && (l & 512 && (M === null || (M.f & 2097152) === 0) && (a.f |= yr), ds(u, Lt, r));
|
|
1014
1014
|
} else if (c) {
|
|
1015
1015
|
var h = a;
|
|
1016
|
-
(l & 16) !== 0 && Le !== null && Le.add(h), r !== null ? r.push(h) :
|
|
1016
|
+
(l & 16) !== 0 && Le !== null && Le.add(h), r !== null ? r.push(h) : yi(h);
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
@@ -1023,20 +1023,20 @@ function ct(e) {
|
|
|
1023
1023
|
if (typeof e != "object" || e === null || hr in e) return e;
|
|
1024
1024
|
const t = Ho(e);
|
|
1025
1025
|
if (t !== Qa && t !== Za) return e;
|
|
1026
|
-
var r = /* @__PURE__ */ new Map(), n = Wo(e), i = /* @__PURE__ */
|
|
1026
|
+
var r = /* @__PURE__ */ new Map(), n = Wo(e), i = /* @__PURE__ */ G(0), o = null, s = Ct, a = (h) => {
|
|
1027
1027
|
if (Ct === s) return h();
|
|
1028
1028
|
var d = $, p = Ct;
|
|
1029
|
-
Te(null),
|
|
1029
|
+
Te(null), ro(s);
|
|
1030
1030
|
var v = h();
|
|
1031
|
-
return Te(d),
|
|
1031
|
+
return Te(d), ro(p), v;
|
|
1032
1032
|
};
|
|
1033
|
-
n && r.set("length", /* @__PURE__ */
|
|
1033
|
+
n && r.set("length", /* @__PURE__ */ G(e.length, o));
|
|
1034
1034
|
var l = "";
|
|
1035
1035
|
let c = !1;
|
|
1036
1036
|
function u(h) {
|
|
1037
1037
|
if (!c) {
|
|
1038
|
-
c = !0, l = h,
|
|
1039
|
-
for (const [d, p] of r)
|
|
1038
|
+
c = !0, l = h, Gi(i, `${l} version`);
|
|
1039
|
+
for (const [d, p] of r) Gi(p, Kl(l, d));
|
|
1040
1040
|
c = !1;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
@@ -1045,7 +1045,7 @@ function ct(e) {
|
|
|
1045
1045
|
(!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) && vl();
|
|
1046
1046
|
var v = r.get(d);
|
|
1047
1047
|
return v === void 0 ? a(() => {
|
|
1048
|
-
var b = /* @__PURE__ */
|
|
1048
|
+
var b = /* @__PURE__ */ G(p.value, o);
|
|
1049
1049
|
return r.set(d, b), b;
|
|
1050
1050
|
}) : A(v, p.value, !0), !0;
|
|
1051
1051
|
},
|
|
@@ -1053,7 +1053,7 @@ function ct(e) {
|
|
|
1053
1053
|
var p = r.get(d);
|
|
1054
1054
|
if (p === void 0) {
|
|
1055
1055
|
if (d in h) {
|
|
1056
|
-
const v = a(() => /* @__PURE__ */
|
|
1056
|
+
const v = a(() => /* @__PURE__ */ G(J, o));
|
|
1057
1057
|
r.set(d, v), pr(i);
|
|
1058
1058
|
}
|
|
1059
1059
|
} else
|
|
@@ -1064,7 +1064,7 @@ function ct(e) {
|
|
|
1064
1064
|
if (d === hr) return e;
|
|
1065
1065
|
var v = r.get(d), b = d in h;
|
|
1066
1066
|
if (v === void 0 && (!b || St(h, d)?.writable) && (v = a(() => {
|
|
1067
|
-
var _ = /* @__PURE__ */
|
|
1067
|
+
var _ = /* @__PURE__ */ G(ct(b ? h[d] : J), o);
|
|
1068
1068
|
return _;
|
|
1069
1069
|
}), r.set(d, v)), v !== void 0) {
|
|
1070
1070
|
var m = g(v);
|
|
@@ -1092,7 +1092,7 @@ function ct(e) {
|
|
|
1092
1092
|
if (d === hr) return !0;
|
|
1093
1093
|
var p = r.get(d), v = p !== void 0 && p.v !== J || Reflect.has(h, d);
|
|
1094
1094
|
return (p !== void 0 || M !== null && (!v || St(h, d)?.writable)) && (p === void 0 && (p = a(() => {
|
|
1095
|
-
var b = /* @__PURE__ */
|
|
1095
|
+
var b = /* @__PURE__ */ G(v ? ct(h[d]) : J, o);
|
|
1096
1096
|
return b;
|
|
1097
1097
|
}), r.set(d, p)), g(p) === J) ? !1 : v;
|
|
1098
1098
|
},
|
|
@@ -1100,10 +1100,10 @@ function ct(e) {
|
|
|
1100
1100
|
var b = r.get(d), m = d in h;
|
|
1101
1101
|
if (n && d === "length") for (var _ = p; _ < b.v; _ += 1) {
|
|
1102
1102
|
var N = r.get(_ + "");
|
|
1103
|
-
N !== void 0 ? A(N, J) : _ in h && (N = a(() => /* @__PURE__ */
|
|
1103
|
+
N !== void 0 ? A(N, J) : _ in h && (N = a(() => /* @__PURE__ */ G(J, o)), r.set(_ + "", N));
|
|
1104
1104
|
}
|
|
1105
1105
|
if (b === void 0)
|
|
1106
|
-
(!m || St(h, d)?.writable) && (b = a(() => /* @__PURE__ */
|
|
1106
|
+
(!m || St(h, d)?.writable) && (b = a(() => /* @__PURE__ */ G(void 0, o)), A(b, ct(p)), r.set(d, b));
|
|
1107
1107
|
else {
|
|
1108
1108
|
m = b.v !== J;
|
|
1109
1109
|
var B = a(() => ct(p));
|
|
@@ -1136,12 +1136,12 @@ function ct(e) {
|
|
|
1136
1136
|
function Kl(e, t) {
|
|
1137
1137
|
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Yl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1138
1138
|
}
|
|
1139
|
-
var
|
|
1140
|
-
function
|
|
1141
|
-
if (
|
|
1142
|
-
|
|
1139
|
+
var Qi, Xl, fs, ps, gs;
|
|
1140
|
+
function Gn() {
|
|
1141
|
+
if (Qi === void 0) {
|
|
1142
|
+
Qi = window, Xl = document, fs = /Firefox/.test(navigator.userAgent);
|
|
1143
1143
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1144
|
-
ps = St(t, "firstChild").get, gs = St(t, "nextSibling").get,
|
|
1144
|
+
ps = St(t, "firstChild").get, gs = St(t, "nextSibling").get, Vi(e) && (e[Hn] = void 0, e[Wn] = null, e[Bn] = void 0, e.__e = void 0), Vi(r) && (r[Or] = void 0);
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
function ye(e = "") {
|
|
@@ -1163,9 +1163,9 @@ function Fe(e, t) {
|
|
|
1163
1163
|
var n = ye();
|
|
1164
1164
|
return r?.before(n), le(n), n;
|
|
1165
1165
|
}
|
|
1166
|
-
return t &&
|
|
1166
|
+
return t && wi(r), le(r), r;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function Sn(e, t = !1) {
|
|
1169
1169
|
if (!L) {
|
|
1170
1170
|
var r = /* @__PURE__ */ me(e);
|
|
1171
1171
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ We(r) : r;
|
|
@@ -1175,7 +1175,7 @@ function Tn(e, t = !1) {
|
|
|
1175
1175
|
var n = ye();
|
|
1176
1176
|
return P?.before(n), le(n), n;
|
|
1177
1177
|
}
|
|
1178
|
-
|
|
1178
|
+
wi(P);
|
|
1179
1179
|
}
|
|
1180
1180
|
return P;
|
|
1181
1181
|
}
|
|
@@ -1189,7 +1189,7 @@ function Re(e, t = 1, r = !1) {
|
|
|
1189
1189
|
var o = ye();
|
|
1190
1190
|
return n === null ? i?.after(o) : n.before(o), le(o), o;
|
|
1191
1191
|
}
|
|
1192
|
-
|
|
1192
|
+
wi(n);
|
|
1193
1193
|
}
|
|
1194
1194
|
return le(n), n;
|
|
1195
1195
|
}
|
|
@@ -1197,26 +1197,26 @@ function vs(e) {
|
|
|
1197
1197
|
e.textContent = "";
|
|
1198
1198
|
}
|
|
1199
1199
|
function ms() {
|
|
1200
|
-
return !Me || Le !== null ? !1 : (M.f &
|
|
1200
|
+
return !Me || Le !== null ? !1 : (M.f & fi) !== 0;
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Si(e, t, r) {
|
|
1203
1203
|
return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function wi(e) {
|
|
1206
1206
|
if (e.nodeValue.length < 65536) return;
|
|
1207
1207
|
let t = e.nextSibling;
|
|
1208
1208
|
for (; t !== null && t.nodeType === 3; )
|
|
1209
1209
|
t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
|
|
1210
1210
|
}
|
|
1211
|
-
var
|
|
1211
|
+
var Zi = !1;
|
|
1212
1212
|
function ys() {
|
|
1213
|
-
|
|
1213
|
+
Zi || (Zi = !0, document.addEventListener("reset", (e) => {
|
|
1214
1214
|
Promise.resolve().then(() => {
|
|
1215
1215
|
if (!e.defaultPrevented) for (const t of e.target.elements) t[dr]?.();
|
|
1216
1216
|
});
|
|
1217
1217
|
}, { capture: !0 }));
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function cn(e) {
|
|
1220
1220
|
var t = $, r = M;
|
|
1221
1221
|
Te(null), ze(null);
|
|
1222
1222
|
try {
|
|
@@ -1226,7 +1226,7 @@ function ln(e) {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
function Jl(e, t, r, n = r) {
|
|
1229
|
-
e.addEventListener(t, () =>
|
|
1229
|
+
e.addEventListener(t, () => cn(r));
|
|
1230
1230
|
const i = e[dr];
|
|
1231
1231
|
i ? e[dr] = () => {
|
|
1232
1232
|
i(), n(!0);
|
|
@@ -1241,7 +1241,7 @@ function Zl(e, t) {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
function He(e, t) {
|
|
1243
1243
|
var r = M;
|
|
1244
|
-
r !== null && (r.f & 8192) !== 0 && (e |=
|
|
1244
|
+
r !== null && (r.f & 8192) !== 0 && (e |= di);
|
|
1245
1245
|
var n = {
|
|
1246
1246
|
ctx: K,
|
|
1247
1247
|
deps: null,
|
|
@@ -1258,7 +1258,7 @@ function He(e, t) {
|
|
|
1258
1258
|
wv: 0,
|
|
1259
1259
|
ac: null
|
|
1260
1260
|
};
|
|
1261
|
-
|
|
1261
|
+
E?.register_created_effect(n);
|
|
1262
1262
|
var i = n;
|
|
1263
1263
|
if ((e & 4) !== 0) Ut !== null ? Ut.push(n) : Pt.ensure().schedule(n);
|
|
1264
1264
|
else if (t !== null) {
|
|
@@ -1267,7 +1267,7 @@ function He(e, t) {
|
|
|
1267
1267
|
} catch (s) {
|
|
1268
1268
|
throw se(n), s;
|
|
1269
1269
|
}
|
|
1270
|
-
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |=
|
|
1270
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= pi));
|
|
1271
1271
|
}
|
|
1272
1272
|
if (i !== null && (i.parent = r, r !== null && Zl(i, r), $ !== null && ($.f & 2) !== 0 && (e & 64) === 0)) {
|
|
1273
1273
|
var o = $;
|
|
@@ -1275,14 +1275,14 @@ function He(e, t) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return n;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
return $ !== null && !
|
|
1278
|
+
function ki() {
|
|
1279
|
+
return $ !== null && !Ee;
|
|
1280
1280
|
}
|
|
1281
1281
|
function bs(e) {
|
|
1282
1282
|
const t = He(8, null);
|
|
1283
|
-
return
|
|
1283
|
+
return q(t, be), t.teardown = e, t;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function eo(e) {
|
|
1286
1286
|
Ql("$effect");
|
|
1287
1287
|
var t = M.f;
|
|
1288
1288
|
if (!$ && (t & 32) !== 0 && K !== null && !K.i) {
|
|
@@ -1315,7 +1315,7 @@ function Ts(e) {
|
|
|
1315
1315
|
function rc(e) {
|
|
1316
1316
|
return He(il | Xt, e);
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1318
|
+
function un(e, t = 0) {
|
|
1319
1319
|
return He(8 | t, e);
|
|
1320
1320
|
}
|
|
1321
1321
|
function je(e, t = [], r = [], n = []) {
|
|
@@ -1323,7 +1323,7 @@ function je(e, t = [], r = [], n = []) {
|
|
|
1323
1323
|
He(8, () => e(...i.map(g)));
|
|
1324
1324
|
});
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1326
|
+
function xi(e, t = 0) {
|
|
1327
1327
|
var r = He(16 | t, e);
|
|
1328
1328
|
return r;
|
|
1329
1329
|
}
|
|
@@ -1334,11 +1334,11 @@ function Ss(e) {
|
|
|
1334
1334
|
var t = e.teardown;
|
|
1335
1335
|
if (t !== null) {
|
|
1336
1336
|
const r = Ke, n = $;
|
|
1337
|
-
|
|
1337
|
+
to(!0), Te(null);
|
|
1338
1338
|
try {
|
|
1339
1339
|
t.call(null);
|
|
1340
1340
|
} finally {
|
|
1341
|
-
|
|
1341
|
+
to(r), Te(n);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
@@ -1346,8 +1346,8 @@ function Ei(e, t = !1) {
|
|
|
1346
1346
|
var r = e.first;
|
|
1347
1347
|
for (e.first = e.last = null; r !== null; ) {
|
|
1348
1348
|
const i = r.ac;
|
|
1349
|
-
i !== null &&
|
|
1350
|
-
i.abort(
|
|
1349
|
+
i !== null && cn(() => {
|
|
1350
|
+
i.abort(on);
|
|
1351
1351
|
});
|
|
1352
1352
|
var n = r.next;
|
|
1353
1353
|
(r.f & 64) !== 0 ? r.parent = null : se(r, t), r = n;
|
|
@@ -1361,10 +1361,10 @@ function nc(e) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
function se(e, t = !0) {
|
|
1363
1363
|
var r = !1;
|
|
1364
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ic(e.nodes.start, e.nodes.end), r = !0),
|
|
1364
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ic(e.nodes.start, e.nodes.end), r = !0), q(e, qi), Ei(e, t && !r), mr(e, 0);
|
|
1365
1365
|
var n = e.nodes && e.nodes.t;
|
|
1366
1366
|
if (n !== null) for (const o of n) o.stop();
|
|
1367
|
-
Ss(e), e.f ^=
|
|
1367
|
+
Ss(e), e.f ^= qi, e.f |= rl;
|
|
1368
1368
|
var i = e.parent;
|
|
1369
1369
|
i !== null && i.first !== null && ws(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1370
1370
|
}
|
|
@@ -1391,7 +1391,7 @@ function Nt(e, t, r = !0) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
function ks(e, t, r) {
|
|
1393
1393
|
if ((e.f & 8192) === 0) {
|
|
1394
|
-
e.f ^=
|
|
1394
|
+
e.f ^= di;
|
|
1395
1395
|
var n = e.nodes && e.nodes.t;
|
|
1396
1396
|
if (n !== null)
|
|
1397
1397
|
for (const a of n) (a.is_global || r) && t.push(a);
|
|
@@ -1405,22 +1405,22 @@ function ks(e, t, r) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
|
|
1408
|
+
function Qr(e) {
|
|
1409
|
+
xs(e, !0);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function xs(e, t) {
|
|
1412
1412
|
if ((e.f & 8192) !== 0) {
|
|
1413
|
-
e.f ^=
|
|
1413
|
+
e.f ^= di, (e.f & 1024) === 0 && (q(e, Se), Pt.ensure().schedule(e));
|
|
1414
1414
|
for (var r = e.first; r !== null; ) {
|
|
1415
1415
|
var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
|
|
1416
|
-
|
|
1416
|
+
xs(r, i ? t : !1), r = n;
|
|
1417
1417
|
}
|
|
1418
1418
|
var o = e.nodes && e.nodes.t;
|
|
1419
1419
|
if (o !== null)
|
|
1420
1420
|
for (const s of o) (s.is_global || t) && s.in();
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Ci(e, t) {
|
|
1424
1424
|
if (e.nodes)
|
|
1425
1425
|
for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
|
|
1426
1426
|
var i = r === n ? null : /* @__PURE__ */ We(r);
|
|
@@ -1428,10 +1428,10 @@ function xi(e, t) {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
1430
|
var oc = null, Rr = !1, Ke = !1;
|
|
1431
|
-
function
|
|
1431
|
+
function to(e) {
|
|
1432
1432
|
Ke = e;
|
|
1433
1433
|
}
|
|
1434
|
-
var $ = null,
|
|
1434
|
+
var $ = null, Ee = !1;
|
|
1435
1435
|
function Te(e) {
|
|
1436
1436
|
$ = e;
|
|
1437
1437
|
}
|
|
@@ -1440,7 +1440,7 @@ function ze(e) {
|
|
|
1440
1440
|
M = e;
|
|
1441
1441
|
}
|
|
1442
1442
|
var Ae = null;
|
|
1443
|
-
function
|
|
1443
|
+
function Es(e) {
|
|
1444
1444
|
$ !== null && (!Me || ($.f & 2) !== 0) && (Ae ?? (Ae = /* @__PURE__ */ new Set())).add(e);
|
|
1445
1445
|
}
|
|
1446
1446
|
var ae = null, ce = 0, pe = null;
|
|
@@ -1448,7 +1448,7 @@ function sc(e) {
|
|
|
1448
1448
|
pe = e;
|
|
1449
1449
|
}
|
|
1450
1450
|
var Cs = 1, _t = 0, Ct = _t;
|
|
1451
|
-
function
|
|
1451
|
+
function ro(e) {
|
|
1452
1452
|
Ct = e;
|
|
1453
1453
|
}
|
|
1454
1454
|
function As() {
|
|
@@ -1462,7 +1462,7 @@ function _r(e) {
|
|
|
1462
1462
|
var o = r[i];
|
|
1463
1463
|
if (_r(o) && ls(o), o.wv > e.wv) return !0;
|
|
1464
1464
|
}
|
|
1465
|
-
(t & 512) !== 0 && oe === null &&
|
|
1465
|
+
(t & 512) !== 0 && oe === null && q(e, be);
|
|
1466
1466
|
}
|
|
1467
1467
|
return !1;
|
|
1468
1468
|
}
|
|
@@ -1471,40 +1471,40 @@ function Ms(e, t, r = !0) {
|
|
|
1471
1471
|
if (n !== null && !(!Me && Ae !== null && Ae.has(e)))
|
|
1472
1472
|
for (var i = 0; i < n.length; i++) {
|
|
1473
1473
|
var o = n[i];
|
|
1474
|
-
(o.f & 2) !== 0 ? Ms(o, t, !1) : t === o && (r ?
|
|
1474
|
+
(o.f & 2) !== 0 ? Ms(o, t, !1) : t === o && (r ? q(o, Se) : (o.f & 1024) !== 0 && q(o, Lt), yi(o));
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
function Os(e) {
|
|
1478
|
-
var t = ae, r = ce, n = pe, i = $, o = Ae, s = K, a =
|
|
1479
|
-
ae = null, ce = 0, pe = null, $ = (c & 96) === 0 ? e : null, Ae = null, qt(e.ctx),
|
|
1480
|
-
e.ac.abort(
|
|
1478
|
+
var t = ae, r = ce, n = pe, i = $, o = Ae, s = K, a = Ee, l = Ct, c = e.f;
|
|
1479
|
+
ae = null, ce = 0, pe = null, $ = (c & 96) === 0 ? e : null, Ae = null, qt(e.ctx), Ee = !1, Ct = ++_t, e.ac !== null && (cn(() => {
|
|
1480
|
+
e.ac.abort(on);
|
|
1481
1481
|
}), e.ac = null);
|
|
1482
1482
|
try {
|
|
1483
|
-
e.f |=
|
|
1483
|
+
e.f |= Ui;
|
|
1484
1484
|
var u = e.fn, h = u();
|
|
1485
|
-
e.f |=
|
|
1486
|
-
var d = e.deps, p =
|
|
1485
|
+
e.f |= fi;
|
|
1486
|
+
var d = e.deps, p = E?.is_fork;
|
|
1487
1487
|
if (ae !== null) {
|
|
1488
1488
|
var v;
|
|
1489
1489
|
if (p || mr(e, ce), d !== null && ce > 0)
|
|
1490
1490
|
for (d.length = ce + ae.length, v = 0; v < ae.length; v++) d[ce + v] = ae[v];
|
|
1491
1491
|
else e.deps = d = ae;
|
|
1492
|
-
if (
|
|
1492
|
+
if (ki() && (e.f & 512) !== 0) for (v = ce; v < d.length; v++) {
|
|
1493
1493
|
var b;
|
|
1494
1494
|
((b = d[v]).reactions ?? (b.reactions = [])).push(e);
|
|
1495
1495
|
}
|
|
1496
1496
|
} else !p && d !== null && ce < d.length && (mr(e, ce), d.length = ce);
|
|
1497
|
-
if (br() && pe !== null && !
|
|
1497
|
+
if (br() && pe !== null && !Ee && d !== null && (e.f & 6146) === 0) for (v = 0; v < pe.length; v++) Ms(pe[v], e);
|
|
1498
1498
|
if (i !== null && i !== e) {
|
|
1499
1499
|
if (_t++, i.deps !== null) for (let m = 0; m < r; m += 1) i.deps[m].rv = _t;
|
|
1500
1500
|
if (t !== null) for (const m of t) m.rv = _t;
|
|
1501
1501
|
pe !== null && (n === null ? n = pe : n.push(...pe));
|
|
1502
1502
|
}
|
|
1503
|
-
return (e.f & 8388608) !== 0 && (e.f ^=
|
|
1503
|
+
return (e.f & 8388608) !== 0 && (e.f ^= Br), h;
|
|
1504
1504
|
} catch (m) {
|
|
1505
1505
|
return Yo(m);
|
|
1506
1506
|
} finally {
|
|
1507
|
-
e.f ^=
|
|
1507
|
+
e.f ^= Ui, ae = t, ce = r, pe = n, $ = i, Ae = o, qt(s), Ee = a, Ct = l;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
function ac(e, t) {
|
|
@@ -1516,9 +1516,9 @@ function ac(e, t) {
|
|
|
1516
1516
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
-
if (r === null && (t.f & 2) !== 0 && (ae === null || !
|
|
1519
|
+
if (r === null && (t.f & 2) !== 0 && (ae === null || !zr.call(ae, t))) {
|
|
1520
1520
|
var o = t;
|
|
1521
|
-
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~yr), o.v !== J &&
|
|
1521
|
+
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~yr), o.v !== J && gi(o), ql(o), mr(o, 0);
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
function mr(e, t) {
|
|
@@ -1529,7 +1529,7 @@ function mr(e, t) {
|
|
|
1529
1529
|
function Yt(e) {
|
|
1530
1530
|
var t = e.f;
|
|
1531
1531
|
if ((t & 16384) === 0) {
|
|
1532
|
-
|
|
1532
|
+
q(e, be);
|
|
1533
1533
|
var r = M, n = Rr;
|
|
1534
1534
|
if (M = e, Rr = !0, 0)
|
|
1535
1535
|
var i, o;
|
|
@@ -1547,37 +1547,37 @@ async function lc() {
|
|
|
1547
1547
|
if (Me) return new Promise((e) => {
|
|
1548
1548
|
requestAnimationFrame(() => e()), setTimeout(() => e());
|
|
1549
1549
|
});
|
|
1550
|
-
await Promise.resolve(),
|
|
1550
|
+
await Promise.resolve(), Kr();
|
|
1551
1551
|
}
|
|
1552
1552
|
function g(e) {
|
|
1553
1553
|
var t = (e.f & 2) !== 0;
|
|
1554
|
-
if (oc?.add(e), $ !== null && !
|
|
1554
|
+
if (oc?.add(e), $ !== null && !Ee && !(M !== null && (M.f & 16384) !== 0) && (Ae === null || !Ae.has(e))) {
|
|
1555
1555
|
var r = $.deps;
|
|
1556
1556
|
if (($.f & 2097152) !== 0)
|
|
1557
1557
|
e.rv < _t && (e.rv = _t, ae === null && r !== null && r[ce] === e ? ce++ : ae === null ? ae = [e] : ae.push(e));
|
|
1558
1558
|
else {
|
|
1559
1559
|
var n;
|
|
1560
|
-
(n = $).deps ?? (n.deps = []),
|
|
1560
|
+
(n = $).deps ?? (n.deps = []), zr.call($.deps, e) || $.deps.push(e);
|
|
1561
1561
|
var i = e.reactions;
|
|
1562
|
-
i === null ? e.reactions = [$] :
|
|
1562
|
+
i === null ? e.reactions = [$] : zr.call(i, $) || i.push($);
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
1565
|
if (0) {
|
|
1566
|
-
if (!
|
|
1566
|
+
if (!Ee && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
|
|
1567
1567
|
var o;
|
|
1568
|
-
if (tracing_mode_flag && !
|
|
1568
|
+
if (tracing_mode_flag && !Ee && tracing_expressions !== null && $ !== null && tracing_expressions.reaction === $ && !e.trace) {
|
|
1569
1569
|
if (o)
|
|
1570
1570
|
var s, a;
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
|
-
if (Ke &&
|
|
1573
|
+
if (Ke && Et.has(e)) return Et.get(e);
|
|
1574
1574
|
if (t) {
|
|
1575
1575
|
var l = e;
|
|
1576
1576
|
if (Ke) {
|
|
1577
1577
|
var c = l.v;
|
|
1578
|
-
return ((l.f & 1024) === 0 && l.reactions !== null || Rs(l)) && (c =
|
|
1578
|
+
return ((l.f & 1024) === 0 && l.reactions !== null || Rs(l)) && (c = Ti(l)), Et.set(l, c), c;
|
|
1579
1579
|
}
|
|
1580
|
-
var u = (l.f & 512) === 0 && !
|
|
1580
|
+
var u = (l.f & 512) === 0 && !Ee && $ !== null && (Rr || ($.f & 512) !== 0), h = (l.f & fi) === 0;
|
|
1581
1581
|
_r(l) && (u && (l.f |= 512), ls(l)), u && !h && (cs(l), Is(l));
|
|
1582
1582
|
}
|
|
1583
1583
|
if (oe?.has(e)) return oe.get(e);
|
|
@@ -1593,21 +1593,21 @@ function Rs(e) {
|
|
|
1593
1593
|
if (e.v === J) return !0;
|
|
1594
1594
|
if (e.deps === null) return !1;
|
|
1595
1595
|
for (const t of e.deps)
|
|
1596
|
-
if (
|
|
1596
|
+
if (Et.has(t) || (t.f & 2) !== 0 && Rs(t)) return !0;
|
|
1597
1597
|
return !1;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1600
|
-
var t =
|
|
1599
|
+
function hn(e) {
|
|
1600
|
+
var t = Ee;
|
|
1601
1601
|
try {
|
|
1602
|
-
return
|
|
1602
|
+
return Ee = !0, e();
|
|
1603
1603
|
} finally {
|
|
1604
|
-
|
|
1604
|
+
Ee = t;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
var Ft = /* @__PURE__ */ Symbol("events"), $s = /* @__PURE__ */ new Set(),
|
|
1607
|
+
var Ft = /* @__PURE__ */ Symbol("events"), $s = /* @__PURE__ */ new Set(), Yn = /* @__PURE__ */ new Set();
|
|
1608
1608
|
function cc(e, t, r, n = {}) {
|
|
1609
1609
|
function i(o) {
|
|
1610
|
-
if (n.capture ||
|
|
1610
|
+
if (n.capture || Kn.call(t, o), !o.cancelBubble) return cn(() => r?.call(this, o));
|
|
1611
1611
|
}
|
|
1612
1612
|
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Ye(() => {
|
|
1613
1613
|
t.addEventListener(e, i, n);
|
|
@@ -1627,13 +1627,13 @@ function pt(e, t, r) {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
function hc(e) {
|
|
1629
1629
|
for (var t = 0; t < e.length; t++) $s.add(e[t]);
|
|
1630
|
-
for (var r of
|
|
1630
|
+
for (var r of Yn) r(e);
|
|
1631
1631
|
}
|
|
1632
|
-
var
|
|
1633
|
-
function
|
|
1632
|
+
var no = null;
|
|
1633
|
+
function Kn(e) {
|
|
1634
1634
|
var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], o = i[0] || e.target;
|
|
1635
|
-
|
|
1636
|
-
var s = 0, a =
|
|
1635
|
+
no = e;
|
|
1636
|
+
var s = 0, a = no === e && e[Ft];
|
|
1637
1637
|
if (a) {
|
|
1638
1638
|
var l = i.indexOf(a);
|
|
1639
1639
|
if (l !== -1 && (t === document || t === window)) {
|
|
@@ -1645,7 +1645,7 @@ function Yn(e) {
|
|
|
1645
1645
|
l <= c && (s = l);
|
|
1646
1646
|
}
|
|
1647
1647
|
if (o = i[s] || e.target, o !== t) {
|
|
1648
|
-
|
|
1648
|
+
Hr(e, "currentTarget", {
|
|
1649
1649
|
configurable: !0,
|
|
1650
1650
|
get() {
|
|
1651
1651
|
return o || r;
|
|
@@ -1680,7 +1680,7 @@ function fc(e) {
|
|
|
1680
1680
|
return dc?.createHTML(e) ?? e;
|
|
1681
1681
|
}
|
|
1682
1682
|
function Ls(e) {
|
|
1683
|
-
var t =
|
|
1683
|
+
var t = Si("template");
|
|
1684
1684
|
return t.innerHTML = fc(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1685
1685
|
}
|
|
1686
1686
|
function Ge(e, t) {
|
|
@@ -1731,7 +1731,7 @@ function pc(e, t, r = "svg") {
|
|
|
1731
1731
|
function Oe(e, t) {
|
|
1732
1732
|
return /* @__PURE__ */ pc(e, t, "svg");
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function wn() {
|
|
1735
1735
|
if (L)
|
|
1736
1736
|
return Ge(P, null), P;
|
|
1737
1737
|
var e = document.createDocumentFragment(), t = document.createComment(""), r = ye();
|
|
@@ -1740,7 +1740,7 @@ function Sn() {
|
|
|
1740
1740
|
function ee(e, t) {
|
|
1741
1741
|
if (L) {
|
|
1742
1742
|
var r = M;
|
|
1743
|
-
((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = P),
|
|
1743
|
+
((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = P), an();
|
|
1744
1744
|
return;
|
|
1745
1745
|
}
|
|
1746
1746
|
e !== null && e.before(t);
|
|
@@ -1774,7 +1774,7 @@ var gc = [
|
|
|
1774
1774
|
"defer",
|
|
1775
1775
|
"disablepictureinpicture",
|
|
1776
1776
|
"disableremoteplayback"
|
|
1777
|
-
],
|
|
1777
|
+
], mf = [
|
|
1778
1778
|
...gc,
|
|
1779
1779
|
"formNoValidate",
|
|
1780
1780
|
"isMap",
|
|
@@ -1799,7 +1799,7 @@ var yc = [
|
|
|
1799
1799
|
"$state.raw",
|
|
1800
1800
|
"$derived",
|
|
1801
1801
|
"$derived.by"
|
|
1802
|
-
],
|
|
1802
|
+
], yf = [
|
|
1803
1803
|
...yc,
|
|
1804
1804
|
"$state.eager",
|
|
1805
1805
|
"$state.snapshot",
|
|
@@ -1815,7 +1815,7 @@ var yc = [
|
|
|
1815
1815
|
"$inspect().with",
|
|
1816
1816
|
"$inspect.trace",
|
|
1817
1817
|
"$host"
|
|
1818
|
-
],
|
|
1818
|
+
], io = !0;
|
|
1819
1819
|
function bc(e, t) {
|
|
1820
1820
|
var r, n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1821
1821
|
n !== ((r = e)[Or] ?? (r[Or] = e.nodeValue)) && (e[Or] = n, e.nodeValue = `${n}`);
|
|
@@ -1824,7 +1824,7 @@ function Ns(e, t) {
|
|
|
1824
1824
|
return zs(e, t);
|
|
1825
1825
|
}
|
|
1826
1826
|
function _c(e, t) {
|
|
1827
|
-
|
|
1827
|
+
Gn(), t.intro = t.intro ?? !1;
|
|
1828
1828
|
const r = t.target, n = L, i = P;
|
|
1829
1829
|
try {
|
|
1830
1830
|
for (var o = /* @__PURE__ */ me(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ We(o);
|
|
@@ -1838,22 +1838,22 @@ function _c(e, t) {
|
|
|
1838
1838
|
} catch (s) {
|
|
1839
1839
|
if (s instanceof Error && s.message.split(`
|
|
1840
1840
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1841
|
-
return s !== Vt && console.warn("Failed to hydrate: ", s), t.recover === !1 && pl(),
|
|
1841
|
+
return s !== Vt && console.warn("Failed to hydrate: ", s), t.recover === !1 && pl(), Gn(), vs(r), qe(!1), Ns(e, t);
|
|
1842
1842
|
} finally {
|
|
1843
1843
|
qe(n), le(i);
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
var Cr = /* @__PURE__ */ new Map();
|
|
1847
1847
|
function zs(e, { target: t, anchor: r, props: n = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1848
|
-
|
|
1848
|
+
Gn();
|
|
1849
1849
|
var l = void 0, c = tc(() => {
|
|
1850
1850
|
var u = r ?? t.appendChild(ye());
|
|
1851
1851
|
Nl(u, { pending: () => {
|
|
1852
1852
|
} }, (p) => {
|
|
1853
1853
|
qo({});
|
|
1854
1854
|
var v = K;
|
|
1855
|
-
if (o && (v.c = o), i && (n.$$events = i), L && Ge(p, null),
|
|
1856
|
-
throw
|
|
1855
|
+
if (o && (v.c = o), i && (n.$$events = i), L && Ge(p, null), io = s, l = e(p, n) || {}, io = !0, L && (M.nodes.end = P, P === null || P.nodeType !== 8 || P.data !== "]"))
|
|
1856
|
+
throw sn(), Vt;
|
|
1857
1857
|
Uo();
|
|
1858
1858
|
}, a);
|
|
1859
1859
|
var h = /* @__PURE__ */ new Set(), d = (p) => {
|
|
@@ -1866,36 +1866,36 @@ function zs(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
|
|
|
1866
1866
|
var _ = Cr.get(B);
|
|
1867
1867
|
_ === void 0 && (_ = /* @__PURE__ */ new Map(), Cr.set(B, _));
|
|
1868
1868
|
var N = _.get(b);
|
|
1869
|
-
N === void 0 ? (B.addEventListener(b,
|
|
1869
|
+
N === void 0 ? (B.addEventListener(b, Kn, { passive: m }), _.set(b, 1)) : _.set(b, N + 1);
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
1873
|
};
|
|
1874
|
-
return d(
|
|
1874
|
+
return d(nn($s)), Yn.add(d), () => {
|
|
1875
1875
|
for (var p of h) for (const m of [t, document]) {
|
|
1876
1876
|
var v = Cr.get(m), b = v.get(p);
|
|
1877
|
-
--b == 0 ? (m.removeEventListener(p,
|
|
1877
|
+
--b == 0 ? (m.removeEventListener(p, Kn), v.delete(p), v.size === 0 && Cr.delete(m)) : v.set(p, b);
|
|
1878
1878
|
}
|
|
1879
|
-
|
|
1879
|
+
Yn.delete(d), u !== r && u.parentNode?.removeChild(u);
|
|
1880
1880
|
};
|
|
1881
1881
|
});
|
|
1882
|
-
return
|
|
1882
|
+
return Xn.set(l, c), l;
|
|
1883
1883
|
}
|
|
1884
|
-
var
|
|
1884
|
+
var Xn = /* @__PURE__ */ new WeakMap();
|
|
1885
1885
|
function Tc(e, t) {
|
|
1886
|
-
const r =
|
|
1887
|
-
return r ? (
|
|
1886
|
+
const r = Xn.get(e);
|
|
1887
|
+
return r ? (Xn.delete(e), r(t)) : Promise.resolve();
|
|
1888
1888
|
}
|
|
1889
|
-
var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(),
|
|
1889
|
+
var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), oo = /* @__PURE__ */ new WeakMap(), Sc = class {
|
|
1890
1890
|
constructor(e, t = !0) {
|
|
1891
|
-
y(this, "anchor", void 0),
|
|
1891
|
+
y(this, "anchor", void 0), x(this, Ve, /* @__PURE__ */ new Map()), x(this, nt, /* @__PURE__ */ new Map()), x(this, ke, /* @__PURE__ */ new Map()), x(this, tr, /* @__PURE__ */ new Set()), x(this, kn, !0), x(this, xn, (r) => {
|
|
1892
1892
|
if (f(Ve, this).has(r)) {
|
|
1893
1893
|
var n = f(Ve, this).get(r), i = f(nt, this).get(n);
|
|
1894
1894
|
if (i)
|
|
1895
|
-
|
|
1895
|
+
Qr(i), f(tr, this).delete(n);
|
|
1896
1896
|
else {
|
|
1897
1897
|
var o = f(ke, this).get(n);
|
|
1898
|
-
o && (
|
|
1898
|
+
o && (Qr(o.effect), f(nt, this).set(n, o.effect), f(ke, this).delete(n), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
1899
1899
|
}
|
|
1900
1900
|
for (const [s, a] of f(Ve, this)) {
|
|
1901
1901
|
if (f(Ve, this).delete(s), s === r) break;
|
|
@@ -1907,24 +1907,24 @@ var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke =
|
|
|
1907
1907
|
const l = () => {
|
|
1908
1908
|
if (Array.from(f(Ve, this).values()).includes(s)) {
|
|
1909
1909
|
var c = document.createDocumentFragment();
|
|
1910
|
-
|
|
1910
|
+
Ci(a, c), c.append(ye()), f(ke, this).set(s, {
|
|
1911
1911
|
effect: a,
|
|
1912
1912
|
fragment: c
|
|
1913
1913
|
});
|
|
1914
1914
|
} else se(a);
|
|
1915
1915
|
f(tr, this).delete(s), f(nt, this).delete(s);
|
|
1916
1916
|
};
|
|
1917
|
-
f(
|
|
1917
|
+
f(kn, this) || !i ? (f(tr, this).add(s), Nt(a, l, !1)) : l();
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
|
-
}),
|
|
1920
|
+
}), x(this, oo, (r) => {
|
|
1921
1921
|
f(Ve, this).delete(r);
|
|
1922
1922
|
const n = Array.from(f(Ve, this).values());
|
|
1923
1923
|
for (const [i, o] of f(ke, this)) n.includes(i) || (se(o.effect), f(ke, this).delete(i));
|
|
1924
|
-
}), this.anchor = e, k(
|
|
1924
|
+
}), this.anchor = e, k(kn, this, t);
|
|
1925
1925
|
}
|
|
1926
1926
|
ensure(e, t) {
|
|
1927
|
-
var r =
|
|
1927
|
+
var r = E, n = ms();
|
|
1928
1928
|
if (t && !f(nt, this).has(e) && !f(ke, this).has(e)) if (n) {
|
|
1929
1929
|
var i = document.createDocumentFragment(), o = ye();
|
|
1930
1930
|
i.append(o), f(ke, this).set(e, {
|
|
@@ -1935,27 +1935,27 @@ var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke =
|
|
|
1935
1935
|
if (f(Ve, this).set(r, e), n) {
|
|
1936
1936
|
for (const [s, a] of f(nt, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
|
|
1937
1937
|
for (const [s, a] of f(ke, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
1938
|
-
r.oncommit(f(
|
|
1938
|
+
r.oncommit(f(xn, this)), r.ondiscard(f(oo, this));
|
|
1939
1939
|
} else
|
|
1940
|
-
L && (this.anchor = P), f(
|
|
1940
|
+
L && (this.anchor = P), f(xn, this).call(this, r);
|
|
1941
1941
|
}
|
|
1942
1942
|
};
|
|
1943
1943
|
function rr(e, t, r = !1) {
|
|
1944
1944
|
var n;
|
|
1945
|
-
L && (n = P,
|
|
1946
|
-
var i = new Sc(e), o = r ?
|
|
1945
|
+
L && (n = P, an());
|
|
1946
|
+
var i = new Sc(e), o = r ? pi : 0;
|
|
1947
1947
|
function s(a, l) {
|
|
1948
1948
|
if (L) {
|
|
1949
1949
|
var c = Fo(n);
|
|
1950
1950
|
if (a !== parseInt(c.substring(1))) {
|
|
1951
|
-
var u =
|
|
1951
|
+
var u = Dr();
|
|
1952
1952
|
le(u), i.anchor = u, qe(!1), i.ensure(a, l), qe(!0);
|
|
1953
1953
|
return;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
i.ensure(a, l);
|
|
1957
1957
|
}
|
|
1958
|
-
|
|
1958
|
+
xi(() => {
|
|
1959
1959
|
var a = !1;
|
|
1960
1960
|
t((l, c = 0) => {
|
|
1961
1961
|
a = !0, s(c, l);
|
|
@@ -1972,7 +1972,7 @@ function wc(e, t, r) {
|
|
|
1972
1972
|
if (o) {
|
|
1973
1973
|
if (o.pending.delete(h), o.done.add(h), o.pending.size === 0) {
|
|
1974
1974
|
var d = e.outrogroups;
|
|
1975
|
-
|
|
1975
|
+
Jn(e, nn(o.done)), d.delete(o), d.size === 0 && (e.outrogroups = null);
|
|
1976
1976
|
}
|
|
1977
1977
|
} else s -= 1;
|
|
1978
1978
|
}, !1);
|
|
@@ -1983,14 +1983,14 @@ function wc(e, t, r) {
|
|
|
1983
1983
|
var c = r, u = c.parentNode;
|
|
1984
1984
|
vs(u), u.append(c), e.items.clear();
|
|
1985
1985
|
}
|
|
1986
|
-
|
|
1986
|
+
Jn(e, t, !l);
|
|
1987
1987
|
} else
|
|
1988
1988
|
o = {
|
|
1989
1989
|
pending: new Set(t),
|
|
1990
1990
|
done: /* @__PURE__ */ new Set()
|
|
1991
1991
|
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(o);
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function Jn(e, t, r = !0) {
|
|
1994
1994
|
var n;
|
|
1995
1995
|
if (e.pending.size > 0) {
|
|
1996
1996
|
n = /* @__PURE__ */ new Set();
|
|
@@ -1998,7 +1998,7 @@ function Xn(e, t, r = !0) {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
for (var i = 0; i < t.length; i++) {
|
|
2000
2000
|
var o = t[i];
|
|
2001
|
-
n?.has(o) ? (o.f |= ur,
|
|
2001
|
+
n?.has(o) ? (o.f |= ur, Ci(o, document.createDocumentFragment())) : se(t[i], r);
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
var Mr;
|
|
@@ -2008,13 +2008,13 @@ function gt(e, t, r, n, i, o = null) {
|
|
|
2008
2008
|
var l = e;
|
|
2009
2009
|
s = L ? le(/* @__PURE__ */ me(l)) : l.appendChild(ye());
|
|
2010
2010
|
}
|
|
2011
|
-
L &&
|
|
2012
|
-
var c = null, u = /* @__PURE__ */
|
|
2011
|
+
L && an();
|
|
2012
|
+
var c = null, u = /* @__PURE__ */ _i(() => {
|
|
2013
2013
|
var _ = r();
|
|
2014
|
-
return Wo(_) ? _ : _ == null ? [] :
|
|
2014
|
+
return Wo(_) ? _ : _ == null ? [] : nn(_);
|
|
2015
2015
|
}), h, d = /* @__PURE__ */ new Map(), p = !0;
|
|
2016
2016
|
function v(_) {
|
|
2017
|
-
(m.effect.f & 16384) === 0 && (m.pending.delete(_), m.fallback = c, kc(m, h, s, t, n), c !== null && (h.length === 0 ? (c.f & 33554432) === 0 ?
|
|
2017
|
+
(m.effect.f & 16384) === 0 && (m.pending.delete(_), m.fallback = c, kc(m, h, s, t, n), c !== null && (h.length === 0 ? (c.f & 33554432) === 0 ? Qr(c) : (c.f ^= ur, lr(c, null, s)) : Nt(c, () => {
|
|
2018
2018
|
c = null;
|
|
2019
2019
|
})));
|
|
2020
2020
|
}
|
|
@@ -2022,22 +2022,22 @@ function gt(e, t, r, n, i, o = null) {
|
|
|
2022
2022
|
m.pending.delete(_);
|
|
2023
2023
|
}
|
|
2024
2024
|
var m = {
|
|
2025
|
-
effect:
|
|
2025
|
+
effect: xi(() => {
|
|
2026
2026
|
h = g(u);
|
|
2027
2027
|
var _ = h.length;
|
|
2028
2028
|
let N = !1;
|
|
2029
|
-
L && Fo(s) === "[!" != (_ === 0) && (s =
|
|
2030
|
-
for (var B = /* @__PURE__ */ new Set(), S =
|
|
2029
|
+
L && Fo(s) === "[!" != (_ === 0) && (s = Dr(), le(s), qe(!1), N = !0);
|
|
2030
|
+
for (var B = /* @__PURE__ */ new Set(), S = E, F = ms(), j = 0; j < _; j += 1) {
|
|
2031
2031
|
L && P.nodeType === 8 && P.data === "]" && (s = P, N = !0, qe(!1));
|
|
2032
2032
|
var Q = h[j], te = n(Q, j);
|
|
2033
2033
|
if (0)
|
|
2034
2034
|
var et;
|
|
2035
2035
|
var X = p ? null : a.get(te);
|
|
2036
|
-
X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && S.unskip_effect(X.e)) : (X =
|
|
2036
|
+
X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && S.unskip_effect(X.e)) : (X = xc(a, p ? s : Mr ?? (Mr = ye()), Q, te, j, i, t, r), p || (X.e.f |= ur), a.set(te, X)), B.add(te);
|
|
2037
2037
|
}
|
|
2038
|
-
if (_ === 0 && o && !c && (p ? c = _e(() => o(s)) : (c = _e(() => o(Mr ?? (Mr = ye()))), c.f |= ur)), _ > B.size && cl("", "", ""), L && _ > 0 && le(
|
|
2038
|
+
if (_ === 0 && o && !c && (p ? c = _e(() => o(s)) : (c = _e(() => o(Mr ?? (Mr = ye()))), c.f |= ur)), _ > B.size && cl("", "", ""), L && _ > 0 && le(Dr()), !p)
|
|
2039
2039
|
if (d.set(S, B), F) {
|
|
2040
|
-
for (const [
|
|
2040
|
+
for (const [mn, yn] of a) B.has(mn) || S.skip_effect(yn.e);
|
|
2041
2041
|
S.oncommit(v), S.ondiscard(b);
|
|
2042
2042
|
} else v(S);
|
|
2043
2043
|
N && qe(!0), g(u);
|
|
@@ -2061,7 +2061,7 @@ function kc(e, t, r, n, i) {
|
|
|
2061
2061
|
for (_ = 0; _ < s; _ += 1) {
|
|
2062
2062
|
if (v = t[_], b = i(v, _), m = a.get(b).e, e.outrogroups !== null) for (const X of e.outrogroups)
|
|
2063
2063
|
X.pending.delete(m), X.done.delete(m);
|
|
2064
|
-
if ((m.f & 8192) !== 0 && (
|
|
2064
|
+
if ((m.f & 8192) !== 0 && (Qr(m), o && (m.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(m))), (m.f & 33554432) !== 0)
|
|
2065
2065
|
if (m.f ^= ur, m === l) lr(m, null, r);
|
|
2066
2066
|
else {
|
|
2067
2067
|
var N = u ? u.next : l;
|
|
@@ -2088,7 +2088,7 @@ function kc(e, t, r, n, i) {
|
|
|
2088
2088
|
(m.f & 33554432) === 0 && d.push(m), u = m, l = nr(m.next);
|
|
2089
2089
|
}
|
|
2090
2090
|
if (e.outrogroups !== null) {
|
|
2091
|
-
for (const X of e.outrogroups) X.pending.size === 0 && (
|
|
2091
|
+
for (const X of e.outrogroups) X.pending.size === 0 && (Jn(e, nn(X.done)), e.outrogroups?.delete(X));
|
|
2092
2092
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2093
2093
|
}
|
|
2094
2094
|
if (l !== null || c !== void 0) {
|
|
@@ -2112,7 +2112,7 @@ function kc(e, t, r, n, i) {
|
|
|
2112
2112
|
for (m of h) m.nodes?.a?.apply();
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
function
|
|
2115
|
+
function xc(e, t, r, n, i, o, s, a) {
|
|
2116
2116
|
var l = (s & 1) !== 0 ? (s & 16) === 0 ? /* @__PURE__ */ hs(r, !1, !1) : It(r) : null, c = (s & 2) !== 0 ? It(i) : null;
|
|
2117
2117
|
return {
|
|
2118
2118
|
v: l,
|
|
@@ -2133,16 +2133,16 @@ function lr(e, t, r) {
|
|
|
2133
2133
|
function it(e, t, r) {
|
|
2134
2134
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2136
|
+
function Ec(e, t) {
|
|
2137
2137
|
Ts(() => {
|
|
2138
2138
|
var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
|
|
2139
2139
|
if (!n.querySelector("#" + t.hash)) {
|
|
2140
|
-
const i =
|
|
2140
|
+
const i = Si("style");
|
|
2141
2141
|
i.id = t.hash, i.textContent = t.code, n.appendChild(i);
|
|
2142
2142
|
}
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
|
-
var
|
|
2145
|
+
var so = [...`
|
|
2146
2146
|
\r\f \v\uFEFF`];
|
|
2147
2147
|
function Cc(e, t, r) {
|
|
2148
2148
|
var n = e == null ? "" : "" + e;
|
|
@@ -2151,12 +2151,12 @@ function Cc(e, t, r) {
|
|
|
2151
2151
|
else if (n.length)
|
|
2152
2152
|
for (var o = i.length, s = 0; (s = n.indexOf(i, s)) >= 0; ) {
|
|
2153
2153
|
var a = s + o;
|
|
2154
|
-
(s === 0 ||
|
|
2154
|
+
(s === 0 || so.includes(n[s - 1])) && (a === n.length || so.includes(n[a])) ? n = (s === 0 ? "" : n.substring(0, s)) + n.substring(a + 1) : s = a;
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
2157
|
return n === "" ? null : n;
|
|
2158
2158
|
}
|
|
2159
|
-
function
|
|
2159
|
+
function ao(e, t = !1) {
|
|
2160
2160
|
var r = t ? " !important;" : ";", n = "";
|
|
2161
2161
|
for (var i of Object.keys(e)) {
|
|
2162
2162
|
var o = e[i];
|
|
@@ -2194,33 +2194,33 @@ function Ac(e, t) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
}
|
|
2196
2196
|
}
|
|
2197
|
-
return n && (r +=
|
|
2197
|
+
return n && (r += ao(n)), i && (r += ao(i, !0)), r = r.trim(), r === "" ? null : r;
|
|
2198
2198
|
}
|
|
2199
2199
|
return e == null ? null : String(e);
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
var s = e[
|
|
2201
|
+
function lo(e, t, r, n, i, o) {
|
|
2202
|
+
var s = e[Hn];
|
|
2203
2203
|
if (L || s !== r || s === void 0) {
|
|
2204
2204
|
var a = Cc(r, n, o);
|
|
2205
|
-
(!L || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[
|
|
2205
|
+
(!L || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[Hn] = r;
|
|
2206
2206
|
} else if (o && i !== o) for (var l in o) {
|
|
2207
2207
|
var c = !!o[l];
|
|
2208
2208
|
(i == null || c !== !!i[l]) && e.classList.toggle(l, c);
|
|
2209
2209
|
}
|
|
2210
2210
|
return o;
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function Cn(e, t = {}, r, n) {
|
|
2213
2213
|
for (var i in r) {
|
|
2214
2214
|
var o = r[i];
|
|
2215
2215
|
t[i] !== o && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, n));
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
2218
|
function Mc(e, t, r, n) {
|
|
2219
|
-
var i = e[
|
|
2219
|
+
var i = e[Bn];
|
|
2220
2220
|
if (L || i !== t) {
|
|
2221
2221
|
var o = Ac(t, n);
|
|
2222
|
-
(!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[
|
|
2223
|
-
} else n && (Array.isArray(n) ? (
|
|
2222
|
+
(!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[Bn] = t;
|
|
2223
|
+
} else n && (Array.isArray(n) ? (Cn(e, r?.[0], n[0]), Cn(e, r?.[1], n[1], "important")) : Cn(e, r, n));
|
|
2224
2224
|
return n;
|
|
2225
2225
|
}
|
|
2226
2226
|
var Oc = /* @__PURE__ */ Symbol("is custom element"), Ic = /* @__PURE__ */ Symbol("is html"), Rc = al ? "link" : "LINK";
|
|
@@ -2251,16 +2251,16 @@ function W(e, t, r, n) {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
function Lc(e) {
|
|
2253
2253
|
var t;
|
|
2254
|
-
return (t = e)[
|
|
2254
|
+
return (t = e)[Wn] ?? (t[Wn] = {
|
|
2255
2255
|
[Oc]: e.nodeName.includes("-"),
|
|
2256
2256
|
[Ic]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
|
-
var
|
|
2259
|
+
var co = /* @__PURE__ */ new Map();
|
|
2260
2260
|
function Pc(e) {
|
|
2261
|
-
var t = e.getAttribute("is") || e.nodeName, r =
|
|
2261
|
+
var t = e.getAttribute("is") || e.nodeName, r = co.get(t);
|
|
2262
2262
|
if (r) return r;
|
|
2263
|
-
|
|
2263
|
+
co.set(t, r = []);
|
|
2264
2264
|
for (var n, i = e, o = Element.prototype; o !== i; ) {
|
|
2265
2265
|
n = Ja(i);
|
|
2266
2266
|
for (var s in n) n[s].set && s !== "innerHTML" && s !== "textContent" && s !== "innerText" && r.push(s);
|
|
@@ -2272,44 +2272,44 @@ function Nc(e, t, r = t) {
|
|
|
2272
2272
|
var n = /* @__PURE__ */ new WeakSet();
|
|
2273
2273
|
Jl(e, "input", async (i) => {
|
|
2274
2274
|
var o = i ? e.defaultValue : e.value;
|
|
2275
|
-
if (o =
|
|
2275
|
+
if (o = An(e) ? Mn(o) : o, r(o), E !== null && n.add(E), await lc(), o !== (o = t())) {
|
|
2276
2276
|
var s = e.selectionStart, a = e.selectionEnd, l = e.value.length;
|
|
2277
2277
|
if (e.value = o ?? "", a !== null) {
|
|
2278
2278
|
var c = e.value.length;
|
|
2279
2279
|
s === a && a === l && c > l ? (e.selectionStart = c, e.selectionEnd = c) : (e.selectionStart = s, e.selectionEnd = Math.min(a, c));
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
|
-
}), (L && e.defaultValue !== e.value ||
|
|
2282
|
+
}), (L && e.defaultValue !== e.value || hn(t) == null && e.value) && (r(An(e) ? Mn(e.value) : e.value), E !== null && n.add(E)), un(() => {
|
|
2283
2283
|
var i = t();
|
|
2284
2284
|
if (e === document.activeElement) {
|
|
2285
|
-
var o = Me ?
|
|
2285
|
+
var o = Me ? jr : E;
|
|
2286
2286
|
if (n.has(o)) return;
|
|
2287
2287
|
}
|
|
2288
|
-
|
|
2288
|
+
An(e) && i === Mn(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
|
|
2289
2289
|
});
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2291
|
+
function An(e) {
|
|
2292
2292
|
var t = e.type;
|
|
2293
2293
|
return t === "number" || t === "range";
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2295
|
+
function Mn(e) {
|
|
2296
2296
|
return e === "" ? null : +e;
|
|
2297
2297
|
}
|
|
2298
|
-
var Ws, Dt = /* @__PURE__ */ new WeakMap(),
|
|
2298
|
+
var Ws, Dt = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), uo = /* @__PURE__ */ new WeakSet(), Hs = class {
|
|
2299
2299
|
constructor(e) {
|
|
2300
|
-
|
|
2300
|
+
vi(this, uo), x(this, Dt, /* @__PURE__ */ new WeakMap()), x(this, Zr, void 0), x(this, On, void 0), k(On, this, e);
|
|
2301
2301
|
}
|
|
2302
2302
|
observe(e, t) {
|
|
2303
2303
|
var r = f(Dt, this).get(e) || /* @__PURE__ */ new Set();
|
|
2304
|
-
return r.add(t), f(Dt, this).set(e, r), O(
|
|
2304
|
+
return r.add(t), f(Dt, this).set(e, r), O(uo, this, zc).call(this).observe(e, f(On, this)), () => {
|
|
2305
2305
|
var n = f(Dt, this).get(e);
|
|
2306
|
-
n.delete(t), n.size === 0 && (f(Dt, this).delete(e), f(
|
|
2306
|
+
n.delete(t), n.size === 0 && (f(Dt, this).delete(e), f(Zr, this).unobserve(e));
|
|
2307
2307
|
};
|
|
2308
2308
|
}
|
|
2309
2309
|
};
|
|
2310
2310
|
Ws = Hs;
|
|
2311
2311
|
function zc() {
|
|
2312
|
-
return f(
|
|
2312
|
+
return f(Zr, this) ?? k(Zr, this, new ResizeObserver((e) => {
|
|
2313
2313
|
for (var t of e) {
|
|
2314
2314
|
Ws.entries.set(t.target, t);
|
|
2315
2315
|
for (var r of f(Dt, this).get(t.target) || []) r(t);
|
|
@@ -2317,22 +2317,22 @@ function zc() {
|
|
|
2317
2317
|
}));
|
|
2318
2318
|
}
|
|
2319
2319
|
y(Hs, "entries", /* @__PURE__ */ new WeakMap());
|
|
2320
|
-
function
|
|
2320
|
+
function In(e, t) {
|
|
2321
2321
|
return e === t || e?.[hr] === t;
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Rn(e = {}, t, r, n) {
|
|
2324
2324
|
var i = K.r, o = M;
|
|
2325
2325
|
return Ts(() => {
|
|
2326
2326
|
var s, a;
|
|
2327
|
-
return
|
|
2328
|
-
s = a, a = n?.() || [],
|
|
2329
|
-
|
|
2327
|
+
return un(() => {
|
|
2328
|
+
s = a, a = n?.() || [], hn(() => {
|
|
2329
|
+
In(r(...a), e) || (t(e, ...a), s && In(r(...s), e) && t(null, ...s));
|
|
2330
2330
|
});
|
|
2331
2331
|
}), () => {
|
|
2332
2332
|
let l = o;
|
|
2333
2333
|
for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
|
|
2334
2334
|
const c = () => {
|
|
2335
|
-
a &&
|
|
2335
|
+
a && In(r(...a), e) && t(null, ...a);
|
|
2336
2336
|
}, u = l.teardown;
|
|
2337
2337
|
l.teardown = () => {
|
|
2338
2338
|
c(), u?.();
|
|
@@ -2340,8 +2340,8 @@ function In(e = {}, t, r, n) {
|
|
|
2340
2340
|
};
|
|
2341
2341
|
}), e;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2344
|
-
var i = !
|
|
2343
|
+
function ho(e, t, r, n) {
|
|
2344
|
+
var i = !ln || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, a = n, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ vr(n)), g(c)) : (l && (l = !1, a = s ? hn(n) : n), a);
|
|
2345
2345
|
let h;
|
|
2346
2346
|
if (o) {
|
|
2347
2347
|
var d = hr in e || Do in e;
|
|
@@ -2363,7 +2363,7 @@ function uo(e, t, r, n) {
|
|
|
2363
2363
|
return arguments.length > 0 ? ((!i || !F || m || v) && h(F ? b() : S), S) : b();
|
|
2364
2364
|
});
|
|
2365
2365
|
}
|
|
2366
|
-
var _ = !1, N = ((r & 1) !== 0 ? vr :
|
|
2366
|
+
var _ = !1, N = ((r & 1) !== 0 ? vr : _i)(() => (_ = !1, b()));
|
|
2367
2367
|
o && g(N);
|
|
2368
2368
|
var B = M;
|
|
2369
2369
|
return (function(S, F) {
|
|
@@ -2379,7 +2379,7 @@ function Wc(e) {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
var vt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Hc = class {
|
|
2381
2381
|
constructor(e) {
|
|
2382
|
-
|
|
2382
|
+
x(this, vt, void 0), x(this, $e, void 0);
|
|
2383
2383
|
var t = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
2384
2384
|
var s = /* @__PURE__ */ hs(o, !1, !1);
|
|
2385
2385
|
return t.set(i, s), s;
|
|
@@ -2406,9 +2406,9 @@ var vt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Hc =
|
|
|
2406
2406
|
intro: e.intro ?? !1,
|
|
2407
2407
|
recover: e.recover,
|
|
2408
2408
|
transformError: e.transformError
|
|
2409
|
-
})), !Me && (!e?.props?.$$host || e.sync === !1) &&
|
|
2409
|
+
})), !Me && (!e?.props?.$$host || e.sync === !1) && Kr(), k(vt, this, n.$$events);
|
|
2410
2410
|
for (const i of Object.keys(f($e, this)))
|
|
2411
|
-
i === "$set" || i === "$destroy" || i === "$on" ||
|
|
2411
|
+
i === "$set" || i === "$destroy" || i === "$on" || Hr(this, i, {
|
|
2412
2412
|
get() {
|
|
2413
2413
|
return f($e, this)[i];
|
|
2414
2414
|
},
|
|
@@ -2458,7 +2458,7 @@ typeof HTMLElement == "function" && (Bs = class extends HTMLElement {
|
|
|
2458
2458
|
if (this.$$cn = !0, !this.$$c) {
|
|
2459
2459
|
let e = function(n) {
|
|
2460
2460
|
return (i) => {
|
|
2461
|
-
const o =
|
|
2461
|
+
const o = Si("slot");
|
|
2462
2462
|
n !== "default" && (o.name = n), ee(i, o);
|
|
2463
2463
|
};
|
|
2464
2464
|
};
|
|
@@ -2479,9 +2479,9 @@ typeof HTMLElement == "function" && (Bs = class extends HTMLElement {
|
|
|
2479
2479
|
$$host: this
|
|
2480
2480
|
}
|
|
2481
2481
|
}), this.$$me = ec(() => {
|
|
2482
|
-
|
|
2482
|
+
un(() => {
|
|
2483
2483
|
this.$$r = !0;
|
|
2484
|
-
for (const n of
|
|
2484
|
+
for (const n of Wr(this.$$c)) {
|
|
2485
2485
|
if (!this.$$p_d[n]?.reflect) continue;
|
|
2486
2486
|
this.$$d[n] = this.$$c[n];
|
|
2487
2487
|
const i = $r(n, this.$$d[n], this.$$p_d, "toAttribute");
|
|
@@ -2506,7 +2506,7 @@ typeof HTMLElement == "function" && (Bs = class extends HTMLElement {
|
|
|
2506
2506
|
});
|
|
2507
2507
|
}
|
|
2508
2508
|
$$g_p(e) {
|
|
2509
|
-
return
|
|
2509
|
+
return Wr(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
2510
2510
|
}
|
|
2511
2511
|
});
|
|
2512
2512
|
function $r(e, t, r, n) {
|
|
@@ -2547,11 +2547,11 @@ function Dc(e, t, r, n, i, o) {
|
|
|
2547
2547
|
super(e, r, i), this.$$p_d = t;
|
|
2548
2548
|
}
|
|
2549
2549
|
static get observedAttributes() {
|
|
2550
|
-
return
|
|
2550
|
+
return Wr(t).map((a) => (t[a].attribute || a).toLowerCase());
|
|
2551
2551
|
}
|
|
2552
2552
|
};
|
|
2553
|
-
return
|
|
2554
|
-
|
|
2553
|
+
return Wr(t).forEach((a) => {
|
|
2554
|
+
Hr(s.prototype, a, {
|
|
2555
2555
|
get() {
|
|
2556
2556
|
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
2557
2557
|
},
|
|
@@ -2562,7 +2562,7 @@ function Dc(e, t, r, n, i, o) {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
});
|
|
2564
2564
|
}), n.forEach((a) => {
|
|
2565
|
-
|
|
2565
|
+
Hr(s.prototype, a, { get() {
|
|
2566
2566
|
return this.$$c?.[a];
|
|
2567
2567
|
} });
|
|
2568
2568
|
}), o && (s = o(s)), e.element = s, s;
|
|
@@ -2592,7 +2592,7 @@ var Fc = class extends Event {
|
|
|
2592
2592
|
requestValue() {
|
|
2593
2593
|
this.host.dispatchEvent(new Fc(this.context, this.host, this.handleValue, this.subscribe));
|
|
2594
2594
|
}
|
|
2595
|
-
},
|
|
2595
|
+
}, dn = (e) => e, Vc = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), bf = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), _f = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Tf = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
2596
2596
|
function qc(e, t, r) {
|
|
2597
2597
|
let n = !1;
|
|
2598
2598
|
const i = new jc(e, {
|
|
@@ -2698,7 +2698,7 @@ var jt;
|
|
|
2698
2698
|
(function(e) {
|
|
2699
2699
|
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
2700
2700
|
})(jt || (jt = {}));
|
|
2701
|
-
var Ds = class
|
|
2701
|
+
var Ds = class Qn {
|
|
2702
2702
|
constructor(t = {}) {
|
|
2703
2703
|
if (y(this, "config", void 0), y(this, "ttsWordHighlight", null), y(this, "ttsSentenceHighlight", null), y(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), y(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), y(this, "annotations", /* @__PURE__ */ new Map()), y(this, "colorHighlights", /* @__PURE__ */ new Map()), y(this, "nextAnnotationId", 1), y(this, "supported", !1), y(this, "rangeSerializer", void 0), y(this, "themeObserver", null), y(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Yc(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2704
2704
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
@@ -2943,10 +2943,10 @@ var Ds = class Jn {
|
|
|
2943
2943
|
}
|
|
2944
2944
|
}
|
|
2945
2945
|
highlightTTSElementFallbacks(t) {
|
|
2946
|
-
typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights,
|
|
2946
|
+
typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, Qn.SENTENCE_FALLBACK_SELECTOR);
|
|
2947
2947
|
}
|
|
2948
2948
|
highlightTTSWordElementFallbacks(t) {
|
|
2949
|
-
typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights,
|
|
2949
|
+
typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights, Qn.WORD_FALLBACK_SELECTOR);
|
|
2950
2950
|
}
|
|
2951
2951
|
highlightElementFallbacks(t, r, n, i) {
|
|
2952
2952
|
for (const o of t) {
|
|
@@ -3117,17 +3117,17 @@ function Fs(e) {
|
|
|
3117
3117
|
console.debug(`[${e}]`, ...t);
|
|
3118
3118
|
};
|
|
3119
3119
|
}
|
|
3120
|
-
var
|
|
3120
|
+
var Sf = Fs("I18nService"), $n = {
|
|
3121
3121
|
assessment: [],
|
|
3122
3122
|
section: [],
|
|
3123
3123
|
item: [],
|
|
3124
3124
|
passage: [],
|
|
3125
3125
|
rubric: [],
|
|
3126
3126
|
element: []
|
|
3127
|
-
},
|
|
3128
|
-
section: [
|
|
3129
|
-
item: [
|
|
3130
|
-
passage: [
|
|
3127
|
+
}, Ln = {
|
|
3128
|
+
section: [...$n.section],
|
|
3129
|
+
item: [...$n.item],
|
|
3130
|
+
passage: [...$n.passage]
|
|
3131
3131
|
};
|
|
3132
3132
|
function At(e) {
|
|
3133
3133
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
@@ -3194,9 +3194,9 @@ function eu(e) {
|
|
|
3194
3194
|
blocked: st(ot(t?.blocked, "policy.blocked"))
|
|
3195
3195
|
},
|
|
3196
3196
|
placement: {
|
|
3197
|
-
section: st(ot(r?.section, "placement.section")).length ? st(ot(r?.section, "placement.section")) : [
|
|
3198
|
-
item: st(ot(r?.item, "placement.item")).length ? st(ot(r?.item, "placement.item")) : [
|
|
3199
|
-
passage: st(ot(r?.passage, "placement.passage")).length ? st(ot(r?.passage, "placement.passage")) : [
|
|
3197
|
+
section: st(ot(r?.section, "placement.section")).length ? st(ot(r?.section, "placement.section")) : [...Ln.section],
|
|
3198
|
+
item: st(ot(r?.item, "placement.item")).length ? st(ot(r?.item, "placement.item")) : [...Ln.item],
|
|
3199
|
+
passage: st(ot(r?.passage, "placement.passage")).length ? st(ot(r?.passage, "placement.passage")) : [...Ln.passage]
|
|
3200
3200
|
},
|
|
3201
3201
|
providers: n
|
|
3202
3202
|
};
|
|
@@ -3238,7 +3238,7 @@ function nu(e, t, r) {
|
|
|
3238
3238
|
for (const { pattern: s, reason: a } of ru) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${a}. Inline SVG icons must not include scriptable content.`);
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function fo(e) {
|
|
3242
3242
|
if (Lr(e.toolId, "toolId"), Lr(e.name, "name"), Lr(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
|
|
3243
3243
|
if (typeof e.icon == "string" && nu(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.`);
|
|
3244
3244
|
const t = e.supportedLevels.find((r) => !tu.includes(r));
|
|
@@ -3261,12 +3261,12 @@ var iu = class {
|
|
|
3261
3261
|
return e.map((t) => this.normalizeToolId(t));
|
|
3262
3262
|
}
|
|
3263
3263
|
register(e) {
|
|
3264
|
-
if (
|
|
3264
|
+
if (fo(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
3265
3265
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
|
|
3266
3266
|
this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
|
|
3267
3267
|
}
|
|
3268
3268
|
override(e) {
|
|
3269
|
-
if (
|
|
3269
|
+
if (fo(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
3270
3270
|
const t = this.tools.get(e.toolId);
|
|
3271
3271
|
if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
|
|
3272
3272
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
|
|
@@ -3405,7 +3405,7 @@ function su(e) {
|
|
|
3405
3405
|
function qs(e) {
|
|
3406
3406
|
return e.level === "element";
|
|
3407
3407
|
}
|
|
3408
|
-
function
|
|
3408
|
+
function Ai(e) {
|
|
3409
3409
|
if (qs(e)) {
|
|
3410
3410
|
const t = e.item.config;
|
|
3411
3411
|
if (!t) return "";
|
|
@@ -3465,8 +3465,8 @@ function Ci(e) {
|
|
|
3465
3465
|
}
|
|
3466
3466
|
return "";
|
|
3467
3467
|
}
|
|
3468
|
-
function
|
|
3469
|
-
const t =
|
|
3468
|
+
function fn(e) {
|
|
3469
|
+
const t = Ai(e);
|
|
3470
3470
|
return [
|
|
3471
3471
|
/<math[>\s]/i,
|
|
3472
3472
|
/\\\[([^\]]+)\\\]/,
|
|
@@ -3503,11 +3503,11 @@ function au(e) {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
return !1;
|
|
3505
3505
|
}
|
|
3506
|
-
function
|
|
3507
|
-
return
|
|
3506
|
+
function pn(e) {
|
|
3507
|
+
return Ai(e).trim().length >= 10;
|
|
3508
3508
|
}
|
|
3509
3509
|
function lu(e) {
|
|
3510
|
-
const t =
|
|
3510
|
+
const t = Ai(e);
|
|
3511
3511
|
return [
|
|
3512
3512
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3513
3513
|
/periodic\s+table/i,
|
|
@@ -3527,7 +3527,7 @@ var cu = [
|
|
|
3527
3527
|
function hu(e) {
|
|
3528
3528
|
return uu.has(e);
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3530
|
+
function Mi(e, t, r) {
|
|
3531
3531
|
const n = e.trim(), i = r.trim();
|
|
3532
3532
|
if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3533
3533
|
if (!hu(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
@@ -3610,7 +3610,7 @@ var du = class {
|
|
|
3610
3610
|
destroy() {
|
|
3611
3611
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
3612
3612
|
}
|
|
3613
|
-
},
|
|
3613
|
+
}, Oi = (e, t) => {
|
|
3614
3614
|
const r = t?.useSentenceSegmenter !== !1;
|
|
3615
3615
|
try {
|
|
3616
3616
|
if (!r) throw new Error("Segmenter disabled by policy");
|
|
@@ -3752,7 +3752,7 @@ var du = class {
|
|
|
3752
3752
|
}
|
|
3753
3753
|
segmentSentences(e) {
|
|
3754
3754
|
const t = this.getSegmentationPolicy();
|
|
3755
|
-
return
|
|
3755
|
+
return Oi(e, {
|
|
3756
3756
|
locale: t.locale,
|
|
3757
3757
|
useSentenceSegmenter: t.useSentenceSegmenter
|
|
3758
3758
|
});
|
|
@@ -3952,33 +3952,33 @@ var du = class {
|
|
|
3952
3952
|
context: t,
|
|
3953
3953
|
toolbarContext: r
|
|
3954
3954
|
}) : Su(i);
|
|
3955
|
-
},
|
|
3955
|
+
}, Zn = /* @__PURE__ */ new WeakMap();
|
|
3956
3956
|
function wu(e, t) {
|
|
3957
3957
|
if (!e) return null;
|
|
3958
|
-
const r =
|
|
3958
|
+
const r = Zn.get(e), n = r?.get(t);
|
|
3959
3959
|
return n ? n.isConnected ? n : (r?.delete(t), null) : null;
|
|
3960
3960
|
}
|
|
3961
3961
|
function ku(e, t, r) {
|
|
3962
3962
|
if (!e) return;
|
|
3963
|
-
let n =
|
|
3964
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
3963
|
+
let n = Zn.get(e);
|
|
3964
|
+
n || (n = /* @__PURE__ */ new Map(), Zn.set(e, n)), n.set(t, r);
|
|
3965
3965
|
}
|
|
3966
|
-
function
|
|
3966
|
+
function po(e) {
|
|
3967
3967
|
return e === "basic" || e === "scientific" ? e : null;
|
|
3968
3968
|
}
|
|
3969
|
-
function
|
|
3970
|
-
const t = e.getToolRenderParams?.("calculator") ?? {}, r =
|
|
3969
|
+
function xu(e) {
|
|
3970
|
+
const t = e.getToolRenderParams?.("calculator") ?? {}, r = po(t.calculatorType), n = t.availableTypes;
|
|
3971
3971
|
return {
|
|
3972
3972
|
calculatorType: r,
|
|
3973
|
-
availableTypes: Array.isArray(n) ? n.map((i) =>
|
|
3973
|
+
availableTypes: Array.isArray(n) ? n.map((i) => po(i)).filter((i) => i !== null) : r ? [r] : null,
|
|
3974
3974
|
displayName: r === "scientific" ? "Scientific Calculator" : r === "basic" ? "Basic Calculator" : "Calculator"
|
|
3975
3975
|
};
|
|
3976
3976
|
}
|
|
3977
|
-
function
|
|
3977
|
+
function go(e, t, r) {
|
|
3978
3978
|
const n = e;
|
|
3979
3979
|
t ? (n.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete n.calculatorType, e.removeAttribute("calculator-type")), r && r.length > 0 ? n.availableTypes = r : delete n.availableTypes;
|
|
3980
3980
|
}
|
|
3981
|
-
var
|
|
3981
|
+
var Eu = {
|
|
3982
3982
|
toolId: "calculator",
|
|
3983
3983
|
name: "Calculator",
|
|
3984
3984
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
@@ -4008,11 +4008,11 @@ var xu = {
|
|
|
4008
4008
|
"scientificCalculator"
|
|
4009
4009
|
],
|
|
4010
4010
|
isVisibleInContext(e) {
|
|
4011
|
-
return
|
|
4011
|
+
return fn(e);
|
|
4012
4012
|
},
|
|
4013
4013
|
renderToolbar(e, t) {
|
|
4014
|
-
const { calculatorType: r, availableTypes: n, displayName: i } =
|
|
4015
|
-
a || ku(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator,
|
|
4014
|
+
const { calculatorType: r, availableTypes: n, displayName: i } = xu(t), o = Mi(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = wu(t.toolCoordinator, o), l = a ?? Be(this.toolId, e, t, s);
|
|
4015
|
+
a || ku(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, go(l, r, n);
|
|
4016
4016
|
const c = r === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = r === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
|
|
4017
4017
|
toolId: this.toolId,
|
|
4018
4018
|
label: i,
|
|
@@ -4039,13 +4039,17 @@ var xu = {
|
|
|
4039
4039
|
minWidth: 380,
|
|
4040
4040
|
minHeight: 420,
|
|
4041
4041
|
initialAlign: "bottom-right",
|
|
4042
|
-
initialMargin: 16
|
|
4042
|
+
initialMargin: 16,
|
|
4043
|
+
content: {
|
|
4044
|
+
overflowY: "auto",
|
|
4045
|
+
preserveMinHeight: !0
|
|
4046
|
+
}
|
|
4043
4047
|
}
|
|
4044
4048
|
}],
|
|
4045
4049
|
button: h,
|
|
4046
4050
|
sync: () => {
|
|
4047
4051
|
const p = t.isToolVisible(o);
|
|
4048
|
-
h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, d !== p && (l.visible = p, d = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator),
|
|
4052
|
+
h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, d !== p && (l.visible = p, d = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), go(l, r, n);
|
|
4049
4053
|
},
|
|
4050
4054
|
subscribeActive: (p) => t.subscribeVisibility ? t.subscribeVisibility(() => {
|
|
4051
4055
|
p(t.isToolVisible(o));
|
|
@@ -4053,7 +4057,7 @@ var xu = {
|
|
|
4053
4057
|
}
|
|
4054
4058
|
};
|
|
4055
4059
|
}
|
|
4056
|
-
},
|
|
4060
|
+
}, V = (e) => e.trim().replace(/\s+/g, " "), Ks = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Xs = (e) => {
|
|
4057
4061
|
if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
|
|
4058
4062
|
const t = e.classList;
|
|
4059
4063
|
if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
|
|
@@ -4086,7 +4090,7 @@ var xu = {
|
|
|
4086
4090
|
}
|
|
4087
4091
|
const i = /[A-Za-z0-9]/.test(e), o = /[A-Za-z0-9]/.test(t);
|
|
4088
4092
|
return i && o;
|
|
4089
|
-
},
|
|
4093
|
+
}, en = (e, t) => {
|
|
4090
4094
|
const r = /* @__PURE__ */ new Map();
|
|
4091
4095
|
if (typeof document > "u" || typeof document.createTreeWalker != "function" || typeof NodeFilter > "u") return {
|
|
4092
4096
|
text: "",
|
|
@@ -4132,13 +4136,13 @@ var xu = {
|
|
|
4132
4136
|
text: h,
|
|
4133
4137
|
map: r
|
|
4134
4138
|
};
|
|
4135
|
-
},
|
|
4139
|
+
}, Pn = null, vo = Promise.resolve(), Cu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Au = async () => (Pn || (Pn = import("./sre-8x5k27Ii.js").then((e) => /* @__PURE__ */ Ka(e.default, 1)).then((e) => {
|
|
4136
4140
|
const t = e.default || e;
|
|
4137
4141
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
4138
4142
|
return t;
|
|
4139
|
-
})),
|
|
4140
|
-
if (!
|
|
4141
|
-
const t =
|
|
4143
|
+
})), Pn), Mu = (e) => e === "en" ? "clearspeak" : "mathspeak", mo = (e) => !!e && typeof e == "object" && !Array.isArray(e), yo = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, gn = (e) => {
|
|
4144
|
+
if (!mo(e)) return;
|
|
4145
|
+
const t = yo(e.domain), r = yo(e.style), n = mo(e.engineOptions) ? e.engineOptions : void 0;
|
|
4142
4146
|
if (!(!t && !r && !n))
|
|
4143
4147
|
return {
|
|
4144
4148
|
...t ? { domain: t } : {},
|
|
@@ -4146,7 +4150,7 @@ var xu = {
|
|
|
4146
4150
|
...n ? { engineOptions: n } : {}
|
|
4147
4151
|
};
|
|
4148
4152
|
}, Ou = async (e, t, r, n) => {
|
|
4149
|
-
const i = Cu(t), o =
|
|
4153
|
+
const i = Cu(t), o = gn(n);
|
|
4150
4154
|
await e.setupEngine?.({
|
|
4151
4155
|
...o?.engineOptions || {},
|
|
4152
4156
|
locale: i,
|
|
@@ -4156,8 +4160,8 @@ var xu = {
|
|
|
4156
4160
|
markup: r
|
|
4157
4161
|
}), await e.engineReady?.();
|
|
4158
4162
|
}, Iu = async (e) => {
|
|
4159
|
-
const t =
|
|
4160
|
-
return
|
|
4163
|
+
const t = vo.then(e, e);
|
|
4164
|
+
return vo = t.then(() => {
|
|
4161
4165
|
}, () => {
|
|
4162
4166
|
}), t;
|
|
4163
4167
|
}, Qs = async (e, t, r, n, i) => Iu(async () => (await Ou(e, r, n, i), e.toSpeech(t))), Ru = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), $u = async (e, t, r, n) => {
|
|
@@ -4169,7 +4173,7 @@ var xu = {
|
|
|
4169
4173
|
}
|
|
4170
4174
|
}, Zs = async (e, t = {}) => {
|
|
4171
4175
|
if (!e.some((c) => c.type === "math")) return {
|
|
4172
|
-
speechText:
|
|
4176
|
+
speechText: V(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
|
|
4173
4177
|
usedMathSpeech: !1,
|
|
4174
4178
|
usedFallback: !1
|
|
4175
4179
|
};
|
|
@@ -4182,7 +4186,7 @@ var xu = {
|
|
|
4182
4186
|
}
|
|
4183
4187
|
try {
|
|
4184
4188
|
r || (r = await o());
|
|
4185
|
-
const u =
|
|
4189
|
+
const u = V(await Qs(r, c.mathml, t.language, "none", t.mathSpeech));
|
|
4186
4190
|
if (u) {
|
|
4187
4191
|
s.push(u), n = !0;
|
|
4188
4192
|
continue;
|
|
@@ -4192,7 +4196,7 @@ var xu = {
|
|
|
4192
4196
|
i = !0, console.debug("[TTSService] Math speech generation failed; using visible fallback", { message: u instanceof Error ? u.message : String(u) }), s.push(c.fallbackText);
|
|
4193
4197
|
}
|
|
4194
4198
|
}
|
|
4195
|
-
const a =
|
|
4199
|
+
const a = V(s.join(" "));
|
|
4196
4200
|
let l;
|
|
4197
4201
|
return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await $u(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
|
|
4198
4202
|
speechText: a,
|
|
@@ -4205,55 +4209,71 @@ var xu = {
|
|
|
4205
4209
|
"expanding-row",
|
|
4206
4210
|
"floating-overlay",
|
|
4207
4211
|
"left-aligned"
|
|
4208
|
-
]),
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
+
]), ei = (e) => e && typeof e == "object" ? e : {}, Pu = (e) => e === "polly" || e === "google" || e === "server", fe = (e, t) => e === void 0 ? t : e, tn = (e, t = "left-aligned") => typeof e == "string" && Lu.has(e) ? e : t, wf = Object.freeze([0.8, 1.25]), bo = Object.freeze([
|
|
4213
|
+
{
|
|
4214
|
+
rate: 0.8,
|
|
4215
|
+
label: "Slow",
|
|
4216
|
+
ariaLabel: "Slow speed"
|
|
4217
|
+
},
|
|
4218
|
+
{
|
|
4219
|
+
rate: 1,
|
|
4220
|
+
label: "Normal",
|
|
4221
|
+
ariaLabel: "Normal speed",
|
|
4222
|
+
default: !0
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
rate: 1.25,
|
|
4226
|
+
label: "Fast",
|
|
4227
|
+
ariaLabel: "Fast speed"
|
|
4228
|
+
}
|
|
4229
|
+
]), _o = (e) => {
|
|
4230
|
+
if (!(typeof e != "number" || !Number.isFinite(e) || e <= 0))
|
|
4231
|
+
return Math.round(e * 100) / 100;
|
|
4212
4232
|
}, To = (e) => {
|
|
4213
4233
|
if (typeof e != "string") return;
|
|
4214
4234
|
const t = e.trim();
|
|
4215
4235
|
return t.length ? t : void 0;
|
|
4216
|
-
}, So = (e) => `${e}x`, ea = (e, t) => t ? `Speed ${e}` : `${e} speed`, Nu = (e, t, r) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : ea(e, r),
|
|
4217
|
-
|
|
4218
|
-
if (
|
|
4219
|
-
const
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
const i = zu(n);
|
|
4233
|
-
if (i === void 0) continue;
|
|
4234
|
-
const o = typeof i == "number" ? i : i.rate;
|
|
4235
|
-
t.has(o) || (t.add(o), r.push(i));
|
|
4236
|
-
}
|
|
4237
|
-
return r.length ? r : [...bo];
|
|
4238
|
-
}, Wu = (e) => Zn(e).map((t) => {
|
|
4239
|
-
if (typeof t == "number") {
|
|
4240
|
-
const i = So(t);
|
|
4241
|
-
return {
|
|
4242
|
-
rate: t,
|
|
4243
|
-
label: i,
|
|
4244
|
-
ariaLabel: ea(i, !0)
|
|
4245
|
-
};
|
|
4236
|
+
}, So = (e) => `${e}x`, ea = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`, Nu = (e, t, r) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : ea(e, r), Pr = (e) => {
|
|
4237
|
+
const t = Array.isArray(e) ? e : [...bo];
|
|
4238
|
+
if (t.length === 0) return [];
|
|
4239
|
+
const r = /* @__PURE__ */ new Set(), n = [];
|
|
4240
|
+
for (const s of t) {
|
|
4241
|
+
const a = ei(s), l = _o(typeof s == "number" ? s : a.rate);
|
|
4242
|
+
if (l === void 0 || r.has(l)) continue;
|
|
4243
|
+
r.add(l);
|
|
4244
|
+
const c = l === 1 ? "Normal" : So(l), u = typeof s == "number" ? c : To(a.label) || c, h = typeof s == "number" ? l === 1 ? "Normal speed" : ea(u, !0) : Nu(u, To(a.ariaLabel), u === c);
|
|
4245
|
+
n.push({
|
|
4246
|
+
rate: l,
|
|
4247
|
+
label: u,
|
|
4248
|
+
ariaLabel: h,
|
|
4249
|
+
isDefault: !1,
|
|
4250
|
+
requestedDefault: a.default === !0 || a.isDefault === !0
|
|
4251
|
+
});
|
|
4246
4252
|
}
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4253
|
+
if (!n.length) return Pr(bo);
|
|
4254
|
+
if (!r.has(1)) {
|
|
4255
|
+
const s = {
|
|
4256
|
+
rate: 1,
|
|
4257
|
+
label: "Normal",
|
|
4258
|
+
ariaLabel: "Normal speed",
|
|
4259
|
+
isDefault: !1,
|
|
4260
|
+
requestedDefault: !1
|
|
4261
|
+
}, a = n.findIndex((l) => l.rate > 1);
|
|
4262
|
+
a >= 0 ? n.splice(a, 0, s) : n.push(s);
|
|
4263
|
+
}
|
|
4264
|
+
const i = n.findIndex((s) => s.requestedDefault), o = i >= 0 ? i : n.findIndex((s) => s.rate === 1);
|
|
4265
|
+
return n.map(({ requestedDefault: s, ...a }, l) => ({
|
|
4266
|
+
...a,
|
|
4267
|
+
isDefault: l === o
|
|
4268
|
+
}));
|
|
4269
|
+
}, kf = Object.freeze([
|
|
4270
|
+
0.8,
|
|
4271
|
+
1,
|
|
4272
|
+
1.25
|
|
4273
|
+
]), zu = (e) => {
|
|
4254
4274
|
const t = {
|
|
4255
4275
|
...e,
|
|
4256
|
-
layoutMode:
|
|
4276
|
+
layoutMode: tn(e.layoutMode)
|
|
4257
4277
|
}, r = e.backend || "browser";
|
|
4258
4278
|
if (!Pu(r)) return t;
|
|
4259
4279
|
const n = {
|
|
@@ -4276,14 +4296,14 @@ var xu = {
|
|
|
4276
4296
|
...n,
|
|
4277
4297
|
defaultVoice: fe(n.defaultVoice, "en-US-Wavenet-A")
|
|
4278
4298
|
} : n;
|
|
4279
|
-
},
|
|
4280
|
-
const t =
|
|
4281
|
-
return
|
|
4299
|
+
}, Nn = (e) => {
|
|
4300
|
+
const t = ei(e), r = ei(t.settings);
|
|
4301
|
+
return zu({
|
|
4282
4302
|
...t,
|
|
4283
4303
|
...r
|
|
4284
4304
|
});
|
|
4285
|
-
},
|
|
4286
|
-
const t =
|
|
4305
|
+
}, ti = (e) => e.backend || "browser", ta = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, ra = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Wu = (e) => {
|
|
4306
|
+
const t = ti(e), r = ta(e, t), n = ra(e, r), i = gn(e.mathSpeech);
|
|
4287
4307
|
return {
|
|
4288
4308
|
voice: e.defaultVoice,
|
|
4289
4309
|
rate: e.rate,
|
|
@@ -4309,7 +4329,7 @@ var xu = {
|
|
|
4309
4329
|
validateEndpoint: e.validateEndpoint,
|
|
4310
4330
|
...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
|
|
4311
4331
|
};
|
|
4312
|
-
}, na = (e) =>
|
|
4332
|
+
}, na = (e) => tn(e.layoutMode), Hu = (e) => {
|
|
4313
4333
|
switch (na(e)) {
|
|
4314
4334
|
case "reserved-row":
|
|
4315
4335
|
return {
|
|
@@ -4336,21 +4356,21 @@ var xu = {
|
|
|
4336
4356
|
}
|
|
4337
4357
|
};
|
|
4338
4358
|
}
|
|
4339
|
-
}, ir = /* @__PURE__ */ new Map(),
|
|
4359
|
+
}, ir = /* @__PURE__ */ new Map(), Bu = "__pieToolElementUnmount", wo = "pie-tool-active-change", Du = {
|
|
4340
4360
|
toolId: "textToSpeech",
|
|
4341
4361
|
name: "Text to Speech",
|
|
4342
4362
|
description: "Read content aloud",
|
|
4343
4363
|
icon: "volume-up",
|
|
4344
4364
|
provider: {
|
|
4345
4365
|
getProviderId: () => "tts",
|
|
4346
|
-
createProvider: (e) => new mu(
|
|
4366
|
+
createProvider: (e) => new mu(ti(Nn(e))),
|
|
4347
4367
|
getInitConfig: (e) => {
|
|
4348
|
-
const t =
|
|
4368
|
+
const t = Nn(e), r = ti(t), n = ta(t, r);
|
|
4349
4369
|
return {
|
|
4350
4370
|
backend: r,
|
|
4351
4371
|
serverProvider: n,
|
|
4352
4372
|
transportMode: ra(t, n),
|
|
4353
|
-
...
|
|
4373
|
+
...Wu(t)
|
|
4354
4374
|
};
|
|
4355
4375
|
},
|
|
4356
4376
|
getAuthFetcher: (e) => {
|
|
@@ -4359,9 +4379,9 @@ var xu = {
|
|
|
4359
4379
|
},
|
|
4360
4380
|
sanitizeConfig: (e) => {
|
|
4361
4381
|
const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
|
|
4362
|
-
t && "layoutMode" in t && (t.layoutMode =
|
|
4382
|
+
t && "layoutMode" in t && (t.layoutMode = tn(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = Pr(t.speedOptions));
|
|
4363
4383
|
const r = { ...e };
|
|
4364
|
-
return "layoutMode" in r && (r.layoutMode =
|
|
4384
|
+
return "layoutMode" in r && (r.layoutMode = tn(r.layoutMode)), "speedOptions" in r && (r.speedOptions = Pr(r.speedOptions)), t && (r.settings = t), r;
|
|
4365
4385
|
},
|
|
4366
4386
|
lazy: !0
|
|
4367
4387
|
},
|
|
@@ -4373,17 +4393,17 @@ var xu = {
|
|
|
4373
4393
|
"speechOutput"
|
|
4374
4394
|
],
|
|
4375
4395
|
isVisibleInContext(e) {
|
|
4376
|
-
return
|
|
4396
|
+
return pn(e);
|
|
4377
4397
|
},
|
|
4378
4398
|
renderToolbar(e, t) {
|
|
4379
|
-
const r = () =>
|
|
4399
|
+
const r = () => Nn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => Pr(r().speedOptions), i = () => na(r()), o = () => Hu(r()), s = Mi(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
|
|
4380
4400
|
const u = t.ui?.size;
|
|
4381
4401
|
return u === "sm" || u === "lg" ? u : "md";
|
|
4382
4402
|
}, l = () => {
|
|
4383
4403
|
let u = ir.get(s);
|
|
4384
|
-
return u && typeof u.isConnected == "boolean" && !u.isConnected && (ir.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[
|
|
4404
|
+
return u && typeof u.isConnected == "boolean" && !u.isConnected && (ir.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Bu] = () => {
|
|
4385
4405
|
ir.get(s) === u && ir.delete(s);
|
|
4386
|
-
}, ir.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n(), u;
|
|
4406
|
+
}, ir.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n(), u.showSingleSpeedOption = r().showSingleSpeedOption === !0, u;
|
|
4387
4407
|
}, c = o();
|
|
4388
4408
|
return {
|
|
4389
4409
|
toolId: this.toolId,
|
|
@@ -4407,13 +4427,13 @@ var xu = {
|
|
|
4407
4427
|
},
|
|
4408
4428
|
sync: () => {
|
|
4409
4429
|
const u = l();
|
|
4410
|
-
u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n();
|
|
4430
|
+
u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = n(), u.showSingleSpeedOption = r().showSingleSpeedOption === !0;
|
|
4411
4431
|
}
|
|
4412
4432
|
};
|
|
4413
4433
|
}
|
|
4414
4434
|
};
|
|
4415
4435
|
function Qe(e, t) {
|
|
4416
|
-
const r =
|
|
4436
|
+
const r = Mi(e, t.scope.level, t.scope.scopeId);
|
|
4417
4437
|
return {
|
|
4418
4438
|
fullToolId: r,
|
|
4419
4439
|
isActive: () => t.isToolVisible(r),
|
|
@@ -4427,10 +4447,10 @@ function Ze(e) {
|
|
|
4427
4447
|
const t = e.isActive();
|
|
4428
4448
|
e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
|
|
4429
4449
|
}
|
|
4430
|
-
function
|
|
4450
|
+
function Ii(e, t) {
|
|
4431
4451
|
e.setAttribute("data-pie-tool-surface", t);
|
|
4432
4452
|
}
|
|
4433
|
-
var
|
|
4453
|
+
var Fu = {
|
|
4434
4454
|
toolId: "ruler",
|
|
4435
4455
|
name: "Ruler",
|
|
4436
4456
|
description: "On-screen ruler for measurements",
|
|
@@ -4442,7 +4462,7 @@ var Vu = {
|
|
|
4442
4462
|
],
|
|
4443
4463
|
pnpSupportIds: ["ruler", "measurement"],
|
|
4444
4464
|
isVisibleInContext(e) {
|
|
4445
|
-
return
|
|
4465
|
+
return fn(e);
|
|
4446
4466
|
},
|
|
4447
4467
|
renderToolbar(e, t) {
|
|
4448
4468
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4455,7 +4475,7 @@ var Vu = {
|
|
|
4455
4475
|
onClick: () => t.toggleTool(this.toolId),
|
|
4456
4476
|
active: r.isActive()
|
|
4457
4477
|
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4458
|
-
return o.setAttribute("tool-id", r.fullToolId),
|
|
4478
|
+
return o.setAttribute("tool-id", r.fullToolId), Ii(o, "frameless"), {
|
|
4459
4479
|
toolId: this.toolId,
|
|
4460
4480
|
button: n,
|
|
4461
4481
|
elements: [{
|
|
@@ -4472,7 +4492,7 @@ var Vu = {
|
|
|
4472
4492
|
subscribeActive: r.subscribeActive
|
|
4473
4493
|
};
|
|
4474
4494
|
}
|
|
4475
|
-
},
|
|
4495
|
+
}, ju = {
|
|
4476
4496
|
toolId: "protractor",
|
|
4477
4497
|
name: "Protractor",
|
|
4478
4498
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4484,7 +4504,7 @@ var Vu = {
|
|
|
4484
4504
|
],
|
|
4485
4505
|
pnpSupportIds: ["protractor", "angleMeasurement"],
|
|
4486
4506
|
isVisibleInContext(e) {
|
|
4487
|
-
return
|
|
4507
|
+
return fn(e);
|
|
4488
4508
|
},
|
|
4489
4509
|
renderToolbar(e, t) {
|
|
4490
4510
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4497,7 +4517,7 @@ var Vu = {
|
|
|
4497
4517
|
onClick: () => t.toggleTool(this.toolId),
|
|
4498
4518
|
active: r.isActive()
|
|
4499
4519
|
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4500
|
-
return o.setAttribute("tool-id", r.fullToolId),
|
|
4520
|
+
return o.setAttribute("tool-id", r.fullToolId), Ii(o, "frameless"), {
|
|
4501
4521
|
toolId: this.toolId,
|
|
4502
4522
|
button: n,
|
|
4503
4523
|
elements: [{
|
|
@@ -4514,7 +4534,7 @@ var Vu = {
|
|
|
4514
4534
|
subscribeActive: r.subscribeActive
|
|
4515
4535
|
};
|
|
4516
4536
|
}
|
|
4517
|
-
},
|
|
4537
|
+
}, Vu = {
|
|
4518
4538
|
toolId: "answerEliminator",
|
|
4519
4539
|
name: "Answer Eliminator",
|
|
4520
4540
|
description: "Strike through answer choices",
|
|
@@ -4561,7 +4581,7 @@ var Vu = {
|
|
|
4561
4581
|
subscribeActive: r.subscribeActive
|
|
4562
4582
|
};
|
|
4563
4583
|
}
|
|
4564
|
-
},
|
|
4584
|
+
}, qu = {
|
|
4565
4585
|
toolId: "highlighter",
|
|
4566
4586
|
name: "Highlighter",
|
|
4567
4587
|
description: "Highlight text",
|
|
@@ -4579,7 +4599,7 @@ var Vu = {
|
|
|
4579
4599
|
"annotation"
|
|
4580
4600
|
],
|
|
4581
4601
|
isVisibleInContext(e) {
|
|
4582
|
-
return
|
|
4602
|
+
return pn(e);
|
|
4583
4603
|
},
|
|
4584
4604
|
renderToolbar(e, t) {
|
|
4585
4605
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4612,7 +4632,7 @@ var Vu = {
|
|
|
4612
4632
|
subscribeActive: r.subscribeActive
|
|
4613
4633
|
};
|
|
4614
4634
|
}
|
|
4615
|
-
},
|
|
4635
|
+
}, Uu = {
|
|
4616
4636
|
toolId: "lineReader",
|
|
4617
4637
|
name: "Line Reader",
|
|
4618
4638
|
description: "Reading guide overlay",
|
|
@@ -4631,7 +4651,7 @@ var Vu = {
|
|
|
4631
4651
|
"trackingGuide"
|
|
4632
4652
|
],
|
|
4633
4653
|
isVisibleInContext(e) {
|
|
4634
|
-
return
|
|
4654
|
+
return pn(e);
|
|
4635
4655
|
},
|
|
4636
4656
|
renderToolbar(e, t) {
|
|
4637
4657
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4644,7 +4664,7 @@ var Vu = {
|
|
|
4644
4664
|
onClick: () => t.toggleTool(this.toolId),
|
|
4645
4665
|
active: r.isActive()
|
|
4646
4666
|
}, i = t.componentOverrides ?? {}, o = Be(this.toolId, e, t, i);
|
|
4647
|
-
return o.setAttribute("tool-id", r.fullToolId),
|
|
4667
|
+
return o.setAttribute("tool-id", r.fullToolId), Ii(o, "frameless"), {
|
|
4648
4668
|
toolId: this.toolId,
|
|
4649
4669
|
button: n,
|
|
4650
4670
|
elements: [{
|
|
@@ -4661,7 +4681,7 @@ var Vu = {
|
|
|
4661
4681
|
subscribeActive: r.subscribeActive
|
|
4662
4682
|
};
|
|
4663
4683
|
}
|
|
4664
|
-
},
|
|
4684
|
+
}, Gu = {
|
|
4665
4685
|
toolId: "theme",
|
|
4666
4686
|
name: "Theme",
|
|
4667
4687
|
description: "Accessible themes and contrast",
|
|
@@ -4716,7 +4736,7 @@ var Vu = {
|
|
|
4716
4736
|
subscribeActive: r.subscribeActive
|
|
4717
4737
|
};
|
|
4718
4738
|
}
|
|
4719
|
-
},
|
|
4739
|
+
}, Yu = {
|
|
4720
4740
|
toolId: "annotationToolbar",
|
|
4721
4741
|
name: "Highlighter",
|
|
4722
4742
|
description: "Highlight and annotate text",
|
|
@@ -4737,7 +4757,7 @@ var Vu = {
|
|
|
4737
4757
|
"annotation"
|
|
4738
4758
|
],
|
|
4739
4759
|
isVisibleInContext(e) {
|
|
4740
|
-
return
|
|
4760
|
+
return pn(e);
|
|
4741
4761
|
},
|
|
4742
4762
|
renderToolbar(e, t) {
|
|
4743
4763
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4767,7 +4787,7 @@ var Vu = {
|
|
|
4767
4787
|
subscribeActive: r.subscribeActive
|
|
4768
4788
|
};
|
|
4769
4789
|
}
|
|
4770
|
-
},
|
|
4790
|
+
}, Ku = {
|
|
4771
4791
|
toolId: "graph",
|
|
4772
4792
|
name: "Graph",
|
|
4773
4793
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4780,7 +4800,7 @@ var Vu = {
|
|
|
4780
4800
|
"graphingTool"
|
|
4781
4801
|
],
|
|
4782
4802
|
isVisibleInContext(e) {
|
|
4783
|
-
return
|
|
4803
|
+
return fn(e);
|
|
4784
4804
|
},
|
|
4785
4805
|
renderToolbar(e, t) {
|
|
4786
4806
|
const r = Qe(this.toolId, t), n = {
|
|
@@ -4820,7 +4840,7 @@ var Vu = {
|
|
|
4820
4840
|
subscribeActive: r.subscribeActive
|
|
4821
4841
|
};
|
|
4822
4842
|
}
|
|
4823
|
-
},
|
|
4843
|
+
}, Xu = {
|
|
4824
4844
|
toolId: "periodicTable",
|
|
4825
4845
|
name: "Periodic Table",
|
|
4826
4846
|
description: "Chemistry periodic table reference",
|
|
@@ -4872,8 +4892,10 @@ var Vu = {
|
|
|
4872
4892
|
subscribeActive: r.subscribeActive
|
|
4873
4893
|
};
|
|
4874
4894
|
}
|
|
4875
|
-
},
|
|
4876
|
-
|
|
4895
|
+
}, Ju = [
|
|
4896
|
+
Eu,
|
|
4897
|
+
Du,
|
|
4898
|
+
Fu,
|
|
4877
4899
|
ju,
|
|
4878
4900
|
Vu,
|
|
4879
4901
|
qu,
|
|
@@ -4881,11 +4903,9 @@ var Vu = {
|
|
|
4881
4903
|
Gu,
|
|
4882
4904
|
Yu,
|
|
4883
4905
|
Ku,
|
|
4884
|
-
Xu
|
|
4885
|
-
Ju,
|
|
4886
|
-
Qu
|
|
4906
|
+
Xu
|
|
4887
4907
|
];
|
|
4888
|
-
function
|
|
4908
|
+
function Qu(e = {}) {
|
|
4889
4909
|
const t = new iu(), r = {
|
|
4890
4910
|
toolTagMap: {
|
|
4891
4911
|
...Ys,
|
|
@@ -4894,32 +4914,32 @@ function eh(e = {}) {
|
|
|
4894
4914
|
toolComponentFactory: e.toolComponentFactory,
|
|
4895
4915
|
toolComponentFactories: e.toolComponentFactories
|
|
4896
4916
|
}, n = (i) => e.overrides?.[i.toolId] || i;
|
|
4897
|
-
return e.includePackagedTools &&
|
|
4917
|
+
return e.includePackagedTools && Zu(t, {
|
|
4898
4918
|
toolIds: e.toolIds,
|
|
4899
4919
|
applyOverrides: n
|
|
4900
4920
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
|
|
4901
4921
|
}
|
|
4902
|
-
function
|
|
4922
|
+
function Zu(e, t = {}) {
|
|
4903
4923
|
const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, n = t.applyOverrides || ((i) => i);
|
|
4904
|
-
for (const i of
|
|
4924
|
+
for (const i of Ju)
|
|
4905
4925
|
r && !r.has(i.toolId) || e.register(n(i));
|
|
4906
4926
|
}
|
|
4907
|
-
function
|
|
4908
|
-
return
|
|
4927
|
+
function eh(e = {}) {
|
|
4928
|
+
return Qu({
|
|
4909
4929
|
...e,
|
|
4910
4930
|
includePackagedTools: !0
|
|
4911
4931
|
});
|
|
4912
4932
|
}
|
|
4913
|
-
function
|
|
4914
|
-
const e =
|
|
4933
|
+
function th() {
|
|
4934
|
+
const e = eh(), t = /* @__PURE__ */ new Set();
|
|
4915
4935
|
for (const r of e.getAllTools()) for (const n of r.pnpSupportIds || []) t.add(n);
|
|
4916
4936
|
return [...t].sort();
|
|
4917
4937
|
}
|
|
4918
|
-
var
|
|
4919
|
-
supports: [...
|
|
4938
|
+
var rh = th(), xf = {
|
|
4939
|
+
supports: [...rh],
|
|
4920
4940
|
prohibitedSupports: [],
|
|
4921
4941
|
activateAtInit: []
|
|
4922
|
-
},
|
|
4942
|
+
}, nh = {
|
|
4923
4943
|
visual: {
|
|
4924
4944
|
magnification: "magnification",
|
|
4925
4945
|
screenMagnifier: "screenMagnifier",
|
|
@@ -5032,11 +5052,11 @@ var ih = nh(), Ef = {
|
|
|
5032
5052
|
itemGlossary: "itemGlossary",
|
|
5033
5053
|
tutorialAvailable: "tutorialAvailable"
|
|
5034
5054
|
}
|
|
5035
|
-
},
|
|
5055
|
+
}, Ef = Object.values(nh).flatMap((e) => Object.values(e)), Cf = Fs("ToolCoordinator"), ko;
|
|
5036
5056
|
(function(e) {
|
|
5037
5057
|
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";
|
|
5038
5058
|
})(ko || (ko = {}));
|
|
5039
|
-
var
|
|
5059
|
+
var ih = /* @__PURE__ */ new Set([
|
|
5040
5060
|
"speak",
|
|
5041
5061
|
"p",
|
|
5042
5062
|
"s",
|
|
@@ -5045,20 +5065,20 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5045
5065
|
"say-as",
|
|
5046
5066
|
"voice",
|
|
5047
5067
|
"lang"
|
|
5048
|
-
]),
|
|
5068
|
+
]), xo = /* @__PURE__ */ new Set(["audio", "phoneme"]), ia = (e) => e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), Nr = (e, t, r) => {
|
|
5049
5069
|
for (let n = 0; n < t.length; n++) e.push({
|
|
5050
5070
|
char: t[n],
|
|
5051
5071
|
rawOffset: r === null ? null : r + n
|
|
5052
5072
|
});
|
|
5053
|
-
},
|
|
5073
|
+
}, oh = (e, t, r) => {
|
|
5054
5074
|
const n = t.slice(r).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
|
|
5055
|
-
return n ? (
|
|
5056
|
-
},
|
|
5075
|
+
return n ? (Nr(e, ia(n[0]), r), n[0].length) : 0;
|
|
5076
|
+
}, Eo = (e) => {
|
|
5057
5077
|
e.push({
|
|
5058
5078
|
char: " ",
|
|
5059
5079
|
rawOffset: null
|
|
5060
5080
|
});
|
|
5061
|
-
},
|
|
5081
|
+
}, sh = (e) => {
|
|
5062
5082
|
const t = /* @__PURE__ */ new Map(), r = [];
|
|
5063
5083
|
let n = !0;
|
|
5064
5084
|
for (const i of e) {
|
|
@@ -5074,7 +5094,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5074
5094
|
text: r.join(""),
|
|
5075
5095
|
rawToSpokenOffsetMap: t
|
|
5076
5096
|
};
|
|
5077
|
-
},
|
|
5097
|
+
}, ah = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", lh = (e, t) => {
|
|
5078
5098
|
const r = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), n = e.match(r);
|
|
5079
5099
|
return ia(n?.[2] ?? n?.[3] ?? "") || null;
|
|
5080
5100
|
}, oa = (e) => {
|
|
@@ -5084,51 +5104,51 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5084
5104
|
const s = e[i];
|
|
5085
5105
|
if (s !== "<") {
|
|
5086
5106
|
if (s === "&") {
|
|
5087
|
-
const d =
|
|
5107
|
+
const d = oh(t, e, i);
|
|
5088
5108
|
if (d > 0) {
|
|
5089
5109
|
i += d;
|
|
5090
5110
|
continue;
|
|
5091
5111
|
}
|
|
5092
5112
|
}
|
|
5093
|
-
|
|
5113
|
+
Nr(t, s, i), i++;
|
|
5094
5114
|
continue;
|
|
5095
5115
|
}
|
|
5096
5116
|
const a = e.indexOf(">", i + 1);
|
|
5097
5117
|
if (a < 0) {
|
|
5098
|
-
|
|
5118
|
+
Nr(t, s, i), i++;
|
|
5099
5119
|
continue;
|
|
5100
5120
|
}
|
|
5101
5121
|
n = !0;
|
|
5102
|
-
const l = e.slice(i, a + 1), c =
|
|
5122
|
+
const l = e.slice(i, a + 1), c = ah(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
|
|
5103
5123
|
if (!u && c === "sub") {
|
|
5104
|
-
const d =
|
|
5124
|
+
const d = lh(l, "alias");
|
|
5105
5125
|
if (!d) {
|
|
5106
5126
|
r = !0, i = a + 1;
|
|
5107
5127
|
continue;
|
|
5108
5128
|
}
|
|
5109
|
-
|
|
5129
|
+
Nr(t, d, null);
|
|
5110
5130
|
const p = e.toLowerCase().indexOf("</sub>", a + 1);
|
|
5111
5131
|
i = p >= 0 ? p + 6 : a + 1;
|
|
5112
5132
|
continue;
|
|
5113
5133
|
}
|
|
5114
5134
|
if (!u && c === "break") {
|
|
5115
|
-
|
|
5135
|
+
Eo(t), i = a + 1;
|
|
5116
5136
|
continue;
|
|
5117
5137
|
}
|
|
5118
|
-
if (!u &&
|
|
5138
|
+
if (!u && xo.has(c) && (r = !0, h)) {
|
|
5119
5139
|
i = a + 1;
|
|
5120
5140
|
continue;
|
|
5121
5141
|
}
|
|
5122
|
-
c && !
|
|
5142
|
+
c && !ih.has(c) && !xo.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && Eo(t), i = a + 1;
|
|
5123
5143
|
}
|
|
5124
|
-
const o =
|
|
5144
|
+
const o = sh(t);
|
|
5125
5145
|
return {
|
|
5126
|
-
spokenText:
|
|
5146
|
+
spokenText: V(o.text),
|
|
5127
5147
|
rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
|
|
5128
5148
|
unsupportedSemantic: r,
|
|
5129
5149
|
hasMarkup: n
|
|
5130
5150
|
};
|
|
5131
|
-
},
|
|
5151
|
+
}, ch = Ks(), sa = /* @__PURE__ */ new Map([
|
|
5132
5152
|
["zero", "0"],
|
|
5133
5153
|
["one", "1"],
|
|
5134
5154
|
["two", "2"],
|
|
@@ -5140,7 +5160,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5140
5160
|
["eight", "8"],
|
|
5141
5161
|
["nine", "9"],
|
|
5142
5162
|
["ten", "10"]
|
|
5143
|
-
]),
|
|
5163
|
+
]), uh = [
|
|
5144
5164
|
{
|
|
5145
5165
|
phrase: [
|
|
5146
5166
|
"plus",
|
|
@@ -5215,9 +5235,9 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5215
5235
|
visible: "+",
|
|
5216
5236
|
score: 5
|
|
5217
5237
|
}
|
|
5218
|
-
],
|
|
5238
|
+
], ri = (e) => {
|
|
5219
5239
|
const t = [];
|
|
5220
|
-
for (const r of e.matchAll(
|
|
5240
|
+
for (const r of e.matchAll(ch)) {
|
|
5221
5241
|
const n = r[0], i = r.index ?? 0;
|
|
5222
5242
|
t.push({
|
|
5223
5243
|
text: n,
|
|
@@ -5227,16 +5247,16 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5227
5247
|
});
|
|
5228
5248
|
}
|
|
5229
5249
|
return t;
|
|
5230
|
-
},
|
|
5250
|
+
}, ni = (e) => sa.get(e.normalized) || e.normalized, hh = (e, t) => {
|
|
5231
5251
|
const r = [];
|
|
5232
5252
|
for (let n = 0; n < e.length; n++) {
|
|
5233
|
-
for (let i = 0; i < t.length; i++)
|
|
5253
|
+
for (let i = 0; i < t.length; i++) ni(e[n]) === ni(t[i]) && r.push({
|
|
5234
5254
|
spokenStartToken: n,
|
|
5235
5255
|
spokenEndToken: n + 1,
|
|
5236
5256
|
visibleToken: i,
|
|
5237
5257
|
score: 10
|
|
5238
5258
|
});
|
|
5239
|
-
for (const i of
|
|
5259
|
+
for (const i of uh) {
|
|
5240
5260
|
const o = e.slice(n, n + i.phrase.length);
|
|
5241
5261
|
if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
|
|
5242
5262
|
for (let s = 0; s < t.length; s++)
|
|
@@ -5249,8 +5269,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5249
5269
|
}
|
|
5250
5270
|
}
|
|
5251
5271
|
return r;
|
|
5252
|
-
},
|
|
5253
|
-
const r =
|
|
5272
|
+
}, dh = (e, t) => {
|
|
5273
|
+
const r = hh(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
|
|
5254
5274
|
for (let l = 0; l < r.length; l++) {
|
|
5255
5275
|
const c = r[l];
|
|
5256
5276
|
n[l] = c.score;
|
|
@@ -5279,12 +5299,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5279
5299
|
score: l.score
|
|
5280
5300
|
};
|
|
5281
5301
|
});
|
|
5282
|
-
},
|
|
5302
|
+
}, fh = (e, t, r) => {
|
|
5283
5303
|
if (e.length === 0) return 0;
|
|
5284
5304
|
const n = e.length / Math.max(1, Math.min(t.length, r.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
5285
5305
|
return Math.min(1, n * i);
|
|
5286
5306
|
}, aa = (e) => {
|
|
5287
|
-
const t = oa(e.speechText), r =
|
|
5307
|
+
const t = oa(e.speechText), r = V(e.visibleText), n = t.spokenText, i = ri(n), o = ri(r), s = t.unsupportedSemantic ? [] : dh(i, o), a = fh(s, i, o), l = n === r && n.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
5288
5308
|
return {
|
|
5289
5309
|
speechText: e.speechText,
|
|
5290
5310
|
spokenText: n,
|
|
@@ -5297,15 +5317,15 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5297
5317
|
visibleTokens: o,
|
|
5298
5318
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
|
|
5299
5319
|
};
|
|
5300
|
-
},
|
|
5320
|
+
}, Ri = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, la = (e) => {
|
|
5301
5321
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5302
|
-
const t =
|
|
5322
|
+
const t = ri(e)[0];
|
|
5303
5323
|
return t ? sa.get(t.normalized) || t.normalized : null;
|
|
5304
5324
|
}, Co = (e, t, r) => {
|
|
5305
5325
|
const n = la(r);
|
|
5306
5326
|
if (!t || !n) return !1;
|
|
5307
|
-
const i =
|
|
5308
|
-
return i ?
|
|
5327
|
+
const i = Ri(e.spokenTokens, t.start);
|
|
5328
|
+
return i ? ni(i) === n : !1;
|
|
5309
5329
|
}, Ao = (e, t) => {
|
|
5310
5330
|
const r = e.rawToSpokenOffsetMap.get(t);
|
|
5311
5331
|
if (r !== void 0) return r;
|
|
@@ -5318,19 +5338,19 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5318
5338
|
}, Mo = (e, t, r) => {
|
|
5319
5339
|
const n = Ao(e, t);
|
|
5320
5340
|
if (n === null) return null;
|
|
5321
|
-
const i = Ao(e, Math.max(t, t + r - 1)), o =
|
|
5341
|
+
const i = Ao(e, Math.max(t, t + r - 1)), o = Ri(e.spokenTokens, n), s = i !== null && i >= n ? i - n + 1 : o ? o.end - n : r;
|
|
5322
5342
|
return {
|
|
5323
5343
|
start: n,
|
|
5324
5344
|
length: Math.max(1, s)
|
|
5325
5345
|
};
|
|
5326
5346
|
}, Oo = (e, t, r) => {
|
|
5327
5347
|
if (t < 0 || t >= e.spokenText.length) return null;
|
|
5328
|
-
const n =
|
|
5348
|
+
const n = Ri(e.spokenTokens, t);
|
|
5329
5349
|
return n ? {
|
|
5330
5350
|
start: t,
|
|
5331
5351
|
length: Math.min(r, n.end - t)
|
|
5332
5352
|
} : null;
|
|
5333
|
-
},
|
|
5353
|
+
}, ph = (e, t, r = 1, n) => {
|
|
5334
5354
|
if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
|
|
5335
5355
|
const i = Math.max(1, Number.isFinite(r) ? r : 1);
|
|
5336
5356
|
if (n && /^<[^>]+>$/.test(n.trim())) return null;
|
|
@@ -5344,7 +5364,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5344
5364
|
return o || s;
|
|
5345
5365
|
}
|
|
5346
5366
|
return Oo(e, t, i) || Mo(e, t, i);
|
|
5347
|
-
},
|
|
5367
|
+
}, gh = (e, t) => {
|
|
5348
5368
|
if (e.playbackMode === "region-fallback") return null;
|
|
5349
5369
|
const r = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
|
|
5350
5370
|
if (r) return {
|
|
@@ -5366,7 +5386,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5366
5386
|
start: Math.min(n.visibleStart, i.visibleStart),
|
|
5367
5387
|
end: Math.max(n.visibleEnd, i.visibleEnd)
|
|
5368
5388
|
} : null;
|
|
5369
|
-
},
|
|
5389
|
+
}, vh = /* @__PURE__ */ new Map([
|
|
5370
5390
|
["+", ["plus"]],
|
|
5371
5391
|
["-", ["minus", "negative"]],
|
|
5372
5392
|
["−", ["minus", "negative"]],
|
|
@@ -5390,12 +5410,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5390
5410
|
["•", ["times"]],
|
|
5391
5411
|
["·", ["times"]],
|
|
5392
5412
|
["", ["times", "multiplied by"]]
|
|
5393
|
-
]),
|
|
5413
|
+
]), mh = /* @__PURE__ */ new Map([
|
|
5394
5414
|
["", "function-application"],
|
|
5395
5415
|
["", "implicit-multiply"],
|
|
5396
5416
|
["", "invisible-separator"],
|
|
5397
5417
|
["", "invisible-plus"]
|
|
5398
|
-
]), ca = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]),
|
|
5418
|
+
]), ca = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), yh = /* @__PURE__ */ new Map([
|
|
5399
5419
|
["msqrt", "radical"],
|
|
5400
5420
|
["mroot", "radical"],
|
|
5401
5421
|
["msub", "subscript"],
|
|
@@ -5405,11 +5425,11 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5405
5425
|
["munderover", "underoverscript"],
|
|
5406
5426
|
["mmultiscripts", "multiscript"],
|
|
5407
5427
|
["menclose", "enclosure"]
|
|
5408
|
-
]),
|
|
5428
|
+
]), bh = (e) => e.replace(/\s+/g, " ").trim(), Mt = (e) => (e.localName || e.tagName || "").toLowerCase(), _h = (e) => e.nodeType === Node.ELEMENT_NODE, Kt = (e) => Array.from(e.childNodes).filter(_h), $i = (e) => bh(e.textContent || ""), Xe = (e, t) => ({
|
|
5409
5429
|
type: "element-range",
|
|
5410
5430
|
quality: t,
|
|
5411
5431
|
element: e
|
|
5412
|
-
}),
|
|
5432
|
+
}), Th = (e) => {
|
|
5413
5433
|
switch (e) {
|
|
5414
5434
|
case "mi":
|
|
5415
5435
|
return "identifier";
|
|
@@ -5425,15 +5445,15 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5425
5445
|
default:
|
|
5426
5446
|
return "unknown";
|
|
5427
5447
|
}
|
|
5428
|
-
},
|
|
5429
|
-
const t = e.normalized ??
|
|
5448
|
+
}, Sh = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), wh = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? ca.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? vh.get(e) || [] : [], Rt = (e) => {
|
|
5449
|
+
const t = e.normalized ?? Sh(e.text, e.kind || "unknown");
|
|
5430
5450
|
return {
|
|
5431
5451
|
id: `math-token-${e.state.nextId++}`,
|
|
5432
5452
|
kind: e.kind,
|
|
5433
5453
|
role: e.role,
|
|
5434
5454
|
text: e.text,
|
|
5435
5455
|
normalized: t,
|
|
5436
|
-
spokenAliases:
|
|
5456
|
+
spokenAliases: wh(e.text, e.kind, e.role),
|
|
5437
5457
|
sourceElement: e.sourceElement,
|
|
5438
5458
|
path: e.path,
|
|
5439
5459
|
target: e.target || Xe(e.sourceElement, "element-range"),
|
|
@@ -5443,7 +5463,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5443
5463
|
e[r].push(t);
|
|
5444
5464
|
}, ua = (e, t, r) => {
|
|
5445
5465
|
Kt(e).forEach((n, i) => Je(n, t, `${r}/${Mt(n)}[${i}]`));
|
|
5446
|
-
},
|
|
5466
|
+
}, kh = (e, t, r) => {
|
|
5447
5467
|
const n = Kt(e);
|
|
5448
5468
|
n[0] && Je(n[0], t, `${r}/numerator`), $t(t, Rt({
|
|
5449
5469
|
state: t,
|
|
@@ -5454,7 +5474,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5454
5474
|
path: r,
|
|
5455
5475
|
target: Xe(e, "element-range")
|
|
5456
5476
|
})), n[1] && Je(n[1], t, `${r}/denominator`);
|
|
5457
|
-
},
|
|
5477
|
+
}, xh = (e, t, r) => {
|
|
5458
5478
|
const n = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
|
|
5459
5479
|
$t(t, Rt({
|
|
5460
5480
|
state: t,
|
|
@@ -5473,12 +5493,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5473
5493
|
path: `${r}/close`,
|
|
5474
5494
|
target: Xe(e, "element-range")
|
|
5475
5495
|
}));
|
|
5476
|
-
},
|
|
5496
|
+
}, Eh = (e, t, r) => {
|
|
5477
5497
|
const n = Kt(e);
|
|
5478
5498
|
n[0] && Je(n[0], t, `${r}/base`);
|
|
5479
5499
|
const i = n[1];
|
|
5480
5500
|
if (!i) return;
|
|
5481
|
-
const o =
|
|
5501
|
+
const o = $i(i);
|
|
5482
5502
|
if (ca.has(o)) {
|
|
5483
5503
|
$t(t, Rt({
|
|
5484
5504
|
state: t,
|
|
@@ -5493,18 +5513,18 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5493
5513
|
return;
|
|
5494
5514
|
}
|
|
5495
5515
|
Je(i, t, `${r}/exponent`);
|
|
5496
|
-
},
|
|
5516
|
+
}, Ch = (e, t, r, n) => {
|
|
5497
5517
|
$t(t, Rt({
|
|
5498
5518
|
state: t,
|
|
5499
5519
|
kind: "structure",
|
|
5500
5520
|
role: n,
|
|
5501
|
-
text:
|
|
5521
|
+
text: $i(e) || n,
|
|
5502
5522
|
normalized: `\0${n}`,
|
|
5503
5523
|
sourceElement: e,
|
|
5504
5524
|
path: r,
|
|
5505
5525
|
target: Xe(e, "element-range")
|
|
5506
5526
|
}));
|
|
5507
|
-
},
|
|
5527
|
+
}, Ah = (e, t, r) => {
|
|
5508
5528
|
let n = 0;
|
|
5509
5529
|
for (const i of Kt(e))
|
|
5510
5530
|
(Mt(i) === "mtr" || Mt(i) === "mlabeledtr") && (n++, $t(t, Rt({
|
|
@@ -5517,10 +5537,10 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5517
5537
|
path: `${r}/row[${n}]`,
|
|
5518
5538
|
target: Xe(i, "region-fallback")
|
|
5519
5539
|
}), "layoutTargets")), Je(i, t, `${r}/${Mt(i)}[${n}]`);
|
|
5520
|
-
},
|
|
5521
|
-
const n =
|
|
5540
|
+
}, Mh = (e, t, r) => {
|
|
5541
|
+
const n = $i(e);
|
|
5522
5542
|
if (!n) return;
|
|
5523
|
-
const i =
|
|
5543
|
+
const i = Th(Mt(e)), o = i === "operator" ? mh.get(n) : void 0, s = o ?? (i === "operator" && (n === "(" || n === ")") ? "grouping-fence" : i);
|
|
5524
5544
|
$t(t, Rt({
|
|
5525
5545
|
state: t,
|
|
5526
5546
|
kind: i,
|
|
@@ -5551,19 +5571,19 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5551
5571
|
case "mtext":
|
|
5552
5572
|
case "ms":
|
|
5553
5573
|
case "mspace":
|
|
5554
|
-
|
|
5574
|
+
Mh(e, t, r);
|
|
5555
5575
|
return;
|
|
5556
5576
|
case "mfrac":
|
|
5557
|
-
|
|
5577
|
+
kh(e, t, r);
|
|
5558
5578
|
return;
|
|
5559
5579
|
case "msup":
|
|
5560
|
-
|
|
5580
|
+
Eh(e, t, r);
|
|
5561
5581
|
return;
|
|
5562
5582
|
case "mfenced":
|
|
5563
|
-
|
|
5583
|
+
xh(e, t, r);
|
|
5564
5584
|
return;
|
|
5565
5585
|
case "mtable":
|
|
5566
|
-
|
|
5586
|
+
Ah(e, t, r);
|
|
5567
5587
|
return;
|
|
5568
5588
|
case "mphantom":
|
|
5569
5589
|
return;
|
|
@@ -5573,15 +5593,15 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5573
5593
|
return;
|
|
5574
5594
|
}
|
|
5575
5595
|
default: {
|
|
5576
|
-
const i =
|
|
5596
|
+
const i = yh.get(n);
|
|
5577
5597
|
if (i) {
|
|
5578
|
-
|
|
5598
|
+
Ch(e, t, r, i);
|
|
5579
5599
|
return;
|
|
5580
5600
|
}
|
|
5581
5601
|
ua(e, t, r);
|
|
5582
5602
|
}
|
|
5583
5603
|
}
|
|
5584
|
-
},
|
|
5604
|
+
}, Oh = (e) => {
|
|
5585
5605
|
const t = {
|
|
5586
5606
|
tokens: [],
|
|
5587
5607
|
layoutTargets: [],
|
|
@@ -5592,7 +5612,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5592
5612
|
layoutTargets: t.layoutTargets,
|
|
5593
5613
|
expressionTarget: Xe(e, "region-fallback")
|
|
5594
5614
|
};
|
|
5595
|
-
},
|
|
5615
|
+
}, Ih = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Rh = 0.95, $h = (e) => {
|
|
5596
5616
|
const t = [], r = /* @__PURE__ */ new Set(), n = (i) => {
|
|
5597
5617
|
const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
5598
5618
|
if (o.length === 0) return;
|
|
@@ -5617,11 +5637,11 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5617
5637
|
o && (n = i.length);
|
|
5618
5638
|
}
|
|
5619
5639
|
return n;
|
|
5620
|
-
},
|
|
5640
|
+
}, Lh = (e, t) => {
|
|
5621
5641
|
const r = [];
|
|
5622
5642
|
let n = 0;
|
|
5623
5643
|
for (const i of t) {
|
|
5624
|
-
const o =
|
|
5644
|
+
const o = $h(i);
|
|
5625
5645
|
if (i.optional) {
|
|
5626
5646
|
const s = Io(e, n, o);
|
|
5627
5647
|
s > 0 && (r.push({
|
|
@@ -5643,23 +5663,23 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5643
5663
|
}
|
|
5644
5664
|
}
|
|
5645
5665
|
return r;
|
|
5646
|
-
},
|
|
5666
|
+
}, Ph = (e, t, r) => {
|
|
5647
5667
|
const n = r.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
|
|
5648
5668
|
return n > 0 && i === n && o === t.length;
|
|
5649
|
-
},
|
|
5669
|
+
}, Nh = (e) => e.map(({ speechTokens: t, math: r }) => ({
|
|
5650
5670
|
speechTokenIds: t.map((n) => n.id),
|
|
5651
5671
|
mathTokenIds: [r.id],
|
|
5652
5672
|
score: 1,
|
|
5653
5673
|
confidence: 1,
|
|
5654
5674
|
target: r.target
|
|
5655
|
-
})),
|
|
5656
|
-
const t = e.minExactWordConfidence ??
|
|
5675
|
+
})), zh = (e) => {
|
|
5676
|
+
const t = e.minExactWordConfidence ?? Rh, r = Lh(e.speech.tokens, e.math.tokens), n = Ph(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5657
5677
|
return {
|
|
5658
|
-
segments: n >= t ?
|
|
5678
|
+
segments: n >= t ? Nh(r) : [],
|
|
5659
5679
|
confidence: n,
|
|
5660
5680
|
fallbackTarget: e.math.expressionTarget
|
|
5661
5681
|
};
|
|
5662
|
-
}, ha = Ks(),
|
|
5682
|
+
}, ha = Ks(), Wh = /* @__PURE__ */ new Map([
|
|
5663
5683
|
["zero", "0"],
|
|
5664
5684
|
["one", "1"],
|
|
5665
5685
|
["two", "2"],
|
|
@@ -5673,8 +5693,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5673
5693
|
["ten", "10"]
|
|
5674
5694
|
]), da = (e) => {
|
|
5675
5695
|
const t = e.toLowerCase();
|
|
5676
|
-
return
|
|
5677
|
-
},
|
|
5696
|
+
return Wh.get(t) || t;
|
|
5697
|
+
}, Hh = (e) => {
|
|
5678
5698
|
const t = [];
|
|
5679
5699
|
for (const r of e.matchAll(ha)) {
|
|
5680
5700
|
const n = r[0], i = r.index ?? 0;
|
|
@@ -5695,17 +5715,17 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5695
5715
|
return {
|
|
5696
5716
|
speechText: e.speechText,
|
|
5697
5717
|
spokenText: t.spokenText,
|
|
5698
|
-
tokens:
|
|
5718
|
+
tokens: Hh(t.spokenText),
|
|
5699
5719
|
rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
|
|
5700
5720
|
boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
|
|
5701
5721
|
unsupportedSemantic: t.unsupportedSemantic,
|
|
5702
5722
|
hasMarkup: t.hasMarkup
|
|
5703
5723
|
};
|
|
5704
|
-
},
|
|
5724
|
+
}, Li = (e) => {
|
|
5705
5725
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
5706
5726
|
const t = e.match(ha);
|
|
5707
5727
|
return t?.[0] ? da(t[0]) : null;
|
|
5708
|
-
},
|
|
5728
|
+
}, Bh = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, Dh = (e, t) => {
|
|
5709
5729
|
const r = e.rawToSpokenOffsetMap.get(t);
|
|
5710
5730
|
if (r !== void 0) return r;
|
|
5711
5731
|
for (let n = t; n < e.speechText.length; n++) {
|
|
@@ -5714,57 +5734,57 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5714
5734
|
if (e.speechText[n] === ">") break;
|
|
5715
5735
|
}
|
|
5716
5736
|
return null;
|
|
5717
|
-
},
|
|
5737
|
+
}, ii = (e, t, r) => {
|
|
5718
5738
|
if (t === null) return null;
|
|
5719
|
-
const n =
|
|
5739
|
+
const n = Bh(e.tokens, t);
|
|
5720
5740
|
return n ? {
|
|
5721
5741
|
token: n,
|
|
5722
5742
|
start: t,
|
|
5723
5743
|
length: Math.max(1, Math.min(r, n.end - t)),
|
|
5724
5744
|
confidence: 0.75
|
|
5725
5745
|
} : null;
|
|
5726
|
-
},
|
|
5727
|
-
const r =
|
|
5746
|
+
}, oi = (e, t) => {
|
|
5747
|
+
const r = Li(t);
|
|
5728
5748
|
return !!(e && r && e.token.normalized === r);
|
|
5729
|
-
},
|
|
5749
|
+
}, Fh = (e) => {
|
|
5730
5750
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5731
|
-
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r =
|
|
5732
|
-
return
|
|
5751
|
+
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ii(e.tokenization, Dh(e.tokenization, e.position), t), n = ii(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5752
|
+
return oi(r, e.boundaryWord) ? {
|
|
5733
5753
|
...r,
|
|
5734
5754
|
confidence: 1
|
|
5735
|
-
} :
|
|
5755
|
+
} : oi(n, e.boundaryWord) ? {
|
|
5736
5756
|
...n,
|
|
5737
5757
|
confidence: 1
|
|
5738
|
-
} : e.boundaryWord &&
|
|
5739
|
-
},
|
|
5758
|
+
} : e.boundaryWord && Li(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? r || n : n || r;
|
|
5759
|
+
}, jh = (e) => {
|
|
5740
5760
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5741
|
-
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r =
|
|
5742
|
-
return
|
|
5761
|
+
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ii(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5762
|
+
return oi(r, e.boundaryWord) ? {
|
|
5743
5763
|
...r,
|
|
5744
5764
|
confidence: 1
|
|
5745
|
-
} : e.boundaryWord &&
|
|
5746
|
-
},
|
|
5747
|
-
const t = Tr({ speechText: e.speechText }), r =
|
|
5765
|
+
} : e.boundaryWord && Li(e.boundaryWord) ? null : r;
|
|
5766
|
+
}, rn = (e) => {
|
|
5767
|
+
const t = Tr({ speechText: e.speechText }), r = Oh(e.mathElement);
|
|
5748
5768
|
return {
|
|
5749
5769
|
speech: t,
|
|
5750
5770
|
math: r,
|
|
5751
|
-
result:
|
|
5771
|
+
result: zh({
|
|
5752
5772
|
speech: t,
|
|
5753
5773
|
math: r
|
|
5754
5774
|
})
|
|
5755
5775
|
};
|
|
5756
|
-
},
|
|
5757
|
-
const r =
|
|
5776
|
+
}, Vh = (e, t) => {
|
|
5777
|
+
const r = jh({
|
|
5758
5778
|
tokenization: e.speech,
|
|
5759
5779
|
position: t.position,
|
|
5760
5780
|
length: t.length,
|
|
5761
5781
|
boundaryWord: t.boundaryWord
|
|
5762
5782
|
});
|
|
5763
|
-
return
|
|
5783
|
+
return Ih({
|
|
5764
5784
|
alignment: e.result,
|
|
5765
5785
|
boundary: r
|
|
5766
5786
|
});
|
|
5767
|
-
},
|
|
5787
|
+
}, qh = (e, t) => {
|
|
5768
5788
|
if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
|
|
5769
5789
|
const r = Tr({ speechText: t.boundaryWord }).tokens[0];
|
|
5770
5790
|
if (!r) return null;
|
|
@@ -5773,7 +5793,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5773
5793
|
return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
|
|
5774
5794
|
});
|
|
5775
5795
|
return n.length === 1 ? n[0].target : null;
|
|
5776
|
-
},
|
|
5796
|
+
}, si = "http://www.w3.org/1998/Math/MathML", Uh = /* @__PURE__ */ new Set([
|
|
5777
5797
|
"math",
|
|
5778
5798
|
"maction",
|
|
5779
5799
|
"menclose",
|
|
@@ -5807,7 +5827,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5807
5827
|
"semantics",
|
|
5808
5828
|
"annotation",
|
|
5809
5829
|
"annotation-xml"
|
|
5810
|
-
]),
|
|
5830
|
+
]), Gh = /* @__PURE__ */ new Set([
|
|
5811
5831
|
"accent",
|
|
5812
5832
|
"accentunder",
|
|
5813
5833
|
"align",
|
|
@@ -5859,29 +5879,29 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5859
5879
|
"width",
|
|
5860
5880
|
"xmlns",
|
|
5861
5881
|
"xml:lang"
|
|
5862
|
-
]), fa = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"),
|
|
5882
|
+
]), fa = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Yh = (e) => fa(e).replace(/"/g, """), Kh = (e, t) => {
|
|
5863
5883
|
const r = e.toLowerCase(), n = t.trim().toLowerCase();
|
|
5864
|
-
return !!(r.startsWith("on") || !
|
|
5865
|
-
},
|
|
5884
|
+
return !!(r.startsWith("on") || !Gh.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
|
|
5885
|
+
}, Xh = (e) => {
|
|
5866
5886
|
const t = e.localName.toLowerCase();
|
|
5867
|
-
if (!
|
|
5887
|
+
if (!Uh.has(t)) return !1;
|
|
5868
5888
|
const r = e.namespaceURI;
|
|
5869
|
-
return !r || r ===
|
|
5889
|
+
return !r || r === si || r === "http://www.w3.org/1999/xhtml";
|
|
5870
5890
|
}, pa = (e) => {
|
|
5871
5891
|
if (e.nodeType === Node.TEXT_NODE) return fa(e.textContent || "");
|
|
5872
5892
|
if (e.nodeType === Node.COMMENT_NODE) return "";
|
|
5873
5893
|
if (e.nodeType !== Node.ELEMENT_NODE) return null;
|
|
5874
5894
|
const t = e;
|
|
5875
|
-
if (!
|
|
5895
|
+
if (!Xh(t)) return null;
|
|
5876
5896
|
const r = t.localName.toLowerCase(), n = [];
|
|
5877
5897
|
for (const o of Array.from(t.attributes)) {
|
|
5878
5898
|
const s = o.name.toLowerCase();
|
|
5879
|
-
if (!
|
|
5880
|
-
if (s === "xmlns" && o.value !==
|
|
5881
|
-
n.push(`${s}="${
|
|
5899
|
+
if (!Kh(s, o.value)) {
|
|
5900
|
+
if (s === "xmlns" && o.value !== si) return null;
|
|
5901
|
+
n.push(`${s}="${Yh(o.value)}"`);
|
|
5882
5902
|
}
|
|
5883
5903
|
}
|
|
5884
|
-
r === "math" && !n.some((o) => o.startsWith("xmlns=")) && n.unshift(`xmlns="${
|
|
5904
|
+
r === "math" && !n.some((o) => o.startsWith("xmlns=")) && n.unshift(`xmlns="${si}"`);
|
|
5885
5905
|
const i = [];
|
|
5886
5906
|
for (const o of Array.from(t.childNodes)) {
|
|
5887
5907
|
const s = pa(o);
|
|
@@ -5889,10 +5909,10 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5889
5909
|
i.push(s);
|
|
5890
5910
|
}
|
|
5891
5911
|
return `<${r}${n.length > 0 ? ` ${n.join(" ")}` : ""}>${i.join("")}</${r}>`;
|
|
5892
|
-
},
|
|
5912
|
+
}, Jh = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, zn = (e) => {
|
|
5893
5913
|
const t = String(e || "").trim();
|
|
5894
5914
|
if (!t) return null;
|
|
5895
|
-
const r =
|
|
5915
|
+
const r = Jh(t);
|
|
5896
5916
|
if (!r || r.getElementsByTagName("parsererror").length > 0) return null;
|
|
5897
5917
|
const n = r.documentElement;
|
|
5898
5918
|
return !n || n.localName.toLowerCase() !== "math" ? null : pa(n);
|
|
@@ -5907,25 +5927,25 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5907
5927
|
}), va = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", ma = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", ya = (e) => {
|
|
5908
5928
|
const t = e.tagName?.toLowerCase();
|
|
5909
5929
|
return t === "annotation" || t === "annotation-xml";
|
|
5910
|
-
},
|
|
5930
|
+
}, Qh = (e) => {
|
|
5911
5931
|
const t = e.getAttribute("data-mathml");
|
|
5912
5932
|
return t && t.trim() ? t : null;
|
|
5913
|
-
},
|
|
5914
|
-
if (e.tagName.toLowerCase() === "math") return
|
|
5915
|
-
const t =
|
|
5933
|
+
}, Zh = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, ed = (e) => {
|
|
5934
|
+
if (e.tagName.toLowerCase() === "math") return zn(e.outerHTML);
|
|
5935
|
+
const t = Qh(e);
|
|
5916
5936
|
if (t) {
|
|
5917
|
-
const r =
|
|
5937
|
+
const r = zn(t);
|
|
5918
5938
|
if (r) return r;
|
|
5919
5939
|
}
|
|
5920
5940
|
if (va(e)) {
|
|
5921
|
-
const r =
|
|
5941
|
+
const r = Zh(e);
|
|
5922
5942
|
if (r) {
|
|
5923
|
-
const n =
|
|
5943
|
+
const n = zn(r);
|
|
5924
5944
|
if (n) return n;
|
|
5925
5945
|
}
|
|
5926
5946
|
}
|
|
5927
5947
|
return null;
|
|
5928
|
-
},
|
|
5948
|
+
}, td = /* @__PURE__ */ new Set([
|
|
5929
5949
|
"P",
|
|
5930
5950
|
"H1",
|
|
5931
5951
|
"H2",
|
|
@@ -5941,7 +5961,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5941
5961
|
"FIGCAPTION",
|
|
5942
5962
|
"LABEL",
|
|
5943
5963
|
"BUTTON"
|
|
5944
|
-
]),
|
|
5964
|
+
]), rd = /* @__PURE__ */ new Set([
|
|
5945
5965
|
"heading",
|
|
5946
5966
|
"listitem",
|
|
5947
5967
|
"option",
|
|
@@ -5950,18 +5970,18 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5950
5970
|
"cell",
|
|
5951
5971
|
"columnheader",
|
|
5952
5972
|
"rowheader"
|
|
5953
|
-
]),
|
|
5973
|
+
]), nd = (e, t) => {
|
|
5954
5974
|
let r = e.parentElement, n = null;
|
|
5955
5975
|
for (; r && r !== t; ) {
|
|
5956
5976
|
const i = (r.getAttribute("role") || "").toLowerCase(), o = r.tagName.toUpperCase();
|
|
5957
|
-
if (
|
|
5977
|
+
if (td.has(o) || rd.has(i)) {
|
|
5958
5978
|
n = r;
|
|
5959
5979
|
break;
|
|
5960
5980
|
}
|
|
5961
5981
|
r = r.parentElement;
|
|
5962
5982
|
}
|
|
5963
5983
|
return n || t;
|
|
5964
|
-
},
|
|
5984
|
+
}, id = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || va(e), Tt = (e, t, r) => {
|
|
5965
5985
|
/[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), r ? (e.map.set(e.position, r), e.lastMapped = r) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
|
|
5966
5986
|
}, ba = (e, t) => {
|
|
5967
5987
|
if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
|
|
@@ -5994,7 +6014,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
5994
6014
|
offset: i
|
|
5995
6015
|
}), n = !0, e.lastCharWasWhitespace = !1;
|
|
5996
6016
|
}
|
|
5997
|
-
},
|
|
6017
|
+
}, od = (e, t) => {
|
|
5998
6018
|
for (let r = 0; r < t.text.length; r++) {
|
|
5999
6019
|
const n = t.text[r], i = /\s/.test(n), o = t.map.get(r) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
|
|
6000
6020
|
node: o.node,
|
|
@@ -6022,7 +6042,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6022
6042
|
offset: a
|
|
6023
6043
|
});
|
|
6024
6044
|
}
|
|
6025
|
-
},
|
|
6045
|
+
}, sd = (e) => {
|
|
6026
6046
|
if (typeof DOMParser > "u") return "";
|
|
6027
6047
|
const t = new DOMParser().parseFromString(e, "application/xml");
|
|
6028
6048
|
if (t.getElementsByTagName("parsererror").length > 0) return "";
|
|
@@ -6037,8 +6057,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6037
6057
|
if (!ya(o))
|
|
6038
6058
|
for (const s of Array.from(o.childNodes)) n(s);
|
|
6039
6059
|
};
|
|
6040
|
-
return n(t.documentElement),
|
|
6041
|
-
},
|
|
6060
|
+
return n(t.documentElement), V(r.join(" "));
|
|
6061
|
+
}, ad = (e, t, r) => {
|
|
6042
6062
|
const n = ga(r), i = (a) => {
|
|
6043
6063
|
if (Jt(a, e)) return;
|
|
6044
6064
|
if (a.nodeType === 3) {
|
|
@@ -6051,24 +6071,24 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6051
6071
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
6052
6072
|
};
|
|
6053
6073
|
i(e), Ta(n);
|
|
6054
|
-
const o =
|
|
6074
|
+
const o = V(n.chars.join(""));
|
|
6055
6075
|
if (o) return {
|
|
6056
6076
|
text: o,
|
|
6057
6077
|
map: n.map
|
|
6058
6078
|
};
|
|
6059
|
-
const s =
|
|
6079
|
+
const s = sd(t);
|
|
6060
6080
|
return s ? {
|
|
6061
6081
|
text: s,
|
|
6062
6082
|
map: /* @__PURE__ */ new Map()
|
|
6063
|
-
} :
|
|
6083
|
+
} : en(e, r);
|
|
6064
6084
|
}, Ta = (e) => {
|
|
6065
6085
|
for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
|
|
6066
6086
|
e.chars.pop(), e.position--, e.map.delete(e.position);
|
|
6067
|
-
},
|
|
6087
|
+
}, ld = (e, t) => {
|
|
6068
6088
|
const r = ga(t), n = [];
|
|
6069
6089
|
let i = 0, o, s = !1;
|
|
6070
6090
|
const a = () => {
|
|
6071
|
-
const u =
|
|
6091
|
+
const u = V(r.chars.slice(i, r.chars.length).join(""));
|
|
6072
6092
|
u && n.push({
|
|
6073
6093
|
type: "text",
|
|
6074
6094
|
text: u,
|
|
@@ -6077,19 +6097,19 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6077
6097
|
}, l = (u) => {
|
|
6078
6098
|
if (Jt(u, e)) return;
|
|
6079
6099
|
if (u.nodeType === Node.TEXT_NODE) {
|
|
6080
|
-
const p =
|
|
6100
|
+
const p = nd(u, e);
|
|
6081
6101
|
o && p !== o && a(), o = p, _a(r, u);
|
|
6082
6102
|
return;
|
|
6083
6103
|
}
|
|
6084
6104
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
6085
6105
|
const h = u;
|
|
6086
6106
|
if (ma(h)) return;
|
|
6087
|
-
const d =
|
|
6107
|
+
const d = ed(h);
|
|
6088
6108
|
if (d) {
|
|
6089
6109
|
a();
|
|
6090
|
-
const p =
|
|
6091
|
-
|
|
6092
|
-
const v =
|
|
6110
|
+
const p = ad(h, d, t);
|
|
6111
|
+
od(r, p);
|
|
6112
|
+
const v = V(p.text);
|
|
6093
6113
|
n.push({
|
|
6094
6114
|
type: "math",
|
|
6095
6115
|
mathml: d,
|
|
@@ -6111,8 +6131,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6111
6131
|
containsMathMarkup: s
|
|
6112
6132
|
};
|
|
6113
6133
|
}, cr = (e, t) => {
|
|
6114
|
-
if (!
|
|
6115
|
-
const { text: r, map: n } =
|
|
6134
|
+
if (!id(e)) {
|
|
6135
|
+
const { text: r, map: n } = en(e, t);
|
|
6116
6136
|
return {
|
|
6117
6137
|
visibleText: r,
|
|
6118
6138
|
map: n,
|
|
@@ -6123,8 +6143,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6123
6143
|
containsMathMarkup: !1
|
|
6124
6144
|
};
|
|
6125
6145
|
}
|
|
6126
|
-
return
|
|
6127
|
-
},
|
|
6146
|
+
return ld(e, t);
|
|
6147
|
+
}, cd = (e, t) => Zs([e], t), ud = (e) => (e || "en").split("-")[0].toLowerCase() || "en", hd = /* @__PURE__ */ new Set([
|
|
6128
6148
|
"H1",
|
|
6129
6149
|
"H2",
|
|
6130
6150
|
"H3",
|
|
@@ -6134,20 +6154,20 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6134
6154
|
"LI",
|
|
6135
6155
|
"LABEL",
|
|
6136
6156
|
"BUTTON"
|
|
6137
|
-
]),
|
|
6157
|
+
]), dd = /* @__PURE__ */ new Set([
|
|
6138
6158
|
"heading",
|
|
6139
6159
|
"listitem",
|
|
6140
6160
|
"option",
|
|
6141
6161
|
"radio"
|
|
6142
|
-
]),
|
|
6162
|
+
]), fd = (e) => {
|
|
6143
6163
|
if (e.type !== "text" || !e.sourceElement) return !1;
|
|
6144
6164
|
const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
|
|
6145
|
-
return
|
|
6146
|
-
},
|
|
6147
|
-
const t = e.resolveMathSpeech ??
|
|
6165
|
+
return hd.has(t) || dd.has(r);
|
|
6166
|
+
}, pd = async (e) => {
|
|
6167
|
+
const t = e.resolveMathSpeech ?? cd, { visibleText: r } = e, n = [];
|
|
6148
6168
|
let i = 0;
|
|
6149
6169
|
const o = (a) => {
|
|
6150
|
-
const l =
|
|
6170
|
+
const l = V(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, h = u + l.length;
|
|
6151
6171
|
return i = h, {
|
|
6152
6172
|
start: u,
|
|
6153
6173
|
end: h
|
|
@@ -6156,12 +6176,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6156
6176
|
for (let a = 0; a < e.chunks.length; a++) {
|
|
6157
6177
|
const l = e.chunks[a];
|
|
6158
6178
|
if (l.type === "text") {
|
|
6159
|
-
const p =
|
|
6179
|
+
const p = fd(l) ? [{
|
|
6160
6180
|
text: l.text,
|
|
6161
6181
|
offset: 0
|
|
6162
|
-
}] :
|
|
6182
|
+
}] : Oi(l.text, { locale: e.language });
|
|
6163
6183
|
for (const v of p) {
|
|
6164
|
-
const b =
|
|
6184
|
+
const b = V(v.text);
|
|
6165
6185
|
if (!b) continue;
|
|
6166
6186
|
const m = o(b);
|
|
6167
6187
|
n.push({
|
|
@@ -6196,19 +6216,19 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6196
6216
|
}
|
|
6197
6217
|
return {
|
|
6198
6218
|
segments: n,
|
|
6199
|
-
locale:
|
|
6219
|
+
locale: ud(e.language),
|
|
6200
6220
|
visibleText: r,
|
|
6201
|
-
plainSpeechText:
|
|
6221
|
+
plainSpeechText: V(s.join(" "))
|
|
6202
6222
|
};
|
|
6203
|
-
},
|
|
6204
|
-
const t = Math.max(1, e.maxEntries ??
|
|
6223
|
+
}, gd = (e) => (e || "en").split("-")[0].toLowerCase() || "en", vd = "sre-v1", md = 256, ai = (e) => Array.isArray(e) ? `array:[${e.map(ai).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${ai(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, Ro = (e, t, r, n) => `${vd}\0${gd(e)}\0${t ? "ssml" : "plain"}\0${ai(r ?? null)}\0${n}`, yd = (e = {}) => {
|
|
6224
|
+
const t = Math.max(1, e.maxEntries ?? md), r = e.resolve ?? ((o, s) => Zs([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
6205
6225
|
for (n.delete(o), n.set(o, s); n.size > t; ) {
|
|
6206
6226
|
const a = n.keys().next().value;
|
|
6207
6227
|
a !== void 0 && n.delete(a);
|
|
6208
6228
|
}
|
|
6209
6229
|
};
|
|
6210
6230
|
return async (o, s) => {
|
|
6211
|
-
const a =
|
|
6231
|
+
const a = gn(s.mathSpeech), l = s.produceSsml === !0, c = Ro(s.language, l, a, o.mathml), u = n.get(c);
|
|
6212
6232
|
if (u)
|
|
6213
6233
|
return n.delete(c), n.set(c, u), u;
|
|
6214
6234
|
const h = await r(o, {
|
|
@@ -6221,13 +6241,13 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6221
6241
|
usedFallback: h.usedFallback
|
|
6222
6242
|
}), i(c, h), h;
|
|
6223
6243
|
};
|
|
6224
|
-
},
|
|
6244
|
+
}, bd = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Tr({ speechText: e }).tokens[0]?.normalized || null, _d = (e, t) => {
|
|
6225
6245
|
const r = Tr({ speechText: e.speechText });
|
|
6226
6246
|
if (!Number.isFinite(t.position)) return {
|
|
6227
6247
|
boundary: null,
|
|
6228
6248
|
spokenText: r.spokenText
|
|
6229
6249
|
};
|
|
6230
|
-
const n =
|
|
6250
|
+
const n = Fh({
|
|
6231
6251
|
tokenization: r,
|
|
6232
6252
|
position: t.position,
|
|
6233
6253
|
length: t.length,
|
|
@@ -6240,8 +6260,8 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6240
6260
|
} : null,
|
|
6241
6261
|
spokenText: r.spokenText
|
|
6242
6262
|
};
|
|
6243
|
-
},
|
|
6244
|
-
const r =
|
|
6263
|
+
}, Td = (e, t, r) => r ? Tr({ speechText: e }).tokens.find((n) => n.start <= t && t < n.end)?.normalized === r : !0, Sd = (e, t) => {
|
|
6264
|
+
const r = bd(t.word);
|
|
6245
6265
|
if (e.id !== t.chunkId) return {
|
|
6246
6266
|
chunkId: t.chunkId,
|
|
6247
6267
|
normalizedWord: r,
|
|
@@ -6260,12 +6280,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6260
6280
|
};
|
|
6261
6281
|
let n, i;
|
|
6262
6282
|
if (e.catalogAlignment)
|
|
6263
|
-
n =
|
|
6283
|
+
n = ph(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
|
|
6264
6284
|
else {
|
|
6265
|
-
const o =
|
|
6285
|
+
const o = _d(e, t);
|
|
6266
6286
|
n = o.boundary, i = o.spokenText;
|
|
6267
6287
|
}
|
|
6268
|
-
return n ?
|
|
6288
|
+
return n ? Td(i, n.start, r) ? {
|
|
6269
6289
|
chunkId: e.id,
|
|
6270
6290
|
normalizedWord: r,
|
|
6271
6291
|
chunkSpokenStart: n.start,
|
|
@@ -6310,7 +6330,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6310
6330
|
["mn", "mjx-mn"],
|
|
6311
6331
|
["mo", "mjx-mo"],
|
|
6312
6332
|
["mtext", "mjx-mtext"]
|
|
6313
|
-
]),
|
|
6333
|
+
]), li = "mi,mn,mo,mtext", wa = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", ka = [
|
|
6314
6334
|
"mjx-mfrac",
|
|
6315
6335
|
"mjx-msqrt",
|
|
6316
6336
|
"mjx-mroot",
|
|
@@ -6318,17 +6338,17 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6318
6338
|
"mjx-munder",
|
|
6319
6339
|
"mjx-mover",
|
|
6320
6340
|
"mjx-munderover"
|
|
6321
|
-
].join(","),
|
|
6341
|
+
].join(","), xa = (e) => e.type === "text-range" ? e.node.parentElement : e.element, vn = (e) => {
|
|
6322
6342
|
let t = e;
|
|
6323
6343
|
for (; t; ) {
|
|
6324
6344
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
6325
6345
|
t = t.parentElement;
|
|
6326
6346
|
}
|
|
6327
6347
|
return null;
|
|
6328
|
-
}, $o = (e) => !e ||
|
|
6348
|
+
}, $o = (e) => !e || vn(e) ? !1 : !Jt(e), Ea = (e) => {
|
|
6329
6349
|
const t = e.getBoundingClientRect?.();
|
|
6330
6350
|
return !!(t && t.width > 0 && t.height > 0);
|
|
6331
|
-
},
|
|
6351
|
+
}, ci = (e) => {
|
|
6332
6352
|
let t = e;
|
|
6333
6353
|
for (; t; ) {
|
|
6334
6354
|
if (t.localName?.toLowerCase() === "math") return t;
|
|
@@ -6342,31 +6362,31 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6342
6362
|
if (!n || t[r].localName.toLowerCase() !== n) return !1;
|
|
6343
6363
|
}
|
|
6344
6364
|
return !0;
|
|
6345
|
-
},
|
|
6365
|
+
}, wd = (e, t) => {
|
|
6346
6366
|
if (!e || !Sa.has(e.localName.toLowerCase()) || t.querySelector(ka)) return null;
|
|
6347
|
-
const r =
|
|
6367
|
+
const r = ci(e), n = t.querySelector("mjx-math");
|
|
6348
6368
|
if (!r || !n) return null;
|
|
6349
|
-
const i = Array.from(r.querySelectorAll(
|
|
6369
|
+
const i = Array.from(r.querySelectorAll(li)), o = i.indexOf(e);
|
|
6350
6370
|
if (o < 0) return null;
|
|
6351
6371
|
const s = Array.from(n.querySelectorAll(wa));
|
|
6352
6372
|
if (!Ca(i, s)) return null;
|
|
6353
6373
|
const a = s[o];
|
|
6354
|
-
return !a || !
|
|
6355
|
-
},
|
|
6356
|
-
const t =
|
|
6374
|
+
return !a || !Ea(a) ? null : a;
|
|
6375
|
+
}, kd = (e) => {
|
|
6376
|
+
const t = vn(e);
|
|
6357
6377
|
if (t) {
|
|
6358
6378
|
if (t.querySelector(ka)) return "expression";
|
|
6359
|
-
const n =
|
|
6379
|
+
const n = ci(e) ?? e, i = t.querySelector("mjx-math");
|
|
6360
6380
|
if (!i) return "expression";
|
|
6361
|
-
const o = Array.from(n.querySelectorAll(
|
|
6362
|
-
return Ca(o, s) && s.some((a) =>
|
|
6381
|
+
const o = Array.from(n.querySelectorAll(li)), s = Array.from(i.querySelectorAll(wa));
|
|
6382
|
+
return Ca(o, s) && s.some((a) => Ea(a)) ? "token" : "expression";
|
|
6363
6383
|
}
|
|
6364
|
-
const r =
|
|
6365
|
-
return Array.from(r.querySelectorAll(
|
|
6366
|
-
},
|
|
6367
|
-
const t =
|
|
6384
|
+
const r = ci(e) ?? e;
|
|
6385
|
+
return Array.from(r.querySelectorAll(li)).some((n) => !Jt(n)) ? "token" : "expression";
|
|
6386
|
+
}, ui = (e) => {
|
|
6387
|
+
const t = xa(e), r = vn(t);
|
|
6368
6388
|
if (r) {
|
|
6369
|
-
const n =
|
|
6389
|
+
const n = wd(t, r);
|
|
6370
6390
|
return n ? {
|
|
6371
6391
|
type: "element",
|
|
6372
6392
|
quality: "semantic-token",
|
|
@@ -6388,24 +6408,24 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6388
6408
|
quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
|
|
6389
6409
|
element: e.element
|
|
6390
6410
|
} : null;
|
|
6391
|
-
},
|
|
6411
|
+
}, xd = ui, Ed = () => {
|
|
6392
6412
|
const e = /* @__PURE__ */ new WeakMap();
|
|
6393
6413
|
return (t) => {
|
|
6394
|
-
const r =
|
|
6395
|
-
if (!r || !n) return
|
|
6414
|
+
const r = xa(t), n = vn(r);
|
|
6415
|
+
if (!r || !n) return ui(t);
|
|
6396
6416
|
if (e.has(r)) return e.get(r) ?? null;
|
|
6397
|
-
const i =
|
|
6417
|
+
const i = ui(t);
|
|
6398
6418
|
return e.set(r, i), i;
|
|
6399
6419
|
};
|
|
6400
|
-
},
|
|
6420
|
+
}, Cd = (e, t, r, n = e.mathAlignments, i = xd) => {
|
|
6401
6421
|
if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
|
|
6402
6422
|
let o = null;
|
|
6403
6423
|
for (const s of n) {
|
|
6404
|
-
const a =
|
|
6424
|
+
const a = Vh(s.alignment, {
|
|
6405
6425
|
position: t.chunkSpokenStart,
|
|
6406
6426
|
length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
|
|
6407
6427
|
boundaryWord: r.word
|
|
6408
|
-
}) ||
|
|
6428
|
+
}) || qh(s.alignment, { boundaryWord: r.word });
|
|
6409
6429
|
if (!a) continue;
|
|
6410
6430
|
const l = i(a);
|
|
6411
6431
|
if (l) {
|
|
@@ -6426,9 +6446,9 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6426
6446
|
} catch {
|
|
6427
6447
|
return null;
|
|
6428
6448
|
}
|
|
6429
|
-
},
|
|
6449
|
+
}, Ad = (e, t) => {
|
|
6430
6450
|
if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
|
|
6431
|
-
const r =
|
|
6451
|
+
const r = gh(e.catalogAlignment, t.chunkSpokenStart);
|
|
6432
6452
|
if (!r) return null;
|
|
6433
6453
|
const n = Aa(e.visibleMap, r.start, r.end);
|
|
6434
6454
|
return n ? {
|
|
@@ -6436,7 +6456,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6436
6456
|
quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
|
|
6437
6457
|
range: n
|
|
6438
6458
|
} : null;
|
|
6439
|
-
},
|
|
6459
|
+
}, Md = (e) => e.regionRange ? {
|
|
6440
6460
|
type: "range",
|
|
6441
6461
|
quality: "region",
|
|
6442
6462
|
range: e.regionRange
|
|
@@ -6448,7 +6468,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6448
6468
|
if (t.length !== 1) return null;
|
|
6449
6469
|
const r = t[0]?.alignment.result.fallbackTarget;
|
|
6450
6470
|
return r ? e.renderedMathTargetResolver(r) : null;
|
|
6451
|
-
},
|
|
6471
|
+
}, Od = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
|
|
6452
6472
|
try {
|
|
6453
6473
|
return e.type === "range" ? e.range.intersectsNode(r) : e.type === "element" ? e.element === r || e.element.contains(r) : e.node.parentElement?.contains(r) || !1;
|
|
6454
6474
|
} catch {
|
|
@@ -6460,18 +6480,18 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6460
6480
|
quality: "region",
|
|
6461
6481
|
confidence: 0,
|
|
6462
6482
|
reason: "boundary chunk id was not found"
|
|
6463
|
-
}), No = (e) => e.length === 1 ? e[0].element : null,
|
|
6483
|
+
}), No = (e) => e.length === 1 ? e[0].element : null, Id = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Rd = 3, $d = (e, t, r) => {
|
|
6464
6484
|
if (!t || t.type !== "range") return !1;
|
|
6465
6485
|
const { startContainer: n, endContainer: i } = t.range;
|
|
6466
|
-
return n === i && n.nodeType ===
|
|
6467
|
-
},
|
|
6486
|
+
return n === i && n.nodeType === Rd ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
|
|
6487
|
+
}, Ld = (e, t) => ({
|
|
6468
6488
|
chunk: e,
|
|
6469
|
-
regionTarget:
|
|
6470
|
-
renderedMathTargetResolver:
|
|
6471
|
-
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ?
|
|
6489
|
+
regionTarget: Md(e),
|
|
6490
|
+
renderedMathTargetResolver: Ed(),
|
|
6491
|
+
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ? kd(r) : "expression"])),
|
|
6472
6492
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
6473
|
-
}),
|
|
6474
|
-
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id,
|
|
6493
|
+
}), Pd = (e) => {
|
|
6494
|
+
const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id, Ld(n, t)]));
|
|
6475
6495
|
return {
|
|
6476
6496
|
chunks: e.chunks,
|
|
6477
6497
|
resolveInitial(n) {
|
|
@@ -6495,7 +6515,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6495
6515
|
resolveBoundary(n) {
|
|
6496
6516
|
const i = r.get(n.chunkId);
|
|
6497
6517
|
if (!i) return Po();
|
|
6498
|
-
const { chunk: o } = i, s =
|
|
6518
|
+
const { chunk: o } = i, s = Sd(o, n), a = Ad(o, s), l = Od(a, o), c = (!a || l.length > 0 ? Cd(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
|
|
6499
6519
|
if (u) {
|
|
6500
6520
|
const d = No(l);
|
|
6501
6521
|
return d && i.heldTokenByElement.set(d, u), zt({
|
|
@@ -6506,14 +6526,14 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6506
6526
|
reason: s.reason
|
|
6507
6527
|
});
|
|
6508
6528
|
}
|
|
6509
|
-
if (a && (t ?
|
|
6529
|
+
if (a && (t ? !$d(i, a, l) : l.length === 0)) return zt({
|
|
6510
6530
|
semanticTarget: a,
|
|
6511
6531
|
expressionTarget: null,
|
|
6512
6532
|
regionTarget: i.regionTarget,
|
|
6513
6533
|
confidence: s.confidence,
|
|
6514
6534
|
reason: s.reason
|
|
6515
6535
|
});
|
|
6516
|
-
if (
|
|
6536
|
+
if (Id(i, l)) {
|
|
6517
6537
|
const d = No(l), p = d ? i.heldTokenByElement.get(d) ?? null : null;
|
|
6518
6538
|
return zt({
|
|
6519
6539
|
semanticTarget: p,
|
|
@@ -6532,14 +6552,14 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6532
6552
|
});
|
|
6533
6553
|
}
|
|
6534
6554
|
};
|
|
6535
|
-
},
|
|
6555
|
+
}, Nd = (e) => {
|
|
6536
6556
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
6537
6557
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
6538
6558
|
return t || "plain-spoken-text";
|
|
6539
|
-
},
|
|
6559
|
+
}, zd = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
6540
6560
|
element: e.sourceElement,
|
|
6541
6561
|
alignment: e.mathAlignment
|
|
6542
|
-
}] : [],
|
|
6562
|
+
}] : [], Wd = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
6543
6563
|
speechText: e.speechText || "",
|
|
6544
6564
|
visibleText: e.visibleText || e.speechText || "",
|
|
6545
6565
|
sourceElement: e.sourceElement || e.contentRoot,
|
|
@@ -6556,9 +6576,9 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6556
6576
|
regionRange: t.regionRange,
|
|
6557
6577
|
visibleMap: t.visibleMap,
|
|
6558
6578
|
catalogAlignment: t.alignment,
|
|
6559
|
-
mathAlignments:
|
|
6560
|
-
offsetSpace:
|
|
6561
|
-
})),
|
|
6579
|
+
mathAlignments: zd(t),
|
|
6580
|
+
offsetSpace: Nd(t)
|
|
6581
|
+
})), Hd = [
|
|
6562
6582
|
"[data-pie-tts-region]",
|
|
6563
6583
|
"[data-catalog-region]",
|
|
6564
6584
|
"li",
|
|
@@ -6569,17 +6589,17 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6569
6589
|
"[role='region']",
|
|
6570
6590
|
"div"
|
|
6571
6591
|
].join(","), Ma = (e, t) => {
|
|
6572
|
-
const r = e.closest(
|
|
6592
|
+
const r = e.closest(Hd);
|
|
6573
6593
|
return r && t.contains(r) ? r : e;
|
|
6574
|
-
},
|
|
6594
|
+
}, Bd = (e, t, r) => {
|
|
6575
6595
|
const n = /* @__PURE__ */ new Map();
|
|
6576
6596
|
for (let i = t; i < r; i++) {
|
|
6577
6597
|
const o = e.get(i);
|
|
6578
6598
|
o && n.set(i - t, o);
|
|
6579
6599
|
}
|
|
6580
6600
|
return n;
|
|
6581
|
-
},
|
|
6582
|
-
const t = cr(e.contentRoot, e.textProcessingOptions), r = await
|
|
6601
|
+
}, Dd = async (e) => {
|
|
6602
|
+
const t = cr(e.contentRoot, e.textProcessingOptions), r = await pd({
|
|
6583
6603
|
chunks: t.chunks,
|
|
6584
6604
|
visibleText: t.visibleText,
|
|
6585
6605
|
language: e.language,
|
|
@@ -6598,7 +6618,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6598
6618
|
anchor: {
|
|
6599
6619
|
sourceElement: a,
|
|
6600
6620
|
regionElement: Ma(a, e.contentRoot),
|
|
6601
|
-
visibleMap:
|
|
6621
|
+
visibleMap: Bd(t.map, n.visibleSpan.start, n.visibleSpan.end)
|
|
6602
6622
|
}
|
|
6603
6623
|
};
|
|
6604
6624
|
}
|
|
@@ -6618,7 +6638,7 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6618
6638
|
containsMathMarkup: t.containsMathMarkup,
|
|
6619
6639
|
visibleText: t.visibleText
|
|
6620
6640
|
};
|
|
6621
|
-
},
|
|
6641
|
+
}, Fd = (e, t) => {
|
|
6622
6642
|
const r = aa({
|
|
6623
6643
|
speechText: e.spokenText,
|
|
6624
6644
|
visibleText: e.spokenText
|
|
@@ -6642,12 +6662,12 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6642
6662
|
sourceElement: r,
|
|
6643
6663
|
regionElement: t.regionElement,
|
|
6644
6664
|
speechMatchesVisibleText: e.spokenText === e.fallbackText,
|
|
6645
|
-
mathAlignment: r ?
|
|
6665
|
+
mathAlignment: r ? rn({
|
|
6646
6666
|
mathElement: r,
|
|
6647
6667
|
speechText: e.spokenText
|
|
6648
6668
|
}) : void 0
|
|
6649
6669
|
};
|
|
6650
|
-
},
|
|
6670
|
+
}, jd = (e, t, r) => {
|
|
6651
6671
|
const n = t.sourceElement;
|
|
6652
6672
|
return {
|
|
6653
6673
|
speechText: r,
|
|
@@ -6655,22 +6675,22 @@ var sh = /* @__PURE__ */ new Set([
|
|
|
6655
6675
|
sourceElement: n,
|
|
6656
6676
|
regionElement: t.regionElement,
|
|
6657
6677
|
speechMatchesVisibleText: !1,
|
|
6658
|
-
mathAlignment: n ?
|
|
6678
|
+
mathAlignment: n ? rn({
|
|
6659
6679
|
mathElement: n,
|
|
6660
6680
|
speechText: r
|
|
6661
6681
|
}) : void 0,
|
|
6662
6682
|
plainFallback: Oa(e, t)
|
|
6663
6683
|
};
|
|
6664
|
-
},
|
|
6684
|
+
}, Vd = (e, t = {}) => e.items.map(({ segment: r, anchor: n }) => r.kind === "prose" ? Fd(r, n) : t.format === "ssml" && r.ssml ? jd(r, n, r.ssml) : Oa(r, n)), qd = "pie-tts-control-handoff", H;
|
|
6665
6685
|
(function(e) {
|
|
6666
6686
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
6667
6687
|
})(H || (H = {}));
|
|
6668
|
-
var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset,
|
|
6688
|
+
var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Ud = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Ia(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, Gd = class hi {
|
|
6669
6689
|
constructor() {
|
|
6670
|
-
y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "highlightTargetResolverProvider", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "activeWordBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver",
|
|
6690
|
+
y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "highlightTargetResolverProvider", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "activeWordBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "playbackChunks", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver", yd());
|
|
6671
6691
|
}
|
|
6672
6692
|
debugLog(t, r) {
|
|
6673
|
-
|
|
6693
|
+
hi.debugEnabled && (r === void 0 ? console.debug(t) : console.debug(t, r));
|
|
6674
6694
|
}
|
|
6675
6695
|
async emitTelemetry(t, r) {
|
|
6676
6696
|
try {
|
|
@@ -6847,12 +6867,12 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6847
6867
|
}
|
|
6848
6868
|
getMathSpeechOptions() {
|
|
6849
6869
|
const t = (this.ttsConfig.providerOptions || {}).mathSpeech;
|
|
6850
|
-
return
|
|
6870
|
+
return gn(t);
|
|
6851
6871
|
}
|
|
6852
6872
|
buildPositionMap(t, r, n) {
|
|
6853
6873
|
this.normalizedToDOM.clear();
|
|
6854
|
-
const { text: i, map: o } =
|
|
6855
|
-
this.normalizedToDOM = o,
|
|
6874
|
+
const { text: i, map: o } = en(t, this.getTextProcessingOptions(n));
|
|
6875
|
+
this.normalizedToDOM = o, hi.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
|
|
6856
6876
|
spokenLength: r.length,
|
|
6857
6877
|
normalizedDomLength: i.length,
|
|
6858
6878
|
match: r === i,
|
|
@@ -6961,7 +6981,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6961
6981
|
return this.createSpeechPlanSegments(r, n);
|
|
6962
6982
|
}
|
|
6963
6983
|
collectSpeechPlanBoundaries(t, r) {
|
|
6964
|
-
const n = /* @__PURE__ */ new Map(), { map: i } =
|
|
6984
|
+
const n = /* @__PURE__ */ new Map(), { map: i } = en(t, this.getTextProcessingOptions()), o = this.createNodeStartOffsets(i), s = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
|
|
6965
6985
|
let a = s.nextNode(), l = null;
|
|
6966
6986
|
for (; a; ) {
|
|
6967
6987
|
const c = a, u = c.parentElement;
|
|
@@ -7001,7 +7021,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7001
7021
|
}), i.filter((l) => l.text.trim().length > 0);
|
|
7002
7022
|
}
|
|
7003
7023
|
segmentSentences(t) {
|
|
7004
|
-
return
|
|
7024
|
+
return Oi(t, { locale: this.ttsConfig.providerOptions?.locale || void 0 });
|
|
7005
7025
|
}
|
|
7006
7026
|
createSeekSegmentsFromText(t) {
|
|
7007
7027
|
return this.segmentSentences(t).map((r) => {
|
|
@@ -7042,6 +7062,17 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7042
7062
|
const n = t.playbackSegments.map((i) => i.startOffset).filter((i) => i > 0);
|
|
7043
7063
|
return this.splitSegmentsAtBoundaries(r, n, t.contentToSpeak);
|
|
7044
7064
|
}
|
|
7065
|
+
createSeekSegmentsFromSpeechChunks(t) {
|
|
7066
|
+
let r = 0;
|
|
7067
|
+
return t.map((n) => {
|
|
7068
|
+
const i = V(n.plainFallback?.speechText || (this.hasExplicitBreakSemantics(n.speechText) ? n.visibleText : n.speechText) || n.visibleText) || n.visibleText || "", o = {
|
|
7069
|
+
text: i,
|
|
7070
|
+
startOffset: r,
|
|
7071
|
+
pauseMsAfter: 0
|
|
7072
|
+
};
|
|
7073
|
+
return r += Math.max(1, i.length + 1), o;
|
|
7074
|
+
});
|
|
7075
|
+
}
|
|
7045
7076
|
getCurrentSeekSegmentIndex() {
|
|
7046
7077
|
if (this.seekSegments.length === 0) return 0;
|
|
7047
7078
|
let t = 0;
|
|
@@ -7141,7 +7172,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7141
7172
|
const p = r?.highlightModeOverride || (h ? this.resolveHighlightMode() : "sentence");
|
|
7142
7173
|
this.activeHighlightMode = p, this.activeWordBoundaryOffset = r?.wordBoundaryOffset || 0;
|
|
7143
7174
|
const v = this.hasExplicitBreakSemantics(o), b = !!this.currentContentElement && !c && !v && h;
|
|
7144
|
-
if (this.seekSegments = v || !h ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
|
|
7175
|
+
if (this.playbackChunks = d?.length ? d : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : v || !h ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
|
|
7145
7176
|
contentToSpeak: a,
|
|
7146
7177
|
shouldUsePlan: b,
|
|
7147
7178
|
playbackSegments: this.seekSegments
|
|
@@ -7220,7 +7251,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7220
7251
|
}, "updateSettings" in this.provider && typeof this.provider.updateSettings == "function" && await this.provider.updateSettings({ providerOptions: o });
|
|
7221
7252
|
}
|
|
7222
7253
|
async resolveSpeechContent(t, r) {
|
|
7223
|
-
const n =
|
|
7254
|
+
const n = V(t);
|
|
7224
7255
|
if (r?.ignoreCatalogs) return {
|
|
7225
7256
|
contentToSpeak: n,
|
|
7226
7257
|
speechText: n,
|
|
@@ -7240,7 +7271,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7240
7271
|
context: r.catalogContext
|
|
7241
7272
|
});
|
|
7242
7273
|
if (o) {
|
|
7243
|
-
const s = r?.contentElement && cr(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a =
|
|
7274
|
+
const s = r?.contentElement && cr(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a = V(o.content);
|
|
7244
7275
|
return this.debugLog(`[TTSService] Using catalog content for "${r.catalogId}" (${o.language})`), {
|
|
7245
7276
|
contentToSpeak: o.content,
|
|
7246
7277
|
speechText: o.content,
|
|
@@ -7274,7 +7305,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7274
7305
|
if (!this.catalogResolver) return null;
|
|
7275
7306
|
const i = this.collectCatalogSpeechChunks(t, n);
|
|
7276
7307
|
if (!i.some((a) => a.sourceElement)) return null;
|
|
7277
|
-
const o =
|
|
7308
|
+
const o = V(i.map((a) => a.speechText).join(" ")), s = cr(t, this.getTextProcessingOptions(n.language)).visibleText || r;
|
|
7278
7309
|
return {
|
|
7279
7310
|
contentToSpeak: o,
|
|
7280
7311
|
speechText: o,
|
|
@@ -7292,7 +7323,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7292
7323
|
const n = [];
|
|
7293
7324
|
let i = "";
|
|
7294
7325
|
const o = () => {
|
|
7295
|
-
const u =
|
|
7326
|
+
const u = V(i);
|
|
7296
7327
|
i = "", u && n.push({
|
|
7297
7328
|
speechText: u,
|
|
7298
7329
|
visibleText: u,
|
|
@@ -7310,7 +7341,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7310
7341
|
}, a = (u, h) => {
|
|
7311
7342
|
const d = l(u);
|
|
7312
7343
|
if (d.length !== 1) return null;
|
|
7313
|
-
const p = d[0], v = cr(p, this.getTextProcessingOptions(r.language)).visibleText ||
|
|
7344
|
+
const p = d[0], v = cr(p, this.getTextProcessingOptions(r.language)).visibleText || V(p.textContent || ""), b = (m) => V(m).replace(/\s+/g, "");
|
|
7314
7345
|
return b(v) === b(h) ? p : null;
|
|
7315
7346
|
}, l = (u) => {
|
|
7316
7347
|
const h = Array.from(u.querySelectorAll("math"));
|
|
@@ -7325,19 +7356,19 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7325
7356
|
const h = u, d = s(h);
|
|
7326
7357
|
if (d) {
|
|
7327
7358
|
o();
|
|
7328
|
-
const p = cr(h, this.getTextProcessingOptions(r.language)), v = p.visibleText ||
|
|
7359
|
+
const p = cr(h, this.getTextProcessingOptions(r.language)), v = p.visibleText || V(h.textContent || ""), b = aa({
|
|
7329
7360
|
speechText: d.content,
|
|
7330
7361
|
visibleText: v
|
|
7331
|
-
}), m = a(h, v), _ = m ?
|
|
7362
|
+
}), m = a(h, v), _ = m ? rn({
|
|
7332
7363
|
mathElement: m,
|
|
7333
7364
|
speechText: d.content
|
|
7334
7365
|
}) : void 0, N = _ ? void 0 : l(h).map((S) => ({
|
|
7335
7366
|
element: S,
|
|
7336
|
-
alignment:
|
|
7367
|
+
alignment: rn({
|
|
7337
7368
|
mathElement: S,
|
|
7338
7369
|
speechText: d.content
|
|
7339
7370
|
})
|
|
7340
|
-
})), B =
|
|
7371
|
+
})), B = V(d.content);
|
|
7341
7372
|
n.push({
|
|
7342
7373
|
speechText: d.content,
|
|
7343
7374
|
visibleText: v,
|
|
@@ -7361,7 +7392,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7361
7392
|
return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
|
|
7362
7393
|
}
|
|
7363
7394
|
async resolveGeneratedSpeechContent(t, r, n) {
|
|
7364
|
-
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await
|
|
7395
|
+
const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await Dd({
|
|
7365
7396
|
contentRoot: t,
|
|
7366
7397
|
language: n,
|
|
7367
7398
|
mathSpeech: this.getMathSpeechOptions(),
|
|
@@ -7378,7 +7409,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7378
7409
|
containsMathMarkup: !1,
|
|
7379
7410
|
speechMatchesVisibleText: !0
|
|
7380
7411
|
};
|
|
7381
|
-
const c =
|
|
7412
|
+
const c = Vd(o, { format: i }), u = o.plainSpeechText;
|
|
7382
7413
|
return {
|
|
7383
7414
|
contentToSpeak: u,
|
|
7384
7415
|
speechText: u,
|
|
@@ -7400,7 +7431,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7400
7431
|
});
|
|
7401
7432
|
}
|
|
7402
7433
|
initializeSpeakTracking(t, r) {
|
|
7403
|
-
this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7434
|
+
this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.playbackChunks = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7404
7435
|
}
|
|
7405
7436
|
prepareHighlightsForSpeak(t) {
|
|
7406
7437
|
if (!this.currentContentElement || !this.highlightCoordinator || (this.buildPositionMap(this.currentContentElement, t.contentToSpeak, t.options?.language), t.highlightMode === "sentence" && t.shouldUsePlan)) return;
|
|
@@ -7447,7 +7478,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7447
7478
|
this.highlightCoordinator && this.paintTTSWordRange(this.resolveWordHighlightRange(t).range);
|
|
7448
7479
|
}
|
|
7449
7480
|
highlightRenderableRegionTarget(t) {
|
|
7450
|
-
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider &&
|
|
7481
|
+
if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Ud(this.lastRenderedRegionTarget, t)))
|
|
7451
7482
|
try {
|
|
7452
7483
|
const r = document.createRange();
|
|
7453
7484
|
if (t.type === "element") r.selectNodeContents(t.element);
|
|
@@ -7506,10 +7537,10 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7506
7537
|
async speakCatalogChunkOnce(t, r) {
|
|
7507
7538
|
if (!this.provider) return;
|
|
7508
7539
|
this.lastRenderedRegionTarget = null;
|
|
7509
|
-
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ?
|
|
7540
|
+
const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ? Wd({
|
|
7510
7541
|
contentRoot: n,
|
|
7511
7542
|
chunks: [t]
|
|
7512
|
-
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ?
|
|
7543
|
+
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Pd({
|
|
7513
7544
|
chunks: [i],
|
|
7514
7545
|
mathTokenHighlighting: o
|
|
7515
7546
|
}) : null;
|
|
@@ -7545,9 +7576,13 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7545
7576
|
}
|
|
7546
7577
|
async executeSpeakPlayback(t) {
|
|
7547
7578
|
if (t.speechChunks?.length && this.provider) {
|
|
7548
|
-
for (
|
|
7579
|
+
for (let r = 0; r < t.speechChunks.length; r++) {
|
|
7549
7580
|
if (t.runId !== this.speakRunId) return;
|
|
7550
|
-
|
|
7581
|
+
this.currentSeekSegmentIndex = r;
|
|
7582
|
+
const n = this.seekSegments[r];
|
|
7583
|
+
n && (this.currentBoundaryOffset = n.startOffset);
|
|
7584
|
+
const i = t.speechChunks[r];
|
|
7585
|
+
await this.speakCatalogChunk(i, t.runId);
|
|
7551
7586
|
}
|
|
7552
7587
|
return;
|
|
7553
7588
|
}
|
|
@@ -7559,7 +7594,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7559
7594
|
this.provider && await this.provider.speak(t.contentToSpeak);
|
|
7560
7595
|
}
|
|
7561
7596
|
clearHighlightsAndTracking() {
|
|
7562
|
-
this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7597
|
+
this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
|
|
7563
7598
|
}
|
|
7564
7599
|
async speakRange(t, r) {
|
|
7565
7600
|
if (!this.provider) throw new Error("TTS service not initialized");
|
|
@@ -7573,7 +7608,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7573
7608
|
if (!i) return;
|
|
7574
7609
|
const o = document.createRange();
|
|
7575
7610
|
o.selectNodeContents(i), o.setEnd(t.startContainer, t.startOffset);
|
|
7576
|
-
const s = o.toString(), a =
|
|
7611
|
+
const s = o.toString(), a = V(s), l = a.length + (/\s$/.test(s) && a ? 1 : 0);
|
|
7577
7612
|
this.debugLog("[TTSService] speakRange offset calculation:", {
|
|
7578
7613
|
selectedText: n,
|
|
7579
7614
|
textBeforeRange: s.substring(0, 100),
|
|
@@ -7596,19 +7631,27 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7596
7631
|
}
|
|
7597
7632
|
async restartFromSeekIndex(t) {
|
|
7598
7633
|
if (!this.provider || this.seekSegments.length === 0) return;
|
|
7599
|
-
const r = Math.max(0, Math.min(this.seekSegments.length - 1, t));
|
|
7634
|
+
const r = Math.max(0, Math.min(this.seekSegments.length - 1, t)), n = this.playbackChunks.length ? this.playbackChunks.slice(r) : null;
|
|
7600
7635
|
this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = r;
|
|
7601
|
-
const
|
|
7636
|
+
const i = ++this.speakRunId, o = this.seekSegments.slice(r);
|
|
7602
7637
|
this.setState(H.PLAYING);
|
|
7603
7638
|
try {
|
|
7604
7639
|
if (this.configureWordBoundaryHighlighting({
|
|
7605
7640
|
highlightMode: this.activeHighlightMode,
|
|
7606
7641
|
wordBoundaryOffset: this.activeWordBoundaryOffset
|
|
7607
|
-
}),
|
|
7642
|
+
}), n) for (let s = 0; s < n.length; s++) {
|
|
7643
|
+
if (i !== this.speakRunId) return;
|
|
7644
|
+
const a = r + s;
|
|
7645
|
+
this.currentSeekSegmentIndex = a;
|
|
7646
|
+
const l = this.seekSegments[a];
|
|
7647
|
+
l && (this.currentBoundaryOffset = l.startOffset), await this.speakCatalogChunk(n[s], i);
|
|
7648
|
+
}
|
|
7649
|
+
else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
|
|
7650
|
+
if (i !== this.speakRunId) return;
|
|
7608
7651
|
this.setState(H.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
|
|
7609
|
-
} catch (
|
|
7610
|
-
if (
|
|
7611
|
-
throw this.lastError =
|
|
7652
|
+
} catch (s) {
|
|
7653
|
+
if (i !== this.speakRunId) return;
|
|
7654
|
+
throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(H.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
|
|
7612
7655
|
}
|
|
7613
7656
|
}
|
|
7614
7657
|
async setPlaybackRate(t) {
|
|
@@ -7631,10 +7674,10 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7631
7674
|
await this.seekBy(-r);
|
|
7632
7675
|
}
|
|
7633
7676
|
stop() {
|
|
7634
|
-
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(H.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7677
|
+
this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(H.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
|
|
7635
7678
|
}
|
|
7636
7679
|
requestControlHandoff() {
|
|
7637
|
-
typeof window > "u" || window.dispatchEvent(new CustomEvent(
|
|
7680
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent(qd, { detail: { source: "host" } }));
|
|
7638
7681
|
}
|
|
7639
7682
|
isPlaying() {
|
|
7640
7683
|
return this.state === H.PLAYING;
|
|
@@ -7705,7 +7748,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7705
7748
|
});
|
|
7706
7749
|
}
|
|
7707
7750
|
};
|
|
7708
|
-
y(
|
|
7751
|
+
y(Gd, "debugEnabled", (() => {
|
|
7709
7752
|
try {
|
|
7710
7753
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7711
7754
|
} catch {
|
|
@@ -7723,7 +7766,7 @@ var Af = eu({
|
|
|
7723
7766
|
passage: []
|
|
7724
7767
|
},
|
|
7725
7768
|
providers: {}
|
|
7726
|
-
}),
|
|
7769
|
+
}), Yd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), Kd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Xd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), Jd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), Qd = /* @__PURE__ */ Ps('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), Zd = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), ef = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), tf = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), rf = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), nf = /* @__PURE__ */ Oe('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), of = /* @__PURE__ */ Oe('<circle r="2" role="button" tabindex="0"></circle>'), sf = /* @__PURE__ */ Oe('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), af = /* @__PURE__ */ Ps('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'), lf = {
|
|
7727
7770
|
hash: "svelte-7afz7f",
|
|
7728
7771
|
code: `.pie-tool-graph.svelte-7afz7f {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
|
|
7729
7772
|
|
|
@@ -7735,11 +7778,11 @@ var Af = eu({
|
|
|
7735
7778
|
|
|
7736
7779
|
/* User drawing styles */.pie-tool-graph__user-point.svelte-7afz7f {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-7afz7f {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-7afz7f {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-7afz7f {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`
|
|
7737
7780
|
};
|
|
7738
|
-
function
|
|
7739
|
-
qo(t, !0),
|
|
7740
|
-
let r =
|
|
7781
|
+
function cf(e, t) {
|
|
7782
|
+
qo(t, !0), Ec(e, lf);
|
|
7783
|
+
let r = ho(t, "visible", 7, !1), n = ho(t, "toolId", 7, "graph"), i = /* @__PURE__ */ G(void 0), o = /* @__PURE__ */ G(void 0), s = /* @__PURE__ */ G(void 0), a = /* @__PURE__ */ G("selector"), l = /* @__PURE__ */ G(ct([])), c = /* @__PURE__ */ G(ct([])), u = /* @__PURE__ */ G(1), h = /* @__PURE__ */ G(1), d = /* @__PURE__ */ G(null), p = /* @__PURE__ */ G(null), v = /* @__PURE__ */ G(null);
|
|
7741
7784
|
const b = 5, m = 5, _ = 100 / b, N = _ / m;
|
|
7742
|
-
let B = /* @__PURE__ */
|
|
7785
|
+
let B = /* @__PURE__ */ G(0), S = /* @__PURE__ */ G(0), F = /* @__PURE__ */ er(() => {
|
|
7743
7786
|
if (g(S) <= 0 || g(B) <= 0) return 100;
|
|
7744
7787
|
const T = g(S) / 100, w = g(B) / T;
|
|
7745
7788
|
return Math.max(100, w);
|
|
@@ -7770,7 +7813,7 @@ function hf(e, t) {
|
|
|
7770
7813
|
title: "Delete: Click on a point to delete it and any connected lines."
|
|
7771
7814
|
}
|
|
7772
7815
|
];
|
|
7773
|
-
|
|
7816
|
+
eo(() => {
|
|
7774
7817
|
if (g(o))
|
|
7775
7818
|
return Gc(g(o), () => {
|
|
7776
7819
|
});
|
|
@@ -7807,10 +7850,10 @@ function hf(e, t) {
|
|
|
7807
7850
|
}
|
|
7808
7851
|
return z;
|
|
7809
7852
|
}
|
|
7810
|
-
function
|
|
7853
|
+
function mn(T) {
|
|
7811
7854
|
return T === g(d) || T === g(p);
|
|
7812
7855
|
}
|
|
7813
|
-
function
|
|
7856
|
+
function yn(T) {
|
|
7814
7857
|
if (g(a) === "delete") {
|
|
7815
7858
|
A(l, g(l).filter((w) => w.id !== T), !0), A(c, g(c).filter((w) => w.p1Id !== T && w.p2Id !== T), !0);
|
|
7816
7859
|
return;
|
|
@@ -7852,7 +7895,7 @@ function hf(e, t) {
|
|
|
7852
7895
|
function Ra(T) {
|
|
7853
7896
|
A(a, T, !0), A(d, null), A(p, null), A(v, null);
|
|
7854
7897
|
}
|
|
7855
|
-
function
|
|
7898
|
+
function Pi(T) {
|
|
7856
7899
|
const w = et(T);
|
|
7857
7900
|
if (!w) return;
|
|
7858
7901
|
const D = X(w, N);
|
|
@@ -7895,11 +7938,11 @@ function hf(e, t) {
|
|
|
7895
7938
|
D && (D.x = w.x, D.y = w.y, A(l, g(l), !0));
|
|
7896
7939
|
}
|
|
7897
7940
|
}
|
|
7898
|
-
function
|
|
7941
|
+
function Ni(T) {
|
|
7899
7942
|
g(p) !== null && (T.target?.hasPointerCapture(T.pointerId) && T.target.releasePointerCapture(T.pointerId), A(p, null)), (g(a) !== "line" || g(d) === null) && A(v, null);
|
|
7900
7943
|
}
|
|
7901
7944
|
let Qt = null;
|
|
7902
|
-
|
|
7945
|
+
eo(() => {
|
|
7903
7946
|
if (g(i))
|
|
7904
7947
|
return Qt || (Qt = new ResizeObserver((T) => {
|
|
7905
7948
|
const { width: w, height: D } = T[0].contentRect;
|
|
@@ -7913,75 +7956,75 @@ function hf(e, t) {
|
|
|
7913
7956
|
return r();
|
|
7914
7957
|
},
|
|
7915
7958
|
set visible(T = !1) {
|
|
7916
|
-
r(T),
|
|
7959
|
+
r(T), Kr();
|
|
7917
7960
|
},
|
|
7918
7961
|
get toolId() {
|
|
7919
7962
|
return n();
|
|
7920
7963
|
},
|
|
7921
7964
|
set toolId(T = "graph") {
|
|
7922
|
-
n(T),
|
|
7965
|
+
n(T), Kr();
|
|
7923
7966
|
}
|
|
7924
|
-
},
|
|
7925
|
-
var w =
|
|
7967
|
+
}, zi = wn(), Na = Sn(zi), za = (T) => {
|
|
7968
|
+
var w = af(), D = Fe(w), z = Fe(D);
|
|
7926
7969
|
gt(z, 21, () => j, (R) => R.name, (R, I) => {
|
|
7927
|
-
var C =
|
|
7970
|
+
var C = Qd();
|
|
7928
7971
|
let we;
|
|
7929
7972
|
var Z = Fe(C), ut = Fe(Z), De = (he) => {
|
|
7930
|
-
var dt =
|
|
7973
|
+
var dt = Yd();
|
|
7931
7974
|
ee(he, dt);
|
|
7932
7975
|
}, Zt = (he) => {
|
|
7933
|
-
var dt =
|
|
7976
|
+
var dt = Kd();
|
|
7934
7977
|
ee(he, dt);
|
|
7935
7978
|
}, ht = (he) => {
|
|
7936
|
-
var dt =
|
|
7979
|
+
var dt = Xd();
|
|
7937
7980
|
ee(he, dt);
|
|
7938
7981
|
}, Da = (he) => {
|
|
7939
|
-
var dt =
|
|
7982
|
+
var dt = Jd();
|
|
7940
7983
|
ee(he, dt);
|
|
7941
7984
|
};
|
|
7942
7985
|
rr(ut, (he) => {
|
|
7943
7986
|
g(I).name === "selector" ? he(De) : g(I).name === "point" ? he(Zt, 1) : g(I).name === "line" ? he(ht, 2) : g(I).name === "delete" && he(Da, 3);
|
|
7944
7987
|
}), de(Z);
|
|
7945
|
-
var
|
|
7946
|
-
de(
|
|
7947
|
-
we =
|
|
7988
|
+
var Di = Re(Z, 2), Fa = Fe(Di, !0);
|
|
7989
|
+
de(Di), de(C), je(() => {
|
|
7990
|
+
we = lo(C, 1, "pie-tool-graph__tool-button svelte-7afz7f", null, we, { "pie-tool-graph__tool-button--active": g(a) === g(I).name }), W(C, "title", g(I).title), W(C, "aria-label", g(I).title), W(C, "aria-pressed", g(a) === g(I).name), bc(Fa, g(I).label);
|
|
7948
7991
|
}), pt("click", C, () => Ra(g(I).name)), ee(R, C);
|
|
7949
7992
|
}), de(z);
|
|
7950
7993
|
var re = Re(z, 2), Y = Re(Fe(re), 2);
|
|
7951
7994
|
$c(Y), de(re), de(D);
|
|
7952
|
-
var tt = Re(D, 2), Ie = Fe(tt), rt = Fe(Ie),
|
|
7953
|
-
gt(
|
|
7954
|
-
var C =
|
|
7995
|
+
var tt = Re(D, 2), Ie = Fe(tt), rt = Fe(Ie), Wi = Fe(rt);
|
|
7996
|
+
gt(Wi, 17, () => g(Sr).minorHorizontal, Ar, (R, I) => {
|
|
7997
|
+
var C = Zd();
|
|
7955
7998
|
je(() => {
|
|
7956
7999
|
W(C, "y1", g(I)), W(C, "x2", g(F)), W(C, "y2", g(I));
|
|
7957
8000
|
}), ee(R, C);
|
|
7958
8001
|
});
|
|
7959
|
-
var
|
|
7960
|
-
gt(
|
|
7961
|
-
var C =
|
|
8002
|
+
var Hi = Re(Wi);
|
|
8003
|
+
gt(Hi, 17, () => g(Sr).majorHorizontal, Ar, (R, I) => {
|
|
8004
|
+
var C = ef();
|
|
7962
8005
|
je(() => {
|
|
7963
8006
|
W(C, "y1", g(I)), W(C, "x2", g(F)), W(C, "y2", g(I));
|
|
7964
8007
|
}), ee(R, C);
|
|
7965
8008
|
});
|
|
7966
|
-
var
|
|
7967
|
-
gt(
|
|
7968
|
-
var C =
|
|
8009
|
+
var Bi = Re(Hi);
|
|
8010
|
+
gt(Bi, 17, () => g(Sr).minorVertical, Ar, (R, I) => {
|
|
8011
|
+
var C = tf();
|
|
7969
8012
|
je(() => {
|
|
7970
8013
|
W(C, "x1", g(I)), W(C, "x2", g(I));
|
|
7971
8014
|
}), ee(R, C);
|
|
7972
8015
|
});
|
|
7973
|
-
var Wa = Re(
|
|
8016
|
+
var Wa = Re(Bi);
|
|
7974
8017
|
gt(Wa, 17, () => g(Sr).majorVertical, Ar, (R, I) => {
|
|
7975
|
-
var C =
|
|
8018
|
+
var C = rf();
|
|
7976
8019
|
je(() => {
|
|
7977
8020
|
W(C, "x1", g(I)), W(C, "x2", g(I));
|
|
7978
8021
|
}), ee(R, C);
|
|
7979
8022
|
}), de(rt);
|
|
7980
|
-
var
|
|
7981
|
-
gt(
|
|
8023
|
+
var bn = Re(rt);
|
|
8024
|
+
gt(bn, 21, () => g(c), (R) => R.id, (R, I) => {
|
|
7982
8025
|
const C = /* @__PURE__ */ er(() => te(g(I).p1Id)), we = /* @__PURE__ */ er(() => te(g(I).p2Id));
|
|
7983
|
-
var Z =
|
|
7984
|
-
var ht =
|
|
8026
|
+
var Z = wn(), ut = Sn(Z), De = (Zt) => {
|
|
8027
|
+
var ht = nf();
|
|
7985
8028
|
je(() => {
|
|
7986
8029
|
W(ht, "x1", g(C).x), W(ht, "y1", g(C).y), W(ht, "x2", g(we).x), W(ht, "y2", g(we).y);
|
|
7987
8030
|
}), ee(Zt, ht);
|
|
@@ -7989,23 +8032,23 @@ function hf(e, t) {
|
|
|
7989
8032
|
rr(ut, (Zt) => {
|
|
7990
8033
|
g(C) && g(we) && Zt(De);
|
|
7991
8034
|
}), ee(R, Z);
|
|
7992
|
-
}), de(
|
|
7993
|
-
var
|
|
7994
|
-
gt(
|
|
7995
|
-
var C =
|
|
8035
|
+
}), de(bn);
|
|
8036
|
+
var _n = Re(bn);
|
|
8037
|
+
gt(_n, 21, () => g(l), (R) => R.id, (R, I) => {
|
|
8038
|
+
var C = of();
|
|
7996
8039
|
let we;
|
|
7997
8040
|
je((Z) => {
|
|
7998
|
-
W(C, "cx", g(I).x), W(C, "cy", g(I).y), we =
|
|
7999
|
-
}, [() => ({ "pie-tool-graph__user-point--highlight":
|
|
8041
|
+
W(C, "cx", g(I).x), W(C, "cy", g(I).y), we = lo(C, 0, "pie-tool-graph__user-point svelte-7afz7f", null, we, Z), W(C, "data-id", g(I).id), W(C, "aria-label", `Graph point ${g(I).id ?? ""}`);
|
|
8042
|
+
}, [() => ({ "pie-tool-graph__user-point--highlight": mn(g(I).id) })]), pt("pointerdown", C, (Z) => {
|
|
8000
8043
|
Z.stopPropagation(), $a(g(I).id, Z);
|
|
8001
8044
|
}), pt("keydown", C, (Z) => {
|
|
8002
|
-
(Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(),
|
|
8045
|
+
(Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), yn(g(I).id));
|
|
8003
8046
|
}), ee(R, C);
|
|
8004
|
-
}), de(
|
|
8005
|
-
var Ha = Re(
|
|
8047
|
+
}), de(_n);
|
|
8048
|
+
var Ha = Re(_n), Ba = (R) => {
|
|
8006
8049
|
const I = /* @__PURE__ */ er(() => te(g(d)));
|
|
8007
|
-
var C =
|
|
8008
|
-
var De =
|
|
8050
|
+
var C = wn(), we = Sn(C), Z = (ut) => {
|
|
8051
|
+
var De = sf();
|
|
8009
8052
|
je(() => {
|
|
8010
8053
|
W(De, "x1", g(I).x), W(De, "y1", g(I).y), W(De, "x2", g(v).x), W(De, "y2", g(v).y);
|
|
8011
8054
|
}), ee(ut, De);
|
|
@@ -8016,15 +8059,15 @@ function hf(e, t) {
|
|
|
8016
8059
|
};
|
|
8017
8060
|
rr(Ha, (R) => {
|
|
8018
8061
|
g(d) && g(v) && R(Ba);
|
|
8019
|
-
}), de(Ie),
|
|
8062
|
+
}), de(Ie), Rn(Ie, (R) => A(s, R), () => g(s)), de(tt), Rn(tt, (R) => A(i, R), () => g(i)), de(w), Rn(w, (R) => A(o, R), () => g(o)), je(() => {
|
|
8020
8063
|
W(w, "data-tool-id", n()), W(Ie, "viewBox", `0 0 ${g(F) ?? ""} 100`), Mc(rt, `opacity: ${g(h) ?? ""}`);
|
|
8021
|
-
}), Nc(Y, () => g(h), (R) => A(h, R)), pt("click", tt,
|
|
8022
|
-
(R.key === "Enter" || R.key === " ") && (R.preventDefault(),
|
|
8023
|
-
}), pt("pointermove", Ie, La), pt("pointerup", Ie,
|
|
8064
|
+
}), Nc(Y, () => g(h), (R) => A(h, R)), pt("click", tt, Pi), pt("keydown", tt, (R) => {
|
|
8065
|
+
(R.key === "Enter" || R.key === " ") && (R.preventDefault(), Pi(R));
|
|
8066
|
+
}), pt("pointermove", Ie, La), pt("pointerup", Ie, Ni), uc("pointerleave", Ie, Ni), ee(T, w);
|
|
8024
8067
|
};
|
|
8025
8068
|
return rr(Na, (T) => {
|
|
8026
8069
|
r() && T(za);
|
|
8027
|
-
}), ee(e,
|
|
8070
|
+
}), ee(e, zi), Uo(Pa);
|
|
8028
8071
|
}
|
|
8029
8072
|
hc([
|
|
8030
8073
|
"click",
|
|
@@ -8033,7 +8076,7 @@ hc([
|
|
|
8033
8076
|
"pointerup",
|
|
8034
8077
|
"pointerdown"
|
|
8035
8078
|
]);
|
|
8036
|
-
customElements.define("pie-tool-graph", Dc(
|
|
8079
|
+
customElements.define("pie-tool-graph", Dc(cf, {
|
|
8037
8080
|
visible: {
|
|
8038
8081
|
attribute: "visible",
|
|
8039
8082
|
type: "Boolean"
|
|
@@ -8044,7 +8087,7 @@ customElements.define("pie-tool-graph", Dc(hf, {
|
|
|
8044
8087
|
}
|
|
8045
8088
|
}, [], [], { mode: "open" }));
|
|
8046
8089
|
export {
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8090
|
+
cf as default,
|
|
8091
|
+
df as n,
|
|
8092
|
+
hf as t
|
|
8050
8093
|
};
|