@pie-players/pie-tool-answer-eliminator 0.3.53 → 0.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { t as f } from "./defineProperty-Dt7ri80W.js";
2
- var ts = Object.create, si = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, rs = Object.getOwnPropertyNames, is = Object.getPrototypeOf, os = Object.prototype.hasOwnProperty, ah = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ss = (e, t, n, r) => {
2
+ var ts = Object.create, si = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, rs = Object.getOwnPropertyNames, is = Object.getPrototypeOf, os = Object.prototype.hasOwnProperty, oh = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ss = (e, t, n, r) => {
3
3
  if (t && typeof t == "object" || typeof t == "function")
4
4
  for (var i = rs(t), o = 0, s = i.length, a; o < s; o++)
5
5
  a = i[o], !os.call(e, a) && a !== n && si(e, a, {
@@ -10,16 +10,16 @@ var ts = Object.create, si = Object.defineProperty, ns = Object.getOwnPropertyDe
10
10
  }, as = (e, t, n) => (n = e != null ? ts(is(e)) : {}, ss(t || !e || !e.__esModule ? si(n, "default", {
11
11
  value: e,
12
12
  enumerable: !0
13
- }) : n, e)), lh = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : e)(function(e) {
13
+ }) : n, e)), sh = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, n) => (typeof require < "u" ? require : t)[n] }) : e)(function(e) {
14
14
  if (typeof require < "u") return require.apply(this, arguments);
15
15
  throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
16
16
  });
17
17
  if (typeof window < "u") {
18
- var mr, vr;
19
- ((mr = (vr = window).__svelte ?? (vr.__svelte = {})).v ?? (mr.v = /* @__PURE__ */ new Set())).add("5");
18
+ var vr, yr;
19
+ ((vr = (yr = window).__svelte ?? (yr.__svelte = {})).v ?? (vr.v = /* @__PURE__ */ new Set())).add("5");
20
20
  }
