@pie-players/pie-tool-theme 0.3.55 → 0.3.56
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-color-scheme.js +382 -367
- package/package.json +5 -5
|
@@ -24,7 +24,7 @@ var ba = Array.isArray, Hc = Array.prototype.indexOf, zn = Array.prototype.inclu
|
|
|
24
24
|
function jc(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Ta() {
|
|
28
28
|
var e, t;
|
|
29
29
|
return {
|
|
30
30
|
promise: new Promise((r, n) => {
|
|
@@ -34,7 +34,7 @@ function _a() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var Bg = 1 << 24, Pe = 1024, We = 2048, nr = 4096, Eo = 8192, qc = 16384,
|
|
37
|
+
var Bg = 1 << 24, Pe = 1024, We = 2048, nr = 4096, Eo = 8192, qc = 16384, Ao = 32768, ps = 1 << 25, xo = 65536, Ug = 1 << 17, jg = 1 << 18, Pr = 1 << 19, Vc = 1 << 20, tn = 1 << 25, cn = 65536, gs = 1 << 21, Gc = 1 << 22, Un = 1 << 23, rn = /* @__PURE__ */ Symbol("$state"), _a = /* @__PURE__ */ Symbol("legacy props"), Yc = /* @__PURE__ */ Symbol(""), Kc = /* @__PURE__ */ Symbol("proxy path"), Bi = /* @__PURE__ */ Symbol("attributes"), Ui = /* @__PURE__ */ Symbol("class"), ji = /* @__PURE__ */ Symbol("style"), In = /* @__PURE__ */ Symbol("text");
|
|
38
38
|
var oi = new class extends Error {
|
|
39
39
|
constructor(...t) {
|
|
40
40
|
super(...t), m(this, "name", "StaleReactionError"), m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
@@ -93,13 +93,13 @@ function dt(e) {
|
|
|
93
93
|
W = e;
|
|
94
94
|
}
|
|
95
95
|
var D;
|
|
96
|
-
function
|
|
96
|
+
function _e(e) {
|
|
97
97
|
if (e === null)
|
|
98
98
|
throw si(), Cr;
|
|
99
99
|
return D = e;
|
|
100
100
|
}
|
|
101
101
|
function ai() {
|
|
102
|
-
return
|
|
102
|
+
return _e(/* @__PURE__ */ tt(D));
|
|
103
103
|
}
|
|
104
104
|
function ce(e) {
|
|
105
105
|
if (W) {
|
|
@@ -152,7 +152,7 @@ var q = null;
|
|
|
152
152
|
function Or(e) {
|
|
153
153
|
q = e;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Aa(e, t = !1, r) {
|
|
156
156
|
q = {
|
|
157
157
|
p: q,
|
|
158
158
|
i: !1,
|
|
@@ -168,7 +168,7 @@ function xa(e, t = !1, r) {
|
|
|
168
168
|
} : null
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function xa(e) {
|
|
172
172
|
var t = q, r = t.e;
|
|
173
173
|
if (r !== null) {
|
|
174
174
|
t.e = null;
|
|
@@ -262,10 +262,10 @@ function C(e, t, r) {
|
|
|
262
262
|
function p(e, t) {
|
|
263
263
|
return e.get(L(e, t));
|
|
264
264
|
}
|
|
265
|
-
var La, qn = null, yr = null, P = null, qi = null, pe = null, Vi = null, nn = !1,
|
|
266
|
-
var bu = 1, Gn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(),
|
|
265
|
+
var La, qn = null, yr = null, P = null, qi = null, pe = null, Vi = null, nn = !1, Ti = !1, Mr = null, Vn = null, Pa = 0;
|
|
266
|
+
var bu = 1, Gn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Rn = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), ir = class Na {
|
|
267
267
|
constructor() {
|
|
268
|
-
Oo(this, X), m(this, "id", bu++), O(this, Gn, !1), m(this, "linked", !0), O(this, qt, null), O(this, Ft, null), m(this, "async_deriveds", /* @__PURE__ */ new Map()), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), O(this, Yn, /* @__PURE__ */ new Set()), O(this, wn, /* @__PURE__ */ new Set()), O(this,
|
|
268
|
+
Oo(this, X), m(this, "id", bu++), O(this, Gn, !1), m(this, "linked", !0), O(this, qt, null), O(this, Ft, null), m(this, "async_deriveds", /* @__PURE__ */ new Map()), m(this, "current", /* @__PURE__ */ new Map()), m(this, "previous", /* @__PURE__ */ new Map()), O(this, Yn, /* @__PURE__ */ new Set()), O(this, wn, /* @__PURE__ */ new Set()), O(this, Tr, 0), O(this, Ht, /* @__PURE__ */ new Map()), O(this, Yr, null), O(this, Me, []), O(this, Gi, []), O(this, Zt, /* @__PURE__ */ new Set()), O(this, ht, /* @__PURE__ */ new Set()), O(this, It, /* @__PURE__ */ new Map()), O(this, Rn, /* @__PURE__ */ new Set()), m(this, "is_fork", !1), O(this, Kr, !1), yr === null ? qn = yr = this : (C(Ft, yr, this), C(qt, this, yr)), yr = this;
|
|
269
269
|
}
|
|
270
270
|
skip_effect(t) {
|
|
271
271
|
p(It, this).has(t) || p(It, this).set(t, {
|
|
@@ -295,9 +295,9 @@ var bu = 1, Gn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
295
295
|
}
|
|
296
296
|
flush() {
|
|
297
297
|
try {
|
|
298
|
-
|
|
298
|
+
Ti = !0, P = this, L(X, this, Kn).call(this);
|
|
299
299
|
} finally {
|
|
300
|
-
Pa = 0, Vi = null, Mr = null, Vn = null,
|
|
300
|
+
Pa = 0, Vi = null, Mr = null, Vn = null, Ti = !1, P = null, pe = null, Yt.clear();
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
discard() {
|
|
@@ -308,13 +308,13 @@ var bu = 1, Gn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
308
308
|
p(Gi, this).push(t);
|
|
309
309
|
}
|
|
310
310
|
increment(t, r) {
|
|
311
|
-
if (C(
|
|
311
|
+
if (C(Tr, this, p(Tr, this) + 1), t) {
|
|
312
312
|
let n = p(Ht, this).get(r) ?? 0;
|
|
313
313
|
p(Ht, this).set(r, n + 1);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
decrement(t, r) {
|
|
317
|
-
if (C(
|
|
317
|
+
if (C(Tr, this, p(Tr, this) - 1), t) {
|
|
318
318
|
let n = p(Ht, this).get(r) ?? 0;
|
|
319
319
|
n === 1 ? p(Ht, this).delete(r) : p(Ht, this).set(r, n - 1);
|
|
320
320
|
}
|
|
@@ -334,12 +334,12 @@ var bu = 1, Gn = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap
|
|
|
334
334
|
p(wn, this).add(t);
|
|
335
335
|
}
|
|
336
336
|
settled() {
|
|
337
|
-
return (p(Yr, this) ?? C(Yr, this,
|
|
337
|
+
return (p(Yr, this) ?? C(Yr, this, Ta())).promise;
|
|
338
338
|
}
|
|
339
339
|
static ensure() {
|
|
340
340
|
if (P === null) {
|
|
341
341
|
const t = P = new Na();
|
|
342
|
-
!
|
|
342
|
+
!Ti && !nn && Qt(() => {
|
|
343
343
|
p(Gn, t) || t.flush();
|
|
344
344
|
});
|
|
345
345
|
}
|
|
@@ -425,14 +425,14 @@ function Kn() {
|
|
|
425
425
|
}
|
|
426
426
|
const o = L(X, this, yu).call(this);
|
|
427
427
|
if (o) {
|
|
428
|
-
L(X, this, Xr).call(this, r), L(X, this, Xr).call(this, t), L(X, o,
|
|
428
|
+
L(X, this, Xr).call(this, r), L(X, this, Xr).call(this, t), L(X, o, Tu).call(o, this);
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
431
|
p(Zt, this).clear(), p(ht, this).clear();
|
|
432
432
|
for (const a of p(Yn, this)) a(this);
|
|
433
433
|
p(Yn, this).clear(), qi = this, bs(r), bs(t), qi = null, p(Yr, this)?.resolve();
|
|
434
434
|
var s = P;
|
|
435
|
-
if (p(
|
|
435
|
+
if (p(Tr, this) === 0 && (p(Me, this).length === 0 || s !== null) && (L(X, this, Xn).call(this), gt && (L(X, this, _u).call(this), P = s)), p(Me, this).length > 0) if (s !== null) {
|
|
436
436
|
const a = s;
|
|
437
437
|
p(Me, a).push(...p(Me, this).filter((l) => !p(Me, a).includes(l)));
|
|
438
438
|
} else s = this;
|
|
@@ -469,7 +469,7 @@ function yu() {
|
|
|
469
469
|
}
|
|
470
470
|
return null;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Tu(e) {
|
|
473
473
|
for (const [r, n] of e.current)
|
|
474
474
|
!this.previous.has(r) && e.previous.has(r) && this.previous.set(r, e.previous.get(r)), this.current.set(r, n);
|
|
475
475
|
for (const [r, n] of e.async_deriveds) {
|
|
@@ -495,7 +495,7 @@ function _u(e) {
|
|
|
495
495
|
function Xr(e) {
|
|
496
496
|
for (var t = 0; t < e.length; t += 1) Ia(e[t], p(Zt, this), p(ht, this));
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function _u() {
|
|
499
499
|
for (let c = qn; c !== null; c = p(Ft, c)) {
|
|
500
500
|
var e = c.id < this.id, t = [];
|
|
501
501
|
for (const [u, [f, h]] of this.current) {
|
|
@@ -636,13 +636,13 @@ function wu(e) {
|
|
|
636
636
|
})));
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
var ku =
|
|
639
|
+
var ku = xo | Pr;
|
|
640
640
|
function Eu(e, t, r, n) {
|
|
641
|
-
new
|
|
641
|
+
new Au(e, t, r, n);
|
|
642
642
|
}
|
|
643
|
-
var je = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(),
|
|
643
|
+
var je = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), _r = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), ys = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakSet(), Au = class {
|
|
644
644
|
constructor(e, t, r, n) {
|
|
645
|
-
Oo(this, ue), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), O(this, je, void 0), O(this, Yi, W ? D : null), O(this, Qe, void 0), O(this, sn, void 0), O(this, Ie, void 0), O(this, Ze, null), O(this, Ee, null), O(this, Be, null), O(this, Vt, null), O(this,
|
|
645
|
+
Oo(this, ue), m(this, "parent", void 0), m(this, "is_pending", !1), m(this, "transform_error", void 0), O(this, je, void 0), O(this, Yi, W ? D : null), O(this, Qe, void 0), O(this, sn, void 0), O(this, Ie, void 0), O(this, Ze, null), O(this, Ee, null), O(this, Be, null), O(this, Vt, null), O(this, _r, 0), O(this, Gt, 0), O(this, kn, !1), O(this, Ki, /* @__PURE__ */ new Set()), O(this, Xi, /* @__PURE__ */ new Set()), O(this, Dt, null), O(this, ys, wu(() => (C(Dt, this, er(p(_r, this))), () => {
|
|
646
646
|
C(Dt, this, null);
|
|
647
647
|
}))), C(je, this, e), C(Qe, this, t), C(sn, this, (i) => {
|
|
648
648
|
var o = M;
|
|
@@ -655,7 +655,7 @@ var je = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Qe =
|
|
|
655
655
|
if (i.data.startsWith("[?")) {
|
|
656
656
|
const s = JSON.parse(i.data.slice(2));
|
|
657
657
|
L(ue, this, Cu).call(this, s);
|
|
658
|
-
} else o ? L(ue, this, Ou).call(this) : L(ue, this,
|
|
658
|
+
} else o ? L(ue, this, Ou).call(this) : L(ue, this, xu).call(this);
|
|
659
659
|
} else L(ue, this, za).call(this);
|
|
660
660
|
}, ku)), W && C(je, this, D);
|
|
661
661
|
}
|
|
@@ -669,8 +669,8 @@ var je = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Qe =
|
|
|
669
669
|
return !!p(Qe, this).pending;
|
|
670
670
|
}
|
|
671
671
|
update_pending_count(e, t) {
|
|
672
|
-
L(ue, this, Fa).call(this, e, t), C(
|
|
673
|
-
C(kn, this, !1), p(Dt, this) && Ir(p(Dt, this), p(
|
|
672
|
+
L(ue, this, Fa).call(this, e, t), C(_r, this, p(_r, this) + e), !(!p(Dt, this) || p(kn, this)) && (C(kn, this, !0), Qt(() => {
|
|
673
|
+
C(kn, this, !1), p(Dt, this) && Ir(p(Dt, this), p(_r, this));
|
|
674
674
|
}));
|
|
675
675
|
}
|
|
676
676
|
get_effect_pending() {
|
|
@@ -679,11 +679,11 @@ var je = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Qe =
|
|
|
679
679
|
error(e) {
|
|
680
680
|
if (!p(Qe, this).onerror && !p(Qe, this).failed) throw e;
|
|
681
681
|
P?.is_fork ? (p(Ze, this) && P.skip_effect(p(Ze, this)), p(Ee, this) && P.skip_effect(p(Ee, this)), p(Be, this) && P.skip_effect(p(Be, this)), P.oncommit(() => {
|
|
682
|
-
L(ue, this,
|
|
683
|
-
})) : L(ue, this,
|
|
682
|
+
L(ue, this, Ts).call(this, e);
|
|
683
|
+
})) : L(ue, this, Ts).call(this, e);
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
|
-
function
|
|
686
|
+
function xu() {
|
|
687
687
|
try {
|
|
688
688
|
C(Ze, this, Ne(() => p(sn, this).call(this, p(je, this))));
|
|
689
689
|
} catch (e) {
|
|
@@ -708,7 +708,7 @@ function Ou() {
|
|
|
708
708
|
}
|
|
709
709
|
function za() {
|
|
710
710
|
try {
|
|
711
|
-
if (this.is_pending = this.has_pending_snippet(), C(Gt, this, 0), C(
|
|
711
|
+
if (this.is_pending = this.has_pending_snippet(), C(Gt, this, 0), C(_r, this, 0), C(Ze, this, Ne(() => {
|
|
712
712
|
p(sn, this).call(this, p(je, this));
|
|
713
713
|
})), p(Gt, this) > 0) {
|
|
714
714
|
var e = C(Vt, this, document.createDocumentFragment());
|
|
@@ -746,8 +746,8 @@ function Fa(e, t) {
|
|
|
746
746
|
C(Ee, this, null);
|
|
747
747
|
}), p(Vt, this) && (p(je, this).before(p(Vt, this)), C(Vt, this, null)));
|
|
748
748
|
}
|
|
749
|
-
function
|
|
750
|
-
p(Ze, this) && (ge(p(Ze, this)), C(Ze, this, null)), p(Ee, this) && (ge(p(Ee, this)), C(Ee, this, null)), p(Be, this) && (ge(p(Be, this)), C(Be, this, null)), W && (
|
|
749
|
+
function Ts(e) {
|
|
750
|
+
p(Ze, this) && (ge(p(Ze, this)), C(Ze, this, null)), p(Ee, this) && (ge(p(Ee, this)), C(Ee, this, null)), p(Be, this) && (ge(p(Be, this)), C(Be, this, null)), W && (_e(p(Yi, this)), Sa(), _e(jn()));
|
|
751
751
|
var t = p(Qe, this).onerror;
|
|
752
752
|
let r = p(Qe, this).failed;
|
|
753
753
|
var n = !1, i = !1;
|
|
@@ -861,7 +861,7 @@ function Ru(e, t, r) {
|
|
|
861
861
|
n === null && Qc();
|
|
862
862
|
var i = void 0, o = er(re), s = !$, a = /* @__PURE__ */ new Set();
|
|
863
863
|
return qu(() => {
|
|
864
|
-
var l = M, c =
|
|
864
|
+
var l = M, c = Ta();
|
|
865
865
|
i = c.promise;
|
|
866
866
|
try {
|
|
867
867
|
Promise.resolve(e()).then(c.resolve, (g) => {
|
|
@@ -894,7 +894,7 @@ function Ru(e, t, r) {
|
|
|
894
894
|
});
|
|
895
895
|
}
|
|
896
896
|
// @__NO_SIDE_EFFECTS__
|
|
897
|
-
function
|
|
897
|
+
function _i(e) {
|
|
898
898
|
const t = /* @__PURE__ */ an(e);
|
|
899
899
|
return gt || sl(t), t;
|
|
900
900
|
}
|
|
@@ -1044,8 +1044,8 @@ function Er(e) {
|
|
|
1044
1044
|
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && su();
|
|
1045
1045
|
var v = r.get(h);
|
|
1046
1046
|
return v === void 0 ? a(() => {
|
|
1047
|
-
var
|
|
1048
|
-
return r.set(h,
|
|
1047
|
+
var T = /* @__PURE__ */ ke(g.value, o);
|
|
1048
|
+
return r.set(h, T), T;
|
|
1049
1049
|
}) : oe(v, g.value, !0), !0;
|
|
1050
1050
|
},
|
|
1051
1051
|
deleteProperty(f, h) {
|
|
@@ -1061,10 +1061,10 @@ function Er(e) {
|
|
|
1061
1061
|
},
|
|
1062
1062
|
get(f, h, g) {
|
|
1063
1063
|
if (h === rn) return e;
|
|
1064
|
-
var v = r.get(h),
|
|
1065
|
-
if (v === void 0 && (!
|
|
1066
|
-
var
|
|
1067
|
-
return
|
|
1064
|
+
var v = r.get(h), T = h in f;
|
|
1065
|
+
if (v === void 0 && (!T || jt(f, h)?.writable) && (v = a(() => {
|
|
1066
|
+
var _ = /* @__PURE__ */ ke(Er(T ? f[h] : re), o);
|
|
1067
|
+
return _;
|
|
1068
1068
|
}), r.set(h, v)), v !== void 0) {
|
|
1069
1069
|
var b = w(v);
|
|
1070
1070
|
return b === re ? void 0 : b;
|
|
@@ -1077,8 +1077,8 @@ function Er(e) {
|
|
|
1077
1077
|
var v = r.get(h);
|
|
1078
1078
|
v && (g.value = w(v));
|
|
1079
1079
|
} else if (g === void 0) {
|
|
1080
|
-
var
|
|
1081
|
-
if (
|
|
1080
|
+
var T = r.get(h), b = T?.v;
|
|
1081
|
+
if (T !== void 0 && b !== re) return {
|
|
1082
1082
|
enumerable: !0,
|
|
1083
1083
|
configurable: !0,
|
|
1084
1084
|
value: b,
|
|
@@ -1091,22 +1091,22 @@ function Er(e) {
|
|
|
1091
1091
|
if (h === rn) return !0;
|
|
1092
1092
|
var g = r.get(h), v = g !== void 0 && g.v !== re || Reflect.has(f, h);
|
|
1093
1093
|
return (g !== void 0 || M !== null && (!v || jt(f, h)?.writable)) && (g === void 0 && (g = a(() => {
|
|
1094
|
-
var
|
|
1095
|
-
return
|
|
1094
|
+
var T = /* @__PURE__ */ ke(v ? Er(f[h]) : re, o);
|
|
1095
|
+
return T;
|
|
1096
1096
|
}), r.set(h, g)), w(g) === re) ? !1 : v;
|
|
1097
1097
|
},
|
|
1098
1098
|
set(f, h, g, v) {
|
|
1099
|
-
var
|
|
1100
|
-
if (n && h === "length") for (var
|
|
1101
|
-
var I = r.get(
|
|
1102
|
-
I !== void 0 ? oe(I, re) :
|
|
1099
|
+
var T = r.get(h), b = h in f;
|
|
1100
|
+
if (n && h === "length") for (var _ = g; _ < T.v; _ += 1) {
|
|
1101
|
+
var I = r.get(_ + "");
|
|
1102
|
+
I !== void 0 ? oe(I, re) : _ in f && (I = a(() => /* @__PURE__ */ ke(re, o)), r.set(_ + "", I));
|
|
1103
1103
|
}
|
|
1104
|
-
if (
|
|
1105
|
-
(!b || jt(f, h)?.writable) && (
|
|
1104
|
+
if (T === void 0)
|
|
1105
|
+
(!b || jt(f, h)?.writable) && (T = a(() => /* @__PURE__ */ ke(void 0, o)), oe(T, Er(g)), r.set(h, T));
|
|
1106
1106
|
else {
|
|
1107
|
-
b =
|
|
1107
|
+
b = T.v !== re;
|
|
1108
1108
|
var N = a(() => Er(g));
|
|
1109
|
-
oe(
|
|
1109
|
+
oe(T, N);
|
|
1110
1110
|
}
|
|
1111
1111
|
var S = Reflect.getOwnPropertyDescriptor(f, h);
|
|
1112
1112
|
if (S?.set && S.set.call(v, g), !b) {
|
|
@@ -1120,8 +1120,8 @@ function Er(e) {
|
|
|
1120
1120
|
},
|
|
1121
1121
|
ownKeys(f) {
|
|
1122
1122
|
w(i);
|
|
1123
|
-
var h = Reflect.ownKeys(f).filter((
|
|
1124
|
-
var b = r.get(
|
|
1123
|
+
var h = Reflect.ownKeys(f).filter((T) => {
|
|
1124
|
+
var b = r.get(T);
|
|
1125
1125
|
return b === void 0 || b.v !== re;
|
|
1126
1126
|
});
|
|
1127
1127
|
for (var [g, v] of r) v.v !== re && !(g in f) && h.push(g);
|
|
@@ -1135,10 +1135,10 @@ function Er(e) {
|
|
|
1135
1135
|
function Du(e, t) {
|
|
1136
1136
|
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : $u.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1137
1137
|
}
|
|
1138
|
-
var
|
|
1138
|
+
var _s, Wu, Ya, Ka, Xa;
|
|
1139
1139
|
function Qi() {
|
|
1140
|
-
if (
|
|
1141
|
-
|
|
1140
|
+
if (_s === void 0) {
|
|
1141
|
+
_s = window, Wu = document, Ya = /Firefox/.test(navigator.userAgent);
|
|
1142
1142
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1143
1143
|
Ka = jt(t, "firstChild").get, Xa = jt(t, "nextSibling").get, hs(e) && (e[Ui] = void 0, e[Bi] = null, e[ji] = void 0, e.__e = void 0), hs(r) && (r[In] = void 0);
|
|
1144
1144
|
}
|
|
@@ -1160,9 +1160,9 @@ function fe(e, t) {
|
|
|
1160
1160
|
if (r === null) r = D.appendChild(Le());
|
|
1161
1161
|
else if (t && r.nodeType !== 3) {
|
|
1162
1162
|
var n = Le();
|
|
1163
|
-
return r?.before(n),
|
|
1163
|
+
return r?.before(n), _e(n), n;
|
|
1164
1164
|
}
|
|
1165
|
-
return t && $o(r),
|
|
1165
|
+
return t && $o(r), _e(r), r;
|
|
1166
1166
|
}
|
|
1167
1167
|
function Hu(e, t = !1) {
|
|
1168
1168
|
if (!W) {
|
|
@@ -1172,7 +1172,7 @@ function Hu(e, t = !1) {
|
|
|
1172
1172
|
if (t) {
|
|
1173
1173
|
if (D?.nodeType !== 3) {
|
|
1174
1174
|
var n = Le();
|
|
1175
|
-
return D?.before(n),
|
|
1175
|
+
return D?.before(n), _e(n), n;
|
|
1176
1176
|
}
|
|
1177
1177
|
$o(D);
|
|
1178
1178
|
}
|
|
@@ -1186,17 +1186,17 @@ function ct(e, t = 1, r = !1) {
|
|
|
1186
1186
|
if (r) {
|
|
1187
1187
|
if (n?.nodeType !== 3) {
|
|
1188
1188
|
var o = Le();
|
|
1189
|
-
return n === null ? i?.after(o) : n.before(o),
|
|
1189
|
+
return n === null ? i?.after(o) : n.before(o), _e(o), o;
|
|
1190
1190
|
}
|
|
1191
1191
|
$o(n);
|
|
1192
1192
|
}
|
|
1193
|
-
return
|
|
1193
|
+
return _e(n), n;
|
|
1194
1194
|
}
|
|
1195
1195
|
function Ja(e) {
|
|
1196
1196
|
e.textContent = "";
|
|
1197
1197
|
}
|
|
1198
1198
|
function Qa() {
|
|
1199
|
-
return !gt || Je !== null ? !1 : (M.f &
|
|
1199
|
+
return !gt || Je !== null ? !1 : (M.f & Ao) !== 0;
|
|
1200
1200
|
}
|
|
1201
1201
|
function No(e, t, r) {
|
|
1202
1202
|
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);
|
|
@@ -1251,7 +1251,7 @@ function rt(e, t) {
|
|
|
1251
1251
|
} catch (s) {
|
|
1252
1252
|
throw ge(n), s;
|
|
1253
1253
|
}
|
|
1254
|
-
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 |=
|
|
1254
|
+
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 |= xo));
|
|
1255
1255
|
}
|
|
1256
1256
|
if (i !== null && (i.parent = r, r !== null && Fu(i, r), $ !== null && ($.f & 2) !== 0 && (e & 64) === 0)) {
|
|
1257
1257
|
var o = $;
|
|
@@ -1427,7 +1427,7 @@ var qe = null;
|
|
|
1427
1427
|
function sl(e) {
|
|
1428
1428
|
$ !== null && (!gt || ($.f & 2) !== 0) && (qe ?? (qe = /* @__PURE__ */ new Set())).add(e);
|
|
1429
1429
|
}
|
|
1430
|
-
var
|
|
1430
|
+
var Te = null, we = 0, Oe = null;
|
|
1431
1431
|
function Ku(e) {
|
|
1432
1432
|
Oe = e;
|
|
1433
1433
|
}
|
|
@@ -1459,23 +1459,23 @@ function cl(e, t, r = !0) {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
function ul(e) {
|
|
1462
|
-
var t =
|
|
1463
|
-
|
|
1462
|
+
var t = Te, r = we, n = Oe, i = $, o = qe, s = q, a = Ue, l = Kt, c = e.f;
|
|
1463
|
+
Te = null, we = 0, Oe = null, $ = (c & 96) === 0 ? e : null, qe = null, Or(e.ctx), Ue = !1, Kt = ++Bt, e.ac !== null && (Za(() => {
|
|
1464
1464
|
e.ac.abort(oi);
|
|
1465
1465
|
}), e.ac = null);
|
|
1466
1466
|
try {
|
|
1467
1467
|
e.f |= gs;
|
|
1468
1468
|
var u = e.fn, f = u();
|
|
1469
|
-
e.f |=
|
|
1469
|
+
e.f |= Ao;
|
|
1470
1470
|
var h = e.deps, g = P?.is_fork;
|
|
1471
|
-
if (
|
|
1471
|
+
if (Te !== null) {
|
|
1472
1472
|
var v;
|
|
1473
1473
|
if (g || ln(e, we), h !== null && we > 0)
|
|
1474
|
-
for (h.length = we +
|
|
1475
|
-
else e.deps = h =
|
|
1474
|
+
for (h.length = we + Te.length, v = 0; v < Te.length; v++) h[we + v] = Te[v];
|
|
1475
|
+
else e.deps = h = Te;
|
|
1476
1476
|
if (Do() && (e.f & 512) !== 0) for (v = we; v < h.length; v++) {
|
|
1477
|
-
var
|
|
1478
|
-
((
|
|
1477
|
+
var T;
|
|
1478
|
+
((T = h[v]).reactions ?? (T.reactions = [])).push(e);
|
|
1479
1479
|
}
|
|
1480
1480
|
} else !g && h !== null && we < h.length && (ln(e, we), h.length = we);
|
|
1481
1481
|
if (fn() && Oe !== null && !Ue && h !== null && (e.f & 6146) === 0) for (v = 0; v < Oe.length; v++) cl(Oe[v], e);
|
|
@@ -1488,7 +1488,7 @@ function ul(e) {
|
|
|
1488
1488
|
} catch (b) {
|
|
1489
1489
|
return Oa(b);
|
|
1490
1490
|
} finally {
|
|
1491
|
-
e.f ^= gs,
|
|
1491
|
+
e.f ^= gs, Te = t, we = r, Oe = n, $ = i, qe = o, Or(s), Ue = a, Kt = l;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
function Xu(e, t) {
|
|
@@ -1500,7 +1500,7 @@ function Xu(e, t) {
|
|
|
1500
1500
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
if (r === null && (t.f & 2) !== 0 && (
|
|
1503
|
+
if (r === null && (t.f & 2) !== 0 && (Te === null || !zn.call(Te, t))) {
|
|
1504
1504
|
var o = t;
|
|
1505
1505
|
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~cn), o.v !== re && Co(o), Pu(o), ln(o, 0);
|
|
1506
1506
|
}
|
|
@@ -1532,7 +1532,7 @@ function w(e) {
|
|
|
1532
1532
|
if (Yu?.add(e), $ !== null && !Ue && !(M !== null && (M.f & 16384) !== 0) && (qe === null || !qe.has(e))) {
|
|
1533
1533
|
var r = $.deps;
|
|
1534
1534
|
if (($.f & 2097152) !== 0)
|
|
1535
|
-
e.rv < Bt && (e.rv = Bt,
|
|
1535
|
+
e.rv < Bt && (e.rv = Bt, Te === null && r !== null && r[we] === e ? we++ : Te === null ? Te = [e] : Te.push(e));
|
|
1536
1536
|
else {
|
|
1537
1537
|
var n;
|
|
1538
1538
|
(n = $).deps ?? (n.deps = []), zn.call($.deps, e) || $.deps.push(e);
|
|
@@ -1555,7 +1555,7 @@ function w(e) {
|
|
|
1555
1555
|
var c = l.v;
|
|
1556
1556
|
return ((l.f & 1024) === 0 && l.reactions !== null || dl(l)) && (c = Po(l)), Yt.set(l, c), c;
|
|
1557
1557
|
}
|
|
1558
|
-
var u = (l.f & 512) === 0 && !Ue && $ !== null && (Ln || ($.f & 512) !== 0), f = (l.f &
|
|
1558
|
+
var u = (l.f & 512) === 0 && !Ue && $ !== null && (Ln || ($.f & 512) !== 0), f = (l.f & Ao) === 0;
|
|
1559
1559
|
dn(l) && (u && (l.f |= 512), Ua(l)), u && !f && (ja(l), fl(l));
|
|
1560
1560
|
}
|
|
1561
1561
|
if (pe?.has(e)) return pe.get(e);
|
|
@@ -1582,23 +1582,23 @@ function li(e) {
|
|
|
1582
1582
|
Ue = t;
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
|
-
var
|
|
1585
|
+
var Ar = /* @__PURE__ */ Symbol("events"), hl = /* @__PURE__ */ new Set(), Zi = /* @__PURE__ */ new Set();
|
|
1586
1586
|
function Si(e, t, r) {
|
|
1587
|
-
(t[
|
|
1587
|
+
(t[Ar] ?? (t[Ar] = {}))[e] = r;
|
|
1588
1588
|
}
|
|
1589
1589
|
function Ju(e) {
|
|
1590
1590
|
for (var t = 0; t < e.length; t++) hl.add(e[t]);
|
|
1591
1591
|
for (var r of Zi) r(e);
|
|
1592
1592
|
}
|
|
1593
1593
|
var Es = null;
|
|
1594
|
-
function
|
|
1594
|
+
function As(e) {
|
|
1595
1595
|
var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], o = i[0] || e.target;
|
|
1596
1596
|
Es = e;
|
|
1597
|
-
var s = 0, a = Es === e && e[
|
|
1597
|
+
var s = 0, a = Es === e && e[Ar];
|
|
1598
1598
|
if (a) {
|
|
1599
1599
|
var l = i.indexOf(a);
|
|
1600
1600
|
if (l !== -1 && (t === document || t === window)) {
|
|
1601
|
-
e[
|
|
1601
|
+
e[Ar] = t;
|
|
1602
1602
|
return;
|
|
1603
1603
|
}
|
|
1604
1604
|
var c = i.indexOf(t);
|
|
@@ -1617,22 +1617,22 @@ function xs(e) {
|
|
|
1617
1617
|
try {
|
|
1618
1618
|
for (var h, g = []; o !== null && o !== t; ) {
|
|
1619
1619
|
try {
|
|
1620
|
-
var v = o[
|
|
1620
|
+
var v = o[Ar]?.[n];
|
|
1621
1621
|
v != null && (!o.disabled || e.target === o) && v.call(o, e);
|
|
1622
|
-
} catch (
|
|
1623
|
-
h ? g.push(
|
|
1622
|
+
} catch (T) {
|
|
1623
|
+
h ? g.push(T) : h = T;
|
|
1624
1624
|
}
|
|
1625
1625
|
if (e.cancelBubble) break;
|
|
1626
1626
|
s++, o = s < i.length ? i[s] : null;
|
|
1627
1627
|
}
|
|
1628
1628
|
if (h) {
|
|
1629
|
-
for (let
|
|
1630
|
-
throw
|
|
1629
|
+
for (let T of g) queueMicrotask(() => {
|
|
1630
|
+
throw T;
|
|
1631
1631
|
});
|
|
1632
1632
|
throw h;
|
|
1633
1633
|
}
|
|
1634
1634
|
} finally {
|
|
1635
|
-
e[
|
|
1635
|
+
e[Ar] = t, delete e.currentTarget, $e(u), et(f);
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
@@ -1776,8 +1776,8 @@ var af = [
|
|
|
1776
1776
|
"$inspect().with",
|
|
1777
1777
|
"$inspect.trace",
|
|
1778
1778
|
"$host"
|
|
1779
|
-
],
|
|
1780
|
-
function
|
|
1779
|
+
], xs = !0;
|
|
1780
|
+
function An(e, t) {
|
|
1781
1781
|
var r, n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1782
1782
|
n !== ((r = e)[In] ?? (r[In] = e.nodeValue)) && (e[In] = n, e.nodeValue = `${n}`);
|
|
1783
1783
|
}
|
|
@@ -1790,7 +1790,7 @@ function lf(e, t) {
|
|
|
1790
1790
|
try {
|
|
1791
1791
|
for (var o = /* @__PURE__ */ Re(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ tt(o);
|
|
1792
1792
|
if (!o) throw Cr;
|
|
1793
|
-
dt(!0),
|
|
1793
|
+
dt(!0), _e(o);
|
|
1794
1794
|
const s = ml(e, {
|
|
1795
1795
|
...t,
|
|
1796
1796
|
anchor: o
|
|
@@ -1801,41 +1801,41 @@ function lf(e, t) {
|
|
|
1801
1801
|
`).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1802
1802
|
return s !== Cr && console.warn("Failed to hydrate: ", s), t.recover === !1 && iu(), Qi(), Ja(r), dt(!1), gl(e, t);
|
|
1803
1803
|
} finally {
|
|
1804
|
-
dt(n),
|
|
1804
|
+
dt(n), _e(i);
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
|
-
var
|
|
1807
|
+
var xn = /* @__PURE__ */ new Map();
|
|
1808
1808
|
function ml(e, { target: t, anchor: r, props: n = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1809
1809
|
Qi();
|
|
1810
1810
|
var l = void 0, c = ju(() => {
|
|
1811
1811
|
var u = r ?? t.appendChild(Le());
|
|
1812
1812
|
Eu(u, { pending: () => {
|
|
1813
1813
|
} }, (g) => {
|
|
1814
|
-
|
|
1814
|
+
Aa({});
|
|
1815
1815
|
var v = q;
|
|
1816
|
-
if (o && (v.c = o), i && (n.$$events = i), W && pt(g, null),
|
|
1816
|
+
if (o && (v.c = o), i && (n.$$events = i), W && pt(g, null), xs = s, l = e(g, n) || {}, xs = !0, W && (M.nodes.end = D, D === null || D.nodeType !== 8 || D.data !== "]"))
|
|
1817
1817
|
throw si(), Cr;
|
|
1818
|
-
|
|
1818
|
+
xa();
|
|
1819
1819
|
}, a);
|
|
1820
1820
|
var f = /* @__PURE__ */ new Set(), h = (g) => {
|
|
1821
1821
|
for (var v = 0; v < g.length; v++) {
|
|
1822
|
-
var
|
|
1823
|
-
if (!f.has(
|
|
1824
|
-
f.add(
|
|
1825
|
-
var b = sf(
|
|
1822
|
+
var T = g[v];
|
|
1823
|
+
if (!f.has(T)) {
|
|
1824
|
+
f.add(T);
|
|
1825
|
+
var b = sf(T);
|
|
1826
1826
|
for (const N of [t, document]) {
|
|
1827
|
-
var
|
|
1828
|
-
|
|
1829
|
-
var I =
|
|
1830
|
-
I === void 0 ? (N.addEventListener(
|
|
1827
|
+
var _ = xn.get(N);
|
|
1828
|
+
_ === void 0 && (_ = /* @__PURE__ */ new Map(), xn.set(N, _));
|
|
1829
|
+
var I = _.get(T);
|
|
1830
|
+
I === void 0 ? (N.addEventListener(T, As, { passive: b }), _.set(T, 1)) : _.set(T, I + 1);
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
|
1835
1835
|
return h(ii(hl)), Zi.add(h), () => {
|
|
1836
1836
|
for (var g of f) for (const b of [t, document]) {
|
|
1837
|
-
var v =
|
|
1838
|
-
--
|
|
1837
|
+
var v = xn.get(b), T = v.get(g);
|
|
1838
|
+
--T == 0 ? (b.removeEventListener(g, As), v.delete(g), v.size === 0 && xn.delete(b)) : v.set(g, T);
|
|
1839
1839
|
}
|
|
1840
1840
|
Zi.delete(h), u !== r && u.parentNode?.removeChild(u);
|
|
1841
1841
|
};
|
|
@@ -1847,23 +1847,23 @@ function cf(e, t) {
|
|
|
1847
1847
|
const r = eo.get(e);
|
|
1848
1848
|
return r ? (eo.delete(e), r(t)) : Promise.resolve();
|
|
1849
1849
|
}
|
|
1850
|
-
var ut = /* @__PURE__ */ new WeakMap(),
|
|
1850
|
+
var ut = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), uf = class {
|
|
1851
1851
|
constructor(e, t = !0) {
|
|
1852
|
-
m(this, "anchor", void 0), O(this, ut, /* @__PURE__ */ new Map()), O(this,
|
|
1852
|
+
m(this, "anchor", void 0), O(this, ut, /* @__PURE__ */ new Map()), O(this, xt, /* @__PURE__ */ new Map()), O(this, ze, /* @__PURE__ */ new Map()), O(this, zr, /* @__PURE__ */ new Set()), O(this, wi, !0), O(this, ki, (r) => {
|
|
1853
1853
|
if (p(ut, this).has(r)) {
|
|
1854
|
-
var n = p(ut, this).get(r), i = p(
|
|
1854
|
+
var n = p(ut, this).get(r), i = p(xt, this).get(n);
|
|
1855
1855
|
if (i)
|
|
1856
1856
|
Zn(i), p(zr, this).delete(n);
|
|
1857
1857
|
else {
|
|
1858
1858
|
var o = p(ze, this).get(n);
|
|
1859
|
-
o && (Zn(o.effect), p(
|
|
1859
|
+
o && (Zn(o.effect), p(xt, this).set(n, o.effect), p(ze, this).delete(n), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
1860
1860
|
}
|
|
1861
1861
|
for (const [s, a] of p(ut, this)) {
|
|
1862
1862
|
if (p(ut, this).delete(s), s === r) break;
|
|
1863
1863
|
const l = p(ze, this).get(a);
|
|
1864
1864
|
l && (ge(l.effect), p(ze, this).delete(a));
|
|
1865
1865
|
}
|
|
1866
|
-
for (const [s, a] of p(
|
|
1866
|
+
for (const [s, a] of p(xt, this)) {
|
|
1867
1867
|
if (s === n || p(zr, this).has(s)) continue;
|
|
1868
1868
|
const l = () => {
|
|
1869
1869
|
if (Array.from(p(ut, this).values()).includes(s)) {
|
|
@@ -1873,7 +1873,7 @@ var ut = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), ze =
|
|
|
1873
1873
|
fragment: c
|
|
1874
1874
|
});
|
|
1875
1875
|
} else ge(a);
|
|
1876
|
-
p(zr, this).delete(s), p(
|
|
1876
|
+
p(zr, this).delete(s), p(xt, this).delete(s);
|
|
1877
1877
|
};
|
|
1878
1878
|
p(wi, this) || !i ? (p(zr, this).add(s), or(a, l, !1)) : l();
|
|
1879
1879
|
}
|
|
@@ -1886,15 +1886,15 @@ var ut = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), ze =
|
|
|
1886
1886
|
}
|
|
1887
1887
|
ensure(e, t) {
|
|
1888
1888
|
var r = P, n = Qa();
|
|
1889
|
-
if (t && !p(
|
|
1889
|
+
if (t && !p(xt, this).has(e) && !p(ze, this).has(e)) if (n) {
|
|
1890
1890
|
var i = document.createDocumentFragment(), o = Le();
|
|
1891
1891
|
i.append(o), p(ze, this).set(e, {
|
|
1892
1892
|
effect: Ne(() => t(o)),
|
|
1893
1893
|
fragment: i
|
|
1894
1894
|
});
|
|
1895
|
-
} else p(
|
|
1895
|
+
} else p(xt, this).set(e, Ne(() => t(this.anchor)));
|
|
1896
1896
|
if (p(ut, this).set(r, e), n) {
|
|
1897
|
-
for (const [s, a] of p(
|
|
1897
|
+
for (const [s, a] of p(xt, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
|
|
1898
1898
|
for (const [s, a] of p(ze, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
1899
1899
|
r.oncommit(p(ki, this)), r.ondiscard(p(Cs, this));
|
|
1900
1900
|
} else
|
|
@@ -1918,13 +1918,13 @@ function df(e) {
|
|
|
1918
1918
|
function Ei(e, t, r = !1) {
|
|
1919
1919
|
var n;
|
|
1920
1920
|
W && (n = D, ai());
|
|
1921
|
-
var i = new uf(e), o = r ?
|
|
1921
|
+
var i = new uf(e), o = r ? xo : 0;
|
|
1922
1922
|
function s(a, l) {
|
|
1923
1923
|
if (W) {
|
|
1924
1924
|
var c = wa(n);
|
|
1925
1925
|
if (a !== parseInt(c.substring(1))) {
|
|
1926
1926
|
var u = jn();
|
|
1927
|
-
|
|
1927
|
+
_e(u), i.anchor = u, dt(!1), i.ensure(a, l), dt(!0);
|
|
1928
1928
|
return;
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
@@ -1978,28 +1978,28 @@ function pf(e, t, r, n, i, o = null) {
|
|
|
1978
1978
|
var s = e, a = /* @__PURE__ */ new Map();
|
|
1979
1979
|
if ((t & 4) !== 0) {
|
|
1980
1980
|
var l = e;
|
|
1981
|
-
s = W ?
|
|
1981
|
+
s = W ? _e(/* @__PURE__ */ Re(l)) : l.appendChild(Le());
|
|
1982
1982
|
}
|
|
1983
1983
|
W && ai();
|
|
1984
1984
|
var c = null, u = /* @__PURE__ */ Lo(() => {
|
|
1985
|
-
var
|
|
1986
|
-
return ba(
|
|
1985
|
+
var _ = r();
|
|
1986
|
+
return ba(_) ? _ : _ == null ? [] : ii(_);
|
|
1987
1987
|
}), f, h = /* @__PURE__ */ new Map(), g = !0;
|
|
1988
|
-
function v(
|
|
1989
|
-
(b.effect.f & 16384) === 0 && (b.pending.delete(
|
|
1988
|
+
function v(_) {
|
|
1989
|
+
(b.effect.f & 16384) === 0 && (b.pending.delete(_), b.fallback = c, gf(b, f, s, t, n), c !== null && (f.length === 0 ? (c.f & 33554432) === 0 ? Zn(c) : (c.f ^= tn, Qr(c, null, s)) : or(c, () => {
|
|
1990
1990
|
c = null;
|
|
1991
1991
|
})));
|
|
1992
1992
|
}
|
|
1993
|
-
function _
|
|
1994
|
-
b.pending.delete(
|
|
1993
|
+
function T(_) {
|
|
1994
|
+
b.pending.delete(_);
|
|
1995
1995
|
}
|
|
1996
1996
|
var b = {
|
|
1997
1997
|
effect: Ho(() => {
|
|
1998
1998
|
f = w(u);
|
|
1999
|
-
var
|
|
1999
|
+
var _ = f.length;
|
|
2000
2000
|
let I = !1;
|
|
2001
|
-
W && wa(s) === "[!" != (
|
|
2002
|
-
for (var N = /* @__PURE__ */ new Set(), S = P, F = Qa(), B = 0; B <
|
|
2001
|
+
W && wa(s) === "[!" != (_ === 0) && (s = jn(), _e(s), dt(!1), I = !0);
|
|
2002
|
+
for (var N = /* @__PURE__ */ new Set(), S = P, F = Qa(), B = 0; B < _; B += 1) {
|
|
2003
2003
|
W && D.nodeType === 8 && D.data === "]" && (s = D, I = !0, dt(!1));
|
|
2004
2004
|
var se = f[B], ee = n(se, B);
|
|
2005
2005
|
if (0)
|
|
@@ -2007,10 +2007,10 @@ function pf(e, t, r, n, i, o = null) {
|
|
|
2007
2007
|
var J = g ? null : a.get(ee);
|
|
2008
2008
|
J ? (J.v && Ir(J.v, se), J.i && Ir(J.i, B), F && S.unskip_effect(J.e)) : (J = mf(a, g ? s : Cn ?? (Cn = Le()), se, ee, B, i, t, r), g || (J.e.f |= tn), a.set(ee, J)), N.add(ee);
|
|
2009
2009
|
}
|
|
2010
|
-
if (
|
|
2010
|
+
if (_ === 0 && o && !c && (g ? c = Ne(() => o(s)) : (c = Ne(() => o(Cn ?? (Cn = Le()))), c.f |= tn)), _ > N.size && Zc("", "", ""), W && _ > 0 && _e(jn()), !g)
|
|
2011
2011
|
if (h.set(S, N), F) {
|
|
2012
2012
|
for (const [Q, wt] of a) N.has(Q) || S.skip_effect(wt.e);
|
|
2013
|
-
S.oncommit(v), S.ondiscard(
|
|
2013
|
+
S.oncommit(v), S.ondiscard(T);
|
|
2014
2014
|
} else v(S);
|
|
2015
2015
|
I && dt(!0), w(u);
|
|
2016
2016
|
}),
|
|
@@ -2027,11 +2027,11 @@ function Fr(e) {
|
|
|
2027
2027
|
return e;
|
|
2028
2028
|
}
|
|
2029
2029
|
function gf(e, t, r, n, i) {
|
|
2030
|
-
var o = (n & 8) !== 0, s = t.length, a = e.items, l = Fr(e.effect.first), c, u = null, f, h = [], g = [], v,
|
|
2031
|
-
if (o) for (
|
|
2032
|
-
v = t[
|
|
2033
|
-
for (
|
|
2034
|
-
if (v = t[
|
|
2030
|
+
var o = (n & 8) !== 0, s = t.length, a = e.items, l = Fr(e.effect.first), c, u = null, f, h = [], g = [], v, T, b, _;
|
|
2031
|
+
if (o) for (_ = 0; _ < s; _ += 1)
|
|
2032
|
+
v = t[_], T = i(v, _), b = a.get(T).e, (b.f & 33554432) === 0 && (b.nodes?.a?.measure(), (f ?? (f = /* @__PURE__ */ new Set())).add(b));
|
|
2033
|
+
for (_ = 0; _ < s; _ += 1) {
|
|
2034
|
+
if (v = t[_], T = i(v, _), b = a.get(T).e, e.outrogroups !== null) for (const J of e.outrogroups)
|
|
2035
2035
|
J.pending.delete(b), J.done.delete(b);
|
|
2036
2036
|
if ((b.f & 8192) !== 0 && (Zn(b), o && (b.nodes?.a?.unfix(), (f ?? (f = /* @__PURE__ */ new Set())).delete(b))), (b.f & 33554432) !== 0)
|
|
2037
2037
|
if (b.f ^= tn, b === l) Qr(b, null, r);
|
|
@@ -2048,7 +2048,7 @@ function gf(e, t, r, n, i) {
|
|
|
2048
2048
|
var F = h[0], B = h[h.length - 1];
|
|
2049
2049
|
for (S = 0; S < h.length; S += 1) Qr(h[S], N, r);
|
|
2050
2050
|
for (S = 0; S < g.length; S += 1) c.delete(g[S]);
|
|
2051
|
-
Ct(e, F.prev, B.next), Ct(e, u, F), Ct(e, B, N), l = N, u = B,
|
|
2051
|
+
Ct(e, F.prev, B.next), Ct(e, u, F), Ct(e, B, N), l = N, u = B, _ -= 1, h = [], g = [];
|
|
2052
2052
|
} else
|
|
2053
2053
|
c.delete(b), Qr(b, l, r), Ct(e, b.prev, b.next), Ct(e, b, u === null ? e.effect.first : u.next), Ct(e, u, b), u = b;
|
|
2054
2054
|
continue;
|
|
@@ -2073,8 +2073,8 @@ function gf(e, t, r, n, i) {
|
|
|
2073
2073
|
if (ee > 0) {
|
|
2074
2074
|
var it = (n & 4) !== 0 && s === 0 ? r : null;
|
|
2075
2075
|
if (o) {
|
|
2076
|
-
for (
|
|
2077
|
-
for (
|
|
2076
|
+
for (_ = 0; _ < ee; _ += 1) se[_].nodes?.a?.measure();
|
|
2077
|
+
for (_ = 0; _ < ee; _ += 1) se[_].nodes?.a?.fix();
|
|
2078
2078
|
}
|
|
2079
2079
|
hf(e, se, it);
|
|
2080
2080
|
}
|
|
@@ -2136,7 +2136,7 @@ function Ms(e, t = !1) {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
return n;
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function Ai(e) {
|
|
2140
2140
|
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
|
|
2141
2141
|
}
|
|
2142
2142
|
function yf(e, t) {
|
|
@@ -2145,16 +2145,16 @@ function yf(e, t) {
|
|
|
2145
2145
|
if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
|
|
2146
2146
|
e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
2147
2147
|
var o = !1, s = 0, a = !1, l = [];
|
|
2148
|
-
n && l.push(...Object.keys(n).map(
|
|
2148
|
+
n && l.push(...Object.keys(n).map(Ai)), i && l.push(...Object.keys(i).map(Ai));
|
|
2149
2149
|
var c = 0, u = -1;
|
|
2150
|
-
const
|
|
2151
|
-
for (var f = 0; f <
|
|
2150
|
+
const T = e.length;
|
|
2151
|
+
for (var f = 0; f < T; f++) {
|
|
2152
2152
|
var h = e[f];
|
|
2153
2153
|
if (a ? h === "/" && e[f - 1] === "*" && (a = !1) : o ? o === h && (o = !1) : h === "/" && e[f + 1] === "*" ? a = !0 : h === '"' || h === "'" ? o = h : h === "(" ? s++ : h === ")" && s--, !a && o === !1 && s === 0) {
|
|
2154
2154
|
if (h === ":" && u === -1) u = f;
|
|
2155
|
-
else if (h === ";" || f ===
|
|
2155
|
+
else if (h === ";" || f === T - 1) {
|
|
2156
2156
|
if (u !== -1) {
|
|
2157
|
-
var g =
|
|
2157
|
+
var g = Ai(e.substring(c, u).trim());
|
|
2158
2158
|
if (!l.includes(g)) {
|
|
2159
2159
|
h !== ";" && f++;
|
|
2160
2160
|
var v = e.substring(c, f).trim();
|
|
@@ -2170,7 +2170,7 @@ function yf(e, t) {
|
|
|
2170
2170
|
}
|
|
2171
2171
|
return e == null ? null : String(e);
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Tf(e, t, r, n, i, o) {
|
|
2174
2174
|
var s = e[Ui];
|
|
2175
2175
|
if (W || s !== r || s === void 0) {
|
|
2176
2176
|
var a = bf(r, n, o);
|
|
@@ -2181,7 +2181,7 @@ function _f(e, t, r, n, i, o) {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
return o;
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2184
|
+
function xi(e, t = {}, r, n) {
|
|
2185
2185
|
for (var i in r) {
|
|
2186
2186
|
var o = r[i];
|
|
2187
2187
|
t[i] !== o && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, n));
|
|
@@ -2192,10 +2192,10 @@ function mr(e, t, r, n) {
|
|
|
2192
2192
|
if (W || i !== t) {
|
|
2193
2193
|
var o = yf(t, n);
|
|
2194
2194
|
(!W || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[ji] = t;
|
|
2195
|
-
} else n && (Array.isArray(n) ? (
|
|
2195
|
+
} else n && (Array.isArray(n) ? (xi(e, r?.[0], n[0]), xi(e, r?.[1], n[1], "important")) : xi(e, r, n));
|
|
2196
2196
|
return n;
|
|
2197
2197
|
}
|
|
2198
|
-
var
|
|
2198
|
+
var _f = /* @__PURE__ */ Symbol("is custom element"), Sf = /* @__PURE__ */ Symbol("is html"), wf = Xc ? "link" : "LINK";
|
|
2199
2199
|
function Ci(e, t, r, n) {
|
|
2200
2200
|
var i = kf(e);
|
|
2201
2201
|
if (W && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === wf)) {
|
|
@@ -2207,7 +2207,7 @@ function Ci(e, t, r, n) {
|
|
|
2207
2207
|
function kf(e) {
|
|
2208
2208
|
var t;
|
|
2209
2209
|
return (t = e)[Bi] ?? (t[Bi] = {
|
|
2210
|
-
[
|
|
2210
|
+
[_f]: e.nodeName.includes("-"),
|
|
2211
2211
|
[Sf]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
2212
2212
|
});
|
|
2213
2213
|
}
|
|
@@ -2229,14 +2229,14 @@ var vl, kr = /* @__PURE__ */ new WeakMap(), ei = /* @__PURE__ */ new WeakMap(),
|
|
|
2229
2229
|
}
|
|
2230
2230
|
observe(e, t) {
|
|
2231
2231
|
var r = p(kr, this).get(e) || /* @__PURE__ */ new Set();
|
|
2232
|
-
return r.add(t), p(kr, this).set(e, r), L(Rs, this,
|
|
2232
|
+
return r.add(t), p(kr, this).set(e, r), L(Rs, this, Af).call(this).observe(e, p(Oi, this)), () => {
|
|
2233
2233
|
var n = p(kr, this).get(e);
|
|
2234
2234
|
n.delete(t), n.size === 0 && (p(kr, this).delete(e), p(ei, this).unobserve(e));
|
|
2235
2235
|
};
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
2238
2238
|
vl = bl;
|
|
2239
|
-
function
|
|
2239
|
+
function Af() {
|
|
2240
2240
|
return p(ei, this) ?? C(ei, this, new ResizeObserver((e) => {
|
|
2241
2241
|
for (var t of e) {
|
|
2242
2242
|
vl.entries.set(t.target, t);
|
|
@@ -2248,7 +2248,7 @@ m(bl, "entries", /* @__PURE__ */ new WeakMap());
|
|
|
2248
2248
|
function Mi(e, t) {
|
|
2249
2249
|
return e === t || e?.[rn] === t;
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function xf(e = {}, t, r, n) {
|
|
2252
2252
|
var i = q.r, o = M;
|
|
2253
2253
|
return tl(() => {
|
|
2254
2254
|
var s, a;
|
|
@@ -2272,34 +2272,34 @@ function On(e, t, r, n) {
|
|
|
2272
2272
|
var i = !un || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, a = n, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ an(n)), w(c)) : (l && (l = !1, a = s ? li(n) : n), a);
|
|
2273
2273
|
let f;
|
|
2274
2274
|
if (o) {
|
|
2275
|
-
var h = rn in e ||
|
|
2275
|
+
var h = rn in e || _a in e;
|
|
2276
2276
|
f = jt(e, t)?.set ?? (h && t in e ? (S) => e[t] = S : void 0);
|
|
2277
2277
|
}
|
|
2278
2278
|
var g, v = !1;
|
|
2279
2279
|
o ? [g, v] = vu(() => e[t]) : g = e[t], g === void 0 && n !== void 0 && (g = u(), f && (i && ou(t), f(g)));
|
|
2280
|
-
var
|
|
2281
|
-
if (i ?
|
|
2280
|
+
var T;
|
|
2281
|
+
if (i ? T = () => {
|
|
2282
2282
|
var S = e[t];
|
|
2283
2283
|
return S === void 0 ? u() : (l = !0, S);
|
|
2284
|
-
} :
|
|
2284
|
+
} : T = () => {
|
|
2285
2285
|
var S = e[t];
|
|
2286
2286
|
return S !== void 0 && (a = void 0), S === void 0 ? a : S;
|
|
2287
|
-
}, i && (r & 4) === 0) return
|
|
2287
|
+
}, i && (r & 4) === 0) return T;
|
|
2288
2288
|
if (f) {
|
|
2289
2289
|
var b = e.$$legacy;
|
|
2290
2290
|
return (function(S, F) {
|
|
2291
|
-
return arguments.length > 0 ? ((!i || !F || b || v) && f(F ?
|
|
2291
|
+
return arguments.length > 0 ? ((!i || !F || b || v) && f(F ? T() : S), S) : T();
|
|
2292
2292
|
});
|
|
2293
2293
|
}
|
|
2294
|
-
var
|
|
2294
|
+
var _ = !1, I = ((r & 1) !== 0 ? an : Lo)(() => (_ = !1, T()));
|
|
2295
2295
|
o && w(I);
|
|
2296
2296
|
var N = M;
|
|
2297
2297
|
return (function(S, F) {
|
|
2298
2298
|
if (arguments.length > 0) {
|
|
2299
2299
|
const B = F ? w(I) : i && o ? Er(S) : S;
|
|
2300
|
-
return oe(I, B),
|
|
2300
|
+
return oe(I, B), _ = !0, a !== void 0 && (a = B), S;
|
|
2301
2301
|
}
|
|
2302
|
-
return mt &&
|
|
2302
|
+
return mt && _ || (N.f & 16384) !== 0 ? I.v : w(I);
|
|
2303
2303
|
});
|
|
2304
2304
|
}
|
|
2305
2305
|
function Cf(e) {
|
|
@@ -2320,7 +2320,7 @@ var Wt = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Of =
|
|
|
2320
2320
|
return w(t.get(o) ?? r(o, Reflect.get(i, o)));
|
|
2321
2321
|
},
|
|
2322
2322
|
has(i, o) {
|
|
2323
|
-
return o ===
|
|
2323
|
+
return o === _a ? !0 : (w(t.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
2324
2324
|
},
|
|
2325
2325
|
set(i, o, s) {
|
|
2326
2326
|
return oe(t.get(o) ?? r(o, s), s), Reflect.set(i, o, s);
|
|
@@ -2622,11 +2622,11 @@ var Wf = class {
|
|
|
2622
2622
|
(function(e) {
|
|
2623
2623
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
2624
2624
|
})(he || (he = {}));
|
|
2625
|
-
var
|
|
2625
|
+
var xr;
|
|
2626
2626
|
(function(e) {
|
|
2627
2627
|
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
2628
|
-
})(
|
|
2629
|
-
var
|
|
2628
|
+
})(xr || (xr = {}));
|
|
2629
|
+
var Tl = class ro {
|
|
2630
2630
|
constructor(t = {}) {
|
|
2631
2631
|
if (m(this, "config", void 0), m(this, "ttsWordHighlight", null), m(this, "ttsSentenceHighlight", null), m(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), m(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), m(this, "annotations", /* @__PURE__ */ new Map()), m(this, "colorHighlights", /* @__PURE__ */ new Map()), m(this, "nextAnnotationId", 1), m(this, "supported", !1), m(this, "rangeSerializer", void 0), m(this, "themeObserver", null), m(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Wf(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2632
2632
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
@@ -2745,7 +2745,7 @@ var _l = class ro {
|
|
|
2745
2745
|
}
|
|
2746
2746
|
it > h && (h = it, f = F);
|
|
2747
2747
|
}
|
|
2748
|
-
const g = Math.max(0.24, Math.min(0.85, f * 0.55)), v = Math.max(0.55, Math.min(0.95, f + 0.2)),
|
|
2748
|
+
const g = Math.max(0.24, Math.min(0.85, f * 0.55)), v = Math.max(0.55, Math.min(0.95, f + 0.2)), T = Math.max(0.22, Math.min(0.6, f * 0.45)), b = l, _ = this.blend(b, a, v), I = this.contrastRatio(_, a), N = this.relativeLuminance(a) > 0.45 ? [
|
|
2749
2749
|
0,
|
|
2750
2750
|
0,
|
|
2751
2751
|
0
|
|
@@ -2758,7 +2758,7 @@ var _l = class ro {
|
|
|
2758
2758
|
wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${f})`,
|
|
2759
2759
|
sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${g})`,
|
|
2760
2760
|
wordUnderline: `rgba(${S[0]}, ${S[1]}, ${S[2]}, ${v})`,
|
|
2761
|
-
wordShadow: `rgba(${S[0]}, ${S[1]}, ${S[2]}, ${
|
|
2761
|
+
wordShadow: `rgba(${S[0]}, ${S[1]}, ${S[2]}, ${T})`
|
|
2762
2762
|
};
|
|
2763
2763
|
}
|
|
2764
2764
|
applyAdaptiveTTSStyle(t) {
|
|
@@ -2769,7 +2769,7 @@ var _l = class ro {
|
|
|
2769
2769
|
initializeHighlights() {
|
|
2770
2770
|
if (this.supported) {
|
|
2771
2771
|
this.ttsWordHighlight = new Highlight(), this.ttsSentenceHighlight = new Highlight(), CSS.highlights.set("tts-word", this.ttsWordHighlight), CSS.highlights.set("tts-sentence", this.ttsSentenceHighlight);
|
|
2772
|
-
for (const t of Object.values(
|
|
2772
|
+
for (const t of Object.values(xr)) {
|
|
2773
2773
|
const r = new Highlight();
|
|
2774
2774
|
this.colorHighlights.set(t, r), CSS.highlights.set(`annotation-${t}`, r);
|
|
2775
2775
|
}
|
|
@@ -2914,7 +2914,7 @@ var _l = class ro {
|
|
|
2914
2914
|
clearTTS() {
|
|
2915
2915
|
this.clearTTSWord(), this.clearTTSSentence();
|
|
2916
2916
|
}
|
|
2917
|
-
addAnnotation(t, r =
|
|
2917
|
+
addAnnotation(t, r = xr.YELLOW) {
|
|
2918
2918
|
const n = `annotation-${this.nextAnnotationId++}`, i = t.cloneRange(), o = {
|
|
2919
2919
|
id: n,
|
|
2920
2920
|
range: i,
|
|
@@ -2976,7 +2976,7 @@ var _l = class ro {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
return n;
|
|
2978
2978
|
}
|
|
2979
|
-
highlightRange(t, r, n =
|
|
2979
|
+
highlightRange(t, r, n = xr.YELLOW) {
|
|
2980
2980
|
if (this.supported)
|
|
2981
2981
|
switch (r) {
|
|
2982
2982
|
case he.TTS_WORD:
|
|
@@ -3038,14 +3038,14 @@ var _l = class ro {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
}
|
|
3040
3040
|
};
|
|
3041
|
-
m(
|
|
3042
|
-
m(
|
|
3043
|
-
function
|
|
3041
|
+
m(Tl, "SENTENCE_FALLBACK_SELECTOR", "math, mjx-container, svg, img, canvas, [role='img']");
|
|
3042
|
+
m(Tl, "WORD_FALLBACK_SELECTOR", "svg, img, canvas, [role='img']");
|
|
3043
|
+
function _l(e) {
|
|
3044
3044
|
return (...t) => {
|
|
3045
3045
|
console.debug(`[${e}]`, ...t);
|
|
3046
3046
|
};
|
|
3047
3047
|
}
|
|
3048
|
-
var Jg =
|
|
3048
|
+
var Jg = _l("I18nService"), Ii = {
|
|
3049
3049
|
assessment: [],
|
|
3050
3050
|
section: [],
|
|
3051
3051
|
item: [],
|
|
@@ -3585,7 +3585,7 @@ var rd = class {
|
|
|
3585
3585
|
if (a) return a;
|
|
3586
3586
|
}
|
|
3587
3587
|
return e[0] || null;
|
|
3588
|
-
}, od = (e) => !e.default,
|
|
3588
|
+
}, od = (e) => !e.default, Al = class {
|
|
3589
3589
|
constructor() {
|
|
3590
3590
|
m(this, "providerId", "browser"), m(this, "providerName", "Browser Speech Synthesis"), m(this, "version", "1.0.0");
|
|
3591
3591
|
}
|
|
@@ -3784,7 +3784,7 @@ var rd = class {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
async _initializeBrowserTTS(e) {
|
|
3786
3786
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3787
|
-
this.ttsProvider = new
|
|
3787
|
+
this.ttsProvider = new Al(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3788
3788
|
}
|
|
3789
3789
|
async _initializeServerTTS(e) {
|
|
3790
3790
|
if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
@@ -3860,7 +3860,7 @@ var rd = class {
|
|
|
3860
3860
|
if (ld.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
3861
3861
|
if (!cd.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3862
3862
|
return r;
|
|
3863
|
-
},
|
|
3863
|
+
}, xl = {
|
|
3864
3864
|
calculator: "pie-tool-calculator",
|
|
3865
3865
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3866
3866
|
ruler: "pie-tool-ruler",
|
|
@@ -3872,7 +3872,7 @@ var rd = class {
|
|
|
3872
3872
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3873
3873
|
graph: "pie-tool-graph",
|
|
3874
3874
|
periodicTable: "pie-tool-periodic-table"
|
|
3875
|
-
}, fd = (e, t) => ud(t?.toolTagMap?.[e] ??
|
|
3875
|
+
}, fd = (e, t) => ud(t?.toolTagMap?.[e] ?? xl[e] ?? e, `tool component tag for "${e}"`), dd = (e) => document.createElement(e), nt = (e, t, r, n) => {
|
|
3876
3876
|
const i = fd(e, n), o = n?.toolComponentFactories?.[e] ?? n?.toolComponentFactory;
|
|
3877
3877
|
return o ? o({
|
|
3878
3878
|
toolId: e,
|
|
@@ -4031,29 +4031,29 @@ var md = {
|
|
|
4031
4031
|
for (; u; ) {
|
|
4032
4032
|
const h = u;
|
|
4033
4033
|
if (h.parentElement && !Nr(h, e)) {
|
|
4034
|
-
const g = h.textContent || "", v = g.match(/\S/),
|
|
4035
|
-
!o && !s && Ml(l,
|
|
4034
|
+
const g = h.textContent || "", v = g.match(/\S/), T = v ? v[0] : null;
|
|
4035
|
+
!o && !s && Ml(l, T, t) && (n.push(" "), a && r.set(i, a), i++, s = !0);
|
|
4036
4036
|
for (let b = 0; b < g.length; b++) {
|
|
4037
|
-
const
|
|
4038
|
-
o ? I || (o = !1, n.push(
|
|
4037
|
+
const _ = g[b], I = /\s/.test(_);
|
|
4038
|
+
o ? I || (o = !1, n.push(_), r.set(i, {
|
|
4039
4039
|
node: h,
|
|
4040
4040
|
offset: b
|
|
4041
4041
|
}), a = {
|
|
4042
4042
|
node: h,
|
|
4043
4043
|
offset: b
|
|
4044
|
-
}, i++, s = !1, l =
|
|
4044
|
+
}, i++, s = !1, l = _) : I ? (s || (n.push(" "), r.set(i, {
|
|
4045
4045
|
node: h,
|
|
4046
4046
|
offset: b
|
|
4047
4047
|
}), a = {
|
|
4048
4048
|
node: h,
|
|
4049
4049
|
offset: b
|
|
4050
|
-
}, i++), s = !0) : (n.push(
|
|
4050
|
+
}, i++), s = !0) : (n.push(_), r.set(i, {
|
|
4051
4051
|
node: h,
|
|
4052
4052
|
offset: b
|
|
4053
4053
|
}), a = {
|
|
4054
4054
|
node: h,
|
|
4055
4055
|
offset: b
|
|
4056
|
-
}, i++, s = !1, l =
|
|
4056
|
+
}, i++, s = !1, l = _);
|
|
4057
4057
|
}
|
|
4058
4058
|
}
|
|
4059
4059
|
u = c.nextNode();
|
|
@@ -4077,7 +4077,7 @@ var md = {
|
|
|
4077
4077
|
...r ? { style: r } : {},
|
|
4078
4078
|
...n ? { engineOptions: n } : {}
|
|
4079
4079
|
};
|
|
4080
|
-
},
|
|
4080
|
+
}, Td = async (e, t, r, n) => {
|
|
4081
4081
|
const i = vd(t), o = di(n);
|
|
4082
4082
|
await e.setupEngine?.({
|
|
4083
4083
|
...o?.engineOptions || {},
|
|
@@ -4087,12 +4087,12 @@ var md = {
|
|
|
4087
4087
|
modality: "speech",
|
|
4088
4088
|
markup: r
|
|
4089
4089
|
}), await e.engineReady?.();
|
|
4090
|
-
},
|
|
4090
|
+
}, _d = async (e) => {
|
|
4091
4091
|
const t = $s.then(e, e);
|
|
4092
4092
|
return $s = t.then(() => {
|
|
4093
4093
|
}, () => {
|
|
4094
4094
|
}), t;
|
|
4095
|
-
}, Il = async (e, t, r, n, i) =>
|
|
4095
|
+
}, Il = async (e, t, r, n, i) => _d(async () => (await Td(e, r, n, i), e.toSpeech(t))), Sd = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), wd = async (e, t, r, n) => {
|
|
4096
4096
|
try {
|
|
4097
4097
|
const i = Sd(await Il(e, t, r, "ssml", n));
|
|
4098
4098
|
return i.includes("<speak") ? i : null;
|
|
@@ -4161,7 +4161,7 @@ var md = {
|
|
|
4161
4161
|
if (typeof e != "string") return;
|
|
4162
4162
|
const t = e.trim();
|
|
4163
4163
|
return t.length ? t : void 0;
|
|
4164
|
-
}, Bs = (e) => `${e}x`, Ll = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`,
|
|
4164
|
+
}, Bs = (e) => `${e}x`, Ll = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`, Ad = (e, t, r) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : Ll(e, r), $n = (e) => {
|
|
4165
4165
|
const t = Array.isArray(e) ? e : [...Hs];
|
|
4166
4166
|
if (t.length === 0) return [];
|
|
4167
4167
|
const r = /* @__PURE__ */ new Set(), n = [];
|
|
@@ -4169,7 +4169,7 @@ var md = {
|
|
|
4169
4169
|
const a = io(s), l = zs(typeof s == "number" ? s : a.rate);
|
|
4170
4170
|
if (l === void 0 || r.has(l)) continue;
|
|
4171
4171
|
r.add(l);
|
|
4172
|
-
const c = l === 1 ? "Normal" : Bs(l), u = typeof s == "number" ? c : Fs(a.label) || c, f = typeof s == "number" ? l === 1 ? "Normal speed" : Ll(u, !0) :
|
|
4172
|
+
const c = l === 1 ? "Normal" : Bs(l), u = typeof s == "number" ? c : Fs(a.label) || c, f = typeof s == "number" ? l === 1 ? "Normal speed" : Ll(u, !0) : Ad(u, Fs(a.ariaLabel), u === c);
|
|
4173
4173
|
n.push({
|
|
4174
4174
|
rate: l,
|
|
4175
4175
|
label: u,
|
|
@@ -4198,7 +4198,7 @@ var md = {
|
|
|
4198
4198
|
0.8,
|
|
4199
4199
|
1,
|
|
4200
4200
|
1.25
|
|
4201
|
-
]),
|
|
4201
|
+
]), xd = (e) => {
|
|
4202
4202
|
const t = {
|
|
4203
4203
|
...e,
|
|
4204
4204
|
layoutMode: ri(e.layoutMode)
|
|
@@ -4226,7 +4226,7 @@ var md = {
|
|
|
4226
4226
|
} : n;
|
|
4227
4227
|
}, Pi = (e) => {
|
|
4228
4228
|
const t = io(e), r = io(t.settings);
|
|
4229
|
-
return
|
|
4229
|
+
return xd({
|
|
4230
4230
|
...t,
|
|
4231
4231
|
...r
|
|
4232
4232
|
});
|
|
@@ -4265,7 +4265,8 @@ var md = {
|
|
|
4265
4265
|
controlsRow: {
|
|
4266
4266
|
reserveSpace: !0,
|
|
4267
4267
|
expandWhenToolActive: !1
|
|
4268
|
-
}
|
|
4268
|
+
},
|
|
4269
|
+
headerOverlay: { expandWhenToolActive: !1 }
|
|
4269
4270
|
};
|
|
4270
4271
|
case "expanding-row":
|
|
4271
4272
|
return {
|
|
@@ -4273,7 +4274,17 @@ var md = {
|
|
|
4273
4274
|
controlsRow: {
|
|
4274
4275
|
reserveSpace: !1,
|
|
4275
4276
|
expandWhenToolActive: !0
|
|
4276
|
-
}
|
|
4277
|
+
},
|
|
4278
|
+
headerOverlay: { expandWhenToolActive: !1 }
|
|
4279
|
+
};
|
|
4280
|
+
case "floating-overlay":
|
|
4281
|
+
return {
|
|
4282
|
+
mount: "before-buttons",
|
|
4283
|
+
controlsRow: {
|
|
4284
|
+
reserveSpace: !1,
|
|
4285
|
+
expandWhenToolActive: !1
|
|
4286
|
+
},
|
|
4287
|
+
headerOverlay: { expandWhenToolActive: !1 }
|
|
4277
4288
|
};
|
|
4278
4289
|
default:
|
|
4279
4290
|
return {
|
|
@@ -4281,7 +4292,8 @@ var md = {
|
|
|
4281
4292
|
controlsRow: {
|
|
4282
4293
|
reserveSpace: !1,
|
|
4283
4294
|
expandWhenToolActive: !1
|
|
4284
|
-
}
|
|
4295
|
+
},
|
|
4296
|
+
headerOverlay: { expandWhenToolActive: !0 }
|
|
4285
4297
|
};
|
|
4286
4298
|
}
|
|
4287
4299
|
}, Br = /* @__PURE__ */ new Map(), Md = "__pieToolElementUnmount", Us = "pie-tool-active-change", Id = {
|
|
@@ -4339,10 +4351,13 @@ var md = {
|
|
|
4339
4351
|
elements: [{
|
|
4340
4352
|
element: l(),
|
|
4341
4353
|
mount: c.mount,
|
|
4342
|
-
layoutHints: {
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4354
|
+
layoutHints: {
|
|
4355
|
+
controlsRow: {
|
|
4356
|
+
reserveSpace: c.controlsRow.reserveSpace,
|
|
4357
|
+
showWhenToolActive: c.controlsRow.expandWhenToolActive
|
|
4358
|
+
},
|
|
4359
|
+
headerOverlay: { showWhenToolActive: c.headerOverlay.expandWhenToolActive }
|
|
4360
|
+
}
|
|
4346
4361
|
}],
|
|
4347
4362
|
subscribeActive: (u) => {
|
|
4348
4363
|
const f = l(), h = (g) => {
|
|
@@ -4371,7 +4386,7 @@ function yt(e, t) {
|
|
|
4371
4386
|
}
|
|
4372
4387
|
};
|
|
4373
4388
|
}
|
|
4374
|
-
function
|
|
4389
|
+
function Tt(e) {
|
|
4375
4390
|
const t = e.isActive();
|
|
4376
4391
|
e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
|
|
4377
4392
|
}
|
|
@@ -4411,7 +4426,7 @@ var Rd = {
|
|
|
4411
4426
|
mount: "after-buttons"
|
|
4412
4427
|
}],
|
|
4413
4428
|
sync: () => {
|
|
4414
|
-
|
|
4429
|
+
Tt({
|
|
4415
4430
|
button: n,
|
|
4416
4431
|
overlay: o,
|
|
4417
4432
|
isActive: r.isActive
|
|
@@ -4453,7 +4468,7 @@ var Rd = {
|
|
|
4453
4468
|
mount: "after-buttons"
|
|
4454
4469
|
}],
|
|
4455
4470
|
sync: () => {
|
|
4456
|
-
|
|
4471
|
+
Tt({
|
|
4457
4472
|
button: n,
|
|
4458
4473
|
overlay: o,
|
|
4459
4474
|
isActive: r.isActive
|
|
@@ -4498,7 +4513,7 @@ var Rd = {
|
|
|
4498
4513
|
mount: "after-buttons"
|
|
4499
4514
|
}],
|
|
4500
4515
|
sync: () => {
|
|
4501
|
-
|
|
4516
|
+
Tt({
|
|
4502
4517
|
button: o,
|
|
4503
4518
|
overlay: i,
|
|
4504
4519
|
isActive: r.isActive
|
|
@@ -4548,7 +4563,7 @@ var Rd = {
|
|
|
4548
4563
|
mount: "after-buttons"
|
|
4549
4564
|
}],
|
|
4550
4565
|
sync: () => {
|
|
4551
|
-
|
|
4566
|
+
Tt({
|
|
4552
4567
|
button: n,
|
|
4553
4568
|
overlay: o,
|
|
4554
4569
|
isActive: r.isActive,
|
|
@@ -4600,7 +4615,7 @@ var Rd = {
|
|
|
4600
4615
|
mount: "after-buttons"
|
|
4601
4616
|
}],
|
|
4602
4617
|
sync: () => {
|
|
4603
|
-
|
|
4618
|
+
Tt({
|
|
4604
4619
|
button: n,
|
|
4605
4620
|
overlay: o,
|
|
4606
4621
|
isActive: r.isActive
|
|
@@ -4655,7 +4670,7 @@ var Rd = {
|
|
|
4655
4670
|
}
|
|
4656
4671
|
}],
|
|
4657
4672
|
sync: () => {
|
|
4658
|
-
|
|
4673
|
+
Tt({
|
|
4659
4674
|
button: n,
|
|
4660
4675
|
overlay: o,
|
|
4661
4676
|
isActive: r.isActive
|
|
@@ -4706,7 +4721,7 @@ var Rd = {
|
|
|
4706
4721
|
mount: "after-buttons"
|
|
4707
4722
|
}],
|
|
4708
4723
|
sync: () => {
|
|
4709
|
-
|
|
4724
|
+
Tt({
|
|
4710
4725
|
button: n,
|
|
4711
4726
|
overlay: o,
|
|
4712
4727
|
isActive: r.isActive
|
|
@@ -4759,7 +4774,7 @@ var Rd = {
|
|
|
4759
4774
|
}
|
|
4760
4775
|
}],
|
|
4761
4776
|
sync: () => {
|
|
4762
|
-
|
|
4777
|
+
Tt({
|
|
4763
4778
|
button: n,
|
|
4764
4779
|
overlay: o,
|
|
4765
4780
|
isActive: r.isActive
|
|
@@ -4811,7 +4826,7 @@ var Rd = {
|
|
|
4811
4826
|
}
|
|
4812
4827
|
}],
|
|
4813
4828
|
sync: () => {
|
|
4814
|
-
|
|
4829
|
+
Tt({
|
|
4815
4830
|
button: n,
|
|
4816
4831
|
overlay: o,
|
|
4817
4832
|
isActive: r.isActive
|
|
@@ -4836,7 +4851,7 @@ var Rd = {
|
|
|
4836
4851
|
function Bd(e = {}) {
|
|
4837
4852
|
const t = new Yf(), r = {
|
|
4838
4853
|
toolTagMap: {
|
|
4839
|
-
...
|
|
4854
|
+
...xl,
|
|
4840
4855
|
...e.toolTagMap || {}
|
|
4841
4856
|
},
|
|
4842
4857
|
toolComponentFactory: e.toolComponentFactory,
|
|
@@ -4980,7 +4995,7 @@ var Vd = qd(), em = {
|
|
|
4980
4995
|
itemGlossary: "itemGlossary",
|
|
4981
4996
|
tutorialAvailable: "tutorialAvailable"
|
|
4982
4997
|
}
|
|
4983
|
-
}, tm = Object.values(Gd).flatMap((e) => Object.values(e)), rm =
|
|
4998
|
+
}, tm = Object.values(Gd).flatMap((e) => Object.values(e)), rm = _l("ToolCoordinator"), so;
|
|
4984
4999
|
(function(e) {
|
|
4985
5000
|
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";
|
|
4986
5001
|
})(so || (so = {}));
|
|
@@ -5205,8 +5220,8 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5205
5220
|
for (let u = 0; u < l; u++) {
|
|
5206
5221
|
const f = r[u];
|
|
5207
5222
|
if (f.spokenEndToken <= c.spokenStartToken && f.visibleToken < c.visibleToken) {
|
|
5208
|
-
const h = c.spokenStartToken - f.spokenEndToken, g = c.visibleToken - f.visibleToken - 1, v = Math.max(0, Math.abs(h - g) - 2),
|
|
5209
|
-
|
|
5223
|
+
const h = c.spokenStartToken - f.spokenEndToken, g = c.visibleToken - f.visibleToken - 1, v = Math.max(0, Math.abs(h - g) - 2), T = n[u] + c.score - v;
|
|
5224
|
+
T > n[l] && (n[l] = T, i[l] = u);
|
|
5210
5225
|
}
|
|
5211
5226
|
}
|
|
5212
5227
|
}
|
|
@@ -5529,7 +5544,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5529
5544
|
Ul(e, t, r);
|
|
5530
5545
|
}
|
|
5531
5546
|
}
|
|
5532
|
-
},
|
|
5547
|
+
}, Th = (e) => {
|
|
5533
5548
|
const t = {
|
|
5534
5549
|
tokens: [],
|
|
5535
5550
|
layoutTargets: [],
|
|
@@ -5540,7 +5555,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5540
5555
|
layoutTargets: t.layoutTargets,
|
|
5541
5556
|
expressionTarget: vt(e, "region-fallback")
|
|
5542
5557
|
};
|
|
5543
|
-
},
|
|
5558
|
+
}, _h = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Sh = 0.95, wh = (e) => {
|
|
5544
5559
|
const t = [], r = /* @__PURE__ */ new Set(), n = (i) => {
|
|
5545
5560
|
const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
5546
5561
|
if (o.length === 0) return;
|
|
@@ -5594,16 +5609,16 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5594
5609
|
}, Eh = (e, t, r) => {
|
|
5595
5610
|
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);
|
|
5596
5611
|
return n > 0 && i === n && o === t.length;
|
|
5597
|
-
},
|
|
5612
|
+
}, Ah = (e) => e.map(({ speechTokens: t, math: r }) => ({
|
|
5598
5613
|
speechTokenIds: t.map((n) => n.id),
|
|
5599
5614
|
mathTokenIds: [r.id],
|
|
5600
5615
|
score: 1,
|
|
5601
5616
|
confidence: 1,
|
|
5602
5617
|
target: r.target
|
|
5603
|
-
})),
|
|
5618
|
+
})), xh = (e) => {
|
|
5604
5619
|
const t = e.minExactWordConfidence ?? Sh, r = kh(e.speech.tokens, e.math.tokens), n = Eh(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5605
5620
|
return {
|
|
5606
|
-
segments: n >= t ?
|
|
5621
|
+
segments: n >= t ? Ah(r) : [],
|
|
5607
5622
|
confidence: n,
|
|
5608
5623
|
fallbackTarget: e.math.expressionTarget
|
|
5609
5624
|
};
|
|
@@ -5692,11 +5707,11 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5692
5707
|
confidence: 1
|
|
5693
5708
|
} : e.boundaryWord && Ko(e.boundaryWord) ? null : r;
|
|
5694
5709
|
}, ni = (e) => {
|
|
5695
|
-
const t = hn({ speechText: e.speechText }), r =
|
|
5710
|
+
const t = hn({ speechText: e.speechText }), r = Th(e.mathElement);
|
|
5696
5711
|
return {
|
|
5697
5712
|
speech: t,
|
|
5698
5713
|
math: r,
|
|
5699
|
-
result:
|
|
5714
|
+
result: xh({
|
|
5700
5715
|
speech: t,
|
|
5701
5716
|
math: r
|
|
5702
5717
|
})
|
|
@@ -5708,7 +5723,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
5708
5723
|
length: t.length,
|
|
5709
5724
|
boundaryWord: t.boundaryWord
|
|
5710
5725
|
});
|
|
5711
|
-
return
|
|
5726
|
+
return _h({
|
|
5712
5727
|
alignment: e.result,
|
|
5713
5728
|
boundary: r
|
|
5714
5729
|
});
|
|
@@ -6109,18 +6124,18 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6109
6124
|
offset: 0
|
|
6110
6125
|
}] : qo(l.text, { locale: e.language });
|
|
6111
6126
|
for (const v of g) {
|
|
6112
|
-
const
|
|
6113
|
-
if (!
|
|
6114
|
-
const b = o(
|
|
6127
|
+
const T = G(v.text);
|
|
6128
|
+
if (!T) continue;
|
|
6129
|
+
const b = o(T);
|
|
6115
6130
|
n.push({
|
|
6116
6131
|
sourceChunkIndex: a,
|
|
6117
6132
|
segment: {
|
|
6118
6133
|
kind: "prose",
|
|
6119
|
-
spokenText:
|
|
6120
|
-
visibleText:
|
|
6134
|
+
spokenText: T,
|
|
6135
|
+
visibleText: T,
|
|
6121
6136
|
visibleSpan: b
|
|
6122
6137
|
}
|
|
6123
|
-
}), s.push(
|
|
6138
|
+
}), s.push(T);
|
|
6124
6139
|
}
|
|
6125
6140
|
continue;
|
|
6126
6141
|
}
|
|
@@ -6396,7 +6411,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6396
6411
|
if (t.length !== 1) return null;
|
|
6397
6412
|
const r = t[0]?.alignment.result.fallbackTarget;
|
|
6398
6413
|
return r ? e.renderedMathTargetResolver(r) : null;
|
|
6399
|
-
},
|
|
6414
|
+
}, Tp = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
|
|
6400
6415
|
try {
|
|
6401
6416
|
return e.type === "range" ? e.range.intersectsNode(r) : e.type === "element" ? e.element === r || e.element.contains(r) : e.node.parentElement?.contains(r) || !1;
|
|
6402
6417
|
} catch {
|
|
@@ -6408,7 +6423,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6408
6423
|
quality: "region",
|
|
6409
6424
|
confidence: 0,
|
|
6410
6425
|
reason: "boundary chunk id was not found"
|
|
6411
|
-
}), ta = (e) => e.length === 1 ? e[0].element : null,
|
|
6426
|
+
}), ta = (e) => e.length === 1 ? e[0].element : null, _p = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Sp = 3, wp = (e, t, r) => {
|
|
6412
6427
|
if (!t || t.type !== "range") return !1;
|
|
6413
6428
|
const { startContainer: n, endContainer: i } = t.range;
|
|
6414
6429
|
return n === i && n.nodeType === Sp ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
|
|
@@ -6443,7 +6458,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6443
6458
|
resolveBoundary(n) {
|
|
6444
6459
|
const i = r.get(n.chunkId);
|
|
6445
6460
|
if (!i) return ea();
|
|
6446
|
-
const { chunk: o } = i, s = dp(o, n), a = bp(o, s), l =
|
|
6461
|
+
const { chunk: o } = i, s = dp(o, n), a = bp(o, s), l = Tp(a, o), c = (!a || l.length > 0 ? vp(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, f = c && c.quality === "expression" ? c : null;
|
|
6447
6462
|
if (u) {
|
|
6448
6463
|
const h = ta(l);
|
|
6449
6464
|
return h && i.heldTokenByElement.set(h, u), vr({
|
|
@@ -6461,7 +6476,7 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6461
6476
|
confidence: s.confidence,
|
|
6462
6477
|
reason: s.reason
|
|
6463
6478
|
});
|
|
6464
|
-
if (
|
|
6479
|
+
if (_p(i, l)) {
|
|
6465
6480
|
const h = ta(l), g = h ? i.heldTokenByElement.get(h) ?? null : null;
|
|
6466
6481
|
return vr({
|
|
6467
6482
|
semanticTarget: g,
|
|
@@ -6480,11 +6495,11 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6480
6495
|
});
|
|
6481
6496
|
}
|
|
6482
6497
|
};
|
|
6483
|
-
},
|
|
6498
|
+
}, Ap = (e) => {
|
|
6484
6499
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
6485
6500
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
6486
6501
|
return t || "plain-spoken-text";
|
|
6487
|
-
},
|
|
6502
|
+
}, xp = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
6488
6503
|
element: e.sourceElement,
|
|
6489
6504
|
alignment: e.mathAlignment
|
|
6490
6505
|
}] : [], Cp = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
@@ -6504,8 +6519,8 @@ var Yd = /* @__PURE__ */ new Set([
|
|
|
6504
6519
|
regionRange: t.regionRange,
|
|
6505
6520
|
visibleMap: t.visibleMap,
|
|
6506
6521
|
catalogAlignment: t.alignment,
|
|
6507
|
-
mathAlignments:
|
|
6508
|
-
offsetSpace:
|
|
6522
|
+
mathAlignments: xp(t),
|
|
6523
|
+
offsetSpace: Ap(t)
|
|
6509
6524
|
})), Op = [
|
|
6510
6525
|
"[data-pie-tts-region]",
|
|
6511
6526
|
"[data-catalog-region]",
|
|
@@ -6766,7 +6781,7 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6766
6781
|
}
|
|
6767
6782
|
} catch {
|
|
6768
6783
|
}
|
|
6769
|
-
this.highlightCoordinator.highlightRange(t, he.TTS_WORD,
|
|
6784
|
+
this.highlightCoordinator.highlightRange(t, he.TTS_WORD, xr.YELLOW);
|
|
6770
6785
|
}
|
|
6771
6786
|
}
|
|
6772
6787
|
paintTTSSentenceRanges(t) {
|
|
@@ -6974,10 +6989,10 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6974
6989
|
}
|
|
6975
6990
|
let u = a;
|
|
6976
6991
|
for (const f of [...c, l]) {
|
|
6977
|
-
const h = n.substring(u, f), g = h.match(/^\s*/)?.[0].length || 0, v = h.match(/\s*$/)?.[0].length || 0,
|
|
6978
|
-
b >
|
|
6979
|
-
text: n.substring(
|
|
6980
|
-
startOffset:
|
|
6992
|
+
const h = n.substring(u, f), g = h.match(/^\s*/)?.[0].length || 0, v = h.match(/\s*$/)?.[0].length || 0, T = u + g, b = f - v;
|
|
6993
|
+
b > T && o.push({
|
|
6994
|
+
text: n.substring(T, b),
|
|
6995
|
+
startOffset: T,
|
|
6981
6996
|
pauseMsAfter: 0
|
|
6982
6997
|
}), u = f;
|
|
6983
6998
|
}
|
|
@@ -7099,21 +7114,21 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7099
7114
|
}), this.initializeSpeakTracking(a, r);
|
|
7100
7115
|
const g = r?.highlightModeOverride || (f ? this.resolveHighlightMode() : "sentence");
|
|
7101
7116
|
this.activeHighlightMode = g, this.activeWordBoundaryOffset = r?.wordBoundaryOffset || 0;
|
|
7102
|
-
const v = this.hasExplicitBreakSemantics(o),
|
|
7103
|
-
if (this.playbackChunks = h?.length ? h : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : v || !f ? [] :
|
|
7117
|
+
const v = this.hasExplicitBreakSemantics(o), T = !!this.currentContentElement && !c && !v && f;
|
|
7118
|
+
if (this.playbackChunks = h?.length ? h : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : v || !f ? [] : T && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
|
|
7104
7119
|
contentToSpeak: a,
|
|
7105
|
-
shouldUsePlan:
|
|
7120
|
+
shouldUsePlan: T,
|
|
7106
7121
|
playbackSegments: this.seekSegments
|
|
7107
7122
|
}), this.setState(z.LOADING), this.prepareHighlightsForSpeak({
|
|
7108
7123
|
contentToSpeak: a,
|
|
7109
7124
|
options: r,
|
|
7110
7125
|
highlightMode: g,
|
|
7111
|
-
shouldUsePlan:
|
|
7126
|
+
shouldUsePlan: T
|
|
7112
7127
|
}), f ? this.configureWordBoundaryHighlighting({
|
|
7113
7128
|
highlightMode: g,
|
|
7114
7129
|
wordBoundaryOffset: r?.wordBoundaryOffset || 0
|
|
7115
7130
|
}) : this.clearWordBoundaryHighlighting(), this.setState(z.PLAYING), await this.executeSpeakPlayback({
|
|
7116
|
-
shouldUsePlan:
|
|
7131
|
+
shouldUsePlan: T,
|
|
7117
7132
|
runId: n,
|
|
7118
7133
|
highlightMode: g,
|
|
7119
7134
|
contentToSpeak: s,
|
|
@@ -7128,7 +7143,7 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7128
7143
|
}
|
|
7129
7144
|
async switchProviderToBrowser(t, r) {
|
|
7130
7145
|
if (!this.currentProvider) return !1;
|
|
7131
|
-
const n = new
|
|
7146
|
+
const n = new Al(), i = this.currentProvider.providerId, o = { ...this.ttsConfig }, s = r?.operation || "tts-initialize", a = r?.contentToSpeak ?? "", l = a.replace(/\s+/g, " ").trim().slice(0, 120), c = a.length > 0 ? {
|
|
7132
7147
|
textLength: a.length,
|
|
7133
7148
|
textPreview: l.length < a.length ? `${l}…` : l
|
|
7134
7149
|
} : {};
|
|
@@ -7269,8 +7284,8 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7269
7284
|
}, a = (u, f) => {
|
|
7270
7285
|
const h = l(u);
|
|
7271
7286
|
if (h.length !== 1) return null;
|
|
7272
|
-
const g = h[0], v = Zr(g, this.getTextProcessingOptions(r.language)).visibleText || G(g.textContent || ""),
|
|
7273
|
-
return
|
|
7287
|
+
const g = h[0], v = Zr(g, this.getTextProcessingOptions(r.language)).visibleText || G(g.textContent || ""), T = (b) => G(b).replace(/\s+/g, "");
|
|
7288
|
+
return T(v) === T(f) ? g : null;
|
|
7274
7289
|
}, l = (u) => {
|
|
7275
7290
|
const f = Array.from(u.querySelectorAll("math"));
|
|
7276
7291
|
return u.localName?.toLowerCase() === "math" ? [u, ...f] : f;
|
|
@@ -7284,13 +7299,13 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7284
7299
|
const f = u, h = s(f);
|
|
7285
7300
|
if (h) {
|
|
7286
7301
|
o();
|
|
7287
|
-
const g = Zr(f, this.getTextProcessingOptions(r.language)), v = g.visibleText || G(f.textContent || ""),
|
|
7302
|
+
const g = Zr(f, this.getTextProcessingOptions(r.language)), v = g.visibleText || G(f.textContent || ""), T = zl({
|
|
7288
7303
|
speechText: h.content,
|
|
7289
7304
|
visibleText: v
|
|
7290
|
-
}), b = a(f, v),
|
|
7305
|
+
}), b = a(f, v), _ = b ? ni({
|
|
7291
7306
|
mathElement: b,
|
|
7292
7307
|
speechText: h.content
|
|
7293
|
-
}) : void 0, I =
|
|
7308
|
+
}) : void 0, I = _ ? void 0 : l(f).map((S) => ({
|
|
7294
7309
|
element: S,
|
|
7295
7310
|
alignment: ni({
|
|
7296
7311
|
mathElement: S,
|
|
@@ -7303,9 +7318,9 @@ var uc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7303
7318
|
sourceElement: f,
|
|
7304
7319
|
regionElement: lc(f, t),
|
|
7305
7320
|
speechMatchesVisibleText: N === v,
|
|
7306
|
-
playbackMode:
|
|
7307
|
-
alignment:
|
|
7308
|
-
mathAlignment:
|
|
7321
|
+
playbackMode: T.playbackMode,
|
|
7322
|
+
alignment: T,
|
|
7323
|
+
mathAlignment: _,
|
|
7309
7324
|
mathAlignments: I,
|
|
7310
7325
|
visibleMap: g.map
|
|
7311
7326
|
});
|
|
@@ -8042,7 +8057,7 @@ var jp = {
|
|
|
8042
8057
|
"--pie-button-hover-color": "#ffffff",
|
|
8043
8058
|
"--pie-button-active-bg": "#4b5563",
|
|
8044
8059
|
"--pie-button-focus-outline": "#93c5fd"
|
|
8045
|
-
},
|
|
8060
|
+
}, To = /* @__PURE__ */ new Map();
|
|
8046
8061
|
function Wn(e) {
|
|
8047
8062
|
const t = e.trim();
|
|
8048
8063
|
return t || void 0;
|
|
@@ -8149,14 +8164,14 @@ var ra = {
|
|
|
8149
8164
|
return Vp(getComputedStyle(e));
|
|
8150
8165
|
}
|
|
8151
8166
|
};
|
|
8152
|
-
|
|
8167
|
+
To.set(ra.id, ra);
|
|
8153
8168
|
function Gp(e) {
|
|
8154
8169
|
const t = e.provider?.trim() || "auto", r = (i) => {
|
|
8155
8170
|
if (t && t !== "auto") {
|
|
8156
|
-
const o =
|
|
8171
|
+
const o = To.get(t);
|
|
8157
8172
|
return !o || !o.canRead(i) ? {} : bo(o.read(i));
|
|
8158
8173
|
}
|
|
8159
|
-
for (const o of
|
|
8174
|
+
for (const o of To.values())
|
|
8160
8175
|
if (o.canRead(i))
|
|
8161
8176
|
return bo(o.read(i));
|
|
8162
8177
|
return {};
|
|
@@ -8173,10 +8188,10 @@ function Kp(e, t) {
|
|
|
8173
8188
|
if (!(r instanceof DOMException && r.name === "NotSupportedError") || !customElements.get(e)) throw r;
|
|
8174
8189
|
}
|
|
8175
8190
|
}
|
|
8176
|
-
function
|
|
8191
|
+
function _o(e) {
|
|
8177
8192
|
if (!e) return {};
|
|
8178
8193
|
if (typeof e == "string") try {
|
|
8179
|
-
return
|
|
8194
|
+
return _o(JSON.parse(e));
|
|
8180
8195
|
} catch {
|
|
8181
8196
|
return {};
|
|
8182
8197
|
}
|
|
@@ -8217,7 +8232,7 @@ var Xp = class extends Yp {
|
|
|
8217
8232
|
return { ...this.variablesOverride };
|
|
8218
8233
|
}
|
|
8219
8234
|
set variables(e) {
|
|
8220
|
-
this.variablesOverride =
|
|
8235
|
+
this.variablesOverride = _o(e), this.setAttribute("variables", JSON.stringify(this.variablesOverride)), this.applyTheme();
|
|
8221
8236
|
}
|
|
8222
8237
|
get provider() {
|
|
8223
8238
|
return this.getAttribute("provider")?.trim() || "auto";
|
|
@@ -8238,7 +8253,7 @@ var Xp = class extends Yp {
|
|
|
8238
8253
|
this.mediaQuery && this.mediaQuery.removeEventListener("change", this.onMediaChange), this.mediaQuery = null, this.scope === "self" && (this.clearPreviousKeys(this), this.removeAttribute("data-theme"), this.removeAttribute("data-color-scheme"));
|
|
8239
8254
|
}
|
|
8240
8255
|
attributeChangedCallback(e, t, r) {
|
|
8241
|
-
t !== r && (e === "variables" && (this.variablesOverride =
|
|
8256
|
+
t !== r && (e === "variables" && (this.variablesOverride = _o(r)), e === "theme" && this.setupAutoThemeListener(), this.applyTheme());
|
|
8242
8257
|
}
|
|
8243
8258
|
getTarget() {
|
|
8244
8259
|
return this.scope === "document" ? document.documentElement : this;
|
|
@@ -9024,9 +9039,9 @@ var oa = me([
|
|
|
9024
9039
|
progressingInstruction: 7,
|
|
9025
9040
|
comment: 8,
|
|
9026
9041
|
document: 9
|
|
9027
|
-
},
|
|
9042
|
+
}, Tg = function() {
|
|
9028
9043
|
return typeof window > "u" ? null : window;
|
|
9029
|
-
},
|
|
9044
|
+
}, _g = function(t, r) {
|
|
9030
9045
|
if (typeof t != "object" || typeof t.createPolicy != "function") return null;
|
|
9031
9046
|
let n = null;
|
|
9032
9047
|
const i = "data-tt-policy-suffix";
|
|
@@ -9058,21 +9073,21 @@ var oa = me([
|
|
|
9058
9073
|
};
|
|
9059
9074
|
};
|
|
9060
9075
|
function vc() {
|
|
9061
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
9062
|
-
const t = (
|
|
9076
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Tg();
|
|
9077
|
+
const t = (A) => vc(A);
|
|
9063
9078
|
if (t.version = "3.4.0", t.removed = [], !e || !e.document || e.document.nodeType !== Gr.document || !e.Element)
|
|
9064
9079
|
return t.isSupported = !1, t;
|
|
9065
9080
|
let { document: r } = e;
|
|
9066
|
-
const n = r, i = n.currentScript, { DocumentFragment: o, HTMLTemplateElement: s, Node: a, Element: l, NodeFilter: c, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: h, trustedTypes: g } = e, v = l.prototype,
|
|
9081
|
+
const n = r, i = n.currentScript, { DocumentFragment: o, HTMLTemplateElement: s, Node: a, Element: l, NodeFilter: c, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: h, trustedTypes: g } = e, v = l.prototype, T = Vr(v, "cloneNode"), b = Vr(v, "remove"), _ = Vr(v, "nextSibling"), I = Vr(v, "childNodes"), N = Vr(v, "parentNode");
|
|
9067
9082
|
if (typeof s == "function") {
|
|
9068
|
-
const
|
|
9069
|
-
|
|
9083
|
+
const A = r.createElement("template");
|
|
9084
|
+
A.content && A.content.ownerDocument && (r = A.content.ownerDocument);
|
|
9070
9085
|
}
|
|
9071
9086
|
let S, F = "";
|
|
9072
9087
|
const { implementation: B, createNodeIterator: se, createDocumentFragment: ee, getElementsByTagName: it } = r, { importNode: J } = n;
|
|
9073
9088
|
let Q = ua();
|
|
9074
9089
|
t.isSupported = typeof pc == "function" && typeof N == "function" && B && B.createHTMLDocument !== void 0;
|
|
9075
|
-
const { MUSTACHE_EXPR: wt, ERB_EXPR: sr, TMPLIT_EXPR: k, DATA_ATTR:
|
|
9090
|
+
const { MUSTACHE_EXPR: wt, ERB_EXPR: sr, TMPLIT_EXPR: k, DATA_ATTR: x, ARIA_ATTR: H, IS_SCRIPT_OR_DATA: ae, ATTR_WHITESPACE: ot, CUSTOM_ELEMENT: be } = ca;
|
|
9076
9091
|
let { IS_ALLOWED_URI: ar } = ca, K = null;
|
|
9077
9092
|
const pn = R({}, [
|
|
9078
9093
|
...oa,
|
|
@@ -9124,7 +9139,7 @@ function vc() {
|
|
|
9124
9139
|
}));
|
|
9125
9140
|
let gn = !0, st = !0, ur = !1, fr = !0, ne = !1, Se = !0, Ge = !1, Lt = !1, Pt = !1, at = !1, dr = !1, Et = !1, hr = !0, mn = !1;
|
|
9126
9141
|
const vn = "user-content-";
|
|
9127
|
-
let $r = !0, Nt = !1,
|
|
9142
|
+
let $r = !0, Nt = !1, At = {}, ye = null;
|
|
9128
9143
|
const Dr = R({}, [
|
|
9129
9144
|
"annotation-xml",
|
|
9130
9145
|
"audio",
|
|
@@ -9179,19 +9194,19 @@ function vc() {
|
|
|
9179
9194
|
"xmlns"
|
|
9180
9195
|
]), bn = "http://www.w3.org/1998/Math/MathML", yn = "http://www.w3.org/2000/svg", Ye = "http://www.w3.org/1999/xhtml";
|
|
9181
9196
|
let pr = Ye, gi = !1, mi = null;
|
|
9182
|
-
const
|
|
9197
|
+
const Ac = R({}, [
|
|
9183
9198
|
bn,
|
|
9184
9199
|
yn,
|
|
9185
9200
|
Ye
|
|
9186
9201
|
], $i);
|
|
9187
|
-
let
|
|
9202
|
+
let Tn = R({}, [
|
|
9188
9203
|
"mi",
|
|
9189
9204
|
"mo",
|
|
9190
9205
|
"mn",
|
|
9191
9206
|
"ms",
|
|
9192
9207
|
"mtext"
|
|
9193
|
-
]),
|
|
9194
|
-
const
|
|
9208
|
+
]), _n = R({}, ["annotation-xml"]);
|
|
9209
|
+
const xc = R({}, [
|
|
9195
9210
|
"title",
|
|
9196
9211
|
"style",
|
|
9197
9212
|
"font",
|
|
@@ -9206,7 +9221,7 @@ function vc() {
|
|
|
9206
9221
|
}, vi = function() {
|
|
9207
9222
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9208
9223
|
if (!(gr && gr === d)) {
|
|
9209
|
-
if ((!d || typeof d != "object") && (d = {}), d = Xe(d), Wr = Cc.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Oc : d.PARSER_MEDIA_TYPE, te = Wr === "application/xhtml+xml" ? $i : Hn, K = Fe(d, "ALLOWED_TAGS") ? R({}, d.ALLOWED_TAGS, te) : pn, Z = Fe(d, "ALLOWED_ATTR") ? R({}, d.ALLOWED_ATTR, te) : lr, mi = Fe(d, "ALLOWED_NAMESPACES") ? R({}, d.ALLOWED_NAMESPACES, $i) :
|
|
9224
|
+
if ((!d || typeof d != "object") && (d = {}), d = Xe(d), Wr = Cc.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Oc : d.PARSER_MEDIA_TYPE, te = Wr === "application/xhtml+xml" ? $i : Hn, K = Fe(d, "ALLOWED_TAGS") ? R({}, d.ALLOWED_TAGS, te) : pn, Z = Fe(d, "ALLOWED_ATTR") ? R({}, d.ALLOWED_ATTR, te) : lr, mi = Fe(d, "ALLOWED_NAMESPACES") ? R({}, d.ALLOWED_NAMESPACES, $i) : Ac, pi = Fe(d, "ADD_URI_SAFE_ATTR") ? R(Xe(Qo), d.ADD_URI_SAFE_ATTR, te) : Qo, Xo = Fe(d, "ADD_DATA_URI_TAGS") ? R(Xe(Jo), d.ADD_DATA_URI_TAGS, te) : Jo, ye = Fe(d, "FORBID_CONTENTS") ? R({}, d.FORBID_CONTENTS, te) : Dr, kt = Fe(d, "FORBID_TAGS") ? R({}, d.FORBID_TAGS, te) : Xe({}), cr = Fe(d, "FORBID_ATTR") ? R({}, d.FORBID_ATTR, te) : Xe({}), At = Fe(d, "USE_PROFILES") ? d.USE_PROFILES : !1, gn = d.ALLOW_ARIA_ATTR !== !1, st = d.ALLOW_DATA_ATTR !== !1, ur = d.ALLOW_UNKNOWN_PROTOCOLS || !1, fr = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ne = d.SAFE_FOR_TEMPLATES || !1, Se = d.SAFE_FOR_XML !== !1, Ge = d.WHOLE_DOCUMENT || !1, at = d.RETURN_DOM || !1, dr = d.RETURN_DOM_FRAGMENT || !1, Et = d.RETURN_TRUSTED_TYPE || !1, Pt = d.FORCE_BODY || !1, hr = d.SANITIZE_DOM !== !1, mn = d.SANITIZE_NAMED_PROPS || !1, $r = d.KEEP_CONTENT !== !1, Nt = d.IN_PLACE || !1, ar = d.ALLOWED_URI_REGEXP || gc, pr = d.NAMESPACE || Ye, Tn = d.MATHML_TEXT_INTEGRATION_POINTS || Tn, _n = d.HTML_INTEGRATION_POINTS || _n, j = d.CUSTOM_ELEMENT_HANDLING || en(null), d.CUSTOM_ELEMENT_HANDLING && Zo(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (j.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && Zo(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (j.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (j.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ne && (st = !1), dr && (at = !0), At && (K = R({}, sa), Z = en(null), At.html === !0 && (R(K, oa), R(Z, aa)), At.svg === !0 && (R(K, Wi), R(Z, Fi), R(Z, Mn)), At.svgFilters === !0 && (R(K, Hi), R(Z, Fi), R(Z, Mn)), At.mathMl === !0 && (R(K, zi), R(Z, la), R(Z, Mn))), Ve.tagCheck = null, Ve.attributeCheck = null, d.ADD_TAGS && (typeof d.ADD_TAGS == "function" ? Ve.tagCheck = d.ADD_TAGS : (K === pn && (K = Xe(K)), R(K, d.ADD_TAGS, te))), d.ADD_ATTR && (typeof d.ADD_ATTR == "function" ? Ve.attributeCheck = d.ADD_ATTR : (Z === lr && (Z = Xe(Z)), R(Z, d.ADD_ATTR, te))), d.ADD_URI_SAFE_ATTR && R(pi, d.ADD_URI_SAFE_ATTR, te), d.FORBID_CONTENTS && (ye === Dr && (ye = Xe(ye)), R(ye, d.FORBID_CONTENTS, te)), d.ADD_FORBID_CONTENTS && (ye === Dr && (ye = Xe(ye)), R(ye, d.ADD_FORBID_CONTENTS, te)), $r && (K["#text"] = !0), Ge && R(K, [
|
|
9210
9225
|
"html",
|
|
9211
9226
|
"head",
|
|
9212
9227
|
"body"
|
|
@@ -9215,7 +9230,7 @@ function vc() {
|
|
|
9215
9230
|
if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw qr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
9216
9231
|
S = d.TRUSTED_TYPES_POLICY, F = S.createHTML("");
|
|
9217
9232
|
} else
|
|
9218
|
-
S === void 0 && (S =
|
|
9233
|
+
S === void 0 && (S = _g(g, i)), S !== null && typeof F == "string" && (F = S.createHTML(""));
|
|
9219
9234
|
me && me(d), gr = d;
|
|
9220
9235
|
}
|
|
9221
9236
|
}, es = R({}, [
|
|
@@ -9229,7 +9244,7 @@ function vc() {
|
|
|
9229
9244
|
tagName: "template"
|
|
9230
9245
|
});
|
|
9231
9246
|
const E = Hn(d.tagName), V = Hn(y.tagName);
|
|
9232
|
-
return mi[d.namespaceURI] ? d.namespaceURI === yn ? y.namespaceURI === Ye ? E === "svg" : y.namespaceURI === bn ? E === "svg" && (V === "annotation-xml" ||
|
|
9247
|
+
return mi[d.namespaceURI] ? d.namespaceURI === yn ? y.namespaceURI === Ye ? E === "svg" : y.namespaceURI === bn ? E === "svg" && (V === "annotation-xml" || Tn[V]) : !!es[E] : d.namespaceURI === bn ? y.namespaceURI === Ye ? E === "math" : y.namespaceURI === yn ? E === "math" && _n[V] : !!ts[E] : d.namespaceURI === Ye ? y.namespaceURI === yn && !_n[V] || y.namespaceURI === bn && !Tn[V] ? !1 : !ts[E] && (xc[E] || !es[E]) : !!(Wr === "application/xhtml+xml" && mi[d.namespaceURI]) : !1;
|
|
9233
9248
|
}, He = function(d) {
|
|
9234
9249
|
jr(t.removed, { element: d });
|
|
9235
9250
|
try {
|
|
@@ -9261,8 +9276,8 @@ function vc() {
|
|
|
9261
9276
|
let y = null, E = null;
|
|
9262
9277
|
if (Pt) d = "<remove></remove>" + d;
|
|
9263
9278
|
else {
|
|
9264
|
-
const
|
|
9265
|
-
E =
|
|
9279
|
+
const Ae = Di(d, /^[\r\n\t ]+/);
|
|
9280
|
+
E = Ae && Ae[0];
|
|
9266
9281
|
}
|
|
9267
9282
|
Wr === "application/xhtml+xml" && pr === Ye && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
|
|
9268
9283
|
const V = S ? S.createHTML(d) : d;
|
|
@@ -9286,8 +9301,8 @@ function vc() {
|
|
|
9286
9301
|
}, yi = function(d) {
|
|
9287
9302
|
return typeof a == "function" && d instanceof a;
|
|
9288
9303
|
};
|
|
9289
|
-
function lt(
|
|
9290
|
-
Ur(
|
|
9304
|
+
function lt(A, d, y) {
|
|
9305
|
+
Ur(A, (E) => {
|
|
9291
9306
|
E.call(t, d, y, gr);
|
|
9292
9307
|
});
|
|
9293
9308
|
}
|
|
@@ -9307,10 +9322,10 @@ function vc() {
|
|
|
9307
9322
|
if ($r && !ye[E]) {
|
|
9308
9323
|
const V = N(d) || d.parentNode, U = I(d) || d.childNodes;
|
|
9309
9324
|
if (U && V) {
|
|
9310
|
-
const
|
|
9311
|
-
for (let
|
|
9312
|
-
const ie =
|
|
9313
|
-
ie.__removalCount = (d.__removalCount || 0) + 1, V.insertBefore(ie,
|
|
9325
|
+
const Ae = U.length;
|
|
9326
|
+
for (let xe = Ae - 1; xe >= 0; --xe) {
|
|
9327
|
+
const ie = T(U[xe], !0);
|
|
9328
|
+
ie.__removalCount = (d.__removalCount || 0) + 1, V.insertBefore(ie, _(d));
|
|
9314
9329
|
}
|
|
9315
9330
|
}
|
|
9316
9331
|
}
|
|
@@ -9325,7 +9340,7 @@ function vc() {
|
|
|
9325
9340
|
}), d.textContent !== y && (jr(t.removed, { element: d.cloneNode() }), d.textContent = y)), lt(Q.afterSanitizeElements, d, null), !1);
|
|
9326
9341
|
}, os = function(d, y, E) {
|
|
9327
9342
|
if (cr[y] || hr && (y === "id" || y === "name") && (E in r || E in Mc)) return !1;
|
|
9328
|
-
if (!(st && !cr[y] && de(
|
|
9343
|
+
if (!(st && !cr[y] && de(x, y))) {
|
|
9329
9344
|
if (!(gn && de(H, y))) {
|
|
9330
9345
|
if (!(Ve.attributeCheck instanceof Function && Ve.attributeCheck(y, d))) {
|
|
9331
9346
|
if (!Z[y] || cr[y]) {
|
|
@@ -9358,7 +9373,7 @@ function vc() {
|
|
|
9358
9373
|
};
|
|
9359
9374
|
let V = y.length;
|
|
9360
9375
|
for (; V--; ) {
|
|
9361
|
-
const { name: U, namespaceURI:
|
|
9376
|
+
const { name: U, namespaceURI: Ae, value: xe } = y[V], ie = te(U), Hr = xe;
|
|
9362
9377
|
let le = U === "value" ? Hr : ag(Hr);
|
|
9363
9378
|
if (E.attrName = ie, E.attrValue = le, E.keepAttr = !0, E.forceKeepAttr = void 0, lt(Q.uponSanitizeAttribute, d, E), le = E.attrValue, mn && (ie === "id" || ie === "name") && ($t(U, d), le = vn + le), Se && de(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, le)) {
|
|
9364
9379
|
$t(U, d);
|
|
@@ -9389,7 +9404,7 @@ function vc() {
|
|
|
9389
9404
|
$t(U, d);
|
|
9390
9405
|
continue;
|
|
9391
9406
|
}
|
|
9392
|
-
if (S && typeof g == "object" && typeof g.getAttributeType == "function" && !
|
|
9407
|
+
if (S && typeof g == "object" && typeof g.getAttributeType == "function" && !Ae) switch (g.getAttributeType(cs, ie)) {
|
|
9393
9408
|
case "TrustedHTML":
|
|
9394
9409
|
le = S.createHTML(le);
|
|
9395
9410
|
break;
|
|
@@ -9398,7 +9413,7 @@ function vc() {
|
|
|
9398
9413
|
break;
|
|
9399
9414
|
}
|
|
9400
9415
|
if (le !== Hr) try {
|
|
9401
|
-
|
|
9416
|
+
Ae ? d.setAttributeNS(Ae, U, le) : d.setAttribute(U, le), bi(d) ? He(d) : ia(t.removed);
|
|
9402
9417
|
} catch {
|
|
9403
9418
|
$t(U, d);
|
|
9404
9419
|
}
|
|
@@ -9411,28 +9426,28 @@ function vc() {
|
|
|
9411
9426
|
lt(Q.uponSanitizeShadowNode, y, null), is(y), as(y), y.content instanceof o && ls(y.content);
|
|
9412
9427
|
lt(Q.afterSanitizeShadowDOM, d, null);
|
|
9413
9428
|
};
|
|
9414
|
-
return t.sanitize = function(
|
|
9429
|
+
return t.sanitize = function(A) {
|
|
9415
9430
|
let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, E = null, V = null, U = null;
|
|
9416
|
-
if (gi = !
|
|
9417
|
-
if (
|
|
9431
|
+
if (gi = !A, gi && (A = "<!-->"), typeof A != "string" && !yi(A)) if (typeof A.toString == "function") {
|
|
9432
|
+
if (A = A.toString(), typeof A != "string") throw qr("dirty is not a string, aborting");
|
|
9418
9433
|
} else throw qr("toString is not a function");
|
|
9419
|
-
if (!t.isSupported) return
|
|
9420
|
-
if (Lt || vi(d), t.removed = [], typeof
|
|
9421
|
-
if (
|
|
9422
|
-
const ie = te(
|
|
9434
|
+
if (!t.isSupported) return A;
|
|
9435
|
+
if (Lt || vi(d), t.removed = [], typeof A == "string" && (Nt = !1), Nt) {
|
|
9436
|
+
if (A.nodeName) {
|
|
9437
|
+
const ie = te(A.nodeName);
|
|
9423
9438
|
if (!K[ie] || kt[ie]) throw qr("root node is forbidden and cannot be sanitized in-place");
|
|
9424
9439
|
}
|
|
9425
|
-
} else if (
|
|
9426
|
-
y = rs("<!---->"), E = y.ownerDocument.importNode(
|
|
9440
|
+
} else if (A instanceof a)
|
|
9441
|
+
y = rs("<!---->"), E = y.ownerDocument.importNode(A, !0), E.nodeType === Gr.element && E.nodeName === "BODY" || E.nodeName === "HTML" ? y = E : y.appendChild(E);
|
|
9427
9442
|
else {
|
|
9428
|
-
if (!at && !ne && !Ge &&
|
|
9429
|
-
if (y = rs(
|
|
9443
|
+
if (!at && !ne && !Ge && A.indexOf("<") === -1) return S && Et ? S.createHTML(A) : A;
|
|
9444
|
+
if (y = rs(A), !y) return at ? null : Et ? F : "";
|
|
9430
9445
|
}
|
|
9431
9446
|
y && Pt && He(y.firstChild);
|
|
9432
|
-
const
|
|
9433
|
-
for (; V =
|
|
9447
|
+
const Ae = ns(Nt ? A : y);
|
|
9448
|
+
for (; V = Ae.nextNode(); )
|
|
9434
9449
|
is(V), as(V), V.content instanceof o && ls(V.content);
|
|
9435
|
-
if (Nt) return
|
|
9450
|
+
if (Nt) return A;
|
|
9436
9451
|
if (at) {
|
|
9437
9452
|
if (ne) {
|
|
9438
9453
|
y.normalize();
|
|
@@ -9450,31 +9465,31 @@ function vc() {
|
|
|
9450
9465
|
else U = y;
|
|
9451
9466
|
return (Z.shadowroot || Z.shadowrootmode) && (U = J.call(n, U, !0)), U;
|
|
9452
9467
|
}
|
|
9453
|
-
let
|
|
9454
|
-
return Ge && K["!doctype"] && y.ownerDocument && y.ownerDocument.doctype && y.ownerDocument.doctype.name && de(mc, y.ownerDocument.doctype.name) && (
|
|
9455
|
-
` +
|
|
9468
|
+
let xe = Ge ? y.outerHTML : y.innerHTML;
|
|
9469
|
+
return Ge && K["!doctype"] && y.ownerDocument && y.ownerDocument.doctype && y.ownerDocument.doctype.name && de(mc, y.ownerDocument.doctype.name) && (xe = "<!DOCTYPE " + y.ownerDocument.doctype.name + `>
|
|
9470
|
+
` + xe), ne && Ur([
|
|
9456
9471
|
wt,
|
|
9457
9472
|
sr,
|
|
9458
9473
|
k
|
|
9459
9474
|
], (ie) => {
|
|
9460
|
-
|
|
9461
|
-
}), S && Et ? S.createHTML(
|
|
9475
|
+
xe = br(xe, ie, " ");
|
|
9476
|
+
}), S && Et ? S.createHTML(xe) : xe;
|
|
9462
9477
|
}, t.setConfig = function() {
|
|
9463
9478
|
vi(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Lt = !0;
|
|
9464
9479
|
}, t.clearConfig = function() {
|
|
9465
9480
|
gr = null, Lt = !1;
|
|
9466
|
-
}, t.isValidAttribute = function(
|
|
9467
|
-
return gr || vi({}), os(te(
|
|
9468
|
-
}, t.addHook = function(
|
|
9469
|
-
typeof d == "function" && jr(Q[
|
|
9470
|
-
}, t.removeHook = function(
|
|
9481
|
+
}, t.isValidAttribute = function(A, d, y) {
|
|
9482
|
+
return gr || vi({}), os(te(A), te(d), y);
|
|
9483
|
+
}, t.addHook = function(A, d) {
|
|
9484
|
+
typeof d == "function" && jr(Q[A], d);
|
|
9485
|
+
}, t.removeHook = function(A, d) {
|
|
9471
9486
|
if (d !== void 0) {
|
|
9472
|
-
const y = ig(Q[
|
|
9473
|
-
return y === -1 ? void 0 : og(Q[
|
|
9487
|
+
const y = ig(Q[A], d);
|
|
9488
|
+
return y === -1 ? void 0 : og(Q[A], y, 1)[0];
|
|
9474
9489
|
}
|
|
9475
|
-
return ia(Q[
|
|
9476
|
-
}, t.removeHooks = function(
|
|
9477
|
-
Q[
|
|
9490
|
+
return ia(Q[A]);
|
|
9491
|
+
}, t.removeHooks = function(A) {
|
|
9492
|
+
Q[A] = [];
|
|
9478
9493
|
}, t.removeAllHooks = function() {
|
|
9479
9494
|
Q = ua();
|
|
9480
9495
|
}, t;
|
|
@@ -9527,18 +9542,18 @@ var wg = class yc extends CustomEvent {
|
|
|
9527
9542
|
}
|
|
9528
9543
|
};
|
|
9529
9544
|
m(wg, "TYPE", "delete.image");
|
|
9530
|
-
var kg = class
|
|
9545
|
+
var kg = class Tc extends CustomEvent {
|
|
9531
9546
|
constructor(t) {
|
|
9532
|
-
super(
|
|
9547
|
+
super(Tc.TYPE, {
|
|
9533
9548
|
bubbles: !0,
|
|
9534
9549
|
detail: t
|
|
9535
9550
|
}), m(this, "handler", void 0), this.handler = t;
|
|
9536
9551
|
}
|
|
9537
9552
|
};
|
|
9538
9553
|
m(kg, "TYPE", "insert.image");
|
|
9539
|
-
var Eg = class
|
|
9554
|
+
var Eg = class _c extends CustomEvent {
|
|
9540
9555
|
constructor(t, r) {
|
|
9541
|
-
super(
|
|
9556
|
+
super(_c.TYPE, {
|
|
9542
9557
|
bubbles: !0,
|
|
9543
9558
|
detail: {
|
|
9544
9559
|
src: t,
|
|
@@ -9548,7 +9563,7 @@ var Eg = class Tc extends CustomEvent {
|
|
|
9548
9563
|
}
|
|
9549
9564
|
};
|
|
9550
9565
|
m(Eg, "TYPE", "delete.sound");
|
|
9551
|
-
var
|
|
9566
|
+
var Ag = class Sc extends CustomEvent {
|
|
9552
9567
|
constructor(t) {
|
|
9553
9568
|
super(Sc.TYPE, {
|
|
9554
9569
|
bubbles: !0,
|
|
@@ -9556,8 +9571,8 @@ var xg = class Sc extends CustomEvent {
|
|
|
9556
9571
|
}), m(this, "handler", void 0), this.handler = t;
|
|
9557
9572
|
}
|
|
9558
9573
|
};
|
|
9559
|
-
m(
|
|
9560
|
-
var
|
|
9574
|
+
m(Ag, "TYPE", "insert.sound");
|
|
9575
|
+
var xg = class wc extends CustomEvent {
|
|
9561
9576
|
constructor(t, r) {
|
|
9562
9577
|
super(wc.TYPE, {
|
|
9563
9578
|
bubbles: !0,
|
|
@@ -9569,12 +9584,12 @@ var Ag = class wc extends CustomEvent {
|
|
|
9569
9584
|
}), m(this, "component", void 0), m(this, "complete", void 0), this.component = t, this.complete = r;
|
|
9570
9585
|
}
|
|
9571
9586
|
};
|
|
9572
|
-
m(
|
|
9587
|
+
m(xg, "TYPE", "session-changed");
|
|
9573
9588
|
var ma;
|
|
9574
9589
|
(function(e) {
|
|
9575
9590
|
e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
|
|
9576
9591
|
})(ma || (ma = {}));
|
|
9577
|
-
function
|
|
9592
|
+
function _t(e, t) {
|
|
9578
9593
|
const r = `[${e}]`;
|
|
9579
9594
|
return {
|
|
9580
9595
|
debug: (n, ...i) => {
|
|
@@ -9588,14 +9603,14 @@ function Tt(e, t) {
|
|
|
9588
9603
|
function St() {
|
|
9589
9604
|
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
9590
9605
|
}
|
|
9591
|
-
var am =
|
|
9606
|
+
var am = _t("math-rendering", () => St()), lm = _t("pie-scoring", () => St()), cm = _t("pie-updates", () => St()), um = _t("pie-initialization", () => St()), fm = {
|
|
9592
9607
|
buildServiceBase: Zp,
|
|
9593
9608
|
bundleType: ko.player,
|
|
9594
9609
|
env: {
|
|
9595
9610
|
mode: "gather",
|
|
9596
9611
|
role: "student"
|
|
9597
9612
|
}
|
|
9598
|
-
}, dm =
|
|
9613
|
+
}, dm = _t("asset-handler", () => St()), hm = _t("authoring", () => St()), pm = _t("instrumentation-event-bridge", () => St()), gm = _t("instrumentation-provider-resolution", () => St()), mm = Object.freeze([
|
|
9599
9614
|
"composed",
|
|
9600
9615
|
"engine-ready",
|
|
9601
9616
|
"interactive",
|
|
@@ -9609,7 +9624,7 @@ var am = Tt("math-rendering", () => St()), lm = Tt("pie-scoring", () => St()), c
|
|
|
9609
9624
|
"timestamp",
|
|
9610
9625
|
"sourceRuntimeId"
|
|
9611
9626
|
])
|
|
9612
|
-
]), bm =
|
|
9627
|
+
]), bm = _t("pie-overrides", () => St()), kc = [
|
|
9613
9628
|
"a[href]",
|
|
9614
9629
|
"button:not([disabled])",
|
|
9615
9630
|
"input:not([disabled]):not([type='hidden'])",
|
|
@@ -9689,10 +9704,10 @@ var Lg = /* @__PURE__ */ tf('<svg xmlns="http://www.w3.org/2000/svg" class="pie-
|
|
|
9689
9704
|
.pie-tool-color-scheme__option.svelte-17qy4wk:focus-visible {outline:2px solid var(--pie-primary, #3f51b5);outline-offset:2px;}`
|
|
9690
9705
|
};
|
|
9691
9706
|
function Wg(e, t) {
|
|
9692
|
-
|
|
9707
|
+
Aa(t, !0), vf(e, Dg);
|
|
9693
9708
|
const r = typeof window < "u";
|
|
9694
9709
|
let n = On(t, "visible", 7, !1), i = On(t, "toolId", 7, "theme"), o = On(t, "schemes", 7, ""), s = On(t, "schemeCatalog", 7, null), a = /* @__PURE__ */ ke(void 0), l = /* @__PURE__ */ ke(null);
|
|
9695
|
-
const c = /* @__PURE__ */
|
|
9710
|
+
const c = /* @__PURE__ */ _i(() => w(l)?.toolCoordinator);
|
|
9696
9711
|
let u = /* @__PURE__ */ ke(!1);
|
|
9697
9712
|
Sr(() => {
|
|
9698
9713
|
if (w(a))
|
|
@@ -9705,18 +9720,18 @@ function Wg(e, t) {
|
|
|
9705
9720
|
text: "#000000",
|
|
9706
9721
|
primary: "#3f51b5"
|
|
9707
9722
|
};
|
|
9708
|
-
function h(k,
|
|
9723
|
+
function h(k, x) {
|
|
9709
9724
|
return {
|
|
9710
|
-
bg: k?.["--pie-background"] || k?.["--pie-secondary-background"] ||
|
|
9711
|
-
text: k?.["--pie-text"] ||
|
|
9712
|
-
primary: k?.["--pie-primary"] ||
|
|
9725
|
+
bg: k?.["--pie-background"] || k?.["--pie-secondary-background"] || x.bg,
|
|
9726
|
+
text: k?.["--pie-text"] || x.text,
|
|
9727
|
+
primary: k?.["--pie-primary"] || x.primary
|
|
9713
9728
|
};
|
|
9714
9729
|
}
|
|
9715
9730
|
function g(k) {
|
|
9716
9731
|
if (!k || typeof k != "object") return null;
|
|
9717
|
-
const
|
|
9732
|
+
const x = k, H = typeof x.id == "string" ? x.id.trim() : "";
|
|
9718
9733
|
if (!H) return null;
|
|
9719
|
-
const ae = typeof
|
|
9734
|
+
const ae = typeof x.name == "string" && x.name.trim() ? x.name.trim() : H, ot = typeof x.description == "string" ? x.description : "", be = x.preview;
|
|
9720
9735
|
return {
|
|
9721
9736
|
id: H,
|
|
9722
9737
|
name: ae,
|
|
@@ -9725,23 +9740,23 @@ function Wg(e, t) {
|
|
|
9725
9740
|
bg: be.bg,
|
|
9726
9741
|
text: be.text,
|
|
9727
9742
|
primary: be.primary
|
|
9728
|
-
} : h(typeof
|
|
9743
|
+
} : h(typeof x.variables == "object" && x.variables ? x.variables : void 0, f)
|
|
9729
9744
|
};
|
|
9730
9745
|
}
|
|
9731
9746
|
function v(k) {
|
|
9732
9747
|
if (!k?.trim()) return [];
|
|
9733
9748
|
try {
|
|
9734
|
-
const
|
|
9735
|
-
return Array.isArray(
|
|
9749
|
+
const x = JSON.parse(k);
|
|
9750
|
+
return Array.isArray(x) ? x.map((H) => g(H)).filter((H) => !!H) : [];
|
|
9736
9751
|
} catch {
|
|
9737
9752
|
return [];
|
|
9738
9753
|
}
|
|
9739
9754
|
}
|
|
9740
|
-
function
|
|
9755
|
+
function T() {
|
|
9741
9756
|
const k = w(a)?.closest("pie-theme");
|
|
9742
9757
|
if (k) return k;
|
|
9743
|
-
const
|
|
9744
|
-
return
|
|
9758
|
+
const x = document.querySelector('pie-theme[scope="document"]');
|
|
9759
|
+
return x || document.querySelector("pie-theme");
|
|
9745
9760
|
}
|
|
9746
9761
|
function b() {
|
|
9747
9762
|
return Fp().map((k) => ({
|
|
@@ -9751,15 +9766,15 @@ function Wg(e, t) {
|
|
|
9751
9766
|
preview: k.preview || h(k.variables, f)
|
|
9752
9767
|
}));
|
|
9753
9768
|
}
|
|
9754
|
-
const
|
|
9769
|
+
const _ = /* @__PURE__ */ _i(() => {
|
|
9755
9770
|
if (Array.isArray(s()) && s().length > 0) {
|
|
9756
9771
|
const H = s().map((ae) => g(ae)).filter((ae) => !!ae);
|
|
9757
9772
|
if (H.length > 0) return H;
|
|
9758
9773
|
}
|
|
9759
9774
|
const k = v(o());
|
|
9760
9775
|
if (k.length > 0) return k;
|
|
9761
|
-
const
|
|
9762
|
-
return
|
|
9776
|
+
const x = b();
|
|
9777
|
+
return x.length > 0 ? x : [{
|
|
9763
9778
|
id: "default",
|
|
9764
9779
|
name: "Default",
|
|
9765
9780
|
description: "",
|
|
@@ -9769,8 +9784,8 @@ function Wg(e, t) {
|
|
|
9769
9784
|
let I = /* @__PURE__ */ ke("default"), N = /* @__PURE__ */ ke(!1), S = null;
|
|
9770
9785
|
function F(k) {
|
|
9771
9786
|
if (!r) return;
|
|
9772
|
-
const
|
|
9773
|
-
if (
|
|
9787
|
+
const x = T();
|
|
9788
|
+
if (x) x.setAttribute("scheme", k || "default");
|
|
9774
9789
|
else {
|
|
9775
9790
|
const H = document.documentElement;
|
|
9776
9791
|
k === "default" ? H.removeAttribute("data-color-scheme") : H.setAttribute("data-color-scheme", k);
|
|
@@ -9783,25 +9798,25 @@ function Wg(e, t) {
|
|
|
9783
9798
|
function se() {
|
|
9784
9799
|
oe(N, !w(N));
|
|
9785
9800
|
}
|
|
9786
|
-
let ee = /* @__PURE__ */
|
|
9801
|
+
let ee = /* @__PURE__ */ _i(() => w(_).find((k) => k.id === w(I)) || w(_)[0] || {
|
|
9787
9802
|
id: "default",
|
|
9788
9803
|
name: "Default",
|
|
9789
9804
|
description: "",
|
|
9790
9805
|
preview: f
|
|
9791
9806
|
});
|
|
9792
9807
|
Sr(() => {
|
|
9793
|
-
w(
|
|
9808
|
+
w(_).find((k) => k.id === w(I)) || oe(I, w(_)[0]?.id || "default", !0);
|
|
9794
9809
|
});
|
|
9795
9810
|
function it(k) {
|
|
9796
9811
|
if (k.key === "Escape")
|
|
9797
9812
|
w(N) && oe(N, !1);
|
|
9798
9813
|
else if (w(N) && (k.key === "ArrowDown" || k.key === "ArrowUp")) {
|
|
9799
9814
|
k.preventDefault();
|
|
9800
|
-
const
|
|
9801
|
-
if (!
|
|
9802
|
-
const H = Array.from(
|
|
9815
|
+
const x = w(a)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
|
|
9816
|
+
if (!x || x.length === 0) return;
|
|
9817
|
+
const H = Array.from(x).findIndex((ot) => ot === document.activeElement);
|
|
9803
9818
|
let ae;
|
|
9804
|
-
k.key === "ArrowDown" ? ae = H === -1 ? 0 : (H + 1) %
|
|
9819
|
+
k.key === "ArrowDown" ? ae = H === -1 ? 0 : (H + 1) % x.length : ae = H === -1 ? x.length - 1 : (H - 1 + x.length) % x.length, x[ae]?.focus();
|
|
9805
9820
|
}
|
|
9806
9821
|
}
|
|
9807
9822
|
Sr(() => {
|
|
@@ -9812,14 +9827,14 @@ function Wg(e, t) {
|
|
|
9812
9827
|
!n() && S ? (S(), S = null) : n() && w(a) && !S && (S = Mg(w(a)));
|
|
9813
9828
|
}), ff(() => {
|
|
9814
9829
|
if (r) {
|
|
9815
|
-
const
|
|
9830
|
+
const x = T()?.getAttribute("scheme"), H = Ig("pie-color-scheme") ?? x ?? "default";
|
|
9816
9831
|
oe(I, H, !0), H && requestAnimationFrame(() => {
|
|
9817
9832
|
F(H);
|
|
9818
9833
|
});
|
|
9819
9834
|
}
|
|
9820
|
-
function k(
|
|
9835
|
+
function k(x) {
|
|
9821
9836
|
if (!w(N)) return;
|
|
9822
|
-
const H =
|
|
9837
|
+
const H = x.composedPath();
|
|
9823
9838
|
(!w(a) || !H.includes(w(a))) && oe(N, !1);
|
|
9824
9839
|
}
|
|
9825
9840
|
return document.addEventListener("click", k), () => {
|
|
@@ -9852,7 +9867,7 @@ function Wg(e, t) {
|
|
|
9852
9867
|
s(k), Jr();
|
|
9853
9868
|
}
|
|
9854
9869
|
}, Q = rf(), wt = Hu(Q), sr = (k) => {
|
|
9855
|
-
var
|
|
9870
|
+
var x = $g(), H = fe(x), ae = ct(fe(H), 2), ot = fe(ae), be = fe(ot), ar = fe(be), K = fe(ar), pn = ct(K, 2);
|
|
9856
9871
|
ce(ar), ce(be);
|
|
9857
9872
|
var Z = ct(be, 2), lr = fe(Z), j = fe(lr, !0);
|
|
9858
9873
|
ce(lr);
|
|
@@ -9860,7 +9875,7 @@ function Wg(e, t) {
|
|
|
9860
9875
|
ce(kt), ce(Z), Sa(2), ce(ot), ce(ae);
|
|
9861
9876
|
var Ve = ct(ae, 2), gn = (st) => {
|
|
9862
9877
|
var ur = Ng();
|
|
9863
|
-
pf(ur, 21, () => w(
|
|
9878
|
+
pf(ur, 21, () => w(_), (fr) => fr.id, (fr, ne) => {
|
|
9864
9879
|
var Se = Pg();
|
|
9865
9880
|
let Ge;
|
|
9866
9881
|
var Lt = fe(Se), Pt = fe(Lt), at = fe(Pt), dr = ct(at, 2);
|
|
@@ -9869,26 +9884,26 @@ function Wg(e, t) {
|
|
|
9869
9884
|
ce(hr);
|
|
9870
9885
|
var vn = ct(hr, 2), $r = fe(vn, !0);
|
|
9871
9886
|
ce(vn), ce(Et);
|
|
9872
|
-
var Nt = ct(Et, 2),
|
|
9887
|
+
var Nt = ct(Et, 2), At = (ye) => {
|
|
9873
9888
|
var Dr = Lg();
|
|
9874
9889
|
wr(ye, Dr);
|
|
9875
9890
|
};
|
|
9876
9891
|
Ei(Nt, (ye) => {
|
|
9877
|
-
w(I) === w(ne).id && ye(
|
|
9892
|
+
w(I) === w(ne).id && ye(At);
|
|
9878
9893
|
}), ce(Se), Ss(() => {
|
|
9879
|
-
Ge =
|
|
9894
|
+
Ge = Tf(Se, 1, "pie-tool-color-scheme__option svelte-17qy4wk", null, Ge, { "pie-tool-color-scheme__option--active": w(I) === w(ne).id }), Ci(Se, "aria-label", w(ne).name), Ci(Se, "aria-current", w(I) === w(ne).id), mr(Pt, `background-color: ${w(ne).preview.bg ?? ""}`), mr(at, `color: ${w(ne).preview.text ?? ""}`), mr(dr, `background-color: ${w(ne).preview.primary ?? ""}`), An(mn, w(ne).name), An($r, w(ne).description);
|
|
9880
9895
|
}), Si("click", Se, () => B(w(ne).id)), wr(fr, Se);
|
|
9881
9896
|
}), ce(ur), wr(st, ur);
|
|
9882
9897
|
};
|
|
9883
9898
|
Ei(Ve, (st) => {
|
|
9884
9899
|
w(N) && st(gn);
|
|
9885
|
-
}), ce(H), ce(
|
|
9886
|
-
Ci(ae, "aria-expanded", w(N)), mr(ar, `background-color: ${w(ee).preview.bg ?? ""}`), mr(K, `color: ${w(ee).preview.text ?? ""}`), mr(pn, `background-color: ${w(ee).preview.primary ?? ""}`),
|
|
9887
|
-
}), Si("keydown",
|
|
9900
|
+
}), ce(H), ce(x), xf(x, (st) => oe(a, st), () => w(a)), Ss(() => {
|
|
9901
|
+
Ci(ae, "aria-expanded", w(N)), mr(ar, `background-color: ${w(ee).preview.bg ?? ""}`), mr(K, `color: ${w(ee).preview.text ?? ""}`), mr(pn, `background-color: ${w(ee).preview.primary ?? ""}`), An(j, w(ee).name), An(cr, w(ee).description);
|
|
9902
|
+
}), Si("keydown", x, it), Si("click", ae, se), wr(k, x);
|
|
9888
9903
|
};
|
|
9889
9904
|
return Ei(wt, (k) => {
|
|
9890
9905
|
n() && k(sr);
|
|
9891
|
-
}), wr(e, Q),
|
|
9906
|
+
}), wr(e, Q), xa(J);
|
|
9892
9907
|
}
|
|
9893
9908
|
Ju(["keydown", "click"]);
|
|
9894
9909
|
customElements.define("pie-tool-theme", If(Wg, {
|