@pie-players/pie-tool-graph 0.3.52 → 0.3.53

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.
Files changed (2) hide show
  1. package/dist/tool-graph.js +761 -738
  2. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { t as y } from "./defineProperty-Dt7ri80W.js";
2
- var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, qa = Object.getOwnPropertyNames, Ua = Object.getPrototypeOf, Ga = Object.prototype.hasOwnProperty, ff = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ya = (e, t, r, n) => {
2
+ var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, qa = Object.getOwnPropertyNames, Ua = Object.getPrototypeOf, Ga = Object.prototype.hasOwnProperty, dd = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ya = (e, t, r, n) => {
3
3
  if (t && typeof t == "object" || typeof t == "function")
4
4
  for (var i = qa(t), o = 0, s = i.length, a; o < s; o++)
5
5
  a = i[o], !Ga.call(e, a) && a !== r && zo(e, a, {
@@ -10,7 +10,7 @@ var ja = Object.create, zo = Object.defineProperty, Va = Object.getOwnPropertyDe
10
10
  }, Ka = (e, t, r) => (r = e != null ? ja(Ua(e)) : {}, Ya(t || !e || !e.__esModule ? zo(r, "default", {
11
11
  value: e,
12
12
  enumerable: !0
13
- }) : r, e)), pf = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
13
+ }) : r, e)), pd = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, r) => (typeof require < "u" ? require : t)[r] }) : e)(function(e) {
14
14
  if (typeof require < "u") return require.apply(this, arguments);
15
15
  throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
16
16
  });
@@ -34,7 +34,7 @@ function Bo() {
34
34
  reject: t
35
35
  };
36
36
  }