21
- var qt = {}, H = /* @__PURE__ */ Symbol("uninitialized");
22
- var ls = Array.isArray, cs = Array.prototype.indexOf, Vt = Array.prototype.includes, us = Array.from, Gt = Object.keys, Ut = Object.defineProperty, We = Object.getOwnPropertyDescriptor, hs = Object.prototype, ds = Array.prototype, fs = Object.getPrototypeOf, yr = Object.isExtensible, ps = () => {
21
+ var Vt = {}, H = /* @__PURE__ */ Symbol("uninitialized");
22
+ var ls = Array.isArray, cs = Array.prototype.indexOf, Gt = Array.prototype.includes, us = Array.from, Ut = Object.keys, Kt = Object.defineProperty, We = Object.getOwnPropertyDescriptor, hs = Object.prototype, ds = Array.prototype, fs = Object.getPrototypeOf, br = Object.isExtensible, ps = () => {
23
23
  };
24
24
  function gs(e) {
25
25
  for (var t = 0; t < e.length; t++) e[t]();
@@ -34,11 +34,11 @@ function ms() {
34
34
  reject: t
35
35
  };
36
36
  }
37
- var ch = 1 << 24, ae = 1024, le = 2048, Ye = 4096, ai = 8192, vs = 16384, li = 32768, br = 1 << 25, ci = 65536, uh = 1 << 17, hh = 1 << 18, Ct = 1 << 19, ys = 1 << 20, xt = 65536, Tr = 1 << 21, dh = 1 << 22, ui = 1 << 23, St = /* @__PURE__ */ Symbol("$state"), hi = /* @__PURE__ */ Symbol("legacy props"), bs = /* @__PURE__ */ Symbol("proxy path"), Ts = /* @__PURE__ */ Symbol("attributes"), Ss = /* @__PURE__ */ Symbol("class"), _s = /* @__PURE__ */ Symbol("style"), ws = /* @__PURE__ */ Symbol("text"), Yn = new class extends Error {
37
+ var ah = 1 << 24, ae = 1024, le = 2048, Ye = 4096, ai = 8192, vs = 16384, li = 32768, Tr = 1 << 25, ci = 65536, lh = 1 << 17, ch = 1 << 18, Ct = 1 << 19, ys = 1 << 20, xt = 65536, Sr = 1 << 21, uh = 1 << 22, ui = 1 << 23, St = /* @__PURE__ */ Symbol("$state"), hi = /* @__PURE__ */ Symbol("legacy props"), bs = /* @__PURE__ */ Symbol("proxy path"), Ts = /* @__PURE__ */ Symbol("attributes"), Ss = /* @__PURE__ */ Symbol("class"), _s = /* @__PURE__ */ Symbol("style"), ws = /* @__PURE__ */ Symbol("text"), Jn = new class extends Error {
38
38
  constructor(...t) {
39
39
  super(...t), f(this, "name", "StaleReactionError"), f(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
40
40
  }
41
- }(), ph = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
41
+ }(), dh = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
42
42
  function ks(e) {
43
43
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
44
44
  }
@@ -54,10 +54,10 @@ function Cs(e) {
54
54
  function xs() {
55
55
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
56
56
  }
57
- function Is() {
57
+ function Os() {
58
58
  throw new Error("https://svelte.dev/e/hydration_failed");
59
59
  }
60
- function Os(e) {
60
+ function Is(e) {
61
61
  throw new Error("https://svelte.dev/e/props_invalid_value");
62
62
  }
63
63
  function Ms() {
@@ -88,7 +88,7 @@ function Rt(e) {
88
88
  var D;
89
89
  function kt(e) {
90
90
  if (e === null)
91
- throw di(), qt;
91
+ throw di(), Vt;
92
92
  return D = e;
93
93
  }
94
94
  function fi() {
@@ -122,15 +122,15 @@ function Bs(e, t) {
122
122
  function gi(e) {
123
123
  return !Bs(e, this.v);
124
124
  }
125
- var Ce = !1, It = !1;
126
- function Sr(e, t) {
125
+ var Ce = !1, Ot = !1;
126
+ function _r(e, t) {
127
127
  return e.label = t, zs(e.v, t), e;
128
128
  }
129
129
  function zs(e, t) {
130
130
  return e?.[bs]?.(t), e;
131
131
  }
132
132
  var L = null;
133
- function Kt(e) {
133
+ function Xt(e) {
134
134
  L = e;
135
135
  }
136
136
  function mi(e, t = !1, n) {
@@ -142,7 +142,7 @@ function mi(e, t = !1, n) {
142
142
  s: e,
143
143
  x: null,
144
144
  r: E,
145
- l: It && !t ? {
145
+ l: Ot && !t ? {
146
146
  s: null,
147
147
  u: null,
148
148
  $: []
@@ -157,8 +157,8 @@ function vi(e) {
157
157
  }
158
158
  return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
159
159
  }
160
- function ln() {
161
- return !It || L !== null && L.l === null;
160
+ function cn() {
161
+ return !Ot || L !== null && L.l === null;
162
162
  }
163
163
  var $e = [];
164
164
  function yi() {
@@ -204,7 +204,7 @@ var Ds = ~(le | Ye | ae);
204
204
  function P(e, t) {
205
205
  e.f = e.f & Ds | t;
206
206
  }
207
- function Jn(e) {
207
+ function Qn(e) {
208
208
  (e.f & 512) !== 0 || e.deps === null ? P(e, ae) : P(e, Ye);
209
209
  }
210
210
  function Ti(e) {
@@ -227,7 +227,7 @@ function qs(e) {
227
227
  function _i(e, t) {
228
228
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
229
229
  }
230
- function Qn(e, t) {
230
+ function Zn(e, t) {
231
231
  _i(e, t), t.add(e);
232
232
  }
233
233
  function w(e, t, n) {
@@ -243,10 +243,10 @@ function T(e, t, n) {
243
243
  function d(e, t) {
244
244
  return e.get(_(e, t));
245
245
  }
246
- var wi, Xt = null, et = null, x = null, En = null, z = null, An = null, _t = !1, vn = !1, lt = null, Yt = null, ki = 0;
247
- var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), ht = class Ei {
246
+ var wi, Yt = null, et = null, x = null, An = null, z = null, Cn = null, _t = !1, yn = !1, lt = null, Jt = null, ki = 0;
247
+ var Vs = 1, Qt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), ht = class Ei {
248
248
  constructor() {
249
- Qn(this, $), f(this, "id", Vs++), w(this, Jt, !1), f(this, "linked", !0), w(this, Be, null), w(this, Pe, null), f(this, "async_deriveds", /* @__PURE__ */ new Map()), f(this, "current", /* @__PURE__ */ new Map()), f(this, "previous", /* @__PURE__ */ new Map()), w(this, Qt, /* @__PURE__ */ new Set()), w(this, $t, /* @__PURE__ */ new Set()), w(this, tt, 0), w(this, Re, /* @__PURE__ */ new Map()), w(this, mt, null), w(this, J, []), w(this, Cn, []), w(this, Ge, /* @__PURE__ */ new Set()), w(this, me, /* @__PURE__ */ new Set()), w(this, Ae, /* @__PURE__ */ new Map()), w(this, Wt, /* @__PURE__ */ new Set()), f(this, "is_fork", !1), w(this, vt, !1), et === null ? Xt = et = this : (T(Pe, et, this), T(Be, this, et)), et = this;
249
+ Zn(this, $), f(this, "id", Vs++), w(this, Qt, !1), f(this, "linked", !0), w(this, Be, null), w(this, Pe, null), f(this, "async_deriveds", /* @__PURE__ */ new Map()), f(this, "current", /* @__PURE__ */ new Map()), f(this, "previous", /* @__PURE__ */ new Map()), w(this, Zt, /* @__PURE__ */ new Set()), w(this, $t, /* @__PURE__ */ new Set()), w(this, tt, 0), w(this, Re, /* @__PURE__ */ new Map()), w(this, mt, null), w(this, J, []), w(this, xn, []), w(this, Ge, /* @__PURE__ */ new Set()), w(this, me, /* @__PURE__ */ new Set()), w(this, Ae, /* @__PURE__ */ new Map()), w(this, Wt, /* @__PURE__ */ new Set()), f(this, "is_fork", !1), w(this, vt, !1), et === null ? Yt = et = this : (T(Pe, et, this), T(Be, this, et)), et = this;
250
250
  }
251
251
  skip_effect(t) {
252
252
  d(Ae, this).has(t) || d(Ae, this).set(t, {
@@ -276,17 +276,17 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
276
276
  }
277
277
  flush() {
278
278
  try {
279
- vn = !0, x = this, _($, this, Zt).call(this);
279
+ yn = !0, x = this, _($, this, en).call(this);
280
280
  } finally {
281
- ki = 0, An = null, lt = null, Yt = null, vn = !1, x = null, z = null, De.clear();
281
+ ki = 0, Cn = null, lt = null, Jt = null, yn = !1, x = null, z = null, De.clear();
282
282
  }
283
283
  }
284
284
  discard() {
285
285
  for (const t of d($t, this)) t(this);
286
- d($t, this).clear(), _($, this, en).call(this), d(mt, this)?.resolve();
286
+ d($t, this).clear(), _($, this, tn).call(this), d(mt, this)?.resolve();
287
287
  }
288
288
  register_created_effect(t) {
289
- d(Cn, this).push(t);
289
+ d(xn, this).push(t);
290
290
  }
291
291
  increment(t, n) {
292
292
  if (T(tt, this, d(tt, this) + 1), t) {
@@ -309,7 +309,7 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
309
309
  t.clear(), n.clear();
310
310
  }
311
311
  oncommit(t) {
312
- d(Qt, this).add(t);
312
+ d(Zt, this).add(t);
313
313
  }
314
314
  ondiscard(t) {
315
315
  d($t, this).add(t);
@@ -320,8 +320,8 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
320
320
  static ensure() {
321
321
  if (x === null) {
322
322
  const t = x = new Ei();
323
- !vn && !_t && at(() => {
324
- d(Jt, t) || t.flush();
323
+ !yn && !_t && at(() => {
324
+ d(Qt, t) || t.flush();
325
325
  });
326
326
  }
327
327
  return x;
@@ -333,7 +333,7 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
333
333
  }
334
334
  z = /* @__PURE__ */ new Map();
335
335
  for (const [n, [r]] of this.current) z.set(n, r);
336
- for (let n = Xt; n !== null; n = d(Pe, n))
336
+ for (let n = Yt; n !== null; n = d(Pe, n))
337
337
  if (!(n === this || n.is_fork)) {
338
338
  var t = !1;
339
339
  if (n.id < this.id) {
@@ -348,7 +348,7 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
348
348
  }
349
349
  }
350
350
  schedule(t) {
351
- if (An = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
351
+ if (Cn = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
352
352
  t.b.defer_effect(t);
353
353
  return;
354
354
  }
@@ -366,7 +366,7 @@ var Vs = 1, Jt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
366
366
  }
367
367
  };
368
368
  wi = ht;
369
- function _r() {
369
+ function wr() {
370
370
  if (this.is_fork) return !0;
371
371
  for (const n of d(Re, this).keys()) {
372
372
  for (var e = n, t = !1; e.parent !== null; ) {
@@ -380,28 +380,28 @@ function _r() {
380
380
  }
381
381
  return !1;
382
382
  }
383
- function Zt() {
384
- T(Jt, this, !0), ki++ > 1e3 && (_($, this, en).call(this), Xs());
383
+ function en() {
384
+ T(Qt, this, !0), ki++ > 1e3 && (_($, this, tn).call(this), Xs());
385
385
  for (const a of d(Ge, this))
386
386
  d(me, this).delete(a), P(a, le), this.schedule(a);
387
387
  for (const a of d(me, this))
388
388
  P(a, Ye), this.schedule(a);
389
389
  const e = d(J, this);
390
390
  T(J, this, []), this.apply();
391
- var t = lt = [], n = [], r = Yt = [];
391
+ var t = lt = [], n = [], r = Jt = [];
392
392
  for (const a of e) try {
393
393
  _($, this, Ai).call(this, a, t, n);
394
394
  } catch (l) {
395
- throw Ii(a), _($, this, _r).call(this) || this.discard(), l;
395
+ throw Oi(a), _($, this, wr).call(this) || this.discard(), l;
396
396
  }
397
397
  if (x = null, r.length > 0) {
398
398
  var i = wi.ensure();
399
399
  for (const a of r) i.schedule(a);
400
400
  }
401
- if (lt = null, Yt = null, _($, this, _r).call(this)) {
401
+ if (lt = null, Jt = null, _($, this, wr).call(this)) {
402
402
  _($, this, yt).call(this, n), _($, this, yt).call(this, t);
403
403
  for (const [a, l] of d(Ae, this)) xi(a, l);
404
- r.length > 0 && _($, x, Zt).call(x);
404
+ r.length > 0 && _($, x, en).call(x);
405
405
  return;
406
406
  }
407
407
  const o = _($, this, Gs).call(this);
@@ -410,21 +410,21 @@ function Zt() {
410
410
  return;
411
411
  }
412
412
  d(Ge, this).clear(), d(me, this).clear();
413
- for (const a of d(Qt, this)) a(this);
414
- d(Qt, this).clear(), En = this, wr(n), wr(t), En = null, d(mt, this)?.resolve();
413
+ for (const a of d(Zt, this)) a(this);
414
+ d(Zt, this).clear(), An = this, kr(n), kr(t), An = null, d(mt, this)?.resolve();
415
415
  var s = x;
416
- if (d(tt, this) === 0 && (d(J, this).length === 0 || s !== null) && (_($, this, en).call(this), Ce && (_($, this, Ks).call(this), x = s)), d(J, this).length > 0) if (s !== null) {
416
+ if (d(tt, this) === 0 && (d(J, this).length === 0 || s !== null) && (_($, this, tn).call(this), Ce && (_($, this, Ks).call(this), x = s)), d(J, this).length > 0) if (s !== null) {
417
417
  const a = s;
418
418
  d(J, a).push(...d(J, this).filter((l) => !d(J, a).includes(l)));
419
419
  } else s = this;
420
- s !== null && _($, s, Zt).call(s);
420
+ s !== null && _($, s, en).call(s);
421
421
  }
422
422
  function Ai(e, t, n) {
423
423
  e.f ^= ae;
424
424
  for (var r = e.first; r !== null; ) {
425
425
  var i = r.f, o = (i & 96) !== 0;
426
426
  if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 || d(Ae, this).has(r)) && r.fn !== null) {
427
- o ? r.f ^= ae : (i & 4) !== 0 ? t.push(r) : Ce && (i & 16777224) !== 0 ? n.push(r) : Ot(r) && ((i & 16) !== 0 && d(me, this).add(r), ct(r));
427
+ o ? r.f ^= ae : (i & 4) !== 0 ? t.push(r) : Ce && (i & 16777224) !== 0 ? n.push(r) : It(r) && ((i & 16) !== 0 && d(me, this).add(r), ct(r));
428
428
  var s = r.first;
429
429
  if (s !== null) {
430
430
  r = s;
@@ -471,13 +471,13 @@ function Us(e) {
471
471
  }
472
472
  };
473
473
  for (const n of this.current.keys()) t(n);
474
- this.oncommit(() => e.discard()), _($, e, en).call(e), x = this, _($, this, Zt).call(this);
474
+ this.oncommit(() => e.discard()), _($, e, tn).call(e), x = this, _($, this, en).call(this);
475
475
  }
476
476
  function yt(e) {
477
477
  for (var t = 0; t < e.length; t += 1) Si(e[t], d(Ge, this), d(me, this));
478
478
  }
479
479
  function Ks() {
480
- for (let c = Xt; c !== null; c = d(Pe, c)) {
480
+ for (let c = Yt; c !== null; c = d(Pe, c)) {
481
481
  var e = c.id < this.id, t = [];
482
482
  for (const [u, [h, p]] of this.current) {
483
483
  if (c.current.has(u)) {
@@ -491,7 +491,7 @@ function Ks() {
491
491
  const p = c.async_deriveds.get(u);
492
492
  p && h.promise.then(p.resolve).catch(p.reject);
493
493
  }
494
- if (d(Jt, c)) {
494
+ if (d(Qt, c)) {
495
495
  var r = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
496
496
  if (r.length === 0)
497
497
  e && c.discard();
@@ -508,7 +508,7 @@ function Ks() {
508
508
  return p ? p[0] !== h[0] || p[1] !== h[1] : !0;
509
509
  }).map(([u]) => u);
510
510
  if (a.length > 0)
511
- for (const u of d(Cn, this)) (u.f & 155648) === 0 && Zn(u, a, o) && ((u.f & 4194320) !== 0 ? (P(u, le), c.schedule(u)) : d(Ge, c).add(u));
511
+ for (const u of d(xn, this)) (u.f & 155648) === 0 && er(u, a, o) && ((u.f & 4194320) !== 0 ? (P(u, le), c.schedule(u)) : d(Ge, c).add(u));
512
512
  if (d(J, c).length > 0 && !d(vt, c)) {
513
513
  c.apply();
514
514
  for (var l of d(J, c)) _($, c, Ai).call(c, l, [], []);
@@ -519,10 +519,10 @@ function Ks() {
519
519
  }
520
520
  }
521
521
  }
522
- function en() {
522
+ function tn() {
523
523
  if (this.linked) {
524
524
  var e = d(Be, this), t = d(Pe, this);
525
- e === null ? Xt = t : T(Pe, e, t), t === null ? et = e : T(Be, t, e), this.linked = !1;
525
+ e === null ? Yt = t : T(Pe, e, t), t === null ? et = e : T(Be, t, e), this.linked = !1;
526
526
  }
527
527
  }
528
528
  function pe(e) {
@@ -547,16 +547,16 @@ function Xs() {
547
547
  try {
548
548
  xs();
549
549
  } catch (n) {
550
- it(n, An);
550
+ it(n, Cn);
551
551
  }
552
552
  }
553
553
  var ge = null;
554
- function wr(e) {
554
+ function kr(e) {
555
555
  var t = e.length;
556
556
  if (t !== 0) {
557
557
  for (var n = 0; n < t; ) {
558
558
  var r = e[n++];
559
- if ((r.f & 24576) === 0 && Ot(r) && (ge = /* @__PURE__ */ new Set(), ct(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Vi(r), ge?.size > 0)) {
559
+ if ((r.f & 24576) === 0 && It(r) && (ge = /* @__PURE__ */ new Set(), ct(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Vi(r), ge?.size > 0)) {
560
560
  De.clear();
561
561
  for (const i of ge) {
562
562
  if ((i.f & 24576) !== 0) continue;
@@ -579,20 +579,20 @@ function Ci(e, t, n, r) {
579
579
  if (!n.has(e) && (n.add(e), e.reactions !== null))
580
580
  for (const i of e.reactions) {
581
581
  const o = i.f;
582
- (o & 2) !== 0 ? Ci(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && Zn(i, t, r) && (P(i, le), er(i));
582
+ (o & 2) !== 0 ? Ci(i, t, n, r) : (o & 4194320) !== 0 && (o & 2048) === 0 && er(i, t, r) && (P(i, le), tr(i));
583
583
  }
584
584
  }
585
- function Zn(e, t, n) {
585
+ function er(e, t, n) {
586
586
  const r = n.get(e);
587
587
  if (r !== void 0) return r;
588
588
  if (e.deps !== null) for (const i of e.deps) {
589
- if (Vt.call(t, i)) return !0;
590
- if ((i.f & 2) !== 0 && Zn(i, t, n))
589
+ if (Gt.call(t, i)) return !0;
590
+ if ((i.f & 2) !== 0 && er(i, t, n))
591
591
  return n.set(i, !0), !0;
592
592
  }
593
593
  return n.set(e, !1), !1;
594
594
  }
595
- function er(e) {
595
+ function tr(e) {
596
596
  x.schedule(e);
597
597
  }
598
598
  function xi(e, t) {
@@ -602,15 +602,15 @@ function xi(e, t) {
602
602
  xi(n, t), n = n.next;
603
603
  }
604
604
  }
605
- function Ii(e) {
605
+ function Oi(e) {
606
606
  P(e, ae);
607
607
  for (var t = e.first; t !== null; )
608
- Ii(t), t = t.next;
608
+ Oi(t), t = t.next;
609
609
  }
610
610
  function Ys(e) {
611
- let t = 0, n = cn(0), r;
611
+ let t = 0, n = un(0), r;
612
612
  return () => {
613
- rr() && (b(n), ir(() => (t === 0 && (r = hn(() => e(() => wt(n)))), t += 1, () => {
613
+ ir() && (b(n), or(() => (t === 0 && (r = dn(() => e(() => wt(n)))), t += 1, () => {
614
614
  at(() => {
615
615
  t -= 1, t === 0 && (r?.(), r = void 0, wt(n));
616
616
  });
@@ -621,27 +621,27 @@ var Js = ci | Ct;
621
621
  function Qs(e, t, n, r) {
622
622
  new Zs(e, t, n, r);
623
623
  }
624
- var ie = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), Zs = class {
624
+ var ie = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), Zs = class {
625
625
  constructor(e, t, n, r) {
626
- Qn(this, W), f(this, "parent", void 0), f(this, "is_pending", !1), f(this, "transform_error", void 0), w(this, ie, void 0), w(this, xn, re ? D : null), w(this, ue, void 0), w(this, Et, void 0), w(this, Q, void 0), w(this, he, null), w(this, K, null), w(this, te, null), w(this, ze, null), w(this, nt, 0), w(this, Fe, 0), w(this, Pt, !1), w(this, In, /* @__PURE__ */ new Set()), w(this, On, /* @__PURE__ */ new Set()), w(this, Oe, null), w(this, kr, Ys(() => (T(Oe, this, cn(d(nt, this))), () => {
627
- T(Oe, this, null);
626
+ Zn(this, W), f(this, "parent", void 0), f(this, "is_pending", !1), f(this, "transform_error", void 0), w(this, ie, void 0), w(this, On, re ? D : null), w(this, ue, void 0), w(this, Et, void 0), w(this, Q, void 0), w(this, he, null), w(this, K, null), w(this, te, null), w(this, ze, null), w(this, nt, 0), w(this, Fe, 0), w(this, Pt, !1), w(this, In, /* @__PURE__ */ new Set()), w(this, Mn, /* @__PURE__ */ new Set()), w(this, Ie, null), w(this, Er, Ys(() => (T(Ie, this, un(d(nt, this))), () => {
627
+ T(Ie, this, null);
628
628
  }))), T(ie, this, e), T(ue, this, t), T(Et, this, (i) => {
629
629
  var o = E;
630
630
  o.b = this, o.f |= 128, n(i);
631
631
  }), this.parent = E.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), T(Q, this, va(() => {
632
632
  if (re) {
633
- const i = d(xn, this);
633
+ const i = d(On, this);
634
634
  fi();
635
635
  const o = i.data === "[!";
636
636
  if (i.data.startsWith("[?")) {
637
637
  const s = JSON.parse(i.data.slice(2));
638
638
  _(W, this, ta).call(this, s);
639
639
  } else o ? _(W, this, na).call(this) : _(W, this, ea).call(this);
640
- } else _(W, this, Oi).call(this);
640
+ } else _(W, this, Ii).call(this);
641
641
  }, Js)), re && T(ie, this, D);
642
642
  }
643
643
  defer_effect(e) {
644
- Si(e, d(In, this), d(On, this));
644
+ Si(e, d(In, this), d(Mn, this));
645
645
  }
646
646
  is_rendered() {
647
647
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -650,18 +650,18 @@ var ie = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), ue =
650
650
  return !!d(ue, this).pending;
651
651
  }
652
652
  update_pending_count(e, t) {
653
- _(W, this, Mi).call(this, e, t), T(nt, this, d(nt, this) + e), !(!d(Oe, this) || d(Pt, this)) && (T(Pt, this, !0), at(() => {
654
- T(Pt, this, !1), d(Oe, this) && Pi(d(Oe, this), d(nt, this));
653
+ _(W, this, Mi).call(this, e, t), T(nt, this, d(nt, this) + e), !(!d(Ie, this) || d(Pt, this)) && (T(Pt, this, !0), at(() => {
654
+ T(Pt, this, !1), d(Ie, this) && Pi(d(Ie, this), d(nt, this));
655
655
  }));
656
656
  }
657
657
  get_effect_pending() {
658
- return d(kr, this).call(this), b(d(Oe, this));
658
+ return d(Er, this).call(this), b(d(Ie, this));
659
659
  }
660
660
  error(e) {
661
661
  if (!d(ue, this).onerror && !d(ue, this).failed) throw e;
662
662
  x?.is_fork ? (d(he, this) && x.skip_effect(d(he, this)), d(K, this) && x.skip_effect(d(K, this)), d(te, this) && x.skip_effect(d(te, this)), x.oncommit(() => {
663
- _(W, this, Er).call(this, e);
664
- })) : _(W, this, Er).call(this, e);
663
+ _(W, this, Ar).call(this, e);
664
+ })) : _(W, this, Ar).call(this, e);
665
665
  }
666
666
  };
667
667
  function ea() {
@@ -682,12 +682,12 @@ function na() {
682
682
  const e = d(ue, this).pending;
683
683
  e && (this.is_pending = !0, T(K, this, Ue(() => e(d(ie, this)))), at(() => {
684
684
  var t = T(ze, this, document.createDocumentFragment()), n = zi();
685
- t.append(n), T(he, this, _(W, this, Mn).call(this, () => Ue(() => d(Et, this).call(this, n)))), d(Fe, this) === 0 && (d(ie, this).before(t), T(ze, this, null), un(d(K, this), () => {
685
+ t.append(n), T(he, this, _(W, this, Rn).call(this, () => Ue(() => d(Et, this).call(this, n)))), d(Fe, this) === 0 && (d(ie, this).before(t), T(ze, this, null), hn(d(K, this), () => {
686
686
  T(K, this, null);
687
- }), _(W, this, tr).call(this, x));
687
+ }), _(W, this, nr).call(this, x));
688
688
  }));
689
689
  }
690
- function Oi() {
690
+ function Ii() {
691
691
  try {
692
692
  if (this.is_pending = this.has_pending_snippet(), T(Fe, this, 0), T(nt, this, 0), T(he, this, Ue(() => {
693
693
  d(Et, this).call(this, d(ie, this));
@@ -696,23 +696,23 @@ function Oi() {
696
696
  Ta(d(he, this), e);
697
697
  const t = d(ue, this).pending;
698
698
  T(K, this, Ue(() => t(d(ie, this))));
699
- } else _(W, this, tr).call(this, x);
699
+ } else _(W, this, nr).call(this, x);
700
700
  } catch (t) {
701
701
  this.error(t);
702
702
  }
703
703
  }
704
- function tr(e) {
705
- this.is_pending = !1, e.transfer_effects(d(In, this), d(On, this));
704
+ function nr(e) {
705
+ this.is_pending = !1, e.transfer_effects(d(In, this), d(Mn, this));
706
706
  }
707
- function Mn(e) {
707
+ function Rn(e) {
708
708
  var t = E, n = k, r = L;
709
- xe(d(Q, this)), de(d(Q, this)), Kt(d(Q, this).ctx);
709
+ xe(d(Q, this)), de(d(Q, this)), Xt(d(Q, this).ctx);
710
710
  try {
711
711
  return ht.ensure(), e();
712
712
  } catch (i) {
713
713
  return bi(i), null;
714
714
  } finally {
715
- xe(t), de(n), Kt(r);
715
+ xe(t), de(n), Xt(r);
716
716
  }
717
717
  }
718
718
  function Mi(e, t) {
@@ -723,12 +723,12 @@ function Mi(e, t) {
723
723
  }
724
724
  return;
725
725
  }
726
- T(Fe, this, d(Fe, this) + e), d(Fe, this) === 0 && (_(W, this, tr).call(this, t), d(K, this) && un(d(K, this), () => {
726
+ T(Fe, this, d(Fe, this) + e), d(Fe, this) === 0 && (_(W, this, nr).call(this, t), d(K, this) && hn(d(K, this), () => {
727
727
  T(K, this, null);
728
728
  }), d(ze, this) && (d(ie, this).before(d(ze, this)), T(ze, this, null)));
729
729
  }
730
- function Er(e) {
731
- d(he, this) && (oe(d(he, this)), T(he, this, null)), d(K, this) && (oe(d(K, this)), T(K, this, null)), d(te, this) && (oe(d(te, this)), T(te, this, null)), re && (kt(d(xn, this)), Hs(), kt(Ws()));
730
+ function Ar(e) {
731
+ d(he, this) && (oe(d(he, this)), T(he, this, null)), d(K, this) && (oe(d(K, this)), T(K, this, null)), d(te, this) && (oe(d(te, this)), T(te, this, null)), re && (kt(d(On, this)), Hs(), kt(Ws()));
732
732
  var t = d(ue, this).onerror;
733
733
  let n = d(ue, this).failed;
734
734
  var r = !1, i = !1;
@@ -737,10 +737,10 @@ function Er(e) {
737
737
  Ns();
738
738
  return;
739
739
  }
740
- r = !0, i && $s(), d(te, this) !== null && un(d(te, this), () => {
740
+ r = !0, i && $s(), d(te, this) !== null && hn(d(te, this), () => {
741
741
  T(te, this, null);
742
- }), _(W, this, Mn).call(this, () => {
743
- _(W, this, Oi).call(this);
742
+ }), _(W, this, Rn).call(this, () => {
743
+ _(W, this, Ii).call(this);
744
744
  });
745
745
  }, s = (a) => {
746
746
  try {
@@ -748,7 +748,7 @@ function Er(e) {
748
748
  } catch (l) {
749
749
  it(l, d(Q, this) && d(Q, this).parent);
750
750
  }
751
- n && T(te, this, _(W, this, Mn).call(this, () => {
751
+ n && T(te, this, _(W, this, Rn).call(this, () => {
752
752
  try {
753
753
  return Ue(() => {
754
754
  var l = E;
@@ -771,7 +771,7 @@ function Er(e) {
771
771
  });
772
772
  }
773
773
  // @__NO_SIDE_EFFECTS__
774
- function tn(e) {
774
+ function nn(e) {
775
775
  var t = 2 | le;
776
776
  return E !== null && (E.f |= Ct), {
777
777
  ctx: L,
@@ -789,13 +789,13 @@ function tn(e) {
789
789
  };
790
790
  }
791
791
  // @__NO_SIDE_EFFECTS__
792
- function Ar(e) {
793
- const t = /* @__PURE__ */ tn(e);
792
+ function Cr(e) {
793
+ const t = /* @__PURE__ */ nn(e);
794
794
  return Ce || Ui(t), t;
795
795
  }
796
796
  // @__NO_SIDE_EFFECTS__
797
797
  function ra(e) {
798
- const t = /* @__PURE__ */ tn(e);
798
+ const t = /* @__PURE__ */ nn(e);
799
799
  return t.equals = gi, t;
800
800
  }
801
801
  function ia(e) {
@@ -805,7 +805,7 @@ function ia(e) {
805
805
  for (var n = 0; n < t.length; n += 1) oe(t[n]);
806
806
  }
807
807
  }
808
- function nr(e) {
808
+ function rr(e) {
809
809
  var t, n = E, r = e.parent;
810
810
  if (!ve && r !== null && e.v !== H && (r.f & 24576) !== 0)
811
811
  return Ps(), e.v;
@@ -818,24 +818,24 @@ function nr(e) {
818
818
  return t;
819
819
  }
820
820
  function Ri(e) {
821
- var t = nr(e);
822
- if (!e.equals(t) && (e.wv = Xi(), (!x?.is_fork || e.deps === null) && (x !== null ? (x.capture(e, t, !0), En?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
821
+ var t = rr(e);
822
+ if (!e.equals(t) && (e.wv = Xi(), (!x?.is_fork || e.deps === null) && (x !== null ? (x.capture(e, t, !0), An?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
823
823
  P(e, ae);
824
824
  return;
825
825
  }
826
- ve || (z !== null ? (rr() || x?.is_fork) && z.set(e, t) : Jn(e));
826
+ ve || (z !== null ? (ir() || x?.is_fork) && z.set(e, t) : Qn(e));
827
827
  }
828
828
  function oa(e) {
829
829
  if (e.effects !== null)
830
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Yn), t.fn !== null && (t.teardown = ps), t.ac = null, At(t, 0), or(t));
830
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Jn), t.fn !== null && (t.teardown = ps), t.ac = null, At(t, 0), sr(t));
831
831
  }
832
832
  function Li(e) {
833
833
  if (e.effects !== null)
834
834
  for (const t of e.effects) t.teardown && t.fn !== null && ct(t);
835
835
  }
836
- var nn = /* @__PURE__ */ new Set(), De = /* @__PURE__ */ new Map();
836
+ var rn = /* @__PURE__ */ new Set(), De = /* @__PURE__ */ new Map();
837
837
  var $i = !1;
838
- function cn(e, t) {
838
+ function un(e, t) {
839
839
  var n = {
840
840
  f: 0,
841
841
  v: e,
@@ -848,22 +848,22 @@ function cn(e, t) {
848
848
  }
849
849
  // @__NO_SIDE_EFFECTS__
850
850
  function F(e, t) {
851
- const n = cn(e, t);
851
+ const n = un(e, t);
852
852
  return Ui(n), n;
853
853
  }
854
854
  // @__NO_SIDE_EFFECTS__
855
855
  function sa(e, t = !1, n = !0) {
856
- const r = cn(e);
857
- if (t || (r.equals = gi), It && n && L !== null && L.l !== null) {
856
+ const r = un(e);
857
+ if (t || (r.equals = gi), Ot && n && L !== null && L.l !== null) {
858
858
  var i;
859
859
  ((i = L.l).s ?? (i.s = [])).push(r);
860
860
  }
861
861
  return r;
862
862
  }
863
863
  function M(e, t, n = !1) {
864
- k !== null && (!ne || (k.f & 131072) !== 0) && ln() && (k.f & 4325394) !== 0 && (se === null || !se.has(e)) && Ls();
864
+ k !== null && (!ne || (k.f & 131072) !== 0) && cn() && (k.f & 4325394) !== 0 && (se === null || !se.has(e)) && Ls();
865
865
  let r = n ? ot(t) : t;
866
- return Pi(e, r, Yt);
866
+ return Pi(e, r, Jt);
867
867
  }
868
868
  function Pi(e, t, n = null) {
869
869
  if (!e.equals(t)) {
@@ -871,25 +871,25 @@ function Pi(e, t, n = null) {
871
871
  var r = ht.ensure();
872
872
  if (r.capture(e, t), (e.f & 2) !== 0) {
873
873
  const i = e;
874
- (e.f & 2048) !== 0 && nr(i), z === null && Jn(i);
874
+ (e.f & 2048) !== 0 && rr(i), z === null && Qn(i);
875
875
  }
876
- e.wv = Xi(), Ni(e, le, n), ln() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (Y === null ? _a([e]) : Y.push(e)), !r.is_fork && nn.size > 0 && !$i && aa();
876
+ e.wv = Xi(), Ni(e, le, n), cn() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (Y === null ? _a([e]) : Y.push(e)), !r.is_fork && rn.size > 0 && !$i && aa();
877
877
  }
878
878
  return t;
879
879
  }
880
880
  function aa() {
881
881
  $i = !1;
882
- for (const e of nn) {
882
+ for (const e of rn) {
883
883
  (e.f & 1024) !== 0 && P(e, Ye);
884
884
  let t;
885
885
  try {
886
- t = Ot(e);
886
+ t = It(e);
887
887
  } catch {
888
888
  t = !0;
889
889
  }
890
890
  t && ct(e);
891
891
  }
892
- nn.clear();
892
+ rn.clear();
893
893
  }
894
894
  function wt(e) {
895
895
  M(e, e.v + 1);
@@ -897,17 +897,17 @@ function wt(e) {
897
897
  function Ni(e, t, n) {
898
898
  var r = e.reactions;
899
899
  if (r !== null)
900
- for (var i = ln(), o = r.length, s = 0; s < o; s++) {
900
+ for (var i = cn(), o = r.length, s = 0; s < o; s++) {
901
901
  var a = r[s], l = a.f;
902
902
  if (!(!i && a === E)) {
903
903
  var c = (l & le) === 0;
904
- if (c && P(a, t), (l & 131072) !== 0) nn.add(a);
904
+ if (c && P(a, t), (l & 131072) !== 0) rn.add(a);
905
905
  else if ((l & 2) !== 0) {
906
906
  var u = a;
907
907
  z?.delete(u), (l & 65536) === 0 && (l & 512 && (E === null || (E.f & 2097152) === 0) && (a.f |= xt), Ni(u, Ye, n));
908
908
  } else if (c) {
909
909
  var h = a;
910
- (l & 16) !== 0 && ge !== null && ge.add(h), n !== null ? n.push(h) : er(h);
910
+ (l & 16) !== 0 && ge !== null && ge.add(h), n !== null ? n.push(h) : tr(h);
911
911
  }
912
912
  }
913
913
  }
@@ -929,8 +929,8 @@ function ot(e) {
929
929
  let c = !1;
930
930
  function u(h) {
931
931
  if (!c) {
932
- c = !0, l = h, Sr(i, `${l} version`);
933
- for (const [p, g] of n) Sr(g, ca(l, p));
932
+ c = !0, l = h, _r(i, `${l} version`);
933
+ for (const [p, g] of n) _r(g, ca(l, p));
934
934
  c = !1;
935
935
  }
936
936
  }
@@ -993,8 +993,8 @@ function ot(e) {
993
993
  set(h, p, g, m) {
994
994
  var v = n.get(p), y = p in h;
995
995
  if (r && p === "length") for (var S = g; S < v.v; S += 1) {
996
- var O = n.get(S + "");
997
- O !== void 0 ? M(O, H) : S in h && (O = a(() => /* @__PURE__ */ F(H, o)), n.set(S + "", O));
996
+ var I = n.get(S + "");
997
+ I !== void 0 ? M(I, H) : S in h && (I = a(() => /* @__PURE__ */ F(H, o)), n.set(S + "", I));
998
998
  }
999
999
  if (v === void 0)
1000
1000
  (!y || We(h, p)?.writable) && (v = a(() => /* @__PURE__ */ F(void 0, o)), M(v, ot(g)), n.set(p, v));
@@ -1030,19 +1030,19 @@ function ot(e) {
1030
1030
  function ca(e, t) {
1031
1031
  return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : la.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1032
1032
  }
1033
- var Cr, ua, Hi, Wi, Bi;
1034
- function Rn() {
1035
- if (Cr === void 0) {
1036
- Cr = window, ua = document, Hi = /Firefox/.test(navigator.userAgent);
1033
+ var xr, ua, Hi, Wi, Bi;
1034
+ function Ln() {
1035
+ if (xr === void 0) {
1036
+ xr = window, ua = document, Hi = /Firefox/.test(navigator.userAgent);
1037
1037
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1038
- Wi = We(t, "firstChild").get, Bi = We(t, "nextSibling").get, yr(e) && (e[Ss] = void 0, e[Ts] = null, e[_s] = void 0, e.__e = void 0), yr(n) && (n[ws] = void 0);
1038
+ Wi = We(t, "firstChild").get, Bi = We(t, "nextSibling").get, br(e) && (e[Ss] = void 0, e[Ts] = null, e[_s] = void 0, e.__e = void 0), br(n) && (n[ws] = void 0);
1039
1039
  }
1040
1040
  }
1041
1041
  function zi(e = "") {
1042
1042
  return document.createTextNode(e);
1043
1043
  }
1044
1044
  // @__NO_SIDE_EFFECTS__
1045
- function Ln(e) {
1045
+ function $n(e) {
1046
1046
  return Wi.call(e);
1047
1047
  }
1048
1048
  // @__NO_SIDE_EFFECTS__
@@ -1107,7 +1107,7 @@ function Je(e, t) {
1107
1107
  }
1108
1108
  return r;
1109
1109
  }
1110
- function rr() {
1110
+ function ir() {
1111
1111
  return k !== null && !ne;
1112
1112
  }
1113
1113
  function Le(e) {
@@ -1132,7 +1132,7 @@ function ga(e) {
1132
1132
  ht.ensure();
1133
1133
  const t = Je(64 | Ct, e);
1134
1134
  return (n = {}) => new Promise((r) => {
1135
- n.outro ? un(t, () => {
1135
+ n.outro ? hn(t, () => {
1136
1136
  oe(t), r(void 0);
1137
1137
  }) : (oe(t), r(void 0));
1138
1138
  });
@@ -1140,7 +1140,7 @@ function ga(e) {
1140
1140
  function ma(e) {
1141
1141
  return Je(4, e);
1142
1142
  }
1143
- function ir(e, t = 0) {
1143
+ function or(e, t = 0) {
1144
1144
  return Je(8 | t, e);
1145
1145
  }
1146
1146
  function va(e, t = 0) {
@@ -1154,20 +1154,20 @@ function qi(e) {
1154
1154
  var t = e.teardown;
1155
1155
  if (t !== null) {
1156
1156
  const n = ve, r = k;
1157
- xr(!0), de(null);
1157
+ Or(!0), de(null);
1158
1158
  try {
1159
1159
  t.call(null);
1160
1160
  } finally {
1161
- xr(n), de(r);
1161
+ Or(n), de(r);
1162
1162
  }
1163
1163
  }
1164
1164
  }
1165
- function or(e, t = !1) {
1165
+ function sr(e, t = !1) {
1166
1166
  var n = e.first;
1167
1167
  for (e.first = e.last = null; n !== null; ) {
1168
1168
  const i = n.ac;
1169
1169
  i !== null && Di(() => {
1170
- i.abort(Yn);
1170
+ i.abort(Jn);
1171
1171
  });
1172
1172
  var r = n.next;
1173
1173
  (n.f & 64) !== 0 ? n.parent = null : oe(n, t), n = r;
@@ -1181,10 +1181,10 @@ function ya(e) {
1181
1181
  }
1182
1182
  function oe(e, t = !0) {
1183
1183
  var n = !1;
1184
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ba(e.nodes.start, e.nodes.end), n = !0), P(e, br), or(e, t && !n), At(e, 0);
1184
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ba(e.nodes.start, e.nodes.end), n = !0), P(e, Tr), sr(e, t && !n), At(e, 0);
1185
1185
  var r = e.nodes && e.nodes.t;
1186
1186
  if (r !== null) for (const o of r) o.stop();
1187
- qi(e), e.f ^= br, e.f |= vs;
1187
+ qi(e), e.f ^= Tr, e.f |= vs;
1188
1188
  var i = e.parent;
1189
1189
  i !== null && i.first !== null && Vi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1190
1190
  }
@@ -1198,7 +1198,7 @@ function Vi(e) {
1198
1198
  var t = e.parent, n = e.prev, r = e.next;
1199
1199
  n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1200
1200
  }
1201
- function un(e, t, n = !0) {
1201
+ function hn(e, t, n = !0) {
1202
1202
  var r = [];
1203
1203
  Gi(e, r, !0);
1204
1204
  var i = () => {
@@ -1233,7 +1233,7 @@ function Ta(e, t) {
1233
1233
  }
1234
1234
  }
1235
1235
  var Sa = null, Bt = !1, ve = !1;
1236
- function xr(e) {
1236
+ function Or(e) {
1237
1237
  ve = e;
1238
1238
  }
1239
1239
  var k = null, ne = !1;
@@ -1259,13 +1259,13 @@ function Ir(e) {
1259
1259
  function Xi() {
1260
1260
  return ++Ki;
1261
1261
  }
1262
- function Ot(e) {
1262
+ function It(e) {
1263
1263
  var t = e.f;
1264
1264
  if ((t & 2048) !== 0) return !0;
1265
1265
  if (t & 2 && (e.f &= ~xt), (t & 4096) !== 0) {
1266
1266
  for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1267
1267
  var o = n[i];
1268
- if (Ot(o) && Ri(o), o.wv > e.wv) return !0;
1268
+ if (It(o) && Ri(o), o.wv > e.wv) return !0;
1269
1269
  }
1270
1270
  (t & 512) !== 0 && z === null && P(e, ae);
1271
1271
  }
@@ -1276,16 +1276,16 @@ function Yi(e, t, n = !0) {
1276
1276
  if (r !== null && !(!Ce && se !== null && se.has(e)))
1277
1277
  for (var i = 0; i < r.length; i++) {
1278
1278
  var o = r[i];
1279
- (o.f & 2) !== 0 ? Yi(o, t, !1) : t === o && (n ? P(o, le) : (o.f & 1024) !== 0 && P(o, Ye), er(o));
1279
+ (o.f & 2) !== 0 ? Yi(o, t, !1) : t === o && (n ? P(o, le) : (o.f & 1024) !== 0 && P(o, Ye), tr(o));
1280
1280
  }
1281
1281
  }
1282
1282
  function Ji(e) {
1283
1283
  var t = q, n = U, r = Y, i = k, o = se, s = L, a = ne, l = je, c = e.f;
1284
- q = null, U = 0, Y = null, k = (c & 96) === 0 ? e : null, se = null, Kt(e.ctx), ne = !1, je = ++Ne, e.ac !== null && (Di(() => {
1285
- e.ac.abort(Yn);
1284
+ q = null, U = 0, Y = null, k = (c & 96) === 0 ? e : null, se = null, Xt(e.ctx), ne = !1, je = ++Ne, e.ac !== null && (Di(() => {
1285
+ e.ac.abort(Jn);
1286
1286
  }), e.ac = null);
1287
1287
  try {
1288
- e.f |= Tr;
1288
+ e.f |= Sr;
1289
1289
  var u = e.fn, h = u();
1290
1290
  e.f |= li;
1291
1291
  var p = e.deps, g = x?.is_fork;
@@ -1294,12 +1294,12 @@ function Ji(e) {
1294
1294
  if (g || At(e, U), p !== null && U > 0)
1295
1295
  for (p.length = U + q.length, m = 0; m < q.length; m++) p[U + m] = q[m];
1296
1296
  else e.deps = p = q;
1297
- if (rr() && (e.f & 512) !== 0) for (m = U; m < p.length; m++) {
1297
+ if (ir() && (e.f & 512) !== 0) for (m = U; m < p.length; m++) {
1298
1298
  var v;
1299
1299
  ((v = p[m]).reactions ?? (v.reactions = [])).push(e);
1300
1300
  }
1301
1301
  } else !g && p !== null && U < p.length && (At(e, U), p.length = U);
1302
- if (ln() && Y !== null && !ne && p !== null && (e.f & 6146) === 0) for (m = 0; m < Y.length; m++) Yi(Y[m], e);
1302
+ if (cn() && Y !== null && !ne && p !== null && (e.f & 6146) === 0) for (m = 0; m < Y.length; m++) Yi(Y[m], e);
1303
1303
  if (i !== null && i !== e) {
1304
1304
  if (Ne++, i.deps !== null) for (let y = 0; y < n; y += 1) i.deps[y].rv = Ne;
1305
1305
  if (t !== null) for (const y of t) y.rv = Ne;
@@ -1309,7 +1309,7 @@ function Ji(e) {
1309
1309
  } catch (y) {
1310
1310
  return bi(y);
1311
1311
  } finally {
1312
- e.f ^= Tr, q = t, U = n, Y = r, k = i, se = o, Kt(s), ne = a, je = l;
1312
+ e.f ^= Sr, q = t, U = n, Y = r, k = i, se = o, Xt(s), ne = a, je = l;
1313
1313
  }
1314
1314
  }
1315
1315
  function wa(e, t) {
@@ -1321,9 +1321,9 @@ function wa(e, t) {
1321
1321
  i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1322
1322
  }
1323
1323
  }
1324
- if (n === null && (t.f & 2) !== 0 && (q === null || !Vt.call(q, t))) {
1324
+ if (n === null && (t.f & 2) !== 0 && (q === null || !Gt.call(q, t))) {
1325
1325
  var o = t;
1326
- (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~xt), o.v !== H && Jn(o), oa(o), At(o, 0);
1326
+ (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~xt), o.v !== H && Qn(o), oa(o), At(o, 0);
1327
1327
  }
1328
1328
  }
1329
1329
  function At(e, t) {
@@ -1339,7 +1339,7 @@ function ct(e) {
1339
1339
  if (E = e, Bt = !0, 0)
1340
1340
  var i, o;
1341
1341
  try {
1342
- (t & 16777232) !== 0 ? ya(e) : or(e), qi(e);
1342
+ (t & 16777232) !== 0 ? ya(e) : sr(e), qi(e);
1343
1343
  var s = Ji(e);
1344
1344
  if (e.teardown = typeof s == "function" ? s : null, e.wv = Ki, 0)
1345
1345
  for (var a of e.deps) ;
@@ -1356,9 +1356,9 @@ function b(e) {
1356
1356
  e.rv < Ne && (e.rv = Ne, q === null && n !== null && n[U] === e ? U++ : q === null ? q = [e] : q.push(e));
1357
1357
  else {
1358
1358
  var r;
1359
- (r = k).deps ?? (r.deps = []), Vt.call(k.deps, e) || k.deps.push(e);
1359
+ (r = k).deps ?? (r.deps = []), Gt.call(k.deps, e) || k.deps.push(e);
1360
1360
  var i = e.reactions;
1361
- i === null ? e.reactions = [k] : Vt.call(i, k) || i.push(k);
1361
+ i === null ? e.reactions = [k] : Gt.call(i, k) || i.push(k);
1362
1362
  }
1363
1363
  }
1364
1364
  if (0) {
@@ -1374,10 +1374,10 @@ function b(e) {
1374
1374
  var l = e;
1375
1375
  if (ve) {
1376
1376
  var c = l.v;
1377
- return ((l.f & 1024) === 0 && l.reactions !== null || Zi(l)) && (c = nr(l)), De.set(l, c), c;
1377
+ return ((l.f & 1024) === 0 && l.reactions !== null || Zi(l)) && (c = rr(l)), De.set(l, c), c;
1378
1378
  }
1379
1379
  var u = (l.f & 512) === 0 && !ne && k !== null && (Bt || (k.f & 512) !== 0), h = (l.f & li) === 0;
1380
- Ot(l) && (u && (l.f |= 512), Ri(l)), u && !h && (Li(l), Qi(l));
1380
+ It(l) && (u && (l.f |= 512), Ri(l)), u && !h && (Li(l), Qi(l));
1381
1381
  }
1382
1382
  if (z?.has(e)) return z.get(e);
1383
1383
  if ((e.f & 8388608) !== 0) throw e.v;
@@ -1395,7 +1395,7 @@ function Zi(e) {
1395
1395
  if (De.has(t) || (t.f & 2) !== 0 && Zi(t)) return !0;
1396
1396
  return !1;
1397
1397
  }
1398
- function hn(e) {
1398
+ function dn(e) {
1399
1399
  var t = ne;
1400
1400
  try {
1401
1401
  return ne = !0, e();
@@ -1403,11 +1403,11 @@ function hn(e) {
1403
1403
  ne = t;
1404
1404
  }
1405
1405
  }
1406
- var Nt = /* @__PURE__ */ Symbol("events"), ka = /* @__PURE__ */ new Set(), Or = /* @__PURE__ */ new Set(), Mr = null;
1407
- function Rr(e) {
1406
+ var Nt = /* @__PURE__ */ Symbol("events"), ka = /* @__PURE__ */ new Set(), Mr = /* @__PURE__ */ new Set(), Rr = null;
1407
+ function Lr(e) {
1408
1408
  var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], o = i[0] || e.target;
1409
- Mr = e;
1410
- var s = 0, a = Mr === e && e[Nt];
1409
+ Rr = e;
1410
+ var s = 0, a = Rr === e && e[Nt];
1411
1411
  if (a) {
1412
1412
  var l = i.indexOf(a);
1413
1413
  if (l !== -1 && (t === document || t === window)) {
@@ -1419,7 +1419,7 @@ function Rr(e) {
1419
1419
  l <= c && (s = l);
1420
1420
  }
1421
1421
  if (o = i[s] || e.target, o !== t) {
1422
- Ut(e, "currentTarget", {
1422
+ Kt(e, "currentTarget", {
1423
1423
  configurable: !0,
1424
1424
  get() {
1425
1425
  return o || n;
@@ -1472,10 +1472,10 @@ function xa(e, t) {
1472
1472
  return () => {
1473
1473
  if (re)
1474
1474
  return zt(D, null), D;
1475
- i === void 0 && (i = Ca(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ Ln(i)));
1475
+ i === void 0 && (i = Ca(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ $n(i)));
1476
1476
  var s = r || Hi ? document.importNode(i, !0) : i.cloneNode(!0);
1477
1477
  if (n) {
1478
- var a = /* @__PURE__ */ Ln(s), l = s.lastChild;
1478
+ var a = /* @__PURE__ */ $n(s), l = s.lastChild;
1479
1479
  zt(a, l);
1480
1480
  } else zt(s, s);
1481
1481
  return s;
@@ -1489,7 +1489,7 @@ function eo(e, t) {
1489
1489
  }
1490
1490
  e !== null && e.before(t);
1491
1491
  }
1492
- var Ia = [
1492
+ var Oa = [
1493
1493
  "allowfullscreen",
1494
1494
  "async",
1495
1495
  "autofocus",
@@ -1518,8 +1518,8 @@ var Ia = [
1518
1518
  "defer",
1519
1519
  "disablepictureinpicture",
1520
1520
  "disableremoteplayback"
1521
- ], gh = [
1522
- ...Ia,
1521
+ ], fh = [
1522
+ ...Oa,
1523
1523
  "formNoValidate",
1524
1524
  "isMap",
1525
1525
  "noModule",
@@ -1534,16 +1534,16 @@ var Ia = [
1534
1534
  "allowFullscreen",
1535
1535
  "disablePictureInPicture",
1536
1536
  "disableRemotePlayback"
1537
- ], Oa = ["touchstart", "touchmove"];
1537
+ ], Ia = ["touchstart", "touchmove"];
1538
1538
  function Ma(e) {
1539
- return Oa.includes(e);
1539
+ return Ia.includes(e);
1540
1540
  }
1541
1541
  var Ra = [
1542
1542
  "$state",
1543
1543
  "$state.raw",
1544
1544
  "$derived",
1545
1545
  "$derived.by"
1546
- ], mh = [
1546
+ ], ph = [
1547
1547
  ...Ra,
1548
1548
  "$state.eager",
1549
1549
  "$state.snapshot",
@@ -1559,16 +1559,16 @@ var Ra = [
1559
1559
  "$inspect().with",
1560
1560
  "$inspect.trace",
1561
1561
  "$host"
1562
- ], Lr = !0;
1562
+ ], $r = !0;
1563
1563
  function to(e, t) {
1564
1564
  return no(e, t);
1565
1565
  }
1566
1566
  function La(e, t) {
1567
- Rn(), t.intro = t.intro ?? !1;
1567
+ Ln(), t.intro = t.intro ?? !1;
1568
1568
  const n = t.target, r = re, i = D;
1569
1569
  try {
1570
- for (var o = /* @__PURE__ */ Ln(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ dt(o);
1571
- if (!o) throw qt;
1570
+ for (var o = /* @__PURE__ */ $n(n); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ dt(o);
1571
+ if (!o) throw Vt;
1572
1572
  Rt(!0), kt(o);
1573
1573
  const s = no(e, {
1574
1574
  ...t,
@@ -1578,22 +1578,22 @@ function La(e, t) {
1578
1578
  } catch (s) {
1579
1579
  if (s instanceof Error && s.message.split(`
1580
1580
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1581
- return s !== qt && console.warn("Failed to hydrate: ", s), t.recover === !1 && Is(), Rn(), ha(n), Rt(!1), to(e, t);
1581
+ return s !== Vt && console.warn("Failed to hydrate: ", s), t.recover === !1 && Os(), Ln(), ha(n), Rt(!1), to(e, t);
1582
1582
  } finally {
1583
1583
  Rt(r), kt(i);
1584
1584
  }
1585
1585
  }
1586
1586
  var Ht = /* @__PURE__ */ new Map();
1587
1587
  function no(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: a }) {
1588
- Rn();
1588
+ Ln();
1589
1589
  var l = void 0, c = ga(() => {
1590
1590
  var u = n ?? t.appendChild(zi());
1591
1591
  Qs(u, { pending: () => {
1592
1592
  } }, (g) => {
1593
1593
  mi({});
1594
1594
  var m = L;
1595
- if (o && (m.c = o), i && (r.$$events = i), re && zt(g, null), Lr = s, l = e(g, r) || {}, Lr = !0, re && (E.nodes.end = D, D === null || D.nodeType !== 8 || D.data !== "]"))
1596
- throw di(), qt;
1595
+ if (o && (m.c = o), i && (r.$$events = i), re && zt(g, null), $r = s, l = e(g, r) || {}, $r = !0, re && (E.nodes.end = D, D === null || D.nodeType !== 8 || D.data !== "]"))
1596
+ throw di(), Vt;
1597
1597
  vi();
1598
1598
  }, a);
1599
1599
  var h = /* @__PURE__ */ new Set(), p = (g) => {
@@ -1605,30 +1605,30 @@ function no(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
1605
1605
  for (const V of [t, document]) {
1606
1606
  var S = Ht.get(V);
1607
1607
  S === void 0 && (S = /* @__PURE__ */ new Map(), Ht.set(V, S));
1608
- var O = S.get(v);
1609
- O === void 0 ? (V.addEventListener(v, Rr, { passive: y }), S.set(v, 1)) : S.set(v, O + 1);
1608
+ var I = S.get(v);
1609
+ I === void 0 ? (V.addEventListener(v, Lr, { passive: y }), S.set(v, 1)) : S.set(v, I + 1);
1610
1610
  }
1611
1611
  }
1612
1612
  }
1613
1613
  };
1614
- return p(us(ka)), Or.add(p), () => {
1614
+ return p(us(ka)), Mr.add(p), () => {
1615
1615
  for (var g of h) for (const y of [t, document]) {
1616
1616
  var m = Ht.get(y), v = m.get(g);
1617
- --v == 0 ? (y.removeEventListener(g, Rr), m.delete(g), m.size === 0 && Ht.delete(y)) : m.set(g, v);
1617
+ --v == 0 ? (y.removeEventListener(g, Lr), m.delete(g), m.size === 0 && Ht.delete(y)) : m.set(g, v);
1618
1618
  }
1619
- Or.delete(p), u !== n && u.parentNode?.removeChild(u);
1619
+ Mr.delete(p), u !== n && u.parentNode?.removeChild(u);
1620
1620
  };
1621
1621
  });
1622
- return $n.set(l, c), l;
1622
+ return Pn.set(l, c), l;
1623
1623
  }
1624
- var $n = /* @__PURE__ */ new WeakMap();
1624
+ var Pn = /* @__PURE__ */ new WeakMap();
1625
1625
  function $a(e, t) {
1626
- const n = $n.get(e);
1627
- return n ? ($n.delete(e), n(t)) : Promise.resolve();
1626
+ const n = Pn.get(e);
1627
+ return n ? (Pn.delete(e), n(t)) : Promise.resolve();
1628
1628
  }
1629
1629
  function Pa(e) {
1630
- L === null && ks("onMount"), It && L.l !== null ? Na(L).m.push(e) : Le(() => {
1631
- const t = hn(e);
1630
+ L === null && ks("onMount"), Ot && L.l !== null ? Na(L).m.push(e) : Le(() => {
1631
+ const t = dn(e);
1632
1632
  if (typeof t == "function") return t;
1633
1633
  });
1634
1634
  }
@@ -1640,21 +1640,21 @@ function Na(e) {
1640
1640
  m: []
1641
1641
  });
1642
1642
  }
1643
- var ro, rt = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakSet(), io = class {
1643
+ var ro, rt = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakSet(), io = class {
1644
1644
  constructor(e) {
1645
- Qn(this, $r), w(this, rt, /* @__PURE__ */ new WeakMap()), w(this, rn, void 0), w(this, yn, void 0), T(yn, this, e);
1645
+ Zn(this, Pr), w(this, rt, /* @__PURE__ */ new WeakMap()), w(this, on, void 0), w(this, bn, void 0), T(bn, this, e);
1646
1646
  }
1647
1647
  observe(e, t) {
1648
1648
  var n = d(rt, this).get(e) || /* @__PURE__ */ new Set();
1649
- return n.add(t), d(rt, this).set(e, n), _($r, this, Ha).call(this).observe(e, d(yn, this)), () => {
1649
+ return n.add(t), d(rt, this).set(e, n), _(Pr, this, Ha).call(this).observe(e, d(bn, this)), () => {
1650
1650
  var r = d(rt, this).get(e);
1651
- r.delete(t), r.size === 0 && (d(rt, this).delete(e), d(rn, this).unobserve(e));
1651
+ r.delete(t), r.size === 0 && (d(rt, this).delete(e), d(on, this).unobserve(e));
1652
1652
  };
1653
1653
  }
1654
1654
  };
1655
1655
  ro = io;
1656
1656
  function Ha() {
1657
- return d(rn, this) ?? T(rn, this, new ResizeObserver((e) => {
1657
+ return d(on, this) ?? T(on, this, new ResizeObserver((e) => {
1658
1658
  for (var t of e) {
1659
1659
  ro.entries.set(t.target, t);
1660
1660
  for (var n of d(rt, this).get(t.target) || []) n(t);
@@ -1662,22 +1662,22 @@ function Ha() {
1662
1662
  }));
1663
1663
  }
1664
1664
  f(io, "entries", /* @__PURE__ */ new WeakMap());
1665
- function bn(e, t) {
1665
+ function Tn(e, t) {
1666
1666
  return e === t || e?.[St] === t;
1667
1667
  }
1668
1668
  function Wa(e = {}, t, n, r) {
1669
1669
  var i = L.r, o = E;
1670
1670
  return ma(() => {
1671
1671
  var s, a;
1672
- return ir(() => {
1673
- s = a, a = r?.() || [], hn(() => {
1674
- bn(n(...a), e) || (t(e, ...a), s && bn(n(...s), e) && t(null, ...s));
1672
+ return or(() => {
1673
+ s = a, a = r?.() || [], dn(() => {
1674
+ Tn(n(...a), e) || (t(e, ...a), s && Tn(n(...s), e) && t(null, ...s));
1675
1675
  });
1676
1676
  }), () => {
1677
1677
  let l = o;
1678
1678
  for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
1679
1679
  const c = () => {
1680
- a && bn(n(...a), e) && t(null, ...a);
1680
+ a && Tn(n(...a), e) && t(null, ...a);
1681
1681
  }, u = l.teardown;
1682
1682
  l.teardown = () => {
1683
1683
  c(), u?.();
@@ -1686,14 +1686,14 @@ function Wa(e = {}, t, n, r) {
1686
1686
  }), e;
1687
1687
  }
1688
1688
  function we(e, t, n, r) {
1689
- var i = !It || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ tn(r)), b(c)) : (l && (l = !1, a = s ? hn(r) : r), a);
1689
+ var i = !Ot || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ nn(r)), b(c)) : (l && (l = !1, a = s ? dn(r) : r), a);
1690
1690
  let h;
1691
1691
  if (o) {
1692
1692
  var p = St in e || hi in e;
1693
1693
  h = We(e, t)?.set ?? (p && t in e ? (A) => e[t] = A : void 0);
1694
1694
  }
1695
1695
  var g, m = !1;
1696
- o ? [g, m] = qs(() => e[t]) : g = e[t], g === void 0 && r !== void 0 && (g = u(), h && (i && Os(t), h(g)));
1696
+ o ? [g, m] = qs(() => e[t]) : g = e[t], g === void 0 && r !== void 0 && (g = u(), h && (i && Is(t), h(g)));
1697
1697
  var v;
1698
1698
  if (i ? v = () => {
1699
1699
  var A = e[t];
@@ -1708,15 +1708,15 @@ function we(e, t, n, r) {
1708
1708
  return arguments.length > 0 ? ((!i || !G || y || m) && h(G ? v() : A), A) : v();
1709
1709
  });
1710
1710
  }
1711
- var S = !1, O = ((n & 1) !== 0 ? tn : ra)(() => (S = !1, v()));
1712
- o && b(O);
1711
+ var S = !1, I = ((n & 1) !== 0 ? nn : ra)(() => (S = !1, v()));
1712
+ o && b(I);
1713
1713
  var V = E;
1714
1714
  return (function(A, G) {
1715
1715
  if (arguments.length > 0) {
1716
- const Z = G ? b(O) : i && o ? ot(A) : A;
1717
- return M(O, Z), S = !0, a !== void 0 && (a = Z), A;
1716
+ const Z = G ? b(I) : i && o ? ot(A) : A;
1717
+ return M(I, Z), S = !0, a !== void 0 && (a = Z), A;
1718
1718
  }
1719
- return ve && S || (V.f & 16384) !== 0 ? O.v : b(O);
1719
+ return ve && S || (V.f & 16384) !== 0 ? I.v : b(I);
1720
1720
  });
1721
1721
  }
1722
1722
  function Ba(e) {
@@ -1753,7 +1753,7 @@ var Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), za =
1753
1753
  transformError: e.transformError
1754
1754
  })), !Ce && (!e?.props?.$$host || e.sync === !1) && pe(), T(Me, this, r.$$events);
1755
1755
  for (const i of Object.keys(d(ce, this)))
1756
- i === "$set" || i === "$destroy" || i === "$on" || Ut(this, i, {
1756
+ i === "$set" || i === "$destroy" || i === "$on" || Kt(this, i, {
1757
1757
  get() {
1758
1758
  return d(ce, this)[i];
1759
1759
  },
@@ -1824,9 +1824,9 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
1824
1824
  $$host: this
1825
1825
  }
1826
1826
  }), this.$$me = pa(() => {
1827
- ir(() => {
1827
+ or(() => {
1828
1828
  this.$$r = !0;
1829
- for (const r of Gt(this.$$c)) {
1829
+ for (const r of Ut(this.$$c)) {
1830
1830
  if (!this.$$p_d[r]?.reflect) continue;
1831
1831
  this.$$d[r] = this.$$c[r];
1832
1832
  const i = Ft(r, this.$$d[r], this.$$p_d, "toAttribute");
@@ -1851,7 +1851,7 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
1851
1851
  });
1852
1852
  }
1853
1853
  $$g_p(e) {
1854
- return Gt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
1854
+ return Ut(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
1855
1855
  }
1856
1856
  });
1857
1857
  function Ft(e, t, n, r) {
@@ -1892,11 +1892,11 @@ function Da(e, t, n, r, i, o) {
1892
1892
  super(e, n, i), this.$$p_d = t;
1893
1893
  }
1894
1894
  static get observedAttributes() {
1895
- return Gt(t).map((a) => (t[a].attribute || a).toLowerCase());
1895
+ return Ut(t).map((a) => (t[a].attribute || a).toLowerCase());
1896
1896
  }
1897
1897
  };
1898
- return Gt(t).forEach((a) => {
1899
- Ut(s.prototype, a, {
1898
+ return Ut(t).forEach((a) => {
1899
+ Kt(s.prototype, a, {
1900
1900
  get() {
1901
1901
  return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
1902
1902
  },
@@ -1907,7 +1907,7 @@ function Da(e, t, n, r, i, o) {
1907
1907
  }
1908
1908
  });
1909
1909
  }), r.forEach((a) => {
1910
- Ut(s.prototype, a, { get() {
1910
+ Kt(s.prototype, a, { get() {
1911
1911
  return this.$$c?.[a];
1912
1912
  } });
1913
1913
  }), o && (s = o(s)), e.element = s, s;
@@ -1937,7 +1937,7 @@ var ja = class extends Event {
1937
1937
  requestValue() {
1938
1938
  this.host.dispatchEvent(new ja(this.context, this.host, this.handleValue, this.subscribe));
1939
1939
  }
1940
- }, dn = (e) => e, Va = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), vh = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Ga = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), yh = dn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
1940
+ }, fn = (e) => e, Va = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), gh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Ga = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), mh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
1941
1941
  function so(e, t, n) {
1942
1942
  let r = !1;
1943
1943
  const i = new qa(e, {
@@ -2049,7 +2049,7 @@ var st;
2049
2049
  (function(e) {
2050
2050
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2051
2051
  })(st || (st = {}));
2052
- var ao = class Pn {
2052
+ var ao = class Nn {
2053
2053
  constructor(t = {}) {
2054
2054
  if (f(this, "config", void 0), f(this, "ttsWordHighlight", null), f(this, "ttsSentenceHighlight", null), f(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), f(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), f(this, "annotations", /* @__PURE__ */ new Map()), f(this, "colorHighlights", /* @__PURE__ */ new Map()), f(this, "nextAnnotationId", 1), f(this, "supported", !1), f(this, "rangeSerializer", void 0), f(this, "themeObserver", null), f(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Ja(), typeof CSS > "u" || !("highlights" in CSS)) {
2055
2055
  console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
@@ -2161,14 +2161,14 @@ var ao = class Pn {
2161
2161
  ];
2162
2162
  let h = u[u.length - 1], p = -1 / 0;
2163
2163
  for (const G of u) {
2164
- const Z = this.blend(c, a, G), pt = this.contrastRatio(Z, a), C = this.contrastRatio(Z, l), gr = pt * 1.2 + C * 0.8;
2164
+ const Z = this.blend(c, a, G), pt = this.contrastRatio(Z, a), C = this.contrastRatio(Z, l), mr = pt * 1.2 + C * 0.8;
2165
2165
  if (pt >= 1.25 && C >= 2.4) {
2166
2166
  h = G;
2167
2167
  break;
2168
2168
  }
2169
- gr > p && (p = gr, h = G);
2169
+ mr > p && (p = mr, h = G);
2170
2170
  }
2171
- const g = Math.max(0.24, Math.min(0.85, h * 0.55)), m = Math.max(0.55, Math.min(0.95, h + 0.2)), v = Math.max(0.22, Math.min(0.6, h * 0.45)), y = l, S = this.blend(y, a, m), O = this.contrastRatio(S, a), V = this.relativeLuminance(a) > 0.45 ? [
2171
+ const g = Math.max(0.24, Math.min(0.85, h * 0.55)), m = Math.max(0.55, Math.min(0.95, h + 0.2)), v = Math.max(0.22, Math.min(0.6, h * 0.45)), y = l, S = this.blend(y, a, m), I = this.contrastRatio(S, a), V = this.relativeLuminance(a) > 0.45 ? [
2172
2172
  0,
2173
2173
  0,
2174
2174
  0
@@ -2176,7 +2176,7 @@ var ao = class Pn {
2176
2176
  255,
2177
2177
  255,
2178
2178
  255
2179
- ], A = O >= 1.35 ? y : V;
2179
+ ], A = I >= 1.35 ? y : V;
2180
2180
  return {
2181
2181
  wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${h})`,
2182
2182
  sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${g})`,
@@ -2294,10 +2294,10 @@ var ao = class Pn {
2294
2294
  }
2295
2295
  }
2296
2296
  highlightTTSElementFallbacks(t) {
2297
- typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, Pn.SENTENCE_FALLBACK_SELECTOR);
2297
+ typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-sentence-element", this.ttsSentenceElementHighlights, Nn.SENTENCE_FALLBACK_SELECTOR);
2298
2298
  }
2299
2299
  highlightTTSWordElementFallbacks(t) {
2300
- typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights, Pn.WORD_FALLBACK_SELECTOR);
2300
+ typeof Element > "u" || this.highlightElementFallbacks(t, "data-pie-tts-word-element", this.ttsWordElementHighlights, Nn.WORD_FALLBACK_SELECTOR);
2301
2301
  }
2302
2302
  highlightElementFallbacks(t, n, r, i) {
2303
2303
  for (const o of t) {
@@ -2468,17 +2468,17 @@ function lo(e) {
2468
2468
  console.debug(`[${e}]`, ...t);
2469
2469
  };
2470
2470
  }
2471
- var bh = lo("I18nService"), Tn = {
2471
+ var vh = lo("I18nService"), Sn = {
2472
2472
  assessment: [],
2473
2473
  section: [],
2474
2474
  item: [],
2475
2475
  passage: [],
2476
2476
  rubric: [],
2477
2477
  element: []
2478
- }, Sn = {
2479
- section: [...Tn.section],
2480
- item: [...Tn.item],
2481
- passage: [...Tn.passage]
2478
+ }, _n = {
2479
+ section: [...Sn.section],
2480
+ item: [...Sn.item],
2481
+ passage: [...Sn.passage]
2482
2482
  };
2483
2483
  function qe(e) {
2484
2484
  return typeof e == "object" && e !== null && !Array.isArray(e);
@@ -2545,9 +2545,9 @@ function rl(e) {
2545
2545
  blocked: Ee(ke(t?.blocked, "policy.blocked"))
2546
2546
  },
2547
2547
  placement: {
2548
- section: Ee(ke(n?.section, "placement.section")).length ? Ee(ke(n?.section, "placement.section")) : [...Sn.section],
2549
- item: Ee(ke(n?.item, "placement.item")).length ? Ee(ke(n?.item, "placement.item")) : [...Sn.item],
2550
- passage: Ee(ke(n?.passage, "placement.passage")).length ? Ee(ke(n?.passage, "placement.passage")) : [...Sn.passage]
2548
+ section: Ee(ke(n?.section, "placement.section")).length ? Ee(ke(n?.section, "placement.section")) : [..._n.section],
2549
+ item: Ee(ke(n?.item, "placement.item")).length ? Ee(ke(n?.item, "placement.item")) : [..._n.item],
2550
+ passage: Ee(ke(n?.passage, "placement.passage")).length ? Ee(ke(n?.passage, "placement.passage")) : [..._n.passage]
2551
2551
  },
2552
2552
  providers: r
2553
2553
  };
@@ -2589,7 +2589,7 @@ function sl(e, t, n) {
2589
2589
  for (const { pattern: s, reason: a } of ol) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${n}" ${a}. Inline SVG icons must not include scriptable content.`);
2590
2590
  }
2591
2591
  }
2592
- function Pr(e) {
2592
+ function Nr(e) {
2593
2593
  if (Dt(e.toolId, "toolId"), Dt(e.name, "name"), Dt(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2594
2594
  if (typeof e.icon == "string" && sl(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2595
2595
  const t = e.supportedLevels.find((n) => !il.includes(n));
@@ -2612,12 +2612,12 @@ var al = class {
2612
2612
  return e.map((t) => this.normalizeToolId(t));
2613
2613
  }
2614
2614
  register(e) {
2615
- if (Pr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2615
+ if (Nr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
2616
2616
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
2617
2617
  this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
2618
2618
  }
2619
2619
  override(e) {
2620
- if (Pr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2620
+ if (Nr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2621
2621
  const t = this.tools.get(e.toolId);
2622
2622
  if (t.pnpSupportIds) for (const n of t.pnpSupportIds) this.pnpIndex.get(n)?.delete(e.toolId);
2623
2623
  if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const n of e.pnpSupportIds)
@@ -2756,7 +2756,7 @@ function cl(e) {
2756
2756
  function ho(e) {
2757
2757
  return e.level === "element";
2758
2758
  }
2759
- function sr(e) {
2759
+ function ar(e) {
2760
2760
  if (ho(e)) {
2761
2761
  const t = e.item.config;
2762
2762
  if (!t) return "";
@@ -2816,8 +2816,8 @@ function sr(e) {
2816
2816
  }
2817
2817
  return "";
2818
2818
  }
2819
- function fn(e) {
2820
- const t = sr(e);
2819
+ function pn(e) {
2820
+ const t = ar(e);
2821
2821
  return [
2822
2822
  /<math[>\s]/i,
2823
2823
  /\\\[([^\]]+)\\\]/,
@@ -2854,11 +2854,11 @@ function ul(e) {
2854
2854
  }
2855
2855
  return !1;
2856
2856
  }
2857
- function pn(e) {
2858
- return sr(e).trim().length >= 10;
2857
+ function gn(e) {
2858
+ return ar(e).trim().length >= 10;
2859
2859
  }
2860
2860
  function hl(e) {
2861
- const t = sr(e);
2861
+ const t = ar(e);
2862
2862
  return [
2863
2863
  /chemistry|chemical|element|atom|molecule|compound/i,
2864
2864
  /periodic\s+table/i,
@@ -2878,7 +2878,7 @@ var dl = [
2878
2878
  function pl(e) {
2879
2879
  return fl.has(e);
2880
2880
  }
2881
- function ar(e, t, n) {
2881
+ function lr(e, t, n) {
2882
2882
  const r = e.trim(), i = n.trim();
2883
2883
  if (!r || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
2884
2884
  if (!pl(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
@@ -2961,7 +2961,7 @@ var gl = class {
2961
2961
  destroy() {
2962
2962
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2963
2963
  }
2964
- }, lr = (e, t) => {
2964
+ }, cr = (e, t) => {
2965
2965
  const n = t?.useSentenceSegmenter !== !1;
2966
2966
  try {
2967
2967
  if (!n) throw new Error("Segmenter disabled by policy");
@@ -3103,7 +3103,7 @@ var gl = class {
3103
3103
  }
3104
3104
  segmentSentences(e) {
3105
3105
  const t = this.getSegmentationPolicy();
3106
- return lr(e, {
3106
+ return cr(e, {
3107
3107
  locale: t.locale,
3108
3108
  useSentenceSegmenter: t.useSentenceSegmenter
3109
3109
  });
@@ -3303,33 +3303,33 @@ var gl = class {
3303
3303
  context: t,
3304
3304
  toolbarContext: n
3305
3305
  }) : El(i);
3306
- }, Nn = /* @__PURE__ */ new WeakMap();
3306
+ }, Hn = /* @__PURE__ */ new WeakMap();
3307
3307
  function Al(e, t) {
3308
3308
  if (!e) return null;
3309
- const n = Nn.get(e), r = n?.get(t);
3309
+ const n = Hn.get(e), r = n?.get(t);
3310
3310
  return r ? r.isConnected ? r : (n?.delete(t), null) : null;
3311
3311
  }
3312
3312
  function Cl(e, t, n) {
3313
3313
  if (!e) return;
3314
- let r = Nn.get(e);
3315
- r || (r = /* @__PURE__ */ new Map(), Nn.set(e, r)), r.set(t, n);
3314
+ let r = Hn.get(e);
3315
+ r || (r = /* @__PURE__ */ new Map(), Hn.set(e, r)), r.set(t, n);
3316
3316
  }
3317
- function Nr(e) {
3317
+ function Hr(e) {
3318
3318
  return e === "basic" || e === "scientific" ? e : null;
3319
3319
  }
3320
3320
  function xl(e) {
3321
- const t = e.getToolRenderParams?.("calculator") ?? {}, n = Nr(t.calculatorType), r = t.availableTypes;
3321
+ const t = e.getToolRenderParams?.("calculator") ?? {}, n = Hr(t.calculatorType), r = t.availableTypes;
3322
3322
  return {
3323
3323
  calculatorType: n,
3324
- availableTypes: Array.isArray(r) ? r.map((i) => Nr(i)).filter((i) => i !== null) : n ? [n] : null,
3324
+ availableTypes: Array.isArray(r) ? r.map((i) => Hr(i)).filter((i) => i !== null) : n ? [n] : null,
3325
3325
  displayName: n === "scientific" ? "Scientific Calculator" : n === "basic" ? "Basic Calculator" : "Calculator"
3326
3326
  };
3327
3327
  }
3328
- function Hr(e, t, n) {
3328
+ function Wr(e, t, n) {
3329
3329
  const r = e;
3330
3330
  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;
3331
3331
  }
3332
- var Il = {
3332
+ var Ol = {
3333
3333
  toolId: "calculator",
3334
3334
  name: "Calculator",
3335
3335
  description: "Multi-type calculator (basic, scientific, graphing)",
@@ -3359,11 +3359,11 @@ var Il = {
3359
3359
  "scientificCalculator"
3360
3360
  ],
3361
3361
  isVisibleInContext(e) {
3362
- return fn(e);
3362
+ return pn(e);
3363
3363
  },
3364
3364
  renderToolbar(e, t) {
3365
- const { calculatorType: n, availableTypes: r, displayName: i } = xl(t), o = ar(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Al(t.toolCoordinator, o), l = a ?? fe(this.toolId, e, t, s);
3366
- a || Cl(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Hr(l, n, r);
3365
+ const { calculatorType: n, availableTypes: r, displayName: i } = xl(t), o = lr(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Al(t.toolCoordinator, o), l = a ?? fe(this.toolId, e, t, s);
3366
+ a || Cl(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Wr(l, n, r);
3367
3367
  const c = n === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = n === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
3368
3368
  toolId: this.toolId,
3369
3369
  label: i,
@@ -3390,13 +3390,17 @@ var Il = {
3390
3390
  minWidth: 380,
3391
3391
  minHeight: 420,
3392
3392
  initialAlign: "bottom-right",
3393
- initialMargin: 16
3393
+ initialMargin: 16,
3394
+ content: {
3395
+ overflowY: "auto",
3396
+ preserveMinHeight: !0
3397
+ }
3394
3398
  }
3395
3399
  }],
3396
3400
  button: h,
3397
3401
  sync: () => {
3398
3402
  const g = t.isToolVisible(o);
3399
- h.active = g, h.label = i, h.ariaLabel = g ? u : c, h.tooltip = g ? `Close ${i.toLowerCase()}` : i, p !== g && (l.visible = g, p = g), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Hr(l, n, r);
3403
+ h.active = g, h.label = i, h.ariaLabel = g ? u : c, h.tooltip = g ? `Close ${i.toLowerCase()}` : i, p !== g && (l.visible = g, p = g), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Wr(l, n, r);
3400
3404
  },
3401
3405
  subscribeActive: (g) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3402
3406
  g(t.isToolVisible(o));
@@ -3437,7 +3441,7 @@ var Il = {
3437
3441
  }
3438
3442
  const i = /[A-Za-z0-9]/.test(e), o = /[A-Za-z0-9]/.test(t);
3439
3443
  return i && o;
3440
- }, on = (e, t) => {
3444
+ }, sn = (e, t) => {
3441
3445
  const n = /* @__PURE__ */ new Map();
3442
3446
  if (typeof document > "u" || typeof document.createTreeWalker != "function" || typeof NodeFilter > "u") return {
3443
3447
  text: "",
@@ -3453,14 +3457,14 @@ var Il = {
3453
3457
  const g = p.textContent || "", m = g.match(/\S/), v = m ? m[0] : null;
3454
3458
  !o && !s && yo(l, v, t) && (r.push(" "), a && n.set(i, a), i++, s = !0);
3455
3459
  for (let y = 0; y < g.length; y++) {
3456
- const S = g[y], O = /\s/.test(S);
3457
- o ? O || (o = !1, r.push(S), n.set(i, {
3460
+ const S = g[y], I = /\s/.test(S);
3461
+ o ? I || (o = !1, r.push(S), n.set(i, {
3458
3462
  node: p,
3459
3463
  offset: y
3460
3464
  }), a = {
3461
3465
  node: p,
3462
3466
  offset: y
3463
- }, i++, s = !1, l = S) : O ? (s || (r.push(" "), n.set(i, {
3467
+ }, i++, s = !1, l = S) : I ? (s || (r.push(" "), n.set(i, {
3464
3468
  node: p,
3465
3469
  offset: y
3466
3470
  }), a = {
@@ -3483,13 +3487,13 @@ var Il = {
3483
3487
  text: h,
3484
3488
  map: n
3485
3489
  };
3486
- }, _n = null, Wr = Promise.resolve(), Ol = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Ml = async () => (_n || (_n = import("./sre-Dddi65jB.js").then((e) => /* @__PURE__ */ as(e.default, 1)).then((e) => {
3490
+ }, wn = null, Br = Promise.resolve(), Il = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Ml = async () => (wn || (wn = import("./sre-Dddi65jB.js").then((e) => /* @__PURE__ */ as(e.default, 1)).then((e) => {
3487
3491
  const t = e.default || e;
3488
3492
  if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
3489
3493
  return t;
3490
- })), _n), Rl = (e) => e === "en" ? "clearspeak" : "mathspeak", Br = (e) => !!e && typeof e == "object" && !Array.isArray(e), zr = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, gn = (e) => {
3491
- if (!Br(e)) return;
3492
- const t = zr(e.domain), n = zr(e.style), r = Br(e.engineOptions) ? e.engineOptions : void 0;
3494
+ })), wn), Rl = (e) => e === "en" ? "clearspeak" : "mathspeak", zr = (e) => !!e && typeof e == "object" && !Array.isArray(e), Fr = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, mn = (e) => {
3495
+ if (!zr(e)) return;
3496
+ const t = Fr(e.domain), n = Fr(e.style), r = zr(e.engineOptions) ? e.engineOptions : void 0;
3493
3497
  if (!(!t && !n && !r))
3494
3498
  return {
3495
3499
  ...t ? { domain: t } : {},
@@ -3497,7 +3501,7 @@ var Il = {
3497
3501
  ...r ? { engineOptions: r } : {}
3498
3502
  };
3499
3503
  }, Ll = async (e, t, n, r) => {
3500
- const i = Ol(t), o = gn(r);
3504
+ const i = Il(t), o = mn(r);
3501
3505
  await e.setupEngine?.({
3502
3506
  ...o?.engineOptions || {},
3503
3507
  locale: i,
@@ -3507,8 +3511,8 @@ var Il = {
3507
3511
  markup: n
3508
3512
  }), await e.engineReady?.();
3509
3513
  }, $l = async (e) => {
3510
- const t = Wr.then(e, e);
3511
- return Wr = t.then(() => {
3514
+ const t = Br.then(e, e);
3515
+ return Br = t.then(() => {
3512
3516
  }, () => {
3513
3517
  }), t;
3514
3518
  }, bo = async (e, t, n, r, i) => $l(async () => (await Ll(e, n, r, i), e.toSpeech(t))), Pl = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), Nl = async (e, t, n, r) => {
@@ -3556,55 +3560,71 @@ var Il = {
3556
3560
  "expanding-row",
3557
3561
  "floating-overlay",
3558
3562
  "left-aligned"
3559
- ]), Fr = (e) => e && typeof e == "object" ? e : {}, Wl = (e) => e === "polly" || e === "google" || e === "server", X = (e, t) => e === void 0 ? t : e, sn = (e, t = "left-aligned") => typeof e == "string" && Hl.has(e) ? e : t, Dr = Object.freeze([0.8, 1.25]), jr = (e) => {
3560
- if (typeof e != "number" || !Number.isFinite(e) || e <= 0) return;
3561
- const t = Math.round(e * 100) / 100;
3562
- return t === 1 ? void 0 : t;
3563
+ ]), Wn = (e) => e && typeof e == "object" ? e : {}, Wl = (e) => e === "polly" || e === "google" || e === "server", X = (e, t) => e === void 0 ? t : e, an = (e, t = "left-aligned") => typeof e == "string" && Hl.has(e) ? e : t, yh = Object.freeze([0.8, 1.25]), Dr = Object.freeze([
3564
+ {
3565
+ rate: 0.8,
3566
+ label: "Slow",
3567
+ ariaLabel: "Slow speed"
3568
+ },
3569
+ {
3570
+ rate: 1,
3571
+ label: "Normal",
3572
+ ariaLabel: "Normal speed",
3573
+ default: !0
3574
+ },
3575
+ {
3576
+ rate: 1.25,
3577
+ label: "Fast",
3578
+ ariaLabel: "Fast speed"
3579
+ }
3580
+ ]), jr = (e) => {
3581
+ if (!(typeof e != "number" || !Number.isFinite(e) || e <= 0))
3582
+ return Math.round(e * 100) / 100;
3563
3583
  }, qr = (e) => {
3564
3584
  if (typeof e != "string") return;
3565
3585
  const t = e.trim();
3566
3586
  return t.length ? t : void 0;
3567
- }, Vr = (e) => `${e}x`, So = (e, t) => t ? `Speed ${e}` : `${e} speed`, Bl = (e, t, n) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : So(e, n), zl = (e) => {
3568
- if (typeof e == "number") return jr(e);
3569
- if (!e || typeof e != "object" || Array.isArray(e)) return;
3570
- const t = e, n = jr(t.rate);
3571
- if (n === void 0) return;
3572
- const r = qr(t.label), i = qr(t.ariaLabel);
3573
- return {
3574
- rate: n,
3575
- ...r ? { label: r } : {},
3576
- ...i ? { ariaLabel: i } : {}
3577
- };
3578
- }, Hn = (e) => {
3579
- if (!Array.isArray(e)) return [...Dr];
3580
- if (e.length === 0) return [];
3581
- const t = /* @__PURE__ */ new Set(), n = [];
3582
- for (const r of e) {
3583
- const i = zl(r);
3584
- if (i === void 0) continue;
3585
- const o = typeof i == "number" ? i : i.rate;
3586
- t.has(o) || (t.add(o), n.push(i));
3587
- }
3588
- return n.length ? n : [...Dr];
3589
- }, Fl = (e) => Hn(e).map((t) => {
3590
- if (typeof t == "number") {
3591
- const i = Vr(t);
3592
- return {
3593
- rate: t,
3594
- label: i,
3595
- ariaLabel: So(i, !0)
3596
- };
3587
+ }, Vr = (e) => `${e}x`, So = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`, Bl = (e, t, n) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : So(e, n), jt = (e) => {
3588
+ const t = Array.isArray(e) ? e : [...Dr];
3589
+ if (t.length === 0) return [];
3590
+ const n = /* @__PURE__ */ new Set(), r = [];
3591
+ for (const s of t) {
3592
+ const a = Wn(s), l = jr(typeof s == "number" ? s : a.rate);
3593
+ if (l === void 0 || n.has(l)) continue;
3594
+ n.add(l);
3595
+ const c = l === 1 ? "Normal" : Vr(l), u = typeof s == "number" ? c : qr(a.label) || c, h = typeof s == "number" ? l === 1 ? "Normal speed" : So(u, !0) : Bl(u, qr(a.ariaLabel), u === c);
3596
+ r.push({
3597
+ rate: l,
3598
+ label: u,
3599
+ ariaLabel: h,
3600
+ isDefault: !1,
3601
+ requestedDefault: a.default === !0 || a.isDefault === !0
3602
+ });
3597
3603
  }
3598
- const n = Vr(t.rate), r = t.label || n;
3599
- return {
3600
- rate: t.rate,
3601
- label: r,
3602
- ariaLabel: Bl(r, t.ariaLabel, r === n)
3603
- };
3604
- }), Dl = (e) => {
3604
+ if (!r.length) return jt(Dr);
3605
+ if (!n.has(1)) {
3606
+ const s = {
3607
+ rate: 1,
3608
+ label: "Normal",
3609
+ ariaLabel: "Normal speed",
3610
+ isDefault: !1,
3611
+ requestedDefault: !1
3612
+ }, a = r.findIndex((l) => l.rate > 1);
3613
+ a >= 0 ? r.splice(a, 0, s) : r.push(s);
3614
+ }
3615
+ const i = r.findIndex((s) => s.requestedDefault), o = i >= 0 ? i : r.findIndex((s) => s.rate === 1);
3616
+ return r.map(({ requestedDefault: s, ...a }, l) => ({
3617
+ ...a,
3618
+ isDefault: l === o
3619
+ }));
3620
+ }, bh = Object.freeze([
3621
+ 0.8,
3622
+ 1,
3623
+ 1.25
3624
+ ]), zl = (e) => {
3605
3625
  const t = {
3606
3626
  ...e,
3607
- layoutMode: sn(e.layoutMode)
3627
+ layoutMode: an(e.layoutMode)
3608
3628
  }, n = e.backend || "browser";
3609
3629
  if (!Wl(n)) return t;
3610
3630
  const r = {
@@ -3627,14 +3647,14 @@ var Il = {
3627
3647
  ...r,
3628
3648
  defaultVoice: X(r.defaultVoice, "en-US-Wavenet-A")
3629
3649
  } : r;
3630
- }, wn = (e) => {
3631
- const t = Fr(e), n = Fr(t.settings);
3632
- return Dl({
3650
+ }, kn = (e) => {
3651
+ const t = Wn(e), n = Wn(t.settings);
3652
+ return zl({
3633
3653
  ...t,
3634
3654
  ...n
3635
3655
  });
3636
- }, Wn = (e) => e.backend || "browser", _o = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, wo = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), jl = (e) => {
3637
- const t = Wn(e), n = _o(e, t), r = wo(e, n), i = gn(e.mathSpeech);
3656
+ }, Bn = (e) => e.backend || "browser", _o = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, wo = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Fl = (e) => {
3657
+ const t = Bn(e), n = _o(e, t), r = wo(e, n), i = mn(e.mathSpeech);
3638
3658
  return {
3639
3659
  voice: e.defaultVoice,
3640
3660
  rate: e.rate,
@@ -3660,7 +3680,7 @@ var Il = {
3660
3680
  validateEndpoint: e.validateEndpoint,
3661
3681
  ...typeof e.mathTokenHighlighting == "boolean" ? { mathTokenHighlighting: e.mathTokenHighlighting } : {}
3662
3682
  };
3663
- }, ko = (e) => sn(e.layoutMode), ql = (e) => {
3683
+ }, ko = (e) => an(e.layoutMode), Dl = (e) => {
3664
3684
  switch (ko(e)) {
3665
3685
  case "reserved-row":
3666
3686
  return {
@@ -3687,21 +3707,21 @@ var Il = {
3687
3707
  }
3688
3708
  };
3689
3709
  }
3690
- }, gt = /* @__PURE__ */ new Map(), Vl = "__pieToolElementUnmount", Gr = "pie-tool-active-change", Gl = {
3710
+ }, gt = /* @__PURE__ */ new Map(), jl = "__pieToolElementUnmount", Gr = "pie-tool-active-change", ql = {
3691
3711
  toolId: "textToSpeech",
3692
3712
  name: "Text to Speech",
3693
3713
  description: "Read content aloud",
3694
3714
  icon: "volume-up",
3695
3715
  provider: {
3696
3716
  getProviderId: () => "tts",
3697
- createProvider: (e) => new Tl(Wn(wn(e))),
3717
+ createProvider: (e) => new Tl(Bn(kn(e))),
3698
3718
  getInitConfig: (e) => {
3699
- const t = wn(e), n = Wn(t), r = _o(t, n);
3719
+ const t = kn(e), n = Bn(t), r = _o(t, n);
3700
3720
  return {
3701
3721
  backend: n,
3702
3722
  serverProvider: r,
3703
3723
  transportMode: wo(t, r),
3704
- ...jl(t)
3724
+ ...Fl(t)
3705
3725
  };
3706
3726
  },
3707
3727
  getAuthFetcher: (e) => {
@@ -3710,9 +3730,9 @@ var Il = {
3710
3730
  },
3711
3731
  sanitizeConfig: (e) => {
3712
3732
  const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
3713
- t && "layoutMode" in t && (t.layoutMode = sn(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = Hn(t.speedOptions));
3733
+ t && "layoutMode" in t && (t.layoutMode = an(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = jt(t.speedOptions));
3714
3734
  const n = { ...e };
3715
- return "layoutMode" in n && (n.layoutMode = sn(n.layoutMode)), "speedOptions" in n && (n.speedOptions = Hn(n.speedOptions)), t && (n.settings = t), n;
3735
+ return "layoutMode" in n && (n.layoutMode = an(n.layoutMode)), "speedOptions" in n && (n.speedOptions = jt(n.speedOptions)), t && (n.settings = t), n;
3716
3736
  },
3717
3737
  lazy: !0
3718
3738
  },
@@ -3724,17 +3744,17 @@ var Il = {
3724
3744
  "speechOutput"
3725
3745
  ],
3726
3746
  isVisibleInContext(e) {
3727
- return pn(e);
3747
+ return gn(e);
3728
3748
  },
3729
3749
  renderToolbar(e, t) {
3730
- const n = () => wn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => Fl(n().speedOptions), i = () => ko(n()), o = () => ql(n()), s = ar(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
3750
+ const n = () => kn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), r = () => jt(n().speedOptions), i = () => ko(n()), o = () => Dl(n()), s = lr(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
3731
3751
  const u = t.ui?.size;
3732
3752
  return u === "sm" || u === "lg" ? u : "md";
3733
3753
  }, l = () => {
3734
3754
  let u = gt.get(s);
3735
- return u && typeof u.isConnected == "boolean" && !u.isConnected && (gt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[Vl] = () => {
3755
+ return u && typeof u.isConnected == "boolean" && !u.isConnected && (gt.delete(s), u = void 0), u || (u = document.createElement("pie-tool-tts-inline"), u[jl] = () => {
3736
3756
  gt.get(s) === u && gt.delete(s);
3737
- }, gt.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u;
3757
+ }, gt.set(s, u)), u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u.showSingleSpeedOption = n().showSingleSpeedOption === !0, u;
3738
3758
  }, c = o();
3739
3759
  return {
3740
3760
  toolId: this.toolId,
@@ -3758,13 +3778,13 @@ var Il = {
3758
3778
  },
3759
3779
  sync: () => {
3760
3780
  const u = l();
3761
- u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r();
3781
+ u.setAttribute("tool-id", s), u.setAttribute("catalog-id", t.catalogId || t.itemId), u.setAttribute("language", t.language || "en-US"), u.setAttribute("size", a()), u.setAttribute("layout-mode", i()), u.speedOptions = r(), u.showSingleSpeedOption = n().showSingleSpeedOption === !0;
3762
3782
  }
3763
3783
  };
3764
3784
  }
3765
3785
  };
3766
3786
  function Te(e, t) {
3767
- const n = ar(e, t.scope.level, t.scope.scopeId);
3787
+ const n = lr(e, t.scope.level, t.scope.scopeId);
3768
3788
  return {
3769
3789
  fullToolId: n,
3770
3790
  isActive: () => t.isToolVisible(n),
@@ -3778,10 +3798,10 @@ function Se(e) {
3778
3798
  const t = e.isActive();
3779
3799
  e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
3780
3800
  }
3781
- function cr(e, t) {
3801
+ function ur(e, t) {
3782
3802
  e.setAttribute("data-pie-tool-surface", t);
3783
3803
  }
3784
- var Ul = {
3804
+ var Vl = {
3785
3805
  toolId: "ruler",
3786
3806
  name: "Ruler",
3787
3807
  description: "On-screen ruler for measurements",
@@ -3793,7 +3813,7 @@ var Ul = {
3793
3813
  ],
3794
3814
  pnpSupportIds: ["ruler", "measurement"],
3795
3815
  isVisibleInContext(e) {
3796
- return fn(e);
3816
+ return pn(e);
3797
3817
  },
3798
3818
  renderToolbar(e, t) {
3799
3819
  const n = Te(this.toolId, t), r = {
@@ -3806,7 +3826,7 @@ var Ul = {
3806
3826
  onClick: () => t.toggleTool(this.toolId),
3807
3827
  active: n.isActive()
3808
3828
  }, i = t.componentOverrides ?? {}, o = fe(this.toolId, e, t, i);
3809
- return o.setAttribute("tool-id", n.fullToolId), cr(o, "frameless"), {
3829
+ return o.setAttribute("tool-id", n.fullToolId), ur(o, "frameless"), {
3810
3830
  toolId: this.toolId,
3811
3831
  button: r,
3812
3832
  elements: [{
@@ -3823,7 +3843,7 @@ var Ul = {
3823
3843
  subscribeActive: n.subscribeActive
3824
3844
  };
3825
3845
  }
3826
- }, Kl = {
3846
+ }, Gl = {
3827
3847
  toolId: "protractor",
3828
3848
  name: "Protractor",
3829
3849
  description: "On-screen protractor for angle measurements",
@@ -3835,7 +3855,7 @@ var Ul = {
3835
3855
  ],
3836
3856
  pnpSupportIds: ["protractor", "angleMeasurement"],
3837
3857
  isVisibleInContext(e) {
3838
- return fn(e);
3858
+ return pn(e);
3839
3859
  },
3840
3860
  renderToolbar(e, t) {
3841
3861
  const n = Te(this.toolId, t), r = {
@@ -3848,7 +3868,7 @@ var Ul = {
3848
3868
  onClick: () => t.toggleTool(this.toolId),
3849
3869
  active: n.isActive()
3850
3870
  }, i = t.componentOverrides ?? {}, o = fe(this.toolId, e, t, i);
3851
- return o.setAttribute("tool-id", n.fullToolId), cr(o, "frameless"), {
3871
+ return o.setAttribute("tool-id", n.fullToolId), ur(o, "frameless"), {
3852
3872
  toolId: this.toolId,
3853
3873
  button: r,
3854
3874
  elements: [{
@@ -3865,7 +3885,7 @@ var Ul = {
3865
3885
  subscribeActive: n.subscribeActive
3866
3886
  };
3867
3887
  }
3868
- }, Xl = {
3888
+ }, Ul = {
3869
3889
  toolId: "answerEliminator",
3870
3890
  name: "Answer Eliminator",
3871
3891
  description: "Strike through answer choices",
@@ -3912,7 +3932,7 @@ var Ul = {
3912
3932
  subscribeActive: n.subscribeActive
3913
3933
  };
3914
3934
  }
3915
- }, Yl = {
3935
+ }, Kl = {
3916
3936
  toolId: "highlighter",
3917
3937
  name: "Highlighter",
3918
3938
  description: "Highlight text",
@@ -3930,7 +3950,7 @@ var Ul = {
3930
3950
  "annotation"
3931
3951
  ],
3932
3952
  isVisibleInContext(e) {
3933
- return pn(e);
3953
+ return gn(e);
3934
3954
  },
3935
3955
  renderToolbar(e, t) {
3936
3956
  const n = Te(this.toolId, t), r = {
@@ -3963,7 +3983,7 @@ var Ul = {
3963
3983
  subscribeActive: n.subscribeActive
3964
3984
  };
3965
3985
  }
3966
- }, Jl = {
3986
+ }, Xl = {
3967
3987
  toolId: "lineReader",
3968
3988
  name: "Line Reader",
3969
3989
  description: "Reading guide overlay",
@@ -3982,7 +4002,7 @@ var Ul = {
3982
4002
  "trackingGuide"
3983
4003
  ],
3984
4004
  isVisibleInContext(e) {
3985
- return pn(e);
4005
+ return gn(e);
3986
4006
  },
3987
4007
  renderToolbar(e, t) {
3988
4008
  const n = Te(this.toolId, t), r = {
@@ -3995,7 +4015,7 @@ var Ul = {
3995
4015
  onClick: () => t.toggleTool(this.toolId),
3996
4016
  active: n.isActive()
3997
4017
  }, i = t.componentOverrides ?? {}, o = fe(this.toolId, e, t, i);
3998
- return o.setAttribute("tool-id", n.fullToolId), cr(o, "frameless"), {
4018
+ return o.setAttribute("tool-id", n.fullToolId), ur(o, "frameless"), {
3999
4019
  toolId: this.toolId,
4000
4020
  button: r,
4001
4021
  elements: [{
@@ -4012,7 +4032,7 @@ var Ul = {
4012
4032
  subscribeActive: n.subscribeActive
4013
4033
  };
4014
4034
  }
4015
- }, Ql = {
4035
+ }, Yl = {
4016
4036
  toolId: "theme",
4017
4037
  name: "Theme",
4018
4038
  description: "Accessible themes and contrast",
@@ -4067,7 +4087,7 @@ var Ul = {
4067
4087
  subscribeActive: n.subscribeActive
4068
4088
  };
4069
4089
  }
4070
- }, Zl = {
4090
+ }, Jl = {
4071
4091
  toolId: "annotationToolbar",
4072
4092
  name: "Highlighter",
4073
4093
  description: "Highlight and annotate text",
@@ -4088,7 +4108,7 @@ var Ul = {
4088
4108
  "annotation"
4089
4109
  ],
4090
4110
  isVisibleInContext(e) {
4091
- return pn(e);
4111
+ return gn(e);
4092
4112
  },
4093
4113
  renderToolbar(e, t) {
4094
4114
  const n = Te(this.toolId, t), r = {
@@ -4118,7 +4138,7 @@ var Ul = {
4118
4138
  subscribeActive: n.subscribeActive
4119
4139
  };
4120
4140
  }
4121
- }, ec = {
4141
+ }, Ql = {
4122
4142
  toolId: "graph",
4123
4143
  name: "Graph",
4124
4144
  description: "Graphing calculator and coordinate plane",
@@ -4131,7 +4151,7 @@ var Ul = {
4131
4151
  "graphingTool"
4132
4152
  ],
4133
4153
  isVisibleInContext(e) {
4134
- return fn(e);
4154
+ return pn(e);
4135
4155
  },
4136
4156
  renderToolbar(e, t) {
4137
4157
  const n = Te(this.toolId, t), r = {
@@ -4171,7 +4191,7 @@ var Ul = {
4171
4191
  subscribeActive: n.subscribeActive
4172
4192
  };
4173
4193
  }
4174
- }, tc = {
4194
+ }, Zl = {
4175
4195
  toolId: "periodicTable",
4176
4196
  name: "Periodic Table",
4177
4197
  description: "Chemistry periodic table reference",
@@ -4223,8 +4243,10 @@ var Ul = {
4223
4243
  subscribeActive: n.subscribeActive
4224
4244
  };
4225
4245
  }
4226
- }, nc = [
4227
- Il,
4246
+ }, ec = [
4247
+ Ol,
4248
+ ql,
4249
+ Vl,
4228
4250
  Gl,
4229
4251
  Ul,
4230
4252
  Kl,
@@ -4232,11 +4254,9 @@ var Ul = {
4232
4254
  Yl,
4233
4255
  Jl,
4234
4256
  Ql,
4235
- Zl,
4236
- ec,
4237
- tc
4257
+ Zl
4238
4258
  ];
4239
- function rc(e = {}) {
4259
+ function tc(e = {}) {
4240
4260
  const t = new al(), n = {
4241
4261
  toolTagMap: {
4242
4262
  ...go,
@@ -4245,32 +4265,32 @@ function rc(e = {}) {
4245
4265
  toolComponentFactory: e.toolComponentFactory,
4246
4266
  toolComponentFactories: e.toolComponentFactories
4247
4267
  }, r = (i) => e.overrides?.[i.toolId] || i;
4248
- return e.includePackagedTools && ic(t, {
4268
+ return e.includePackagedTools && nc(t, {
4249
4269
  toolIds: e.toolIds,
4250
4270
  applyOverrides: r
4251
4271
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(n), t;
4252
4272
  }
4253
- function ic(e, t = {}) {
4273
+ function nc(e, t = {}) {
4254
4274
  const n = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, r = t.applyOverrides || ((i) => i);
4255
- for (const i of nc)
4275
+ for (const i of ec)
4256
4276
  n && !n.has(i.toolId) || e.register(r(i));
4257
4277
  }
4258
- function oc(e = {}) {
4259
- return rc({
4278
+ function rc(e = {}) {
4279
+ return tc({
4260
4280
  ...e,
4261
4281
  includePackagedTools: !0
4262
4282
  });
4263
4283
  }
4264
- function sc() {
4265
- const e = oc(), t = /* @__PURE__ */ new Set();
4284
+ function ic() {
4285
+ const e = rc(), t = /* @__PURE__ */ new Set();
4266
4286
  for (const n of e.getAllTools()) for (const r of n.pnpSupportIds || []) t.add(r);
4267
4287
  return [...t].sort();
4268
4288
  }
4269
- var ac = sc(), Th = {
4270
- supports: [...ac],
4289
+ var oc = ic(), Th = {
4290
+ supports: [...oc],
4271
4291
  prohibitedSupports: [],
4272
4292
  activateAtInit: []
4273
- }, lc = {
4293
+ }, sc = {
4274
4294
  visual: {
4275
4295
  magnification: "magnification",
4276
4296
  screenMagnifier: "screenMagnifier",
@@ -4383,11 +4403,11 @@ var ac = sc(), Th = {
4383
4403
  itemGlossary: "itemGlossary",
4384
4404
  tutorialAvailable: "tutorialAvailable"
4385
4405
  }
4386
- }, Sh = Object.values(lc).flatMap((e) => Object.values(e)), _h = lo("ToolCoordinator"), Bn;
4406
+ }, Sh = Object.values(sc).flatMap((e) => Object.values(e)), _h = lo("ToolCoordinator"), zn;
4387
4407
  (function(e) {
4388
4408
  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";
4389
- })(Bn || (Bn = {}));
4390
- var cc = /* @__PURE__ */ new Set([
4409
+ })(zn || (zn = {}));
4410
+ var ac = /* @__PURE__ */ new Set([
4391
4411
  "speak",
4392
4412
  "p",
4393
4413
  "s",
@@ -4396,20 +4416,20 @@ var cc = /* @__PURE__ */ new Set([
4396
4416
  "say-as",
4397
4417
  "voice",
4398
4418
  "lang"
4399
- ]), Ur = /* @__PURE__ */ new Set(["audio", "phoneme"]), Eo = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), jt = (e, t, n) => {
4419
+ ]), Ur = /* @__PURE__ */ new Set(["audio", "phoneme"]), Eo = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), qt = (e, t, n) => {
4400
4420
  for (let r = 0; r < t.length; r++) e.push({
4401
4421
  char: t[r],
4402
4422
  rawOffset: n === null ? null : n + r
4403
4423
  });
4404
- }, uc = (e, t, n) => {
4424
+ }, lc = (e, t, n) => {
4405
4425
  const r = t.slice(n).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
4406
- return r ? (jt(e, Eo(r[0]), n), r[0].length) : 0;
4426
+ return r ? (qt(e, Eo(r[0]), n), r[0].length) : 0;
4407
4427
  }, Kr = (e) => {
4408
4428
  e.push({
4409
4429
  char: " ",
4410
4430
  rawOffset: null
4411
4431
  });
4412
- }, hc = (e) => {
4432
+ }, cc = (e) => {
4413
4433
  const t = /* @__PURE__ */ new Map(), n = [];
4414
4434
  let r = !0;
4415
4435
  for (const i of e) {
@@ -4425,7 +4445,7 @@ var cc = /* @__PURE__ */ new Set([
4425
4445
  text: n.join(""),
4426
4446
  rawToSpokenOffsetMap: t
4427
4447
  };
4428
- }, dc = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", fc = (e, t) => {
4448
+ }, uc = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", hc = (e, t) => {
4429
4449
  const n = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), r = e.match(n);
4430
4450
  return Eo(r?.[2] ?? r?.[3] ?? "") || null;
4431
4451
  }, Ao = (e) => {
@@ -4435,29 +4455,29 @@ var cc = /* @__PURE__ */ new Set([
4435
4455
  const s = e[i];
4436
4456
  if (s !== "<") {
4437
4457
  if (s === "&") {
4438
- const p = uc(t, e, i);
4458
+ const p = lc(t, e, i);
4439
4459
  if (p > 0) {
4440
4460
  i += p;
4441
4461
  continue;
4442
4462
  }
4443
4463
  }
4444
- jt(t, s, i), i++;
4464
+ qt(t, s, i), i++;
4445
4465
  continue;
4446
4466
  }
4447
4467
  const a = e.indexOf(">", i + 1);
4448
4468
  if (a < 0) {
4449
- jt(t, s, i), i++;
4469
+ qt(t, s, i), i++;
4450
4470
  continue;
4451
4471
  }
4452
4472
  r = !0;
4453
- const l = e.slice(i, a + 1), c = dc(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
4473
+ const l = e.slice(i, a + 1), c = uc(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
4454
4474
  if (!u && c === "sub") {
4455
- const p = fc(l, "alias");
4475
+ const p = hc(l, "alias");
4456
4476
  if (!p) {
4457
4477
  n = !0, i = a + 1;
4458
4478
  continue;
4459
4479
  }
4460
- jt(t, p, null);
4480
+ qt(t, p, null);
4461
4481
  const g = e.toLowerCase().indexOf("</sub>", a + 1);
4462
4482
  i = g >= 0 ? g + 6 : a + 1;
4463
4483
  continue;
@@ -4470,16 +4490,16 @@ var cc = /* @__PURE__ */ new Set([
4470
4490
  i = a + 1;
4471
4491
  continue;
4472
4492
  }
4473
- c && !cc.has(c) && !Ur.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && Kr(t), i = a + 1;
4493
+ c && !ac.has(c) && !Ur.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && Kr(t), i = a + 1;
4474
4494
  }
4475
- const o = hc(t);
4495
+ const o = cc(t);
4476
4496
  return {
4477
4497
  spokenText: R(o.text),
4478
4498
  rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
4479
4499
  unsupportedSemantic: n,
4480
4500
  hasMarkup: r
4481
4501
  };
4482
- }, pc = mo(), Co = /* @__PURE__ */ new Map([
4502
+ }, dc = mo(), Co = /* @__PURE__ */ new Map([
4483
4503
  ["zero", "0"],
4484
4504
  ["one", "1"],
4485
4505
  ["two", "2"],
@@ -4491,7 +4511,7 @@ var cc = /* @__PURE__ */ new Set([
4491
4511
  ["eight", "8"],
4492
4512
  ["nine", "9"],
4493
4513
  ["ten", "10"]
4494
- ]), gc = [
4514
+ ]), fc = [
4495
4515
  {
4496
4516
  phrase: [
4497
4517
  "plus",
@@ -4566,9 +4586,9 @@ var cc = /* @__PURE__ */ new Set([
4566
4586
  visible: "+",
4567
4587
  score: 5
4568
4588
  }
4569
- ], zn = (e) => {
4589
+ ], Fn = (e) => {
4570
4590
  const t = [];
4571
- for (const n of e.matchAll(pc)) {
4591
+ for (const n of e.matchAll(dc)) {
4572
4592
  const r = n[0], i = n.index ?? 0;
4573
4593
  t.push({
4574
4594
  text: r,
@@ -4578,16 +4598,16 @@ var cc = /* @__PURE__ */ new Set([
4578
4598
  });
4579
4599
  }
4580
4600
  return t;
4581
- }, Fn = (e) => Co.get(e.normalized) || e.normalized, mc = (e, t) => {
4601
+ }, Dn = (e) => Co.get(e.normalized) || e.normalized, pc = (e, t) => {
4582
4602
  const n = [];
4583
4603
  for (let r = 0; r < e.length; r++) {
4584
- for (let i = 0; i < t.length; i++) Fn(e[r]) === Fn(t[i]) && n.push({
4604
+ for (let i = 0; i < t.length; i++) Dn(e[r]) === Dn(t[i]) && n.push({
4585
4605
  spokenStartToken: r,
4586
4606
  spokenEndToken: r + 1,
4587
4607
  visibleToken: i,
4588
4608
  score: 10
4589
4609
  });
4590
- for (const i of gc) {
4610
+ for (const i of fc) {
4591
4611
  const o = e.slice(r, r + i.phrase.length);
4592
4612
  if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
4593
4613
  for (let s = 0; s < t.length; s++)
@@ -4600,8 +4620,8 @@ var cc = /* @__PURE__ */ new Set([
4600
4620
  }
4601
4621
  }
4602
4622
  return n;
4603
- }, vc = (e, t) => {
4604
- const n = mc(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
4623
+ }, gc = (e, t) => {
4624
+ const n = pc(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), r = new Array(n.length).fill(0), i = new Array(n.length).fill(-1);
4605
4625
  for (let l = 0; l < n.length; l++) {
4606
4626
  const c = n[l];
4607
4627
  r[l] = c.score;
@@ -4630,12 +4650,12 @@ var cc = /* @__PURE__ */ new Set([
4630
4650
  score: l.score
4631
4651
  };
4632
4652
  });
4633
- }, yc = (e, t, n) => {
4653
+ }, mc = (e, t, n) => {
4634
4654
  if (e.length === 0) return 0;
4635
4655
  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;
4636
4656
  return Math.min(1, r * i);
4637
4657
  }, xo = (e) => {
4638
- const t = Ao(e.speechText), n = R(e.visibleText), r = t.spokenText, i = zn(r), o = zn(n), s = t.unsupportedSemantic ? [] : vc(i, o), a = yc(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";
4658
+ const t = Ao(e.speechText), n = R(e.visibleText), r = t.spokenText, i = Fn(r), o = Fn(n), s = t.unsupportedSemantic ? [] : gc(i, o), a = mc(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";
4639
4659
  return {
4640
4660
  speechText: e.speechText,
4641
4661
  spokenText: r,
@@ -4648,15 +4668,15 @@ var cc = /* @__PURE__ */ new Set([
4648
4668
  visibleTokens: o,
4649
4669
  rawToSpokenOffsetMap: t.rawToSpokenOffsetMap
4650
4670
  };
4651
- }, ur = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, Io = (e) => {
4671
+ }, hr = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, Oo = (e) => {
4652
4672
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
4653
- const t = zn(e)[0];
4673
+ const t = Fn(e)[0];
4654
4674
  return t ? Co.get(t.normalized) || t.normalized : null;
4655
4675
  }, Xr = (e, t, n) => {
4656
- const r = Io(n);
4676
+ const r = Oo(n);
4657
4677
  if (!t || !r) return !1;
4658
- const i = ur(e.spokenTokens, t.start);
4659
- return i ? Fn(i) === r : !1;
4678
+ const i = hr(e.spokenTokens, t.start);
4679
+ return i ? Dn(i) === r : !1;
4660
4680
  }, Yr = (e, t) => {
4661
4681
  const n = e.rawToSpokenOffsetMap.get(t);
4662
4682
  if (n !== void 0) return n;
@@ -4669,19 +4689,19 @@ var cc = /* @__PURE__ */ new Set([
4669
4689
  }, Jr = (e, t, n) => {
4670
4690
  const r = Yr(e, t);
4671
4691
  if (r === null) return null;
4672
- const i = Yr(e, Math.max(t, t + n - 1)), o = ur(e.spokenTokens, r), s = i !== null && i >= r ? i - r + 1 : o ? o.end - r : n;
4692
+ const i = Yr(e, Math.max(t, t + n - 1)), o = hr(e.spokenTokens, r), s = i !== null && i >= r ? i - r + 1 : o ? o.end - r : n;
4673
4693
  return {
4674
4694
  start: r,
4675
4695
  length: Math.max(1, s)
4676
4696
  };
4677
4697
  }, Qr = (e, t, n) => {
4678
4698
  if (t < 0 || t >= e.spokenText.length) return null;
4679
- const r = ur(e.spokenTokens, t);
4699
+ const r = hr(e.spokenTokens, t);
4680
4700
  return r ? {
4681
4701
  start: t,
4682
4702
  length: Math.min(n, r.end - t)
4683
4703
  } : null;
4684
- }, bc = (e, t, n = 1, r) => {
4704
+ }, vc = (e, t, n = 1, r) => {
4685
4705
  if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
4686
4706
  const i = Math.max(1, Number.isFinite(n) ? n : 1);
4687
4707
  if (r && /^<[^>]+>$/.test(r.trim())) return null;
@@ -4690,12 +4710,12 @@ var cc = /* @__PURE__ */ new Set([
4690
4710
  if (r) {
4691
4711
  if (Xr(e, o, r)) return o;
4692
4712
  if (Xr(e, s, r)) return s;
4693
- if (Io(r)) return null;
4713
+ if (Oo(r)) return null;
4694
4714
  }
4695
4715
  return o || s;
4696
4716
  }
4697
4717
  return Qr(e, t, i) || Jr(e, t, i);
4698
- }, Tc = (e, t) => {
4718
+ }, yc = (e, t) => {
4699
4719
  if (e.playbackMode === "region-fallback") return null;
4700
4720
  const n = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
4701
4721
  if (n) return {
@@ -4717,7 +4737,7 @@ var cc = /* @__PURE__ */ new Set([
4717
4737
  start: Math.min(r.visibleStart, i.visibleStart),
4718
4738
  end: Math.max(r.visibleEnd, i.visibleEnd)
4719
4739
  } : null;
4720
- }, Sc = /* @__PURE__ */ new Map([
4740
+ }, bc = /* @__PURE__ */ new Map([
4721
4741
  ["+", ["plus"]],
4722
4742
  ["-", ["minus", "negative"]],
4723
4743
  ["−", ["minus", "negative"]],
@@ -4741,12 +4761,12 @@ var cc = /* @__PURE__ */ new Set([
4741
4761
  ["•", ["times"]],
4742
4762
  ["·", ["times"]],
4743
4763
  ["⁢", ["times", "multiplied by"]]
4744
- ]), _c = /* @__PURE__ */ new Map([
4764
+ ]), Tc = /* @__PURE__ */ new Map([
4745
4765
  ["⁡", "function-application"],
4746
4766
  ["⁢", "implicit-multiply"],
4747
4767
  ["⁣", "invisible-separator"],
4748
4768
  ["⁤", "invisible-plus"]
4749
- ]), Oo = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), wc = /* @__PURE__ */ new Map([
4769
+ ]), Io = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), Sc = /* @__PURE__ */ new Map([
4750
4770
  ["msqrt", "radical"],
4751
4771
  ["mroot", "radical"],
4752
4772
  ["msub", "subscript"],
@@ -4756,11 +4776,11 @@ var cc = /* @__PURE__ */ new Set([
4756
4776
  ["munderover", "underoverscript"],
4757
4777
  ["mmultiscripts", "multiscript"],
4758
4778
  ["menclose", "enclosure"]
4759
- ]), kc = (e) => e.replace(/\s+/g, " ").trim(), Ve = (e) => (e.localName || e.tagName || "").toLowerCase(), Ec = (e) => e.nodeType === Node.ELEMENT_NODE, ut = (e) => Array.from(e.childNodes).filter(Ec), hr = (e) => kc(e.textContent || ""), ye = (e, t) => ({
4779
+ ]), _c = (e) => e.replace(/\s+/g, " ").trim(), Ve = (e) => (e.localName || e.tagName || "").toLowerCase(), wc = (e) => e.nodeType === Node.ELEMENT_NODE, ut = (e) => Array.from(e.childNodes).filter(wc), dr = (e) => _c(e.textContent || ""), ye = (e, t) => ({
4760
4780
  type: "element-range",
4761
4781
  quality: t,
4762
4782
  element: e
4763
- }), Ac = (e) => {
4783
+ }), kc = (e) => {
4764
4784
  switch (e) {
4765
4785
  case "mi":
4766
4786
  return "identifier";
@@ -4776,15 +4796,15 @@ var cc = /* @__PURE__ */ new Set([
4776
4796
  default:
4777
4797
  return "unknown";
4778
4798
  }
4779
- }, Cc = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), xc = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? Oo.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? Sc.get(e) || [] : [], Ke = (e) => {
4780
- const t = e.normalized ?? Cc(e.text, e.kind || "unknown");
4799
+ }, Ec = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Ac = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? Io.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? bc.get(e) || [] : [], Ke = (e) => {
4800
+ const t = e.normalized ?? Ec(e.text, e.kind || "unknown");
4781
4801
  return {
4782
4802
  id: `math-token-${e.state.nextId++}`,
4783
4803
  kind: e.kind,
4784
4804
  role: e.role,
4785
4805
  text: e.text,
4786
4806
  normalized: t,
4787
- spokenAliases: xc(e.text, e.kind, e.role),
4807
+ spokenAliases: Ac(e.text, e.kind, e.role),
4788
4808
  sourceElement: e.sourceElement,
4789
4809
  path: e.path,
4790
4810
  target: e.target || ye(e.sourceElement, "element-range"),
@@ -4794,7 +4814,7 @@ var cc = /* @__PURE__ */ new Set([
4794
4814
  e[n].push(t);
4795
4815
  }, Mo = (e, t, n) => {
4796
4816
  ut(e).forEach((r, i) => be(r, t, `${n}/${Ve(r)}[${i}]`));
4797
- }, Ic = (e, t, n) => {
4817
+ }, Cc = (e, t, n) => {
4798
4818
  const r = ut(e);
4799
4819
  r[0] && be(r[0], t, `${n}/numerator`), Xe(t, Ke({
4800
4820
  state: t,
@@ -4805,7 +4825,7 @@ var cc = /* @__PURE__ */ new Set([
4805
4825
  path: n,
4806
4826
  target: ye(e, "element-range")
4807
4827
  })), r[1] && be(r[1], t, `${n}/denominator`);
4808
- }, Oc = (e, t, n) => {
4828
+ }, xc = (e, t, n) => {
4809
4829
  const r = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
4810
4830
  Xe(t, Ke({
4811
4831
  state: t,
@@ -4824,13 +4844,13 @@ var cc = /* @__PURE__ */ new Set([
4824
4844
  path: `${n}/close`,
4825
4845
  target: ye(e, "element-range")
4826
4846
  }));
4827
- }, Mc = (e, t, n) => {
4847
+ }, Oc = (e, t, n) => {
4828
4848
  const r = ut(e);
4829
4849
  r[0] && be(r[0], t, `${n}/base`);
4830
4850
  const i = r[1];
4831
4851
  if (!i) return;
4832
- const o = hr(i);
4833
- if (Oo.has(o)) {
4852
+ const o = dr(i);
4853
+ if (Io.has(o)) {
4834
4854
  Xe(t, Ke({
4835
4855
  state: t,
4836
4856
  kind: "structure",
@@ -4844,18 +4864,18 @@ var cc = /* @__PURE__ */ new Set([
4844
4864
  return;
4845
4865
  }
4846
4866
  be(i, t, `${n}/exponent`);
4847
- }, Rc = (e, t, n, r) => {
4867
+ }, Ic = (e, t, n, r) => {
4848
4868
  Xe(t, Ke({
4849
4869
  state: t,
4850
4870
  kind: "structure",
4851
4871
  role: r,
4852
- text: hr(e) || r,
4872
+ text: dr(e) || r,
4853
4873
  normalized: `\0${r}`,
4854
4874
  sourceElement: e,
4855
4875
  path: n,
4856
4876
  target: ye(e, "element-range")
4857
4877
  }));
4858
- }, Lc = (e, t, n) => {
4878
+ }, Mc = (e, t, n) => {
4859
4879
  let r = 0;
4860
4880
  for (const i of ut(e))
4861
4881
  (Ve(i) === "mtr" || Ve(i) === "mlabeledtr") && (r++, Xe(t, Ke({
@@ -4868,10 +4888,10 @@ var cc = /* @__PURE__ */ new Set([
4868
4888
  path: `${n}/row[${r}]`,
4869
4889
  target: ye(i, "region-fallback")
4870
4890
  }), "layoutTargets")), be(i, t, `${n}/${Ve(i)}[${r}]`);
4871
- }, $c = (e, t, n) => {
4872
- const r = hr(e);
4891
+ }, Rc = (e, t, n) => {
4892
+ const r = dr(e);
4873
4893
  if (!r) return;
4874
- const i = Ac(Ve(e)), o = i === "operator" ? _c.get(r) : void 0, s = o ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
4894
+ const i = kc(Ve(e)), o = i === "operator" ? Tc.get(r) : void 0, s = o ?? (i === "operator" && (r === "(" || r === ")") ? "grouping-fence" : i);
4875
4895
  Xe(t, Ke({
4876
4896
  state: t,
4877
4897
  kind: i,
@@ -4902,19 +4922,19 @@ var cc = /* @__PURE__ */ new Set([
4902
4922
  case "mtext":
4903
4923
  case "ms":
4904
4924
  case "mspace":
4905
- $c(e, t, n);
4925
+ Rc(e, t, n);
4906
4926
  return;
4907
4927
  case "mfrac":
4908
- Ic(e, t, n);
4928
+ Cc(e, t, n);
4909
4929
  return;
4910
4930
  case "msup":
4911
- Mc(e, t, n);
4931
+ Oc(e, t, n);
4912
4932
  return;
4913
4933
  case "mfenced":
4914
- Oc(e, t, n);
4934
+ xc(e, t, n);
4915
4935
  return;
4916
4936
  case "mtable":
4917
- Lc(e, t, n);
4937
+ Mc(e, t, n);
4918
4938
  return;
4919
4939
  case "mphantom":
4920
4940
  return;
@@ -4924,15 +4944,15 @@ var cc = /* @__PURE__ */ new Set([
4924
4944
  return;
4925
4945
  }
4926
4946
  default: {
4927
- const i = wc.get(r);
4947
+ const i = Sc.get(r);
4928
4948
  if (i) {
4929
- Rc(e, t, n, i);
4949
+ Ic(e, t, n, i);
4930
4950
  return;
4931
4951
  }
4932
4952
  Mo(e, t, n);
4933
4953
  }
4934
4954
  }
4935
- }, Pc = (e) => {
4955
+ }, Lc = (e) => {
4936
4956
  const t = {
4937
4957
  tokens: [],
4938
4958
  layoutTargets: [],
@@ -4943,7 +4963,7 @@ var cc = /* @__PURE__ */ new Set([
4943
4963
  layoutTargets: t.layoutTargets,
4944
4964
  expressionTarget: ye(e, "region-fallback")
4945
4965
  };
4946
- }, Nc = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Hc = 0.95, Wc = (e) => {
4966
+ }, $c = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Pc = 0.95, Nc = (e) => {
4947
4967
  const t = [], n = /* @__PURE__ */ new Set(), r = (i) => {
4948
4968
  const o = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
4949
4969
  if (o.length === 0) return;
@@ -4968,11 +4988,11 @@ var cc = /* @__PURE__ */ new Set([
4968
4988
  o && (r = i.length);
4969
4989
  }
4970
4990
  return r;
4971
- }, Bc = (e, t) => {
4991
+ }, Hc = (e, t) => {
4972
4992
  const n = [];
4973
4993
  let r = 0;
4974
4994
  for (const i of t) {
4975
- const o = Wc(i);
4995
+ const o = Nc(i);
4976
4996
  if (i.optional) {
4977
4997
  const s = Zr(e, r, o);
4978
4998
  s > 0 && (n.push({
@@ -4994,23 +5014,23 @@ var cc = /* @__PURE__ */ new Set([
4994
5014
  }
4995
5015
  }
4996
5016
  return n;
4997
- }, zc = (e, t, n) => {
5017
+ }, Wc = (e, t, n) => {
4998
5018
  const r = n.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
4999
5019
  return r > 0 && i === r && o === t.length;
5000
- }, Fc = (e) => e.map(({ speechTokens: t, math: n }) => ({
5020
+ }, Bc = (e) => e.map(({ speechTokens: t, math: n }) => ({
5001
5021
  speechTokenIds: t.map((r) => r.id),
5002
5022
  mathTokenIds: [n.id],
5003
5023
  score: 1,
5004
5024
  confidence: 1,
5005
5025
  target: n.target
5006
- })), Dc = (e) => {
5007
- const t = e.minExactWordConfidence ?? Hc, n = Bc(e.speech.tokens, e.math.tokens), r = zc(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
5026
+ })), zc = (e) => {
5027
+ const t = e.minExactWordConfidence ?? Pc, n = Hc(e.speech.tokens, e.math.tokens), r = Wc(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
5008
5028
  return {
5009
- segments: r >= t ? Fc(n) : [],
5029
+ segments: r >= t ? Bc(n) : [],
5010
5030
  confidence: r,
5011
5031
  fallbackTarget: e.math.expressionTarget
5012
5032
  };
5013
- }, Ro = mo(), jc = /* @__PURE__ */ new Map([
5033
+ }, Ro = mo(), Fc = /* @__PURE__ */ new Map([
5014
5034
  ["zero", "0"],
5015
5035
  ["one", "1"],
5016
5036
  ["two", "2"],
@@ -5024,8 +5044,8 @@ var cc = /* @__PURE__ */ new Set([
5024
5044
  ["ten", "10"]
5025
5045
  ]), Lo = (e) => {
5026
5046
  const t = e.toLowerCase();
5027
- return jc.get(t) || t;
5028
- }, qc = (e) => {
5047
+ return Fc.get(t) || t;
5048
+ }, Dc = (e) => {
5029
5049
  const t = [];
5030
5050
  for (const n of e.matchAll(Ro)) {
5031
5051
  const r = n[0], i = n.index ?? 0;
@@ -5046,17 +5066,17 @@ var cc = /* @__PURE__ */ new Set([
5046
5066
  return {
5047
5067
  speechText: e.speechText,
5048
5068
  spokenText: t.spokenText,
5049
- tokens: qc(t.spokenText),
5069
+ tokens: Dc(t.spokenText),
5050
5070
  rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
5051
5071
  boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
5052
5072
  unsupportedSemantic: t.unsupportedSemantic,
5053
5073
  hasMarkup: t.hasMarkup
5054
5074
  };
5055
- }, dr = (e) => {
5075
+ }, fr = (e) => {
5056
5076
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
5057
5077
  const t = e.match(Ro);
5058
5078
  return t?.[0] ? Lo(t[0]) : null;
5059
- }, Vc = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, Gc = (e, t) => {
5079
+ }, jc = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, qc = (e, t) => {
5060
5080
  const n = e.rawToSpokenOffsetMap.get(t);
5061
5081
  if (n !== void 0) return n;
5062
5082
  for (let r = t; r < e.speechText.length; r++) {
@@ -5065,57 +5085,57 @@ var cc = /* @__PURE__ */ new Set([
5065
5085
  if (e.speechText[r] === ">") break;
5066
5086
  }
5067
5087
  return null;
5068
- }, Dn = (e, t, n) => {
5088
+ }, jn = (e, t, n) => {
5069
5089
  if (t === null) return null;
5070
- const r = Vc(e.tokens, t);
5090
+ const r = jc(e.tokens, t);
5071
5091
  return r ? {
5072
5092
  token: r,
5073
5093
  start: t,
5074
5094
  length: Math.max(1, Math.min(n, r.end - t)),
5075
5095
  confidence: 0.75
5076
5096
  } : null;
5077
- }, jn = (e, t) => {
5078
- const n = dr(t);
5097
+ }, qn = (e, t) => {
5098
+ const n = fr(t);
5079
5099
  return !!(e && n && e.token.normalized === n);
5080
- }, Uc = (e) => {
5100
+ }, Vc = (e) => {
5081
5101
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5082
- const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = Dn(e.tokenization, Gc(e.tokenization, e.position), t), r = Dn(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5083
- return jn(n, e.boundaryWord) ? {
5102
+ const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = jn(e.tokenization, qc(e.tokenization, e.position), t), r = jn(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5103
+ return qn(n, e.boundaryWord) ? {
5084
5104
  ...n,
5085
5105
  confidence: 1
5086
- } : jn(r, e.boundaryWord) ? {
5106
+ } : qn(r, e.boundaryWord) ? {
5087
5107
  ...r,
5088
5108
  confidence: 1
5089
- } : e.boundaryWord && dr(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
5090
- }, Kc = (e) => {
5109
+ } : e.boundaryWord && fr(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
5110
+ }, Gc = (e) => {
5091
5111
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5092
- const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = Dn(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5093
- return jn(n, e.boundaryWord) ? {
5112
+ const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = jn(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5113
+ return qn(n, e.boundaryWord) ? {
5094
5114
  ...n,
5095
5115
  confidence: 1
5096
- } : e.boundaryWord && dr(e.boundaryWord) ? null : n;
5097
- }, an = (e) => {
5098
- const t = Mt({ speechText: e.speechText }), n = Pc(e.mathElement);
5116
+ } : e.boundaryWord && fr(e.boundaryWord) ? null : n;
5117
+ }, ln = (e) => {
5118
+ const t = Mt({ speechText: e.speechText }), n = Lc(e.mathElement);
5099
5119
  return {
5100
5120
  speech: t,
5101
5121
  math: n,
5102
- result: Dc({
5122
+ result: zc({
5103
5123
  speech: t,
5104
5124
  math: n
5105
5125
  })
5106
5126
  };
5107
- }, Xc = (e, t) => {
5108
- const n = Kc({
5127
+ }, Uc = (e, t) => {
5128
+ const n = Gc({
5109
5129
  tokenization: e.speech,
5110
5130
  position: t.position,
5111
5131
  length: t.length,
5112
5132
  boundaryWord: t.boundaryWord
5113
5133
  });
5114
- return Nc({
5134
+ return $c({
5115
5135
  alignment: e.result,
5116
5136
  boundary: n
5117
5137
  });
5118
- }, Yc = (e, t) => {
5138
+ }, Kc = (e, t) => {
5119
5139
  if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
5120
5140
  const n = Mt({ speechText: t.boundaryWord }).tokens[0];
5121
5141
  if (!n) return null;
@@ -5124,7 +5144,7 @@ var cc = /* @__PURE__ */ new Set([
5124
5144
  return i.normalized.toLowerCase() === o || i.spokenAliases.some((s) => s.toLowerCase() === o);
5125
5145
  });
5126
5146
  return r.length === 1 ? r[0].target : null;
5127
- }, qn = "http://www.w3.org/1998/Math/MathML", Jc = /* @__PURE__ */ new Set([
5147
+ }, Vn = "http://www.w3.org/1998/Math/MathML", Xc = /* @__PURE__ */ new Set([
5128
5148
  "math",
5129
5149
  "maction",
5130
5150
  "menclose",
@@ -5158,7 +5178,7 @@ var cc = /* @__PURE__ */ new Set([
5158
5178
  "semantics",
5159
5179
  "annotation",
5160
5180
  "annotation-xml"
5161
- ]), Qc = /* @__PURE__ */ new Set([
5181
+ ]), Yc = /* @__PURE__ */ new Set([
5162
5182
  "accent",
5163
5183
  "accentunder",
5164
5184
  "align",
@@ -5210,29 +5230,29 @@ var cc = /* @__PURE__ */ new Set([
5210
5230
  "width",
5211
5231
  "xmlns",
5212
5232
  "xml:lang"
5213
- ]), $o = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Zc = (e) => $o(e).replace(/"/g, "&quot;"), eu = (e, t) => {
5233
+ ]), $o = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Jc = (e) => $o(e).replace(/"/g, "&quot;"), Qc = (e, t) => {
5214
5234
  const n = e.toLowerCase(), r = t.trim().toLowerCase();
5215
- return !!(n.startsWith("on") || !Qc.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
5216
- }, tu = (e) => {
5235
+ return !!(n.startsWith("on") || !Yc.has(n) || r.includes("javascript:") || r.includes("data:text/html"));
5236
+ }, Zc = (e) => {
5217
5237
  const t = e.localName.toLowerCase();
5218
- if (!Jc.has(t)) return !1;
5238
+ if (!Xc.has(t)) return !1;
5219
5239
  const n = e.namespaceURI;
5220
- return !n || n === qn || n === "http://www.w3.org/1999/xhtml";
5240
+ return !n || n === Vn || n === "http://www.w3.org/1999/xhtml";
5221
5241
  }, Po = (e) => {
5222
5242
  if (e.nodeType === Node.TEXT_NODE) return $o(e.textContent || "");
5223
5243
  if (e.nodeType === Node.COMMENT_NODE) return "";
5224
5244
  if (e.nodeType !== Node.ELEMENT_NODE) return null;
5225
5245
  const t = e;
5226
- if (!tu(t)) return null;
5246
+ if (!Zc(t)) return null;
5227
5247
  const n = t.localName.toLowerCase(), r = [];
5228
5248
  for (const o of Array.from(t.attributes)) {
5229
5249
  const s = o.name.toLowerCase();
5230
- if (!eu(s, o.value)) {
5231
- if (s === "xmlns" && o.value !== qn) return null;
5232
- r.push(`${s}="${Zc(o.value)}"`);
5250
+ if (!Qc(s, o.value)) {
5251
+ if (s === "xmlns" && o.value !== Vn) return null;
5252
+ r.push(`${s}="${Jc(o.value)}"`);
5233
5253
  }
5234
5254
  }
5235
- n === "math" && !r.some((o) => o.startsWith("xmlns=")) && r.unshift(`xmlns="${qn}"`);
5255
+ n === "math" && !r.some((o) => o.startsWith("xmlns=")) && r.unshift(`xmlns="${Vn}"`);
5236
5256
  const i = [];
5237
5257
  for (const o of Array.from(t.childNodes)) {
5238
5258
  const s = Po(o);
@@ -5240,10 +5260,10 @@ var cc = /* @__PURE__ */ new Set([
5240
5260
  i.push(s);
5241
5261
  }
5242
5262
  return `<${n}${r.length > 0 ? ` ${r.join(" ")}` : ""}>${i.join("")}</${n}>`;
5243
- }, nu = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, kn = (e) => {
5263
+ }, eu = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, En = (e) => {
5244
5264
  const t = String(e || "").trim();
5245
5265
  if (!t) return null;
5246
- const n = nu(t);
5266
+ const n = eu(t);
5247
5267
  if (!n || n.getElementsByTagName("parsererror").length > 0) return null;
5248
5268
  const r = n.documentElement;
5249
5269
  return !r || r.localName.toLowerCase() !== "math" ? null : Po(r);
@@ -5258,25 +5278,25 @@ var cc = /* @__PURE__ */ new Set([
5258
5278
  }), Ho = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Wo = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Bo = (e) => {
5259
5279
  const t = e.tagName?.toLowerCase();
5260
5280
  return t === "annotation" || t === "annotation-xml";
5261
- }, ru = (e) => {
5281
+ }, tu = (e) => {
5262
5282
  const t = e.getAttribute("data-mathml");
5263
5283
  return t && t.trim() ? t : null;
5264
- }, iu = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, ou = (e) => {
5265
- if (e.tagName.toLowerCase() === "math") return kn(e.outerHTML);
5266
- const t = ru(e);
5284
+ }, nu = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, ru = (e) => {
5285
+ if (e.tagName.toLowerCase() === "math") return En(e.outerHTML);
5286
+ const t = tu(e);
5267
5287
  if (t) {
5268
- const n = kn(t);
5288
+ const n = En(t);
5269
5289
  if (n) return n;
5270
5290
  }
5271
5291
  if (Ho(e)) {
5272
- const n = iu(e);
5292
+ const n = nu(e);
5273
5293
  if (n) {
5274
- const r = kn(n);
5294
+ const r = En(n);
5275
5295
  if (r) return r;
5276
5296
  }
5277
5297
  }
5278
5298
  return null;
5279
- }, su = /* @__PURE__ */ new Set([
5299
+ }, iu = /* @__PURE__ */ new Set([
5280
5300
  "P",
5281
5301
  "H1",
5282
5302
  "H2",
@@ -5292,7 +5312,7 @@ var cc = /* @__PURE__ */ new Set([
5292
5312
  "FIGCAPTION",
5293
5313
  "LABEL",
5294
5314
  "BUTTON"
5295
- ]), au = /* @__PURE__ */ new Set([
5315
+ ]), ou = /* @__PURE__ */ new Set([
5296
5316
  "heading",
5297
5317
  "listitem",
5298
5318
  "option",
@@ -5301,18 +5321,18 @@ var cc = /* @__PURE__ */ new Set([
5301
5321
  "cell",
5302
5322
  "columnheader",
5303
5323
  "rowheader"
5304
- ]), lu = (e, t) => {
5324
+ ]), su = (e, t) => {
5305
5325
  let n = e.parentElement, r = null;
5306
5326
  for (; n && n !== t; ) {
5307
5327
  const i = (n.getAttribute("role") || "").toLowerCase(), o = n.tagName.toUpperCase();
5308
- if (su.has(o) || au.has(i)) {
5328
+ if (iu.has(o) || ou.has(i)) {
5309
5329
  r = n;
5310
5330
  break;
5311
5331
  }
5312
5332
  n = n.parentElement;
5313
5333
  }
5314
5334
  return r || t;
5315
- }, cu = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Ho(e), He = (e, t, n) => {
5335
+ }, au = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Ho(e), He = (e, t, n) => {
5316
5336
  /[.,;:!?]/.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++;
5317
5337
  }, zo = (e, t) => {
5318
5338
  if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
@@ -5345,7 +5365,7 @@ var cc = /* @__PURE__ */ new Set([
5345
5365
  offset: i
5346
5366
  }), r = !0, e.lastCharWasWhitespace = !1;
5347
5367
  }
5348
- }, uu = (e, t) => {
5368
+ }, lu = (e, t) => {
5349
5369
  for (let n = 0; n < t.text.length; n++) {
5350
5370
  const r = t.text[n], i = /\s/.test(r), o = t.map.get(n) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
5351
5371
  node: o.node,
@@ -5373,7 +5393,7 @@ var cc = /* @__PURE__ */ new Set([
5373
5393
  offset: a
5374
5394
  });
5375
5395
  }
5376
- }, hu = (e) => {
5396
+ }, cu = (e) => {
5377
5397
  if (typeof DOMParser > "u") return "";
5378
5398
  const t = new DOMParser().parseFromString(e, "application/xml");
5379
5399
  if (t.getElementsByTagName("parsererror").length > 0) return "";
@@ -5389,7 +5409,7 @@ var cc = /* @__PURE__ */ new Set([
5389
5409
  for (const s of Array.from(o.childNodes)) r(s);
5390
5410
  };
5391
5411
  return r(t.documentElement), R(n.join(" "));
5392
- }, du = (e, t, n) => {
5412
+ }, uu = (e, t, n) => {
5393
5413
  const r = No(n), i = (a) => {
5394
5414
  if (ft(a, e)) return;
5395
5415
  if (a.nodeType === 3) {
@@ -5407,15 +5427,15 @@ var cc = /* @__PURE__ */ new Set([
5407
5427
  text: o,
5408
5428
  map: r.map
5409
5429
  };
5410
- const s = hu(t);
5430
+ const s = cu(t);
5411
5431
  return s ? {
5412
5432
  text: s,
5413
5433
  map: /* @__PURE__ */ new Map()
5414
- } : on(e, n);
5434
+ } : sn(e, n);
5415
5435
  }, Do = (e) => {
5416
5436
  for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
5417
5437
  e.chars.pop(), e.position--, e.map.delete(e.position);
5418
- }, fu = (e, t) => {
5438
+ }, hu = (e, t) => {
5419
5439
  const n = No(t), r = [];
5420
5440
  let i = 0, o, s = !1;
5421
5441
  const a = () => {
@@ -5428,18 +5448,18 @@ var cc = /* @__PURE__ */ new Set([
5428
5448
  }, l = (u) => {
5429
5449
  if (ft(u, e)) return;
5430
5450
  if (u.nodeType === Node.TEXT_NODE) {
5431
- const g = lu(u, e);
5451
+ const g = su(u, e);
5432
5452
  o && g !== o && a(), o = g, Fo(n, u);
5433
5453
  return;
5434
5454
  }
5435
5455
  if (u.nodeType !== Node.ELEMENT_NODE) return;
5436
5456
  const h = u;
5437
5457
  if (Wo(h)) return;
5438
- const p = ou(h);
5458
+ const p = ru(h);
5439
5459
  if (p) {
5440
5460
  a();
5441
- const g = du(h, p, t);
5442
- uu(n, g);
5461
+ const g = uu(h, p, t);
5462
+ lu(n, g);
5443
5463
  const m = R(g.text);
5444
5464
  r.push({
5445
5465
  type: "math",
@@ -5462,8 +5482,8 @@ var cc = /* @__PURE__ */ new Set([
5462
5482
  containsMathMarkup: s
5463
5483
  };
5464
5484
  }, bt = (e, t) => {
5465
- if (!cu(e)) {
5466
- const { text: n, map: r } = on(e, t);
5485
+ if (!au(e)) {
5486
+ const { text: n, map: r } = sn(e, t);
5467
5487
  return {
5468
5488
  visibleText: n,
5469
5489
  map: r,
@@ -5474,8 +5494,8 @@ var cc = /* @__PURE__ */ new Set([
5474
5494
  containsMathMarkup: !1
5475
5495
  };
5476
5496
  }
5477
- return fu(e, t);
5478
- }, pu = (e, t) => To([e], t), gu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", mu = /* @__PURE__ */ new Set([
5497
+ return hu(e, t);
5498
+ }, du = (e, t) => To([e], t), fu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", pu = /* @__PURE__ */ new Set([
5479
5499
  "H1",
5480
5500
  "H2",
5481
5501
  "H3",
@@ -5485,17 +5505,17 @@ var cc = /* @__PURE__ */ new Set([
5485
5505
  "LI",
5486
5506
  "LABEL",
5487
5507
  "BUTTON"
5488
- ]), vu = /* @__PURE__ */ new Set([
5508
+ ]), gu = /* @__PURE__ */ new Set([
5489
5509
  "heading",
5490
5510
  "listitem",
5491
5511
  "option",
5492
5512
  "radio"
5493
- ]), yu = (e) => {
5513
+ ]), mu = (e) => {
5494
5514
  if (e.type !== "text" || !e.sourceElement) return !1;
5495
5515
  const t = e.sourceElement.tagName.toUpperCase(), n = (e.sourceElement.getAttribute("role") || "").toLowerCase();
5496
- return mu.has(t) || vu.has(n);
5497
- }, bu = async (e) => {
5498
- const t = e.resolveMathSpeech ?? pu, { visibleText: n } = e, r = [];
5516
+ return pu.has(t) || gu.has(n);
5517
+ }, vu = async (e) => {
5518
+ const t = e.resolveMathSpeech ?? du, { visibleText: n } = e, r = [];
5499
5519
  let i = 0;
5500
5520
  const o = (a) => {
5501
5521
  const l = R(a), c = n.indexOf(l, i), u = c >= 0 ? c : i, h = u + l.length;
@@ -5507,10 +5527,10 @@ var cc = /* @__PURE__ */ new Set([
5507
5527
  for (let a = 0; a < e.chunks.length; a++) {
5508
5528
  const l = e.chunks[a];
5509
5529
  if (l.type === "text") {
5510
- const g = yu(l) ? [{
5530
+ const g = mu(l) ? [{
5511
5531
  text: l.text,
5512
5532
  offset: 0
5513
- }] : lr(l.text, { locale: e.language });
5533
+ }] : cr(l.text, { locale: e.language });
5514
5534
  for (const m of g) {
5515
5535
  const v = R(m.text);
5516
5536
  if (!v) continue;
@@ -5547,19 +5567,19 @@ var cc = /* @__PURE__ */ new Set([
5547
5567
  }
5548
5568
  return {
5549
5569
  segments: r,
5550
- locale: gu(e.language),
5570
+ locale: fu(e.language),
5551
5571
  visibleText: n,
5552
5572
  plainSpeechText: R(s.join(" "))
5553
5573
  };
5554
- }, Tu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Su = "sre-v1", _u = 256, Vn = (e) => Array.isArray(e) ? `array:[${e.map(Vn).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Vn(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)}`, ei = (e, t, n, r) => `${Su}\0${Tu(e)}\0${t ? "ssml" : "plain"}\0${Vn(n ?? null)}\0${r}`, wu = (e = {}) => {
5555
- const t = Math.max(1, e.maxEntries ?? _u), n = e.resolve ?? ((o, s) => To([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
5574
+ }, yu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", bu = "sre-v1", Tu = 256, Gn = (e) => Array.isArray(e) ? `array:[${e.map(Gn).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Gn(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)}`, ei = (e, t, n, r) => `${bu}\0${yu(e)}\0${t ? "ssml" : "plain"}\0${Gn(n ?? null)}\0${r}`, Su = (e = {}) => {
5575
+ const t = Math.max(1, e.maxEntries ?? Tu), n = e.resolve ?? ((o, s) => To([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
5556
5576
  for (r.delete(o), r.set(o, s); r.size > t; ) {
5557
5577
  const a = r.keys().next().value;
5558
5578
  a !== void 0 && r.delete(a);
5559
5579
  }
5560
5580
  };
5561
5581
  return async (o, s) => {
5562
- const a = gn(s.mathSpeech), l = s.produceSsml === !0, c = ei(s.language, l, a, o.mathml), u = r.get(c);
5582
+ const a = mn(s.mathSpeech), l = s.produceSsml === !0, c = ei(s.language, l, a, o.mathml), u = r.get(c);
5563
5583
  if (u)
5564
5584
  return r.delete(c), r.set(c, u), u;
5565
5585
  const h = await n(o, {
@@ -5572,13 +5592,13 @@ var cc = /* @__PURE__ */ new Set([
5572
5592
  usedFallback: h.usedFallback
5573
5593
  }), i(c, h), h;
5574
5594
  };
5575
- }, ku = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Mt({ speechText: e }).tokens[0]?.normalized || null, Eu = (e, t) => {
5595
+ }, _u = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Mt({ speechText: e }).tokens[0]?.normalized || null, wu = (e, t) => {
5576
5596
  const n = Mt({ speechText: e.speechText });
5577
5597
  if (!Number.isFinite(t.position)) return {
5578
5598
  boundary: null,
5579
5599
  spokenText: n.spokenText
5580
5600
  };
5581
- const r = Uc({
5601
+ const r = Vc({
5582
5602
  tokenization: n,
5583
5603
  position: t.position,
5584
5604
  length: t.length,
@@ -5591,8 +5611,8 @@ var cc = /* @__PURE__ */ new Set([
5591
5611
  } : null,
5592
5612
  spokenText: n.spokenText
5593
5613
  };
5594
- }, Au = (e, t, n) => n ? Mt({ speechText: e }).tokens.find((r) => r.start <= t && t < r.end)?.normalized === n : !0, Cu = (e, t) => {
5595
- const n = ku(t.word);
5614
+ }, ku = (e, t, n) => n ? Mt({ speechText: e }).tokens.find((r) => r.start <= t && t < r.end)?.normalized === n : !0, Eu = (e, t) => {
5615
+ const n = _u(t.word);
5596
5616
  if (e.id !== t.chunkId) return {
5597
5617
  chunkId: t.chunkId,
5598
5618
  normalizedWord: n,
@@ -5611,12 +5631,12 @@ var cc = /* @__PURE__ */ new Set([
5611
5631
  };
5612
5632
  let r, i;
5613
5633
  if (e.catalogAlignment)
5614
- r = bc(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
5634
+ r = vc(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
5615
5635
  else {
5616
- const o = Eu(e, t);
5636
+ const o = wu(e, t);
5617
5637
  r = o.boundary, i = o.spokenText;
5618
5638
  }
5619
- return r ? Au(i, r.start, n) ? {
5639
+ return r ? ku(i, r.start, n) ? {
5620
5640
  chunkId: e.id,
5621
5641
  normalizedWord: n,
5622
5642
  chunkSpokenStart: r.start,
@@ -5661,7 +5681,7 @@ var cc = /* @__PURE__ */ new Set([
5661
5681
  ["mn", "mjx-mn"],
5662
5682
  ["mo", "mjx-mo"],
5663
5683
  ["mtext", "mjx-mtext"]
5664
- ]), Gn = "mi,mn,mo,mtext", qo = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", Vo = [
5684
+ ]), Un = "mi,mn,mo,mtext", qo = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", Vo = [
5665
5685
  "mjx-mfrac",
5666
5686
  "mjx-msqrt",
5667
5687
  "mjx-mroot",
@@ -5669,17 +5689,17 @@ var cc = /* @__PURE__ */ new Set([
5669
5689
  "mjx-munder",
5670
5690
  "mjx-mover",
5671
5691
  "mjx-munderover"
5672
- ].join(","), Go = (e) => e.type === "text-range" ? e.node.parentElement : e.element, mn = (e) => {
5692
+ ].join(","), Go = (e) => e.type === "text-range" ? e.node.parentElement : e.element, vn = (e) => {
5673
5693
  let t = e;
5674
5694
  for (; t; ) {
5675
5695
  if (t.localName?.toLowerCase() === "mjx-container") return t;
5676
5696
  t = t.parentElement;
5677
5697
  }
5678
5698
  return null;
5679
- }, ti = (e) => !e || mn(e) ? !1 : !ft(e), Uo = (e) => {
5699
+ }, ti = (e) => !e || vn(e) ? !1 : !ft(e), Uo = (e) => {
5680
5700
  const t = e.getBoundingClientRect?.();
5681
5701
  return !!(t && t.width > 0 && t.height > 0);
5682
- }, Un = (e) => {
5702
+ }, Kn = (e) => {
5683
5703
  let t = e;
5684
5704
  for (; t; ) {
5685
5705
  if (t.localName?.toLowerCase() === "math") return t;
@@ -5693,31 +5713,31 @@ var cc = /* @__PURE__ */ new Set([
5693
5713
  if (!r || t[n].localName.toLowerCase() !== r) return !1;
5694
5714
  }
5695
5715
  return !0;
5696
- }, xu = (e, t) => {
5716
+ }, Au = (e, t) => {
5697
5717
  if (!e || !jo.has(e.localName.toLowerCase()) || t.querySelector(Vo)) return null;
5698
- const n = Un(e), r = t.querySelector("mjx-math");
5718
+ const n = Kn(e), r = t.querySelector("mjx-math");
5699
5719
  if (!n || !r) return null;
5700
- const i = Array.from(n.querySelectorAll(Gn)), o = i.indexOf(e);
5720
+ const i = Array.from(n.querySelectorAll(Un)), o = i.indexOf(e);
5701
5721
  if (o < 0) return null;
5702
5722
  const s = Array.from(r.querySelectorAll(qo));
5703
5723
  if (!Ko(i, s)) return null;
5704
5724
  const a = s[o];
5705
5725
  return !a || !Uo(a) ? null : a;
5706
- }, Iu = (e) => {
5707
- const t = mn(e);
5726
+ }, Cu = (e) => {
5727
+ const t = vn(e);
5708
5728
  if (t) {
5709
5729
  if (t.querySelector(Vo)) return "expression";
5710
- const r = Un(e) ?? e, i = t.querySelector("mjx-math");
5730
+ const r = Kn(e) ?? e, i = t.querySelector("mjx-math");
5711
5731
  if (!i) return "expression";
5712
- const o = Array.from(r.querySelectorAll(Gn)), s = Array.from(i.querySelectorAll(qo));
5732
+ const o = Array.from(r.querySelectorAll(Un)), s = Array.from(i.querySelectorAll(qo));
5713
5733
  return Ko(o, s) && s.some((a) => Uo(a)) ? "token" : "expression";
5714
5734
  }
5715
- const n = Un(e) ?? e;
5716
- return Array.from(n.querySelectorAll(Gn)).some((r) => !ft(r)) ? "token" : "expression";
5717
- }, Kn = (e) => {
5718
- const t = Go(e), n = mn(t);
5735
+ const n = Kn(e) ?? e;
5736
+ return Array.from(n.querySelectorAll(Un)).some((r) => !ft(r)) ? "token" : "expression";
5737
+ }, Xn = (e) => {
5738
+ const t = Go(e), n = vn(t);
5719
5739
  if (n) {
5720
- const r = xu(t, n);
5740
+ const r = Au(t, n);
5721
5741
  return r ? {
5722
5742
  type: "element",
5723
5743
  quality: "semantic-token",
@@ -5739,24 +5759,24 @@ var cc = /* @__PURE__ */ new Set([
5739
5759
  quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
5740
5760
  element: e.element
5741
5761
  } : null;
5742
- }, Ou = Kn, Mu = () => {
5762
+ }, xu = Xn, Ou = () => {
5743
5763
  const e = /* @__PURE__ */ new WeakMap();
5744
5764
  return (t) => {
5745
- const n = Go(t), r = mn(n);
5746
- if (!n || !r) return Kn(t);
5765
+ const n = Go(t), r = vn(n);
5766
+ if (!n || !r) return Xn(t);
5747
5767
  if (e.has(n)) return e.get(n) ?? null;
5748
- const i = Kn(t);
5768
+ const i = Xn(t);
5749
5769
  return e.set(n, i), i;
5750
5770
  };
5751
- }, Ru = (e, t, n, r = e.mathAlignments, i = Ou) => {
5771
+ }, Iu = (e, t, n, r = e.mathAlignments, i = xu) => {
5752
5772
  if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
5753
5773
  let o = null;
5754
5774
  for (const s of r) {
5755
- const a = Xc(s.alignment, {
5775
+ const a = Uc(s.alignment, {
5756
5776
  position: t.chunkSpokenStart,
5757
5777
  length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
5758
5778
  boundaryWord: n.word
5759
- }) || Yc(s.alignment, { boundaryWord: n.word });
5779
+ }) || Kc(s.alignment, { boundaryWord: n.word });
5760
5780
  if (!a) continue;
5761
5781
  const l = i(a);
5762
5782
  if (l) {
@@ -5777,9 +5797,9 @@ var cc = /* @__PURE__ */ new Set([
5777
5797
  } catch {
5778
5798
  return null;
5779
5799
  }
5780
- }, Lu = (e, t) => {
5800
+ }, Mu = (e, t) => {
5781
5801
  if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
5782
- const n = Tc(e.catalogAlignment, t.chunkSpokenStart);
5802
+ const n = yc(e.catalogAlignment, t.chunkSpokenStart);
5783
5803
  if (!n) return null;
5784
5804
  const r = Xo(e.visibleMap, n.start, n.end);
5785
5805
  return r ? {
@@ -5787,7 +5807,7 @@ var cc = /* @__PURE__ */ new Set([
5787
5807
  quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
5788
5808
  range: r
5789
5809
  } : null;
5790
- }, $u = (e) => e.regionRange ? {
5810
+ }, Ru = (e) => e.regionRange ? {
5791
5811
  type: "range",
5792
5812
  quality: "region",
5793
5813
  range: e.regionRange
@@ -5799,7 +5819,7 @@ var cc = /* @__PURE__ */ new Set([
5799
5819
  if (t.length !== 1) return null;
5800
5820
  const n = t[0]?.alignment.result.fallbackTarget;
5801
5821
  return n ? e.renderedMathTargetResolver(n) : null;
5802
- }, Pu = (e, t) => e ? t.mathAlignments.filter(({ element: n }) => {
5822
+ }, Lu = (e, t) => e ? t.mathAlignments.filter(({ element: n }) => {
5803
5823
  try {
5804
5824
  return e.type === "range" ? e.range.intersectsNode(n) : e.type === "element" ? e.element === n || e.element.contains(n) : e.node.parentElement?.contains(n) || !1;
5805
5825
  } catch {
@@ -5811,18 +5831,18 @@ var cc = /* @__PURE__ */ new Set([
5811
5831
  quality: "region",
5812
5832
  confidence: 0,
5813
5833
  reason: "boundary chunk id was not found"
5814
- }), ii = (e) => e.length === 1 ? e[0].element : null, Nu = (e, t) => t.length > 0 && t.every(({ element: n }) => e.mathCapabilityByElement.get(n) === "token"), Hu = 3, Wu = (e, t, n) => {
5834
+ }), ii = (e) => e.length === 1 ? e[0].element : null, $u = (e, t) => t.length > 0 && t.every(({ element: n }) => e.mathCapabilityByElement.get(n) === "token"), Pu = 3, Nu = (e, t, n) => {
5815
5835
  if (!t || t.type !== "range") return !1;
5816
5836
  const { startContainer: r, endContainer: i } = t.range;
5817
- return r === i && r.nodeType === Hu ? !1 : n.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(r) && o.contains(i));
5818
- }, Bu = (e, t) => ({
5837
+ return r === i && r.nodeType === Pu ? !1 : n.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(r) && o.contains(i));
5838
+ }, Hu = (e, t) => ({
5819
5839
  chunk: e,
5820
- regionTarget: $u(e),
5821
- renderedMathTargetResolver: Mu(),
5822
- mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? Iu(n) : "expression"])),
5840
+ regionTarget: Ru(e),
5841
+ renderedMathTargetResolver: Ou(),
5842
+ mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? Cu(n) : "expression"])),
5823
5843
  heldTokenByElement: /* @__PURE__ */ new Map()
5824
- }), zu = (e) => {
5825
- const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, Bu(r, t)]));
5844
+ }), Wu = (e) => {
5845
+ const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, Hu(r, t)]));
5826
5846
  return {
5827
5847
  chunks: e.chunks,
5828
5848
  resolveInitial(r) {
@@ -5846,7 +5866,7 @@ var cc = /* @__PURE__ */ new Set([
5846
5866
  resolveBoundary(r) {
5847
5867
  const i = n.get(r.chunkId);
5848
5868
  if (!i) return ri();
5849
- const { chunk: o } = i, s = Cu(o, r), a = Lu(o, s), l = Pu(a, o), c = (!a || l.length > 0 ? Ru(o, s, r, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
5869
+ const { chunk: o } = i, s = Eu(o, r), a = Mu(o, s), l = Lu(a, o), c = (!a || l.length > 0 ? Iu(o, s, r, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
5850
5870
  if (u) {
5851
5871
  const p = ii(l);
5852
5872
  return p && i.heldTokenByElement.set(p, u), Ze({
@@ -5857,14 +5877,14 @@ var cc = /* @__PURE__ */ new Set([
5857
5877
  reason: s.reason
5858
5878
  });
5859
5879
  }
5860
- if (a && (t ? !Wu(i, a, l) : l.length === 0)) return Ze({
5880
+ if (a && (t ? !Nu(i, a, l) : l.length === 0)) return Ze({
5861
5881
  semanticTarget: a,
5862
5882
  expressionTarget: null,
5863
5883
  regionTarget: i.regionTarget,
5864
5884
  confidence: s.confidence,
5865
5885
  reason: s.reason
5866
5886
  });
5867
- if (Nu(i, l)) {
5887
+ if ($u(i, l)) {
5868
5888
  const p = ii(l), g = p ? i.heldTokenByElement.get(p) ?? null : null;
5869
5889
  return Ze({
5870
5890
  semanticTarget: g,
@@ -5883,14 +5903,14 @@ var cc = /* @__PURE__ */ new Set([
5883
5903
  });
5884
5904
  }
5885
5905
  };
5886
- }, Fu = (e) => {
5906
+ }, Bu = (e) => {
5887
5907
  if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
5888
5908
  const t = e.mathAlignment?.speech.boundaryOffsetSpace;
5889
5909
  return t || "plain-spoken-text";
5890
- }, Du = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
5910
+ }, zu = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
5891
5911
  element: e.sourceElement,
5892
5912
  alignment: e.mathAlignment
5893
- }] : [], ju = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
5913
+ }] : [], Fu = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
5894
5914
  speechText: e.speechText || "",
5895
5915
  visibleText: e.visibleText || e.speechText || "",
5896
5916
  sourceElement: e.sourceElement || e.contentRoot,
@@ -5907,9 +5927,9 @@ var cc = /* @__PURE__ */ new Set([
5907
5927
  regionRange: t.regionRange,
5908
5928
  visibleMap: t.visibleMap,
5909
5929
  catalogAlignment: t.alignment,
5910
- mathAlignments: Du(t),
5911
- offsetSpace: Fu(t)
5912
- })), qu = [
5930
+ mathAlignments: zu(t),
5931
+ offsetSpace: Bu(t)
5932
+ })), Du = [
5913
5933
  "[data-pie-tts-region]",
5914
5934
  "[data-catalog-region]",
5915
5935
  "li",
@@ -5920,17 +5940,17 @@ var cc = /* @__PURE__ */ new Set([
5920
5940
  "[role='region']",
5921
5941
  "div"
5922
5942
  ].join(","), Yo = (e, t) => {
5923
- const n = e.closest(qu);
5943
+ const n = e.closest(Du);
5924
5944
  return n && t.contains(n) ? n : e;
5925
- }, Vu = (e, t, n) => {
5945
+ }, ju = (e, t, n) => {
5926
5946
  const r = /* @__PURE__ */ new Map();
5927
5947
  for (let i = t; i < n; i++) {
5928
5948
  const o = e.get(i);
5929
5949
  o && r.set(i - t, o);
5930
5950
  }
5931
5951
  return r;
5932
- }, Gu = async (e) => {
5933
- const t = bt(e.contentRoot, e.textProcessingOptions), n = await bu({
5952
+ }, qu = async (e) => {
5953
+ const t = bt(e.contentRoot, e.textProcessingOptions), n = await vu({
5934
5954
  chunks: t.chunks,
5935
5955
  visibleText: t.visibleText,
5936
5956
  language: e.language,
@@ -5949,7 +5969,7 @@ var cc = /* @__PURE__ */ new Set([
5949
5969
  anchor: {
5950
5970
  sourceElement: a,
5951
5971
  regionElement: Yo(a, e.contentRoot),
5952
- visibleMap: Vu(t.map, r.visibleSpan.start, r.visibleSpan.end)
5972
+ visibleMap: ju(t.map, r.visibleSpan.start, r.visibleSpan.end)
5953
5973
  }
5954
5974
  };
5955
5975
  }
@@ -5969,7 +5989,7 @@ var cc = /* @__PURE__ */ new Set([
5969
5989
  containsMathMarkup: t.containsMathMarkup,
5970
5990
  visibleText: t.visibleText
5971
5991
  };
5972
- }, Uu = (e, t) => {
5992
+ }, Vu = (e, t) => {
5973
5993
  const n = xo({
5974
5994
  speechText: e.spokenText,
5975
5995
  visibleText: e.spokenText
@@ -5993,12 +6013,12 @@ var cc = /* @__PURE__ */ new Set([
5993
6013
  sourceElement: n,
5994
6014
  regionElement: t.regionElement,
5995
6015
  speechMatchesVisibleText: e.spokenText === e.fallbackText,
5996
- mathAlignment: n ? an({
6016
+ mathAlignment: n ? ln({
5997
6017
  mathElement: n,
5998
6018
  speechText: e.spokenText
5999
6019
  }) : void 0
6000
6020
  };
6001
- }, Ku = (e, t, n) => {
6021
+ }, Gu = (e, t, n) => {
6002
6022
  const r = t.sourceElement;
6003
6023
  return {
6004
6024
  speechText: n,
@@ -6006,22 +6026,22 @@ var cc = /* @__PURE__ */ new Set([
6006
6026
  sourceElement: r,
6007
6027
  regionElement: t.regionElement,
6008
6028
  speechMatchesVisibleText: !1,
6009
- mathAlignment: r ? an({
6029
+ mathAlignment: r ? ln({
6010
6030
  mathElement: r,
6011
6031
  speechText: n
6012
6032
  }) : void 0,
6013
6033
  plainFallback: Jo(e, t)
6014
6034
  };
6015
- }, Xu = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? Uu(n, r) : t.format === "ssml" && n.ssml ? Ku(n, r, n.ssml) : Jo(n, r)), Yu = "pie-tts-control-handoff", I;
6035
+ }, Uu = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? Vu(n, r) : t.format === "ssml" && n.ssml ? Gu(n, r, n.ssml) : Jo(n, r)), Ku = "pie-tts-control-handoff", O;
6016
6036
  (function(e) {
6017
6037
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
6018
- })(I || (I = {}));
6019
- var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Ju = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Qo(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, Qu = class Xn {
6038
+ })(O || (O = {}));
6039
+ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Xu = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Qo(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, Yu = class Yn {
6020
6040
  constructor() {
6021
- f(this, "currentProvider", null), f(this, "provider", null), f(this, "highlightCoordinator", null), f(this, "highlightTargetResolverProvider", null), f(this, "catalogResolver", null), f(this, "state", I.IDLE), f(this, "ttsConfig", {}), f(this, "currentText", null), f(this, "currentContentElement", null), f(this, "normalizedToDOM", /* @__PURE__ */ new Map()), f(this, "listeners", /* @__PURE__ */ new Map()), f(this, "lastError", null), f(this, "speakRunId", 0), f(this, "currentBoundaryOffset", 0), f(this, "activeWordBoundaryOffset", 0), f(this, "seekSegments", []), f(this, "playbackChunks", []), f(this, "sentenceHighlightSegments", []), f(this, "currentSeekSegmentIndex", 0), f(this, "activeSentenceStartOffset", null), f(this, "activeHighlightMode", "word"), f(this, "lastRenderedRegionTarget", null), f(this, "telemetryReporter", null), f(this, "generatedMathSpeechResolver", wu());
6041
+ f(this, "currentProvider", null), f(this, "provider", null), f(this, "highlightCoordinator", null), f(this, "highlightTargetResolverProvider", null), f(this, "catalogResolver", null), f(this, "state", O.IDLE), f(this, "ttsConfig", {}), f(this, "currentText", null), f(this, "currentContentElement", null), f(this, "normalizedToDOM", /* @__PURE__ */ new Map()), f(this, "listeners", /* @__PURE__ */ new Map()), f(this, "lastError", null), f(this, "speakRunId", 0), f(this, "currentBoundaryOffset", 0), f(this, "activeWordBoundaryOffset", 0), f(this, "seekSegments", []), f(this, "playbackChunks", []), f(this, "sentenceHighlightSegments", []), f(this, "currentSeekSegmentIndex", 0), f(this, "activeSentenceStartOffset", null), f(this, "activeHighlightMode", "word"), f(this, "lastRenderedRegionTarget", null), f(this, "telemetryReporter", null), f(this, "generatedMathSpeechResolver", Su());
6022
6042
  }
6023
6043
  debugLog(t, n) {
6024
- Xn.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
6044
+ Yn.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
6025
6045
  }
6026
6046
  async emitTelemetry(t, n) {
6027
6047
  try {
@@ -6198,12 +6218,12 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6198
6218
  }
6199
6219
  getMathSpeechOptions() {
6200
6220
  const t = (this.ttsConfig.providerOptions || {}).mathSpeech;
6201
- return gn(t);
6221
+ return mn(t);
6202
6222
  }
6203
6223
  buildPositionMap(t, n, r) {
6204
6224
  this.normalizedToDOM.clear();
6205
- const { text: i, map: o } = on(t, this.getTextProcessingOptions(r));
6206
- this.normalizedToDOM = o, Xn.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
6225
+ const { text: i, map: o } = sn(t, this.getTextProcessingOptions(r));
6226
+ this.normalizedToDOM = o, Yn.debugEnabled && (this.debugLog("[TTSService] Text comparison:", {
6207
6227
  spokenLength: n.length,
6208
6228
  normalizedDomLength: i.length,
6209
6229
  match: n === i,
@@ -6312,7 +6332,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6312
6332
  return this.createSpeechPlanSegments(n, r);
6313
6333
  }
6314
6334
  collectSpeechPlanBoundaries(t, n) {
6315
- const r = /* @__PURE__ */ new Map(), { map: i } = on(t, this.getTextProcessingOptions()), o = this.createNodeStartOffsets(i), s = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
6335
+ const r = /* @__PURE__ */ new Map(), { map: i } = sn(t, this.getTextProcessingOptions()), o = this.createNodeStartOffsets(i), s = document.createTreeWalker(t, NodeFilter.SHOW_TEXT);
6316
6336
  let a = s.nextNode(), l = null;
6317
6337
  for (; a; ) {
6318
6338
  const c = a, u = c.parentElement;
@@ -6352,7 +6372,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6352
6372
  }), i.filter((l) => l.text.trim().length > 0);
6353
6373
  }
6354
6374
  segmentSentences(t) {
6355
- return lr(t, { locale: this.ttsConfig.providerOptions?.locale || void 0 });
6375
+ return cr(t, { locale: this.ttsConfig.providerOptions?.locale || void 0 });
6356
6376
  }
6357
6377
  createSeekSegmentsFromText(t) {
6358
6378
  return this.segmentSentences(t).map((n) => {
@@ -6507,7 +6527,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6507
6527
  contentToSpeak: a,
6508
6528
  shouldUsePlan: v,
6509
6529
  playbackSegments: this.seekSegments
6510
- }), this.setState(I.LOADING), this.prepareHighlightsForSpeak({
6530
+ }), this.setState(O.LOADING), this.prepareHighlightsForSpeak({
6511
6531
  contentToSpeak: a,
6512
6532
  options: n,
6513
6533
  highlightMode: g,
@@ -6515,18 +6535,18 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6515
6535
  }), h ? this.configureWordBoundaryHighlighting({
6516
6536
  highlightMode: g,
6517
6537
  wordBoundaryOffset: n?.wordBoundaryOffset || 0
6518
- }) : this.clearWordBoundaryHighlighting(), this.setState(I.PLAYING), await this.executeSpeakPlayback({
6538
+ }) : this.clearWordBoundaryHighlighting(), this.setState(O.PLAYING), await this.executeSpeakPlayback({
6519
6539
  shouldUsePlan: v,
6520
6540
  runId: r,
6521
6541
  highlightMode: g,
6522
6542
  contentToSpeak: s,
6523
6543
  speechChunks: p
6524
6544
  }), r !== this.speakRunId) return;
6525
- this.setState(I.IDLE), this.clearHighlightsAndTracking();
6545
+ this.setState(O.IDLE), this.clearHighlightsAndTracking();
6526
6546
  } catch (i) {
6527
6547
  let o = i;
6528
6548
  if (console.error("TTS error:", o), this.lastError = o instanceof Error ? o.message : String(o), r !== this.speakRunId) return;
6529
- throw this.setState(I.ERROR), this.clearHighlightsAndTracking(), o;
6549
+ throw this.setState(O.ERROR), this.clearHighlightsAndTracking(), o;
6530
6550
  }
6531
6551
  }
6532
6552
  async switchProviderToBrowser(t, n) {
@@ -6690,12 +6710,12 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6690
6710
  const g = bt(h, this.getTextProcessingOptions(n.language)), m = g.visibleText || R(h.textContent || ""), v = xo({
6691
6711
  speechText: p.content,
6692
6712
  visibleText: m
6693
- }), y = a(h, m), S = y ? an({
6713
+ }), y = a(h, m), S = y ? ln({
6694
6714
  mathElement: y,
6695
6715
  speechText: p.content
6696
- }) : void 0, O = S ? void 0 : l(h).map((A) => ({
6716
+ }) : void 0, I = S ? void 0 : l(h).map((A) => ({
6697
6717
  element: A,
6698
- alignment: an({
6718
+ alignment: ln({
6699
6719
  mathElement: A,
6700
6720
  speechText: p.content
6701
6721
  })
@@ -6709,7 +6729,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6709
6729
  playbackMode: v.playbackMode,
6710
6730
  alignment: v,
6711
6731
  mathAlignment: S,
6712
- mathAlignments: O,
6732
+ mathAlignments: I,
6713
6733
  visibleMap: g.map
6714
6734
  });
6715
6735
  return;
@@ -6723,7 +6743,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6723
6743
  return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
6724
6744
  }
6725
6745
  async resolveGeneratedSpeechContent(t, n, r) {
6726
- const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await Gu({
6746
+ const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await qu({
6727
6747
  contentRoot: t,
6728
6748
  language: r,
6729
6749
  mathSpeech: this.getMathSpeechOptions(),
@@ -6740,7 +6760,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6740
6760
  containsMathMarkup: !1,
6741
6761
  speechMatchesVisibleText: !0
6742
6762
  };
6743
- const c = Xu(o, { format: i }), u = o.plainSpeechText;
6763
+ const c = Uu(o, { format: i }), u = o.plainSpeechText;
6744
6764
  return {
6745
6765
  contentToSpeak: u,
6746
6766
  speechText: u,
@@ -6809,7 +6829,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6809
6829
  this.highlightCoordinator && this.paintTTSWordRange(this.resolveWordHighlightRange(t).range);
6810
6830
  }
6811
6831
  highlightRenderableRegionTarget(t) {
6812
- if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Ju(this.lastRenderedRegionTarget, t)))
6832
+ if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Xu(this.lastRenderedRegionTarget, t)))
6813
6833
  try {
6814
6834
  const n = document.createRange();
6815
6835
  if (t.type === "element") n.selectNodeContents(t.element);
@@ -6868,10 +6888,10 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6868
6888
  async speakCatalogChunkOnce(t, n) {
6869
6889
  if (!this.provider) return;
6870
6890
  this.lastRenderedRegionTarget = null;
6871
- const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? ju({
6891
+ const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? Fu({
6872
6892
  contentRoot: r,
6873
6893
  chunks: [t]
6874
- })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? zu({
6894
+ })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Wu({
6875
6895
  chunks: [i],
6876
6896
  mathTokenHighlighting: o
6877
6897
  }) : null;
@@ -6952,10 +6972,10 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6952
6972
  });
6953
6973
  }
6954
6974
  pause() {
6955
- this.provider && this.state === I.PLAYING && (this.provider.pause(), this.setState(I.PAUSED));
6975
+ this.provider && this.state === O.PLAYING && (this.provider.pause(), this.setState(O.PAUSED));
6956
6976
  }
6957
6977
  resume() {
6958
- this.provider && this.state === I.PAUSED && (this.provider.resume(), this.setState(I.PLAYING));
6978
+ this.provider && this.state === O.PAUSED && (this.provider.resume(), this.setState(O.PLAYING));
6959
6979
  }
6960
6980
  normalizePlaybackRate(t) {
6961
6981
  return Number.isFinite(t) ? Math.max(0.25, Math.min(4, t)) : 1;
@@ -6965,7 +6985,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6965
6985
  const n = Math.max(0, Math.min(this.seekSegments.length - 1, t)), r = this.playbackChunks.length ? this.playbackChunks.slice(n) : null;
6966
6986
  this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = n;
6967
6987
  const i = ++this.speakRunId, o = this.seekSegments.slice(n);
6968
- this.setState(I.PLAYING);
6988
+ this.setState(O.PLAYING);
6969
6989
  try {
6970
6990
  if (this.configureWordBoundaryHighlighting({
6971
6991
  highlightMode: this.activeHighlightMode,
@@ -6979,18 +6999,18 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6979
6999
  }
6980
7000
  else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
6981
7001
  if (i !== this.speakRunId) return;
6982
- this.setState(I.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
7002
+ this.setState(O.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
6983
7003
  } catch (s) {
6984
7004
  if (i !== this.speakRunId) return;
6985
- throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(I.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
7005
+ throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(O.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
6986
7006
  }
6987
7007
  }
6988
7008
  async setPlaybackRate(t) {
6989
7009
  const n = this.normalizePlaybackRate(t);
6990
- await this.updateSettings({ rate: n }), !(this.state !== I.PLAYING || !this.currentText || this.seekSegments.length === 0 || this.hasExplicitBreakSemantics(this.currentText)) && await this.restartFromSeekIndex(this.getCurrentSeekSegmentIndex());
7010
+ await this.updateSettings({ rate: n }), !(this.state !== O.PLAYING || !this.currentText || this.seekSegments.length === 0 || this.hasExplicitBreakSemantics(this.currentText)) && await this.restartFromSeekIndex(this.getCurrentSeekSegmentIndex());
6991
7011
  }
6992
7012
  async seekBy(t) {
6993
- if (!this.provider || !this.currentText || this.state !== I.PLAYING && this.state !== I.PAUSED || this.hasExplicitBreakSemantics(this.currentText) || this.seekSegments.length === 0) return;
7013
+ if (!this.provider || !this.currentText || this.state !== O.PLAYING && this.state !== O.PAUSED || this.hasExplicitBreakSemantics(this.currentText) || this.seekSegments.length === 0) return;
6994
7014
  const n = Number.isFinite(t) ? Math.trunc(t) : 0;
6995
7015
  if (n === 0) return;
6996
7016
  const r = this.getCurrentSeekSegmentIndex(), i = Math.max(0, Math.min(this.seekSegments.length - 1, r + n));
@@ -7005,16 +7025,16 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7005
7025
  await this.seekBy(-n);
7006
7026
  }
7007
7027
  stop() {
7008
- this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(I.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);
7028
+ this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(O.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);
7009
7029
  }
7010
7030
  requestControlHandoff() {
7011
- typeof window > "u" || window.dispatchEvent(new CustomEvent(Yu, { detail: { source: "host" } }));
7031
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(Ku, { detail: { source: "host" } }));
7012
7032
  }
7013
7033
  isPlaying() {
7014
- return this.state === I.PLAYING;
7034
+ return this.state === O.PLAYING;
7015
7035
  }
7016
7036
  isPaused() {
7017
- return this.state === I.PAUSED;
7037
+ return this.state === O.PAUSED;
7018
7038
  }
7019
7039
  getState() {
7020
7040
  return this.state;
@@ -7042,8 +7062,8 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7042
7062
  providerId: "tts",
7043
7063
  previousState: n,
7044
7064
  state: t
7045
- }), t === I.PLAYING) {
7046
- const r = n === I.PAUSED ? "pie-tool-playback-resume" : "pie-tool-playback-start";
7065
+ }), t === O.PLAYING) {
7066
+ const r = n === O.PAUSED ? "pie-tool-playback-resume" : "pie-tool-playback-start";
7047
7067
  this.emitTelemetry(r, {
7048
7068
  toolId: "textToSpeech",
7049
7069
  providerId: "tts",
@@ -7052,7 +7072,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7052
7072
  });
7053
7073
  return;
7054
7074
  }
7055
- if (t === I.PAUSED) {
7075
+ if (t === O.PAUSED) {
7056
7076
  this.emitTelemetry("pie-tool-playback-pause", {
7057
7077
  toolId: "textToSpeech",
7058
7078
  providerId: "tts",
@@ -7061,7 +7081,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7061
7081
  });
7062
7082
  return;
7063
7083
  }
7064
- if (t === I.ERROR) {
7084
+ if (t === O.ERROR) {
7065
7085
  this.emitTelemetry("pie-tool-playback-error", {
7066
7086
  toolId: "textToSpeech",
7067
7087
  providerId: "tts",
@@ -7071,7 +7091,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7071
7091
  });
7072
7092
  return;
7073
7093
  }
7074
- t === I.IDLE && (n === I.PLAYING || n === I.PAUSED || n === I.LOADING) && this.emitTelemetry("pie-tool-playback-stop", {
7094
+ t === O.IDLE && (n === O.PLAYING || n === O.PAUSED || n === O.LOADING) && this.emitTelemetry("pie-tool-playback-stop", {
7075
7095
  toolId: "textToSpeech",
7076
7096
  providerId: "tts",
7077
7097
  previousState: n,
@@ -7079,7 +7099,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7079
7099
  });
7080
7100
  }
7081
7101
  };
7082
- f(Qu, "debugEnabled", (() => {
7102
+ f(Yu, "debugEnabled", (() => {
7083
7103
  try {
7084
7104
  if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
7085
7105
  } catch {
@@ -7097,7 +7117,7 @@ var wh = rl({
7097
7117
  passage: []
7098
7118
  },
7099
7119
  providers: {}
7100
- }), Zo, Ie = class ee {
7120
+ }), Zo, Oe = class ee {
7101
7121
  constructor() {
7102
7122
  f(this, "elementType", "multiple-choice"), f(this, "priority", 100);
7103
7123
  }
@@ -7146,29 +7166,29 @@ var wh = rl({
7146
7166
  for (const n of t.querySelectorAll(".feedback-tick")) n.setAttribute(ee.FEEDBACK_HOOK_ATTR, "true");
7147
7167
  }
7148
7168
  };
7149
- Zo = Ie;
7150
- f(Ie, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
7151
- f(Ie, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
7152
- f(Ie, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
7153
- f(Ie, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
7154
- f(Ie, "CHOICE_SELECTOR", `[${Zo.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
7155
- var es = "ebsr-multiple-choice", Zu = `${es}--version-`, fr = (e) => {
7169
+ Zo = Oe;
7170
+ f(Oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
7171
+ f(Oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
7172
+ f(Oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
7173
+ f(Oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
7174
+ f(Oe, "CHOICE_SELECTOR", `[${Zo.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
7175
+ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
7156
7176
  if (!(e instanceof HTMLElement)) return !1;
7157
7177
  const t = e.tagName.toLowerCase();
7158
- return t === es || t.startsWith(Zu);
7159
- }, oi = (e, t) => Array.from(e.querySelectorAll(`[id="${t}"]`)).find(fr) ?? null, eh = (e) => {
7178
+ return t === es || t.startsWith(Ju);
7179
+ }, oi = (e, t) => Array.from(e.querySelectorAll(`[id="${t}"]`)).find(pr) ?? null, Qu = (e) => {
7160
7180
  let t = e.parentElement;
7161
7181
  for (; t !== null; ) {
7162
- if (fr(t)) return t;
7182
+ if (pr(t)) return t;
7163
7183
  t = t.parentElement;
7164
7184
  }
7165
7185
  return null;
7166
- }, th = class {
7186
+ }, Zu = class {
7167
7187
  constructor() {
7168
- f(this, "elementType", "ebsr"), f(this, "priority", 110), f(this, "mcAdapter", new Ie());
7188
+ f(this, "elementType", "ebsr"), f(this, "priority", 110), f(this, "mcAdapter", new Oe());
7169
7189
  }
7170
7190
  canHandle(e) {
7171
- return e.tagName.toLowerCase() === "ebsr" || Array.from(e.querySelectorAll("*")).some(fr);
7191
+ return e.tagName.toLowerCase() === "ebsr" || Array.from(e.querySelectorAll("*")).some(pr);
7172
7192
  }
7173
7193
  findChoices(e) {
7174
7194
  const t = oi(e, "a"), n = oi(e, "b"), r = [];
@@ -7178,7 +7198,7 @@ var es = "ebsr-multiple-choice", Zu = `${es}--version-`, fr = (e) => {
7178
7198
  return this.mcAdapter.createChoiceRange(e);
7179
7199
  }
7180
7200
  getChoiceId(e) {
7181
- return `${eh(e)?.id || "unknown"}-${this.mcAdapter.getChoiceId(e)}`;
7201
+ return `${Qu(e)?.id || "unknown"}-${this.mcAdapter.getChoiceId(e)}`;
7182
7202
  }
7183
7203
  getChoiceLabel(e) {
7184
7204
  return this.mcAdapter.getChoiceLabel(e);
@@ -7189,7 +7209,7 @@ var es = "ebsr-multiple-choice", Zu = `${es}--version-`, fr = (e) => {
7189
7209
  getButtonContainer(e) {
7190
7210
  return this.mcAdapter.getButtonContainer(e);
7191
7211
  }
7192
- }, nh = class {
7212
+ }, eh = class {
7193
7213
  constructor() {
7194
7214
  f(this, "elementType", "inline-dropdown"), f(this, "priority", 90);
7195
7215
  }
@@ -7215,12 +7235,12 @@ var es = "ebsr-multiple-choice", Zu = `${es}--version-`, fr = (e) => {
7215
7235
  getButtonContainer(e) {
7216
7236
  return e;
7217
7237
  }
7218
- }, rh = class {
7238
+ }, th = class {
7219
7239
  constructor() {
7220
7240
  f(this, "adapters", void 0), this.adapters = [
7221
- new Ie(),
7222
- new th(),
7223
- new nh()
7241
+ new Oe(),
7242
+ new Zu(),
7243
+ new eh()
7224
7244
  ].sort((e, t) => t.priority - e.priority);
7225
7245
  }
7226
7246
  findAdapter(e) {
@@ -7431,9 +7451,9 @@ f(_e, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
7431
7451
  f(_e, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
7432
7452
  f(_e, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
7433
7453
  f(_e, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
7434
- var pr = class Tt {
7454
+ var gr = class Tt {
7435
7455
  constructor(t = "strikethrough", n = "right") {
7436
- f(this, "registry", void 0), f(this, "strategy", void 0), f(this, "eliminatedChoices", /* @__PURE__ */ new Set()), f(this, "choiceElements", /* @__PURE__ */ new Map()), f(this, "choiceButtons", /* @__PURE__ */ new Map()), f(this, "choiceAdapters", /* @__PURE__ */ new Map()), f(this, "buttonAlignment", "right"), f(this, "shouldRestoreState", !0), f(this, "storeIntegration", null), this.registry = new rh(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = n;
7456
+ f(this, "registry", void 0), f(this, "strategy", void 0), f(this, "eliminatedChoices", /* @__PURE__ */ new Set()), f(this, "choiceElements", /* @__PURE__ */ new Map()), f(this, "choiceButtons", /* @__PURE__ */ new Map()), f(this, "choiceAdapters", /* @__PURE__ */ new Map()), f(this, "buttonAlignment", "right"), f(this, "shouldRestoreState", !0), f(this, "storeIntegration", null), this.registry = new th(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = n;
7437
7457
  }
7438
7458
  createStrategy(t) {
7439
7459
  return t === "mask" ? new Qe() : new _e();
@@ -7575,14 +7595,14 @@ var pr = class Tt {
7575
7595
  this.cleanupButtons(), this.strategy.destroy();
7576
7596
  }
7577
7597
  };
7578
- f(pr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
7579
- f(pr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
7580
- var ih = /* @__PURE__ */ xa('<div style="display: none;" aria-hidden="true"></div>');
7581
- function oh(e, t) {
7598
+ f(gr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
7599
+ f(gr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
7600
+ var nh = /* @__PURE__ */ xa('<div style="display: none;" aria-hidden="true"></div>');
7601
+ function rh(e, t) {
7582
7602
  mi(t, !0);
7583
7603
  let n = we(t, "visible", 7, !1), r = we(t, "toolId", 7, "answerEliminator"), i = we(t, "strategy", 7, "strikethrough"), o = we(t, "alwaysOn", 7, !1), s = we(t, "buttonAlignment", 7, "right"), a = we(t, "scopeElement", 7, null), l = we(t, "elementToolStateStore", 7, null), c = we(t, "globalElementId", 7, ""), u = /* @__PURE__ */ F(null), h = /* @__PURE__ */ F(null), p = /* @__PURE__ */ F(null);
7584
- const g = /* @__PURE__ */ Ar(() => b(h)?.toolCoordinator);
7585
- let m = /* @__PURE__ */ F(null), v = /* @__PURE__ */ F(null), y = /* @__PURE__ */ F(null), S = /* @__PURE__ */ F(null), O = /* @__PURE__ */ Ar(() => o() || n());
7604
+ const g = /* @__PURE__ */ Cr(() => b(h)?.toolCoordinator);
7605
+ let m = /* @__PURE__ */ F(null), v = /* @__PURE__ */ F(null), y = /* @__PURE__ */ F(null), S = /* @__PURE__ */ F(null), I = /* @__PURE__ */ Cr(() => o() || n());
7586
7606
  Le(() => {
7587
7607
  if (b(u))
7588
7608
  return Xa(b(u), (C) => {
@@ -7598,7 +7618,7 @@ function oh(e, t) {
7598
7618
  return a() || b(p)?.scopeElement || null;
7599
7619
  }
7600
7620
  function A() {
7601
- if (!b(O) || !b(m)) return;
7621
+ if (!b(I) || !b(m)) return;
7602
7622
  const C = V();
7603
7623
  if (!C) {
7604
7624
  console.warn("[AnswerEliminator] Missing shell scope context for question root");
@@ -7614,10 +7634,10 @@ function oh(e, t) {
7614
7634
  });
7615
7635
  }
7616
7636
  Le(() => {
7617
- !b(g) || !r() || (b(S) && b(y) && (b(S) !== b(g) || b(y) !== r()) && (b(S).unregisterTool(b(y)), M(S, null), M(y, null)), b(y) || (b(g).registerTool(r(), "Answer Eliminator", void 0, Bn.MODAL), M(S, b(g), !0), M(y, r())));
7637
+ !b(g) || !r() || (b(S) && b(y) && (b(S) !== b(g) || b(y) !== r()) && (b(S).unregisterTool(b(y)), M(S, null), M(y, null)), b(y) || (b(g).registerTool(r(), "Answer Eliminator", void 0, zn.MODAL), M(S, b(g), !0), M(y, r())));
7618
7638
  }), Le(() => {
7619
7639
  b(m) && l() && c() && b(m).setStoreIntegration(l(), c());
7620
- }), Pa(() => (M(m, new pr(i(), s()), !0), b(m) && l() && c() && b(m).setStoreIntegration(l(), c()), b(O) ? A() : b(m).cleanup(), () => {
7640
+ }), Pa(() => (M(m, new gr(i(), s()), !0), b(m) && l() && c() && b(m).setStoreIntegration(l(), c()), b(I) ? A() : b(m).cleanup(), () => {
7621
7641
  b(m)?.destroy(), M(m, null), b(S) && b(y) && (b(S).unregisterTool(b(y)), M(S, null), M(y, null));
7622
7642
  })), Le(() => {
7623
7643
  const C = b(p)?.contextVersion ?? null;
@@ -7629,7 +7649,7 @@ function oh(e, t) {
7629
7649
  C !== b(v) && (M(v, C, !0), G());
7630
7650
  }
7631
7651
  }), Le(() => {
7632
- b(m) && (b(O) ? (b(m).enableStateRestoration(), A()) : b(m).cleanup());
7652
+ b(m) && (b(I) ? (b(m).enableStateRestoration(), A()) : b(m).cleanup());
7633
7653
  });
7634
7654
  var Z = {
7635
7655
  get visible() {
@@ -7680,10 +7700,10 @@ function oh(e, t) {
7680
7700
  set globalElementId(C = "") {
7681
7701
  c(C), pe();
7682
7702
  }
7683
- }, pt = ih();
7703
+ }, pt = nh();
7684
7704
  return Wa(pt, (C) => M(u, C), () => b(u)), eo(e, pt), vi(Z);
7685
7705
  }
7686
- customElements.define("pie-tool-answer-eliminator", Da(oh, {
7706
+ customElements.define("pie-tool-answer-eliminator", Da(rh, {
7687
7707
  visible: {
7688
7708
  attribute: "visible",
7689
7709
  type: "Boolean"
@@ -7709,7 +7729,7 @@ customElements.define("pie-tool-answer-eliminator", Da(oh, {
7709
7729
  globalElementId: { type: "String" }
7710
7730
  }, [], [], { mode: "open" }));
7711
7731
  export {
7712
- oh as default,
7713
- lh as n,
7714
- ah as t
7732
+ rh as default,
7733
+ sh as n,
7734
+ oh as t
7715
7735
  };