@pie-players/pie-tool-line-reader 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.
@@ -52,13 +52,13 @@ function xa(e) {
52
52
  function Ea() {
53
53
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
54
54
  }
55
- function Ma(e) {
55
+ function Aa(e) {
56
56
  throw new Error("https://svelte.dev/e/effect_orphan");
57
57
  }
58
- function Ca() {
58
+ function Ma() {
59
59
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
60
60
  }
61
- function Aa() {
61
+ function Ca() {
62
62
  throw new Error("https://svelte.dev/e/hydration_failed");
63
63
  }
64
64
  function Oa(e) {
@@ -96,18 +96,18 @@ function ce(e) {
96
96
  return O = e;
97
97
  }
98
98
  function xr() {
99
- return ce(/* @__PURE__ */ Me(O));
99
+ return ce(/* @__PURE__ */ Ae(O));
100
100
  }
101
101
  function ti(e) {
102
102
  if (I) {
103
- if (/* @__PURE__ */ Me(O) !== null)
103
+ if (/* @__PURE__ */ Ae(O) !== null)
104
104
  throw kn(), dt;
105
105
  O = e;
106
106
  }
107
107
  }
108
108
  function Qi(e = 1) {
109
109
  if (I) {
110
- for (var t = e, n = O; t--; ) n = /* @__PURE__ */ Me(n);
110
+ for (var t = e, n = O; t--; ) n = /* @__PURE__ */ Ae(n);
111
111
  O = n;
112
112
  }
113
113
  }
@@ -120,7 +120,7 @@ function Zi(e = !0) {
120
120
  t -= 1;
121
121
  } else (r === "[" || r === "[!" || r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
122
122
  }
123
- var i = /* @__PURE__ */ Me(n);
123
+ var i = /* @__PURE__ */ Ae(n);
124
124
  e && n.remove(), n = i;
125
125
  }
126
126
  }
@@ -169,7 +169,7 @@ function ro(e) {
169
169
  var t = L, n = t.e;
170
170
  if (n !== null) {
171
171
  t.e = null;
172
- for (var r of n) Ao(r);
172
+ for (var r of n) Co(r);
173
173
  }
174
174
  return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
175
175
  }
@@ -196,7 +196,7 @@ function Ba() {
196
196
  function oo(e) {
197
197
  var t = S;
198
198
  if (t === null)
199
- return M.f |= cn, e;
199
+ return A.f |= cn, e;
200
200
  if ((t.f & 32768) === 0 && (t.f & 4) === 0)
201
201
  throw e;
202
202
  Pe(e, t);
@@ -243,7 +243,7 @@ function ja(e) {
243
243
  function lo(e, t) {
244
244
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
245
245
  }
246
- function Mr(e, t) {
246
+ function Ar(e, t) {
247
247
  lo(e, t), t.add(e);
248
248
  }
249
249
  function _(e, t, n) {
@@ -262,7 +262,7 @@ function d(e, t) {
262
262
  var co, un = null, it = null, x = null, Xn = null, q = null, Jn = null, It = !1, Ln = !1, gt = null, hn = null, uo = 0;
263
263
  var Va = 1, dn = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), fn = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), tt = class ho {
264
264
  constructor() {
265
- Mr(this, W), g(this, "id", Va++), _(this, dn, !1), g(this, "linked", !0), _(this, Ve, null), _(this, Be, null), g(this, "async_deriveds", /* @__PURE__ */ new Map()), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), _(this, fn, /* @__PURE__ */ new Set()), _(this, Gt, /* @__PURE__ */ new Set()), _(this, ot, 0), _(this, ze, /* @__PURE__ */ new Map()), _(this, xt, null), _(this, Z, []), _(this, Qn, []), _(this, Je, /* @__PURE__ */ new Set()), _(this, Te, /* @__PURE__ */ new Set()), _(this, Le, /* @__PURE__ */ new Map()), _(this, Qt, /* @__PURE__ */ new Set()), g(this, "is_fork", !1), _(this, Et, !1), it === null ? un = it = this : (T(Be, it, this), T(Ve, this, it)), it = this;
265
+ Ar(this, W), g(this, "id", Va++), _(this, dn, !1), g(this, "linked", !0), _(this, Ve, null), _(this, Be, null), g(this, "async_deriveds", /* @__PURE__ */ new Map()), g(this, "current", /* @__PURE__ */ new Map()), g(this, "previous", /* @__PURE__ */ new Map()), _(this, fn, /* @__PURE__ */ new Set()), _(this, Gt, /* @__PURE__ */ new Set()), _(this, ot, 0), _(this, ze, /* @__PURE__ */ new Map()), _(this, xt, null), _(this, Z, []), _(this, Qn, []), _(this, Je, /* @__PURE__ */ new Set()), _(this, Te, /* @__PURE__ */ new Set()), _(this, Le, /* @__PURE__ */ new Map()), _(this, Qt, /* @__PURE__ */ new Set()), g(this, "is_fork", !1), _(this, Et, !1), it === null ? un = it = this : (T(Be, it, this), T(Ve, this, it)), it = this;
266
266
  }
267
267
  skip_effect(t) {
268
268
  d(Le, this).has(t) || d(Le, this).set(t, {
@@ -371,7 +371,7 @@ var Va = 1, dn = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap
371
371
  for (var n = t; n.parent !== null; ) {
372
372
  n = n.parent;
373
373
  var r = n.f;
374
- if (gt !== null && n === S && (_e || (M === null || (M.f & 2) === 0) && !Fa))
374
+ if (gt !== null && n === S && (_e || (A === null || (A.f & 2) === 0) && !Fa))
375
375
  return;
376
376
  if ((r & 96) !== 0) {
377
377
  if ((r & 1024) === 0) return;
@@ -415,14 +415,14 @@ function pn() {
415
415
  for (const a of r) i.schedule(a);
416
416
  }
417
417
  if (gt = null, hn = null, k(W, this, ri).call(this)) {
418
- k(W, this, Mt).call(this, n), k(W, this, Mt).call(this, t);
418
+ k(W, this, At).call(this, n), k(W, this, At).call(this, t);
419
419
  for (const [a, l] of d(Le, this)) go(a, l);
420
420
  r.length > 0 && k(W, x, pn).call(x);
421
421
  return;
422
422
  }
423
423
  const o = k(W, this, qa).call(this);
424
424
  if (o) {
425
- k(W, this, Mt).call(this, n), k(W, this, Mt).call(this, t), k(W, o, Ua).call(o, this);
425
+ k(W, this, At).call(this, n), k(W, this, At).call(this, t), k(W, o, Ua).call(o, this);
426
426
  return;
427
427
  }
428
428
  d(Je, this).clear(), d(Te, this).clear();
@@ -489,7 +489,7 @@ function Ua(e) {
489
489
  for (const n of this.current.keys()) t(n);
490
490
  this.oncommit(() => e.discard()), k(W, e, gn).call(e), x = this, k(W, this, pn).call(this);
491
491
  }
492
- function Mt(e) {
492
+ function At(e) {
493
493
  for (var t = 0; t < e.length; t += 1) ao(e[t], d(Je, this), d(Te, this));
494
494
  }
495
495
  function Ga() {
@@ -513,7 +513,7 @@ function Ga() {
513
513
  e && c.discard();
514
514
  else if (t.length > 0) {
515
515
  if (e) for (const u of d(Qt, this)) c.unskip_effect(u, (h) => {
516
- (h.f & 4194320) !== 0 ? c.schedule(h) : k(W, c, Mt).call(c, [h]);
516
+ (h.f & 4194320) !== 0 ? c.schedule(h) : k(W, c, At).call(c, [h]);
517
517
  });
518
518
  c.activate();
519
519
  var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
@@ -524,7 +524,7 @@ function Ga() {
524
524
  return f ? f[0] !== h[0] || f[1] !== h[1] : !0;
525
525
  }).map(([u]) => u);
526
526
  if (a.length > 0)
527
- for (const u of d(Qn, this)) (u.f & 155648) === 0 && Cr(u, a, o) && ((u.f & 4194320) !== 0 ? (N(u, re), c.schedule(u)) : d(Je, c).add(u));
527
+ for (const u of d(Qn, this)) (u.f & 155648) === 0 && Mr(u, a, o) && ((u.f & 4194320) !== 0 ? (N(u, re), c.schedule(u)) : d(Je, c).add(u));
528
528
  if (d(Z, c).length > 0 && !d(Et, c)) {
529
529
  c.apply();
530
530
  for (var l of d(Z, c)) k(W, c, fo).call(c, l, [], []);
@@ -561,7 +561,7 @@ function Ya() {
561
561
  var t;
562
562
  }
563
563
  try {
564
- Ca();
564
+ Ma();
565
565
  } catch (n) {
566
566
  Pe(n, Jn);
567
567
  }
@@ -595,20 +595,20 @@ function po(e, t, n, r) {
595
595
  if (!n.has(e) && (n.add(e), e.reactions !== null))
596
596
  for (const i of e.reactions) {
597
597
  const o = i.f;
598
- (o & 2) !== 0 ? po(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && Cr(i, t, r) && (N(i, re), Ar(i));
598
+ (o & 2) !== 0 ? po(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && Mr(i, t, r) && (N(i, re), Cr(i));
599
599
  }
600
600
  }
601
- function Cr(e, t, n) {
601
+ function Mr(e, t, n) {
602
602
  const r = n.get(e);
603
603
  if (r !== void 0) return r;
604
604
  if (e.deps !== null) for (const i of e.deps) {
605
605
  if (sn.call(t, i)) return !0;
606
- if ((i.f & 2) !== 0 && Cr(i, t, n))
606
+ if ((i.f & 2) !== 0 && Mr(i, t, n))
607
607
  return n.set(i, !0), !0;
608
608
  }
609
609
  return n.set(e, !1), !1;
610
610
  }
611
- function Ar(e) {
611
+ function Cr(e) {
612
612
  x.schedule(e);
613
613
  }
614
614
  function go(e, t) {
@@ -639,7 +639,7 @@ function Ja(e, t, n, r) {
639
639
  }
640
640
  var ae = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakSet(), Qa = class {
641
641
  constructor(e, t, n, r) {
642
- Mr(this, j), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), _(this, ae, void 0), _(this, er, I ? O : null), _(this, de, void 0), _(this, Rt, void 0), _(this, ee, void 0), _(this, pe, null), _(this, X, null), _(this, oe, null), _(this, qe, null), _(this, st, 0), _(this, Ue, 0), _(this, Yt, !1), _(this, tr, /* @__PURE__ */ new Set()), _(this, nr, /* @__PURE__ */ new Set()), _(this, Ne, null), _(this, oi, Ka(() => (T(Ne, this, Ht(d(st, this))), () => {
642
+ Ar(this, j), g(this, "parent", void 0), g(this, "is_pending", !1), g(this, "transform_error", void 0), _(this, ae, void 0), _(this, er, I ? O : null), _(this, de, void 0), _(this, Rt, void 0), _(this, ee, void 0), _(this, pe, null), _(this, X, null), _(this, oe, null), _(this, qe, null), _(this, st, 0), _(this, Ue, 0), _(this, Yt, !1), _(this, tr, /* @__PURE__ */ new Set()), _(this, nr, /* @__PURE__ */ new Set()), _(this, Ne, null), _(this, oi, Ka(() => (T(Ne, this, Ht(d(st, this))), () => {
643
643
  T(Ne, this, null);
644
644
  }))), T(ae, this, e), T(de, this, t), T(Rt, this, (i) => {
645
645
  var o = S;
@@ -721,7 +721,7 @@ function Or(e) {
721
721
  this.is_pending = !1, e.transfer_effects(d(tr, this), d(nr, this));
722
722
  }
723
723
  function rr(e) {
724
- var t = S, n = M, r = L;
724
+ var t = S, n = A, r = L;
725
725
  ge(d(ee, this)), ne(d(ee, this)), ft(d(ee, this).ctx);
726
726
  try {
727
727
  return tt.ensure(), e();
@@ -818,7 +818,7 @@ function nl(e, t, n, r) {
818
818
  }) : h();
819
819
  }
820
820
  function rl() {
821
- var e = S, t = M, n = L, r = x;
821
+ var e = S, t = A, n = L, r = x;
822
822
  if (0) var i;
823
823
  return function(s = !0) {
824
824
  ge(e), ne(t), ft(n), s && (e.f & 16384) === 0 && (r?.activate(), r?.apply());
@@ -856,7 +856,7 @@ var Kt = /* @__PURE__ */ Symbol("obsolete");
856
856
  function il(e, t, n) {
857
857
  let r = S;
858
858
  r === null && ka();
859
- var i = void 0, o = Ht(B), s = !M, a = /* @__PURE__ */ new Set();
859
+ var i = void 0, o = Ht(B), s = !A, a = /* @__PURE__ */ new Set();
860
860
  return bl(() => {
861
861
  var l = S, c = Xi();
862
862
  i = c.promise;
@@ -963,7 +963,7 @@ function al(e, t = !1, n = !0) {
963
963
  return r;
964
964
  }
965
965
  function $(e, t, n = !1) {
966
- M !== null && (!se || (M.f & 131072) !== 0) && zt() && (M.f & 4325394) !== 0 && (le === null || !le.has(e)) && Ra();
966
+ A !== null && (!se || (A.f & 131072) !== 0) && zt() && (A.f & 4325394) !== 0 && (le === null || !le.has(e)) && Ra();
967
967
  let r = n ? fe(t) : t;
968
968
  return yn(e, r, hn);
969
969
  }
@@ -1009,7 +1009,7 @@ function ko(e, t, n) {
1009
1009
  q?.delete(u), (l & 65536) === 0 && (l & 512 && (S === null || (S.f & 2097152) === 0) && (a.f |= Nt), ko(u, et, n));
1010
1010
  } else if (c) {
1011
1011
  var h = a;
1012
- (l & 16) !== 0 && he !== null && he.add(h), n !== null ? n.push(h) : Ar(h);
1012
+ (l & 16) !== 0 && he !== null && he.add(h), n !== null ? n.push(h) : Cr(h);
1013
1013
  }
1014
1014
  }
1015
1015
  }
@@ -1021,7 +1021,7 @@ function fe(e) {
1021
1021
  if (t !== fa && t !== pa) return e;
1022
1022
  var n = /* @__PURE__ */ new Map(), r = ca(e), i = /* @__PURE__ */ z(0), o = null, s = Ye, a = (h) => {
1023
1023
  if (Ye === s) return h();
1024
- var f = M, p = Ye;
1024
+ var f = A, p = Ye;
1025
1025
  ne(null), fi(s);
1026
1026
  var m = h();
1027
1027
  return ne(f), fi(p), m;
@@ -1105,8 +1105,8 @@ function fe(e) {
1105
1105
  var F = a(() => fe(p));
1106
1106
  $(y, F);
1107
1107
  }
1108
- var C = Reflect.getOwnPropertyDescriptor(h, f);
1109
- if (C?.set && C.set.call(m, p), !b) {
1108
+ var M = Reflect.getOwnPropertyDescriptor(h, f);
1109
+ if (M?.set && M.set.call(m, p), !b) {
1110
1110
  if (r && typeof f == "string") {
1111
1111
  var U = n.get("length"), H = Number(f);
1112
1112
  Number.isInteger(H) && H >= U.v && $(U, H + 1);
@@ -1132,12 +1132,12 @@ function fe(e) {
1132
1132
  function ul(e, t) {
1133
1133
  return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : cl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1134
1134
  }
1135
- var li, hl, xo, Eo, Mo;
1135
+ var li, hl, xo, Eo, Ao;
1136
1136
  function ir() {
1137
1137
  if (li === void 0) {
1138
1138
  li = window, hl = document, xo = /Firefox/.test(navigator.userAgent);
1139
1139
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1140
- Eo = je(t, "firstChild").get, Mo = je(t, "nextSibling").get, Qr(e) && (e[Yn] = void 0, e[Gn] = null, e[Kn] = void 0, e.__e = void 0), Qr(n) && (n[Jt] = void 0);
1140
+ Eo = je(t, "firstChild").get, Ao = je(t, "nextSibling").get, Qr(e) && (e[Yn] = void 0, e[Gn] = null, e[Kn] = void 0, e.__e = void 0), Qr(n) && (n[Jt] = void 0);
1141
1141
  }
1142
1142
  }
1143
1143
  function Se(e = "") {
@@ -1148,8 +1148,8 @@ function vt(e) {
1148
1148
  return Eo.call(e);
1149
1149
  }
1150
1150
  // @__NO_SIDE_EFFECTS__
1151
- function Me(e) {
1152
- return Mo.call(e);
1151
+ function Ae(e) {
1152
+ return Ao.call(e);
1153
1153
  }
1154
1154
  function ci(e, t) {
1155
1155
  if (!I) return /* @__PURE__ */ vt(e);
@@ -1164,7 +1164,7 @@ function ci(e, t) {
1164
1164
  function Pn(e, t = !1) {
1165
1165
  if (!I) {
1166
1166
  var n = /* @__PURE__ */ vt(e);
1167
- return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Me(n) : n;
1167
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Ae(n) : n;
1168
1168
  }
1169
1169
  if (t) {
1170
1170
  if (O?.nodeType !== 3) {
@@ -1178,7 +1178,7 @@ function Pn(e, t = !1) {
1178
1178
  function St(e, t = 1, n = !1) {
1179
1179
  let r = I ? O : e;
1180
1180
  for (var i; t--; )
1181
- i = r, r = /* @__PURE__ */ Me(r);
1181
+ i = r, r = /* @__PURE__ */ Ae(r);
1182
1182
  if (!I) return r;
1183
1183
  if (n) {
1184
1184
  if (r?.nodeType !== 3) {
@@ -1204,8 +1204,8 @@ function Rr(e) {
1204
1204
  for (; t !== null && t.nodeType === 3; )
1205
1205
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1206
1206
  }
1207
- function Co(e) {
1208
- var t = M, n = S;
1207
+ function Mo(e) {
1208
+ var t = A, n = S;
1209
1209
  ne(null), ge(null);
1210
1210
  try {
1211
1211
  return e();
@@ -1214,7 +1214,7 @@ function Co(e) {
1214
1214
  }
1215
1215
  }
1216
1216
  function pl(e) {
1217
- S === null && (M === null && Ma(e), Ea()), ke && xa(e);
1217
+ S === null && (A === null && Aa(e), Ea()), ke && xa(e);
1218
1218
  }
1219
1219
  function gl(e, t) {
1220
1220
  var n = t.last;
@@ -1250,28 +1250,28 @@ function ve(e, t) {
1250
1250
  }
1251
1251
  i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= kr));
1252
1252
  }
1253
- if (i !== null && (i.parent = n, n !== null && gl(i, n), M !== null && (M.f & 2) !== 0 && (e & 64) === 0)) {
1254
- var o = M;
1253
+ if (i !== null && (i.parent = n, n !== null && gl(i, n), A !== null && (A.f & 2) !== 0 && (e & 64) === 0)) {
1254
+ var o = A;
1255
1255
  (o.effects ?? (o.effects = [])).push(i);
1256
1256
  }
1257
1257
  return r;
1258
1258
  }
1259
1259
  function Lr() {
1260
- return M !== null && !se;
1260
+ return A !== null && !se;
1261
1261
  }
1262
1262
  function vl(e) {
1263
1263
  const t = ve(8, null);
1264
1264
  return N(t, te), t.teardown = e, t;
1265
1265
  }
1266
- function Ct(e) {
1266
+ function Mt(e) {
1267
1267
  pl("$effect");
1268
1268
  var t = S.f;
1269
- if (!M && (t & 32) !== 0 && L !== null && !L.i) {
1269
+ if (!A && (t & 32) !== 0 && L !== null && !L.i) {
1270
1270
  var n = L;
1271
1271
  (n.e ?? (n.e = [])).push(e);
1272
- } else return Ao(e);
1272
+ } else return Co(e);
1273
1273
  }
1274
- function Ao(e) {
1274
+ function Co(e) {
1275
1275
  return ve(4 | ya, e);
1276
1276
  }
1277
1277
  function ml(e) {
@@ -1314,7 +1314,7 @@ function we(e) {
1314
1314
  function $o(e) {
1315
1315
  var t = e.teardown;
1316
1316
  if (t !== null) {
1317
- const n = ke, r = M;
1317
+ const n = ke, r = A;
1318
1318
  di(!0), ne(null);
1319
1319
  try {
1320
1320
  t.call(null);
@@ -1327,7 +1327,7 @@ function Nr(e, t = !1) {
1327
1327
  var n = e.first;
1328
1328
  for (e.first = e.last = null; n !== null; ) {
1329
1329
  const i = n.ac;
1330
- i !== null && Co(() => {
1330
+ i !== null && Mo(() => {
1331
1331
  i.abort(wn);
1332
1332
  });
1333
1333
  var r = n.next;
@@ -1351,7 +1351,7 @@ function Y(e, t = !0) {
1351
1351
  }
1352
1352
  function _l(e, t) {
1353
1353
  for (; e !== null; ) {
1354
- var n = e === t ? null : /* @__PURE__ */ Me(e);
1354
+ var n = e === t ? null : /* @__PURE__ */ Ae(e);
1355
1355
  e.remove(), e = n;
1356
1356
  }
1357
1357
  }
@@ -1404,7 +1404,7 @@ function Po(e, t) {
1404
1404
  function No(e, t) {
1405
1405
  if (e.nodes)
1406
1406
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1407
- var i = n === r ? null : /* @__PURE__ */ Me(n);
1407
+ var i = n === r ? null : /* @__PURE__ */ Ae(n);
1408
1408
  t.append(n), n = i;
1409
1409
  }
1410
1410
  }
@@ -1412,9 +1412,9 @@ var Sl = null, Zt = !1, ke = !1;
1412
1412
  function di(e) {
1413
1413
  ke = e;
1414
1414
  }
1415
- var M = null, se = !1;
1415
+ var A = null, se = !1;
1416
1416
  function ne(e) {
1417
- M = e;
1417
+ A = e;
1418
1418
  }
1419
1419
  var S = null;
1420
1420
  function ge(e) {
@@ -1422,7 +1422,7 @@ function ge(e) {
1422
1422
  }
1423
1423
  var le = null;
1424
1424
  function Wo(e) {
1425
- M !== null && (!_e || (M.f & 2) !== 0) && (le ?? (le = /* @__PURE__ */ new Set())).add(e);
1425
+ A !== null && (!_e || (A.f & 2) !== 0) && (le ?? (le = /* @__PURE__ */ new Set())).add(e);
1426
1426
  }
1427
1427
  var G = null, K = 0, Q = null;
1428
1428
  function wl(e) {
@@ -1452,12 +1452,12 @@ function Bo(e, t, n = !0) {
1452
1452
  if (r !== null && !(!_e && le !== null && le.has(e)))
1453
1453
  for (var i = 0; i < r.length; i++) {
1454
1454
  var o = r[i];
1455
- (o.f & 2) !== 0 ? Bo(o, t, !1) : t === o && (n ? N(o, re) : (o.f & 1024) !== 0 && N(o, et), Ar(o));
1455
+ (o.f & 2) !== 0 ? Bo(o, t, !1) : t === o && (n ? N(o, re) : (o.f & 1024) !== 0 && N(o, et), Cr(o));
1456
1456
  }
1457
1457
  }
1458
1458
  function Do(e) {
1459
- var t = G, n = K, r = Q, i = M, o = le, s = L, a = se, l = Ye, c = e.f;
1460
- G = null, K = 0, Q = null, M = (c & 96) === 0 ? e : null, le = null, ft(e.ctx), se = !1, Ye = ++De, e.ac !== null && (Co(() => {
1459
+ var t = G, n = K, r = Q, i = A, o = le, s = L, a = se, l = Ye, c = e.f;
1460
+ G = null, K = 0, Q = null, A = (c & 96) === 0 ? e : null, le = null, ft(e.ctx), se = !1, Ye = ++De, e.ac !== null && (Mo(() => {
1461
1461
  e.ac.abort(wn);
1462
1462
  }), e.ac = null);
1463
1463
  try {
@@ -1485,7 +1485,7 @@ function Do(e) {
1485
1485
  } catch (b) {
1486
1486
  return oo(b);
1487
1487
  } finally {
1488
- e.f ^= ei, G = t, K = n, Q = r, M = i, le = o, ft(s), se = a, Ye = l;
1488
+ e.f ^= ei, G = t, K = n, Q = r, A = i, le = o, ft(s), se = a, Ye = l;
1489
1489
  }
1490
1490
  }
1491
1491
  function kl(e, t) {
@@ -1526,21 +1526,21 @@ function mt(e) {
1526
1526
  }
1527
1527
  function v(e) {
1528
1528
  var t = (e.f & 2) !== 0;
1529
- if (Sl?.add(e), M !== null && !se && !(S !== null && (S.f & 16384) !== 0) && (le === null || !le.has(e))) {
1530
- var n = M.deps;
1531
- if ((M.f & 2097152) !== 0)
1529
+ if (Sl?.add(e), A !== null && !se && !(S !== null && (S.f & 16384) !== 0) && (le === null || !le.has(e))) {
1530
+ var n = A.deps;
1531
+ if ((A.f & 2097152) !== 0)
1532
1532
  e.rv < De && (e.rv = De, G === null && n !== null && n[K] === e ? K++ : G === null ? G = [e] : G.push(e));
1533
1533
  else {
1534
1534
  var r;
1535
- (r = M).deps ?? (r.deps = []), sn.call(M.deps, e) || M.deps.push(e);
1535
+ (r = A).deps ?? (r.deps = []), sn.call(A.deps, e) || A.deps.push(e);
1536
1536
  var i = e.reactions;
1537
- i === null ? e.reactions = [M] : sn.call(i, M) || i.push(M);
1537
+ i === null ? e.reactions = [A] : sn.call(i, A) || i.push(A);
1538
1538
  }
1539
1539
  }
1540
1540
  if (0) {
1541
1541
  if (!se && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1542
1542
  var o;
1543
- if (tracing_mode_flag && !se && tracing_expressions !== null && M !== null && tracing_expressions.reaction === M && !e.trace) {
1543
+ if (tracing_mode_flag && !se && tracing_expressions !== null && A !== null && tracing_expressions.reaction === A && !e.trace) {
1544
1544
  if (o)
1545
1545
  var s, a;
1546
1546
  }
@@ -1552,7 +1552,7 @@ function v(e) {
1552
1552
  var c = l.v;
1553
1553
  return ((l.f & 1024) === 0 && l.reactions !== null || jo(l)) && (c = Ir(l)), Ge.set(l, c), c;
1554
1554
  }
1555
- var u = (l.f & 512) === 0 && !se && M !== null && (Zt || (M.f & 512) !== 0), h = (l.f & wr) === 0;
1555
+ var u = (l.f & 512) === 0 && !se && A !== null && (Zt || (A.f & 512) !== 0), h = (l.f & wr) === 0;
1556
1556
  Dt(l) && (u && (l.f |= 512), _o(l)), u && !h && (So(l), Fo(l));
1557
1557
  }
1558
1558
  if (q?.has(e)) return q.get(e);
@@ -1609,7 +1609,7 @@ function vi(e) {
1609
1609
  return o || n;
1610
1610
  }
1611
1611
  });
1612
- var u = M, h = S;
1612
+ var u = A, h = S;
1613
1613
  ne(null), ge(null);
1614
1614
  try {
1615
1615
  for (var f, p = []; o !== null && o !== t; ) {
@@ -1634,12 +1634,12 @@ function vi(e) {
1634
1634
  }
1635
1635
  }
1636
1636
  var El = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1637
- function Ml(e) {
1637
+ function Al(e) {
1638
1638
  return El?.createHTML(e) ?? e;
1639
1639
  }
1640
- function Cl(e) {
1640
+ function Ml(e) {
1641
1641
  var t = $r("template");
1642
- return t.innerHTML = Ml(e.replaceAll("<!>", "<!---->")), t.content;
1642
+ return t.innerHTML = Al(e.replaceAll("<!>", "<!---->")), t.content;
1643
1643
  }
1644
1644
  function ut(e, t) {
1645
1645
  var n = S;
@@ -1656,7 +1656,7 @@ function qo(e, t) {
1656
1656
  return () => {
1657
1657
  if (I)
1658
1658
  return ut(O, null), O;
1659
- i === void 0 && (i = Cl(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ vt(i)));
1659
+ i === void 0 && (i = Ml(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ vt(i)));
1660
1660
  var s = r || xo ? document.importNode(i, !0) : i.cloneNode(!0);
1661
1661
  if (n) {
1662
1662
  var a = /* @__PURE__ */ vt(s), l = s.lastChild;
@@ -1665,7 +1665,7 @@ function qo(e, t) {
1665
1665
  return s;
1666
1666
  };
1667
1667
  }
1668
- function Al() {
1668
+ function Cl() {
1669
1669
  if (I)
1670
1670
  return ut(O, null), O;
1671
1671
  var e = document.createDocumentFragment(), t = document.createComment(""), n = Se();
@@ -1761,7 +1761,7 @@ function Pl(e, t) {
1761
1761
  ir(), t.intro = t.intro ?? !1;
1762
1762
  const n = t.target, r = I, i = O;
1763
1763
  try {
1764
- for (var o = /* @__PURE__ */ vt(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ Me(o);
1764
+ for (var o = /* @__PURE__ */ vt(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ Ae(o);
1765
1765
  if (!o) throw dt;
1766
1766
  lt(!0), ce(o);
1767
1767
  const s = Go(e, {
@@ -1772,7 +1772,7 @@ function Pl(e, t) {
1772
1772
  } catch (s) {
1773
1773
  if (s instanceof Error && s.message.split(`
1774
1774
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1775
- return s !== dt && console.warn("Failed to hydrate: ", s), t.recover === !1 && Aa(), ir(), dl(n), lt(!1), Uo(e, t);
1775
+ return s !== dt && console.warn("Failed to hydrate: ", s), t.recover === !1 && Ca(), ir(), dl(n), lt(!1), Uo(e, t);
1776
1776
  } finally {
1777
1777
  lt(r), ce(i);
1778
1778
  }
@@ -1875,7 +1875,7 @@ var be = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), ie =
1875
1875
  }
1876
1876
  };
1877
1877
  function zl(e) {
1878
- L === null && wa("onMount"), Wt && L.l !== null ? Hl(L).m.push(e) : Ct(() => {
1878
+ L === null && wa("onMount"), Wt && L.l !== null ? Hl(L).m.push(e) : Mt(() => {
1879
1879
  const t = xn(e);
1880
1880
  if (typeof t == "function") return t;
1881
1881
  });
@@ -2030,7 +2030,7 @@ function Kl(e) {
2030
2030
  }
2031
2031
  var Yo, at = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), Bn = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakSet(), Ko = class {
2032
2032
  constructor(e) {
2033
- Mr(this, wi), _(this, at, /* @__PURE__ */ new WeakMap()), _(this, bn, void 0), _(this, Bn, void 0), T(Bn, this, e);
2033
+ Ar(this, wi), _(this, at, /* @__PURE__ */ new WeakMap()), _(this, bn, void 0), _(this, Bn, void 0), T(Bn, this, e);
2034
2034
  }
2035
2035
  observe(e, t) {
2036
2036
  var n = d(at, this).get(e) || /* @__PURE__ */ new Set();
@@ -2078,31 +2078,31 @@ function ki(e, t, n, r) {
2078
2078
  let h;
2079
2079
  if (o) {
2080
2080
  var f = Ot in e || Ji in e;
2081
- h = je(e, t)?.set ?? (f && t in e ? (C) => e[t] = C : void 0);
2081
+ h = je(e, t)?.set ?? (f && t in e ? (M) => e[t] = M : void 0);
2082
2082
  }
2083
2083
  var p, m = !1;
2084
2084
  o ? [p, m] = ja(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), h && (i && Oa(t), h(p)));
2085
2085
  var y;
2086
2086
  if (i ? y = () => {
2087
- var C = e[t];
2088
- return C === void 0 ? u() : (l = !0, C);
2087
+ var M = e[t];
2088
+ return M === void 0 ? u() : (l = !0, M);
2089
2089
  } : y = () => {
2090
- var C = e[t];
2091
- return C !== void 0 && (a = void 0), C === void 0 ? a : C;
2090
+ var M = e[t];
2091
+ return M !== void 0 && (a = void 0), M === void 0 ? a : M;
2092
2092
  }, i && (n & 4) === 0) return y;
2093
2093
  if (h) {
2094
2094
  var b = e.$$legacy;
2095
- return (function(C, U) {
2096
- return arguments.length > 0 ? ((!i || !U || b || m) && h(U ? y() : C), C) : y();
2095
+ return (function(M, U) {
2096
+ return arguments.length > 0 ? ((!i || !U || b || m) && h(U ? y() : M), M) : y();
2097
2097
  });
2098
2098
  }
2099
2099
  var E = !1, R = ((n & 1) !== 0 ? Lt : To)(() => (E = !1, y()));
2100
2100
  o && v(R);
2101
2101
  var F = S;
2102
- return (function(C, U) {
2102
+ return (function(M, U) {
2103
2103
  if (arguments.length > 0) {
2104
- const H = U ? v(R) : i && o ? fe(C) : C;
2105
- return $(R, H), E = !0, a !== void 0 && (a = H), C;
2104
+ const H = U ? v(R) : i && o ? fe(M) : M;
2105
+ return $(R, H), E = !0, a !== void 0 && (a = H), M;
2106
2106
  }
2107
2107
  return ke && E || (F.f & 16384) !== 0 ? R.v : v(R);
2108
2108
  });
@@ -2558,12 +2558,12 @@ var Jo = class ar {
2558
2558
  255,
2559
2559
  255,
2560
2560
  255
2561
- ], C = R >= 1.35 ? b : F;
2561
+ ], M = R >= 1.35 ? b : F;
2562
2562
  return {
2563
2563
  wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${h})`,
2564
2564
  sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${p})`,
2565
- wordUnderline: `rgba(${C[0]}, ${C[1]}, ${C[2]}, ${m})`,
2566
- wordShadow: `rgba(${C[0]}, ${C[1]}, ${C[2]}, ${y})`
2565
+ wordUnderline: `rgba(${M[0]}, ${M[1]}, ${M[2]}, ${m})`,
2566
+ wordShadow: `rgba(${M[0]}, ${M[1]}, ${M[2]}, ${y})`
2567
2567
  };
2568
2568
  }
2569
2569
  applyAdaptiveTTSStyle(t) {
@@ -3198,7 +3198,7 @@ function Wr(e) {
3198
3198
  }
3199
3199
  return "";
3200
3200
  }
3201
- function Mn(e) {
3201
+ function An(e) {
3202
3202
  const t = Wr(e);
3203
3203
  return [
3204
3204
  /<math[>\s]/i,
@@ -3236,7 +3236,7 @@ function _c(e) {
3236
3236
  }
3237
3237
  return !1;
3238
3238
  }
3239
- function Cn(e) {
3239
+ function Mn(e) {
3240
3240
  return Wr(e).trim().length >= 10;
3241
3241
  }
3242
3242
  function Sc(e) {
@@ -3370,12 +3370,12 @@ var Ec = class {
3370
3370
  text: e,
3371
3371
  offset: 0
3372
3372
  }];
3373
- }, ns = (e) => String(e || "").trim().toLowerCase(), Mc = () => ns((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), Cc = (e, t) => {
3373
+ }, ns = (e) => String(e || "").trim().toLowerCase(), Ac = () => ns((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), Mc = (e, t) => {
3374
3374
  if (t) {
3375
3375
  const s = e.find((a) => a.name === t);
3376
3376
  if (s) return s;
3377
3377
  }
3378
- const n = Mc(), r = n.split("-")[0] || "en", i = (s) => {
3378
+ const n = Ac(), r = n.split("-")[0] || "en", i = (s) => {
3379
3379
  const a = ns(s.lang);
3380
3380
  return a === n || a.startsWith(`${r}-`);
3381
3381
  }, o = [
@@ -3390,7 +3390,7 @@ var Ec = class {
3390
3390
  if (a) return a;
3391
3391
  }
3392
3392
  return e[0] || null;
3393
- }, Ac = (e) => !e.default, rs = class {
3393
+ }, Cc = (e) => !e.default, rs = class {
3394
3394
  constructor() {
3395
3395
  g(this, "providerId", "browser"), g(this, "providerName", "Browser Speech Synthesis"), g(this, "version", "1.0.0");
3396
3396
  }
@@ -3502,8 +3502,8 @@ var Ec = class {
3502
3502
  }
3503
3503
  const o = new SpeechSynthesisUtterance(e);
3504
3504
  this.utterance = o;
3505
- const s = Cc(speechSynthesis.getVoices(), this.config?.voice);
3506
- s && Ac(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
3505
+ const s = Mc(speechSynthesis.getVoices(), this.config?.voice);
3506
+ s && Cc(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
3507
3507
  const a = () => {
3508
3508
  this.utterance === o && (this.utterance = null);
3509
3509
  };
@@ -3707,7 +3707,7 @@ function Hc(e) {
3707
3707
  displayName: n === "scientific" ? "Scientific Calculator" : n === "basic" ? "Basic Calculator" : "Calculator"
3708
3708
  };
3709
3709
  }
3710
- function Mi(e, t, n) {
3710
+ function Ai(e, t, n) {
3711
3711
  const r = e;
3712
3712
  t ? (r.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete r.calculatorType, e.removeAttribute("calculator-type")), n && n.length > 0 ? r.availableTypes = n : delete r.availableTypes;
3713
3713
  }
@@ -3741,11 +3741,11 @@ var Bc = {
3741
3741
  "scientificCalculator"
3742
3742
  ],
3743
3743
  isVisibleInContext(e) {
3744
- return Mn(e);
3744
+ return An(e);
3745
3745
  },
3746
3746
  renderToolbar(e, t) {
3747
3747
  const { calculatorType: n, availableTypes: r, displayName: i } = Hc(t), o = zr(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Wc(t.toolCoordinator, o), l = a ?? me(this.toolId, e, t, s);
3748
- a || zc(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Mi(l, n, r);
3748
+ a || zc(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Ai(l, n, r);
3749
3749
  const c = n === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = n === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
3750
3750
  toolId: this.toolId,
3751
3751
  label: i,
@@ -3782,7 +3782,7 @@ var Bc = {
3782
3782
  button: h,
3783
3783
  sync: () => {
3784
3784
  const p = t.isToolVisible(o);
3785
- h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, f !== p && (l.visible = p, f = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Mi(l, n, r);
3785
+ h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, f !== p && (l.visible = p, f = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Ai(l, n, r);
3786
3786
  },
3787
3787
  subscribeActive: (p) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3788
3788
  p(t.isToolVisible(o));
@@ -3869,13 +3869,13 @@ var Bc = {
3869
3869
  text: h,
3870
3870
  map: n
3871
3871
  };
3872
- }, Vn = null, Ci = Promise.resolve(), Dc = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Fc = async () => (Vn || (Vn = import("./sre-yGY3u7Xp.js").then((e) => /* @__PURE__ */ la(e.default, 1)).then((e) => {
3872
+ }, Vn = null, Mi = Promise.resolve(), Dc = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Fc = async () => (Vn || (Vn = import("./sre-yGY3u7Xp.js").then((e) => /* @__PURE__ */ la(e.default, 1)).then((e) => {
3873
3873
  const t = e.default || e;
3874
3874
  if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
3875
3875
  return t;
3876
- })), Vn), jc = (e) => e === "en" ? "clearspeak" : "mathspeak", Ai = (e) => !!e && typeof e == "object" && !Array.isArray(e), Oi = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, An = (e) => {
3877
- if (!Ai(e)) return;
3878
- const t = Oi(e.domain), n = Oi(e.style), r = Ai(e.engineOptions) ? e.engineOptions : void 0;
3876
+ })), Vn), jc = (e) => e === "en" ? "clearspeak" : "mathspeak", Ci = (e) => !!e && typeof e == "object" && !Array.isArray(e), Oi = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, Cn = (e) => {
3877
+ if (!Ci(e)) return;
3878
+ const t = Oi(e.domain), n = Oi(e.style), r = Ci(e.engineOptions) ? e.engineOptions : void 0;
3879
3879
  if (!(!t && !n && !r))
3880
3880
  return {
3881
3881
  ...t ? { domain: t } : {},
@@ -3883,7 +3883,7 @@ var Bc = {
3883
3883
  ...r ? { engineOptions: r } : {}
3884
3884
  };
3885
3885
  }, Vc = async (e, t, n, r) => {
3886
- const i = Dc(t), o = An(r);
3886
+ const i = Dc(t), o = Cn(r);
3887
3887
  await e.setupEngine?.({
3888
3888
  ...o?.engineOptions || {},
3889
3889
  locale: i,
@@ -3893,8 +3893,8 @@ var Bc = {
3893
3893
  markup: n
3894
3894
  }), await e.engineReady?.();
3895
3895
  }, qc = async (e) => {
3896
- const t = Ci.then(e, e);
3897
- return Ci = t.then(() => {
3896
+ const t = Mi.then(e, e);
3897
+ return Mi = t.then(() => {
3898
3898
  }, () => {
3899
3899
  }), t;
3900
3900
  }, ls = async (e, t, n, r, i) => qc(async () => (await Vc(e, n, r, i), e.toSpeech(t))), Uc = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), Gc = async (e, t, n, r) => {
@@ -4036,7 +4036,7 @@ var Bc = {
4036
4036
  ...n
4037
4037
  });
4038
4038
  }, ur = (e) => e.backend || "browser", hs = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, ds = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Qc = (e) => {
4039
- const t = ur(e), n = hs(e, t), r = ds(e, n), i = An(e.mathSpeech);
4039
+ const t = ur(e), n = hs(e, t), r = ds(e, n), i = Cn(e.mathSpeech);
4040
4040
  return {
4041
4041
  voice: e.defaultVoice,
4042
4042
  rate: e.rate,
@@ -4070,7 +4070,8 @@ var Bc = {
4070
4070
  controlsRow: {
4071
4071
  reserveSpace: !0,
4072
4072
  expandWhenToolActive: !1
4073
- }
4073
+ },
4074
+ headerOverlay: { expandWhenToolActive: !1 }
4074
4075
  };
4075
4076
  case "expanding-row":
4076
4077
  return {
@@ -4078,7 +4079,17 @@ var Bc = {
4078
4079
  controlsRow: {
4079
4080
  reserveSpace: !1,
4080
4081
  expandWhenToolActive: !0
4081
- }
4082
+ },
4083
+ headerOverlay: { expandWhenToolActive: !1 }
4084
+ };
4085
+ case "floating-overlay":
4086
+ return {
4087
+ mount: "before-buttons",
4088
+ controlsRow: {
4089
+ reserveSpace: !1,
4090
+ expandWhenToolActive: !1
4091
+ },
4092
+ headerOverlay: { expandWhenToolActive: !1 }
4082
4093
  };
4083
4094
  default:
4084
4095
  return {
@@ -4086,7 +4097,8 @@ var Bc = {
4086
4097
  controlsRow: {
4087
4098
  reserveSpace: !1,
4088
4099
  expandWhenToolActive: !1
4089
- }
4100
+ },
4101
+ headerOverlay: { expandWhenToolActive: !0 }
4090
4102
  };
4091
4103
  }
4092
4104
  }, kt = /* @__PURE__ */ new Map(), eu = "__pieToolElementUnmount", Pi = "pie-tool-active-change", tu = {
@@ -4126,7 +4138,7 @@ var Bc = {
4126
4138
  "speechOutput"
4127
4139
  ],
4128
4140
  isVisibleInContext(e) {
4129
- return Cn(e);
4141
+ return Mn(e);
4130
4142
  },
4131
4143
  renderToolbar(e, t) {
4132
4144
  const n = () => qn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => rn(n().speedOptions), i = () => fs(n()), o = () => Zc(n()), s = zr(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
@@ -4144,10 +4156,13 @@ var Bc = {
4144
4156
  elements: [{
4145
4157
  element: l(),
4146
4158
  mount: c.mount,
4147
- layoutHints: { controlsRow: {
4148
- reserveSpace: c.controlsRow.reserveSpace,
4149
- showWhenToolActive: c.controlsRow.expandWhenToolActive
4150
- } }
4159
+ layoutHints: {
4160
+ controlsRow: {
4161
+ reserveSpace: c.controlsRow.reserveSpace,
4162
+ showWhenToolActive: c.controlsRow.expandWhenToolActive
4163
+ },
4164
+ headerOverlay: { showWhenToolActive: c.headerOverlay.expandWhenToolActive }
4165
+ }
4151
4166
  }],
4152
4167
  subscribeActive: (u) => {
4153
4168
  const h = l(), f = (p) => {
@@ -4165,7 +4180,7 @@ var Bc = {
4165
4180
  };
4166
4181
  }
4167
4182
  };
4168
- function Ce(e, t) {
4183
+ function Me(e, t) {
4169
4184
  const n = zr(e, t.scope.level, t.scope.scopeId);
4170
4185
  return {
4171
4186
  fullToolId: n,
@@ -4176,7 +4191,7 @@ function Ce(e, t) {
4176
4191
  }
4177
4192
  };
4178
4193
  }
4179
- function Ae(e) {
4194
+ function Ce(e) {
4180
4195
  const t = e.isActive();
4181
4196
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
4182
4197
  }
@@ -4195,10 +4210,10 @@ var nu = {
4195
4210
  ],
4196
4211
  pnpSupportIds: ["ruler", "measurement"],
4197
4212
  isVisibleInContext(e) {
4198
- return Mn(e);
4213
+ return An(e);
4199
4214
  },
4200
4215
  renderToolbar(e, t) {
4201
- const n = Ce(this.toolId, t), r = {
4216
+ const n = Me(this.toolId, t), r = {
4202
4217
  toolId: this.toolId,
4203
4218
  label: this.name,
4204
4219
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4216,7 +4231,7 @@ var nu = {
4216
4231
  mount: "after-buttons"
4217
4232
  }],
4218
4233
  sync: () => {
4219
- Ae({
4234
+ Ce({
4220
4235
  button: r,
4221
4236
  overlay: o,
4222
4237
  isActive: n.isActive
@@ -4237,10 +4252,10 @@ var nu = {
4237
4252
  ],
4238
4253
  pnpSupportIds: ["protractor", "angleMeasurement"],
4239
4254
  isVisibleInContext(e) {
4240
- return Mn(e);
4255
+ return An(e);
4241
4256
  },
4242
4257
  renderToolbar(e, t) {
4243
- const n = Ce(this.toolId, t), r = {
4258
+ const n = Me(this.toolId, t), r = {
4244
4259
  toolId: this.toolId,
4245
4260
  label: this.name,
4246
4261
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4258,7 +4273,7 @@ var nu = {
4258
4273
  mount: "after-buttons"
4259
4274
  }],
4260
4275
  sync: () => {
4261
- Ae({
4276
+ Ce({
4262
4277
  button: r,
4263
4278
  overlay: o,
4264
4279
  isActive: n.isActive
@@ -4283,7 +4298,7 @@ var nu = {
4283
4298
  return _c(e);
4284
4299
  },
4285
4300
  renderToolbar(e, t) {
4286
- const n = Ce(this.toolId, t), r = t.componentOverrides ?? {}, i = me(this.toolId, e, t, r);
4301
+ const n = Me(this.toolId, t), r = t.componentOverrides ?? {}, i = me(this.toolId, e, t, r);
4287
4302
  i.setAttribute("tool-id", n.fullToolId), i.setAttribute("strategy", "strikethrough"), i.setAttribute("button-alignment", "inline");
4288
4303
  const o = {
4289
4304
  toolId: this.toolId,
@@ -4303,7 +4318,7 @@ var nu = {
4303
4318
  mount: "after-buttons"
4304
4319
  }],
4305
4320
  sync: () => {
4306
- Ae({
4321
+ Ce({
4307
4322
  button: o,
4308
4323
  overlay: i,
4309
4324
  isActive: n.isActive
@@ -4332,10 +4347,10 @@ var nu = {
4332
4347
  "annotation"
4333
4348
  ],
4334
4349
  isVisibleInContext(e) {
4335
- return Cn(e);
4350
+ return Mn(e);
4336
4351
  },
4337
4352
  renderToolbar(e, t) {
4338
- const n = Ce(this.toolId, t), r = {
4353
+ const n = Me(this.toolId, t), r = {
4339
4354
  toolId: this.toolId,
4340
4355
  label: this.name,
4341
4356
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4353,7 +4368,7 @@ var nu = {
4353
4368
  mount: "after-buttons"
4354
4369
  }],
4355
4370
  sync: () => {
4356
- Ae({
4371
+ Ce({
4357
4372
  button: r,
4358
4373
  overlay: o,
4359
4374
  isActive: n.isActive,
@@ -4384,10 +4399,10 @@ var nu = {
4384
4399
  "trackingGuide"
4385
4400
  ],
4386
4401
  isVisibleInContext(e) {
4387
- return Cn(e);
4402
+ return Mn(e);
4388
4403
  },
4389
4404
  renderToolbar(e, t) {
4390
- const n = Ce(this.toolId, t), r = {
4405
+ const n = Me(this.toolId, t), r = {
4391
4406
  toolId: this.toolId,
4392
4407
  label: this.name,
4393
4408
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4405,7 +4420,7 @@ var nu = {
4405
4420
  mount: "after-buttons"
4406
4421
  }],
4407
4422
  sync: () => {
4408
- Ae({
4423
+ Ce({
4409
4424
  button: r,
4410
4425
  overlay: o,
4411
4426
  isActive: n.isActive
@@ -4432,7 +4447,7 @@ var nu = {
4432
4447
  return !0;
4433
4448
  },
4434
4449
  renderToolbar(e, t) {
4435
- const n = Ce(this.toolId, t), r = {
4450
+ const n = Me(this.toolId, t), r = {
4436
4451
  toolId: this.toolId,
4437
4452
  label: this.name,
4438
4453
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4460,7 +4475,7 @@ var nu = {
4460
4475
  }
4461
4476
  }],
4462
4477
  sync: () => {
4463
- Ae({
4478
+ Ce({
4464
4479
  button: r,
4465
4480
  overlay: o,
4466
4481
  isActive: n.isActive
@@ -4490,10 +4505,10 @@ var nu = {
4490
4505
  "annotation"
4491
4506
  ],
4492
4507
  isVisibleInContext(e) {
4493
- return Cn(e);
4508
+ return Mn(e);
4494
4509
  },
4495
4510
  renderToolbar(e, t) {
4496
- const n = Ce(this.toolId, t), r = {
4511
+ const n = Me(this.toolId, t), r = {
4497
4512
  toolId: this.toolId,
4498
4513
  label: this.name,
4499
4514
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4511,7 +4526,7 @@ var nu = {
4511
4526
  mount: "after-buttons"
4512
4527
  }],
4513
4528
  sync: () => {
4514
- Ae({
4529
+ Ce({
4515
4530
  button: r,
4516
4531
  overlay: o,
4517
4532
  isActive: n.isActive
@@ -4533,10 +4548,10 @@ var nu = {
4533
4548
  "graphingTool"
4534
4549
  ],
4535
4550
  isVisibleInContext(e) {
4536
- return Mn(e);
4551
+ return An(e);
4537
4552
  },
4538
4553
  renderToolbar(e, t) {
4539
- const n = Ce(this.toolId, t), r = {
4554
+ const n = Me(this.toolId, t), r = {
4540
4555
  toolId: this.toolId,
4541
4556
  label: this.name,
4542
4557
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4564,7 +4579,7 @@ var nu = {
4564
4579
  }
4565
4580
  }],
4566
4581
  sync: () => {
4567
- Ae({
4582
+ Ce({
4568
4583
  button: r,
4569
4584
  overlay: o,
4570
4585
  isActive: n.isActive
@@ -4588,7 +4603,7 @@ var nu = {
4588
4603
  return Sc(e);
4589
4604
  },
4590
4605
  renderToolbar(e, t) {
4591
- const n = Ce(this.toolId, t), r = {
4606
+ const n = Me(this.toolId, t), r = {
4592
4607
  toolId: this.toolId,
4593
4608
  label: this.name,
4594
4609
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4616,7 +4631,7 @@ var nu = {
4616
4631
  }
4617
4632
  }],
4618
4633
  sync: () => {
4619
- Ae({
4634
+ Ce({
4620
4635
  button: r,
4621
4636
  overlay: o,
4622
4637
  isActive: n.isActive
@@ -4668,7 +4683,7 @@ function gu() {
4668
4683
  for (const n of e.getAllTools()) for (const r of n.pnpSupportIds || []) t.add(r);
4669
4684
  return [...t].sort();
4670
4685
  }
4671
- var vu = gu(), Md = {
4686
+ var vu = gu(), Ad = {
4672
4687
  supports: [...vu],
4673
4688
  prohibitedSupports: [],
4674
4689
  activateAtInit: []
@@ -4785,7 +4800,7 @@ var vu = gu(), Md = {
4785
4800
  itemGlossary: "itemGlossary",
4786
4801
  tutorialAvailable: "tutorialAvailable"
4787
4802
  }
4788
- }, Cd = Object.values(mu).flatMap((e) => Object.values(e)), Ad = Qo("ToolCoordinator"), hr;
4803
+ }, Md = Object.values(mu).flatMap((e) => Object.values(e)), Cd = Qo("ToolCoordinator"), hr;
4789
4804
  (function(e) {
4790
4805
  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";
4791
4806
  })(hr || (hr = {}));
@@ -5032,12 +5047,12 @@ var yu = /* @__PURE__ */ new Set([
5032
5047
  score: l.score
5033
5048
  };
5034
5049
  });
5035
- }, Mu = (e, t, n) => {
5050
+ }, Au = (e, t, n) => {
5036
5051
  if (e.length === 0) return 0;
5037
5052
  const r = e.length / Math.max(1, Math.min(t.length, n.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
5038
5053
  return Math.min(1, r * i);
5039
5054
  }, ms = (e) => {
5040
- const t = gs(e.speechText), n = P(e.visibleText), r = t.spokenText, i = dr(r), o = dr(n), s = t.unsupportedSemantic ? [] : Eu(i, o), a = Mu(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5055
+ const t = gs(e.speechText), n = P(e.visibleText), r = t.spokenText, i = dr(r), o = dr(n), s = t.unsupportedSemantic ? [] : Eu(i, o), a = Au(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5041
5056
  return {
5042
5057
  speechText: e.speechText,
5043
5058
  spokenText: r,
@@ -5083,7 +5098,7 @@ var yu = /* @__PURE__ */ new Set([
5083
5098
  start: t,
5084
5099
  length: Math.min(n, r.end - t)
5085
5100
  } : null;
5086
- }, Cu = (e, t, n = 1, r) => {
5101
+ }, Mu = (e, t, n = 1, r) => {
5087
5102
  if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
5088
5103
  const i = Math.max(1, Number.isFinite(n) ? n : 1);
5089
5104
  if (r && /^<[^>]+>$/.test(r.trim())) return null;
@@ -5097,7 +5112,7 @@ var yu = /* @__PURE__ */ new Set([
5097
5112
  return o || s;
5098
5113
  }
5099
5114
  return Di(e, t, i) || Bi(e, t, i);
5100
- }, Au = (e, t) => {
5115
+ }, Cu = (e, t) => {
5101
5116
  if (e.playbackMode === "region-fallback") return null;
5102
5117
  const n = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
5103
5118
  if (n) return {
@@ -5657,7 +5672,7 @@ var yu = /* @__PURE__ */ new Set([
5657
5672
  lastCharWasWhitespace: !1,
5658
5673
  lastMapped: null,
5659
5674
  options: e
5660
- }), Es = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Ms = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Cs = (e) => {
5675
+ }), Es = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", As = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Ms = (e) => {
5661
5676
  const t = e.tagName?.toLowerCase();
5662
5677
  return t === "annotation" || t === "annotation-xml";
5663
5678
  }, dh = (e) => {
@@ -5716,7 +5731,7 @@ var yu = /* @__PURE__ */ new Set([
5716
5731
  return r || t;
5717
5732
  }, yh = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Es(e), Fe = (e, t, n) => {
5718
5733
  /[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), n ? (e.map.set(e.position, n), e.lastMapped = n) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
5719
- }, As = (e, t) => {
5734
+ }, Cs = (e, t) => {
5720
5735
  if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
5721
5736
  const n = e.chars[e.chars.length - 1];
5722
5737
  return as(n, t, e.options);
@@ -5739,7 +5754,7 @@ var yu = /* @__PURE__ */ new Set([
5739
5754
  }), e.lastCharWasWhitespace = !0;
5740
5755
  continue;
5741
5756
  }
5742
- !r && As(e, o) && Fe(e, " ", {
5757
+ !r && Cs(e, o) && Fe(e, " ", {
5743
5758
  node: t,
5744
5759
  offset: i
5745
5760
  }), Fe(e, o, {
@@ -5764,7 +5779,7 @@ var yu = /* @__PURE__ */ new Set([
5764
5779
  e.lastCharWasWhitespace || Fe(e, " ", l), e.lastCharWasWhitespace = !0;
5765
5780
  continue;
5766
5781
  }
5767
- n === 0 && As(e, r) && Fe(e, " ", l), Fe(e, r, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
5782
+ n === 0 && Cs(e, r) && Fe(e, " ", l), Fe(e, r, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
5768
5783
  node: o.node,
5769
5784
  offset: o.offset
5770
5785
  }), e.lastMapped = {
@@ -5787,7 +5802,7 @@ var yu = /* @__PURE__ */ new Set([
5787
5802
  }
5788
5803
  if (i.nodeType !== 1) return;
5789
5804
  const o = i;
5790
- if (!Cs(o))
5805
+ if (!Ms(o))
5791
5806
  for (const s of Array.from(o.childNodes)) r(s);
5792
5807
  };
5793
5808
  return r(t.documentElement), P(n.join(" "));
@@ -5800,7 +5815,7 @@ var yu = /* @__PURE__ */ new Set([
5800
5815
  }
5801
5816
  if (a.nodeType !== 1) return;
5802
5817
  const l = a;
5803
- if (!(Ms(l) || Cs(l)))
5818
+ if (!(As(l) || Ms(l)))
5804
5819
  for (const c of Array.from(l.childNodes)) i(c);
5805
5820
  };
5806
5821
  i(e), Is(r);
@@ -5836,7 +5851,7 @@ var yu = /* @__PURE__ */ new Set([
5836
5851
  }
5837
5852
  if (u.nodeType !== Node.ELEMENT_NODE) return;
5838
5853
  const h = u;
5839
- if (Ms(h)) return;
5854
+ if (As(h)) return;
5840
5855
  const f = ph(h);
5841
5856
  if (f) {
5842
5857
  a();
@@ -5863,7 +5878,7 @@ var yu = /* @__PURE__ */ new Set([
5863
5878
  chunks: r,
5864
5879
  containsMathMarkup: s
5865
5880
  };
5866
- }, At = (e, t) => {
5881
+ }, Ct = (e, t) => {
5867
5882
  if (!yh(e)) {
5868
5883
  const { text: n, map: r } = Tn(e, t);
5869
5884
  return {
@@ -5892,11 +5907,11 @@ var yu = /* @__PURE__ */ new Set([
5892
5907
  "listitem",
5893
5908
  "option",
5894
5909
  "radio"
5895
- ]), Mh = (e) => {
5910
+ ]), Ah = (e) => {
5896
5911
  if (e.type !== "text" || !e.sourceElement) return !1;
5897
5912
  const t = e.sourceElement.tagName.toUpperCase(), n = (e.sourceElement.getAttribute("role") || "").toLowerCase();
5898
5913
  return xh.has(t) || Eh.has(n);
5899
- }, Ch = async (e) => {
5914
+ }, Mh = async (e) => {
5900
5915
  const t = e.resolveMathSpeech ?? wh, { visibleText: n } = e, r = [];
5901
5916
  let i = 0;
5902
5917
  const o = (a) => {
@@ -5909,7 +5924,7 @@ var yu = /* @__PURE__ */ new Set([
5909
5924
  for (let a = 0; a < e.chunks.length; a++) {
5910
5925
  const l = e.chunks[a];
5911
5926
  if (l.type === "text") {
5912
- const p = Mh(l) ? [{
5927
+ const p = Ah(l) ? [{
5913
5928
  text: l.text,
5914
5929
  offset: 0
5915
5930
  }] : Hr(l.text, { locale: e.language });
@@ -5953,7 +5968,7 @@ var yu = /* @__PURE__ */ new Set([
5953
5968
  visibleText: n,
5954
5969
  plainSpeechText: P(s.join(" "))
5955
5970
  };
5956
- }, Ah = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Oh = "sre-v1", Ih = 256, mr = (e) => Array.isArray(e) ? `array:[${e.map(mr).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${mr(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, ji = (e, t, n, r) => `${Oh}\0${Ah(e)}\0${t ? "ssml" : "plain"}\0${mr(n ?? null)}\0${r}`, $h = (e = {}) => {
5971
+ }, Ch = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Oh = "sre-v1", Ih = 256, mr = (e) => Array.isArray(e) ? `array:[${e.map(mr).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${mr(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, ji = (e, t, n, r) => `${Oh}\0${Ch(e)}\0${t ? "ssml" : "plain"}\0${mr(n ?? null)}\0${r}`, $h = (e = {}) => {
5957
5972
  const t = Math.max(1, e.maxEntries ?? Ih), n = e.resolve ?? ((o, s) => cs([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
5958
5973
  for (r.delete(o), r.set(o, s); r.size > t; ) {
5959
5974
  const a = r.keys().next().value;
@@ -5961,7 +5976,7 @@ var yu = /* @__PURE__ */ new Set([
5961
5976
  }
5962
5977
  };
5963
5978
  return async (o, s) => {
5964
- const a = An(s.mathSpeech), l = s.produceSsml === !0, c = ji(s.language, l, a, o.mathml), u = r.get(c);
5979
+ const a = Cn(s.mathSpeech), l = s.produceSsml === !0, c = ji(s.language, l, a, o.mathml), u = r.get(c);
5965
5980
  if (u)
5966
5981
  return r.delete(c), r.set(c, u), u;
5967
5982
  const h = await n(o, {
@@ -6013,7 +6028,7 @@ var yu = /* @__PURE__ */ new Set([
6013
6028
  };
6014
6029
  let r, i;
6015
6030
  if (e.catalogAlignment)
6016
- r = Cu(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
6031
+ r = Mu(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
6017
6032
  else {
6018
6033
  const o = Lh(e, t);
6019
6034
  r = o.boundary, i = o.spokenText;
@@ -6181,7 +6196,7 @@ var yu = /* @__PURE__ */ new Set([
6181
6196
  }
6182
6197
  }, Fh = (e, t) => {
6183
6198
  if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
6184
- const n = Au(e.catalogAlignment, t.chunkSpokenStart);
6199
+ const n = Cu(e.catalogAlignment, t.chunkSpokenStart);
6185
6200
  if (!n) return null;
6186
6201
  const r = zs(e.visibleMap, n.start, n.end);
6187
6202
  return r ? {
@@ -6332,7 +6347,7 @@ var yu = /* @__PURE__ */ new Set([
6332
6347
  }
6333
6348
  return r;
6334
6349
  }, td = async (e) => {
6335
- const t = At(e.contentRoot, e.textProcessingOptions), n = await Ch({
6350
+ const t = Ct(e.contentRoot, e.textProcessingOptions), n = await Mh({
6336
6351
  chunks: t.chunks,
6337
6352
  visibleText: t.visibleText,
6338
6353
  language: e.language,
@@ -6414,13 +6429,13 @@ var yu = /* @__PURE__ */ new Set([
6414
6429
  }) : void 0,
6415
6430
  plainFallback: Bs(e, t)
6416
6431
  };
6417
- }, id = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? nd(n, r) : t.format === "ssml" && n.ssml ? rd(n, r, n.ssml) : Bs(n, r)), od = "pie-tts-control-handoff", A;
6432
+ }, id = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? nd(n, r) : t.format === "ssml" && n.ssml ? rd(n, r, n.ssml) : Bs(n, r)), od = "pie-tts-control-handoff", C;
6418
6433
  (function(e) {
6419
6434
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
6420
- })(A || (A = {}));
6435
+ })(C || (C = {}));
6421
6436
  var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, sd = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Ds(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, ad = class _r {
6422
6437
  constructor() {
6423
- g(this, "currentProvider", null), g(this, "provider", null), g(this, "highlightCoordinator", null), g(this, "highlightTargetResolverProvider", null), g(this, "catalogResolver", null), g(this, "state", A.IDLE), g(this, "ttsConfig", {}), g(this, "currentText", null), g(this, "currentContentElement", null), g(this, "normalizedToDOM", /* @__PURE__ */ new Map()), g(this, "listeners", /* @__PURE__ */ new Map()), g(this, "lastError", null), g(this, "speakRunId", 0), g(this, "currentBoundaryOffset", 0), g(this, "activeWordBoundaryOffset", 0), g(this, "seekSegments", []), g(this, "playbackChunks", []), g(this, "sentenceHighlightSegments", []), g(this, "currentSeekSegmentIndex", 0), g(this, "activeSentenceStartOffset", null), g(this, "activeHighlightMode", "word"), g(this, "lastRenderedRegionTarget", null), g(this, "telemetryReporter", null), g(this, "generatedMathSpeechResolver", $h());
6438
+ g(this, "currentProvider", null), g(this, "provider", null), g(this, "highlightCoordinator", null), g(this, "highlightTargetResolverProvider", null), g(this, "catalogResolver", null), g(this, "state", C.IDLE), g(this, "ttsConfig", {}), g(this, "currentText", null), g(this, "currentContentElement", null), g(this, "normalizedToDOM", /* @__PURE__ */ new Map()), g(this, "listeners", /* @__PURE__ */ new Map()), g(this, "lastError", null), g(this, "speakRunId", 0), g(this, "currentBoundaryOffset", 0), g(this, "activeWordBoundaryOffset", 0), g(this, "seekSegments", []), g(this, "playbackChunks", []), g(this, "sentenceHighlightSegments", []), g(this, "currentSeekSegmentIndex", 0), g(this, "activeSentenceStartOffset", null), g(this, "activeHighlightMode", "word"), g(this, "lastRenderedRegionTarget", null), g(this, "telemetryReporter", null), g(this, "generatedMathSpeechResolver", $h());
6424
6439
  }
6425
6440
  debugLog(t, n) {
6426
6441
  _r.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
@@ -6600,7 +6615,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6600
6615
  }
6601
6616
  getMathSpeechOptions() {
6602
6617
  const t = (this.ttsConfig.providerOptions || {}).mathSpeech;
6603
- return An(t);
6618
+ return Cn(t);
6604
6619
  }
6605
6620
  buildPositionMap(t, n, r) {
6606
6621
  this.normalizedToDOM.clear();
@@ -6909,7 +6924,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6909
6924
  contentToSpeak: a,
6910
6925
  shouldUsePlan: y,
6911
6926
  playbackSegments: this.seekSegments
6912
- }), this.setState(A.LOADING), this.prepareHighlightsForSpeak({
6927
+ }), this.setState(C.LOADING), this.prepareHighlightsForSpeak({
6913
6928
  contentToSpeak: a,
6914
6929
  options: n,
6915
6930
  highlightMode: p,
@@ -6917,18 +6932,18 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6917
6932
  }), h ? this.configureWordBoundaryHighlighting({
6918
6933
  highlightMode: p,
6919
6934
  wordBoundaryOffset: n?.wordBoundaryOffset || 0
6920
- }) : this.clearWordBoundaryHighlighting(), this.setState(A.PLAYING), await this.executeSpeakPlayback({
6935
+ }) : this.clearWordBoundaryHighlighting(), this.setState(C.PLAYING), await this.executeSpeakPlayback({
6921
6936
  shouldUsePlan: y,
6922
6937
  runId: r,
6923
6938
  highlightMode: p,
6924
6939
  contentToSpeak: s,
6925
6940
  speechChunks: f
6926
6941
  }), r !== this.speakRunId) return;
6927
- this.setState(A.IDLE), this.clearHighlightsAndTracking();
6942
+ this.setState(C.IDLE), this.clearHighlightsAndTracking();
6928
6943
  } catch (i) {
6929
6944
  let o = i;
6930
6945
  if (console.error("TTS error:", o), this.lastError = o instanceof Error ? o.message : String(o), r !== this.speakRunId) return;
6931
- throw this.setState(A.ERROR), this.clearHighlightsAndTracking(), o;
6946
+ throw this.setState(C.ERROR), this.clearHighlightsAndTracking(), o;
6932
6947
  }
6933
6948
  }
6934
6949
  async switchProviderToBrowser(t, n) {
@@ -7004,7 +7019,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7004
7019
  context: n.catalogContext
7005
7020
  });
7006
7021
  if (o) {
7007
- const s = n?.contentElement && At(n.contentElement, this.getTextProcessingOptions(n.language)).visibleText || r, a = P(o.content);
7022
+ const s = n?.contentElement && Ct(n.contentElement, this.getTextProcessingOptions(n.language)).visibleText || r, a = P(o.content);
7008
7023
  return this.debugLog(`[TTSService] Using catalog content for "${n.catalogId}" (${o.language})`), {
7009
7024
  contentToSpeak: o.content,
7010
7025
  speechText: o.content,
@@ -7038,7 +7053,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7038
7053
  if (!this.catalogResolver) return null;
7039
7054
  const i = this.collectCatalogSpeechChunks(t, r);
7040
7055
  if (!i.some((a) => a.sourceElement)) return null;
7041
- const o = P(i.map((a) => a.speechText).join(" ")), s = At(t, this.getTextProcessingOptions(r.language)).visibleText || n;
7056
+ const o = P(i.map((a) => a.speechText).join(" ")), s = Ct(t, this.getTextProcessingOptions(r.language)).visibleText || n;
7042
7057
  return {
7043
7058
  contentToSpeak: o,
7044
7059
  speechText: o,
@@ -7074,7 +7089,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7074
7089
  }, a = (u, h) => {
7075
7090
  const f = l(u);
7076
7091
  if (f.length !== 1) return null;
7077
- const p = f[0], m = At(p, this.getTextProcessingOptions(n.language)).visibleText || P(p.textContent || ""), y = (b) => P(b).replace(/\s+/g, "");
7092
+ const p = f[0], m = Ct(p, this.getTextProcessingOptions(n.language)).visibleText || P(p.textContent || ""), y = (b) => P(b).replace(/\s+/g, "");
7078
7093
  return y(m) === y(h) ? p : null;
7079
7094
  }, l = (u) => {
7080
7095
  const h = Array.from(u.querySelectorAll("math"));
@@ -7089,16 +7104,16 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7089
7104
  const h = u, f = s(h);
7090
7105
  if (f) {
7091
7106
  o();
7092
- const p = At(h, this.getTextProcessingOptions(n.language)), m = p.visibleText || P(h.textContent || ""), y = ms({
7107
+ const p = Ct(h, this.getTextProcessingOptions(n.language)), m = p.visibleText || P(h.textContent || ""), y = ms({
7093
7108
  speechText: f.content,
7094
7109
  visibleText: m
7095
7110
  }), b = a(h, m), E = b ? Sn({
7096
7111
  mathElement: b,
7097
7112
  speechText: f.content
7098
- }) : void 0, R = E ? void 0 : l(h).map((C) => ({
7099
- element: C,
7113
+ }) : void 0, R = E ? void 0 : l(h).map((M) => ({
7114
+ element: M,
7100
7115
  alignment: Sn({
7101
- mathElement: C,
7116
+ mathElement: M,
7102
7117
  speechText: f.content
7103
7118
  })
7104
7119
  })), F = P(f.content);
@@ -7354,10 +7369,10 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7354
7369
  });
7355
7370
  }
7356
7371
  pause() {
7357
- this.provider && this.state === A.PLAYING && (this.provider.pause(), this.setState(A.PAUSED));
7372
+ this.provider && this.state === C.PLAYING && (this.provider.pause(), this.setState(C.PAUSED));
7358
7373
  }
7359
7374
  resume() {
7360
- this.provider && this.state === A.PAUSED && (this.provider.resume(), this.setState(A.PLAYING));
7375
+ this.provider && this.state === C.PAUSED && (this.provider.resume(), this.setState(C.PLAYING));
7361
7376
  }
7362
7377
  normalizePlaybackRate(t) {
7363
7378
  return Number.isFinite(t) ? Math.max(0.25, Math.min(4, t)) : 1;
@@ -7367,7 +7382,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7367
7382
  const n = Math.max(0, Math.min(this.seekSegments.length - 1, t)), r = this.playbackChunks.length ? this.playbackChunks.slice(n) : null;
7368
7383
  this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = n;
7369
7384
  const i = ++this.speakRunId, o = this.seekSegments.slice(n);
7370
- this.setState(A.PLAYING);
7385
+ this.setState(C.PLAYING);
7371
7386
  try {
7372
7387
  if (this.configureWordBoundaryHighlighting({
7373
7388
  highlightMode: this.activeHighlightMode,
@@ -7381,18 +7396,18 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7381
7396
  }
7382
7397
  else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
7383
7398
  if (i !== this.speakRunId) return;
7384
- this.setState(A.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
7399
+ this.setState(C.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
7385
7400
  } catch (s) {
7386
7401
  if (i !== this.speakRunId) return;
7387
- throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(A.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
7402
+ throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(C.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
7388
7403
  }
7389
7404
  }
7390
7405
  async setPlaybackRate(t) {
7391
7406
  const n = this.normalizePlaybackRate(t);
7392
- await this.updateSettings({ rate: n }), !(this.state !== A.PLAYING || !this.currentText || this.seekSegments.length === 0 || this.hasExplicitBreakSemantics(this.currentText)) && await this.restartFromSeekIndex(this.getCurrentSeekSegmentIndex());
7407
+ await this.updateSettings({ rate: n }), !(this.state !== C.PLAYING || !this.currentText || this.seekSegments.length === 0 || this.hasExplicitBreakSemantics(this.currentText)) && await this.restartFromSeekIndex(this.getCurrentSeekSegmentIndex());
7393
7408
  }
7394
7409
  async seekBy(t) {
7395
- if (!this.provider || !this.currentText || this.state !== A.PLAYING && this.state !== A.PAUSED || this.hasExplicitBreakSemantics(this.currentText) || this.seekSegments.length === 0) return;
7410
+ if (!this.provider || !this.currentText || this.state !== C.PLAYING && this.state !== C.PAUSED || this.hasExplicitBreakSemantics(this.currentText) || this.seekSegments.length === 0) return;
7396
7411
  const n = Number.isFinite(t) ? Math.trunc(t) : 0;
7397
7412
  if (n === 0) return;
7398
7413
  const r = this.getCurrentSeekSegmentIndex(), i = Math.max(0, Math.min(this.seekSegments.length - 1, r + n));
@@ -7407,16 +7422,16 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7407
7422
  await this.seekBy(-n);
7408
7423
  }
7409
7424
  stop() {
7410
- this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(A.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
7425
+ this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(C.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
7411
7426
  }
7412
7427
  requestControlHandoff() {
7413
7428
  typeof window > "u" || window.dispatchEvent(new CustomEvent(od, { detail: { source: "host" } }));
7414
7429
  }
7415
7430
  isPlaying() {
7416
- return this.state === A.PLAYING;
7431
+ return this.state === C.PLAYING;
7417
7432
  }
7418
7433
  isPaused() {
7419
- return this.state === A.PAUSED;
7434
+ return this.state === C.PAUSED;
7420
7435
  }
7421
7436
  getState() {
7422
7437
  return this.state;
@@ -7444,8 +7459,8 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7444
7459
  providerId: "tts",
7445
7460
  previousState: n,
7446
7461
  state: t
7447
- }), t === A.PLAYING) {
7448
- const r = n === A.PAUSED ? "pie-tool-playback-resume" : "pie-tool-playback-start";
7462
+ }), t === C.PLAYING) {
7463
+ const r = n === C.PAUSED ? "pie-tool-playback-resume" : "pie-tool-playback-start";
7449
7464
  this.emitTelemetry(r, {
7450
7465
  toolId: "textToSpeech",
7451
7466
  providerId: "tts",
@@ -7454,7 +7469,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7454
7469
  });
7455
7470
  return;
7456
7471
  }
7457
- if (t === A.PAUSED) {
7472
+ if (t === C.PAUSED) {
7458
7473
  this.emitTelemetry("pie-tool-playback-pause", {
7459
7474
  toolId: "textToSpeech",
7460
7475
  providerId: "tts",
@@ -7463,7 +7478,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7463
7478
  });
7464
7479
  return;
7465
7480
  }
7466
- if (t === A.ERROR) {
7481
+ if (t === C.ERROR) {
7467
7482
  this.emitTelemetry("pie-tool-playback-error", {
7468
7483
  toolId: "textToSpeech",
7469
7484
  providerId: "tts",
@@ -7473,7 +7488,7 @@ var Ds = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7473
7488
  });
7474
7489
  return;
7475
7490
  }
7476
- t === A.IDLE && (n === A.PLAYING || n === A.PAUSED || n === A.LOADING) && this.emitTelemetry("pie-tool-playback-stop", {
7491
+ t === C.IDLE && (n === C.PLAYING || n === C.PAUSED || n === C.LOADING) && this.emitTelemetry("pie-tool-playback-stop", {
7477
7492
  toolId: "textToSpeech",
7478
7493
  providerId: "tts",
7479
7494
  previousState: n,
@@ -7554,8 +7569,8 @@ function hd(e, t) {
7554
7569
  name: "Orange",
7555
7570
  value: "#ffa500"
7556
7571
  }
7557
- ], C = 10, U = 10;
7558
- Ct(() => {
7572
+ ], M = 10, U = 10;
7573
+ Mt(() => {
7559
7574
  if (v(o))
7560
7575
  return ac(v(o), (w) => {
7561
7576
  $(s, w, !0);
@@ -7607,16 +7622,16 @@ function hd(e, t) {
7607
7622
  let D = !1;
7608
7623
  switch (w.key) {
7609
7624
  case "ArrowUp":
7610
- v(u).y -= C, H(`Moved up to ${Math.round(v(u).y)}`), D = !0;
7625
+ v(u).y -= M, H(`Moved up to ${Math.round(v(u).y)}`), D = !0;
7611
7626
  break;
7612
7627
  case "ArrowDown":
7613
- v(u).y += C, H(`Moved down to ${Math.round(v(u).y)}`), D = !0;
7628
+ v(u).y += M, H(`Moved down to ${Math.round(v(u).y)}`), D = !0;
7614
7629
  break;
7615
7630
  case "ArrowLeft":
7616
- v(u).x -= C, H(`Moved left to ${Math.round(v(u).x)}`), D = !0;
7631
+ v(u).x -= M, H(`Moved left to ${Math.round(v(u).x)}`), D = !0;
7617
7632
  break;
7618
7633
  case "ArrowRight":
7619
- v(u).x += C, H(`Moved right to ${Math.round(v(u).x)}`), D = !0;
7634
+ v(u).x += M, H(`Moved right to ${Math.round(v(u).x)}`), D = !0;
7620
7635
  break;
7621
7636
  case "+":
7622
7637
  case "=":
@@ -7643,13 +7658,13 @@ function hd(e, t) {
7643
7658
  }
7644
7659
  D && w.preventDefault();
7645
7660
  }
7646
- Ct(() => {
7661
+ Mt(() => {
7647
7662
  v(a) && r() && !v(R) && (v(a).registerTool(r(), "Line Reader", void 0, hr.TOOL), $(R, !0));
7648
7663
  }), zl(() => () => {
7649
7664
  v(a) && r() && v(a).unregisterTool(r());
7650
- }), Ct(() => {
7665
+ }), Mt(() => {
7651
7666
  v(a) && v(o) && r() && v(a).updateToolElement(r(), v(o));
7652
- }), Ct(() => {
7667
+ }), Mt(() => {
7653
7668
  n() && v(o) && setTimeout(() => v(o)?.focus(), 100);
7654
7669
  });
7655
7670
  let Us = /* @__PURE__ */ ai(() => v(y) + Math.round(v(b) * 255).toString(16).padStart(2, "0"));
@@ -7666,7 +7681,7 @@ function hd(e, t) {
7666
7681
  set toolId(w = "lineReader") {
7667
7682
  r(w), Zn();
7668
7683
  }
7669
- }, Vr = Al(), Ys = Pn(Vr), Ks = (w) => {
7684
+ }, Vr = Cl(), Ys = Pn(Vr), Ks = (w) => {
7670
7685
  var D = cd(), Rn = Pn(D), Xs = ci(Rn, !0);
7671
7686
  ti(Rn);
7672
7687
  var qr = St(Rn, 2), Js = (ye) => {