37
- var gf = 1 << 24, be = 1024, Se = 2048, Lt = 4096, hi = 8192, rl = 16384, di = 32768, Vi = 1 << 25, fi = 65536, vf = 1 << 17, mf = 1 << 18, Xt = 1 << 19, nl = 1 << 20, ur = 1 << 25, yr = 65536, qi = 1 << 21, il = 1 << 22, Hr = 1 << 23, hr = /* @__PURE__ */ Symbol("$state"), Do = /* @__PURE__ */ Symbol("legacy props"), ol = /* @__PURE__ */ Symbol(""), sl = /* @__PURE__ */ Symbol("proxy path"), zn = /* @__PURE__ */ Symbol("attributes"), Wn = /* @__PURE__ */ Symbol("class"), Hn = /* @__PURE__ */ Symbol("style"), Or = /* @__PURE__ */ Symbol("text"), dr = /* @__PURE__ */ Symbol("form reset");
37
+ var gd = 1 << 24, be = 1024, Se = 2048, Lt = 4096, hi = 8192, rl = 16384, fi = 32768, Vi = 1 << 25, di = 65536, vd = 1 << 17, md = 1 << 18, Xt = 1 << 19, nl = 1 << 20, ur = 1 << 25, yr = 65536, qi = 1 << 21, il = 1 << 22, Hr = 1 << 23, hr = /* @__PURE__ */ Symbol("$state"), Do = /* @__PURE__ */ Symbol("legacy props"), ol = /* @__PURE__ */ Symbol(""), sl = /* @__PURE__ */ Symbol("proxy path"), zn = /* @__PURE__ */ Symbol("attributes"), Wn = /* @__PURE__ */ Symbol("class"), Hn = /* @__PURE__ */ Symbol("style"), Or = /* @__PURE__ */ Symbol("text"), fr = /* @__PURE__ */ Symbol("form reset");
38
38
  var nn = new class extends Error {
39
39
  constructor(...t) {
40
40
  super(...t), y(this, "name", "StaleReactionError"), y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
@@ -52,10 +52,10 @@ function ul(e) {
52
52
  function hl() {
53
53
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
54
54
  }
55
- function dl(e) {
55
+ function fl(e) {
56
56
  throw new Error("https://svelte.dev/e/effect_orphan");
57
57
  }
58
- function fl() {
58
+ function dl() {
59
59
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
60
60
  }
61
61
  function pl() {
@@ -98,7 +98,7 @@ function le(e) {
98
98
  function sn() {
99
99
  return le(/* @__PURE__ */ We(P));
100
100
  }
101
- function de(e) {
101
+ function fe(e) {
102
102
  if (L) {
103
103
  if (/* @__PURE__ */ We(P) !== null)
104
104
  throw on(), Vt;
@@ -182,7 +182,7 @@ function Go() {
182
182
  yt = [], tl(e);
183
183
  }
184
184
  function Ye(e) {
185
- if (yt.length === 0 && !fr) {
185
+ if (yt.length === 0 && !dr) {
186
186
  var t = yt;
187
187
  queueMicrotask(() => {
188
188
  t === yt && Go();
@@ -190,7 +190,7 @@ function Ye(e) {
190
190
  }
191
191
  yt.push(e);
192
192
  }
193
- function El() {
193
+ function xl() {
194
194
  for (; yt.length > 0; ) Go();
195
195
  }
196
196
  function Yo(e) {
@@ -216,12 +216,12 @@ function lt(e, t) {
216
216
  }
217
217
  throw e;
218
218
  }
219
- var xl = ~(Se | Lt | be);
220
- function V(e, t) {
221
- e.f = e.f & xl | t;
219
+ var El = ~(Se | Lt | be);
220
+ function q(e, t) {
221
+ e.f = e.f & El | t;
222
222
  }
223
223
  function pi(e) {
224
- (e.f & 512) !== 0 || e.deps === null ? V(e, be) : V(e, Lt);
224
+ (e.f & 512) !== 0 || e.deps === null ? q(e, be) : q(e, Lt);
225
225
  }
226
226
  function Ko(e) {
227
227
  if (e !== null)
@@ -229,7 +229,7 @@ function Ko(e) {
229
229
  (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= yr, Ko(t.deps));
230
230
  }
231
231
  function Xo(e, t, r) {
232
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Ko(e.deps), V(e, be);
232
+ (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), Ko(e.deps), q(e, be);
233
233
  }
234
234
  var Cl = !1, wr = !1;
235
235
  function Al(e) {
@@ -246,7 +246,7 @@ function Jo(e, t) {
246
246
  function gi(e, t) {
247
247
  Jo(e, t), t.add(e);
248
248
  }
249
- function E(e, t, r) {
249
+ function x(e, t, r) {
250
250
  Jo(e, t), t.set(e, r);
251
251
  }
252
252
  function O(e, t, r) {
@@ -256,100 +256,100 @@ function O(e, t, r) {
256
256
  function k(e, t, r) {
257
257
  return e.set(O(e, t), r), r;
258
258
  }
259
- function f(e, t) {
259
+ function d(e, t) {
260
260
  return e.get(O(e, t));
261
261
  }
262
- var Qo, Dr = null, Wt = null, x = null, Fr = null, oe = null, Bn = null, fr = !1, _n = !1, Ut = null, jr = null, Zo = 0;
263
- var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakSet(), Pt = class es {
262
+ var Qo, Dr = null, Wt = null, E = null, Fr = null, oe = null, Bn = null, dr = !1, _n = !1, Ut = null, jr = null, Zo = 0;
263
+ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), kr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakSet(), Pt = class es {
264
264
  constructor() {
265
- gi(this, q), y(this, "id", Ml++), E(this, Vr, !1), y(this, "linked", !0), E(this, wt, null), E(this, bt, null), y(this, "async_deriveds", /* @__PURE__ */ new Map()), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), E(this, qr, /* @__PURE__ */ new Set()), E(this, kr, /* @__PURE__ */ new Set()), E(this, Ht, 0), E(this, mt, /* @__PURE__ */ new Map()), E(this, or, null), E(this, ge, []), E(this, Dn, []), E(this, Ot, /* @__PURE__ */ new Set()), E(this, Ue, /* @__PURE__ */ new Set()), E(this, at, /* @__PURE__ */ new Map()), E(this, Ir, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), E(this, sr, !1), Wt === null ? Dr = Wt = this : (k(bt, Wt, this), k(wt, this, Wt)), Wt = this;
265
+ gi(this, U), y(this, "id", Ml++), x(this, Vr, !1), y(this, "linked", !0), x(this, wt, null), x(this, bt, null), y(this, "async_deriveds", /* @__PURE__ */ new Map()), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), x(this, qr, /* @__PURE__ */ new Set()), x(this, kr, /* @__PURE__ */ new Set()), x(this, Ht, 0), x(this, mt, /* @__PURE__ */ new Map()), x(this, or, null), x(this, ge, []), x(this, Dn, []), x(this, Ot, /* @__PURE__ */ new Set()), x(this, Ue, /* @__PURE__ */ new Set()), x(this, at, /* @__PURE__ */ new Map()), x(this, Ir, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), x(this, sr, !1), Wt === null ? Dr = Wt = this : (k(bt, Wt, this), k(wt, this, Wt)), Wt = this;
266
266
  }
267
267
  skip_effect(t) {
268
- f(at, this).has(t) || f(at, this).set(t, {
268
+ d(at, this).has(t) || d(at, this).set(t, {
269
269
  d: [],
270
270
  m: []
271
- }), f(Ir, this).delete(t);
271
+ }), d(Ir, this).delete(t);
272
272
  }
273
273
  unskip_effect(t, r = (n) => this.schedule(n)) {
274
- var n = f(at, this).get(t);
274
+ var n = d(at, this).get(t);
275
275
  if (n) {
276
- f(at, this).delete(t);
276
+ d(at, this).delete(t);
277
277
  for (var i of n.d)
278
- V(i, Se), r(i);
278
+ q(i, Se), r(i);
279
279
  for (i of n.m)
280
- V(i, Lt), r(i);
280
+ q(i, Lt), r(i);
281
281
  }
282
- f(Ir, this).add(t);
282
+ d(Ir, this).add(t);
283
283
  }
284
284
  capture(t, r, n = !1) {
285
285
  t.v !== J && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), oe?.set(t, r)), this.is_fork || (t.v = r);
286
286
  }
287
287
  activate() {
288
- x = this;
288
+ E = this;
289
289
  }
290
290
  deactivate() {
291
- x = null, oe = null;
291
+ E = null, oe = null;
292
292
  }
293
293
  flush() {
294
294
  try {
295
- _n = !0, x = this, O(q, this, Ur).call(this);
295
+ _n = !0, E = this, O(U, this, Ur).call(this);
296
296
  } finally {
297
- Zo = 0, Bn = null, Ut = null, jr = null, _n = !1, x = null, oe = null, xt.clear();
297
+ Zo = 0, Bn = null, Ut = null, jr = null, _n = !1, E = null, oe = null, Et.clear();
298
298
  }
299
299
  }
300
300
  discard() {
301
- for (const t of f(kr, this)) t(this);
302
- f(kr, this).clear(), O(q, this, Gr).call(this), f(or, this)?.resolve();
301
+ for (const t of d(kr, this)) t(this);
302
+ d(kr, this).clear(), O(U, this, Gr).call(this), d(or, this)?.resolve();
303
303
  }
304
304
  register_created_effect(t) {
305
- f(Dn, this).push(t);
305
+ d(Dn, this).push(t);
306
306
  }
307
307
  increment(t, r) {
308
- if (k(Ht, this, f(Ht, this) + 1), t) {
309
- let n = f(mt, this).get(r) ?? 0;
310
- f(mt, this).set(r, n + 1);
308
+ if (k(Ht, this, d(Ht, this) + 1), t) {
309
+ let n = d(mt, this).get(r) ?? 0;
310
+ d(mt, this).set(r, n + 1);
311
311
  }
312
312
  }
313
313
  decrement(t, r) {
314
- if (k(Ht, this, f(Ht, this) - 1), t) {
315
- let n = f(mt, this).get(r) ?? 0;
316
- n === 1 ? f(mt, this).delete(r) : f(mt, this).set(r, n - 1);
314
+ if (k(Ht, this, d(Ht, this) - 1), t) {
315
+ let n = d(mt, this).get(r) ?? 0;
316
+ n === 1 ? d(mt, this).delete(r) : d(mt, this).set(r, n - 1);
317
317
  }
318
- f(sr, this) || (k(sr, this, !0), Ye(() => {
318
+ d(sr, this) || (k(sr, this, !0), Ye(() => {
319
319
  k(sr, this, !1), this.linked && this.flush();
320
320
  }));
321
321
  }
322
322
  transfer_effects(t, r) {
323
- for (const n of t) f(Ot, this).add(n);
324
- for (const n of r) f(Ue, this).add(n);
323
+ for (const n of t) d(Ot, this).add(n);
324
+ for (const n of r) d(Ue, this).add(n);
325
325
  t.clear(), r.clear();
326
326
  }
327
327
  oncommit(t) {
328
- f(qr, this).add(t);
328
+ d(qr, this).add(t);
329
329
  }
330
330
  ondiscard(t) {
331
- f(kr, this).add(t);
331
+ d(kr, this).add(t);
332
332
  }
333
333
  settled() {
334
- return (f(or, this) ?? k(or, this, Bo())).promise;
334
+ return (d(or, this) ?? k(or, this, Bo())).promise;
335
335
  }
336
336
  static ensure() {
337
- if (x === null) {
338
- const t = x = new es();
339
- !_n && !fr && Ye(() => {
340
- f(Vr, t) || t.flush();
337
+ if (E === null) {
338
+ const t = E = new es();
339
+ !_n && !dr && Ye(() => {
340
+ d(Vr, t) || t.flush();
341
341
  });
342
342
  }
343
- return x;
343
+ return E;
344
344
  }
345
345
  apply() {
346
- if (!Me || !this.is_fork && f(wt, this) === null && f(bt, this) === null) {
346
+ if (!Me || !this.is_fork && d(wt, this) === null && d(bt, this) === null) {
347
347
  oe = null;
348
348
  return;
349
349
  }
350
350
  oe = /* @__PURE__ */ new Map();
351
351
  for (const [r, [n]] of this.current) oe.set(r, n);
352
- for (let r = Dr; r !== null; r = f(bt, r))
352
+ for (let r = Dr; r !== null; r = d(bt, r))
353
353
  if (!(r === this || r.is_fork)) {
354
354
  var t = !1;
355
355
  if (r.id < this.id) {
@@ -378,15 +378,15 @@ var Ml = 1, Vr = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap
378
378
  r.f ^= be;
379
379
  }
380
380
  }
381
- f(ge, this).push(r);
381
+ d(ge, this).push(r);
382
382
  }
383
383
  };
384
384
  Qo = Pt;
385
385
  function Gi() {
386
386
  if (this.is_fork) return !0;
387
- for (const r of f(mt, this).keys()) {
387
+ for (const r of d(mt, this).keys()) {
388
388
  for (var e = r, t = !1; e.parent !== null; ) {
389
- if (f(at, this).has(e)) {
389
+ if (d(at, this).has(e)) {
390
390
  t = !0;
391
391
  break;
392
392
  }
@@ -397,50 +397,50 @@ function Gi() {
397
397
  return !1;
398
398
  }
399
399
  function Ur() {
400
- k(Vr, this, !0), Zo++ > 1e3 && (O(q, this, Gr).call(this), $l());
401
- for (const a of f(Ot, this))
402
- f(Ue, this).delete(a), V(a, Se), this.schedule(a);
403
- for (const a of f(Ue, this))
404
- V(a, Lt), this.schedule(a);
405
- const e = f(ge, this);
400
+ k(Vr, this, !0), Zo++ > 1e3 && (O(U, this, Gr).call(this), $l());
401
+ for (const a of d(Ot, this))
402
+ d(Ue, this).delete(a), q(a, Se), this.schedule(a);
403
+ for (const a of d(Ue, this))
404
+ q(a, Lt), this.schedule(a);
405
+ const e = d(ge, this);
406
406
  k(ge, this, []), this.apply();
407
407
  var t = Ut = [], r = [], n = jr = [];
408
408
  for (const a of e) try {
409
- O(q, this, ts).call(this, a, t, r);
409
+ O(U, this, ts).call(this, a, t, r);
410
410
  } catch (l) {
411
- throw is(a), O(q, this, Gi).call(this) || this.discard(), l;
411
+ throw is(a), O(U, this, Gi).call(this) || this.discard(), l;
412
412
  }
413
- if (x = null, n.length > 0) {
413
+ if (E = null, n.length > 0) {
414
414
  var i = Qo.ensure();
415
415
  for (const a of n) i.schedule(a);
416
416
  }
417
- if (Ut = null, jr = null, O(q, this, Gi).call(this)) {
418
- O(q, this, ar).call(this, r), O(q, this, ar).call(this, t);
419
- for (const [a, l] of f(at, this)) ns(a, l);
420
- n.length > 0 && O(q, x, Ur).call(x);
417
+ if (Ut = null, jr = null, O(U, this, Gi).call(this)) {
418
+ O(U, this, ar).call(this, r), O(U, this, ar).call(this, t);
419
+ for (const [a, l] of d(at, this)) ns(a, l);
420
+ n.length > 0 && O(U, E, Ur).call(E);
421
421
  return;
422
422
  }
423
- const o = O(q, this, Ol).call(this);
423
+ const o = O(U, this, Ol).call(this);
424
424
  if (o) {
425
- O(q, this, ar).call(this, r), O(q, this, ar).call(this, t), O(q, o, Il).call(o, this);
425
+ O(U, this, ar).call(this, r), O(U, this, ar).call(this, t), O(U, o, Il).call(o, this);
426
426
  return;
427
427
  }
428
- f(Ot, this).clear(), f(Ue, this).clear();
429
- for (const a of f(qr, this)) a(this);
430
- f(qr, this).clear(), Fr = this, Yi(r), Yi(t), Fr = null, f(or, this)?.resolve();
431
- var s = x;
432
- if (f(Ht, this) === 0 && (f(ge, this).length === 0 || s !== null) && (O(q, this, Gr).call(this), Me && (O(q, this, Rl).call(this), x = s)), f(ge, this).length > 0) if (s !== null) {
428
+ d(Ot, this).clear(), d(Ue, this).clear();
429
+ for (const a of d(qr, this)) a(this);
430
+ d(qr, this).clear(), Fr = this, Yi(r), Yi(t), Fr = null, d(or, this)?.resolve();
431
+ var s = E;
432
+ if (d(Ht, this) === 0 && (d(ge, this).length === 0 || s !== null) && (O(U, this, Gr).call(this), Me && (O(U, this, Rl).call(this), E = s)), d(ge, this).length > 0) if (s !== null) {
433
433
  const a = s;
434
- f(ge, a).push(...f(ge, this).filter((l) => !f(ge, a).includes(l)));
434
+ d(ge, a).push(...d(ge, this).filter((l) => !d(ge, a).includes(l)));
435
435
  } else s = this;
436
- s !== null && O(q, s, Ur).call(s);
436
+ s !== null && O(U, s, Ur).call(s);
437
437
  }
438
438
  function ts(e, t, r) {
439
439
  e.f ^= be;
440
440
  for (var n = e.first; n !== null; ) {
441
441
  var i = n.f, o = (i & 96) !== 0;
442
- if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 || f(at, this).has(n)) && n.fn !== null) {
443
- o ? n.f ^= be : (i & 4) !== 0 ? t.push(n) : Me && (i & 16777224) !== 0 ? r.push(n) : _r(n) && ((i & 16) !== 0 && f(Ue, this).add(n), Yt(n));
442
+ if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 || d(at, this).has(n)) && n.fn !== null) {
443
+ o ? n.f ^= be : (i & 4) !== 0 ? t.push(n) : Me && (i & 16777224) !== 0 ? r.push(n) : _r(n) && ((i & 16) !== 0 && d(Ue, this).add(n), Yt(n));
444
444
  var s = n.first;
445
445
  if (s !== null) {
446
446
  n = s;
@@ -458,11 +458,11 @@ function ts(e, t, r) {
458
458
  }
459
459
  }
460
460
  function Ol() {
461
- for (var e = f(wt, this); e !== null; ) {
461
+ for (var e = d(wt, this); e !== null; ) {
462
462
  if (!e.is_fork) {
463
463
  for (const [t, [, r]] of this.current) if (e.current.has(t) && !r) return e;
464
464
  }
465
- e = f(wt, e);
465
+ e = d(wt, e);
466
466
  }
467
467
  return null;
468
468
  }
@@ -473,7 +473,7 @@ function Il(e) {
473
473
  const i = this.async_deriveds.get(r);
474
474
  i && n.promise.then(i.resolve).catch(i.reject);
475
475
  }
476
- this.transfer_effects(f(Ot, e), f(Ue, e));
476
+ this.transfer_effects(d(Ot, e), d(Ue, e));
477
477
  const t = (r) => {
478
478
  var n = r.reactions;
479
479
  if (n !== null)
@@ -482,52 +482,52 @@ function Il(e) {
482
482
  if ((i & 2) !== 0) t(s);
483
483
  else {
484
484
  var o = s;
485
- i & 4194320 && !this.async_deriveds.has(o) && (f(Ue, this).delete(o), V(o, Se), this.schedule(o));
485
+ i & 4194320 && !this.async_deriveds.has(o) && (d(Ue, this).delete(o), q(o, Se), this.schedule(o));
486
486
  }
487
487
  }
488
488
  };
489
489
  for (const r of this.current.keys()) t(r);
490
- this.oncommit(() => e.discard()), O(q, e, Gr).call(e), x = this, O(q, this, Ur).call(this);
490
+ this.oncommit(() => e.discard()), O(U, e, Gr).call(e), E = this, O(U, this, Ur).call(this);
491
491
  }
492
492
  function ar(e) {
493
- for (var t = 0; t < e.length; t += 1) Xo(e[t], f(Ot, this), f(Ue, this));
493
+ for (var t = 0; t < e.length; t += 1) Xo(e[t], d(Ot, this), d(Ue, this));
494
494
  }
495
495
  function Rl() {
496
- for (let c = Dr; c !== null; c = f(bt, c)) {
496
+ for (let c = Dr; c !== null; c = d(bt, c)) {
497
497
  var e = c.id < this.id, t = [];
498
- for (const [u, [h, d]] of this.current) {
498
+ for (const [u, [f, h]] of this.current) {
499
499
  if (c.current.has(u)) {
500
500
  var r = c.current.get(u)[0];
501
- if (e && h !== r) c.current.set(u, [h, d]);
501
+ if (e && f !== r) c.current.set(u, [f, h]);
502
502
  else continue;
503
503
  }
504
504
  t.push(u);
505
505
  }
506
- if (e) for (const [u, h] of this.async_deriveds) {
507
- const d = c.async_deriveds.get(u);
508
- d && h.promise.then(d.resolve).catch(d.reject);
506
+ if (e) for (const [u, f] of this.async_deriveds) {
507
+ const h = c.async_deriveds.get(u);
508
+ h && f.promise.then(h.resolve).catch(h.reject);
509
509
  }
510
- if (f(Vr, c)) {
510
+ if (d(Vr, c)) {
511
511
  var n = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
512
512
  if (n.length === 0)
513
513
  e && c.discard();
514
514
  else if (t.length > 0) {
515
- if (e) for (const u of f(Ir, this)) c.unskip_effect(u, (h) => {
516
- (h.f & 4194320) !== 0 ? c.schedule(h) : O(q, c, ar).call(c, [h]);
515
+ if (e) for (const u of d(Ir, this)) c.unskip_effect(u, (f) => {
516
+ (f.f & 4194320) !== 0 ? c.schedule(f) : O(U, c, ar).call(c, [f]);
517
517
  });
518
518
  c.activate();
519
519
  var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
520
520
  for (var s of t) rs(s, n, i, o);
521
521
  o = /* @__PURE__ */ new Map();
522
- var a = [...c.current].filter(([u, h]) => {
523
- const d = this.current.get(u);
524
- return d ? d[0] !== h[0] || d[1] !== h[1] : !0;
522
+ var a = [...c.current].filter(([u, f]) => {
523
+ const h = this.current.get(u);
524
+ return h ? h[0] !== f[0] || h[1] !== f[1] : !0;
525
525
  }).map(([u]) => u);
526
526
  if (a.length > 0)
527
- for (const u of f(Dn, this)) (u.f & 155648) === 0 && vi(u, a, o) && ((u.f & 4194320) !== 0 ? (V(u, Se), c.schedule(u)) : f(Ot, c).add(u));
528
- if (f(ge, c).length > 0 && !f(sr, c)) {
527
+ for (const u of d(Dn, this)) (u.f & 155648) === 0 && vi(u, a, o) && ((u.f & 4194320) !== 0 ? (q(u, Se), c.schedule(u)) : d(Ot, c).add(u));
528
+ if (d(ge, c).length > 0 && !d(sr, c)) {
529
529
  c.apply();
530
- for (var l of f(ge, c)) O(q, c, ts).call(c, l, [], []);
530
+ for (var l of d(ge, c)) O(U, c, ts).call(c, l, [], []);
531
531
  k(ge, c, []);
532
532
  }
533
533
  c.deactivate();
@@ -537,31 +537,31 @@ function Rl() {
537
537
  }
538
538
  function Gr() {
539
539
  if (this.linked) {
540
- var e = f(wt, this), t = f(bt, this);
540
+ var e = d(wt, this), t = d(bt, this);
541
541
  e === null ? Dr = t : k(bt, e, t), t === null ? Wt = e : k(wt, t, e), this.linked = !1;
542
542
  }
543
543
  }
544
544
  function Yr(e) {
545
- var t = fr;
546
- fr = !0;
545
+ var t = dr;
546
+ dr = !0;
547
547
  try {
548
548
  var r;
549
- for (e && (x !== null && !x.is_fork && x.flush(), r = e()); ; ) {
550
- if (El(), x === null) return r;
551
- x.flush();
549
+ for (e && (E !== null && !E.is_fork && E.flush(), r = e()); ; ) {
550
+ if (xl(), E === null) return r;
551
+ E.flush();
552
552
  }
553
553
  } finally {
554
- fr = t;
554
+ dr = t;
555
555
  }
556
556
  }
557
557
  function $l() {
558
558
  if (0) {
559
559
  var e;
560
- for (const r of x.current.keys()) for (const [n, i] of r.updated ?? [])
560
+ for (const r of E.current.keys()) for (const [n, i] of r.updated ?? [])
561
561
  var t;
562
562
  }
563
563
  try {
564
- fl();
564
+ dl();
565
565
  } catch (r) {
566
566
  lt(r, Bn);
567
567
  }
@@ -573,7 +573,7 @@ function Yi(e) {
573
573
  for (var r = 0; r < t; ) {
574
574
  var n = e[r++];
575
575
  if ((n.f & 24576) === 0 && _r(n) && (Le = /* @__PURE__ */ new Set(), Yt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && ws(n), Le?.size > 0)) {
576
- xt.clear();
576
+ Et.clear();
577
577
  for (const i of Le) {
578
578
  if ((i.f & 24576) !== 0) continue;
579
579
  const o = [i];
@@ -595,7 +595,7 @@ function rs(e, t, r, n) {
595
595
  if (!r.has(e) && (r.add(e), e.reactions !== null))
596
596
  for (const i of e.reactions) {
597
597
  const o = i.f;
598
- (o & 2) !== 0 ? rs(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 && vi(i, t, n) && (V(i, Se), mi(i));
598
+ (o & 2) !== 0 ? rs(i, t, r, n) : (o & 4194320) !== 0 && (o & 2048) === 0 && vi(i, t, n) && (q(i, Se), mi(i));
599
599
  }
600
600
  }
601
601
  function vi(e, t, r) {
@@ -609,17 +609,17 @@ function vi(e, t, r) {
609
609
  return r.set(e, !1), !1;
610
610
  }
611
611
  function mi(e) {
612
- x.schedule(e);
612
+ E.schedule(e);
613
613
  }
614
614
  function ns(e, t) {
615
615
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
616
- (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), V(e, be);
616
+ (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), q(e, be);
617
617
  for (var r = e.first; r !== null; )
618
618
  ns(r, t), r = r.next;
619
619
  }
620
620
  }
621
621
  function is(e) {
622
- V(e, be);
622
+ q(e, be);
623
623
  for (var t = e.first; t !== null; )
624
624
  is(t), t = t.next;
625
625
  }
@@ -633,20 +633,20 @@ function Ll(e) {
633
633
  })));
634
634
  };
635
635
  }
636
- var Pl = fi | Xt;
636
+ var Pl = di | Xt;
637
637
  function Nl(e, t, r, n) {
638
638
  new zl(e, t, r, n);
639
639
  }
640
- var Ce = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), zl = class {
640
+ var Ce = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakSet(), zl = class {
641
641
  constructor(e, t, r, n) {
642
- gi(this, ne), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), E(this, Ce, void 0), E(this, Fn, L ? P : null), E(this, Pe, void 0), E(this, gr, void 0), E(this, ve, void 0), E(this, Ne, null), E(this, ue, null), E(this, Ee, null), E(this, kt, null), E(this, Bt, 0), E(this, Et, 0), E(this, Er, !1), E(this, jn, /* @__PURE__ */ new Set()), E(this, Vn, /* @__PURE__ */ new Set()), E(this, ft, null), E(this, Ki, Ll(() => (k(ft, this, It(f(Bt, this))), () => {
643
- k(ft, this, null);
642
+ gi(this, ne), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), x(this, Ce, void 0), x(this, Fn, L ? P : null), x(this, Pe, void 0), x(this, gr, void 0), x(this, ve, void 0), x(this, Ne, null), x(this, ue, null), x(this, xe, null), x(this, kt, null), x(this, Bt, 0), x(this, xt, 0), x(this, xr, !1), x(this, jn, /* @__PURE__ */ new Set()), x(this, Vn, /* @__PURE__ */ new Set()), x(this, dt, null), x(this, Ki, Ll(() => (k(dt, this, It(d(Bt, this))), () => {
643
+ k(dt, this, null);
644
644
  }))), k(Ce, this, e), k(Pe, this, t), k(gr, this, (i) => {
645
645
  var o = M;
646
646
  o.b = this, o.f |= 128, r(i);
647
647
  }), this.parent = M.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), k(ve, this, ki(() => {
648
648
  if (L) {
649
- const i = f(Fn, this);
649
+ const i = d(Fn, this);
650
650
  sn();
651
651
  const o = i.data === "[!";
652
652
  if (i.data.startsWith("[?")) {
@@ -657,72 +657,72 @@ var Ce = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pe =
657
657
  }, Pl)), L && k(Ce, this, P);
658
658
  }
659
659
  defer_effect(e) {
660
- Xo(e, f(jn, this), f(Vn, this));
660
+ Xo(e, d(jn, this), d(Vn, this));
661
661
  }
662
662
  is_rendered() {
663
663
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
664
664
  }
665
665
  has_pending_snippet() {
666
- return !!f(Pe, this).pending;
666
+ return !!d(Pe, this).pending;
667
667
  }
668
668
  update_pending_count(e, t) {
669
- O(ne, this, ss).call(this, e, t), k(Bt, this, f(Bt, this) + e), !(!f(ft, this) || f(Er, this)) && (k(Er, this, !0), Ye(() => {
670
- k(Er, this, !1), f(ft, this) && Gt(f(ft, this), f(Bt, this));
669
+ O(ne, this, ss).call(this, e, t), k(Bt, this, d(Bt, this) + e), !(!d(dt, this) || d(xr, this)) && (k(xr, this, !0), Ye(() => {
670
+ k(xr, this, !1), d(dt, this) && Gt(d(dt, this), d(Bt, this));
671
671
  }));
672
672
  }
673
673
  get_effect_pending() {
674
- return f(Ki, this).call(this), g(f(ft, this));
674
+ return d(Ki, this).call(this), g(d(dt, this));
675
675
  }
676
676
  error(e) {
677
- if (!f(Pe, this).onerror && !f(Pe, this).failed) throw e;
678
- x?.is_fork ? (f(Ne, this) && x.skip_effect(f(Ne, this)), f(ue, this) && x.skip_effect(f(ue, this)), f(Ee, this) && x.skip_effect(f(Ee, this)), x.oncommit(() => {
677
+ if (!d(Pe, this).onerror && !d(Pe, this).failed) throw e;
678
+ E?.is_fork ? (d(Ne, this) && E.skip_effect(d(Ne, this)), d(ue, this) && E.skip_effect(d(ue, this)), d(xe, this) && E.skip_effect(d(xe, this)), E.oncommit(() => {
679
679
  O(ne, this, Xi).call(this, e);
680
680
  })) : O(ne, this, Xi).call(this, e);
681
681
  }
682
682
  };
683
683
  function Wl() {
684
684
  try {
685
- k(Ne, this, _e(() => f(gr, this).call(this, f(Ce, this))));
685
+ k(Ne, this, _e(() => d(gr, this).call(this, d(Ce, this))));
686
686
  } catch (e) {
687
687
  this.error(e);
688
688
  }
689
689
  }
690
690
  function Hl(e) {
691
- const t = f(Pe, this).failed;
692
- t && k(Ee, this, _e(() => {
693
- t(f(Ce, this), () => e, () => () => {
691
+ const t = d(Pe, this).failed;
692
+ t && k(xe, this, _e(() => {
693
+ t(d(Ce, this), () => e, () => () => {
694
694
  });
695
695
  }));
696
696
  }
697
697
  function Bl() {
698
- const e = f(Pe, this).pending;
699
- e && (this.is_pending = !0, k(ue, this, _e(() => e(f(Ce, this)))), Ye(() => {
698
+ const e = d(Pe, this).pending;
699
+ e && (this.is_pending = !0, k(ue, this, _e(() => e(d(Ce, this)))), Ye(() => {
700
700
  var t = k(kt, this, document.createDocumentFragment()), r = ye();
701
- t.append(r), k(Ne, this, O(ne, this, qn).call(this, () => _e(() => f(gr, this).call(this, r)))), f(Et, this) === 0 && (f(Ce, this).before(t), k(kt, this, null), Nt(f(ue, this), () => {
701
+ t.append(r), k(Ne, this, O(ne, this, qn).call(this, () => _e(() => d(gr, this).call(this, r)))), d(xt, this) === 0 && (d(Ce, this).before(t), k(kt, this, null), Nt(d(ue, this), () => {
702
702
  k(ue, this, null);
703
- }), O(ne, this, yi).call(this, x));
703
+ }), O(ne, this, yi).call(this, E));
704
704
  }));
705
705
  }
706
706
  function os() {
707
707
  try {
708
- if (this.is_pending = this.has_pending_snippet(), k(Et, this, 0), k(Bt, this, 0), k(Ne, this, _e(() => {
709
- f(gr, this).call(this, f(Ce, this));
710
- })), f(Et, this) > 0) {
708
+ if (this.is_pending = this.has_pending_snippet(), k(xt, this, 0), k(Bt, this, 0), k(Ne, this, _e(() => {
709
+ d(gr, this).call(this, d(Ce, this));
710
+ })), d(xt, this) > 0) {
711
711
  var e = k(kt, this, document.createDocumentFragment());
712
- xi(f(Ne, this), e);
713
- const t = f(Pe, this).pending;
714
- k(ue, this, _e(() => t(f(Ce, this))));
715
- } else O(ne, this, yi).call(this, x);
712
+ Ei(d(Ne, this), e);
713
+ const t = d(Pe, this).pending;
714
+ k(ue, this, _e(() => t(d(Ce, this))));
715
+ } else O(ne, this, yi).call(this, E);
716
716
  } catch (t) {
717
717
  this.error(t);
718
718
  }
719
719
  }
720
720
  function yi(e) {
721
- this.is_pending = !1, e.transfer_effects(f(jn, this), f(Vn, this));
721
+ this.is_pending = !1, e.transfer_effects(d(jn, this), d(Vn, this));
722
722
  }
723
723
  function qn(e) {
724
724
  var t = M, r = $, n = K;
725
- ze(f(ve, this)), Te(f(ve, this)), qt(f(ve, this).ctx);
725
+ ze(d(ve, this)), Te(d(ve, this)), qt(d(ve, this).ctx);
726
726
  try {
727
727
  return Pt.ensure(), e();
728
728
  } catch (i) {
@@ -739,22 +739,22 @@ function ss(e, t) {
739
739
  }
740
740
  return;
741
741
  }
742
- k(Et, this, f(Et, this) + e), f(Et, this) === 0 && (O(ne, this, yi).call(this, t), f(ue, this) && Nt(f(ue, this), () => {
742
+ k(xt, this, d(xt, this) + e), d(xt, this) === 0 && (O(ne, this, yi).call(this, t), d(ue, this) && Nt(d(ue, this), () => {
743
743
  k(ue, this, null);
744
- }), f(kt, this) && (f(Ce, this).before(f(kt, this)), k(kt, this, null)));
744
+ }), d(kt, this) && (d(Ce, this).before(d(kt, this)), k(kt, this, null)));
745
745
  }
746
746
  function Xi(e) {
747
- f(Ne, this) && (se(f(Ne, this)), k(Ne, this, null)), f(ue, this) && (se(f(ue, this)), k(ue, this, null)), f(Ee, this) && (se(f(Ee, this)), k(Ee, this, null)), L && (le(f(Fn, this)), Sl(), le(Br()));
748
- var t = f(Pe, this).onerror;
749
- let r = f(Pe, this).failed;
747
+ d(Ne, this) && (se(d(Ne, this)), k(Ne, this, null)), d(ue, this) && (se(d(ue, this)), k(ue, this, null)), d(xe, this) && (se(d(xe, this)), k(xe, this, null)), L && (le(d(Fn, this)), Sl(), le(Br()));
748
+ var t = d(Pe, this).onerror;
749
+ let r = d(Pe, this).failed;
750
750
  var n = !1, i = !1;
751
751
  const o = () => {
752
752
  if (n) {
753
753
  Tl();
754
754
  return;
755
755
  }
756
- n = !0, i && bl(), f(Ee, this) !== null && Nt(f(Ee, this), () => {
757
- k(Ee, this, null);
756
+ n = !0, i && bl(), d(xe, this) !== null && Nt(d(xe, this), () => {
757
+ k(xe, this, null);
758
758
  }), O(ne, this, qn).call(this, () => {
759
759
  O(ne, this, os).call(this);
760
760
  });
@@ -762,16 +762,16 @@ function Xi(e) {
762
762
  try {
763
763
  i = !0, t?.(a, o), i = !1;
764
764
  } catch (l) {
765
- lt(l, f(ve, this) && f(ve, this).parent);
765
+ lt(l, d(ve, this) && d(ve, this).parent);
766
766
  }
767
- r && k(Ee, this, O(ne, this, qn).call(this, () => {
767
+ r && k(xe, this, O(ne, this, qn).call(this, () => {
768
768
  try {
769
769
  return _e(() => {
770
770
  var l = M;
771
- l.b = this, l.f |= 128, r(f(Ce, this), () => a, () => o);
771
+ l.b = this, l.f |= 128, r(d(Ce, this), () => a, () => o);
772
772
  });
773
773
  } catch (l) {
774
- return lt(l, f(ve, this).parent), null;
774
+ return lt(l, d(ve, this).parent), null;
775
775
  }
776
776
  }));
777
777
  };
@@ -780,25 +780,25 @@ function Xi(e) {
780
780
  try {
781
781
  a = this.transform_error(e);
782
782
  } catch (l) {
783
- lt(l, f(ve, this) && f(ve, this).parent);
783
+ lt(l, d(ve, this) && d(ve, this).parent);
784
784
  return;
785
785
  }
786
- a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => lt(l, f(ve, this) && f(ve, this).parent)) : s(a);
786
+ a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => lt(l, d(ve, this) && d(ve, this).parent)) : s(a);
787
787
  });
788
788
  }
789
789
  function Dl(e, t, r, n) {
790
790
  const i = br() ? vr : bi;
791
- var o = e.filter((d) => !d.settled);
791
+ var o = e.filter((h) => !h.settled);
792
792
  if (r.length === 0 && o.length === 0) {
793
793
  n(t.map(i));
794
794
  return;
795
795
  }
796
- var s = M, a = Fl(), l = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((d) => d.promise)) : null;
797
- function c(d) {
796
+ var s = M, a = Fl(), l = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((h) => h.promise)) : null;
797
+ function c(h) {
798
798
  if ((s.f & 16384) === 0) {
799
799
  a();
800
800
  try {
801
- n(d);
801
+ n(h);
802
802
  } catch (p) {
803
803
  lt(p, s);
804
804
  }
@@ -810,25 +810,25 @@ function Dl(e, t, r, n) {
810
810
  l.then(() => c(t.map(i))).finally(u);
811
811
  return;
812
812
  }
813
- function h() {
814
- Promise.all(r.map((d) => /* @__PURE__ */ jl(d))).then((d) => c([...t.map(i), ...d])).catch((d) => lt(d, s)).finally(u);
813
+ function f() {
814
+ Promise.all(r.map((h) => /* @__PURE__ */ jl(h))).then((h) => c([...t.map(i), ...h])).catch((h) => lt(h, s)).finally(u);
815
815
  }
816
816
  l ? l.then(() => {
817
- a(), h(), Kr();
818
- }) : h();
817
+ a(), f(), Kr();
818
+ }) : f();
819
819
  }
820
820
  function Fl() {
821
- var e = M, t = $, r = K, n = x;
821
+ var e = M, t = $, r = K, n = E;
822
822
  if (0) var i;
823
823
  return function(s = !0) {
824
824
  ze(e), Te(t), qt(r), s && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
825
825
  };
826
826
  }
827
827
  function Kr(e = !0) {
828
- ze(null), Te(null), qt(null), e && x?.deactivate();
828
+ ze(null), Te(null), qt(null), e && E?.deactivate();
829
829
  }
830
830
  function as() {
831
- var e = M, t = e.b, r = x, n = !!t?.is_rendered();
831
+ var e = M, t = e.b, r = E, n = !!t?.is_rendered();
832
832
  return t?.update_pending_count(1, r), r.increment(n, e), () => {
833
833
  t?.update_pending_count(-1, r), r.decrement(n, e);
834
834
  };
@@ -851,7 +851,7 @@ function vr(e) {
851
851
  ac: null
852
852
  };
853
853
  }
854
- var xr = /* @__PURE__ */ Symbol("obsolete");
854
+ var Er = /* @__PURE__ */ Symbol("obsolete");
855
855
  // @__NO_SIDE_EFFECTS__
856
856
  function jl(e, t, r) {
857
857
  let n = M;
@@ -867,25 +867,25 @@ function jl(e, t, r) {
867
867
  } catch (p) {
868
868
  c.reject(p), Kr();
869
869
  }
870
- var u = x;
870
+ var u = E;
871
871
  if (s) {
872
- if ((l.f & 32768) !== 0) var h = as();
873
- if (n.b?.is_rendered()) u.async_deriveds.get(l)?.reject(xr);
874
- else for (const p of a.values()) p.reject(xr);
872
+ if ((l.f & 32768) !== 0) var f = as();
873
+ if (n.b?.is_rendered()) u.async_deriveds.get(l)?.reject(Er);
874
+ else for (const p of a.values()) p.reject(Er);
875
875
  a.add(c), u.async_deriveds.set(l, c);
876
876
  }
877
- const d = (p, v = void 0) => {
878
- h?.(), a.delete(c), v !== xr && (u.activate(), v ? (o.f |= Hr, Gt(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= Hr), Gt(o, p)), u.deactivate());
877
+ const h = (p, v = void 0) => {
878
+ f?.(), a.delete(c), v !== Er && (u.activate(), v ? (o.f |= Hr, Gt(o, v)) : ((o.f & 8388608) !== 0 && (o.f ^= Hr), Gt(o, p)), u.deactivate());
879
879
  };
880
- c.promise.then(d, (p) => d(null, p || "unknown"));
880
+ c.promise.then(h, (p) => h(null, p || "unknown"));
881
881
  }), bs(() => {
882
- for (const l of a) l.reject(xr);
882
+ for (const l of a) l.reject(Er);
883
883
  }), new Promise((l) => {
884
884
  function c(u) {
885
- function h() {
885
+ function f() {
886
886
  u === i ? l(o) : c(i);
887
887
  }
888
- u.then(h, h);
888
+ u.then(f, f);
889
889
  }
890
890
  c(i);
891
891
  });
@@ -893,7 +893,7 @@ function jl(e, t, r) {
893
893
  // @__NO_SIDE_EFFECTS__
894
894
  function er(e) {
895
895
  const t = /* @__PURE__ */ vr(e);
896
- return Me || xs(t), t;
896
+ return Me || Es(t), t;
897
897
  }
898
898
  // @__NO_SIDE_EFFECTS__
899
899
  function bi(e) {
@@ -921,21 +921,21 @@ function _i(e) {
921
921
  }
922
922
  function ls(e) {
923
923
  var t = _i(e);
924
- if (!e.equals(t) && (e.wv = As(), (!x?.is_fork || e.deps === null) && (x !== null ? (x.capture(e, t, !0), Fr?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
925
- V(e, be);
924
+ if (!e.equals(t) && (e.wv = As(), (!E?.is_fork || e.deps === null) && (E !== null ? (E.capture(e, t, !0), Fr?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
925
+ q(e, be);
926
926
  return;
927
927
  }
928
- Ke || (oe !== null ? (wi() || x?.is_fork) && oe.set(e, t) : pi(e));
928
+ Ke || (oe !== null ? (wi() || E?.is_fork) && oe.set(e, t) : pi(e));
929
929
  }
930
930
  function ql(e) {
931
931
  if (e.effects !== null)
932
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(nn), t.fn !== null && (t.teardown = el), t.ac = null, mr(t, 0), Ei(t));
932
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(nn), t.fn !== null && (t.teardown = el), t.ac = null, mr(t, 0), xi(t));
933
933
  }
934
934
  function cs(e) {
935
935
  if (e.effects !== null)
936
936
  for (const t of e.effects) t.teardown && t.fn !== null && Yt(t);
937
937
  }
938
- var Xr = /* @__PURE__ */ new Set(), xt = /* @__PURE__ */ new Map();
938
+ var Xr = /* @__PURE__ */ new Set(), Et = /* @__PURE__ */ new Map();
939
939
  var us = !1;
940
940
  function It(e, t) {
941
941
  var r = {
@@ -949,9 +949,9 @@ function It(e, t) {
949
949
  return r;
950
950
  }
951
951
  // @__NO_SIDE_EFFECTS__
952
- function U(e, t) {
952
+ function G(e, t) {
953
953
  const r = It(e, t);
954
- return xs(r), r;
954
+ return Es(r), r;
955
955
  }
956
956
  // @__NO_SIDE_EFFECTS__
957
957
  function hs(e, t = !1, r = !0) {
@@ -963,26 +963,26 @@ function hs(e, t = !1, r = !0) {
963
963
  return n;
964
964
  }
965
965
  function A(e, t, r = !1) {
966
- $ !== null && (!xe || ($.f & 131072) !== 0) && br() && ($.f & 4325394) !== 0 && (Ae === null || !Ae.has(e)) && yl();
966
+ $ !== null && (!Ee || ($.f & 131072) !== 0) && br() && ($.f & 4325394) !== 0 && (Ae === null || !Ae.has(e)) && yl();
967
967
  let n = r ? ct(t) : t;
968
968
  return Gt(e, n, jr);
969
969
  }
970
970
  function Gt(e, t, r = null) {
971
971
  if (!e.equals(t)) {
972
- xt.set(e, Ke ? t : e.v);
972
+ Et.set(e, Ke ? t : e.v);
973
973
  var n = Pt.ensure();
974
974
  if (n.capture(e, t), (e.f & 2) !== 0) {
975
975
  const i = e;
976
976
  (e.f & 2048) !== 0 && _i(i), oe === null && pi(i);
977
977
  }
978
- e.wv = As(), ds(e, Se, r), br() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (pe === null ? sc([e]) : pe.push(e)), !n.is_fork && Xr.size > 0 && !us && Ul();
978
+ e.wv = As(), fs(e, Se, r), br() && M !== null && (M.f & 1024) !== 0 && (M.f & 96) === 0 && (pe === null ? sc([e]) : pe.push(e)), !n.is_fork && Xr.size > 0 && !us && Ul();
979
979
  }
980
980
  return t;
981
981
  }
982
982
  function Ul() {
983
983
  us = !1;
984
984
  for (const e of Xr) {
985
- (e.f & 1024) !== 0 && V(e, Lt);
985
+ (e.f & 1024) !== 0 && q(e, Lt);
986
986
  let t;
987
987
  try {
988
988
  t = _r(e);
@@ -1000,20 +1000,20 @@ function Gl(e, t = 1) {
1000
1000
  function pr(e) {
1001
1001
  A(e, e.v + 1);
1002
1002
  }
1003
- function ds(e, t, r) {
1003
+ function fs(e, t, r) {
1004
1004
  var n = e.reactions;
1005
1005
  if (n !== null)
1006
1006
  for (var i = br(), o = n.length, s = 0; s < o; s++) {
1007
1007
  var a = n[s], l = a.f;
1008
1008
  if (!(!i && a === M)) {
1009
1009
  var c = (l & Se) === 0;
1010
- if (c && V(a, t), (l & 131072) !== 0) Xr.add(a);
1010
+ if (c && q(a, t), (l & 131072) !== 0) Xr.add(a);
1011
1011
  else if ((l & 2) !== 0) {
1012
1012
  var u = a;
1013
- oe?.delete(u), (l & 65536) === 0 && (l & 512 && (M === null || (M.f & 2097152) === 0) && (a.f |= yr), ds(u, Lt, r));
1013
+ oe?.delete(u), (l & 65536) === 0 && (l & 512 && (M === null || (M.f & 2097152) === 0) && (a.f |= yr), fs(u, Lt, r));
1014
1014
  } else if (c) {
1015
- var h = a;
1016
- (l & 16) !== 0 && Le !== null && Le.add(h), r !== null ? r.push(h) : mi(h);
1015
+ var f = a;
1016
+ (l & 16) !== 0 && Le !== null && Le.add(f), r !== null ? r.push(f) : mi(f);
1017
1017
  }
1018
1018
  }
1019
1019
  }
@@ -1023,62 +1023,62 @@ function ct(e) {
1023
1023
  if (typeof e != "object" || e === null || hr in e) return e;
1024
1024
  const t = Ho(e);
1025
1025
  if (t !== Qa && t !== Za) return e;
1026
- var r = /* @__PURE__ */ new Map(), n = Wo(e), i = /* @__PURE__ */ U(0), o = null, s = Ct, a = (h) => {
1027
- if (Ct === s) return h();
1028
- var d = $, p = Ct;
1026
+ var r = /* @__PURE__ */ new Map(), n = Wo(e), i = /* @__PURE__ */ G(0), o = null, s = Ct, a = (f) => {
1027
+ if (Ct === s) return f();
1028
+ var h = $, p = Ct;
1029
1029
  Te(null), to(s);
1030
- var v = h();
1031
- return Te(d), to(p), v;
1030
+ var v = f();
1031
+ return Te(h), to(p), v;
1032
1032
  };
1033
- n && r.set("length", /* @__PURE__ */ U(e.length, o));
1033
+ n && r.set("length", /* @__PURE__ */ G(e.length, o));
1034
1034
  var l = "";
1035
1035
  let c = !1;
1036
- function u(h) {
1036
+ function u(f) {
1037
1037
  if (!c) {
1038
- c = !0, l = h, Ui(i, `${l} version`);
1039
- for (const [d, p] of r) Ui(p, Kl(l, d));
1038
+ c = !0, l = f, Ui(i, `${l} version`);
1039
+ for (const [h, p] of r) Ui(p, Kl(l, h));
1040
1040
  c = !1;
1041
1041
  }
1042
1042
  }
1043
1043
  return new Proxy(e, {
1044
- defineProperty(h, d, p) {
1044
+ defineProperty(f, h, p) {
1045
1045
  (!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) && vl();
1046
- var v = r.get(d);
1046
+ var v = r.get(h);
1047
1047
  return v === void 0 ? a(() => {
1048
- var b = /* @__PURE__ */ U(p.value, o);
1049
- return r.set(d, b), b;
1048
+ var b = /* @__PURE__ */ G(p.value, o);
1049
+ return r.set(h, b), b;
1050
1050
  }) : A(v, p.value, !0), !0;
1051
1051
  },
1052
- deleteProperty(h, d) {
1053
- var p = r.get(d);
1052
+ deleteProperty(f, h) {
1053
+ var p = r.get(h);
1054
1054
  if (p === void 0) {
1055
- if (d in h) {
1056
- const v = a(() => /* @__PURE__ */ U(J, o));
1057
- r.set(d, v), pr(i);
1055
+ if (h in f) {
1056
+ const v = a(() => /* @__PURE__ */ G(J, o));
1057
+ r.set(h, v), pr(i);
1058
1058
  }
1059
1059
  } else
1060
1060
  A(p, J), pr(i);
1061
1061
  return !0;
1062
1062
  },
1063
- get(h, d, p) {
1064
- if (d === hr) return e;
1065
- var v = r.get(d), b = d in h;
1066
- if (v === void 0 && (!b || St(h, d)?.writable) && (v = a(() => {
1067
- var _ = /* @__PURE__ */ U(ct(b ? h[d] : J), o);
1063
+ get(f, h, p) {
1064
+ if (h === hr) return e;
1065
+ var v = r.get(h), b = h in f;
1066
+ if (v === void 0 && (!b || St(f, h)?.writable) && (v = a(() => {
1067
+ var _ = /* @__PURE__ */ G(ct(b ? f[h] : J), o);
1068
1068
  return _;
1069
- }), r.set(d, v)), v !== void 0) {
1069
+ }), r.set(h, v)), v !== void 0) {
1070
1070
  var m = g(v);
1071
1071
  return m === J ? void 0 : m;
1072
1072
  }
1073
- return Reflect.get(h, d, p);
1073
+ return Reflect.get(f, h, p);
1074
1074
  },
1075
- getOwnPropertyDescriptor(h, d) {
1076
- var p = Reflect.getOwnPropertyDescriptor(h, d);
1075
+ getOwnPropertyDescriptor(f, h) {
1076
+ var p = Reflect.getOwnPropertyDescriptor(f, h);
1077
1077
  if (p && "value" in p) {
1078
- var v = r.get(d);
1078
+ var v = r.get(h);
1079
1079
  v && (p.value = g(v));
1080
1080
  } else if (p === void 0) {
1081
- var b = r.get(d), m = b?.v;
1081
+ var b = r.get(h), m = b?.v;
1082
1082
  if (b !== void 0 && m !== J) return {
1083
1083
  enumerable: !0,
1084
1084
  configurable: !0,
@@ -1088,45 +1088,45 @@ function ct(e) {
1088
1088
  }
1089
1089
  return p;
1090
1090
  },
1091
- has(h, d) {
1092
- if (d === hr) return !0;
1093
- var p = r.get(d), v = p !== void 0 && p.v !== J || Reflect.has(h, d);
1094
- return (p !== void 0 || M !== null && (!v || St(h, d)?.writable)) && (p === void 0 && (p = a(() => {
1095
- var b = /* @__PURE__ */ U(v ? ct(h[d]) : J, o);
1091
+ has(f, h) {
1092
+ if (h === hr) return !0;
1093
+ var p = r.get(h), v = p !== void 0 && p.v !== J || Reflect.has(f, h);
1094
+ return (p !== void 0 || M !== null && (!v || St(f, h)?.writable)) && (p === void 0 && (p = a(() => {
1095
+ var b = /* @__PURE__ */ G(v ? ct(f[h]) : J, o);
1096
1096
  return b;
1097
- }), r.set(d, p)), g(p) === J) ? !1 : v;
1097
+ }), r.set(h, p)), g(p) === J) ? !1 : v;
1098
1098
  },
1099
- set(h, d, p, v) {
1100
- var b = r.get(d), m = d in h;
1101
- if (n && d === "length") for (var _ = p; _ < b.v; _ += 1) {
1099
+ set(f, h, p, v) {
1100
+ var b = r.get(h), m = h in f;
1101
+ if (n && h === "length") for (var _ = p; _ < b.v; _ += 1) {
1102
1102
  var N = r.get(_ + "");
1103
- N !== void 0 ? A(N, J) : _ in h && (N = a(() => /* @__PURE__ */ U(J, o)), r.set(_ + "", N));
1103
+ N !== void 0 ? A(N, J) : _ in f && (N = a(() => /* @__PURE__ */ G(J, o)), r.set(_ + "", N));
1104
1104
  }
1105
1105
  if (b === void 0)
1106
- (!m || St(h, d)?.writable) && (b = a(() => /* @__PURE__ */ U(void 0, o)), A(b, ct(p)), r.set(d, b));
1106
+ (!m || St(f, h)?.writable) && (b = a(() => /* @__PURE__ */ G(void 0, o)), A(b, ct(p)), r.set(h, b));
1107
1107
  else {
1108
1108
  m = b.v !== J;
1109
1109
  var B = a(() => ct(p));
1110
1110
  A(b, B);
1111
1111
  }
1112
- var S = Reflect.getOwnPropertyDescriptor(h, d);
1112
+ var S = Reflect.getOwnPropertyDescriptor(f, h);
1113
1113
  if (S?.set && S.set.call(v, p), !m) {
1114
- if (n && typeof d == "string") {
1115
- var F = r.get("length"), j = Number(d);
1114
+ if (n && typeof h == "string") {
1115
+ var F = r.get("length"), j = Number(h);
1116
1116
  Number.isInteger(j) && j >= F.v && A(F, j + 1);
1117
1117
  }
1118
1118
  pr(i);
1119
1119
  }
1120
1120
  return !0;
1121
1121
  },
1122
- ownKeys(h) {
1122
+ ownKeys(f) {
1123
1123
  g(i);
1124
- var d = Reflect.ownKeys(h).filter((b) => {
1124
+ var h = Reflect.ownKeys(f).filter((b) => {
1125
1125
  var m = r.get(b);
1126
1126
  return m === void 0 || m.v !== J;
1127
1127
  });
1128
- for (var [p, v] of r) v.v !== J && !(p in h) && d.push(p);
1129
- return d;
1128
+ for (var [p, v] of r) v.v !== J && !(p in f) && h.push(p);
1129
+ return h;
1130
1130
  },
1131
1131
  setPrototypeOf() {
1132
1132
  ml();
@@ -1136,10 +1136,10 @@ function ct(e) {
1136
1136
  function Kl(e, t) {
1137
1137
  return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Yl.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1138
1138
  }
1139
- var Ji, Xl, fs, ps, gs;
1139
+ var Ji, Xl, ds, ps, gs;
1140
1140
  function Un() {
1141
1141
  if (Ji === void 0) {
1142
- Ji = window, Xl = document, fs = /Firefox/.test(navigator.userAgent);
1142
+ Ji = window, Xl = document, ds = /Firefox/.test(navigator.userAgent);
1143
1143
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1144
1144
  ps = St(t, "firstChild").get, gs = St(t, "nextSibling").get, ji(e) && (e[Wn] = void 0, e[zn] = null, e[Hn] = void 0, e.__e = void 0), ji(r) && (r[Or] = void 0);
1145
1145
  }
@@ -1197,7 +1197,7 @@ function vs(e) {
1197
1197
  e.textContent = "";
1198
1198
  }
1199
1199
  function ms() {
1200
- return !Me || Le !== null ? !1 : (M.f & di) !== 0;
1200
+ return !Me || Le !== null ? !1 : (M.f & fi) !== 0;
1201
1201
  }
1202
1202
  function Ti(e, t, r) {
1203
1203
  return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
@@ -1212,7 +1212,7 @@ var Qi = !1;
1212
1212
  function ys() {
1213
1213
  Qi || (Qi = !0, document.addEventListener("reset", (e) => {
1214
1214
  Promise.resolve().then(() => {
1215
- if (!e.defaultPrevented) for (const t of e.target.elements) t[dr]?.();
1215
+ if (!e.defaultPrevented) for (const t of e.target.elements) t[fr]?.();
1216
1216
  });
1217
1217
  }, { capture: !0 }));
1218
1218
  }
@@ -1227,13 +1227,13 @@ function ln(e) {
1227
1227
  }
1228
1228
  function Jl(e, t, r, n = r) {
1229
1229
  e.addEventListener(t, () => ln(r));
1230
- const i = e[dr];
1231
- i ? e[dr] = () => {
1230
+ const i = e[fr];
1231
+ i ? e[fr] = () => {
1232
1232
  i(), n(!0);
1233
- } : e[dr] = () => n(!0), ys();
1233
+ } : e[fr] = () => n(!0), ys();
1234
1234
  }
1235
1235
  function Ql(e) {
1236
- M === null && ($ === null && dl(e), hl()), Ke && ul(e);
1236
+ M === null && ($ === null && fl(e), hl()), Ke && ul(e);
1237
1237
  }
1238
1238
  function Zl(e, t) {
1239
1239
  var r = t.last;
@@ -1258,7 +1258,7 @@ function He(e, t) {
1258
1258
  wv: 0,
1259
1259
  ac: null
1260
1260
  };
1261
- x?.register_created_effect(n);
1261
+ E?.register_created_effect(n);
1262
1262
  var i = n;
1263
1263
  if ((e & 4) !== 0) Ut !== null ? Ut.push(n) : Pt.ensure().schedule(n);
1264
1264
  else if (t !== null) {
@@ -1267,7 +1267,7 @@ function He(e, t) {
1267
1267
  } catch (s) {
1268
1268
  throw se(n), s;
1269
1269
  }
1270
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= fi));
1270
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= di));
1271
1271
  }
1272
1272
  if (i !== null && (i.parent = r, r !== null && Zl(i, r), $ !== null && ($.f & 2) !== 0 && (e & 64) === 0)) {
1273
1273
  var o = $;
@@ -1276,11 +1276,11 @@ function He(e, t) {
1276
1276
  return n;
1277
1277
  }
1278
1278
  function wi() {
1279
- return $ !== null && !xe;
1279
+ return $ !== null && !Ee;
1280
1280
  }
1281
1281
  function bs(e) {
1282
1282
  const t = He(8, null);
1283
- return V(t, be), t.teardown = e, t;
1283
+ return q(t, be), t.teardown = e, t;
1284
1284
  }
1285
1285
  function Zi(e) {
1286
1286
  Ql("$effect");
@@ -1342,7 +1342,7 @@ function Ss(e) {
1342
1342
  }
1343
1343
  }
1344
1344
  }
1345
- function Ei(e, t = !1) {
1345
+ function xi(e, t = !1) {
1346
1346
  var r = e.first;
1347
1347
  for (e.first = e.last = null; r !== null; ) {
1348
1348
  const i = r.ac;
@@ -1361,7 +1361,7 @@ function nc(e) {
1361
1361
  }
1362
1362
  function se(e, t = !0) {
1363
1363
  var r = !1;
1364
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ic(e.nodes.start, e.nodes.end), r = !0), V(e, Vi), Ei(e, t && !r), mr(e, 0);
1364
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ic(e.nodes.start, e.nodes.end), r = !0), q(e, Vi), xi(e, t && !r), mr(e, 0);
1365
1365
  var n = e.nodes && e.nodes.t;
1366
1366
  if (n !== null) for (const o of n) o.stop();
1367
1367
  Ss(e), e.f ^= Vi, e.f |= rl;
@@ -1406,21 +1406,21 @@ function ks(e, t, r) {
1406
1406
  }
1407
1407
  }
1408
1408
  function Jr(e) {
1409
- Es(e, !0);
1409
+ xs(e, !0);
1410
1410
  }
1411
- function Es(e, t) {
1411
+ function xs(e, t) {
1412
1412
  if ((e.f & 8192) !== 0) {
1413
- e.f ^= hi, (e.f & 1024) === 0 && (V(e, Se), Pt.ensure().schedule(e));
1413
+ e.f ^= hi, (e.f & 1024) === 0 && (q(e, Se), Pt.ensure().schedule(e));
1414
1414
  for (var r = e.first; r !== null; ) {
1415
1415
  var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1416
- Es(r, i ? t : !1), r = n;
1416
+ xs(r, i ? t : !1), r = n;
1417
1417
  }
1418
1418
  var o = e.nodes && e.nodes.t;
1419
1419
  if (o !== null)
1420
1420
  for (const s of o) (s.is_global || t) && s.in();
1421
1421
  }
1422
1422
  }
1423
- function xi(e, t) {
1423
+ function Ei(e, t) {
1424
1424
  if (e.nodes)
1425
1425
  for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
1426
1426
  var i = r === n ? null : /* @__PURE__ */ We(r);
@@ -1431,7 +1431,7 @@ var oc = null, Rr = !1, Ke = !1;
1431
1431
  function eo(e) {
1432
1432
  Ke = e;
1433
1433
  }
1434
- var $ = null, xe = !1;
1434
+ var $ = null, Ee = !1;
1435
1435
  function Te(e) {
1436
1436
  $ = e;
1437
1437
  }
@@ -1440,7 +1440,7 @@ function ze(e) {
1440
1440
  M = e;
1441
1441
  }
1442
1442
  var Ae = null;
1443
- function xs(e) {
1443
+ function Es(e) {
1444
1444
  $ !== null && (!Me || ($.f & 2) !== 0) && (Ae ?? (Ae = /* @__PURE__ */ new Set())).add(e);
1445
1445
  }
1446
1446
  var ae = null, ce = 0, pe = null;
@@ -1462,7 +1462,7 @@ function _r(e) {
1462
1462
  var o = r[i];
1463
1463
  if (_r(o) && ls(o), o.wv > e.wv) return !0;
1464
1464
  }
1465
- (t & 512) !== 0 && oe === null && V(e, be);
1465
+ (t & 512) !== 0 && oe === null && q(e, be);
1466
1466
  }
1467
1467
  return !1;
1468
1468
  }
@@ -1471,40 +1471,40 @@ function Ms(e, t, r = !0) {
1471
1471
  if (n !== null && !(!Me && Ae !== null && Ae.has(e)))
1472
1472
  for (var i = 0; i < n.length; i++) {
1473
1473
  var o = n[i];
1474
- (o.f & 2) !== 0 ? Ms(o, t, !1) : t === o && (r ? V(o, Se) : (o.f & 1024) !== 0 && V(o, Lt), mi(o));
1474
+ (o.f & 2) !== 0 ? Ms(o, t, !1) : t === o && (r ? q(o, Se) : (o.f & 1024) !== 0 && q(o, Lt), mi(o));
1475
1475
  }
1476
1476
  }
1477
1477
  function Os(e) {
1478
- var t = ae, r = ce, n = pe, i = $, o = Ae, s = K, a = xe, l = Ct, c = e.f;
1479
- ae = null, ce = 0, pe = null, $ = (c & 96) === 0 ? e : null, Ae = null, qt(e.ctx), xe = !1, Ct = ++_t, e.ac !== null && (ln(() => {
1478
+ var t = ae, r = ce, n = pe, i = $, o = Ae, s = K, a = Ee, l = Ct, c = e.f;
1479
+ ae = null, ce = 0, pe = null, $ = (c & 96) === 0 ? e : null, Ae = null, qt(e.ctx), Ee = !1, Ct = ++_t, e.ac !== null && (ln(() => {
1480
1480
  e.ac.abort(nn);
1481
1481
  }), e.ac = null);
1482
1482
  try {
1483
1483
  e.f |= qi;
1484
- var u = e.fn, h = u();
1485
- e.f |= di;
1486
- var d = e.deps, p = x?.is_fork;
1484
+ var u = e.fn, f = u();
1485
+ e.f |= fi;
1486
+ var h = e.deps, p = E?.is_fork;
1487
1487
  if (ae !== null) {
1488
1488
  var v;
1489
- if (p || mr(e, ce), d !== null && ce > 0)
1490
- for (d.length = ce + ae.length, v = 0; v < ae.length; v++) d[ce + v] = ae[v];
1491
- else e.deps = d = ae;
1492
- if (wi() && (e.f & 512) !== 0) for (v = ce; v < d.length; v++) {
1489
+ if (p || mr(e, ce), h !== null && ce > 0)
1490
+ for (h.length = ce + ae.length, v = 0; v < ae.length; v++) h[ce + v] = ae[v];
1491
+ else e.deps = h = ae;
1492
+ if (wi() && (e.f & 512) !== 0) for (v = ce; v < h.length; v++) {
1493
1493
  var b;
1494
- ((b = d[v]).reactions ?? (b.reactions = [])).push(e);
1494
+ ((b = h[v]).reactions ?? (b.reactions = [])).push(e);
1495
1495
  }
1496
- } else !p && d !== null && ce < d.length && (mr(e, ce), d.length = ce);
1497
- if (br() && pe !== null && !xe && d !== null && (e.f & 6146) === 0) for (v = 0; v < pe.length; v++) Ms(pe[v], e);
1496
+ } else !p && h !== null && ce < h.length && (mr(e, ce), h.length = ce);
1497
+ if (br() && pe !== null && !Ee && h !== null && (e.f & 6146) === 0) for (v = 0; v < pe.length; v++) Ms(pe[v], e);
1498
1498
  if (i !== null && i !== e) {
1499
1499
  if (_t++, i.deps !== null) for (let m = 0; m < r; m += 1) i.deps[m].rv = _t;
1500
1500
  if (t !== null) for (const m of t) m.rv = _t;
1501
1501
  pe !== null && (n === null ? n = pe : n.push(...pe));
1502
1502
  }
1503
- return (e.f & 8388608) !== 0 && (e.f ^= Hr), h;
1503
+ return (e.f & 8388608) !== 0 && (e.f ^= Hr), f;
1504
1504
  } catch (m) {
1505
1505
  return Yo(m);
1506
1506
  } finally {
1507
- e.f ^= qi, ae = t, ce = r, pe = n, $ = i, Ae = o, qt(s), xe = a, Ct = l;
1507
+ e.f ^= qi, ae = t, ce = r, pe = n, $ = i, Ae = o, qt(s), Ee = a, Ct = l;
1508
1508
  }
1509
1509
  }
1510
1510
  function ac(e, t) {
@@ -1529,12 +1529,12 @@ function mr(e, t) {
1529
1529
  function Yt(e) {
1530
1530
  var t = e.f;
1531
1531
  if ((t & 16384) === 0) {
1532
- V(e, be);
1532
+ q(e, be);
1533
1533
  var r = M, n = Rr;
1534
1534
  if (M = e, Rr = !0, 0)
1535
1535
  var i, o;
1536
1536
  try {
1537
- (t & 16777232) !== 0 ? nc(e) : Ei(e), Ss(e);
1537
+ (t & 16777232) !== 0 ? nc(e) : xi(e), Ss(e);
1538
1538
  var s = Os(e);
1539
1539
  if (e.teardown = typeof s == "function" ? s : null, e.wv = Cs, 0)
1540
1540
  for (var a of e.deps) ;
@@ -1551,7 +1551,7 @@ async function lc() {
1551
1551
  }
1552
1552
  function g(e) {
1553
1553
  var t = (e.f & 2) !== 0;
1554
- if (oc?.add(e), $ !== null && !xe && !(M !== null && (M.f & 16384) !== 0) && (Ae === null || !Ae.has(e))) {
1554
+ if (oc?.add(e), $ !== null && !Ee && !(M !== null && (M.f & 16384) !== 0) && (Ae === null || !Ae.has(e))) {
1555
1555
  var r = $.deps;
1556
1556
  if (($.f & 2097152) !== 0)
1557
1557
  e.rv < _t && (e.rv = _t, ae === null && r !== null && r[ce] === e ? ce++ : ae === null ? ae = [e] : ae.push(e));
@@ -1563,22 +1563,22 @@ function g(e) {
1563
1563
  }
1564
1564
  }
1565
1565
  if (0) {
1566
- if (!xe && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1566
+ if (!Ee && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1567
1567
  var o;
1568
- if (tracing_mode_flag && !xe && tracing_expressions !== null && $ !== null && tracing_expressions.reaction === $ && !e.trace) {
1568
+ if (tracing_mode_flag && !Ee && tracing_expressions !== null && $ !== null && tracing_expressions.reaction === $ && !e.trace) {
1569
1569
  if (o)
1570
1570
  var s, a;
1571
1571
  }
1572
1572
  }
1573
- if (Ke && xt.has(e)) return xt.get(e);
1573
+ if (Ke && Et.has(e)) return Et.get(e);
1574
1574
  if (t) {
1575
1575
  var l = e;
1576
1576
  if (Ke) {
1577
1577
  var c = l.v;
1578
- return ((l.f & 1024) === 0 && l.reactions !== null || Rs(l)) && (c = _i(l)), xt.set(l, c), c;
1578
+ return ((l.f & 1024) === 0 && l.reactions !== null || Rs(l)) && (c = _i(l)), Et.set(l, c), c;
1579
1579
  }
1580
- var u = (l.f & 512) === 0 && !xe && $ !== null && (Rr || ($.f & 512) !== 0), h = (l.f & di) === 0;
1581
- _r(l) && (u && (l.f |= 512), ls(l)), u && !h && (cs(l), Is(l));
1580
+ var u = (l.f & 512) === 0 && !Ee && $ !== null && (Rr || ($.f & 512) !== 0), f = (l.f & fi) === 0;
1581
+ _r(l) && (u && (l.f |= 512), ls(l)), u && !f && (cs(l), Is(l));
1582
1582
  }
1583
1583
  if (oe?.has(e)) return oe.get(e);
1584
1584
  if ((e.f & 8388608) !== 0) throw e.v;
@@ -1593,15 +1593,15 @@ function Rs(e) {
1593
1593
  if (e.v === J) return !0;
1594
1594
  if (e.deps === null) return !1;
1595
1595
  for (const t of e.deps)
1596
- if (xt.has(t) || (t.f & 2) !== 0 && Rs(t)) return !0;
1596
+ if (Et.has(t) || (t.f & 2) !== 0 && Rs(t)) return !0;
1597
1597
  return !1;
1598
1598
  }
1599
1599
  function un(e) {
1600
- var t = xe;
1600
+ var t = Ee;
1601
1601
  try {
1602
- return xe = !0, e();
1602
+ return Ee = !0, e();
1603
1603
  } finally {
1604
- xe = t;
1604
+ Ee = t;
1605
1605
  }
1606
1606
  }
1607
1607
  var Ft = /* @__PURE__ */ Symbol("events"), $s = /* @__PURE__ */ new Set(), Gn = /* @__PURE__ */ new Set();
@@ -1651,37 +1651,37 @@ function Yn(e) {
1651
1651
  return o || r;
1652
1652
  }
1653
1653
  });
1654
- var u = $, h = M;
1654
+ var u = $, f = M;
1655
1655
  Te(null), ze(null);
1656
1656
  try {
1657
- for (var d, p = []; o !== null && o !== t; ) {
1657
+ for (var h, p = []; o !== null && o !== t; ) {
1658
1658
  try {
1659
1659
  var v = o[Ft]?.[n];
1660
1660
  v != null && (!o.disabled || e.target === o) && v.call(o, e);
1661
1661
  } catch (b) {
1662
- d ? p.push(b) : d = b;
1662
+ h ? p.push(b) : h = b;
1663
1663
  }
1664
1664
  if (e.cancelBubble) break;
1665
1665
  s++, o = s < i.length ? i[s] : null;
1666
1666
  }
1667
- if (d) {
1667
+ if (h) {
1668
1668
  for (let b of p) queueMicrotask(() => {
1669
1669
  throw b;
1670
1670
  });
1671
- throw d;
1671
+ throw h;
1672
1672
  }
1673
1673
  } finally {
1674
- e[Ft] = t, delete e.currentTarget, Te(u), ze(h);
1674
+ e[Ft] = t, delete e.currentTarget, Te(u), ze(f);
1675
1675
  }
1676
1676
  }
1677
1677
  }
1678
- var dc = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1679
- function fc(e) {
1680
- return dc?.createHTML(e) ?? e;
1678
+ var fc = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1679
+ function dc(e) {
1680
+ return fc?.createHTML(e) ?? e;
1681
1681
  }
1682
1682
  function Ls(e) {
1683
1683
  var t = Ti("template");
1684
- return t.innerHTML = fc(e.replaceAll("<!>", "<!---->")), t.content;
1684
+ return t.innerHTML = dc(e.replaceAll("<!>", "<!---->")), t.content;
1685
1685
  }
1686
1686
  function Ge(e, t) {
1687
1687
  var r = M;
@@ -1699,7 +1699,7 @@ function Ps(e, t) {
1699
1699
  if (L)
1700
1700
  return Ge(P, null), P;
1701
1701
  i === void 0 && (i = Ls(o ? e : "<!>" + e), r || (i = /* @__PURE__ */ me(i)));
1702
- var s = n || fs ? document.importNode(i, !0) : i.cloneNode(!0);
1702
+ var s = n || ds ? document.importNode(i, !0) : i.cloneNode(!0);
1703
1703
  if (r) {
1704
1704
  var a = /* @__PURE__ */ me(s), l = s.lastChild;
1705
1705
  Ge(a, l);
@@ -1774,7 +1774,7 @@ var gc = [
1774
1774
  "defer",
1775
1775
  "disablepictureinpicture",
1776
1776
  "disableremoteplayback"
1777
- ], bf = [
1777
+ ], bd = [
1778
1778
  ...gc,
1779
1779
  "formNoValidate",
1780
1780
  "isMap",
@@ -1799,7 +1799,7 @@ var yc = [
1799
1799
  "$state.raw",
1800
1800
  "$derived",
1801
1801
  "$derived.by"
1802
- ], _f = [
1802
+ ], _d = [
1803
1803
  ...yc,
1804
1804
  "$state.eager",
1805
1805
  "$state.snapshot",
@@ -1856,11 +1856,11 @@ function zs(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
1856
1856
  throw on(), Vt;
1857
1857
  Uo();
1858
1858
  }, a);
1859
- var h = /* @__PURE__ */ new Set(), d = (p) => {
1859
+ var f = /* @__PURE__ */ new Set(), h = (p) => {
1860
1860
  for (var v = 0; v < p.length; v++) {
1861
1861
  var b = p[v];
1862
- if (!h.has(b)) {
1863
- h.add(b);
1862
+ if (!f.has(b)) {
1863
+ f.add(b);
1864
1864
  var m = mc(b);
1865
1865
  for (const B of [t, document]) {
1866
1866
  var _ = Cr.get(B);
@@ -1871,12 +1871,12 @@ function zs(e, { target: t, anchor: r, props: n = {}, events: i, context: o, int
1871
1871
  }
1872
1872
  }
1873
1873
  };
1874
- return d(rn($s)), Gn.add(d), () => {
1875
- for (var p of h) for (const m of [t, document]) {
1874
+ return h(rn($s)), Gn.add(h), () => {
1875
+ for (var p of f) for (const m of [t, document]) {
1876
1876
  var v = Cr.get(m), b = v.get(p);
1877
1877
  --b == 0 ? (m.removeEventListener(p, Yn), v.delete(p), v.size === 0 && Cr.delete(m)) : v.set(p, b);
1878
1878
  }
1879
- Gn.delete(d), u !== r && u.parentNode?.removeChild(u);
1879
+ Gn.delete(h), u !== r && u.parentNode?.removeChild(u);
1880
1880
  };
1881
1881
  });
1882
1882
  return Kn.set(l, c), l;
@@ -1888,62 +1888,62 @@ function Tc(e, t) {
1888
1888
  }
1889
1889
  var Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(), Sc = class {
1890
1890
  constructor(e, t = !0) {
1891
- y(this, "anchor", void 0), E(this, Ve, /* @__PURE__ */ new Map()), E(this, nt, /* @__PURE__ */ new Map()), E(this, ke, /* @__PURE__ */ new Map()), E(this, tr, /* @__PURE__ */ new Set()), E(this, wn, !0), E(this, kn, (r) => {
1892
- if (f(Ve, this).has(r)) {
1893
- var n = f(Ve, this).get(r), i = f(nt, this).get(n);
1891
+ y(this, "anchor", void 0), x(this, Ve, /* @__PURE__ */ new Map()), x(this, nt, /* @__PURE__ */ new Map()), x(this, ke, /* @__PURE__ */ new Map()), x(this, tr, /* @__PURE__ */ new Set()), x(this, wn, !0), x(this, kn, (r) => {
1892
+ if (d(Ve, this).has(r)) {
1893
+ var n = d(Ve, this).get(r), i = d(nt, this).get(n);
1894
1894
  if (i)
1895
- Jr(i), f(tr, this).delete(n);
1895
+ Jr(i), d(tr, this).delete(n);
1896
1896
  else {
1897
- var o = f(ke, this).get(n);
1898
- o && (Jr(o.effect), f(nt, this).set(n, o.effect), f(ke, this).delete(n), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
1897
+ var o = d(ke, this).get(n);
1898
+ o && (Jr(o.effect), d(nt, this).set(n, o.effect), d(ke, this).delete(n), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
1899
1899
  }
1900
- for (const [s, a] of f(Ve, this)) {
1901
- if (f(Ve, this).delete(s), s === r) break;
1902
- const l = f(ke, this).get(a);
1903
- l && (se(l.effect), f(ke, this).delete(a));
1900
+ for (const [s, a] of d(Ve, this)) {
1901
+ if (d(Ve, this).delete(s), s === r) break;
1902
+ const l = d(ke, this).get(a);
1903
+ l && (se(l.effect), d(ke, this).delete(a));
1904
1904
  }
1905
- for (const [s, a] of f(nt, this)) {
1906
- if (s === n || f(tr, this).has(s)) continue;
1905
+ for (const [s, a] of d(nt, this)) {
1906
+ if (s === n || d(tr, this).has(s)) continue;
1907
1907
  const l = () => {
1908
- if (Array.from(f(Ve, this).values()).includes(s)) {
1908
+ if (Array.from(d(Ve, this).values()).includes(s)) {
1909
1909
  var c = document.createDocumentFragment();
1910
- xi(a, c), c.append(ye()), f(ke, this).set(s, {
1910
+ Ei(a, c), c.append(ye()), d(ke, this).set(s, {
1911
1911
  effect: a,
1912
1912
  fragment: c
1913
1913
  });
1914
1914
  } else se(a);
1915
- f(tr, this).delete(s), f(nt, this).delete(s);
1915
+ d(tr, this).delete(s), d(nt, this).delete(s);
1916
1916
  };
1917
- f(wn, this) || !i ? (f(tr, this).add(s), Nt(a, l, !1)) : l();
1917
+ d(wn, this) || !i ? (d(tr, this).add(s), Nt(a, l, !1)) : l();
1918
1918
  }
1919
1919
  }
1920
- }), E(this, io, (r) => {
1921
- f(Ve, this).delete(r);
1922
- const n = Array.from(f(Ve, this).values());
1923
- for (const [i, o] of f(ke, this)) n.includes(i) || (se(o.effect), f(ke, this).delete(i));
1920
+ }), x(this, io, (r) => {
1921
+ d(Ve, this).delete(r);
1922
+ const n = Array.from(d(Ve, this).values());
1923
+ for (const [i, o] of d(ke, this)) n.includes(i) || (se(o.effect), d(ke, this).delete(i));
1924
1924
  }), this.anchor = e, k(wn, this, t);
1925
1925
  }
1926
1926
  ensure(e, t) {
1927
- var r = x, n = ms();
1928
- if (t && !f(nt, this).has(e) && !f(ke, this).has(e)) if (n) {
1927
+ var r = E, n = ms();
1928
+ if (t && !d(nt, this).has(e) && !d(ke, this).has(e)) if (n) {
1929
1929
  var i = document.createDocumentFragment(), o = ye();
1930
- i.append(o), f(ke, this).set(e, {
1930
+ i.append(o), d(ke, this).set(e, {
1931
1931
  effect: _e(() => t(o)),
1932
1932
  fragment: i
1933
1933
  });
1934
- } else f(nt, this).set(e, _e(() => t(this.anchor)));
1935
- if (f(Ve, this).set(r, e), n) {
1936
- for (const [s, a] of f(nt, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
1937
- for (const [s, a] of f(ke, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1938
- r.oncommit(f(kn, this)), r.ondiscard(f(io, this));
1934
+ } else d(nt, this).set(e, _e(() => t(this.anchor)));
1935
+ if (d(Ve, this).set(r, e), n) {
1936
+ for (const [s, a] of d(nt, this)) s === e ? r.unskip_effect(a) : r.skip_effect(a);
1937
+ for (const [s, a] of d(ke, this)) s === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1938
+ r.oncommit(d(kn, this)), r.ondiscard(d(io, this));
1939
1939
  } else
1940
- L && (this.anchor = P), f(kn, this).call(this, r);
1940
+ L && (this.anchor = P), d(kn, this).call(this, r);
1941
1941
  }
1942
1942
  };
1943
1943
  function rr(e, t, r = !1) {
1944
1944
  var n;
1945
1945
  L && (n = P, sn());
1946
- var i = new Sc(e), o = r ? fi : 0;
1946
+ var i = new Sc(e), o = r ? di : 0;
1947
1947
  function s(a, l) {
1948
1948
  if (L) {
1949
1949
  var c = Fo(n);
@@ -1967,12 +1967,12 @@ function Ar(e, t) {
1967
1967
  }
1968
1968
  function wc(e, t, r) {
1969
1969
  for (var n = [], i = t.length, o, s = t.length, a = 0; a < i; a++) {
1970
- let h = t[a];
1971
- Nt(h, () => {
1970
+ let f = t[a];
1971
+ Nt(f, () => {
1972
1972
  if (o) {
1973
- if (o.pending.delete(h), o.done.add(h), o.pending.size === 0) {
1974
- var d = e.outrogroups;
1975
- Xn(e, rn(o.done)), d.delete(o), d.size === 0 && (e.outrogroups = null);
1973
+ if (o.pending.delete(f), o.done.add(f), o.pending.size === 0) {
1974
+ var h = e.outrogroups;
1975
+ Xn(e, rn(o.done)), h.delete(o), h.size === 0 && (e.outrogroups = null);
1976
1976
  }
1977
1977
  } else s -= 1;
1978
1978
  }, !1);
@@ -1998,7 +1998,7 @@ function Xn(e, t, r = !0) {
1998
1998
  }
1999
1999
  for (var i = 0; i < t.length; i++) {
2000
2000
  var o = t[i];
2001
- n?.has(o) ? (o.f |= ur, xi(o, document.createDocumentFragment())) : se(t[i], r);
2001
+ n?.has(o) ? (o.f |= ur, Ei(o, document.createDocumentFragment())) : se(t[i], r);
2002
2002
  }
2003
2003
  }
2004
2004
  var Mr;
@@ -2012,9 +2012,9 @@ function gt(e, t, r, n, i, o = null) {
2012
2012
  var c = null, u = /* @__PURE__ */ bi(() => {
2013
2013
  var _ = r();
2014
2014
  return Wo(_) ? _ : _ == null ? [] : rn(_);
2015
- }), h, d = /* @__PURE__ */ new Map(), p = !0;
2015
+ }), f, h = /* @__PURE__ */ new Map(), p = !0;
2016
2016
  function v(_) {
2017
- (m.effect.f & 16384) === 0 && (m.pending.delete(_), m.fallback = c, kc(m, h, s, t, n), c !== null && (h.length === 0 ? (c.f & 33554432) === 0 ? Jr(c) : (c.f ^= ur, lr(c, null, s)) : Nt(c, () => {
2017
+ (m.effect.f & 16384) === 0 && (m.pending.delete(_), m.fallback = c, kc(m, f, s, t, n), c !== null && (f.length === 0 ? (c.f & 33554432) === 0 ? Jr(c) : (c.f ^= ur, lr(c, null, s)) : Nt(c, () => {
2018
2018
  c = null;
2019
2019
  })));
2020
2020
  }
@@ -2023,20 +2023,20 @@ function gt(e, t, r, n, i, o = null) {
2023
2023
  }
2024
2024
  var m = {
2025
2025
  effect: ki(() => {
2026
- h = g(u);
2027
- var _ = h.length;
2026
+ f = g(u);
2027
+ var _ = f.length;
2028
2028
  let N = !1;
2029
2029
  L && Fo(s) === "[!" != (_ === 0) && (s = Br(), le(s), qe(!1), N = !0);
2030
- for (var B = /* @__PURE__ */ new Set(), S = x, F = ms(), j = 0; j < _; j += 1) {
2030
+ for (var B = /* @__PURE__ */ new Set(), S = E, F = ms(), j = 0; j < _; j += 1) {
2031
2031
  L && P.nodeType === 8 && P.data === "]" && (s = P, N = !0, qe(!1));
2032
- var Q = h[j], te = n(Q, j);
2032
+ var Q = f[j], te = n(Q, j);
2033
2033
  if (0)
2034
2034
  var et;
2035
2035
  var X = p ? null : a.get(te);
2036
- X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && S.unskip_effect(X.e)) : (X = Ec(a, p ? s : Mr ?? (Mr = ye()), Q, te, j, i, t, r), p || (X.e.f |= ur), a.set(te, X)), B.add(te);
2036
+ X ? (X.v && Gt(X.v, Q), X.i && Gt(X.i, j), F && S.unskip_effect(X.e)) : (X = xc(a, p ? s : Mr ?? (Mr = ye()), Q, te, j, i, t, r), p || (X.e.f |= ur), a.set(te, X)), B.add(te);
2037
2037
  }
2038
2038
  if (_ === 0 && o && !c && (p ? c = _e(() => o(s)) : (c = _e(() => o(Mr ?? (Mr = ye()))), c.f |= ur)), _ > B.size && cl("", "", ""), L && _ > 0 && le(Br()), !p)
2039
- if (d.set(S, B), F) {
2039
+ if (h.set(S, B), F) {
2040
2040
  for (const [vn, mn] of a) B.has(vn) || S.skip_effect(mn.e);
2041
2041
  S.oncommit(v), S.ondiscard(b);
2042
2042
  } else v(S);
@@ -2044,7 +2044,7 @@ function gt(e, t, r, n, i, o = null) {
2044
2044
  }),
2045
2045
  flags: t,
2046
2046
  items: a,
2047
- pending: d,
2047
+ pending: h,
2048
2048
  outrogroups: null,
2049
2049
  fallback: c
2050
2050
  };
@@ -2055,37 +2055,37 @@ function nr(e) {
2055
2055
  return e;
2056
2056
  }
2057
2057
  function kc(e, t, r, n, i) {
2058
- var o = (n & 8) !== 0, s = t.length, a = e.items, l = nr(e.effect.first), c, u = null, h, d = [], p = [], v, b, m, _;
2058
+ var o = (n & 8) !== 0, s = t.length, a = e.items, l = nr(e.effect.first), c, u = null, f, h = [], p = [], v, b, m, _;
2059
2059
  if (o) for (_ = 0; _ < s; _ += 1)
2060
- v = t[_], b = i(v, _), m = a.get(b).e, (m.f & 33554432) === 0 && (m.nodes?.a?.measure(), (h ?? (h = /* @__PURE__ */ new Set())).add(m));
2060
+ v = t[_], b = i(v, _), m = a.get(b).e, (m.f & 33554432) === 0 && (m.nodes?.a?.measure(), (f ?? (f = /* @__PURE__ */ new Set())).add(m));
2061
2061
  for (_ = 0; _ < s; _ += 1) {
2062
2062
  if (v = t[_], b = i(v, _), m = a.get(b).e, e.outrogroups !== null) for (const X of e.outrogroups)
2063
2063
  X.pending.delete(m), X.done.delete(m);
2064
- if ((m.f & 8192) !== 0 && (Jr(m), o && (m.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(m))), (m.f & 33554432) !== 0)
2064
+ if ((m.f & 8192) !== 0 && (Jr(m), o && (m.nodes?.a?.unfix(), (f ?? (f = /* @__PURE__ */ new Set())).delete(m))), (m.f & 33554432) !== 0)
2065
2065
  if (m.f ^= ur, m === l) lr(m, null, r);
2066
2066
  else {
2067
2067
  var N = u ? u.next : l;
2068
- m === e.effect.last && (e.effect.last = m.prev), m.prev && (m.prev.next = m.next), m.next && (m.next.prev = m.prev), it(e, u, m), it(e, m, N), lr(m, N, r), u = m, d = [], p = [], l = nr(u.next);
2068
+ m === e.effect.last && (e.effect.last = m.prev), m.prev && (m.prev.next = m.next), m.next && (m.next.prev = m.prev), it(e, u, m), it(e, m, N), lr(m, N, r), u = m, h = [], p = [], l = nr(u.next);
2069
2069
  continue;
2070
2070
  }
2071
2071
  if (m !== l) {
2072
2072
  if (c !== void 0 && c.has(m)) {
2073
- if (d.length < p.length) {
2073
+ if (h.length < p.length) {
2074
2074
  var B = p[0], S;
2075
2075
  u = B.prev;
2076
- var F = d[0], j = d[d.length - 1];
2077
- for (S = 0; S < d.length; S += 1) lr(d[S], B, r);
2076
+ var F = h[0], j = h[h.length - 1];
2077
+ for (S = 0; S < h.length; S += 1) lr(h[S], B, r);
2078
2078
  for (S = 0; S < p.length; S += 1) c.delete(p[S]);
2079
- it(e, F.prev, j.next), it(e, u, F), it(e, j, B), l = B, u = j, _ -= 1, d = [], p = [];
2079
+ it(e, F.prev, j.next), it(e, u, F), it(e, j, B), l = B, u = j, _ -= 1, h = [], p = [];
2080
2080
  } else
2081
2081
  c.delete(m), lr(m, l, r), it(e, m.prev, m.next), it(e, m, u === null ? e.effect.first : u.next), it(e, u, m), u = m;
2082
2082
  continue;
2083
2083
  }
2084
- for (d = [], p = []; l !== null && l !== m; )
2084
+ for (h = [], p = []; l !== null && l !== m; )
2085
2085
  (c ?? (c = /* @__PURE__ */ new Set())).add(l), p.push(l), l = nr(l.next);
2086
2086
  if (l === null) continue;
2087
2087
  }
2088
- (m.f & 33554432) === 0 && d.push(m), u = m, l = nr(m.next);
2088
+ (m.f & 33554432) === 0 && h.push(m), u = m, l = nr(m.next);
2089
2089
  }
2090
2090
  if (e.outrogroups !== null) {
2091
2091
  for (const X of e.outrogroups) X.pending.size === 0 && (Xn(e, rn(X.done)), e.outrogroups?.delete(X));
@@ -2108,11 +2108,11 @@ function kc(e, t, r, n, i) {
2108
2108
  }
2109
2109
  }
2110
2110
  o && Ye(() => {
2111
- if (h !== void 0)
2112
- for (m of h) m.nodes?.a?.apply();
2111
+ if (f !== void 0)
2112
+ for (m of f) m.nodes?.a?.apply();
2113
2113
  });
2114
2114
  }
2115
- function Ec(e, t, r, n, i, o, s, a) {
2115
+ function xc(e, t, r, n, i, o, s, a) {
2116
2116
  var l = (s & 1) !== 0 ? (s & 16) === 0 ? /* @__PURE__ */ hs(r, !1, !1) : It(r) : null, c = (s & 2) !== 0 ? It(i) : null;
2117
2117
  return {
2118
2118
  v: l,
@@ -2133,7 +2133,7 @@ function lr(e, t, r) {
2133
2133
  function it(e, t, r) {
2134
2134
  t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
2135
2135
  }
2136
- function xc(e, t) {
2136
+ function Ec(e, t) {
2137
2137
  Ts(() => {
2138
2138
  var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
2139
2139
  if (!n.querySelector("#" + t.hash)) {
@@ -2164,7 +2164,7 @@ function so(e, t = !1) {
2164
2164
  }
2165
2165
  return n;
2166
2166
  }
2167
- function En(e) {
2167
+ function xn(e) {
2168
2168
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2169
2169
  }
2170
2170
  function Ac(e, t) {
@@ -2173,23 +2173,23 @@ function Ac(e, t) {
2173
2173
  if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
2174
2174
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
2175
2175
  var o = !1, s = 0, a = !1, l = [];
2176
- n && l.push(...Object.keys(n).map(En)), i && l.push(...Object.keys(i).map(En));
2176
+ n && l.push(...Object.keys(n).map(xn)), i && l.push(...Object.keys(i).map(xn));
2177
2177
  var c = 0, u = -1;
2178
2178
  const b = e.length;
2179
- for (var h = 0; h < b; h++) {
2180
- var d = e[h];
2181
- if (a ? d === "/" && e[h - 1] === "*" && (a = !1) : o ? o === d && (o = !1) : d === "/" && e[h + 1] === "*" ? a = !0 : d === '"' || d === "'" ? o = d : d === "(" ? s++ : d === ")" && s--, !a && o === !1 && s === 0) {
2182
- if (d === ":" && u === -1) u = h;
2183
- else if (d === ";" || h === b - 1) {
2179
+ for (var f = 0; f < b; f++) {
2180
+ var h = e[f];
2181
+ if (a ? h === "/" && e[f - 1] === "*" && (a = !1) : o ? o === h && (o = !1) : h === "/" && e[f + 1] === "*" ? a = !0 : h === '"' || h === "'" ? o = h : h === "(" ? s++ : h === ")" && s--, !a && o === !1 && s === 0) {
2182
+ if (h === ":" && u === -1) u = f;
2183
+ else if (h === ";" || f === b - 1) {
2184
2184
  if (u !== -1) {
2185
- var p = En(e.substring(c, u).trim());
2185
+ var p = xn(e.substring(c, u).trim());
2186
2186
  if (!l.includes(p)) {
2187
- d !== ";" && h++;
2188
- var v = e.substring(c, h).trim();
2187
+ h !== ";" && f++;
2188
+ var v = e.substring(c, f).trim();
2189
2189
  r += " " + v + ";";
2190
2190
  }
2191
2191
  }
2192
- c = h + 1, u = -1;
2192
+ c = f + 1, u = -1;
2193
2193
  }
2194
2194
  }
2195
2195
  }
@@ -2209,7 +2209,7 @@ function ao(e, t, r, n, i, o) {
2209
2209
  }
2210
2210
  return o;
2211
2211
  }
2212
- function xn(e, t = {}, r, n) {
2212
+ function En(e, t = {}, r, n) {
2213
2213
  for (var i in r) {
2214
2214
  var o = r[i];
2215
2215
  t[i] !== o && (r[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, o, n));
@@ -2220,7 +2220,7 @@ function Mc(e, t, r, n) {
2220
2220
  if (L || i !== t) {
2221
2221
  var o = Ac(t, n);
2222
2222
  (!L || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e[Hn] = t;
2223
- } else n && (Array.isArray(n) ? (xn(e, r?.[0], n[0]), xn(e, r?.[1], n[1], "important")) : xn(e, r, n));
2223
+ } else n && (Array.isArray(n) ? (En(e, r?.[0], n[0]), En(e, r?.[1], n[1], "important")) : En(e, r, n));
2224
2224
  return n;
2225
2225
  }
2226
2226
  var Oc = /* @__PURE__ */ Symbol("is custom element"), Ic = /* @__PURE__ */ Symbol("is html"), Rc = al ? "link" : "LINK";
@@ -2238,7 +2238,7 @@ function $c(e) {
2238
2238
  }
2239
2239
  }
2240
2240
  };
2241
- e[dr] = r, Ye(r), ys();
2241
+ e[fr] = r, Ye(r), ys();
2242
2242
  }
2243
2243
  }
2244
2244
  function W(e, t, r, n) {
@@ -2272,17 +2272,17 @@ function Nc(e, t, r = t) {
2272
2272
  var n = /* @__PURE__ */ new WeakSet();
2273
2273
  Jl(e, "input", async (i) => {
2274
2274
  var o = i ? e.defaultValue : e.value;
2275
- if (o = Cn(e) ? An(o) : o, r(o), x !== null && n.add(x), await lc(), o !== (o = t())) {
2275
+ if (o = Cn(e) ? An(o) : o, r(o), E !== null && n.add(E), await lc(), o !== (o = t())) {
2276
2276
  var s = e.selectionStart, a = e.selectionEnd, l = e.value.length;
2277
2277
  if (e.value = o ?? "", a !== null) {
2278
2278
  var c = e.value.length;
2279
2279
  s === a && a === l && c > l ? (e.selectionStart = c, e.selectionEnd = c) : (e.selectionStart = s, e.selectionEnd = Math.min(a, c));
2280
2280
  }
2281
2281
  }
2282
- }), (L && e.defaultValue !== e.value || un(t) == null && e.value) && (r(Cn(e) ? An(e.value) : e.value), x !== null && n.add(x)), cn(() => {
2282
+ }), (L && e.defaultValue !== e.value || un(t) == null && e.value) && (r(Cn(e) ? An(e.value) : e.value), E !== null && n.add(E)), cn(() => {
2283
2283
  var i = t();
2284
2284
  if (e === document.activeElement) {
2285
- var o = Me ? Fr : x;
2285
+ var o = Me ? Fr : E;
2286
2286
  if (n.has(o)) return;
2287
2287
  }
2288
2288
  Cn(e) && i === An(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
@@ -2297,22 +2297,22 @@ function An(e) {
2297
2297
  }
2298
2298
  var Ws, Dt = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), co = /* @__PURE__ */ new WeakSet(), Hs = class {
2299
2299
  constructor(e) {
2300
- gi(this, co), E(this, Dt, /* @__PURE__ */ new WeakMap()), E(this, Qr, void 0), E(this, Mn, void 0), k(Mn, this, e);
2300
+ gi(this, co), x(this, Dt, /* @__PURE__ */ new WeakMap()), x(this, Qr, void 0), x(this, Mn, void 0), k(Mn, this, e);
2301
2301
  }
2302
2302
  observe(e, t) {
2303
- var r = f(Dt, this).get(e) || /* @__PURE__ */ new Set();
2304
- return r.add(t), f(Dt, this).set(e, r), O(co, this, zc).call(this).observe(e, f(Mn, this)), () => {
2305
- var n = f(Dt, this).get(e);
2306
- n.delete(t), n.size === 0 && (f(Dt, this).delete(e), f(Qr, this).unobserve(e));
2303
+ var r = d(Dt, this).get(e) || /* @__PURE__ */ new Set();
2304
+ return r.add(t), d(Dt, this).set(e, r), O(co, this, zc).call(this).observe(e, d(Mn, this)), () => {
2305
+ var n = d(Dt, this).get(e);
2306
+ n.delete(t), n.size === 0 && (d(Dt, this).delete(e), d(Qr, this).unobserve(e));
2307
2307
  };
2308
2308
  }
2309
2309
  };
2310
2310
  Ws = Hs;
2311
2311
  function zc() {
2312
- return f(Qr, this) ?? k(Qr, this, new ResizeObserver((e) => {
2312
+ return d(Qr, this) ?? k(Qr, this, new ResizeObserver((e) => {
2313
2313
  for (var t of e) {
2314
2314
  Ws.entries.set(t.target, t);
2315
- for (var r of f(Dt, this).get(t.target) || []) r(t);
2315
+ for (var r of d(Dt, this).get(t.target) || []) r(t);
2316
2316
  }
2317
2317
  }));
2318
2318
  }
@@ -2342,13 +2342,13 @@ function In(e = {}, t, r, n) {
2342
2342
  }
2343
2343
  function uo(e, t, r, n) {
2344
2344
  var i = !an || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, a = n, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ vr(n)), g(c)) : (l && (l = !1, a = s ? un(n) : n), a);
2345
- let h;
2345
+ let f;
2346
2346
  if (o) {
2347
- var d = hr in e || Do in e;
2348
- h = St(e, t)?.set ?? (d && t in e ? (S) => e[t] = S : void 0);
2347
+ var h = hr in e || Do in e;
2348
+ f = St(e, t)?.set ?? (h && t in e ? (S) => e[t] = S : void 0);
2349
2349
  }
2350
2350
  var p, v = !1;
2351
- o ? [p, v] = Al(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = u(), h && (i && gl(t), h(p)));
2351
+ o ? [p, v] = Al(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = u(), f && (i && gl(t), f(p)));
2352
2352
  var b;
2353
2353
  if (i ? b = () => {
2354
2354
  var S = e[t];
@@ -2357,10 +2357,10 @@ function uo(e, t, r, n) {
2357
2357
  var S = e[t];
2358
2358
  return S !== void 0 && (a = void 0), S === void 0 ? a : S;
2359
2359
  }, i && (r & 4) === 0) return b;
2360
- if (h) {
2360
+ if (f) {
2361
2361
  var m = e.$$legacy;
2362
2362
  return (function(S, F) {
2363
- return arguments.length > 0 ? ((!i || !F || m || v) && h(F ? b() : S), S) : b();
2363
+ return arguments.length > 0 ? ((!i || !F || m || v) && f(F ? b() : S), S) : b();
2364
2364
  });
2365
2365
  }
2366
2366
  var _ = !1, N = ((r & 1) !== 0 ? vr : bi)(() => (_ = !1, b()));
@@ -2379,7 +2379,7 @@ function Wc(e) {
2379
2379
  }
2380
2380
  var vt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Hc = class {
2381
2381
  constructor(e) {
2382
- E(this, vt, void 0), E(this, $e, void 0);
2382
+ x(this, vt, void 0), x(this, $e, void 0);
2383
2383
  var t = /* @__PURE__ */ new Map(), r = (i, o) => {
2384
2384
  var s = /* @__PURE__ */ hs(o, !1, !1);
2385
2385
  return t.set(i, s), s;
@@ -2407,34 +2407,34 @@ var vt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Hc =
2407
2407
  recover: e.recover,
2408
2408
  transformError: e.transformError
2409
2409
  })), !Me && (!e?.props?.$$host || e.sync === !1) && Yr(), k(vt, this, n.$$events);
2410
- for (const i of Object.keys(f($e, this)))
2410
+ for (const i of Object.keys(d($e, this)))
2411
2411
  i === "$set" || i === "$destroy" || i === "$on" || Wr(this, i, {
2412
2412
  get() {
2413
- return f($e, this)[i];
2413
+ return d($e, this)[i];
2414
2414
  },
2415
2415
  set(o) {
2416
- f($e, this)[i] = o;
2416
+ d($e, this)[i] = o;
2417
2417
  },
2418
2418
  enumerable: !0
2419
2419
  });
2420
- f($e, this).$set = (i) => {
2420
+ d($e, this).$set = (i) => {
2421
2421
  Object.assign(n, i);
2422
- }, f($e, this).$destroy = () => {
2423
- Tc(f($e, this));
2422
+ }, d($e, this).$destroy = () => {
2423
+ Tc(d($e, this));
2424
2424
  };
2425
2425
  }
2426
2426
  $set(e) {
2427
- f($e, this).$set(e);
2427
+ d($e, this).$set(e);
2428
2428
  }
2429
2429
  $on(e, t) {
2430
- f(vt, this)[e] = f(vt, this)[e] || [];
2430
+ d(vt, this)[e] = d(vt, this)[e] || [];
2431
2431
  const r = (...n) => t.call(this, ...n);
2432
- return f(vt, this)[e].push(r), () => {
2433
- f(vt, this)[e] = f(vt, this)[e].filter((n) => n !== r);
2432
+ return d(vt, this)[e].push(r), () => {
2433
+ d(vt, this)[e] = d(vt, this)[e].filter((n) => n !== r);
2434
2434
  };
2435
2435
  }
2436
2436
  $destroy() {
2437
- f($e, this).$destroy();
2437
+ d($e, this).$destroy();
2438
2438
  }
2439
2439
  }, Bs;
2440
2440
  typeof HTMLElement == "function" && (Bs = class extends HTMLElement {
@@ -2592,7 +2592,7 @@ var Fc = class extends Event {
2592
2592
  requestValue() {
2593
2593
  this.host.dispatchEvent(new Fc(this.context, this.host, this.handleValue, this.subscribe));
2594
2594
  }
2595
- }, hn = (e) => e, Vc = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Tf = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Sf = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), wf = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2595
+ }, hn = (e) => e, Vc = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Td = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Sd = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), wd = hn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2596
2596
  function qc(e, t, r) {
2597
2597
  let n = !1;
2598
2598
  const i = new jc(e, {
@@ -2808,16 +2808,16 @@ var Ds = class Jn {
2808
2808
  0.56,
2809
2809
  0.5
2810
2810
  ];
2811
- let h = u[u.length - 1], d = -1 / 0;
2811
+ let f = u[u.length - 1], h = -1 / 0;
2812
2812
  for (const F of u) {
2813
2813
  const j = this.blend(c, a, F), Q = this.contrastRatio(j, a), te = this.contrastRatio(j, l), et = Q * 1.2 + te * 0.8;
2814
2814
  if (Q >= 1.25 && te >= 2.4) {
2815
- h = F;
2815
+ f = F;
2816
2816
  break;
2817
2817
  }
2818
- et > d && (d = et, h = F);
2818
+ et > h && (h = et, f = F);
2819
2819
  }
2820
- const p = Math.max(0.24, Math.min(0.85, h * 0.55)), v = Math.max(0.55, Math.min(0.95, h + 0.2)), b = Math.max(0.22, Math.min(0.6, h * 0.45)), m = l, _ = this.blend(m, a, v), N = this.contrastRatio(_, a), B = this.relativeLuminance(a) > 0.45 ? [
2820
+ const p = Math.max(0.24, Math.min(0.85, f * 0.55)), v = Math.max(0.55, Math.min(0.95, f + 0.2)), b = Math.max(0.22, Math.min(0.6, f * 0.45)), m = l, _ = this.blend(m, a, v), N = this.contrastRatio(_, a), B = this.relativeLuminance(a) > 0.45 ? [
2821
2821
  0,
2822
2822
  0,
2823
2823
  0
@@ -2827,7 +2827,7 @@ var Ds = class Jn {
2827
2827
  255
2828
2828
  ], S = N >= 1.35 ? m : B;
2829
2829
  return {
2830
- wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${h})`,
2830
+ wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${f})`,
2831
2831
  sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${p})`,
2832
2832
  wordUnderline: `rgba(${S[0]}, ${S[1]}, ${S[2]}, ${v})`,
2833
2833
  wordShadow: `rgba(${S[0]}, ${S[1]}, ${S[2]}, ${b})`
@@ -2954,9 +2954,9 @@ var Ds = class Jn {
2954
2954
  if (!s) continue;
2955
2955
  const a = [], l = o.startContainer.nodeType === Node.ELEMENT_NODE ? o.startContainer : o.startContainer.parentElement, c = o.endContainer.nodeType === Node.ELEMENT_NODE ? o.endContainer : o.endContainer.parentElement;
2956
2956
  for (const u of [l, c]) {
2957
- let h = u;
2958
- for (; h; )
2959
- h.matches?.(i) && a.push(h), h = h.parentElement;
2957
+ let f = u;
2958
+ for (; f; )
2959
+ f.matches?.(i) && a.push(f), f = f.parentElement;
2960
2960
  }
2961
2961
  s.matches?.(i) && a.push(s), a.push(...Array.from(s.querySelectorAll(i)));
2962
2962
  for (const u of new Set(a)) {
@@ -3117,7 +3117,7 @@ function Fs(e) {
3117
3117
  console.debug(`[${e}]`, ...t);
3118
3118
  };
3119
3119
  }
3120
- var kf = Fs("I18nService"), Rn = {
3120
+ var kd = Fs("I18nService"), Rn = {
3121
3121
  assessment: [],
3122
3122
  section: [],
3123
3123
  item: [],
@@ -3435,7 +3435,7 @@ function Ci(e) {
3435
3435
  for (const c of Object.values(l))
3436
3436
  if (typeof c == "string" && n.push(i(c)), Array.isArray(c)) {
3437
3437
  for (const u of c) if (u && typeof u == "object")
3438
- for (const h of Object.values(u)) typeof h == "string" && n.push(i(h));
3438
+ for (const f of Object.values(u)) typeof f == "string" && n.push(i(f));
3439
3439
  }
3440
3440
  }
3441
3441
  return n.filter(Boolean).join(" ").trim();
@@ -3454,7 +3454,7 @@ function Ci(e) {
3454
3454
  for (const c of Object.values(l))
3455
3455
  if (typeof c == "string" && n.push(i(c)), Array.isArray(c)) {
3456
3456
  for (const u of c) if (u && typeof u == "object")
3457
- for (const h of Object.values(u)) typeof h == "string" && n.push(i(h));
3457
+ for (const f of Object.values(u)) typeof f == "string" && n.push(i(f));
3458
3458
  }
3459
3459
  }
3460
3460
  return n.filter(Boolean).join(" ").trim();
@@ -3465,7 +3465,7 @@ function Ci(e) {
3465
3465
  }
3466
3466
  return "";
3467
3467
  }
3468
- function dn(e) {
3468
+ function fn(e) {
3469
3469
  const t = Ci(e);
3470
3470
  return [
3471
3471
  /<math[>\s]/i,
@@ -3503,7 +3503,7 @@ function au(e) {
3503
3503
  }
3504
3504
  return !1;
3505
3505
  }
3506
- function fn(e) {
3506
+ function dn(e) {
3507
3507
  return Ci(e).trim().length >= 10;
3508
3508
  }
3509
3509
  function lu(e) {
@@ -3533,7 +3533,7 @@ function Ai(e, t, r) {
3533
3533
  if (!hu(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
3534
3534
  return `${n}:${t}:${i}`;
3535
3535
  }
3536
- var du = class {
3536
+ var fu = class {
3537
3537
  constructor() {
3538
3538
  y(this, "providerId", "desmos-calculator"), y(this, "providerName", "Desmos Calculator"), y(this, "category", "calculator"), y(this, "version", "1.10"), y(this, "requiresAuth", !0), y(this, "desmosProvider", null), y(this, "config", null);
3539
3539
  }
@@ -3637,12 +3637,12 @@ var du = class {
3637
3637
  text: e,
3638
3638
  offset: 0
3639
3639
  }];
3640
- }, Us = (e) => String(e || "").trim().toLowerCase(), fu = () => Us((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), pu = (e, t) => {
3640
+ }, Us = (e) => String(e || "").trim().toLowerCase(), du = () => Us((typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "") || "en-US"), pu = (e, t) => {
3641
3641
  if (t) {
3642
3642
  const s = e.find((a) => a.name === t);
3643
3643
  if (s) return s;
3644
3644
  }
3645
- const r = fu(), n = r.split("-")[0] || "en", i = (s) => {
3645
+ const r = du(), n = r.split("-")[0] || "en", i = (s) => {
3646
3646
  const a = Us(s.lang);
3647
3647
  return a === r || a.startsWith(`${n}-`);
3648
3648
  }, o = [
@@ -3798,8 +3798,8 @@ var du = class {
3798
3798
  r === this.speakRunId && (this._isPaused = !1);
3799
3799
  }, o.onboundary = (l) => {
3800
3800
  if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", l.name, "charIndex:", l.charIndex, "charLength:", l.charLength), l.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
3801
- const c = Math.max(0, Math.min(l.charIndex, Math.max(0, e.length - 1))), u = Number(l.charLength || 0), h = this.inferWordLength(e, c), d = Number.isFinite(u) && u > 0 && u <= 80 && c + u <= e.length ? u : h, p = e.substring(c, Math.min(e.length, c + d)).trim(), v = t + c;
3802
- console.log("[BrowserProvider] Calling onWordBoundary with word:", p, "at position:", v), this.onWordBoundary(p, v, d);
3801
+ const c = Math.max(0, Math.min(l.charIndex, Math.max(0, e.length - 1))), u = Number(l.charLength || 0), f = this.inferWordLength(e, c), h = Number.isFinite(u) && u > 0 && u <= 80 && c + u <= e.length ? u : f, p = e.substring(c, Math.min(e.length, c + h)).trim(), v = t + c;
3802
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", p, "at position:", v), this.onWordBoundary(p, v, h);
3803
3803
  }, speechSynthesis.speak(o);
3804
3804
  });
3805
3805
  }
@@ -3966,7 +3966,7 @@ function ku(e, t, r) {
3966
3966
  function fo(e) {
3967
3967
  return e === "basic" || e === "scientific" ? e : null;
3968
3968
  }
3969
- function Eu(e) {
3969
+ function xu(e) {
3970
3970
  const t = e.getToolRenderParams?.("calculator") ?? {}, r = fo(t.calculatorType), n = t.availableTypes;
3971
3971
  return {
3972
3972
  calculatorType: r,
@@ -3978,14 +3978,14 @@ function po(e, t, r) {
3978
3978
  const n = e;
3979
3979
  t ? (n.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete n.calculatorType, e.removeAttribute("calculator-type")), r && r.length > 0 ? n.availableTypes = r : delete n.availableTypes;
3980
3980
  }
3981
- var xu = {
3981
+ var Eu = {
3982
3982
  toolId: "calculator",
3983
3983
  name: "Calculator",
3984
3984
  description: "Multi-type calculator (basic, scientific, graphing)",
3985
3985
  icon: "calculator",
3986
3986
  provider: {
3987
3987
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
3988
- createProvider: () => new du(),
3988
+ createProvider: () => new fu(),
3989
3989
  getInitConfig: (e) => e?.provider?.init ?? {},
3990
3990
  getAuthFetcher: (e) => {
3991
3991
  const t = e?.provider?.runtime?.authFetcher;
@@ -4008,12 +4008,12 @@ var xu = {
4008
4008
  "scientificCalculator"
4009
4009
  ],
4010
4010
  isVisibleInContext(e) {
4011
- return dn(e);
4011
+ return fn(e);
4012
4012
  },
4013
4013
  renderToolbar(e, t) {
4014
- const { calculatorType: r, availableTypes: n, displayName: i } = Eu(t), o = Ai(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = wu(t.toolCoordinator, o), l = a ?? Be(this.toolId, e, t, s);
4014
+ const { calculatorType: r, availableTypes: n, displayName: i } = xu(t), o = Ai(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = wu(t.toolCoordinator, o), l = a ?? Be(this.toolId, e, t, s);
4015
4015
  a || ku(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, po(l, r, n);
4016
- const c = r === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = r === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
4016
+ const c = r === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = r === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, f = {
4017
4017
  toolId: this.toolId,
4018
4018
  label: i,
4019
4019
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
@@ -4023,8 +4023,8 @@ var xu = {
4023
4023
  onClick: () => t.toggleTool(this.toolId),
4024
4024
  active: t.isToolVisible(o)
4025
4025
  };
4026
- let d = h.active;
4027
- return l.visible !== h.active && (l.visible = h.active), {
4026
+ let h = f.active;
4027
+ return l.visible !== f.active && (l.visible = f.active), {
4028
4028
  toolId: this.toolId,
4029
4029
  elements: [{
4030
4030
  element: l,
@@ -4042,10 +4042,10 @@ var xu = {
4042
4042
  initialMargin: 16
4043
4043
  }
4044
4044
  }],
4045
- button: h,
4045
+ button: f,
4046
4046
  sync: () => {
4047
4047
  const p = t.isToolVisible(o);
4048
- h.active = p, h.label = i, h.ariaLabel = p ? u : c, h.tooltip = p ? `Close ${i.toLowerCase()}` : i, d !== p && (l.visible = p, d = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), po(l, r, n);
4048
+ f.active = p, f.label = i, f.ariaLabel = p ? u : c, f.tooltip = p ? `Close ${i.toLowerCase()}` : i, h !== p && (l.visible = p, h = p), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), po(l, r, n);
4049
4049
  },
4050
4050
  subscribeActive: (p) => t.subscribeVisibility ? t.subscribeVisibility(() => {
4051
4051
  p(t.isToolVisible(o));
@@ -4053,7 +4053,7 @@ var xu = {
4053
4053
  }
4054
4054
  };
4055
4055
  }
4056
- }, G = (e) => e.trim().replace(/\s+/g, " "), Ks = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Xs = (e) => {
4056
+ }, V = (e) => e.trim().replace(/\s+/g, " "), Ks = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Xs = (e) => {
4057
4057
  if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
4058
4058
  const t = e.classList;
4059
4059
  if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
@@ -4097,39 +4097,39 @@ var xu = {
4097
4097
  const c = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
4098
4098
  let u = c.nextNode();
4099
4099
  for (; u; ) {
4100
- const d = u;
4101
- if (d.parentElement && !Jt(d, e)) {
4102
- const p = d.textContent || "", v = p.match(/\S/), b = v ? v[0] : null;
4100
+ const h = u;
4101
+ if (h.parentElement && !Jt(h, e)) {
4102
+ const p = h.textContent || "", v = p.match(/\S/), b = v ? v[0] : null;
4103
4103
  !o && !s && Js(l, b, t) && (n.push(" "), a && r.set(i, a), i++, s = !0);
4104
4104
  for (let m = 0; m < p.length; m++) {
4105
4105
  const _ = p[m], N = /\s/.test(_);
4106
4106
  o ? N || (o = !1, n.push(_), r.set(i, {
4107
- node: d,
4107
+ node: h,
4108
4108
  offset: m
4109
4109
  }), a = {
4110
- node: d,
4110
+ node: h,
4111
4111
  offset: m
4112
4112
  }, i++, s = !1, l = _) : N ? (s || (n.push(" "), r.set(i, {
4113
- node: d,
4113
+ node: h,
4114
4114
  offset: m
4115
4115
  }), a = {
4116
- node: d,
4116
+ node: h,
4117
4117
  offset: m
4118
4118
  }, i++), s = !0) : (n.push(_), r.set(i, {
4119
- node: d,
4119
+ node: h,
4120
4120
  offset: m
4121
4121
  }), a = {
4122
- node: d,
4122
+ node: h,
4123
4123
  offset: m
4124
4124
  }, i++, s = !1, l = _);
4125
4125
  }
4126
4126
  }
4127
4127
  u = c.nextNode();
4128
4128
  }
4129
- const h = n.join("").trimEnd();
4130
- for (; r.has(h.length); ) r.delete(h.length);
4129
+ const f = n.join("").trimEnd();
4130
+ for (; r.has(f.length); ) r.delete(f.length);
4131
4131
  return {
4132
- text: h,
4132
+ text: f,
4133
4133
  map: r
4134
4134
  };
4135
4135
  }, Ln = null, go = Promise.resolve(), Cu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Au = async () => (Ln || (Ln = import("./sre-8x5k27Ii.js").then((e) => /* @__PURE__ */ Ka(e.default, 1)).then((e) => {
@@ -4169,7 +4169,7 @@ var xu = {
4169
4169
  }
4170
4170
  }, Zs = async (e, t = {}) => {
4171
4171
  if (!e.some((c) => c.type === "math")) return {
4172
- speechText: G(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
4172
+ speechText: V(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
4173
4173
  usedMathSpeech: !1,
4174
4174
  usedFallback: !1
4175
4175
  };
@@ -4182,7 +4182,7 @@ var xu = {
4182
4182
  }
4183
4183
  try {
4184
4184
  r || (r = await o());
4185
- const u = G(await Qs(r, c.mathml, t.language, "none", t.mathSpeech));
4185
+ const u = V(await Qs(r, c.mathml, t.language, "none", t.mathSpeech));
4186
4186
  if (u) {
4187
4187
  s.push(u), n = !0;
4188
4188
  continue;
@@ -4192,7 +4192,7 @@ var xu = {
4192
4192
  i = !0, console.debug("[TTSService] Math speech generation failed; using visible fallback", { message: u instanceof Error ? u.message : String(u) }), s.push(c.fallbackText);
4193
4193
  }
4194
4194
  }
4195
- const a = G(s.join(" "));
4195
+ const a = V(s.join(" "));
4196
4196
  let l;
4197
4197
  return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await $u(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
4198
4198
  speechText: a,
@@ -4205,7 +4205,7 @@ var xu = {
4205
4205
  "expanding-row",
4206
4206
  "floating-overlay",
4207
4207
  "left-aligned"
4208
- ]), yo = (e) => e && typeof e == "object" ? e : {}, Pu = (e) => e === "polly" || e === "google" || e === "server", fe = (e, t) => e === void 0 ? t : e, en = (e, t = "left-aligned") => typeof e == "string" && Lu.has(e) ? e : t, bo = Object.freeze([0.8, 1.25]), _o = (e) => {
4208
+ ]), yo = (e) => e && typeof e == "object" ? e : {}, Pu = (e) => e === "polly" || e === "google" || e === "server", de = (e, t) => e === void 0 ? t : e, en = (e, t = "left-aligned") => typeof e == "string" && Lu.has(e) ? e : t, bo = Object.freeze([0.8, 1.25]), _o = (e) => {
4209
4209
  if (typeof e != "number" || !Number.isFinite(e) || e <= 0) return;
4210
4210
  const t = Math.round(e * 100) / 100;
4211
4211
  return t === 1 ? void 0 : t;
@@ -4258,23 +4258,23 @@ var xu = {
4258
4258
  if (!Pu(r)) return t;
4259
4259
  const n = {
4260
4260
  ...t,
4261
- apiEndpoint: fe(t.apiEndpoint, "/api/tts"),
4262
- transportMode: fe(t.transportMode, "pie"),
4263
- endpointValidationMode: fe(t.endpointValidationMode, "voices"),
4264
- validateEndpoint: fe(t.validateEndpoint, !0),
4265
- includeAuthOnAssetFetch: fe(t.includeAuthOnAssetFetch, !1),
4266
- rate: fe(t.rate, 1),
4267
- language: fe(t.language, "en-US")
4261
+ apiEndpoint: de(t.apiEndpoint, "/api/tts"),
4262
+ transportMode: de(t.transportMode, "pie"),
4263
+ endpointValidationMode: de(t.endpointValidationMode, "voices"),
4264
+ validateEndpoint: de(t.validateEndpoint, !0),
4265
+ includeAuthOnAssetFetch: de(t.includeAuthOnAssetFetch, !1),
4266
+ rate: de(t.rate, 1),
4267
+ language: de(t.language, "en-US")
4268
4268
  };
4269
4269
  return r === "polly" ? {
4270
4270
  ...n,
4271
- defaultVoice: fe(n.defaultVoice, "Joanna"),
4272
- engine: fe(n.engine, "neural"),
4273
- format: fe(n.format, "mp3"),
4274
- speechMarksMode: fe(n.speechMarksMode, "word+sentence")
4271
+ defaultVoice: de(n.defaultVoice, "Joanna"),
4272
+ engine: de(n.engine, "neural"),
4273
+ format: de(n.format, "mp3"),
4274
+ speechMarksMode: de(n.speechMarksMode, "word+sentence")
4275
4275
  } : r === "google" ? {
4276
4276
  ...n,
4277
- defaultVoice: fe(n.defaultVoice, "en-US-Wavenet-A")
4277
+ defaultVoice: de(n.defaultVoice, "en-US-Wavenet-A")
4278
4278
  } : n;
4279
4279
  }, Pn = (e) => {
4280
4280
  const t = yo(e), r = yo(t.settings);
@@ -4373,7 +4373,7 @@ var xu = {
4373
4373
  "speechOutput"
4374
4374
  ],
4375
4375
  isVisibleInContext(e) {
4376
- return fn(e);
4376
+ return dn(e);
4377
4377
  },
4378
4378
  renderToolbar(e, t) {
4379
4379
  const r = () => Pn(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => Wu(r().speedOptions), i = () => na(r()), o = () => Du(r()), s = Ai(this.toolId, t.scope.level, t.scope.scopeId), a = () => {
@@ -4397,12 +4397,12 @@ var xu = {
4397
4397
  } }
4398
4398
  }],
4399
4399
  subscribeActive: (u) => {
4400
- const h = l(), d = (p) => {
4400
+ const f = l(), h = (p) => {
4401
4401
  const v = p.detail;
4402
4402
  u(v?.active === !0);
4403
4403
  };
4404
- return h.addEventListener(wo, d), () => {
4405
- h.removeEventListener(wo, d);
4404
+ return f.addEventListener(wo, h), () => {
4405
+ f.removeEventListener(wo, h);
4406
4406
  };
4407
4407
  },
4408
4408
  sync: () => {
@@ -4442,7 +4442,7 @@ var Vu = {
4442
4442
  ],
4443
4443
  pnpSupportIds: ["ruler", "measurement"],
4444
4444
  isVisibleInContext(e) {
4445
- return dn(e);
4445
+ return fn(e);
4446
4446
  },
4447
4447
  renderToolbar(e, t) {
4448
4448
  const r = Qe(this.toolId, t), n = {
@@ -4484,7 +4484,7 @@ var Vu = {
4484
4484
  ],
4485
4485
  pnpSupportIds: ["protractor", "angleMeasurement"],
4486
4486
  isVisibleInContext(e) {
4487
- return dn(e);
4487
+ return fn(e);
4488
4488
  },
4489
4489
  renderToolbar(e, t) {
4490
4490
  const r = Qe(this.toolId, t), n = {
@@ -4579,7 +4579,7 @@ var Vu = {
4579
4579
  "annotation"
4580
4580
  ],
4581
4581
  isVisibleInContext(e) {
4582
- return fn(e);
4582
+ return dn(e);
4583
4583
  },
4584
4584
  renderToolbar(e, t) {
4585
4585
  const r = Qe(this.toolId, t), n = {
@@ -4631,7 +4631,7 @@ var Vu = {
4631
4631
  "trackingGuide"
4632
4632
  ],
4633
4633
  isVisibleInContext(e) {
4634
- return fn(e);
4634
+ return dn(e);
4635
4635
  },
4636
4636
  renderToolbar(e, t) {
4637
4637
  const r = Qe(this.toolId, t), n = {
@@ -4737,7 +4737,7 @@ var Vu = {
4737
4737
  "annotation"
4738
4738
  ],
4739
4739
  isVisibleInContext(e) {
4740
- return fn(e);
4740
+ return dn(e);
4741
4741
  },
4742
4742
  renderToolbar(e, t) {
4743
4743
  const r = Qe(this.toolId, t), n = {
@@ -4780,7 +4780,7 @@ var Vu = {
4780
4780
  "graphingTool"
4781
4781
  ],
4782
4782
  isVisibleInContext(e) {
4783
- return dn(e);
4783
+ return fn(e);
4784
4784
  },
4785
4785
  renderToolbar(e, t) {
4786
4786
  const r = Qe(this.toolId, t), n = {
@@ -4873,7 +4873,7 @@ var Vu = {
4873
4873
  };
4874
4874
  }
4875
4875
  }, Zu = [
4876
- xu,
4876
+ Eu,
4877
4877
  ju,
4878
4878
  Vu,
4879
4879
  qu,
@@ -4915,7 +4915,7 @@ function nh() {
4915
4915
  for (const r of e.getAllTools()) for (const n of r.pnpSupportIds || []) t.add(n);
4916
4916
  return [...t].sort();
4917
4917
  }
4918
- var ih = nh(), Ef = {
4918
+ var ih = nh(), xd = {
4919
4919
  supports: [...ih],
4920
4920
  prohibitedSupports: [],
4921
4921
  activateAtInit: []
@@ -5032,7 +5032,7 @@ var ih = nh(), Ef = {
5032
5032
  itemGlossary: "itemGlossary",
5033
5033
  tutorialAvailable: "tutorialAvailable"
5034
5034
  }
5035
- }, xf = Object.values(oh).flatMap((e) => Object.values(e)), Cf = Fs("ToolCoordinator"), ko;
5035
+ }, Ed = Object.values(oh).flatMap((e) => Object.values(e)), Cd = Fs("ToolCoordinator"), ko;
5036
5036
  (function(e) {
5037
5037
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
5038
5038
  })(ko || (ko = {}));
@@ -5045,7 +5045,7 @@ var sh = /* @__PURE__ */ new Set([
5045
5045
  "say-as",
5046
5046
  "voice",
5047
5047
  "lang"
5048
- ]), Eo = /* @__PURE__ */ new Set(["audio", "phoneme"]), ia = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), Pr = (e, t, r) => {
5048
+ ]), xo = /* @__PURE__ */ new Set(["audio", "phoneme"]), ia = (e) => e.replace(/&quot;/g, '"').replace(/&apos;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&nbsp;/g, " ").replace(/&#160;/g, " ").replace(/&amp;/g, "&"), Pr = (e, t, r) => {
5049
5049
  for (let n = 0; n < t.length; n++) e.push({
5050
5050
  char: t[n],
5051
5051
  rawOffset: r === null ? null : r + n
@@ -5053,7 +5053,7 @@ var sh = /* @__PURE__ */ new Set([
5053
5053
  }, ah = (e, t, r) => {
5054
5054
  const n = t.slice(r).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
5055
5055
  return n ? (Pr(e, ia(n[0]), r), n[0].length) : 0;
5056
- }, xo = (e) => {
5056
+ }, Eo = (e) => {
5057
5057
  e.push({
5058
5058
  char: " ",
5059
5059
  rawOffset: null
@@ -5084,9 +5084,9 @@ var sh = /* @__PURE__ */ new Set([
5084
5084
  const s = e[i];
5085
5085
  if (s !== "<") {
5086
5086
  if (s === "&") {
5087
- const d = ah(t, e, i);
5088
- if (d > 0) {
5089
- i += d;
5087
+ const h = ah(t, e, i);
5088
+ if (h > 0) {
5089
+ i += h;
5090
5090
  continue;
5091
5091
  }
5092
5092
  }
@@ -5099,31 +5099,31 @@ var sh = /* @__PURE__ */ new Set([
5099
5099
  continue;
5100
5100
  }
5101
5101
  n = !0;
5102
- const l = e.slice(i, a + 1), c = ch(l), u = /^<\s*\//.test(l), h = /\/\s*>$/.test(l);
5102
+ const l = e.slice(i, a + 1), c = ch(l), u = /^<\s*\//.test(l), f = /\/\s*>$/.test(l);
5103
5103
  if (!u && c === "sub") {
5104
- const d = uh(l, "alias");
5105
- if (!d) {
5104
+ const h = uh(l, "alias");
5105
+ if (!h) {
5106
5106
  r = !0, i = a + 1;
5107
5107
  continue;
5108
5108
  }
5109
- Pr(t, d, null);
5109
+ Pr(t, h, null);
5110
5110
  const p = e.toLowerCase().indexOf("</sub>", a + 1);
5111
5111
  i = p >= 0 ? p + 6 : a + 1;
5112
5112
  continue;
5113
5113
  }
5114
5114
  if (!u && c === "break") {
5115
- xo(t), i = a + 1;
5115
+ Eo(t), i = a + 1;
5116
5116
  continue;
5117
5117
  }
5118
- if (!u && Eo.has(c) && (r = !0, h)) {
5118
+ if (!u && xo.has(c) && (r = !0, f)) {
5119
5119
  i = a + 1;
5120
5120
  continue;
5121
5121
  }
5122
- c && !sh.has(c) && !Eo.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && xo(t), i = a + 1;
5122
+ c && !sh.has(c) && !xo.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && Eo(t), i = a + 1;
5123
5123
  }
5124
5124
  const o = lh(t);
5125
5125
  return {
5126
- spokenText: G(o.text),
5126
+ spokenText: V(o.text),
5127
5127
  rawToSpokenOffsetMap: o.rawToSpokenOffsetMap,
5128
5128
  unsupportedSemantic: r,
5129
5129
  hasMarkup: n
@@ -5140,7 +5140,7 @@ var sh = /* @__PURE__ */ new Set([
5140
5140
  ["eight", "8"],
5141
5141
  ["nine", "9"],
5142
5142
  ["ten", "10"]
5143
- ]), dh = [
5143
+ ]), fh = [
5144
5144
  {
5145
5145
  phrase: [
5146
5146
  "plus",
@@ -5227,7 +5227,7 @@ var sh = /* @__PURE__ */ new Set([
5227
5227
  });
5228
5228
  }
5229
5229
  return t;
5230
- }, ri = (e) => sa.get(e.normalized) || e.normalized, fh = (e, t) => {
5230
+ }, ri = (e) => sa.get(e.normalized) || e.normalized, dh = (e, t) => {
5231
5231
  const r = [];
5232
5232
  for (let n = 0; n < e.length; n++) {
5233
5233
  for (let i = 0; i < t.length; i++) ri(e[n]) === ri(t[i]) && r.push({
@@ -5236,7 +5236,7 @@ var sh = /* @__PURE__ */ new Set([
5236
5236
  visibleToken: i,
5237
5237
  score: 10
5238
5238
  });
5239
- for (const i of dh) {
5239
+ for (const i of fh) {
5240
5240
  const o = e.slice(n, n + i.phrase.length);
5241
5241
  if (o.length === i.phrase.length && o.every((s, a) => s.normalized === i.phrase[a]))
5242
5242
  for (let s = 0; s < t.length; s++)
@@ -5250,14 +5250,14 @@ var sh = /* @__PURE__ */ new Set([
5250
5250
  }
5251
5251
  return r;
5252
5252
  }, ph = (e, t) => {
5253
- const r = fh(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
5253
+ const r = dh(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
5254
5254
  for (let l = 0; l < r.length; l++) {
5255
5255
  const c = r[l];
5256
5256
  n[l] = c.score;
5257
5257
  for (let u = 0; u < l; u++) {
5258
- const h = r[u];
5259
- if (h.spokenEndToken <= c.spokenStartToken && h.visibleToken < c.visibleToken) {
5260
- const d = c.spokenStartToken - h.spokenEndToken, p = c.visibleToken - h.visibleToken - 1, v = Math.max(0, Math.abs(d - p) - 2), b = n[u] + c.score - v;
5258
+ const f = r[u];
5259
+ if (f.spokenEndToken <= c.spokenStartToken && f.visibleToken < c.visibleToken) {
5260
+ const h = c.spokenStartToken - f.spokenEndToken, p = c.visibleToken - f.visibleToken - 1, v = Math.max(0, Math.abs(h - p) - 2), b = n[u] + c.score - v;
5261
5261
  b > n[l] && (n[l] = b, i[l] = u);
5262
5262
  }
5263
5263
  }
@@ -5270,12 +5270,12 @@ var sh = /* @__PURE__ */ new Set([
5270
5270
  for (; a >= 0; )
5271
5271
  s.unshift(r[a]), a = i[a];
5272
5272
  return s.map((l) => {
5273
- const c = e[l.spokenStartToken], u = e[l.spokenEndToken - 1], h = t[l.visibleToken];
5273
+ const c = e[l.spokenStartToken], u = e[l.spokenEndToken - 1], f = t[l.visibleToken];
5274
5274
  return {
5275
5275
  spokenStart: c.start,
5276
5276
  spokenEnd: u.end,
5277
- visibleStart: h.start,
5278
- visibleEnd: h.end,
5277
+ visibleStart: f.start,
5278
+ visibleEnd: f.end,
5279
5279
  score: l.score
5280
5280
  };
5281
5281
  });
@@ -5284,13 +5284,13 @@ var sh = /* @__PURE__ */ new Set([
5284
5284
  const n = e.length / Math.max(1, Math.min(t.length, r.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
5285
5285
  return Math.min(1, n * i);
5286
5286
  }, aa = (e) => {
5287
- const t = oa(e.speechText), r = G(e.visibleText), n = t.spokenText, i = ti(n), o = ti(r), s = t.unsupportedSemantic ? [] : ph(i, o), a = gh(s, i, o), l = n === r && n.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5287
+ const t = oa(e.speechText), r = V(e.visibleText), n = t.spokenText, i = ti(n), o = ti(r), s = t.unsupportedSemantic ? [] : ph(i, o), a = gh(s, i, o), l = n === r && n.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", f = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
5288
5288
  return {
5289
5289
  speechText: e.speechText,
5290
5290
  spokenText: n,
5291
5291
  visibleText: r,
5292
5292
  playbackMode: u,
5293
- boundaryOffsetMode: h,
5293
+ boundaryOffsetMode: f,
5294
5294
  anchors: s,
5295
5295
  confidence: a,
5296
5296
  spokenTokens: i,
@@ -5425,7 +5425,7 @@ var sh = /* @__PURE__ */ new Set([
5425
5425
  default:
5426
5426
  return "unknown";
5427
5427
  }
5428
- }, kh = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Eh = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? ca.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? yh.get(e) || [] : [], Rt = (e) => {
5428
+ }, kh = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), xh = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? ca.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? yh.get(e) || [] : [], Rt = (e) => {
5429
5429
  const t = e.normalized ?? kh(e.text, e.kind || "unknown");
5430
5430
  return {
5431
5431
  id: `math-token-${e.state.nextId++}`,
@@ -5433,7 +5433,7 @@ var sh = /* @__PURE__ */ new Set([
5433
5433
  role: e.role,
5434
5434
  text: e.text,
5435
5435
  normalized: t,
5436
- spokenAliases: Eh(e.text, e.kind, e.role),
5436
+ spokenAliases: xh(e.text, e.kind, e.role),
5437
5437
  sourceElement: e.sourceElement,
5438
5438
  path: e.path,
5439
5439
  target: e.target || Xe(e.sourceElement, "element-range"),
@@ -5443,7 +5443,7 @@ var sh = /* @__PURE__ */ new Set([
5443
5443
  e[r].push(t);
5444
5444
  }, ua = (e, t, r) => {
5445
5445
  Kt(e).forEach((n, i) => Je(n, t, `${r}/${Mt(n)}[${i}]`));
5446
- }, xh = (e, t, r) => {
5446
+ }, Eh = (e, t, r) => {
5447
5447
  const n = Kt(e);
5448
5448
  n[0] && Je(n[0], t, `${r}/numerator`), $t(t, Rt({
5449
5449
  state: t,
@@ -5554,7 +5554,7 @@ var sh = /* @__PURE__ */ new Set([
5554
5554
  Ih(e, t, r);
5555
5555
  return;
5556
5556
  case "mfrac":
5557
- xh(e, t, r);
5557
+ Eh(e, t, r);
5558
5558
  return;
5559
5559
  case "msup":
5560
5560
  Ah(e, t, r);
@@ -5671,7 +5671,7 @@ var sh = /* @__PURE__ */ new Set([
5671
5671
  ["eight", "8"],
5672
5672
  ["nine", "9"],
5673
5673
  ["ten", "10"]
5674
- ]), da = (e) => {
5674
+ ]), fa = (e) => {
5675
5675
  const t = e.toLowerCase();
5676
5676
  return Bh.get(t) || t;
5677
5677
  }, Dh = (e) => {
@@ -5681,7 +5681,7 @@ var sh = /* @__PURE__ */ new Set([
5681
5681
  t.push({
5682
5682
  id: `speech-token-${t.length}`,
5683
5683
  text: n,
5684
- normalized: da(n),
5684
+ normalized: fa(n),
5685
5685
  start: i,
5686
5686
  end: i + n.length,
5687
5687
  sourceStart: i,
@@ -5704,7 +5704,7 @@ var sh = /* @__PURE__ */ new Set([
5704
5704
  }, $i = (e) => {
5705
5705
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
5706
5706
  const t = e.match(ha);
5707
- return t?.[0] ? da(t[0]) : null;
5707
+ return t?.[0] ? fa(t[0]) : null;
5708
5708
  }, Fh = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, jh = (e, t) => {
5709
5709
  const r = e.rawToSpokenOffsetMap.get(t);
5710
5710
  if (r !== void 0) return r;
@@ -5859,7 +5859,7 @@ var sh = /* @__PURE__ */ new Set([
5859
5859
  "width",
5860
5860
  "xmlns",
5861
5861
  "xml:lang"
5862
- ]), fa = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Xh = (e) => fa(e).replace(/"/g, "&quot;"), Jh = (e, t) => {
5862
+ ]), da = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Xh = (e) => da(e).replace(/"/g, "&quot;"), Jh = (e, t) => {
5863
5863
  const r = e.toLowerCase(), n = t.trim().toLowerCase();
5864
5864
  return !!(r.startsWith("on") || !Kh.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
5865
5865
  }, Qh = (e) => {
@@ -5868,7 +5868,7 @@ var sh = /* @__PURE__ */ new Set([
5868
5868
  const r = e.namespaceURI;
5869
5869
  return !r || r === oi || r === "http://www.w3.org/1999/xhtml";
5870
5870
  }, pa = (e) => {
5871
- if (e.nodeType === Node.TEXT_NODE) return fa(e.textContent || "");
5871
+ if (e.nodeType === Node.TEXT_NODE) return da(e.textContent || "");
5872
5872
  if (e.nodeType === Node.COMMENT_NODE) return "";
5873
5873
  if (e.nodeType !== Node.ELEMENT_NODE) return null;
5874
5874
  const t = e;
@@ -5907,25 +5907,25 @@ var sh = /* @__PURE__ */ new Set([
5907
5907
  }), va = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", ma = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", ya = (e) => {
5908
5908
  const t = e.tagName?.toLowerCase();
5909
5909
  return t === "annotation" || t === "annotation-xml";
5910
- }, ed = (e) => {
5910
+ }, ef = (e) => {
5911
5911
  const t = e.getAttribute("data-mathml");
5912
5912
  return t && t.trim() ? t : null;
5913
- }, td = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, rd = (e) => {
5913
+ }, tf = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, rf = (e) => {
5914
5914
  if (e.tagName.toLowerCase() === "math") return Nn(e.outerHTML);
5915
- const t = ed(e);
5915
+ const t = ef(e);
5916
5916
  if (t) {
5917
5917
  const r = Nn(t);
5918
5918
  if (r) return r;
5919
5919
  }
5920
5920
  if (va(e)) {
5921
- const r = td(e);
5921
+ const r = tf(e);
5922
5922
  if (r) {
5923
5923
  const n = Nn(r);
5924
5924
  if (n) return n;
5925
5925
  }
5926
5926
  }
5927
5927
  return null;
5928
- }, nd = /* @__PURE__ */ new Set([
5928
+ }, nf = /* @__PURE__ */ new Set([
5929
5929
  "P",
5930
5930
  "H1",
5931
5931
  "H2",
@@ -5941,7 +5941,7 @@ var sh = /* @__PURE__ */ new Set([
5941
5941
  "FIGCAPTION",
5942
5942
  "LABEL",
5943
5943
  "BUTTON"
5944
- ]), id = /* @__PURE__ */ new Set([
5944
+ ]), of = /* @__PURE__ */ new Set([
5945
5945
  "heading",
5946
5946
  "listitem",
5947
5947
  "option",
@@ -5950,18 +5950,18 @@ var sh = /* @__PURE__ */ new Set([
5950
5950
  "cell",
5951
5951
  "columnheader",
5952
5952
  "rowheader"
5953
- ]), od = (e, t) => {
5953
+ ]), sf = (e, t) => {
5954
5954
  let r = e.parentElement, n = null;
5955
5955
  for (; r && r !== t; ) {
5956
5956
  const i = (r.getAttribute("role") || "").toLowerCase(), o = r.tagName.toUpperCase();
5957
- if (nd.has(o) || id.has(i)) {
5957
+ if (nf.has(o) || of.has(i)) {
5958
5958
  n = r;
5959
5959
  break;
5960
5960
  }
5961
5961
  r = r.parentElement;
5962
5962
  }
5963
5963
  return n || t;
5964
- }, sd = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || va(e), Tt = (e, t, r) => {
5964
+ }, af = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || va(e), Tt = (e, t, r) => {
5965
5965
  /[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), r ? (e.map.set(e.position, r), e.lastMapped = r) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
5966
5966
  }, ba = (e, t) => {
5967
5967
  if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
@@ -5994,7 +5994,7 @@ var sh = /* @__PURE__ */ new Set([
5994
5994
  offset: i
5995
5995
  }), n = !0, e.lastCharWasWhitespace = !1;
5996
5996
  }
5997
- }, ad = (e, t) => {
5997
+ }, lf = (e, t) => {
5998
5998
  for (let r = 0; r < t.text.length; r++) {
5999
5999
  const n = t.text[r], i = /\s/.test(n), o = t.map.get(r) || null, s = o?.node || e.lastMapped?.node || null, a = o?.offset ?? e.lastMapped?.offset ?? 0, l = o ? {
6000
6000
  node: o.node,
@@ -6022,7 +6022,7 @@ var sh = /* @__PURE__ */ new Set([
6022
6022
  offset: a
6023
6023
  });
6024
6024
  }
6025
- }, ld = (e) => {
6025
+ }, cf = (e) => {
6026
6026
  if (typeof DOMParser > "u") return "";
6027
6027
  const t = new DOMParser().parseFromString(e, "application/xml");
6028
6028
  if (t.getElementsByTagName("parsererror").length > 0) return "";
@@ -6037,8 +6037,8 @@ var sh = /* @__PURE__ */ new Set([
6037
6037
  if (!ya(o))
6038
6038
  for (const s of Array.from(o.childNodes)) n(s);
6039
6039
  };
6040
- return n(t.documentElement), G(r.join(" "));
6041
- }, cd = (e, t, r) => {
6040
+ return n(t.documentElement), V(r.join(" "));
6041
+ }, uf = (e, t, r) => {
6042
6042
  const n = ga(r), i = (a) => {
6043
6043
  if (Jt(a, e)) return;
6044
6044
  if (a.nodeType === 3) {
@@ -6051,12 +6051,12 @@ var sh = /* @__PURE__ */ new Set([
6051
6051
  for (const c of Array.from(l.childNodes)) i(c);
6052
6052
  };
6053
6053
  i(e), Ta(n);
6054
- const o = G(n.chars.join(""));
6054
+ const o = V(n.chars.join(""));
6055
6055
  if (o) return {
6056
6056
  text: o,
6057
6057
  map: n.map
6058
6058
  };
6059
- const s = ld(t);
6059
+ const s = cf(t);
6060
6060
  return s ? {
6061
6061
  text: s,
6062
6062
  map: /* @__PURE__ */ new Map()
@@ -6064,11 +6064,11 @@ var sh = /* @__PURE__ */ new Set([
6064
6064
  }, Ta = (e) => {
6065
6065
  for (; e.chars.length > 0 && /\s/.test(e.chars[e.chars.length - 1]); )
6066
6066
  e.chars.pop(), e.position--, e.map.delete(e.position);
6067
- }, ud = (e, t) => {
6067
+ }, hf = (e, t) => {
6068
6068
  const r = ga(t), n = [];
6069
6069
  let i = 0, o, s = !1;
6070
6070
  const a = () => {
6071
- const u = G(r.chars.slice(i, r.chars.length).join(""));
6071
+ const u = V(r.chars.slice(i, r.chars.length).join(""));
6072
6072
  u && n.push({
6073
6073
  type: "text",
6074
6074
  text: u,
@@ -6077,28 +6077,28 @@ var sh = /* @__PURE__ */ new Set([
6077
6077
  }, l = (u) => {
6078
6078
  if (Jt(u, e)) return;
6079
6079
  if (u.nodeType === Node.TEXT_NODE) {
6080
- const p = od(u, e);
6080
+ const p = sf(u, e);
6081
6081
  o && p !== o && a(), o = p, _a(r, u);
6082
6082
  return;
6083
6083
  }
6084
6084
  if (u.nodeType !== Node.ELEMENT_NODE) return;
6085
- const h = u;
6086
- if (ma(h)) return;
6087
- const d = rd(h);
6088
- if (d) {
6085
+ const f = u;
6086
+ if (ma(f)) return;
6087
+ const h = rf(f);
6088
+ if (h) {
6089
6089
  a();
6090
- const p = cd(h, d, t);
6091
- ad(r, p);
6092
- const v = G(p.text);
6090
+ const p = uf(f, h, t);
6091
+ lf(r, p);
6092
+ const v = V(p.text);
6093
6093
  n.push({
6094
6094
  type: "math",
6095
- mathml: d,
6095
+ mathml: h,
6096
6096
  fallbackText: v,
6097
- sourceElement: h
6097
+ sourceElement: f
6098
6098
  }), i = r.chars.length, s = !0;
6099
6099
  return;
6100
6100
  }
6101
- for (const p of Array.from(h.childNodes)) l(p);
6101
+ for (const p of Array.from(f.childNodes)) l(p);
6102
6102
  };
6103
6103
  for (const u of Array.from(e.childNodes)) l(u);
6104
6104
  Ta(r), a();
@@ -6111,7 +6111,7 @@ var sh = /* @__PURE__ */ new Set([
6111
6111
  containsMathMarkup: s
6112
6112
  };
6113
6113
  }, cr = (e, t) => {
6114
- if (!sd(e)) {
6114
+ if (!af(e)) {
6115
6115
  const { text: r, map: n } = Zr(e, t);
6116
6116
  return {
6117
6117
  visibleText: r,
@@ -6123,8 +6123,8 @@ var sh = /* @__PURE__ */ new Set([
6123
6123
  containsMathMarkup: !1
6124
6124
  };
6125
6125
  }
6126
- return ud(e, t);
6127
- }, hd = (e, t) => Zs([e], t), dd = (e) => (e || "en").split("-")[0].toLowerCase() || "en", fd = /* @__PURE__ */ new Set([
6126
+ return hf(e, t);
6127
+ }, ff = (e, t) => Zs([e], t), df = (e) => (e || "en").split("-")[0].toLowerCase() || "en", pf = /* @__PURE__ */ new Set([
6128
6128
  "H1",
6129
6129
  "H2",
6130
6130
  "H3",
@@ -6134,34 +6134,34 @@ var sh = /* @__PURE__ */ new Set([
6134
6134
  "LI",
6135
6135
  "LABEL",
6136
6136
  "BUTTON"
6137
- ]), pd = /* @__PURE__ */ new Set([
6137
+ ]), gf = /* @__PURE__ */ new Set([
6138
6138
  "heading",
6139
6139
  "listitem",
6140
6140
  "option",
6141
6141
  "radio"
6142
- ]), gd = (e) => {
6142
+ ]), vf = (e) => {
6143
6143
  if (e.type !== "text" || !e.sourceElement) return !1;
6144
6144
  const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
6145
- return fd.has(t) || pd.has(r);
6146
- }, vd = async (e) => {
6147
- const t = e.resolveMathSpeech ?? hd, { visibleText: r } = e, n = [];
6145
+ return pf.has(t) || gf.has(r);
6146
+ }, mf = async (e) => {
6147
+ const t = e.resolveMathSpeech ?? ff, { visibleText: r } = e, n = [];
6148
6148
  let i = 0;
6149
6149
  const o = (a) => {
6150
- const l = G(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, h = u + l.length;
6151
- return i = h, {
6150
+ const l = V(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, f = u + l.length;
6151
+ return i = f, {
6152
6152
  start: u,
6153
- end: h
6153
+ end: f
6154
6154
  };
6155
6155
  }, s = [];
6156
6156
  for (let a = 0; a < e.chunks.length; a++) {
6157
6157
  const l = e.chunks[a];
6158
6158
  if (l.type === "text") {
6159
- const p = gd(l) ? [{
6159
+ const p = vf(l) ? [{
6160
6160
  text: l.text,
6161
6161
  offset: 0
6162
6162
  }] : Mi(l.text, { locale: e.language });
6163
6163
  for (const v of p) {
6164
- const b = G(v.text);
6164
+ const b = V(v.text);
6165
6165
  if (!b) continue;
6166
6166
  const m = o(b);
6167
6167
  n.push({
@@ -6180,28 +6180,28 @@ var sh = /* @__PURE__ */ new Set([
6180
6180
  language: e.language,
6181
6181
  produceSsml: e.produceSsml,
6182
6182
  mathSpeech: e.mathSpeech
6183
- }), h = !u.speechText, d = u.speechText || l.fallbackText;
6183
+ }), f = !u.speechText, h = u.speechText || l.fallbackText;
6184
6184
  n.push({
6185
6185
  sourceChunkIndex: a,
6186
6186
  segment: {
6187
6187
  kind: "math",
6188
- spokenText: d,
6188
+ spokenText: h,
6189
6189
  mathml: l.mathml,
6190
6190
  fallbackText: l.fallbackText,
6191
6191
  visibleSpan: c,
6192
- usedFallback: h,
6192
+ usedFallback: f,
6193
6193
  ssml: u.ssml
6194
6194
  }
6195
- }), s.push(d);
6195
+ }), s.push(h);
6196
6196
  }
6197
6197
  return {
6198
6198
  segments: n,
6199
- locale: dd(e.language),
6199
+ locale: df(e.language),
6200
6200
  visibleText: r,
6201
- plainSpeechText: G(s.join(" "))
6201
+ plainSpeechText: V(s.join(" "))
6202
6202
  };
6203
- }, md = (e) => (e || "en").split("-")[0].toLowerCase() || "en", yd = "sre-v1", bd = 256, si = (e) => Array.isArray(e) ? `array:[${e.map(si).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${si(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, Ro = (e, t, r, n) => `${yd}\0${md(e)}\0${t ? "ssml" : "plain"}\0${si(r ?? null)}\0${n}`, _d = (e = {}) => {
6204
- const t = Math.max(1, e.maxEntries ?? bd), r = e.resolve ?? ((o, s) => Zs([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
6203
+ }, yf = (e) => (e || "en").split("-")[0].toLowerCase() || "en", bf = "sre-v1", _f = 256, si = (e) => Array.isArray(e) ? `array:[${e.map(si).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${si(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, Ro = (e, t, r, n) => `${bf}\0${yf(e)}\0${t ? "ssml" : "plain"}\0${si(r ?? null)}\0${n}`, Tf = (e = {}) => {
6204
+ const t = Math.max(1, e.maxEntries ?? _f), r = e.resolve ?? ((o, s) => Zs([o], s)), n = /* @__PURE__ */ new Map(), i = (o, s) => {
6205
6205
  for (n.delete(o), n.set(o, s); n.size > t; ) {
6206
6206
  const a = n.keys().next().value;
6207
6207
  a !== void 0 && n.delete(a);
@@ -6211,17 +6211,17 @@ var sh = /* @__PURE__ */ new Set([
6211
6211
  const a = pn(s.mathSpeech), l = s.produceSsml === !0, c = Ro(s.language, l, a, o.mathml), u = n.get(c);
6212
6212
  if (u)
6213
6213
  return n.delete(c), n.set(c, u), u;
6214
- const h = await r(o, {
6214
+ const f = await r(o, {
6215
6215
  ...s,
6216
6216
  mathSpeech: a
6217
6217
  });
6218
- return l && h.ssml && t > 1 && i(Ro(s.language, !1, a, o.mathml), {
6219
- speechText: h.speechText,
6220
- usedMathSpeech: h.usedMathSpeech,
6221
- usedFallback: h.usedFallback
6222
- }), i(c, h), h;
6218
+ return l && f.ssml && t > 1 && i(Ro(s.language, !1, a, o.mathml), {
6219
+ speechText: f.speechText,
6220
+ usedMathSpeech: f.usedMathSpeech,
6221
+ usedFallback: f.usedFallback
6222
+ }), i(c, f), f;
6223
6223
  };
6224
- }, Td = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Tr({ speechText: e }).tokens[0]?.normalized || null, Sd = (e, t) => {
6224
+ }, Sf = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Tr({ speechText: e }).tokens[0]?.normalized || null, wf = (e, t) => {
6225
6225
  const r = Tr({ speechText: e.speechText });
6226
6226
  if (!Number.isFinite(t.position)) return {
6227
6227
  boundary: null,
@@ -6240,8 +6240,8 @@ var sh = /* @__PURE__ */ new Set([
6240
6240
  } : null,
6241
6241
  spokenText: r.spokenText
6242
6242
  };
6243
- }, wd = (e, t, r) => r ? Tr({ speechText: e }).tokens.find((n) => n.start <= t && t < n.end)?.normalized === r : !0, kd = (e, t) => {
6244
- const r = Td(t.word);
6243
+ }, kf = (e, t, r) => r ? Tr({ speechText: e }).tokens.find((n) => n.start <= t && t < n.end)?.normalized === r : !0, xf = (e, t) => {
6244
+ const r = Sf(t.word);
6245
6245
  if (e.id !== t.chunkId) return {
6246
6246
  chunkId: t.chunkId,
6247
6247
  normalizedWord: r,
@@ -6262,10 +6262,10 @@ var sh = /* @__PURE__ */ new Set([
6262
6262
  if (e.catalogAlignment)
6263
6263
  n = vh(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
6264
6264
  else {
6265
- const o = Sd(e, t);
6265
+ const o = wf(e, t);
6266
6266
  n = o.boundary, i = o.spokenText;
6267
6267
  }
6268
- return n ? wd(i, n.start, r) ? {
6268
+ return n ? kf(i, n.start, r) ? {
6269
6269
  chunkId: e.id,
6270
6270
  normalizedWord: r,
6271
6271
  chunkSpokenStart: n.start,
@@ -6318,14 +6318,14 @@ var sh = /* @__PURE__ */ new Set([
6318
6318
  "mjx-munder",
6319
6319
  "mjx-mover",
6320
6320
  "mjx-munderover"
6321
- ].join(","), Ea = (e) => e.type === "text-range" ? e.node.parentElement : e.element, gn = (e) => {
6321
+ ].join(","), xa = (e) => e.type === "text-range" ? e.node.parentElement : e.element, gn = (e) => {
6322
6322
  let t = e;
6323
6323
  for (; t; ) {
6324
6324
  if (t.localName?.toLowerCase() === "mjx-container") return t;
6325
6325
  t = t.parentElement;
6326
6326
  }
6327
6327
  return null;
6328
- }, $o = (e) => !e || gn(e) ? !1 : !Jt(e), xa = (e) => {
6328
+ }, $o = (e) => !e || gn(e) ? !1 : !Jt(e), Ea = (e) => {
6329
6329
  const t = e.getBoundingClientRect?.();
6330
6330
  return !!(t && t.width > 0 && t.height > 0);
6331
6331
  }, li = (e) => {
@@ -6342,7 +6342,7 @@ var sh = /* @__PURE__ */ new Set([
6342
6342
  if (!n || t[r].localName.toLowerCase() !== n) return !1;
6343
6343
  }
6344
6344
  return !0;
6345
- }, Ed = (e, t) => {
6345
+ }, Ef = (e, t) => {
6346
6346
  if (!e || !Sa.has(e.localName.toLowerCase()) || t.querySelector(ka)) return null;
6347
6347
  const r = li(e), n = t.querySelector("mjx-math");
6348
6348
  if (!r || !n) return null;
@@ -6351,22 +6351,22 @@ var sh = /* @__PURE__ */ new Set([
6351
6351
  const s = Array.from(n.querySelectorAll(wa));
6352
6352
  if (!Ca(i, s)) return null;
6353
6353
  const a = s[o];
6354
- return !a || !xa(a) ? null : a;
6355
- }, xd = (e) => {
6354
+ return !a || !Ea(a) ? null : a;
6355
+ }, Cf = (e) => {
6356
6356
  const t = gn(e);
6357
6357
  if (t) {
6358
6358
  if (t.querySelector(ka)) return "expression";
6359
6359
  const n = li(e) ?? e, i = t.querySelector("mjx-math");
6360
6360
  if (!i) return "expression";
6361
6361
  const o = Array.from(n.querySelectorAll(ai)), s = Array.from(i.querySelectorAll(wa));
6362
- return Ca(o, s) && s.some((a) => xa(a)) ? "token" : "expression";
6362
+ return Ca(o, s) && s.some((a) => Ea(a)) ? "token" : "expression";
6363
6363
  }
6364
6364
  const r = li(e) ?? e;
6365
6365
  return Array.from(r.querySelectorAll(ai)).some((n) => !Jt(n)) ? "token" : "expression";
6366
6366
  }, ci = (e) => {
6367
- const t = Ea(e), r = gn(t);
6367
+ const t = xa(e), r = gn(t);
6368
6368
  if (r) {
6369
- const n = Ed(t, r);
6369
+ const n = Ef(t, r);
6370
6370
  return n ? {
6371
6371
  type: "element",
6372
6372
  quality: "semantic-token",
@@ -6388,16 +6388,16 @@ var sh = /* @__PURE__ */ new Set([
6388
6388
  quality: e.quality === "region-fallback" ? "expression" : "semantic-token",
6389
6389
  element: e.element
6390
6390
  } : null;
6391
- }, Cd = ci, Ad = () => {
6391
+ }, Af = ci, Mf = () => {
6392
6392
  const e = /* @__PURE__ */ new WeakMap();
6393
6393
  return (t) => {
6394
- const r = Ea(t), n = gn(r);
6394
+ const r = xa(t), n = gn(r);
6395
6395
  if (!r || !n) return ci(t);
6396
6396
  if (e.has(r)) return e.get(r) ?? null;
6397
6397
  const i = ci(t);
6398
6398
  return e.set(r, i), i;
6399
6399
  };
6400
- }, Md = (e, t, r, n = e.mathAlignments, i = Cd) => {
6400
+ }, Of = (e, t, r, n = e.mathAlignments, i = Af) => {
6401
6401
  if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
6402
6402
  let o = null;
6403
6403
  for (const s of n) {
@@ -6426,7 +6426,7 @@ var sh = /* @__PURE__ */ new Set([
6426
6426
  } catch {
6427
6427
  return null;
6428
6428
  }
6429
- }, Od = (e, t) => {
6429
+ }, If = (e, t) => {
6430
6430
  if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
6431
6431
  const r = mh(e.catalogAlignment, t.chunkSpokenStart);
6432
6432
  if (!r) return null;
@@ -6436,7 +6436,7 @@ var sh = /* @__PURE__ */ new Set([
6436
6436
  quality: e.catalogAlignment.playbackMode === "exact-word" ? "exact-word" : "semantic-token",
6437
6437
  range: n
6438
6438
  } : null;
6439
- }, Id = (e) => e.regionRange ? {
6439
+ }, Rf = (e) => e.regionRange ? {
6440
6440
  type: "range",
6441
6441
  quality: "region",
6442
6442
  range: e.regionRange
@@ -6448,7 +6448,7 @@ var sh = /* @__PURE__ */ new Set([
6448
6448
  if (t.length !== 1) return null;
6449
6449
  const r = t[0]?.alignment.result.fallbackTarget;
6450
6450
  return r ? e.renderedMathTargetResolver(r) : null;
6451
- }, Rd = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
6451
+ }, $f = (e, t) => e ? t.mathAlignments.filter(({ element: r }) => {
6452
6452
  try {
6453
6453
  return e.type === "range" ? e.range.intersectsNode(r) : e.type === "element" ? e.element === r || e.element.contains(r) : e.node.parentElement?.contains(r) || !1;
6454
6454
  } catch {
@@ -6460,18 +6460,18 @@ var sh = /* @__PURE__ */ new Set([
6460
6460
  quality: "region",
6461
6461
  confidence: 0,
6462
6462
  reason: "boundary chunk id was not found"
6463
- }), No = (e) => e.length === 1 ? e[0].element : null, $d = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Ld = 3, Pd = (e, t, r) => {
6463
+ }), No = (e) => e.length === 1 ? e[0].element : null, Lf = (e, t) => t.length > 0 && t.every(({ element: r }) => e.mathCapabilityByElement.get(r) === "token"), Pf = 3, Nf = (e, t, r) => {
6464
6464
  if (!t || t.type !== "range") return !1;
6465
6465
  const { startContainer: n, endContainer: i } = t.range;
6466
- return n === i && n.nodeType === Ld ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
6467
- }, Nd = (e, t) => ({
6466
+ return n === i && n.nodeType === Pf ? !1 : r.some(({ element: o }) => e.mathCapabilityByElement.get(o) === "token" && o.contains(n) && o.contains(i));
6467
+ }, zf = (e, t) => ({
6468
6468
  chunk: e,
6469
- regionTarget: Id(e),
6470
- renderedMathTargetResolver: Ad(),
6471
- mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ? xd(r) : "expression"])),
6469
+ regionTarget: Rf(e),
6470
+ renderedMathTargetResolver: Mf(),
6471
+ mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: r }) => [r, t ? Cf(r) : "expression"])),
6472
6472
  heldTokenByElement: /* @__PURE__ */ new Map()
6473
- }), zd = (e) => {
6474
- const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id, Nd(n, t)]));
6473
+ }), Wf = (e) => {
6474
+ const t = e.mathTokenHighlighting !== !1, r = new Map(e.chunks.map((n) => [n.id, zf(n, t)]));
6475
6475
  return {
6476
6476
  chunks: e.chunks,
6477
6477
  resolveInitial(n) {
@@ -6495,10 +6495,10 @@ var sh = /* @__PURE__ */ new Set([
6495
6495
  resolveBoundary(n) {
6496
6496
  const i = r.get(n.chunkId);
6497
6497
  if (!i) return Po();
6498
- const { chunk: o } = i, s = kd(o, n), a = Od(o, s), l = Rd(a, o), c = (!a || l.length > 0 ? Md(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, h = c && c.quality === "expression" ? c : null;
6498
+ const { chunk: o } = i, s = xf(o, n), a = If(o, s), l = $f(a, o), c = (!a || l.length > 0 ? Of(o, s, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, f = c && c.quality === "expression" ? c : null;
6499
6499
  if (u) {
6500
- const d = No(l);
6501
- return d && i.heldTokenByElement.set(d, u), zt({
6500
+ const h = No(l);
6501
+ return h && i.heldTokenByElement.set(h, u), zt({
6502
6502
  semanticTarget: u,
6503
6503
  expressionTarget: null,
6504
6504
  regionTarget: i.regionTarget,
@@ -6506,15 +6506,15 @@ var sh = /* @__PURE__ */ new Set([
6506
6506
  reason: s.reason
6507
6507
  });
6508
6508
  }
6509
- if (a && (t ? !Pd(i, a, l) : l.length === 0)) return zt({
6509
+ if (a && (t ? !Nf(i, a, l) : l.length === 0)) return zt({
6510
6510
  semanticTarget: a,
6511
6511
  expressionTarget: null,
6512
6512
  regionTarget: i.regionTarget,
6513
6513
  confidence: s.confidence,
6514
6514
  reason: s.reason
6515
6515
  });
6516
- if ($d(i, l)) {
6517
- const d = No(l), p = d ? i.heldTokenByElement.get(d) ?? null : null;
6516
+ if (Lf(i, l)) {
6517
+ const h = No(l), p = h ? i.heldTokenByElement.get(h) ?? null : null;
6518
6518
  return zt({
6519
6519
  semanticTarget: p,
6520
6520
  expressionTarget: null,
@@ -6525,21 +6525,21 @@ var sh = /* @__PURE__ */ new Set([
6525
6525
  }
6526
6526
  return zt({
6527
6527
  semanticTarget: null,
6528
- expressionTarget: h ?? Lo(i, l),
6528
+ expressionTarget: f ?? Lo(i, l),
6529
6529
  regionTarget: i.regionTarget,
6530
6530
  confidence: s.confidence,
6531
6531
  reason: s.reason
6532
6532
  });
6533
6533
  }
6534
6534
  };
6535
- }, Wd = (e) => {
6535
+ }, Hf = (e) => {
6536
6536
  if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
6537
6537
  const t = e.mathAlignment?.speech.boundaryOffsetSpace;
6538
6538
  return t || "plain-spoken-text";
6539
- }, Hd = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
6539
+ }, Bf = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
6540
6540
  element: e.sourceElement,
6541
6541
  alignment: e.mathAlignment
6542
- }] : [], Bd = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
6542
+ }] : [], Df = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
6543
6543
  speechText: e.speechText || "",
6544
6544
  visibleText: e.visibleText || e.speechText || "",
6545
6545
  sourceElement: e.sourceElement || e.contentRoot,
@@ -6556,9 +6556,9 @@ var sh = /* @__PURE__ */ new Set([
6556
6556
  regionRange: t.regionRange,
6557
6557
  visibleMap: t.visibleMap,
6558
6558
  catalogAlignment: t.alignment,
6559
- mathAlignments: Hd(t),
6560
- offsetSpace: Wd(t)
6561
- })), Dd = [
6559
+ mathAlignments: Bf(t),
6560
+ offsetSpace: Hf(t)
6561
+ })), Ff = [
6562
6562
  "[data-pie-tts-region]",
6563
6563
  "[data-catalog-region]",
6564
6564
  "li",
@@ -6569,17 +6569,17 @@ var sh = /* @__PURE__ */ new Set([
6569
6569
  "[role='region']",
6570
6570
  "div"
6571
6571
  ].join(","), Ma = (e, t) => {
6572
- const r = e.closest(Dd);
6572
+ const r = e.closest(Ff);
6573
6573
  return r && t.contains(r) ? r : e;
6574
- }, Fd = (e, t, r) => {
6574
+ }, jf = (e, t, r) => {
6575
6575
  const n = /* @__PURE__ */ new Map();
6576
6576
  for (let i = t; i < r; i++) {
6577
6577
  const o = e.get(i);
6578
6578
  o && n.set(i - t, o);
6579
6579
  }
6580
6580
  return n;
6581
- }, jd = async (e) => {
6582
- const t = cr(e.contentRoot, e.textProcessingOptions), r = await vd({
6581
+ }, Vf = async (e) => {
6582
+ const t = cr(e.contentRoot, e.textProcessingOptions), r = await mf({
6583
6583
  chunks: t.chunks,
6584
6584
  visibleText: t.visibleText,
6585
6585
  language: e.language,
@@ -6598,7 +6598,7 @@ var sh = /* @__PURE__ */ new Set([
6598
6598
  anchor: {
6599
6599
  sourceElement: a,
6600
6600
  regionElement: Ma(a, e.contentRoot),
6601
- visibleMap: Fd(t.map, n.visibleSpan.start, n.visibleSpan.end)
6601
+ visibleMap: jf(t.map, n.visibleSpan.start, n.visibleSpan.end)
6602
6602
  }
6603
6603
  };
6604
6604
  }
@@ -6618,7 +6618,7 @@ var sh = /* @__PURE__ */ new Set([
6618
6618
  containsMathMarkup: t.containsMathMarkup,
6619
6619
  visibleText: t.visibleText
6620
6620
  };
6621
- }, Vd = (e, t) => {
6621
+ }, qf = (e, t) => {
6622
6622
  const r = aa({
6623
6623
  speechText: e.spokenText,
6624
6624
  visibleText: e.spokenText
@@ -6647,7 +6647,7 @@ var sh = /* @__PURE__ */ new Set([
6647
6647
  speechText: e.spokenText
6648
6648
  }) : void 0
6649
6649
  };
6650
- }, qd = (e, t, r) => {
6650
+ }, Uf = (e, t, r) => {
6651
6651
  const n = t.sourceElement;
6652
6652
  return {
6653
6653
  speechText: r,
@@ -6661,13 +6661,13 @@ var sh = /* @__PURE__ */ new Set([
6661
6661
  }) : void 0,
6662
6662
  plainFallback: Oa(e, t)
6663
6663
  };
6664
- }, Ud = (e, t = {}) => e.items.map(({ segment: r, anchor: n }) => r.kind === "prose" ? Vd(r, n) : t.format === "ssml" && r.ssml ? qd(r, n, r.ssml) : Oa(r, n)), Gd = "pie-tts-control-handoff", H;
6664
+ }, Gf = (e, t = {}) => e.items.map(({ segment: r, anchor: n }) => r.kind === "prose" ? qf(r, n) : t.format === "ssml" && r.ssml ? Uf(r, n, r.ssml) : Oa(r, n)), Yf = "pie-tts-control-handoff", H;
6665
6665
  (function(e) {
6666
6666
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
6667
6667
  })(H || (H = {}));
6668
- var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Yd = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Ia(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, Kd = class ui {
6668
+ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Kf = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Ia(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, Xf = class ui {
6669
6669
  constructor() {
6670
- y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "highlightTargetResolverProvider", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "activeWordBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver", _d());
6670
+ y(this, "currentProvider", null), y(this, "provider", null), y(this, "highlightCoordinator", null), y(this, "highlightTargetResolverProvider", null), y(this, "catalogResolver", null), y(this, "state", H.IDLE), y(this, "ttsConfig", {}), y(this, "currentText", null), y(this, "currentContentElement", null), y(this, "normalizedToDOM", /* @__PURE__ */ new Map()), y(this, "listeners", /* @__PURE__ */ new Map()), y(this, "lastError", null), y(this, "speakRunId", 0), y(this, "currentBoundaryOffset", 0), y(this, "activeWordBoundaryOffset", 0), y(this, "seekSegments", []), y(this, "playbackChunks", []), y(this, "sentenceHighlightSegments", []), y(this, "currentSeekSegmentIndex", 0), y(this, "activeSentenceStartOffset", null), y(this, "activeHighlightMode", "word"), y(this, "lastRenderedRegionTarget", null), y(this, "telemetryReporter", null), y(this, "generatedMathSpeechResolver", Tf());
6671
6671
  }
6672
6672
  debugLog(t, r) {
6673
6673
  ui.debugEnabled && (r === void 0 ? console.debug(t) : console.debug(t, r));
@@ -6966,8 +6966,8 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6966
6966
  for (; a; ) {
6967
6967
  const c = a, u = c.parentElement;
6968
6968
  if (u && !this.isElementHidden(u)) {
6969
- const h = this.getBoundaryAnchor(c, t), d = o.get(c);
6970
- h && d !== void 0 && h.anchor !== l && d > 0 && (n.set(d, Math.max(n.get(d) || 0, h.units)), l = h.anchor);
6969
+ const f = this.getBoundaryAnchor(c, t), h = o.get(c);
6970
+ f && h !== void 0 && f.anchor !== l && h > 0 && (n.set(h, Math.max(n.get(h) || 0, f.units)), l = f.anchor);
6971
6971
  }
6972
6972
  a = s.nextNode();
6973
6973
  }
@@ -6982,12 +6982,12 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6982
6982
  const n = Array.from(r.keys()).filter((l) => l > 0 && l < t.length).sort((l, c) => l - c), i = [];
6983
6983
  let o = 0;
6984
6984
  for (const l of n) {
6985
- const c = t.substring(o, l), u = c.match(/^\s*/)?.[0].length || 0, h = c.match(/\s*$/)?.[0].length || 0, d = o + u, p = l - h;
6986
- if (p > d) {
6987
- const v = t.substring(d, p);
6985
+ const c = t.substring(o, l), u = c.match(/^\s*/)?.[0].length || 0, f = c.match(/\s*$/)?.[0].length || 0, h = o + u, p = l - f;
6986
+ if (p > h) {
6987
+ const v = t.substring(h, p);
6988
6988
  i.push({
6989
6989
  text: v,
6990
- startOffset: d,
6990
+ startOffset: h,
6991
6991
  pauseMsAfter: this.resolvePauseMsFromUnits(r.get(l) || 0)
6992
6992
  });
6993
6993
  }
@@ -7019,19 +7019,19 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7019
7019
  if (i.length === 0) return t;
7020
7020
  const o = [];
7021
7021
  for (const s of t) {
7022
- const a = s.startOffset, l = s.startOffset + s.text.length, c = i.filter((h) => h > a && h < l);
7022
+ const a = s.startOffset, l = s.startOffset + s.text.length, c = i.filter((f) => f > a && f < l);
7023
7023
  if (c.length === 0) {
7024
7024
  o.push(s);
7025
7025
  continue;
7026
7026
  }
7027
7027
  let u = a;
7028
- for (const h of [...c, l]) {
7029
- const d = n.substring(u, h), p = d.match(/^\s*/)?.[0].length || 0, v = d.match(/\s*$/)?.[0].length || 0, b = u + p, m = h - v;
7028
+ for (const f of [...c, l]) {
7029
+ const h = n.substring(u, f), p = h.match(/^\s*/)?.[0].length || 0, v = h.match(/\s*$/)?.[0].length || 0, b = u + p, m = f - v;
7030
7030
  m > b && o.push({
7031
7031
  text: n.substring(b, m),
7032
7032
  startOffset: b,
7033
7033
  pauseMsAfter: 0
7034
- }), u = h;
7034
+ }), u = f;
7035
7035
  }
7036
7036
  }
7037
7037
  return o;
@@ -7042,6 +7042,17 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7042
7042
  const n = t.playbackSegments.map((i) => i.startOffset).filter((i) => i > 0);
7043
7043
  return this.splitSegmentsAtBoundaries(r, n, t.contentToSpeak);
7044
7044
  }
7045
+ createSeekSegmentsFromSpeechChunks(t) {
7046
+ let r = 0;
7047
+ return t.map((n) => {
7048
+ const i = V(n.plainFallback?.speechText || (this.hasExplicitBreakSemantics(n.speechText) ? n.visibleText : n.speechText) || n.visibleText) || n.visibleText || "", o = {
7049
+ text: i,
7050
+ startOffset: r,
7051
+ pauseMsAfter: 0
7052
+ };
7053
+ return r += Math.max(1, i.length + 1), o;
7054
+ });
7055
+ }
7045
7056
  getCurrentSeekSegmentIndex() {
7046
7057
  if (this.seekSegments.length === 0) return 0;
7047
7058
  let t = 0;
@@ -7132,16 +7143,16 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7132
7143
  if (await this.applyLanguageSettings(r), n !== this.speakRunId) return;
7133
7144
  const i = await this.resolveSpeechContent(t, r);
7134
7145
  if (n !== this.speakRunId) return;
7135
- const { contentToSpeak: o, speechText: s, highlightText: a, normalizedText: l, usedCatalogSpoken: c, speechSource: u, speechMatchesVisibleText: h, speechChunks: d } = i;
7146
+ const { contentToSpeak: o, speechText: s, highlightText: a, normalizedText: l, usedCatalogSpoken: c, speechSource: u, speechMatchesVisibleText: f, speechChunks: h } = i;
7136
7147
  this.logResolvedSpeechContent({
7137
7148
  contentToSpeak: o,
7138
7149
  speechSource: u,
7139
7150
  catalogId: r?.catalogId
7140
7151
  }), this.initializeSpeakTracking(a, r);
7141
- const p = r?.highlightModeOverride || (h ? this.resolveHighlightMode() : "sentence");
7152
+ const p = r?.highlightModeOverride || (f ? this.resolveHighlightMode() : "sentence");
7142
7153
  this.activeHighlightMode = p, this.activeWordBoundaryOffset = r?.wordBoundaryOffset || 0;
7143
- const v = this.hasExplicitBreakSemantics(o), b = !!this.currentContentElement && !c && !v && h;
7144
- if (this.seekSegments = v || !h ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
7154
+ const v = this.hasExplicitBreakSemantics(o), b = !!this.currentContentElement && !c && !v && f;
7155
+ if (this.playbackChunks = h?.length ? h : [], this.seekSegments = this.playbackChunks.length ? this.createSeekSegmentsFromSpeechChunks(this.playbackChunks) : v || !f ? [] : b && this.currentContentElement ? this.createSpeechPlan(this.currentContentElement, l) : this.createSeekSegmentsFromText(a), this.sentenceHighlightSegments = v ? [] : this.createSentenceHighlightSegments({
7145
7156
  contentToSpeak: a,
7146
7157
  shouldUsePlan: b,
7147
7158
  playbackSegments: this.seekSegments
@@ -7150,7 +7161,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7150
7161
  options: r,
7151
7162
  highlightMode: p,
7152
7163
  shouldUsePlan: b
7153
- }), h ? this.configureWordBoundaryHighlighting({
7164
+ }), f ? this.configureWordBoundaryHighlighting({
7154
7165
  highlightMode: p,
7155
7166
  wordBoundaryOffset: r?.wordBoundaryOffset || 0
7156
7167
  }) : this.clearWordBoundaryHighlighting(), this.setState(H.PLAYING), await this.executeSpeakPlayback({
@@ -7158,7 +7169,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7158
7169
  runId: n,
7159
7170
  highlightMode: p,
7160
7171
  contentToSpeak: s,
7161
- speechChunks: d
7172
+ speechChunks: h
7162
7173
  }), n !== this.speakRunId) return;
7163
7174
  this.setState(H.IDLE), this.clearHighlightsAndTracking();
7164
7175
  } catch (i) {
@@ -7220,7 +7231,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7220
7231
  }, "updateSettings" in this.provider && typeof this.provider.updateSettings == "function" && await this.provider.updateSettings({ providerOptions: o });
7221
7232
  }
7222
7233
  async resolveSpeechContent(t, r) {
7223
- const n = G(t);
7234
+ const n = V(t);
7224
7235
  if (r?.ignoreCatalogs) return {
7225
7236
  contentToSpeak: n,
7226
7237
  speechText: n,
@@ -7240,7 +7251,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7240
7251
  context: r.catalogContext
7241
7252
  });
7242
7253
  if (o) {
7243
- const s = r?.contentElement && cr(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a = G(o.content);
7254
+ const s = r?.contentElement && cr(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, a = V(o.content);
7244
7255
  return this.debugLog(`[TTSService] Using catalog content for "${r.catalogId}" (${o.language})`), {
7245
7256
  contentToSpeak: o.content,
7246
7257
  speechText: o.content,
@@ -7274,7 +7285,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7274
7285
  if (!this.catalogResolver) return null;
7275
7286
  const i = this.collectCatalogSpeechChunks(t, n);
7276
7287
  if (!i.some((a) => a.sourceElement)) return null;
7277
- const o = G(i.map((a) => a.speechText).join(" ")), s = cr(t, this.getTextProcessingOptions(n.language)).visibleText || r;
7288
+ const o = V(i.map((a) => a.speechText).join(" ")), s = cr(t, this.getTextProcessingOptions(n.language)).visibleText || r;
7278
7289
  return {
7279
7290
  contentToSpeak: o,
7280
7291
  speechText: o,
@@ -7292,7 +7303,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7292
7303
  const n = [];
7293
7304
  let i = "";
7294
7305
  const o = () => {
7295
- const u = G(i);
7306
+ const u = V(i);
7296
7307
  i = "", u && n.push({
7297
7308
  speechText: u,
7298
7309
  visibleText: u,
@@ -7300,21 +7311,21 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7300
7311
  speechMatchesVisibleText: !0
7301
7312
  });
7302
7313
  }, s = (u) => {
7303
- const h = u.getAttribute("data-catalog-idref");
7304
- return h ? this.catalogResolver.getAlternative(h, {
7314
+ const f = u.getAttribute("data-catalog-idref");
7315
+ return f ? this.catalogResolver.getAlternative(f, {
7305
7316
  type: "spoken",
7306
7317
  language: r.language || "en-US",
7307
7318
  useFallback: !0,
7308
7319
  context: r.catalogContext
7309
7320
  }) : null;
7310
- }, a = (u, h) => {
7311
- const d = l(u);
7312
- if (d.length !== 1) return null;
7313
- const p = d[0], v = cr(p, this.getTextProcessingOptions(r.language)).visibleText || G(p.textContent || ""), b = (m) => G(m).replace(/\s+/g, "");
7314
- return b(v) === b(h) ? p : null;
7321
+ }, a = (u, f) => {
7322
+ const h = l(u);
7323
+ if (h.length !== 1) return null;
7324
+ const p = h[0], v = cr(p, this.getTextProcessingOptions(r.language)).visibleText || V(p.textContent || ""), b = (m) => V(m).replace(/\s+/g, "");
7325
+ return b(v) === b(f) ? p : null;
7315
7326
  }, l = (u) => {
7316
- const h = Array.from(u.querySelectorAll("math"));
7317
- return u.localName?.toLowerCase() === "math" ? [u, ...h] : h;
7327
+ const f = Array.from(u.querySelectorAll("math"));
7328
+ return u.localName?.toLowerCase() === "math" ? [u, ...f] : f;
7318
7329
  }, c = (u) => {
7319
7330
  if (Jt(u, t)) return;
7320
7331
  if (u.nodeType === Node.TEXT_NODE) {
@@ -7322,27 +7333,27 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7322
7333
  return;
7323
7334
  }
7324
7335
  if (u.nodeType !== Node.ELEMENT_NODE) return;
7325
- const h = u, d = s(h);
7326
- if (d) {
7336
+ const f = u, h = s(f);
7337
+ if (h) {
7327
7338
  o();
7328
- const p = cr(h, this.getTextProcessingOptions(r.language)), v = p.visibleText || G(h.textContent || ""), b = aa({
7329
- speechText: d.content,
7339
+ const p = cr(f, this.getTextProcessingOptions(r.language)), v = p.visibleText || V(f.textContent || ""), b = aa({
7340
+ speechText: h.content,
7330
7341
  visibleText: v
7331
- }), m = a(h, v), _ = m ? tn({
7342
+ }), m = a(f, v), _ = m ? tn({
7332
7343
  mathElement: m,
7333
- speechText: d.content
7334
- }) : void 0, N = _ ? void 0 : l(h).map((S) => ({
7344
+ speechText: h.content
7345
+ }) : void 0, N = _ ? void 0 : l(f).map((S) => ({
7335
7346
  element: S,
7336
7347
  alignment: tn({
7337
7348
  mathElement: S,
7338
- speechText: d.content
7349
+ speechText: h.content
7339
7350
  })
7340
- })), B = G(d.content);
7351
+ })), B = V(h.content);
7341
7352
  n.push({
7342
- speechText: d.content,
7353
+ speechText: h.content,
7343
7354
  visibleText: v,
7344
- sourceElement: h,
7345
- regionElement: Ma(h, t),
7355
+ sourceElement: f,
7356
+ regionElement: Ma(f, t),
7346
7357
  speechMatchesVisibleText: B === v,
7347
7358
  playbackMode: b.playbackMode,
7348
7359
  alignment: b,
@@ -7352,7 +7363,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7352
7363
  });
7353
7364
  return;
7354
7365
  }
7355
- for (const p of Array.from(h.childNodes)) c(p);
7366
+ for (const p of Array.from(f.childNodes)) c(p);
7356
7367
  };
7357
7368
  return c(t), o(), n;
7358
7369
  }
@@ -7361,7 +7372,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7361
7372
  return !t || t.providerId?.toLowerCase() === "browser" ? "plain" : t.getCapabilities?.().supportsSSML ? "ssml" : "plain";
7362
7373
  }
7363
7374
  async resolveGeneratedSpeechContent(t, r, n) {
7364
- const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await jd({
7375
+ const i = this.resolveGeneratedPlaybackFormat(), { plan: o, containsMathMarkup: s, visibleText: a } = await Vf({
7365
7376
  contentRoot: t,
7366
7377
  language: n,
7367
7378
  mathSpeech: this.getMathSpeechOptions(),
@@ -7378,7 +7389,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7378
7389
  containsMathMarkup: !1,
7379
7390
  speechMatchesVisibleText: !0
7380
7391
  };
7381
- const c = Ud(o, { format: i }), u = o.plainSpeechText;
7392
+ const c = Gf(o, { format: i }), u = o.plainSpeechText;
7382
7393
  return {
7383
7394
  contentToSpeak: u,
7384
7395
  speechText: u,
@@ -7400,7 +7411,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7400
7411
  });
7401
7412
  }
7402
7413
  initializeSpeakTracking(t, r) {
7403
- this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
7414
+ this.currentText = t, this.currentContentElement = r?.contentElement || null, this.lastError = null, this.currentBoundaryOffset = 0, this.playbackChunks = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
7404
7415
  }
7405
7416
  prepareHighlightsForSpeak(t) {
7406
7417
  if (!this.currentContentElement || !this.highlightCoordinator || (this.buildPositionMap(this.currentContentElement, t.contentToSpeak, t.options?.language), t.highlightMode === "sentence" && t.shouldUsePlan)) return;
@@ -7447,7 +7458,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7447
7458
  this.highlightCoordinator && this.paintTTSWordRange(this.resolveWordHighlightRange(t).range);
7448
7459
  }
7449
7460
  highlightRenderableRegionTarget(t) {
7450
- if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Yd(this.lastRenderedRegionTarget, t)))
7461
+ if (!(!this.highlightCoordinator || !t || typeof document > "u") && !(!this.highlightTargetResolverProvider && Kf(this.lastRenderedRegionTarget, t)))
7451
7462
  try {
7452
7463
  const r = document.createRange();
7453
7464
  if (t.type === "element") r.selectNodeContents(t.element);
@@ -7506,31 +7517,31 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7506
7517
  async speakCatalogChunkOnce(t, r) {
7507
7518
  if (!this.provider) return;
7508
7519
  this.lastRenderedRegionTarget = null;
7509
- const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ? Bd({
7520
+ const n = t.regionElement || t.sourceElement || this.currentContentElement, i = n ? Df({
7510
7521
  contentRoot: n,
7511
7522
  chunks: [t]
7512
- })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? zd({
7523
+ })[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Wf({
7513
7524
  chunks: [i],
7514
7525
  mathTokenHighlighting: o
7515
7526
  }) : null;
7516
7527
  if (s && i && t.mathAlignment ? this.renderHighlightDecision(s.resolveInitial(i.id)) : this.highlightCatalogRegion(t), !(t.sourceElement && (t.mathAlignment && t.mathAlignment.speech.tokens.length > 0 || t.mathAlignments && t.mathAlignments.length > 0 || t.alignment && t.visibleMap && (t.playbackMode === "exact-word" || t.playbackMode === "anchor-span")))) {
7517
- const u = this.provider, h = u.onWordBoundary;
7528
+ const u = this.provider, f = u.onWordBoundary;
7518
7529
  u.onWordBoundary = void 0;
7519
7530
  try {
7520
7531
  await u.speak(t.speechText);
7521
7532
  } finally {
7522
- this.provider === u && r === this.speakRunId && u.onWordBoundary === void 0 && (u.onWordBoundary = h);
7533
+ this.provider === u && r === this.speakRunId && u.onWordBoundary === void 0 && (u.onWordBoundary = f);
7523
7534
  }
7524
7535
  return;
7525
7536
  }
7526
- const a = this.provider, l = a.onWordBoundary, c = (u, h, d) => {
7537
+ const a = this.provider, l = a.onWordBoundary, c = (u, f, h) => {
7527
7538
  if (r === this.speakRunId && s && i) {
7528
7539
  const p = i.offsetSpace === "unsupported" ? "unknown" : i.offsetSpace;
7529
7540
  this.renderHighlightDecision(s.resolveBoundary({
7530
7541
  chunkId: i.id,
7531
7542
  word: u,
7532
- position: h,
7533
- length: d,
7543
+ position: f,
7544
+ length: h,
7534
7545
  providerOffsetSpace: p
7535
7546
  }));
7536
7547
  return;
@@ -7545,9 +7556,13 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7545
7556
  }
7546
7557
  async executeSpeakPlayback(t) {
7547
7558
  if (t.speechChunks?.length && this.provider) {
7548
- for (const r of t.speechChunks) {
7559
+ for (let r = 0; r < t.speechChunks.length; r++) {
7549
7560
  if (t.runId !== this.speakRunId) return;
7550
- await this.speakCatalogChunk(r, t.runId);
7561
+ this.currentSeekSegmentIndex = r;
7562
+ const n = this.seekSegments[r];
7563
+ n && (this.currentBoundaryOffset = n.startOffset);
7564
+ const i = t.speechChunks[r];
7565
+ await this.speakCatalogChunk(i, t.runId);
7551
7566
  }
7552
7567
  return;
7553
7568
  }
@@ -7559,7 +7574,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7559
7574
  this.provider && await this.provider.speak(t.contentToSpeak);
7560
7575
  }
7561
7576
  clearHighlightsAndTracking() {
7562
- this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
7577
+ this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null;
7563
7578
  }
7564
7579
  async speakRange(t, r) {
7565
7580
  if (!this.provider) throw new Error("TTS service not initialized");
@@ -7573,7 +7588,7 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7573
7588
  if (!i) return;
7574
7589
  const o = document.createRange();
7575
7590
  o.selectNodeContents(i), o.setEnd(t.startContainer, t.startOffset);
7576
- const s = o.toString(), a = G(s), l = a.length + (/\s$/.test(s) && a ? 1 : 0);
7591
+ const s = o.toString(), a = V(s), l = a.length + (/\s$/.test(s) && a ? 1 : 0);
7577
7592
  this.debugLog("[TTSService] speakRange offset calculation:", {
7578
7593
  selectedText: n,
7579
7594
  textBeforeRange: s.substring(0, 100),
@@ -7596,19 +7611,27 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7596
7611
  }
7597
7612
  async restartFromSeekIndex(t) {
7598
7613
  if (!this.provider || this.seekSegments.length === 0) return;
7599
- const r = Math.max(0, Math.min(this.seekSegments.length - 1, t));
7614
+ const r = Math.max(0, Math.min(this.seekSegments.length - 1, t)), n = this.playbackChunks.length ? this.playbackChunks.slice(r) : null;
7600
7615
  this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.currentSeekSegmentIndex = r;
7601
- const n = ++this.speakRunId, i = this.seekSegments.slice(r);
7616
+ const i = ++this.speakRunId, o = this.seekSegments.slice(r);
7602
7617
  this.setState(H.PLAYING);
7603
7618
  try {
7604
7619
  if (this.configureWordBoundaryHighlighting({
7605
7620
  highlightMode: this.activeHighlightMode,
7606
7621
  wordBoundaryOffset: this.activeWordBoundaryOffset
7607
- }), await this.speakWithPlan(i, n, { highlightMode: this.activeHighlightMode }), n !== this.speakRunId) return;
7622
+ }), n) for (let s = 0; s < n.length; s++) {
7623
+ if (i !== this.speakRunId) return;
7624
+ const a = r + s;
7625
+ this.currentSeekSegmentIndex = a;
7626
+ const l = this.seekSegments[a];
7627
+ l && (this.currentBoundaryOffset = l.startOffset), await this.speakCatalogChunk(n[s], i);
7628
+ }
7629
+ else await this.speakWithPlan(o, i, { highlightMode: this.activeHighlightMode });
7630
+ if (i !== this.speakRunId) return;
7608
7631
  this.setState(H.IDLE), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null;
7609
- } catch (o) {
7610
- if (n !== this.speakRunId) return;
7611
- throw this.lastError = o instanceof Error ? o.message : String(o), this.setState(H.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, o;
7632
+ } catch (s) {
7633
+ if (i !== this.speakRunId) return;
7634
+ throw this.lastError = s instanceof Error ? s.message : String(s), this.setState(H.ERROR), this.clearHighlightsAndTracking(), this.highlightTargetResolverProvider = null, s;
7612
7635
  }
7613
7636
  }
7614
7637
  async setPlaybackRate(t) {
@@ -7631,10 +7654,10 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7631
7654
  await this.seekBy(-r);
7632
7655
  }
7633
7656
  stop() {
7634
- this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(H.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
7657
+ this.provider && (this.speakRunId += 1, this.provider.onWordBoundary = void 0, this.provider.stop(), this.highlightTargetResolverProvider = null, this.setState(H.IDLE), this.currentText = null, this.highlightCoordinator && this.highlightCoordinator.clearTTS(), this.lastRenderedRegionTarget = null, this.currentContentElement = null, this.normalizedToDOM.clear(), this.currentBoundaryOffset = 0, this.activeWordBoundaryOffset = 0, this.seekSegments = [], this.playbackChunks = [], this.sentenceHighlightSegments = [], this.currentSeekSegmentIndex = 0, this.activeSentenceStartOffset = null);
7635
7658
  }
7636
7659
  requestControlHandoff() {
7637
- typeof window > "u" || window.dispatchEvent(new CustomEvent(Gd, { detail: { source: "host" } }));
7660
+ typeof window > "u" || window.dispatchEvent(new CustomEvent(Yf, { detail: { source: "host" } }));
7638
7661
  }
7639
7662
  isPlaying() {
7640
7663
  return this.state === H.PLAYING;
@@ -7705,14 +7728,14 @@ var Ia = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7705
7728
  });
7706
7729
  }
7707
7730
  };
7708
- y(Kd, "debugEnabled", (() => {
7731
+ y(Xf, "debugEnabled", (() => {
7709
7732
  try {
7710
7733
  if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
7711
7734
  } catch {
7712
7735
  }
7713
7736
  return globalThis.__PIE_TTS_DEBUG__ === !0;
7714
7737
  })());
7715
- var Af = eu({
7738
+ var Ad = eu({
7716
7739
  policy: {
7717
7740
  allowed: [],
7718
7741
  blocked: []
@@ -7723,7 +7746,7 @@ var Af = eu({
7723
7746
  passage: []
7724
7747
  },
7725
7748
  providers: {}
7726
- }), Xd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), Jd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Qd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), Zd = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), ef = /* @__PURE__ */ Ps('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), tf = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), rf = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), nf = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), of = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), sf = /* @__PURE__ */ Oe('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), af = /* @__PURE__ */ Oe('<circle r="2" role="button" tabindex="0"></circle>'), lf = /* @__PURE__ */ Oe('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), cf = /* @__PURE__ */ Ps('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'), uf = {
7749
+ }), Jf = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), Qf = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Zf = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), ed = /* @__PURE__ */ Oe('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), td = /* @__PURE__ */ Ps('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), rd = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), nd = /* @__PURE__ */ Oe('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), id = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), od = /* @__PURE__ */ Oe('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), sd = /* @__PURE__ */ Oe('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), ad = /* @__PURE__ */ Oe('<circle r="2" role="button" tabindex="0"></circle>'), ld = /* @__PURE__ */ Oe('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), cd = /* @__PURE__ */ Ps('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'), ud = {
7727
7750
  hash: "svelte-7afz7f",
7728
7751
  code: `.pie-tool-graph.svelte-7afz7f {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
7729
7752
 
@@ -7735,11 +7758,11 @@ var Af = eu({
7735
7758
 
7736
7759
  /* User drawing styles */.pie-tool-graph__user-point.svelte-7afz7f {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-7afz7f {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-7afz7f {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-7afz7f {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`
7737
7760
  };
7738
- function hf(e, t) {
7739
- qo(t, !0), xc(e, uf);
7740
- let r = uo(t, "visible", 7, !1), n = uo(t, "toolId", 7, "graph"), i = /* @__PURE__ */ U(void 0), o = /* @__PURE__ */ U(void 0), s = /* @__PURE__ */ U(void 0), a = /* @__PURE__ */ U("selector"), l = /* @__PURE__ */ U(ct([])), c = /* @__PURE__ */ U(ct([])), u = /* @__PURE__ */ U(1), h = /* @__PURE__ */ U(1), d = /* @__PURE__ */ U(null), p = /* @__PURE__ */ U(null), v = /* @__PURE__ */ U(null);
7761
+ function hd(e, t) {
7762
+ qo(t, !0), Ec(e, ud);
7763
+ let r = uo(t, "visible", 7, !1), n = uo(t, "toolId", 7, "graph"), i = /* @__PURE__ */ G(void 0), o = /* @__PURE__ */ G(void 0), s = /* @__PURE__ */ G(void 0), a = /* @__PURE__ */ G("selector"), l = /* @__PURE__ */ G(ct([])), c = /* @__PURE__ */ G(ct([])), u = /* @__PURE__ */ G(1), f = /* @__PURE__ */ G(1), h = /* @__PURE__ */ G(null), p = /* @__PURE__ */ G(null), v = /* @__PURE__ */ G(null);
7741
7764
  const b = 5, m = 5, _ = 100 / b, N = _ / m;
7742
- let B = /* @__PURE__ */ U(0), S = /* @__PURE__ */ U(0), F = /* @__PURE__ */ er(() => {
7765
+ let B = /* @__PURE__ */ G(0), S = /* @__PURE__ */ G(0), F = /* @__PURE__ */ er(() => {
7743
7766
  if (g(S) <= 0 || g(B) <= 0) return 100;
7744
7767
  const T = g(S) / 100, w = g(B) / T;
7745
7768
  return Math.max(100, w);
@@ -7808,7 +7831,7 @@ function hf(e, t) {
7808
7831
  return z;
7809
7832
  }
7810
7833
  function vn(T) {
7811
- return T === g(d) || T === g(p);
7834
+ return T === g(h) || T === g(p);
7812
7835
  }
7813
7836
  function mn(T) {
7814
7837
  if (g(a) === "delete") {
@@ -7816,15 +7839,15 @@ function hf(e, t) {
7816
7839
  return;
7817
7840
  }
7818
7841
  if (g(a) === "line") {
7819
- if (g(d) === null) {
7820
- A(d, T, !0);
7842
+ if (g(h) === null) {
7843
+ A(h, T, !0);
7821
7844
  return;
7822
7845
  }
7823
- g(d) !== T && (g(c).some((w) => w.p1Id === g(d) && w.p2Id === T || w.p1Id === T && w.p2Id === g(d)) || A(c, [...g(c), {
7846
+ g(h) !== T && (g(c).some((w) => w.p1Id === g(h) && w.p2Id === T || w.p1Id === T && w.p2Id === g(h)) || A(c, [...g(c), {
7824
7847
  id: Q(),
7825
- p1Id: g(d),
7848
+ p1Id: g(h),
7826
7849
  p2Id: T
7827
- }], !0)), A(d, null), A(v, null);
7850
+ }], !0)), A(h, null), A(v, null);
7828
7851
  }
7829
7852
  }
7830
7853
  let Sr = /* @__PURE__ */ er(() => {
@@ -7850,7 +7873,7 @@ function hf(e, t) {
7850
7873
  return T;
7851
7874
  });
7852
7875
  function Ra(T) {
7853
- A(a, T, !0), A(d, null), A(p, null), A(v, null);
7876
+ A(a, T, !0), A(h, null), A(p, null), A(v, null);
7854
7877
  }
7855
7878
  function Li(T) {
7856
7879
  const w = et(T);
@@ -7870,18 +7893,18 @@ function hf(e, t) {
7870
7893
  x: w.x,
7871
7894
  y: w.y
7872
7895
  };
7873
- D || A(l, [...g(l), z], !0), g(d) === null ? A(d, z.id, !0) : (g(d) !== z.id && (g(c).some((Y) => Y.p1Id === g(d) && Y.p2Id === z.id || Y.p1Id === z.id && Y.p2Id === g(d)) || A(c, [...g(c), {
7896
+ D || A(l, [...g(l), z], !0), g(h) === null ? A(h, z.id, !0) : (g(h) !== z.id && (g(c).some((Y) => Y.p1Id === g(h) && Y.p2Id === z.id || Y.p1Id === z.id && Y.p2Id === g(h)) || A(c, [...g(c), {
7874
7897
  id: Q(),
7875
- p1Id: g(d),
7898
+ p1Id: g(h),
7876
7899
  p2Id: z.id
7877
- }], !0)), A(d, null), A(v, null));
7900
+ }], !0)), A(h, null), A(v, null));
7878
7901
  break;
7879
7902
  case "delete":
7880
7903
  const re = X(w, 2);
7881
7904
  re && (A(l, g(l).filter((Y) => Y.id !== re.id), !0), A(c, g(c).filter((Y) => Y.p1Id !== re.id && Y.p2Id !== re.id), !0));
7882
7905
  break;
7883
7906
  case "selector":
7884
- A(d, null), A(v, null);
7907
+ A(h, null), A(v, null);
7885
7908
  break;
7886
7909
  }
7887
7910
  }
@@ -7896,7 +7919,7 @@ function hf(e, t) {
7896
7919
  }
7897
7920
  }
7898
7921
  function Pi(T) {
7899
- g(p) !== null && (T.target?.hasPointerCapture(T.pointerId) && T.target.releasePointerCapture(T.pointerId), A(p, null)), (g(a) !== "line" || g(d) === null) && A(v, null);
7922
+ g(p) !== null && (T.target?.hasPointerCapture(T.pointerId) && T.target.releasePointerCapture(T.pointerId), A(p, null)), (g(a) !== "line" || g(h) === null) && A(v, null);
7900
7923
  }
7901
7924
  let Qt = null;
7902
7925
  Zi(() => {
@@ -7922,66 +7945,66 @@ function hf(e, t) {
7922
7945
  n(T), Yr();
7923
7946
  }
7924
7947
  }, Ni = Sn(), Na = Tn(Ni), za = (T) => {
7925
- var w = cf(), D = Fe(w), z = Fe(D);
7948
+ var w = cd(), D = Fe(w), z = Fe(D);
7926
7949
  gt(z, 21, () => j, (R) => R.name, (R, I) => {
7927
- var C = ef();
7950
+ var C = td();
7928
7951
  let we;
7929
7952
  var Z = Fe(C), ut = Fe(Z), De = (he) => {
7930
- var dt = Xd();
7931
- ee(he, dt);
7953
+ var ft = Jf();
7954
+ ee(he, ft);
7932
7955
  }, Zt = (he) => {
7933
- var dt = Jd();
7934
- ee(he, dt);
7956
+ var ft = Qf();
7957
+ ee(he, ft);
7935
7958
  }, ht = (he) => {
7936
- var dt = Qd();
7937
- ee(he, dt);
7959
+ var ft = Zf();
7960
+ ee(he, ft);
7938
7961
  }, Da = (he) => {
7939
- var dt = Zd();
7940
- ee(he, dt);
7962
+ var ft = ed();
7963
+ ee(he, ft);
7941
7964
  };
7942
7965
  rr(ut, (he) => {
7943
7966
  g(I).name === "selector" ? he(De) : g(I).name === "point" ? he(Zt, 1) : g(I).name === "line" ? he(ht, 2) : g(I).name === "delete" && he(Da, 3);
7944
- }), de(Z);
7967
+ }), fe(Z);
7945
7968
  var Bi = Re(Z, 2), Fa = Fe(Bi, !0);
7946
- de(Bi), de(C), je(() => {
7969
+ fe(Bi), fe(C), je(() => {
7947
7970
  we = ao(C, 1, "pie-tool-graph__tool-button svelte-7afz7f", null, we, { "pie-tool-graph__tool-button--active": g(a) === g(I).name }), W(C, "title", g(I).title), W(C, "aria-label", g(I).title), W(C, "aria-pressed", g(a) === g(I).name), bc(Fa, g(I).label);
7948
7971
  }), pt("click", C, () => Ra(g(I).name)), ee(R, C);
7949
- }), de(z);
7972
+ }), fe(z);
7950
7973
  var re = Re(z, 2), Y = Re(Fe(re), 2);
7951
- $c(Y), de(re), de(D);
7974
+ $c(Y), fe(re), fe(D);
7952
7975
  var tt = Re(D, 2), Ie = Fe(tt), rt = Fe(Ie), zi = Fe(rt);
7953
7976
  gt(zi, 17, () => g(Sr).minorHorizontal, Ar, (R, I) => {
7954
- var C = tf();
7977
+ var C = rd();
7955
7978
  je(() => {
7956
7979
  W(C, "y1", g(I)), W(C, "x2", g(F)), W(C, "y2", g(I));
7957
7980
  }), ee(R, C);
7958
7981
  });
7959
7982
  var Wi = Re(zi);
7960
7983
  gt(Wi, 17, () => g(Sr).majorHorizontal, Ar, (R, I) => {
7961
- var C = rf();
7984
+ var C = nd();
7962
7985
  je(() => {
7963
7986
  W(C, "y1", g(I)), W(C, "x2", g(F)), W(C, "y2", g(I));
7964
7987
  }), ee(R, C);
7965
7988
  });
7966
7989
  var Hi = Re(Wi);
7967
7990
  gt(Hi, 17, () => g(Sr).minorVertical, Ar, (R, I) => {
7968
- var C = nf();
7991
+ var C = id();
7969
7992
  je(() => {
7970
7993
  W(C, "x1", g(I)), W(C, "x2", g(I));
7971
7994
  }), ee(R, C);
7972
7995
  });
7973
7996
  var Wa = Re(Hi);
7974
7997
  gt(Wa, 17, () => g(Sr).majorVertical, Ar, (R, I) => {
7975
- var C = of();
7998
+ var C = od();
7976
7999
  je(() => {
7977
8000
  W(C, "x1", g(I)), W(C, "x2", g(I));
7978
8001
  }), ee(R, C);
7979
- }), de(rt);
8002
+ }), fe(rt);
7980
8003
  var yn = Re(rt);
7981
8004
  gt(yn, 21, () => g(c), (R) => R.id, (R, I) => {
7982
8005
  const C = /* @__PURE__ */ er(() => te(g(I).p1Id)), we = /* @__PURE__ */ er(() => te(g(I).p2Id));
7983
8006
  var Z = Sn(), ut = Tn(Z), De = (Zt) => {
7984
- var ht = sf();
8007
+ var ht = sd();
7985
8008
  je(() => {
7986
8009
  W(ht, "x1", g(C).x), W(ht, "y1", g(C).y), W(ht, "x2", g(we).x), W(ht, "y2", g(we).y);
7987
8010
  }), ee(Zt, ht);
@@ -7989,10 +8012,10 @@ function hf(e, t) {
7989
8012
  rr(ut, (Zt) => {
7990
8013
  g(C) && g(we) && Zt(De);
7991
8014
  }), ee(R, Z);
7992
- }), de(yn);
8015
+ }), fe(yn);
7993
8016
  var bn = Re(yn);
7994
8017
  gt(bn, 21, () => g(l), (R) => R.id, (R, I) => {
7995
- var C = af();
8018
+ var C = ad();
7996
8019
  let we;
7997
8020
  je((Z) => {
7998
8021
  W(C, "cx", g(I).x), W(C, "cy", g(I).y), we = ao(C, 0, "pie-tool-graph__user-point svelte-7afz7f", null, we, Z), W(C, "data-id", g(I).id), W(C, "aria-label", `Graph point ${g(I).id ?? ""}`);
@@ -8001,11 +8024,11 @@ function hf(e, t) {
8001
8024
  }), pt("keydown", C, (Z) => {
8002
8025
  (Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), mn(g(I).id));
8003
8026
  }), ee(R, C);
8004
- }), de(bn);
8027
+ }), fe(bn);
8005
8028
  var Ha = Re(bn), Ba = (R) => {
8006
- const I = /* @__PURE__ */ er(() => te(g(d)));
8029
+ const I = /* @__PURE__ */ er(() => te(g(h)));
8007
8030
  var C = Sn(), we = Tn(C), Z = (ut) => {
8008
- var De = lf();
8031
+ var De = ld();
8009
8032
  je(() => {
8010
8033
  W(De, "x1", g(I).x), W(De, "y1", g(I).y), W(De, "x2", g(v).x), W(De, "y2", g(v).y);
8011
8034
  }), ee(ut, De);
@@ -8015,10 +8038,10 @@ function hf(e, t) {
8015
8038
  }), ee(R, C);
8016
8039
  };
8017
8040
  rr(Ha, (R) => {
8018
- g(d) && g(v) && R(Ba);
8019
- }), de(Ie), In(Ie, (R) => A(s, R), () => g(s)), de(tt), In(tt, (R) => A(i, R), () => g(i)), de(w), In(w, (R) => A(o, R), () => g(o)), je(() => {
8020
- W(w, "data-tool-id", n()), W(Ie, "viewBox", `0 0 ${g(F) ?? ""} 100`), Mc(rt, `opacity: ${g(h) ?? ""}`);
8021
- }), Nc(Y, () => g(h), (R) => A(h, R)), pt("click", tt, Li), pt("keydown", tt, (R) => {
8041
+ g(h) && g(v) && R(Ba);
8042
+ }), fe(Ie), In(Ie, (R) => A(s, R), () => g(s)), fe(tt), In(tt, (R) => A(i, R), () => g(i)), fe(w), In(w, (R) => A(o, R), () => g(o)), je(() => {
8043
+ W(w, "data-tool-id", n()), W(Ie, "viewBox", `0 0 ${g(F) ?? ""} 100`), Mc(rt, `opacity: ${g(f) ?? ""}`);
8044
+ }), Nc(Y, () => g(f), (R) => A(f, R)), pt("click", tt, Li), pt("keydown", tt, (R) => {
8022
8045
  (R.key === "Enter" || R.key === " ") && (R.preventDefault(), Li(R));
8023
8046
  }), pt("pointermove", Ie, La), pt("pointerup", Ie, Pi), uc("pointerleave", Ie, Pi), ee(T, w);
8024
8047
  };
@@ -8033,7 +8056,7 @@ hc([
8033
8056
  "pointerup",
8034
8057
  "pointerdown"
8035
8058
  ]);
8036
- customElements.define("pie-tool-graph", Dc(hf, {
8059
+ customElements.define("pie-tool-graph", Dc(hd, {
8037
8060
  visible: {
8038
8061
  attribute: "visible",
8039
8062
  type: "Boolean"
@@ -8044,7 +8067,7 @@ customElements.define("pie-tool-graph", Dc(hf, {
8044
8067
  }
8045
8068
  }, [], [], { mode: "open" }));
8046
8069
  export {
8047
- hf as default,
8048
- pf as n,
8049
- ff as t
8070
+ hd as default,
8071
+ pd as n,
8072
+ dd as t
8050
8073
  };