@pie-element/simple-cloze 0.1.7-next.20261007184841 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/print.js CHANGED
@@ -158,7 +158,7 @@ function Ge() {
158
158
  We = [], v(e);
159
159
  }
160
160
  function Ke(e) {
161
- if (We.length === 0 && !mt) {
161
+ if (We.length === 0 && !pt) {
162
162
  var t = We;
163
163
  queueMicrotask(() => {
164
164
  t === We && Ge();
@@ -333,7 +333,7 @@ function ct(e) {
333
333
  j(e, b);
334
334
  return;
335
335
  }
336
- Nn || (ft === null ? Ye(e) : (ln() || P?.is_fork) && ft.set(e, t));
336
+ Nn || (F === null ? Ye(e) : (ln() || P?.is_fork) && F.set(e, t));
337
337
  }
338
338
  function lt(e) {
339
339
  if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && Ze(() => {
@@ -345,8 +345,8 @@ function ut(e) {
345
345
  }
346
346
  //#endregion
347
347
  //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
348
- var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt = null, _t = null, vt = 0, yt = 1, bt = class e {
349
- id = yt++;
348
+ var N = null, P = null, dt = null, F = null, ft = null, pt = !1, mt = !1, ht = null, gt = null, _t = 0, vt = 1, yt = class e {
349
+ id = vt++;
350
350
  #e = !1;
351
351
  linked = !0;
352
352
  #t = null;
@@ -422,21 +422,21 @@ var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt =
422
422
  for (let e of this.#u) this.#d.delete(e), j(e, x), this.schedule(e);
423
423
  for (let e of this.#d) j(e, ee), this.schedule(e);
424
424
  this.apply();
425
- for (var t = gt = [], n = [], r = _t = []; this.#c.length > 0;) {
426
- vt++ > 1e3 && (this.#S(), St());
425
+ for (var t = ht = [], n = [], r = gt = []; this.#c.length > 0;) {
426
+ _t++ > 1e3 && (this.#S(), xt());
427
427
  for (let e of this.#g()) try {
428
428
  this.#v(e, t, n);
429
429
  } catch (t) {
430
- throw Ot(e), this.#h() || this.discard(), t;
430
+ throw Dt(e), this.#h() || this.discard(), t;
431
431
  }
432
432
  }
433
433
  if (P = null, r.length > 0) {
434
434
  var i = e.ensure();
435
435
  for (let e of r) i.schedule(e);
436
436
  }
437
- if (gt = null, _t = null, this.#h()) {
437
+ if (ht = null, gt = null, this.#h()) {
438
438
  this.#x(n), this.#x(t);
439
- for (let [e, t] of this.#f) Dt(e, t);
439
+ for (let [e, t] of this.#f) Et(e, t);
440
440
  r.length > 0 && P.#_();
441
441
  return;
442
442
  }
@@ -447,13 +447,13 @@ var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt =
447
447
  }
448
448
  this.#u.clear(), this.#d.clear();
449
449
  for (let e of this.#r) e(this);
450
- this.#r.clear(), dt = this, Ct(n), Ct(t), dt = null, this.#s?.resolve();
450
+ this.#r.clear(), dt = this, St(n), St(t), dt = null, this.#s?.resolve();
451
451
  var o = P;
452
452
  if (this.#a === 0 && (this.#c.length === 0 || o !== null) && this.#S(), this.#c.length > 0) if (o !== null) {
453
453
  for (let e of this.#c) o.#c.push(e);
454
454
  this.#c = [];
455
455
  } else o = this;
456
- o !== null && (I.clear(), o.#_());
456
+ o !== null && (kt.clear(), o.#_());
457
457
  }
458
458
  #v(e, t, n) {
459
459
  e.f ^= b;
@@ -511,19 +511,19 @@ var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt =
511
511
  for (var t = 0; t < e.length; t += 1) Xe(e[t], this.#u, this.#d);
512
512
  }
513
513
  capture(e, n, r = !1) {
514
- e.v !== t && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [n, r]), ft?.set(e, n)), this.is_fork || (e.v = n);
514
+ e.v !== t && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [n, r]), F?.set(e, n)), this.is_fork || (e.v = n);
515
515
  }
516
516
  activate() {
517
517
  P = this;
518
518
  }
519
519
  deactivate() {
520
- P = null, ft = null;
520
+ P = null, F = null;
521
521
  }
522
522
  flush() {
523
523
  try {
524
- ht = !0, P = this, this.#_();
524
+ mt = !0, P = this, this.#_();
525
525
  } finally {
526
- vt = 0, pt = null, gt = null, _t = null, ht = !1, P = null, ft = null, I.clear();
526
+ _t = 0, ft = null, ht = null, gt = null, mt = !1, P = null, F = null, kt.clear();
527
527
  }
528
528
  }
529
529
  discard() {
@@ -567,17 +567,17 @@ var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt =
567
567
  static ensure() {
568
568
  if (P === null) {
569
569
  let t = P = new e();
570
- !ht && !mt && Ke(() => {
570
+ !mt && !pt && Ke(() => {
571
571
  t.#e || t.flush();
572
572
  });
573
573
  }
574
574
  return P;
575
575
  }
576
576
  apply() {
577
- ft = null;
577
+ F = null;
578
578
  }
579
579
  schedule(e) {
580
- if (pt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
580
+ if (ft = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
581
581
  e.b.defer_effect(e);
582
582
  return;
583
583
  }
@@ -590,9 +590,9 @@ var N = null, P = null, dt = null, ft = null, pt = null, mt = !1, ht = !1, gt =
590
590
  }
591
591
  }
592
592
  };
593
- function xt(e) {
594
- var t = mt;
595
- mt = !0;
593
+ function bt(e) {
594
+ var t = pt;
595
+ pt = !0;
596
596
  try {
597
597
  var n;
598
598
  for (e && (P !== null && !P.is_fork && P.flush(), n = e());;) {
@@ -600,70 +600,70 @@ function xt(e) {
600
600
  P.flush();
601
601
  }
602
602
  } finally {
603
- mt = t;
603
+ pt = t;
604
604
  }
605
605
  }
606
- function St() {
606
+ function xt() {
607
607
  try {
608
608
  Me();
609
609
  } catch (e) {
610
- an(e, pt);
610
+ an(e, ft);
611
611
  }
612
612
  }
613
- var F = null;
614
- function Ct(e) {
613
+ var I = null;
614
+ function St(e) {
615
615
  var t = e.length;
616
616
  if (t !== 0) {
617
617
  for (var n = 0; n < t;) {
618
618
  var r = e[n++];
619
- if (!(r.f & 24576) && Jn(r) && (F = /* @__PURE__ */ new Set(), er(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Tn(r), F?.size > 0)) {
620
- I.clear();
621
- for (let e of F) {
619
+ if (!(r.f & 24576) && Jn(r) && (I = /* @__PURE__ */ new Set(), er(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Tn(r), I?.size > 0)) {
620
+ kt.clear();
621
+ for (let e of I) {
622
622
  if (e.f & 24576) continue;
623
623
  let t = [e], n = e.parent;
624
- for (; n !== null;) F.has(n) && (F.delete(n), t.push(n)), n = n.parent;
624
+ for (; n !== null;) I.has(n) && (I.delete(n), t.push(n)), n = n.parent;
625
625
  for (let e = t.length - 1; e >= 0; e--) {
626
626
  let n = t[e];
627
627
  n.f & 24576 || er(n);
628
628
  }
629
629
  }
630
- F.clear();
630
+ I.clear();
631
631
  }
632
632
  }
633
- F = null;
633
+ I = null;
634
634
  }
635
635
  }
636
- function wt(e, t, n, r) {
636
+ function Ct(e, t, n, r) {
637
637
  if (!n.has(e) && (n.add(e), e.reactions !== null)) for (let i of e.reactions) {
638
638
  let e = i.f;
639
- e & 2 ? wt(i, t, n, r) : e & 4194320 && !(e & 2048) && Tt(i, t, r) && (j(i, x), Et(i));
639
+ e & 2 ? Ct(i, t, n, r) : e & 4194320 && !(e & 2048) && wt(i, t, r) && (j(i, x), Tt(i));
640
640
  }
641
641
  }
642
- function Tt(e, t, n) {
642
+ function wt(e, t, n) {
643
643
  let r = n.get(e);
644
644
  if (r !== void 0) return r;
645
645
  if (e.deps !== null) for (let r of e.deps) {
646
646
  if (s.call(t, r)) return !0;
647
- if (r.f & 2 && Tt(r, t, n)) return n.set(r, !0), !0;
647
+ if (r.f & 2 && wt(r, t, n)) return n.set(r, !0), !0;
648
648
  }
649
649
  return n.set(e, !1), !1;
650
650
  }
651
- function Et(e) {
651
+ function Tt(e) {
652
652
  P.schedule(e);
653
653
  }
654
- function Dt(e, t) {
654
+ function Et(e, t) {
655
655
  if (!(e.f & 32 && e.f & 1024)) {
656
656
  e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), j(e, b);
657
- for (var n = e.first; n !== null;) Dt(n, t), n = n.next;
657
+ for (var n = e.first; n !== null;) Et(n, t), n = n.next;
658
658
  }
659
659
  }
660
- function Ot(e) {
660
+ function Dt(e) {
661
661
  j(e, b);
662
- for (var t = e.first; t !== null;) Ot(t), t = t.next;
662
+ for (var t = e.first; t !== null;) Dt(t), t = t.next;
663
663
  }
664
664
  //#endregion
665
665
  //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
666
- var kt = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Map(), At = !1;
666
+ var Ot = /* @__PURE__ */ new Set(), kt = /* @__PURE__ */ new Map(), At = !1;
667
667
  function jt(e, t) {
668
668
  return {
669
669
  f: 0,
@@ -685,24 +685,24 @@ function Mt(e, t = !1, n = !0) {
685
685
  return t || (r.equals = De), r;
686
686
  }
687
687
  function Nt(e, t, n = !1) {
688
- return z !== null && (!Fn || z.f & 131072) && Ue() && z.f & 4325394 && (Rn === null || !Rn.has(e)) && Le(), It(e, n ? Bt(t) : t, _t);
688
+ return z !== null && (!Fn || z.f & 131072) && Ue() && z.f & 4325394 && (Rn === null || !Rn.has(e)) && Le(), It(e, n ? Bt(t) : t, gt);
689
689
  }
690
690
  var Pt = null, Ft = 0;
691
691
  function It(e, t, n = null) {
692
692
  if (!e.equals(t)) {
693
- Nn ? I.set(e, t) : I.has(e) || I.set(e, e.v);
694
- var r = bt.ensure();
693
+ Nn ? kt.set(e, t) : kt.has(e) || kt.set(e, e.v);
694
+ var r = yt.ensure();
695
695
  if (r.capture(e, t), e.f & 2) {
696
696
  let t = e;
697
- e.f & 2048 && st(t), ft === null && Ye(t);
697
+ e.f & 2048 && st(t), F === null && Ye(t);
698
698
  }
699
- e.wv = qn(), Pt = null, Ft = 0, zt(e, x, n), Pt = null, Ue() && B !== null && B.f & 1024 && !(B.f & 96) && (Vn === null ? Hn([e]) : Vn.push(e)), !r.is_fork && kt.size > 0 && !At && Lt();
699
+ e.wv = qn(), Pt = null, Ft = 0, zt(e, x, n), Pt = null, Ue() && B !== null && B.f & 1024 && !(B.f & 96) && (Vn === null ? Hn([e]) : Vn.push(e)), !r.is_fork && Ot.size > 0 && !At && Lt();
700
700
  }
701
701
  return t;
702
702
  }
703
703
  function Lt() {
704
704
  At = !1;
705
- for (let e of kt) {
705
+ for (let e of Ot) {
706
706
  e.f & 1024 && j(e, ee);
707
707
  let t;
708
708
  try {
@@ -712,7 +712,7 @@ function Lt() {
712
712
  }
713
713
  t && er(e);
714
714
  }
715
- kt.clear();
715
+ Ot.clear();
716
716
  }
717
717
  function Rt(e) {
718
718
  Nt(e, e.v + 1);
@@ -729,13 +729,13 @@ function zt(e, t, n) {
729
729
  var s = r[o], c = s.f;
730
730
  if (!(!i && s === B)) {
731
731
  var l = (c & x) === 0;
732
- if (l && j(s, t), c & 131072) kt.add(s);
732
+ if (l && j(s, t), c & 131072) Ot.add(s);
733
733
  else if (c & 2) {
734
734
  var u = s;
735
- ft?.delete(u), zt(u, ee, n);
735
+ F?.delete(u), zt(u, ee, n);
736
736
  } else if (l) {
737
737
  var d = s;
738
- c & 16 && F !== null && F.add(d), n === null ? Et(d) : n.push(d);
738
+ c & 16 && I !== null && I.add(d), n === null ? Tt(d) : n.push(d);
739
739
  }
740
740
  }
741
741
  }
@@ -965,7 +965,7 @@ function cn(e, t) {
965
965
  };
966
966
  P?.register_created_effect(r);
967
967
  var i = r;
968
- if (e & 4) gt === null ? bt.ensure().schedule(r) : gt.push(r);
968
+ if (e & 4) ht === null ? yt.ensure().schedule(r) : ht.push(r);
969
969
  else if (t !== null) {
970
970
  try {
971
971
  er(r);
@@ -999,14 +999,14 @@ function fn(e) {
999
999
  return cn(4 | ae, e);
1000
1000
  }
1001
1001
  function pn(e) {
1002
- bt.ensure();
1002
+ yt.ensure();
1003
1003
  let t = cn(64 | ie, e);
1004
1004
  return () => {
1005
1005
  R(t);
1006
1006
  };
1007
1007
  }
1008
1008
  function mn(e) {
1009
- bt.ensure();
1009
+ yt.ensure();
1010
1010
  let t = cn(64 | ie, e);
1011
1011
  return (e = {}) => new Promise((n) => {
1012
1012
  e.outro ? En(t, () => {
@@ -1117,7 +1117,7 @@ function On(e) {
1117
1117
  }
1118
1118
  function kn(e, t) {
1119
1119
  if (!(e.f & 256) && e.f & 8192) {
1120
- e.f ^= te, e.f & 1024 || (j(e, x), bt.ensure().schedule(e));
1120
+ e.f ^= te, e.f & 1024 || (j(e, x), yt.ensure().schedule(e));
1121
1121
  for (var n = e.first; n !== null;) {
1122
1122
  var r = n.next, i = (n.f & 65536) != 0 || (n.f & 32) != 0;
1123
1123
  kn(n, i ? t : !1), n = r;
@@ -1169,7 +1169,7 @@ function Jn(e) {
1169
1169
  var a = n[i];
1170
1170
  if (Jn(a) && ct(a), a.wv > e.wv) return !0;
1171
1171
  }
1172
- t & 512 && ft === null && j(e, b);
1172
+ t & 512 && F === null && j(e, b);
1173
1173
  }
1174
1174
  return !1;
1175
1175
  }
@@ -1177,7 +1177,7 @@ function Yn(e, t, n = !0) {
1177
1177
  var r = e.reactions;
1178
1178
  if (r !== null && !(Rn !== null && Rn.has(e))) for (var i = 0; i < r.length; i++) {
1179
1179
  var a = r[i];
1180
- a.f & 2 ? Yn(a, t, !1) : t === a && (n ? j(a, x) : a.f & 1024 && j(a, ee), Et(a));
1180
+ a.f & 2 ? Yn(a, t, !1) : t === a && (n ? j(a, x) : a.f & 1024 && j(a, ee), Tt(a));
1181
1181
  }
1182
1182
  }
1183
1183
  function Xn(e) {
@@ -1259,17 +1259,17 @@ function H(e) {
1259
1259
  r === null ? e.reactions = [z] : s.call(r, z) || r.push(z);
1260
1260
  }
1261
1261
  }
1262
- if (Nn && I.has(e)) return I.get(e);
1262
+ if (Nn && kt.has(e)) return kt.get(e);
1263
1263
  if (t) {
1264
1264
  var i = e;
1265
1265
  if (Nn) {
1266
1266
  var a = i.v;
1267
- return (!(i.f & 1024) && i.reactions !== null || nr(i)) && (a = st(i)), I.set(i, a), a;
1267
+ return (!(i.f & 1024) && i.reactions !== null || nr(i)) && (a = st(i)), kt.set(i, a), a;
1268
1268
  }
1269
1269
  var o = (i.f & 512) == 0 && !Fn && z !== null && (Mn || (z.f & 512) != 0), c = (i.f & S) === 0;
1270
1270
  Jn(i) && (o && (i.f |= 512), ct(i)), o && !c && (ut(i), tr(i));
1271
1271
  }
1272
- if (ft?.has(e)) return ft.get(e);
1272
+ if (F?.has(e)) return F.get(e);
1273
1273
  if (e.f & 8388608) throw e.v;
1274
1274
  return e.v;
1275
1275
  }
@@ -1279,7 +1279,7 @@ function tr(e) {
1279
1279
  function nr(e) {
1280
1280
  if (e.v === t) return !0;
1281
1281
  if (e.deps === null) return !1;
1282
- for (let t of e.deps) if (I.has(t) || t.f & 2 && nr(t)) return !0;
1282
+ for (let t of e.deps) if (kt.has(t) || t.f & 2 && nr(t)) return !0;
1283
1283
  return !1;
1284
1284
  }
1285
1285
  function rr(e) {
@@ -1535,7 +1535,7 @@ var xr = class {
1535
1535
  var t = B, n = z, r = A;
1536
1536
  Ln(this.#i), In(this.#i), ze(this.#i.ctx);
1537
1537
  try {
1538
- return bt.ensure(), e();
1538
+ return yt.ensure(), e();
1539
1539
  } finally {
1540
1540
  Ln(t), In(n), ze(r);
1541
1541
  }
@@ -1917,7 +1917,7 @@ var Kr = class {
1917
1917
  intro: e.intro ?? !1,
1918
1918
  recover: e.recover,
1919
1919
  transformError: e.transformError
1920
- }), (!e?.props?.$$host || e.sync === !1) && xt(), this.#e = r.$$events;
1920
+ }), (!e?.props?.$$host || e.sync === !1) && bt(), this.#e = r.$$events;
1921
1921
  for (let e of Object.keys(this.#t)) e === "$set" || e === "$destroy" || e === "$on" || u(this, e, {
1922
1922
  get() {
1923
1923
  return this.#t[e];
@@ -2220,16 +2220,16 @@ function Ni(e) {
2220
2220
  for (let t = 0; t < e.length; t++) G(e, t) || (e[t] = null);
2221
2221
  return e;
2222
2222
  }
2223
- function Y(e) {
2223
+ function Pi(e) {
2224
2224
  let t = ui(null);
2225
2225
  for (let r of ai(e)) {
2226
2226
  var n = ni(r, 2);
2227
2227
  let i = n[0], a = n[1];
2228
- G(e, i) && (yi(a) ? t[i] = Ni(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = Y(a) : t[i] = a);
2228
+ G(e, i) && (yi(a) ? t[i] = Ni(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = Pi(a) : t[i] = a);
2229
2229
  }
2230
2230
  return t;
2231
2231
  }
2232
- function Pi(e) {
2232
+ function Fi(e) {
2233
2233
  switch (typeof e) {
2234
2234
  case "string": return e;
2235
2235
  case "number": return Ei(e);
@@ -2240,7 +2240,7 @@ function Pi(e) {
2240
2240
  case "function":
2241
2241
  case "object": {
2242
2242
  if (e === null) return Ai(e);
2243
- let t = e, n = Fi(t, "toString");
2243
+ let t = e, n = Ii(t, "toString");
2244
2244
  if (typeof n == "function") {
2245
2245
  let e = n(t);
2246
2246
  return typeof e == "string" ? e : Ai(e);
@@ -2250,7 +2250,7 @@ function Pi(e) {
2250
2250
  default: return Ai(e);
2251
2251
  }
2252
2252
  }
2253
- function Fi(e, t) {
2253
+ function Ii(e, t) {
2254
2254
  for (; e !== null;) {
2255
2255
  let n = li(e, t);
2256
2256
  if (n) {
@@ -2264,14 +2264,14 @@ function Fi(e, t) {
2264
2264
  }
2265
2265
  return n;
2266
2266
  }
2267
- function Ii(e) {
2267
+ function Li(e) {
2268
2268
  try {
2269
2269
  return K(e, ""), !0;
2270
2270
  } catch {
2271
2271
  return !1;
2272
2272
  }
2273
2273
  }
2274
- var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ri = U(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), zi = U([
2274
+ var Ri = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), zi = U(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Bi = U([
2275
2275
  "feBlend",
2276
2276
  "feColorMatrix",
2277
2277
  "feComponentTransfer",
@@ -2297,7 +2297,7 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2297
2297
  "feSpotLight",
2298
2298
  "feTile",
2299
2299
  "feTurbulence"
2300
- ]), Bi = U([
2300
+ ]), Vi = U([
2301
2301
  "animate",
2302
2302
  "color-profile",
2303
2303
  "cursor",
@@ -2320,7 +2320,7 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2320
2320
  "solidcolor",
2321
2321
  "unknown",
2322
2322
  "use"
2323
- ]), Vi = U(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Hi = U([
2323
+ ]), Hi = U(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ui = U([
2324
2324
  "maction",
2325
2325
  "maligngroup",
2326
2326
  "malignmark",
@@ -2336,13 +2336,13 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2336
2336
  "annotation-xml",
2337
2337
  "mprescripts",
2338
2338
  "none"
2339
- ]), Ui = U(["#text"]), Wi = U(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Gi = U(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ki = U(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), qi = U([
2339
+ ]), Wi = U(["#text"]), Gi = U(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Ki = U(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), qi = U(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Ji = U([
2340
2340
  "xlink:href",
2341
2341
  "xml:id",
2342
2342
  "xlink:title",
2343
2343
  "xml:space",
2344
2344
  "xmlns:xlink"
2345
- ]), Ji = W(/{{[\w\W]*|^[\w\W]*}}/g), Yi = W(/<%[\w\W]*|^[\w\W]*%>/g), Xi = W(/\${[\w\W]*/g), Zi = W(/^data-[\-\w.\u00B7-\uFFFF]+$/), Qi = W(/^aria-[\-\w]+$/), $i = W(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ea = W(/^(?:\w+script|data):/i), ta = W(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), na = W(/^html$/i), ra = W(/^[a-z][.\w]*(-[.\w]+)+$/i), ia = W(/<[/\w!]/g), aa = W(/<[/\w]/g), oa = W(/<\/no(script|embed|frames)/i), sa = W(/\/>/i), ca = {
2345
+ ]), Yi = W(/{{[\w\W]*|^[\w\W]*}}/g), Xi = W(/<%[\w\W]*|^[\w\W]*%>/g), Zi = W(/\${[\w\W]*/g), Qi = W(/^data-[\-\w.\u00B7-\uFFFF]+$/), $i = W(/^aria-[\-\w]+$/), ea = W(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ta = W(/^(?:\w+script|data):/i), na = W(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), ra = W(/^html$/i), ia = W(/^[a-z][.\w]*(-[.\w]+)+$/i), aa = W(/<[/\w!]/g), oa = W(/<[/\w]/g), sa = W(/<\/no(script|embed|frames)/i), ca = W(/\/>/i), la = {
2346
2346
  element: 1,
2347
2347
  attribute: 2,
2348
2348
  text: 3,
@@ -2355,7 +2355,7 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2355
2355
  documentType: 10,
2356
2356
  documentFragment: 11,
2357
2357
  notation: 12
2358
- }, la = [
2358
+ }, ua = [
2359
2359
  "style",
2360
2360
  "script",
2361
2361
  "xmp",
@@ -2364,14 +2364,14 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2364
2364
  "noframes",
2365
2365
  "plaintext",
2366
2366
  "noscript"
2367
- ], ua = U(J({}, la)), da = function() {
2367
+ ], da = U(J({}, ua)), fa = function() {
2368
2368
  let e = {};
2369
- return mi(la, (t) => {
2369
+ return mi(ua, (t) => {
2370
2370
  e[t] = W(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
2371
2371
  }), U(e);
2372
- }(), fa = function() {
2372
+ }(), pa = function() {
2373
2373
  return typeof window > "u" ? null : window;
2374
- }, pa = function(e, t) {
2374
+ }, ma = function(e, t) {
2375
2375
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
2376
2376
  let n = null, r = "data-tt-policy-suffix";
2377
2377
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -2388,7 +2388,7 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2388
2388
  } catch {
2389
2389
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2390
2390
  }
2391
- }, ma = function() {
2391
+ }, ha = function() {
2392
2392
  return {
2393
2393
  afterSanitizeAttributes: [],
2394
2394
  afterSanitizeElements: [],
@@ -2400,20 +2400,20 @@ var Li = U(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2400
2400
  uponSanitizeElement: [],
2401
2401
  uponSanitizeShadowNode: []
2402
2402
  };
2403
- }, ha = function(e, t, n, r) {
2404
- return G(e, t) && yi(e[t]) ? J(r.base ? Y(r.base) : {}, e[t], r.transform) : n;
2405
- }, ga = function(e, t, n) {
2403
+ }, ga = function(e, t, n, r) {
2404
+ return G(e, t) && yi(e[t]) ? J(r.base ? Pi(r.base) : {}, e[t], r.transform) : n;
2405
+ }, _a = function(e, t, n) {
2406
2406
  let r = G(e, t) ? e[t] : void 0;
2407
- return r && typeof r == "object" ? Y(r) : n();
2407
+ return r && typeof r == "object" ? Pi(r) : n();
2408
2408
  };
2409
- function _a() {
2410
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fa(), t = (e) => _a(e);
2411
- if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== ca.document || !e.Element) return t.isSupported = !1, t;
2409
+ function va() {
2410
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pa(), t = (e) => va(e);
2411
+ if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== la.document || !e.Element) return t.isSupported = !1, t;
2412
2412
  let n = e.document, r = n, i = r.currentScript;
2413
2413
  e.DocumentFragment;
2414
2414
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
2415
2415
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
2416
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Fi(d, "cloneNode"), p = Fi(d, "remove"), m = Fi(d, "removeAttributeNode"), h = Fi(d, "nextSibling"), g = Fi(d, "childNodes"), _ = Fi(d, "parentNode"), v = Fi(d, "shadowRoot"), y = Fi(d, "attributes"), b = o && o.prototype ? Fi(o.prototype, "nodeType") : null, x = o && o.prototype ? Fi(o.prototype, "nodeName") : null, ee = o && o.prototype ? Fi(o.prototype, "ownerDocument") : null, te = function(e) {
2416
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Ii(d, "cloneNode"), p = Ii(d, "remove"), m = Ii(d, "removeAttributeNode"), h = Ii(d, "nextSibling"), g = Ii(d, "childNodes"), _ = Ii(d, "parentNode"), v = Ii(d, "shadowRoot"), y = Ii(d, "attributes"), b = o && o.prototype ? Ii(o.prototype, "nodeType") : null, x = o && o.prototype ? Ii(o.prototype, "nodeName") : null, ee = o && o.prototype ? Ii(o.prototype, "ownerDocument") : null, te = function(e) {
2417
2417
  return b ? b(e) : e.nodeType;
2418
2418
  }, ne = function(e) {
2419
2419
  return x ? x(e) : e.nodeName;
@@ -2439,20 +2439,20 @@ function _a() {
2439
2439
  ae--;
2440
2440
  }
2441
2441
  }, le = function() {
2442
- return ie ||= (re = pa(u, i), !0), re;
2443
- }, ue = n, de = ue.implementation, fe = ue.createNodeIterator, pe = ue.createDocumentFragment, me = ue.getElementsByTagName, he = r.importNode, w = ma();
2442
+ return ie ||= (re = ma(u, i), !0), re;
2443
+ }, ue = n, de = ue.implementation, fe = ue.createNodeIterator, pe = ue.createDocumentFragment, me = ue.getElementsByTagName, he = r.importNode, w = ha();
2444
2444
  t.isSupported = typeof ai == "function" && typeof _ == "function" && de && de.createHTMLDocument !== void 0;
2445
- let ge = Ji, _e = Yi, ve = Xi, ye = Zi, be = Qi, T = ea, xe = ta, E = ra, D = $i, O = null, Se = J({}, [
2446
- ...Li,
2445
+ let ge = Yi, _e = Xi, ve = Zi, ye = Qi, be = $i, T = ta, xe = na, E = ia, D = ea, O = null, Se = J({}, [
2447
2446
  ...Ri,
2448
2447
  ...zi,
2449
- ...Vi,
2450
- ...Ui
2448
+ ...Bi,
2449
+ ...Hi,
2450
+ ...Wi
2451
2451
  ]), k = null, Ce = J({}, [
2452
- ...Wi,
2453
2452
  ...Gi,
2454
2453
  ...Ki,
2455
- ...qi
2454
+ ...qi,
2455
+ ...Ji
2456
2456
  ]), we = Object.seal(ui(null, {
2457
2457
  tagNameCheck: {
2458
2458
  writable: !0,
@@ -2523,20 +2523,20 @@ function _a() {
2523
2523
  "font",
2524
2524
  "a",
2525
2525
  "script"
2526
- ]), lt = null, ut = ["application/xhtml+xml", "text/html"], N = null, P = null, dt = n.createElement("form"), ft = function(e) {
2526
+ ]), lt = null, ut = ["application/xhtml+xml", "text/html"], N = null, P = null, dt = n.createElement("form"), F = function(e) {
2527
2527
  return e instanceof RegExp || e instanceof Function;
2528
- }, pt = function() {
2528
+ }, ft = function() {
2529
2529
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2530
2530
  if (P && P === e) return;
2531
- (!e || typeof e != "object") && (e = {}), e = Y(e), lt = ut.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, N = lt === "application/xhtml+xml" ? xi : bi, O = ha(e, "ALLOWED_TAGS", Se, { transform: N }), k = ha(e, "ALLOWED_ATTR", Ce, { transform: N }), nt = ha(e, "ALLOWED_NAMESPACES", rt, { transform: xi }), Xe = ha(e, "ADD_URI_SAFE_ATTR", Ze, {
2531
+ (!e || typeof e != "object") && (e = {}), e = Pi(e), lt = ut.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, N = lt === "application/xhtml+xml" ? xi : bi, O = ga(e, "ALLOWED_TAGS", Se, { transform: N }), k = ga(e, "ALLOWED_ATTR", Ce, { transform: N }), nt = ga(e, "ALLOWED_NAMESPACES", rt, { transform: xi }), Xe = ga(e, "ADD_URI_SAFE_ATTR", Ze, {
2532
2532
  transform: N,
2533
2533
  base: Ze
2534
- }), j = ha(e, "ADD_DATA_URI_TAGS", Ye, {
2534
+ }), j = ga(e, "ADD_DATA_URI_TAGS", Ye, {
2535
2535
  transform: N,
2536
2536
  base: Ye
2537
- }), qe = ha(e, "FORBID_CONTENTS", Je, { transform: N }), Te = ha(e, "FORBID_TAGS", Y({}), { transform: N }), Ee = ha(e, "FORBID_ATTR", Y({}), { transform: N }), Ke = G(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Y(e.USE_PROFILES) : e.USE_PROFILES : !1, Oe = e.ALLOW_ARIA_ATTR !== !1, ke = e.ALLOW_DATA_ATTR !== !1, Ae = e.ALLOW_UNKNOWN_PROTOCOLS || !1, je = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Me = e.SAFE_FOR_TEMPLATES || !1, Ne = e.SAFE_FOR_XML !== !1, Pe = e.WHOLE_DOCUMENT || !1, A = e.RETURN_DOM || !1, ze = e.RETURN_DOM_FRAGMENT || !1, Be = e.RETURN_TRUSTED_TYPE || !1, Re = e.FORCE_BODY || !1, Ve = e.SANITIZE_DOM !== !1, He = e.SANITIZE_NAMED_PROPS || !1, We = e.KEEP_CONTENT !== !1, Ge = e.IN_PLACE || !1, D = Ii(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : $i, et = typeof e.NAMESPACE == "string" ? e.NAMESPACE : M, at = ga(e, "MATHML_TEXT_INTEGRATION_POINTS", () => J({}, it)), st = ga(e, "HTML_INTEGRATION_POINTS", () => J({}, ot));
2538
- let t = ga(e, "CUSTOM_ELEMENT_HANDLING", () => ui(null));
2539
- if (we = ui(null), G(t, "tagNameCheck") && ft(t.tagNameCheck) && (we.tagNameCheck = t.tagNameCheck), G(t, "attributeNameCheck") && ft(t.attributeNameCheck) && (we.attributeNameCheck = t.attributeNameCheck), G(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (we.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), W(we), Me && (ke = !1), ze && (A = !0), Ke && (O = J({}, Ui), k = ui(null), Ke.html === !0 && (J(O, Li), J(k, Wi)), Ke.svg === !0 && (J(O, Ri), J(k, Gi), J(k, qi)), Ke.svgFilters === !0 && (J(O, zi), J(k, Gi), J(k, qi)), Ke.mathMl === !0 && (J(O, Vi), J(k, Ki), J(k, qi))), De.tagCheck = null, De.attributeCheck = null, G(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? De.tagCheck = e.ADD_TAGS : yi(e.ADD_TAGS) && (O === Se && (O = Y(O)), J(O, e.ADD_TAGS, N))), G(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? De.attributeCheck = e.ADD_ATTR : yi(e.ADD_ATTR) && (k === Ce && (k = Y(k)), J(k, e.ADD_ATTR, N))), G(e, "ADD_FORBID_CONTENTS") && yi(e.ADD_FORBID_CONTENTS) && (qe === Je && (qe = Y(qe)), J(qe, e.ADD_FORBID_CONTENTS, N)), We && (O["#text"] = !0), Pe && J(O, [
2537
+ }), qe = ga(e, "FORBID_CONTENTS", Je, { transform: N }), Te = ga(e, "FORBID_TAGS", Pi({}), { transform: N }), Ee = ga(e, "FORBID_ATTR", Pi({}), { transform: N }), Ke = G(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Pi(e.USE_PROFILES) : e.USE_PROFILES : !1, Oe = e.ALLOW_ARIA_ATTR !== !1, ke = e.ALLOW_DATA_ATTR !== !1, Ae = e.ALLOW_UNKNOWN_PROTOCOLS || !1, je = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Me = e.SAFE_FOR_TEMPLATES || !1, Ne = e.SAFE_FOR_XML !== !1, Pe = e.WHOLE_DOCUMENT || !1, A = e.RETURN_DOM || !1, ze = e.RETURN_DOM_FRAGMENT || !1, Be = e.RETURN_TRUSTED_TYPE || !1, Re = e.FORCE_BODY || !1, Ve = e.SANITIZE_DOM !== !1, He = e.SANITIZE_NAMED_PROPS || !1, We = e.KEEP_CONTENT !== !1, Ge = e.IN_PLACE || !1, D = Li(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ea, et = typeof e.NAMESPACE == "string" ? e.NAMESPACE : M, at = _a(e, "MATHML_TEXT_INTEGRATION_POINTS", () => J({}, it)), st = _a(e, "HTML_INTEGRATION_POINTS", () => J({}, ot));
2538
+ let t = _a(e, "CUSTOM_ELEMENT_HANDLING", () => ui(null));
2539
+ if (we = ui(null), G(t, "tagNameCheck") && F(t.tagNameCheck) && (we.tagNameCheck = t.tagNameCheck), G(t, "attributeNameCheck") && F(t.attributeNameCheck) && (we.attributeNameCheck = t.attributeNameCheck), G(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (we.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), W(we), Me && (ke = !1), ze && (A = !0), Ke && (O = J({}, Wi), k = ui(null), Ke.html === !0 && (J(O, Ri), J(k, Gi)), Ke.svg === !0 && (J(O, zi), J(k, Ki), J(k, Ji)), Ke.svgFilters === !0 && (J(O, Bi), J(k, Ki), J(k, Ji)), Ke.mathMl === !0 && (J(O, Hi), J(k, qi), J(k, Ji))), De.tagCheck = null, De.attributeCheck = null, G(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? De.tagCheck = e.ADD_TAGS : yi(e.ADD_TAGS) && (O === Se && (O = Pi(O)), J(O, e.ADD_TAGS, N))), G(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? De.attributeCheck = e.ADD_ATTR : yi(e.ADD_ATTR) && (k === Ce && (k = Pi(k)), J(k, e.ADD_ATTR, N))), G(e, "ADD_FORBID_CONTENTS") && yi(e.ADD_FORBID_CONTENTS) && (qe === Je && (qe = Pi(qe)), J(qe, e.ADD_FORBID_CONTENTS, N)), We && (O["#text"] = !0), Pe && J(O, [
2540
2540
  "html",
2541
2541
  "head",
2542
2542
  "body"
@@ -2552,32 +2552,32 @@ function _a() {
2552
2552
  }
2553
2553
  } else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = le()), S && typeof C == "string" && (C = se("")));
2554
2554
  U && U(e), P = e;
2555
- }, mt = J({}, [
2556
- ...Ri,
2555
+ }, pt = J({}, [
2557
2556
  ...zi,
2558
- ...Bi
2559
- ]), ht = J({}, [...Vi, ...Hi]), gt = function(e, t, n) {
2560
- return t.namespaceURI === M ? e === "svg" : t.namespaceURI === Qe ? e === "svg" && (n === "annotation-xml" || at[n]) : !!mt[e];
2557
+ ...Bi,
2558
+ ...Vi
2559
+ ]), mt = J({}, [...Hi, ...Ui]), ht = function(e, t, n) {
2560
+ return t.namespaceURI === M ? e === "svg" : t.namespaceURI === Qe ? e === "svg" && (n === "annotation-xml" || at[n]) : !!pt[e];
2561
+ }, gt = function(e, t, n) {
2562
+ return t.namespaceURI === M ? e === "math" : t.namespaceURI === $e ? e === "math" && st[n] : !!mt[e];
2561
2563
  }, _t = function(e, t, n) {
2562
- return t.namespaceURI === M ? e === "math" : t.namespaceURI === $e ? e === "math" && st[n] : !!ht[e];
2563
- }, vt = function(e, t, n) {
2564
- return t.namespaceURI === $e && !st[n] || t.namespaceURI === Qe && !at[n] ? !1 : !ht[e] && (ct[e] || !mt[e]);
2565
- }, yt = function(e) {
2564
+ return t.namespaceURI === $e && !st[n] || t.namespaceURI === Qe && !at[n] ? !1 : !mt[e] && (ct[e] || !pt[e]);
2565
+ }, vt = function(e) {
2566
2566
  let t = _(e);
2567
2567
  (!t || !t.tagName) && (t = {
2568
2568
  namespaceURI: et,
2569
2569
  tagName: "template"
2570
2570
  });
2571
2571
  let n = bi(e.tagName), r = bi(t.tagName);
2572
- return nt[e.namespaceURI] ? e.namespaceURI === $e ? gt(n, t, r) : e.namespaceURI === Qe ? _t(n, t, r) : e.namespaceURI === M ? vt(n, t, r) : !!(lt === "application/xhtml+xml" && nt[e.namespaceURI]) : !1;
2573
- }, bt = function(e) {
2572
+ return nt[e.namespaceURI] ? e.namespaceURI === $e ? ht(n, t, r) : e.namespaceURI === Qe ? gt(n, t, r) : e.namespaceURI === M ? _t(n, t, r) : !!(lt === "application/xhtml+xml" && nt[e.namespaceURI]) : !1;
2573
+ }, yt = function(e) {
2574
2574
  _i(t.removed, { element: e });
2575
2575
  try {
2576
2576
  _(e).removeChild(e);
2577
2577
  } catch {
2578
2578
  if (p(e), !_(e)) throw ji("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2579
2579
  }
2580
- }, xt = function(e, t, n) {
2580
+ }, bt = function(e, t, n) {
2581
2581
  try {
2582
2582
  m(e, t);
2583
2583
  } catch {
@@ -2585,8 +2585,8 @@ function _a() {
2585
2585
  e.removeAttribute(n);
2586
2586
  } catch {}
2587
2587
  }
2588
- }, St = function(e) {
2589
- wt(e);
2588
+ }, xt = function(e) {
2589
+ Ct(e);
2590
2590
  let t = g(e);
2591
2591
  if (t) {
2592
2592
  let e = [];
@@ -2601,9 +2601,9 @@ function _a() {
2601
2601
  let n = y(e);
2602
2602
  if (n) for (let t = n.length - 1; t >= 0; --t) {
2603
2603
  let r = n[t], i = r && r.name;
2604
- typeof i == "string" && xt(e, r, i);
2604
+ typeof i == "string" && bt(e, r, i);
2605
2605
  }
2606
- }, F = function(e, n, r) {
2606
+ }, I = function(e, n, r) {
2607
2607
  if (!r) try {
2608
2608
  r = n.getAttributeNode(e);
2609
2609
  } catch {
@@ -2621,48 +2621,48 @@ function _a() {
2621
2621
  } catch {}
2622
2622
  }
2623
2623
  if (e === "is") if (A || ze) try {
2624
- bt(n);
2624
+ yt(n);
2625
2625
  } catch {}
2626
2626
  else try {
2627
2627
  n.setAttribute(e, "");
2628
2628
  } catch {}
2629
- }, Ct = function(e) {
2629
+ }, St = function(e) {
2630
2630
  let t = y(e);
2631
2631
  if (t) for (let n = t.length - 1; n >= 0; --n) {
2632
2632
  let r = t[n], i = r && r.name;
2633
- typeof i != "string" || k[N(i)] || xt(e, r, i);
2633
+ typeof i != "string" || k[N(i)] || bt(e, r, i);
2634
2634
  }
2635
- }, wt = function(e) {
2635
+ }, Ct = function(e) {
2636
2636
  let t = [e];
2637
2637
  for (; t.length > 0;) {
2638
2638
  let e = t.pop();
2639
- te(e) === ca.element && Ct(e);
2639
+ te(e) === la.element && St(e);
2640
2640
  let n = g(e);
2641
2641
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
2642
2642
  }
2643
- }, Tt = function(e, t) {
2643
+ }, wt = function(e, t) {
2644
2644
  return Ne ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
2645
- }, Et = function(e) {
2645
+ }, Tt = function(e) {
2646
2646
  if (!Ne) return;
2647
2647
  let t = [e];
2648
2648
  for (; t.length > 0;) {
2649
2649
  let e = t.pop(), n = te(e);
2650
- if (n === ca.processingInstruction || n === ca.comment && K(aa, e.data)) {
2650
+ if (n === la.processingInstruction || n === la.comment && K(oa, e.data)) {
2651
2651
  try {
2652
2652
  p(e);
2653
2653
  } catch {}
2654
2654
  continue;
2655
2655
  }
2656
- if (n === ca.element) {
2656
+ if (n === la.element) {
2657
2657
  let t = e, n = N(ne(e));
2658
2658
  try {
2659
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Tt("for", n) && t.removeAttribute("for");
2659
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && wt("for", n) && t.removeAttribute("for");
2660
2660
  } catch {}
2661
2661
  }
2662
2662
  let r = g(e);
2663
2663
  if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
2664
2664
  }
2665
- }, Dt = function(e) {
2665
+ }, Et = function(e) {
2666
2666
  let t = null, r = null;
2667
2667
  if (Re) e = "<remove></remove>" + e;
2668
2668
  else {
@@ -2682,18 +2682,18 @@ function _a() {
2682
2682
  }
2683
2683
  let a = t.body || t.documentElement;
2684
2684
  return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), et === M ? me.call(t, Pe ? "html" : "body")[0] : Pe ? t.documentElement : a;
2685
- }, Ot = function(e) {
2685
+ }, Dt = function(e) {
2686
2686
  let t = ee ? ee(e) : e.ownerDocument;
2687
2687
  return fe.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
2688
- }, kt = function(e) {
2688
+ }, Ot = function(e) {
2689
2689
  return e = Ci(e, ge, " "), e = Ci(e, _e, " "), e = Ci(e, ve, " "), e;
2690
- }, I = function(e) {
2690
+ }, kt = function(e) {
2691
2691
  e.normalize();
2692
2692
  let t = ee ? ee(e) : e.ownerDocument, n = fe.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
2693
- for (; r;) r.data = kt(r.data), r = n.nextNode();
2693
+ for (; r;) r.data = Ot(r.data), r = n.nextNode();
2694
2694
  let i = e.querySelectorAll?.call(e, "template");
2695
2695
  i && mi(i, (e) => {
2696
- jt(e.content) && I(e.content);
2696
+ jt(e.content) && kt(e.content);
2697
2697
  });
2698
2698
  }, At = function(e) {
2699
2699
  let t = x ? x(e) : null;
@@ -2701,7 +2701,7 @@ function _a() {
2701
2701
  }, jt = function(e) {
2702
2702
  if (!b || typeof e != "object" || !e) return !1;
2703
2703
  try {
2704
- return b(e) === ca.documentFragment;
2704
+ return b(e) === la.documentFragment;
2705
2705
  } catch {
2706
2706
  return !1;
2707
2707
  }
@@ -2719,7 +2719,7 @@ function _a() {
2719
2719
  });
2720
2720
  }
2721
2721
  let Nt = function(e, t) {
2722
- return !!(Ne && e.hasChildNodes() && !L(e.firstElementChild) && K(ia, e.textContent) && K(ia, e.innerHTML) || Ne && e.namespaceURI === M && ua[t] && (L(e.firstElementChild) || typeof e.textContent == "string" && K(da[t], e.textContent)) || e.nodeType === ca.processingInstruction || Ne && e.nodeType === ca.comment && K(aa, e.data));
2722
+ return !!(Ne && e.hasChildNodes() && !L(e.firstElementChild) && K(aa, e.textContent) && K(aa, e.innerHTML) || Ne && e.namespaceURI === M && da[t] && (L(e.firstElementChild) || typeof e.textContent == "string" && K(fa[t], e.textContent)) || e.nodeType === la.processingInstruction || Ne && e.nodeType === la.comment && K(oa, e.data));
2723
2723
  }, Pt = function(e, t) {
2724
2724
  return e instanceof RegExp ? K(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
2725
2725
  }, Ft = function(e, t, n) {
@@ -2734,32 +2734,32 @@ function _a() {
2734
2734
  }
2735
2735
  }
2736
2736
  }
2737
- return bt(e), !0;
2737
+ return yt(e), !0;
2738
2738
  }, It = function(e, t, n, r) {
2739
- return e.length === 0 ? t : t === n || t === r ? Y(t) : t;
2739
+ return e.length === 0 ? t : t === n || t === r ? Pi(t) : t;
2740
2740
  }, Lt = function(e, t) {
2741
- return e === t || _(e) !== null ? !1 : (Ge && wt(e), !0);
2741
+ return e === t || _(e) !== null ? !1 : (Ge && Ct(e), !0);
2742
2742
  }, Rt = function(e, n) {
2743
2743
  if (Mt(w.beforeSanitizeElements, e, null), Lt(e, n)) return !0;
2744
- if (At(e)) return bt(e), !0;
2744
+ if (At(e)) return yt(e), !0;
2745
2745
  let r = N(ne(e));
2746
2746
  if (O = It(w.uponSanitizeElement, O, Se, Ie), Mt(w.uponSanitizeElement, e, {
2747
2747
  tagName: r,
2748
2748
  allowedTags: O
2749
2749
  }), Lt(e, n)) return !0;
2750
- if (Nt(e, r)) return bt(e), !0;
2750
+ if (Nt(e, r)) return yt(e), !0;
2751
2751
  if (Te[r] || !(De.tagCheck instanceof Function && De.tagCheck(r)) && !O[r]) {
2752
2752
  let t = Ft(e, r, n);
2753
2753
  return t === !1 && (Mt(w.afterSanitizeElements, e, null), Lt(e, n)) ? !0 : t;
2754
2754
  }
2755
- if (te(e) === ca.element && !yt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && K(oa, e.innerHTML)) return bt(e), !0;
2756
- if (Me && e.nodeType === ca.text) {
2757
- let n = kt(e.textContent);
2755
+ if (te(e) === la.element && !vt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && K(sa, e.innerHTML)) return yt(e), !0;
2756
+ if (Me && e.nodeType === la.text) {
2757
+ let n = Ot(e.textContent);
2758
2758
  e.textContent !== n && (_i(t.removed, { element: e.cloneNode() }), e.textContent = n);
2759
2759
  }
2760
2760
  return Mt(w.afterSanitizeElements, e, null), Lt(e, n);
2761
2761
  }, zt = function(e, t, r) {
2762
- if (Ee[t] || Tt(t, e) || Ve && (t === "id" || t === "name") && (r in n || r in dt)) return !1;
2762
+ if (Ee[t] || wt(t, e) || Ve && (t === "id" || t === "name") && (r in n || r in dt)) return !1;
2763
2763
  let i = k[t] || De.attributeCheck instanceof Function && De.attributeCheck(t, e);
2764
2764
  return ke && K(ye, t) || Oe && K(be, t) ? !0 : i ? Xe[t] || K(D, Ci(r, xe, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && wi(r, "data:") === 0 && j[e] || Ae && !K(T, Ci(r, xe, "")) ? !0 : !r : Vt(e) && Pt(we.tagNameCheck, e) && Pt(we.attributeNameCheck, t, e) || t === "is" && we.allowCustomizedBuiltInElements && Pt(we.tagNameCheck, r);
2765
2765
  }, Bt = J({}, [
@@ -2781,9 +2781,9 @@ function _a() {
2781
2781
  return r;
2782
2782
  }, Ut = function(e, t, n, r) {
2783
2783
  try {
2784
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), At(e) ? (bt(e), !1) : !0;
2784
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), At(e) ? (yt(e), !1) : !0;
2785
2785
  } catch {
2786
- return F(t, e), !1;
2786
+ return I(t, e), !1;
2787
2787
  }
2788
2788
  }, Wt = function(e, n) {
2789
2789
  if (Mt(w.beforeSanitizeAttributes, e, null), Lt(e, n)) return;
@@ -2799,25 +2799,25 @@ function _a() {
2799
2799
  }, a = r.length, o = N(e.nodeName);
2800
2800
  for (; a--;) {
2801
2801
  let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = N(s), d = l, f = s === "value" ? d : Ti(d), p = !1;
2802
- if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Mt(w.uponSanitizeAttribute, e, i), f = i.attrValue, He && (u === "id" || u === "name") && wi(f, Ue) !== 0 && (F(s, e, n), f = Ue + f, p = !0), Ne && K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
2803
- F(s, e, n);
2802
+ if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, Mt(w.uponSanitizeAttribute, e, i), f = i.attrValue, He && (u === "id" || u === "name") && wi(f, Ue) !== 0 && (I(s, e, n), f = Ue + f, p = !0), Ne && K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
2803
+ I(s, e, n);
2804
2804
  continue;
2805
2805
  }
2806
2806
  if (u === "attributename" && Si(f, "href")) {
2807
- F(s, e, n);
2807
+ I(s, e, n);
2808
2808
  continue;
2809
2809
  }
2810
2810
  if (!i.forceKeepAttr) {
2811
2811
  if (!i.keepAttr) {
2812
- F(s, e, n);
2812
+ I(s, e, n);
2813
2813
  continue;
2814
2814
  }
2815
- if (!je && K(sa, f)) {
2816
- F(s, e, n);
2815
+ if (!je && K(ca, f)) {
2816
+ I(s, e, n);
2817
2817
  continue;
2818
2818
  }
2819
- if (Me && (f = kt(f)), !zt(o, u, f)) {
2820
- F(s, e, n);
2819
+ if (Me && (f = Ot(f)), !zt(o, u, f)) {
2820
+ I(s, e, n);
2821
2821
  continue;
2822
2822
  }
2823
2823
  f = Ht(o, u, c, f), f !== d && Ut(e, s, c, f) && p && gi(t.removed);
@@ -2825,8 +2825,8 @@ function _a() {
2825
2825
  }
2826
2826
  Mt(w.afterSanitizeAttributes, e, null), Lt(e, n);
2827
2827
  }, Gt = function(e) {
2828
- let t = null, n = Ot(e);
2829
- for (Mt(w.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Mt(w.uponSanitizeShadowNode, t, null), Rt(t, e), Wt(t, e), jt(t.content) && Gt(t.content), te(t) === ca.element) {
2828
+ let t = null, n = Dt(e);
2829
+ for (Mt(w.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Mt(w.uponSanitizeShadowNode, t, null), Rt(t, e), Wt(t, e), jt(t.content) && Gt(t.content), te(t) === la.element) {
2830
2830
  let e = v(t);
2831
2831
  jt(e) && (Kt(e), Gt(e));
2832
2832
  }
@@ -2842,7 +2842,7 @@ function _a() {
2842
2842
  Gt(e.shadow);
2843
2843
  continue;
2844
2844
  }
2845
- let n = e.node, r = te(n) === ca.element, i = g(n);
2845
+ let n = e.node, r = te(n) === la.element, i = g(n);
2846
2846
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
2847
2847
  node: i[e],
2848
2848
  shadow: null
@@ -2871,59 +2871,59 @@ function _a() {
2871
2871
  };
2872
2872
  return t.sanitize = function(e) {
2873
2873
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
2874
- if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !L(e) && (e = Pi(e), typeof e != "string")) throw ji("dirty is not a string, aborting");
2874
+ if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !L(e) && (e = Fi(e), typeof e != "string")) throw ji("dirty is not a string, aborting");
2875
2875
  if (!t.isSupported) return e;
2876
- Fe ? (O = Ie, k = Le) : pt(n), (w.uponSanitizeElement.length > 0 || w.uponSanitizeAttribute.length > 0) && (O = Y(O)), w.uponSanitizeAttribute.length > 0 && (k = Y(k)), t.removed = [];
2876
+ Fe ? (O = Ie, k = Le) : ft(n), (w.uponSanitizeElement.length > 0 || w.uponSanitizeAttribute.length > 0) && (O = Pi(O)), w.uponSanitizeAttribute.length > 0 && (k = Pi(k)), t.removed = [];
2877
2877
  let c = Ge && typeof e != "string" && L(e);
2878
2878
  if (c) {
2879
- Et(e);
2879
+ Tt(e);
2880
2880
  let t = ne(e);
2881
2881
  if (typeof t == "string") {
2882
2882
  let n = N(t);
2883
- if (!O[n] || Te[n]) throw St(e), ji("root node is forbidden and cannot be sanitized in-place");
2883
+ if (!O[n] || Te[n]) throw xt(e), ji("root node is forbidden and cannot be sanitized in-place");
2884
2884
  }
2885
- if (At(e)) throw St(e), ji("root node is clobbered and cannot be sanitized in-place");
2885
+ if (At(e)) throw xt(e), ji("root node is clobbered and cannot be sanitized in-place");
2886
2886
  try {
2887
2887
  Kt(e);
2888
2888
  } catch (t) {
2889
- throw St(e), t;
2889
+ throw xt(e), t;
2890
2890
  }
2891
- } else if (L(e)) i = Dt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === ca.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Kt(i);
2891
+ } else if (L(e)) i = Et("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === la.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Kt(i);
2892
2892
  else {
2893
2893
  if (!A && !Me && !Pe && e.indexOf("<") === -1) return S && Be ? se(e) : e;
2894
- if (i = Dt(e), !i) return A ? null : Be ? C : "";
2894
+ if (i = Et(e), !i) return A ? null : Be ? C : "";
2895
2895
  }
2896
- i && Re && bt(i.firstChild);
2896
+ i && Re && yt(i.firstChild);
2897
2897
  let l = c ? e : i;
2898
2898
  try {
2899
- let e = Ot(l);
2899
+ let e = Dt(l);
2900
2900
  for (; o = e.nextNode();) Rt(o, l), Wt(o, l), jt(o.content) && Gt(o.content);
2901
2901
  } catch (n) {
2902
- throw c && (St(e), mi(t.removed, (e) => {
2903
- e.element && wt(e.element);
2902
+ throw c && (xt(e), mi(t.removed, (e) => {
2903
+ e.element && Ct(e.element);
2904
2904
  })), n;
2905
2905
  }
2906
2906
  if (c) {
2907
2907
  let n = !1;
2908
2908
  if (mi(t.removed, (t) => {
2909
- t.element && (t.element === e && (n = !0), wt(t.element));
2909
+ t.element && (t.element === e && (n = !0), Ct(t.element));
2910
2910
  }), n) throw ji("a node selected for removal could not be safely returned; refusing to sanitize in place");
2911
- return Me && I(e), e;
2911
+ return Me && kt(e), e;
2912
2912
  }
2913
2913
  if (A) {
2914
- if (Me && I(i), ze) for (s = pe.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
2914
+ if (Me && kt(i), ze) for (s = pe.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
2915
2915
  else s = i;
2916
2916
  return (k.shadowroot || k.shadowrootmode) && (s = he.call(r, s, !0)), s;
2917
2917
  }
2918
2918
  let u = Pe ? i.outerHTML : i.innerHTML;
2919
- return Pe && O["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && K(na, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), Me && (u = kt(u)), S && Be ? se(u) : u;
2919
+ return Pe && O["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && K(ra, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), Me && (u = Ot(u)), S && Be ? se(u) : u;
2920
2920
  }, t.setConfig = function() {
2921
2921
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2922
- pt(e), Fe = !0, Ie = O, Le = k;
2922
+ ft(e), Fe = !0, Ie = O, Le = k;
2923
2923
  }, t.clearConfig = function() {
2924
2924
  P = null, Fe = !1, Ie = null, Le = null, S = re, C = "";
2925
2925
  }, t.isValidAttribute = function(e, t, n) {
2926
- P || pt({});
2926
+ P || ft({});
2927
2927
  let r = N(e), i = N(t);
2928
2928
  return zt(r, i, n);
2929
2929
  }, t.addHook = function(e, t) {
@@ -2939,15 +2939,15 @@ function _a() {
2939
2939
  }, t.removeHooks = function(e) {
2940
2940
  G(w, e) && (w[e] = []);
2941
2941
  }, t.removeAllHooks = function() {
2942
- w = ma();
2942
+ w = ha();
2943
2943
  }, t;
2944
2944
  }
2945
- var va = _a(), ya = "data-pie-authored-ink", ba = "data-pie-authored-fill", xa = "data-pie-authored-border", Sa = [
2945
+ var ya = va(), ba = "data-pie-authored-ink", xa = "data-pie-authored-fill", Sa = "data-pie-authored-border", Ca = [
2946
2946
  "border-top-color",
2947
2947
  "border-right-color",
2948
2948
  "border-bottom-color",
2949
2949
  "border-left-color"
2950
- ], Ca = /* @__PURE__ */ new Set([
2950
+ ], wa = /* @__PURE__ */ new Set([
2951
2951
  "currentcolor",
2952
2952
  "inherit",
2953
2953
  "initial",
@@ -2956,35 +2956,35 @@ var va = _a(), ya = "data-pie-authored-ink", ba = "data-pie-authored-fill", xa =
2956
2956
  "revert-layer",
2957
2957
  "transparent"
2958
2958
  ]);
2959
- function wa(e) {
2959
+ function Ta(e) {
2960
2960
  let t = e?.trim().toLowerCase();
2961
- return !t || Ca.has(t) || t.includes("var(") ? !1 : Oa(t)?.a !== 0;
2961
+ return !t || wa.has(t) || t.includes("var(") ? !1 : ka(t)?.a !== 0;
2962
2962
  }
2963
- function Ta(e) {
2964
- let t = Oa(e);
2963
+ function Ea(e) {
2964
+ let t = ka(e);
2965
2965
  if (!t) return "shade";
2966
2966
  let n = (e) => (e * t.a + 255 * (1 - t.a)) / 255, [r, i, a] = [
2967
2967
  n(t.r),
2968
2968
  n(t.g),
2969
2969
  n(t.b)
2970
- ], o = .2126 * qa(r) + .7152 * qa(i) + .0722 * qa(a), s = Math.max(r, i, a) - Math.min(r, i, a);
2970
+ ], o = .2126 * Ja(r) + .7152 * Ja(i) + .0722 * Ja(a), s = Math.max(r, i, a) - Math.min(r, i, a);
2971
2971
  return o >= .85 && s <= .08 ? "light" : "shade";
2972
2972
  }
2973
- function Ea(e) {
2974
- e.removeAttribute(ya), e.removeAttribute(ba), e.removeAttribute(xa);
2973
+ function Da(e) {
2974
+ e.removeAttribute(ba), e.removeAttribute(xa), e.removeAttribute(Sa);
2975
2975
  let t = e.hasAttribute("style") ? e.style : void 0, n = (e) => t?.getPropertyValue(e).trim() ?? "", r = [], i = n("color"), a = e.localName === "font" ? e.getAttribute("color") : null;
2976
- wa(i || a) && (e.setAttribute("data-pie-authored-ink", ""), i && r.push("color"));
2977
- let o = n("background-color"), s = o || Da(e.getAttribute("bgcolor"));
2978
- wa(s) && (e.setAttribute("data-pie-authored-fill", Ta(s)), o && r.push("background-color"));
2979
- let c = Sa.filter((e) => wa(n(e)));
2976
+ Ta(i || a) && (e.setAttribute("data-pie-authored-ink", ""), i && r.push("color"));
2977
+ let o = n("background-color"), s = o || Oa(e.getAttribute("bgcolor"));
2978
+ Ta(s) && (e.setAttribute("data-pie-authored-fill", Ea(s)), o && r.push("background-color"));
2979
+ let c = Ca.filter((e) => Ta(n(e)));
2980
2980
  c.length && (e.setAttribute("data-pie-authored-border", ""), r.push(...c));
2981
2981
  for (let e of r) t?.getPropertyPriority(e) === "important" && t.setProperty(e, t.getPropertyValue(e));
2982
2982
  }
2983
- function Da(e) {
2983
+ function Oa(e) {
2984
2984
  let t = e?.trim() ?? "";
2985
2985
  return /^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t) ? `#${t}` : t;
2986
2986
  }
2987
- function Oa(e) {
2987
+ function ka(e) {
2988
2988
  let t = e.trim().toLowerCase();
2989
2989
  if (t === "transparent") return {
2990
2990
  r: 0,
@@ -2992,14 +2992,14 @@ function Oa(e) {
2992
2992
  b: 0,
2993
2993
  a: 0
2994
2994
  };
2995
- let n = Aa().get(t);
2996
- if (n) return ja(n);
2997
- if (t.startsWith("#")) return ja(t.slice(1));
2995
+ let n = ja().get(t);
2996
+ if (n) return Ma(n);
2997
+ if (t.startsWith("#")) return Ma(t.slice(1));
2998
2998
  let r = /^([a-z]+)\(([^()]*)\)$/.exec(t);
2999
2999
  if (!r) return null;
3000
3000
  let i = r[2].trim().split(/\s*[\s,/]\s*/);
3001
3001
  if (i.length !== 3 && i.length !== 4) return null;
3002
- let [a, o, s, c] = i, l = Pa(c), u;
3002
+ let [a, o, s, c] = i, l = Fa(c), u;
3003
3003
  switch (r[1]) {
3004
3004
  case "rgb":
3005
3005
  case "rgba":
@@ -3007,31 +3007,31 @@ function Oa(e) {
3007
3007
  a,
3008
3008
  o,
3009
3009
  s
3010
- ].map((e) => X(e, 255) / 255);
3010
+ ].map((e) => Y(e, 255) / 255);
3011
3011
  break;
3012
3012
  case "hsl":
3013
3013
  case "hsla":
3014
- u = Ia(Na(a), X(o, 100) / 100, X(s, 100) / 100);
3014
+ u = La(Pa(a), Y(o, 100) / 100, Y(s, 100) / 100);
3015
3015
  break;
3016
3016
  case "hwb":
3017
- u = La(Na(a), X(o, 100) / 100, X(s, 100) / 100);
3017
+ u = Ra(Pa(a), Y(o, 100) / 100, Y(s, 100) / 100);
3018
3018
  break;
3019
3019
  case "lab":
3020
- u = Ua(X(a, 100), X(o, 125), X(s, 125));
3020
+ u = Wa(Y(a, 100), Y(o, 125), Y(s, 125));
3021
3021
  break;
3022
3022
  case "lch":
3023
- u = Ua(X(a, 100), ...Fa(X(o, 150), Na(s)));
3023
+ u = Wa(Y(a, 100), ...Ia(Y(o, 150), Pa(s)));
3024
3024
  break;
3025
3025
  case "oklab":
3026
- u = Wa(X(a, 1), X(o, .4), X(s, .4));
3026
+ u = Ga(Y(a, 1), Y(o, .4), Y(s, .4));
3027
3027
  break;
3028
3028
  case "oklch":
3029
- u = Wa(X(a, 1), ...Fa(X(o, .4), Na(s)));
3029
+ u = Ga(Y(a, 1), ...Ia(Y(o, .4), Pa(s)));
3030
3030
  break;
3031
3031
  default: return null;
3032
3032
  }
3033
3033
  if (Number.isNaN(l) || u.some(Number.isNaN)) return null;
3034
- let [d, f, p] = u.map((e) => Ja(e, 0, 1) * 255);
3034
+ let [d, f, p] = u.map((e) => Ya(e, 0, 1) * 255);
3035
3035
  return {
3036
3036
  r: d,
3037
3037
  g: f,
@@ -3039,11 +3039,11 @@ function Oa(e) {
3039
3039
  a: l
3040
3040
  };
3041
3041
  }
3042
- var ka;
3043
- function Aa() {
3044
- return ka ??= new Map("aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32".split(" ").map((e) => e.split(":"))), ka;
3042
+ var Aa;
3043
+ function ja() {
3044
+ return Aa ??= new Map("aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32".split(" ").map((e) => e.split(":"))), Aa;
3045
3045
  }
3046
- function ja(e) {
3046
+ function Ma(e) {
3047
3047
  if (!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e)) return null;
3048
3048
  let [t, n, r, i = 255] = (e.length <= 4 ? [...e].map((e) => e + e) : e.match(/../g) ?? []).map((e) => Number.parseInt(e, 16));
3049
3049
  return {
@@ -3053,28 +3053,28 @@ function ja(e) {
3053
3053
  a: i / 255
3054
3054
  };
3055
3055
  }
3056
- var Ma = /^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;
3057
- function X(e, t) {
3056
+ var Na = /^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;
3057
+ function Y(e, t) {
3058
3058
  if (e === "none") return 0;
3059
- let n = Ma.exec(e);
3059
+ let n = Na.exec(e);
3060
3060
  return !n || n[2] && n[2] !== "%" ? NaN : n[2] ? Number(n[1]) / 100 * t : Number(n[1]);
3061
3061
  }
3062
- function Na(e) {
3062
+ function Pa(e) {
3063
3063
  if (e === "none") return 0;
3064
- let t = Ma.exec(e);
3064
+ let t = Na.exec(e);
3065
3065
  if (!t || t[2] === "%") return NaN;
3066
3066
  let n = Number(t[1]);
3067
3067
  return ((t[2] === "rad" ? n * 180 / Math.PI : t[2] === "grad" ? n * .9 : t[2] === "turn" ? n * 360 : n) % 360 + 360) % 360;
3068
3068
  }
3069
- function Pa(e) {
3070
- return e === void 0 ? 1 : Ja(X(e, 1), 0, 1);
3069
+ function Fa(e) {
3070
+ return e === void 0 ? 1 : Ya(Y(e, 1), 0, 1);
3071
3071
  }
3072
- function Fa(e, t) {
3072
+ function Ia(e, t) {
3073
3073
  let n = Math.max(0, e), r = t * Math.PI / 180;
3074
3074
  return [n * Math.cos(r), n * Math.sin(r)];
3075
3075
  }
3076
- function Ia(e, t, n) {
3077
- let r = Ja(t, 0, 1), i = Ja(n, 0, 1), a = (t) => {
3076
+ function La(e, t, n) {
3077
+ let r = Ya(t, 0, 1), i = Ya(n, 0, 1), a = (t) => {
3078
3078
  let n = (t + e / 30) % 12, a = r * Math.min(i, 1 - i);
3079
3079
  return i - a * Math.max(-1, Math.min(n - 3, 9 - n, 1));
3080
3080
  };
@@ -3084,19 +3084,19 @@ function Ia(e, t, n) {
3084
3084
  a(4)
3085
3085
  ];
3086
3086
  }
3087
- function La(e, t, n) {
3088
- let r = Ja(t, 0, 1), i = Ja(n, 0, 1);
3087
+ function Ra(e, t, n) {
3088
+ let r = Ya(t, 0, 1), i = Ya(n, 0, 1);
3089
3089
  return r + i >= 1 ? [
3090
3090
  ,
3091
3091
  ,
3092
3092
  ,
3093
- ].fill(r / (r + i)) : Ia(e, 1, .5).map((e) => e * (1 - r - i) + r);
3093
+ ].fill(r / (r + i)) : La(e, 1, .5).map((e) => e * (1 - r - i) + r);
3094
3094
  }
3095
- var Ra = 24389 / 27, za = 216 / 24389, Ba = [
3095
+ var za = 24389 / 27, Ba = 216 / 24389, Va = [
3096
3096
  .3457 / .3585,
3097
3097
  1,
3098
3098
  .2958 / .3585
3099
- ], Va = [
3099
+ ], Ha = [
3100
3100
  [
3101
3101
  .955473421488075,
3102
3102
  -.02309845494876471,
@@ -3112,7 +3112,7 @@ var Ra = 24389 / 27, za = 216 / 24389, Ba = [
3112
3112
  -.020507649298898964,
3113
3113
  1.330365926242124
3114
3114
  ]
3115
- ], Ha = [
3115
+ ], Ua = [
3116
3116
  [
3117
3117
  12831 / 3959,
3118
3118
  -329 / 214,
@@ -3129,17 +3129,17 @@ var Ra = 24389 / 27, za = 216 / 24389, Ba = [
3129
3129
  705 / 667
3130
3130
  ]
3131
3131
  ];
3132
- function Ua(e, t, n) {
3133
- let r = Ja(e, 0, 100), i = (r + 16) / 116, a = t / 500 + i, o = i - n / 200;
3134
- return Ga(Ha, Ga(Va, [
3135
- a ** 3 > za ? a ** 3 : (116 * a - 16) / Ra,
3136
- r > Ra * za ? i ** 3 : r / Ra,
3137
- o ** 3 > za ? o ** 3 : (116 * o - 16) / Ra
3138
- ].map((e, t) => e * Ba[t]))).map(Ka);
3139
- }
3140
3132
  function Wa(e, t, n) {
3141
- let r = Ja(e, 0, 1);
3142
- return Ga([
3133
+ let r = Ya(e, 0, 100), i = (r + 16) / 116, a = t / 500 + i, o = i - n / 200;
3134
+ return Ka(Ua, Ka(Ha, [
3135
+ a ** 3 > Ba ? a ** 3 : (116 * a - 16) / za,
3136
+ r > za * Ba ? i ** 3 : r / za,
3137
+ o ** 3 > Ba ? o ** 3 : (116 * o - 16) / za
3138
+ ].map((e, t) => e * Va[t]))).map(qa);
3139
+ }
3140
+ function Ga(e, t, n) {
3141
+ let r = Ya(e, 0, 1);
3142
+ return Ka([
3143
3143
  [
3144
3144
  4.0767416621,
3145
3145
  -3.3077115913,
@@ -3159,22 +3159,22 @@ function Wa(e, t, n) {
3159
3159
  r + .3963377774 * t + .2158037573 * n,
3160
3160
  r - .1055613458 * t - .0638541728 * n,
3161
3161
  r - .0894841775 * t - 1.291485548 * n
3162
- ].map((e) => e ** 3)).map(Ka);
3162
+ ].map((e) => e ** 3)).map(qa);
3163
3163
  }
3164
- function Ga(e, t) {
3164
+ function Ka(e, t) {
3165
3165
  return e.map((e) => e[0] * t[0] + e[1] * t[1] + e[2] * t[2]);
3166
3166
  }
3167
- function Ka(e) {
3168
- let t = Ja(e, 0, 1);
3167
+ function qa(e) {
3168
+ let t = Ya(e, 0, 1);
3169
3169
  return t <= .0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - .055;
3170
3170
  }
3171
- function qa(e) {
3171
+ function Ja(e) {
3172
3172
  return e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
3173
3173
  }
3174
- function Ja(e, t, n) {
3174
+ function Ya(e, t, n) {
3175
3175
  return Math.min(n, Math.max(t, e));
3176
3176
  }
3177
- var Ya = [
3177
+ var Xa = [
3178
3178
  "script",
3179
3179
  "embed",
3180
3180
  "base",
@@ -3183,7 +3183,7 @@ var Ya = [
3183
3183
  "link",
3184
3184
  "style",
3185
3185
  "foreignobject"
3186
- ], Xa = [
3186
+ ], Za = [
3187
3187
  "onerror",
3188
3188
  "onload",
3189
3189
  "onclick",
@@ -3201,7 +3201,7 @@ var Ya = [
3201
3201
  "onbeforeunload",
3202
3202
  "formaction",
3203
3203
  "xlink:href"
3204
- ], Za = /* @__PURE__ */ new Set([
3204
+ ], Qa = /* @__PURE__ */ new Set([
3205
3205
  "iframe",
3206
3206
  "object",
3207
3207
  "mstack",
@@ -3214,7 +3214,7 @@ var Ya = [
3214
3214
  "semantics",
3215
3215
  "annotation",
3216
3216
  "none"
3217
- ]), Qa = /^[a-z_][\w.-]*:[a-z][\w.-]*$/, $a = [
3217
+ ]), $a = /^[a-z_][\w.-]*:[a-z][\w.-]*$/, eo = [
3218
3218
  "alignment",
3219
3219
  "target",
3220
3220
  "allow",
@@ -3234,18 +3234,18 @@ var Ya = [
3234
3234
  "rightoverhang",
3235
3235
  "mslinethickness",
3236
3236
  "linebreak"
3237
- ], eo = /^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/, to = "data-pie-play-audio", no = {
3238
- ADD_TAGS: (e) => Za.has(e) || Qa.test(e),
3239
- ADD_ATTR: $a,
3240
- FORBID_TAGS: Ya,
3241
- FORBID_ATTR: Xa,
3237
+ ], to = /^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/, no = "data-pie-play-audio", ro = {
3238
+ ADD_TAGS: (e) => Qa.has(e) || $a.test(e),
3239
+ ADD_ATTR: eo,
3240
+ FORBID_TAGS: Xa,
3241
+ FORBID_ATTR: Za,
3242
3242
  ALLOW_UNKNOWN_PROTOCOLS: !1,
3243
3243
  RETURN_TRUSTED_TYPE: !1
3244
- }, ro = !1;
3245
- function io(e) {
3244
+ }, io = !1;
3245
+ function ao(e) {
3246
3246
  for (let t of e.composedPath()) {
3247
3247
  if (!(t instanceof Element)) continue;
3248
- let n = t.getAttribute(to);
3248
+ let n = t.getAttribute(no);
3249
3249
  if (n === null) continue;
3250
3250
  e.preventDefault();
3251
3251
  let r = t.getRootNode().getElementById?.(n) ?? document.getElementById(n);
@@ -3253,31 +3253,31 @@ function io(e) {
3253
3253
  return;
3254
3254
  }
3255
3255
  }
3256
- var ao = null;
3257
- function oo() {
3258
- return ao || (ao = va(window), ao.addHook("beforeSanitizeAttributes", (e) => {
3256
+ var oo = null;
3257
+ function so() {
3258
+ return oo || (oo = ya(window), oo.addHook("beforeSanitizeAttributes", (e) => {
3259
3259
  if (e.nodeName !== "A") return;
3260
- let t = eo.exec(e.getAttribute("onclick") ?? "")?.[2];
3261
- t !== void 0 && (e.removeAttribute("onclick"), e.setAttribute("data-pie-play-audio", t), ro ||= (document.addEventListener("click", io), !0));
3262
- }), ao.addHook("afterSanitizeAttributes", Ea), ao);
3263
- }
3264
- var so = 1e6, co = /* @__PURE__ */ new Map(), lo = 0;
3265
- function uo(e) {
3266
- if (e == null || e === "" || !va.isSupported) return "";
3267
- let t = typeof e == "string" ? e : String(e), n = co.get(t);
3260
+ let t = to.exec(e.getAttribute("onclick") ?? "")?.[2];
3261
+ t !== void 0 && (e.removeAttribute("onclick"), e.setAttribute("data-pie-play-audio", t), io ||= (document.addEventListener("click", ao), !0));
3262
+ }), oo.addHook("afterSanitizeAttributes", Da), oo);
3263
+ }
3264
+ var co = 1e6, lo = /* @__PURE__ */ new Map(), uo = 0;
3265
+ function fo(e) {
3266
+ if (e == null || e === "" || !ya.isSupported) return "";
3267
+ let t = typeof e == "string" ? e : String(e), n = lo.get(t);
3268
3268
  if (n !== void 0) return n;
3269
- let r = String(oo().sanitize(t, no)), i = t.length + r.length;
3270
- if (i > so) return r;
3271
- for (let [e, t] of co) {
3272
- if (lo + i <= so) break;
3273
- co.delete(e), lo -= e.length + t.length;
3269
+ let r = String(so().sanitize(t, ro)), i = t.length + r.length;
3270
+ if (i > co) return r;
3271
+ for (let [e, t] of lo) {
3272
+ if (uo + i <= co) break;
3273
+ lo.delete(e), uo -= e.length + t.length;
3274
3274
  }
3275
- return co.set(t, r), lo += i, r;
3275
+ return lo.set(t, r), uo += i, r;
3276
3276
  }
3277
3277
  //#endregion
3278
3278
  //#region ../../shared/math-rendering-mathjax/dist/index.js
3279
- var fo = "4.1.3", po = "https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets", mo = "@pie-lib/math-rendering@2", ho = ["nemeth", "euro"], go = `mathjax@${fo}/sre`, _o = /^[^@]+@[^@]+$/;
3280
- function vo(e) {
3279
+ var po = "4.1.3", mo = "https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets", ho = "@pie-lib/math-rendering@2", go = ["nemeth", "euro"], _o = `mathjax@${po}/sre`, vo = /^[^@]+@[^@]+$/;
3280
+ function yo(e) {
3281
3281
  if (!e) return;
3282
3282
  let t;
3283
3283
  try {
@@ -3290,16 +3290,16 @@ function vo(e) {
3290
3290
  for (let e = n.length - 1; e > 0; e--) {
3291
3291
  let r = n[e];
3292
3292
  if (r === "node_modules") return;
3293
- if (!_o.test(r)) continue;
3293
+ if (!vo.test(r)) continue;
3294
3294
  let i = n[e - 1]?.startsWith("@") ? e - 1 : e;
3295
3295
  return t.origin + n.slice(0, i).join("/");
3296
3296
  }
3297
3297
  }
3298
- function yo() {
3299
- let e = globalThis[mo]?.opts;
3298
+ function bo() {
3299
+ let e = globalThis[ho]?.opts;
3300
3300
  return e && typeof e == "object" ? e : {};
3301
3301
  }
3302
- function bo(e) {
3302
+ function xo(e) {
3303
3303
  if (typeof e != "string" || !e) return;
3304
3304
  let t = typeof document > "u" ? void 0 : document.baseURI;
3305
3305
  try {
@@ -3308,87 +3308,87 @@ function bo(e) {
3308
3308
  return;
3309
3309
  }
3310
3310
  }
3311
- function xo(e) {
3311
+ function So(e) {
3312
3312
  if (!e || typeof e != "object") return;
3313
3313
  let t = /* @__PURE__ */ new Map();
3314
3314
  for (let [n, r] of Object.entries(e)) {
3315
- let e = bo(r);
3315
+ let e = xo(r);
3316
3316
  e && t.set(n, e);
3317
3317
  }
3318
3318
  return t.size ? t : void 0;
3319
3319
  }
3320
- function So(e) {
3320
+ function Co(e) {
3321
3321
  if (Array.isArray(e)) return new Map(e.filter((e) => typeof e == "string").map((e) => [e, void 0]));
3322
3322
  if (e && typeof e == "object") return new Map(Object.entries(e).map(([e, t]) => [e, typeof t == "string" ? t : void 0]));
3323
3323
  }
3324
- function Co(e, t) {
3325
- let n = yo(), r = bo(e.assetRoot ?? n.assetRoot) ?? vo(t);
3324
+ function wo(e, t) {
3325
+ let n = bo(), r = xo(e.assetRoot ?? n.assetRoot) ?? yo(t);
3326
3326
  return {
3327
3327
  root: r,
3328
- speechPath: bo(e.speechPath ?? n.speechPath) ?? (r ? `${r}/${go}` : void 0),
3329
- speechLocales: So(e.speechLocales ?? n.speechLocales),
3330
- urls: xo(e.assetUrls ?? n.assetUrls)
3328
+ speechPath: xo(e.speechPath ?? n.speechPath) ?? (r ? `${r}/${_o}` : void 0),
3329
+ speechLocales: Co(e.speechLocales ?? n.speechLocales),
3330
+ urls: So(e.assetUrls ?? n.assetUrls)
3331
3331
  };
3332
3332
  }
3333
- function wo(e, t) {
3333
+ function To(e, t) {
3334
3334
  if (!(!e || !t)) {
3335
- for (let n of [...e.keys()]) !t.has(n) && !ho.includes(n) && e.delete(n);
3335
+ for (let n of [...e.keys()]) !t.has(n) && !go.includes(n) && e.delete(n);
3336
3336
  for (let [n, r] of t) (r || !e.has(n)) && e.set(n, r ?? n);
3337
3337
  }
3338
3338
  }
3339
- function To(e) {
3340
- if (!(!e || e.has("en"))) return [...e.keys()].find((e) => !ho.includes(e));
3339
+ function Eo(e) {
3340
+ if (!(!e || e.has("en"))) return [...e.keys()].find((e) => !go.includes(e));
3341
3341
  }
3342
- var Eo = {
3342
+ var Do = {
3343
3343
  untypeset: "no MathJax loads, so math stays untypeset",
3344
3344
  "no-web-fonts": "math renders without web fonts",
3345
3345
  "no-web-fonts-or-speech": "math renders without web fonts and speech"
3346
- }, Do = Symbol.for("@pie-element/shared-math-rendering-mathjax/no-assets");
3347
- function Oo(e) {
3346
+ }, Oo = Symbol.for("@pie-element/shared-math-rendering-mathjax/no-assets");
3347
+ function ko(e) {
3348
3348
  let t = globalThis;
3349
- t[Do] ??= [];
3350
- let n = t[Do];
3349
+ t[Oo] ??= [];
3350
+ let n = t[Oo];
3351
3351
  if (n.includes(e)) return;
3352
3352
  n.push(e);
3353
- let r = `[math-rendering] No asset root for MathJax: ${Eo[e]}. Set window['${mo}'].opts.assetRoot to an npm root. See ${po}`;
3353
+ let r = `[math-rendering] No asset root for MathJax: ${Do[e]}. Set window['${ho}'].opts.assetRoot to an npm root. See ${mo}`;
3354
3354
  e === "untypeset" ? console.error(r) : console.warn(r), !(typeof window > "u") && window.dispatchEvent(new CustomEvent("pie-mathjax-no-asset-root", { detail: {
3355
3355
  effect: e,
3356
3356
  message: r,
3357
- docsUrl: po
3357
+ docsUrl: mo
3358
3358
  } }));
3359
3359
  }
3360
- var ko = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", Ao = "pie-mathjax-version-conflict", jo = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
3361
- function Mo(e, t) {
3360
+ var Ao = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", jo = "pie-mathjax-version-conflict", Mo = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
3361
+ function No(e, t) {
3362
3362
  if (typeof window > "u") return;
3363
3363
  let n = globalThis;
3364
- n[jo] ??= {
3364
+ n[Mo] ??= {
3365
3365
  logged: !1,
3366
3366
  conditions: []
3367
3367
  };
3368
- let r = n[jo];
3368
+ let r = n[Mo];
3369
3369
  if (r.conditions.includes(e)) return;
3370
3370
  r.conditions.push(e);
3371
- let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${ko}`;
3372
- r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Ao, { detail: {
3371
+ let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Ao}`;
3372
+ r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(jo, { detail: {
3373
3373
  condition: e,
3374
3374
  message: i,
3375
- docsUrl: ko
3375
+ docsUrl: Ao
3376
3376
  } }));
3377
3377
  }
3378
- function No() {
3378
+ function Po() {
3379
3379
  let e = window.MathJax?.version;
3380
3380
  return typeof e == "string" && e.startsWith("3.") ? e : void 0;
3381
3381
  }
3382
- function Po() {
3382
+ function Fo() {
3383
3383
  return window.MathJax;
3384
3384
  }
3385
- function Fo(e, { root: t, speechPath: n }) {
3385
+ function Io(e, { root: t, speechPath: n }) {
3386
3386
  t && (e.loader = {
3387
3387
  ...e.loader,
3388
3388
  paths: {
3389
3389
  fonts: `${t}/@mathjax`,
3390
- "mathjax-newcm": `${t}/@mathjax/mathjax-newcm-font@${fo}`,
3391
- "mathjax-mhchem-extension": `${t}/@mathjax/mathjax-mhchem-font-extension@${fo}`
3390
+ "mathjax-newcm": `${t}/@mathjax/mathjax-newcm-font@${po}`,
3391
+ "mathjax-mhchem-extension": `${t}/@mathjax/mathjax-mhchem-font-extension@${po}`
3392
3392
  }
3393
3393
  }), n && (e.options = {
3394
3394
  ...e.options,
@@ -3398,81 +3398,81 @@ function Fo(e, { root: t, speechPath: n }) {
3398
3398
  }
3399
3399
  });
3400
3400
  }
3401
- function Io(e, t) {
3401
+ function Lo(e, t) {
3402
3402
  let n = t.srcUrl || (t.root ? `${t.root}/mathjax@4.1.3/tex-mml-chtml.js` : void 0);
3403
- return n ? (Fo(e, t), new Promise((t, r) => {
3403
+ return n ? (Io(e, t), new Promise((t, r) => {
3404
3404
  window.MathJax = e;
3405
3405
  let i = document.createElement("script");
3406
3406
  i.src = n, i.async = !0, i.onload = () => t(!0), i.onerror = () => r(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(i);
3407
- })) : (Oo("untypeset"), Promise.resolve(!1));
3407
+ })) : (ko("untypeset"), Promise.resolve(!1));
3408
3408
  }
3409
- var Lo = globalThis, Ro = "PIE-MJX-CHTML-styles", zo = ["MJX-CHTML-styles", "MJX-SVG-styles"], Bo = No, Vo = "http://www.w3.org/1998/Math/MathML", Ho = /^([a-z_][\w.-]*):math$/, Uo = /^[a-z][a-z0-9-]*$/;
3410
- function Wo(e) {
3409
+ var Ro = globalThis, zo = "PIE-MJX-CHTML-styles", Bo = ["MJX-CHTML-styles", "MJX-SVG-styles"], Vo = Po, Ho = "http://www.w3.org/1998/Math/MathML", Uo = /^([a-z_][\w.-]*):math$/, Wo = /^[a-z][a-z0-9-]*$/;
3410
+ function Go(e) {
3411
3411
  for (let t of e.querySelectorAll("*")) {
3412
- let n = Ho.exec(t.tagName.toLowerCase())?.[1];
3413
- !n || !e.contains(t) || t.closest("mjx-container") || t.replaceWith(Go(t, `${n}:`));
3412
+ let n = Uo.exec(t.tagName.toLowerCase())?.[1];
3413
+ !n || !e.contains(t) || t.closest("mjx-container") || t.replaceWith(Ko(t, `${n}:`));
3414
3414
  }
3415
3415
  }
3416
- function Go(e, t) {
3416
+ function Ko(e, t) {
3417
3417
  let n = e.tagName.toLowerCase().slice(t.length);
3418
- if (!Uo.test(n)) return e;
3419
- let r = e.ownerDocument.createElementNS(Vo, n);
3418
+ if (!Wo.test(n)) return e;
3419
+ let r = e.ownerDocument.createElementNS(Ho, n);
3420
3420
  for (let t of e.attributes) r.setAttribute(t.name, t.value);
3421
3421
  for (let n of [...e.childNodes]) {
3422
3422
  let e = n instanceof Element && n.tagName.toLowerCase().startsWith(t);
3423
- r.appendChild(e ? Go(n, t) : n);
3423
+ r.appendChild(e ? Ko(n, t) : n);
3424
3424
  }
3425
3425
  return r;
3426
3426
  }
3427
- var Ko = /* @__PURE__ */ new Set([
3427
+ var qo = /* @__PURE__ */ new Set([
3428
3428
  "updiagonalstrike",
3429
3429
  "downdiagonalstrike",
3430
3430
  "verticalstrike",
3431
3431
  "horizontalstrike"
3432
- ]), qo = {
3432
+ ]), Jo = {
3433
3433
  thin: "0.035em",
3434
3434
  medium: "0.07em",
3435
3435
  thick: "0.14em"
3436
- }, Jo = {
3436
+ }, Yo = {
3437
3437
  tight: "0em",
3438
3438
  medium: "0.1em",
3439
3439
  loose: "0.2em"
3440
- }, Yo = /^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/, Xo = /^(#[0-9a-f]{3,8}|[a-z]+)$/i, Zo = /^(\d+(\.\d*)?|\.\d+)$/, Qo = /* @__PURE__ */ new Set([
3440
+ }, Xo = /^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/, Zo = /^(#[0-9a-f]{3,8}|[a-z]+)$/i, Qo = /^(\d+(\.\d*)?|\.\d+)$/, $o = /* @__PURE__ */ new Set([
3441
3441
  "mn",
3442
3442
  "mo",
3443
3443
  "mi",
3444
3444
  "mtext"
3445
- ]), $o = /* @__PURE__ */ new Set([
3445
+ ]), es = /* @__PURE__ */ new Set([
3446
3446
  "stackalign",
3447
3447
  "charalign",
3448
3448
  "charspacing",
3449
3449
  "longdivstyle"
3450
3450
  ]);
3451
- function Z(e, t, n = [], r = {}) {
3452
- let i = e.createElementNS(Vo, t);
3451
+ function X(e, t, n = [], r = {}) {
3452
+ let i = e.createElementNS(Ho, t);
3453
3453
  for (let [e, t] of Object.entries(r)) i.setAttribute(e, t);
3454
3454
  for (let e of n) e && i.appendChild(e);
3455
3455
  return i;
3456
3456
  }
3457
- function es(e, t) {
3458
- let n = Z(e.document, "mo");
3457
+ function ts(e, t) {
3458
+ let n = X(e.document, "mo");
3459
3459
  return n.textContent = t, n;
3460
3460
  }
3461
- function ts(e) {
3462
- let t = Z(e.document, "mn");
3463
- return t.textContent = "0", Z(e.document, "mphantom", [t]);
3461
+ function ns(e) {
3462
+ let t = X(e.document, "mn");
3463
+ return t.textContent = "0", X(e.document, "mphantom", [t]);
3464
3464
  }
3465
- function ns(e, t) {
3465
+ function rs(e, t) {
3466
3466
  return e.getAttribute(t)?.trim().toLowerCase() || void 0;
3467
3467
  }
3468
- function rs(e, t) {
3468
+ function is(e, t) {
3469
3469
  let n = Number.parseInt(e.getAttribute(t) ?? "", 10);
3470
3470
  return Number.isFinite(n) ? n : 0;
3471
3471
  }
3472
- function is(e) {
3472
+ function as(e) {
3473
3473
  return e.localName === "none" || e.localName === "mrow" && e.children.length === 0 && !e.textContent?.trim();
3474
3474
  }
3475
- function as(e, t, n = e) {
3475
+ function os(e, t, n = e) {
3476
3476
  switch (t) {
3477
3477
  case "left": return 0;
3478
3478
  case "center": return Math.floor(e / 2);
@@ -3480,14 +3480,14 @@ function as(e, t, n = e) {
3480
3480
  default: return n;
3481
3481
  }
3482
3482
  }
3483
- function os(e, t, n) {
3483
+ function ss(e, t, n) {
3484
3484
  let r = [], i, a, o = (e, t) => {
3485
3485
  let s = (e) => t.reduceRight((e, t) => {
3486
3486
  let n = t.cloneNode(!1);
3487
3487
  return n.appendChild(e), n;
3488
3488
  }, e);
3489
3489
  if (e.localName === "mstyle") for (let n of [...e.children]) o(n, [...t, e]);
3490
- else if (is(e)) r.push(null);
3490
+ else if (as(e)) r.push(null);
3491
3491
  else if (e.localName === "mn" && e.children.length === 0) {
3492
3492
  let t = [...(e.textContent ?? "").trim()];
3493
3493
  for (let a of t) {
@@ -3496,28 +3496,28 @@ function os(e, t, n) {
3496
3496
  t.textContent = a, r.push(s(t));
3497
3497
  }
3498
3498
  t.length && (a ??= r.length);
3499
- } else Qo.has(e.localName) && e.textContent?.trim() === n.decimalPoint && (i ??= r.length), r.push(s(e));
3499
+ } else $o.has(e.localName) && e.textContent?.trim() === n.decimalPoint && (i ??= r.length), r.push(s(e));
3500
3500
  };
3501
3501
  for (let t of e) o(t, []);
3502
3502
  return {
3503
3503
  kind: "digits",
3504
3504
  cells: r,
3505
- anchor: as(r.length, n.stackAlign, i ?? a),
3505
+ anchor: os(r.length, n.stackAlign, i ?? a),
3506
3506
  position: t
3507
3507
  };
3508
3508
  }
3509
- function ss(e) {
3510
- return (e ?? "").toLowerCase().split(/\s+/).filter((e) => Ko.has(e));
3509
+ function cs(e) {
3510
+ return (e ?? "").toLowerCase().split(/\s+/).filter((e) => qo.has(e));
3511
3511
  }
3512
- function cs(e, t) {
3513
- let n = [...e.children].filter((e) => !is(e));
3514
- return n.length <= 1 ? n[0] ?? null : Z(t.document, "mrow", n);
3512
+ function ls(e, t) {
3513
+ let n = [...e.children].filter((e) => !as(e));
3514
+ return n.length <= 1 ? n[0] ?? null : X(t.document, "mrow", n);
3515
3515
  }
3516
- function ls(e, t, n) {
3517
- let r = ns(e, "location") ?? "n", i = ss(e.getAttribute("crossout")), a = [...e.children].map((e) => is(e) ? null : e.localName === "mscarry" ? {
3518
- content: cs(e, n),
3519
- location: ns(e, "location") ?? r,
3520
- crossout: e.hasAttribute("crossout") ? ss(e.getAttribute("crossout")) : i
3516
+ function us(e, t, n) {
3517
+ let r = rs(e, "location") ?? "n", i = cs(e.getAttribute("crossout")), a = [...e.children].map((e) => as(e) ? null : e.localName === "mscarry" ? {
3518
+ content: ls(e, n),
3519
+ location: rs(e, "location") ?? r,
3520
+ crossout: e.hasAttribute("crossout") ? cs(e.getAttribute("crossout")) : i
3521
3521
  } : {
3522
3522
  content: e,
3523
3523
  location: r,
@@ -3526,60 +3526,60 @@ function ls(e, t, n) {
3526
3526
  return {
3527
3527
  kind: "carries",
3528
3528
  carries: a,
3529
- anchor: as(a.length, n.stackAlign),
3529
+ anchor: os(a.length, n.stackAlign),
3530
3530
  position: t,
3531
- scale: Zo.test(o) ? o : "0.6"
3531
+ scale: Qo.test(o) ? o : "0.6"
3532
3532
  };
3533
3533
  }
3534
- function us(e) {
3535
- let t = ns(e, "mslinethickness") ?? "medium", n = qo[t] ?? (Yo.test(t) ? t : "0.07em"), r = e.getAttribute("mathcolor")?.trim() ?? "";
3536
- return `${n} solid ${Xo.test(r) ? r : "currentColor"}`;
3534
+ function ds(e) {
3535
+ let t = rs(e, "mslinethickness") ?? "medium", n = Jo[t] ?? (Xo.test(t) ? t : "0.07em"), r = e.getAttribute("mathcolor")?.trim() ?? "";
3536
+ return `${n} solid ${Zo.test(r) ? r : "currentColor"}`;
3537
3537
  }
3538
- function ds(e, t, n) {
3539
- let r = Math.max(0, rs(e, "length"));
3538
+ function fs(e, t, n) {
3539
+ let r = Math.max(0, is(e, "length"));
3540
3540
  return {
3541
3541
  kind: "line",
3542
3542
  length: r,
3543
- anchor: as(r, n.stackAlign),
3543
+ anchor: os(r, n.stackAlign),
3544
3544
  position: t,
3545
- border: us(e)
3545
+ border: ds(e)
3546
3546
  };
3547
3547
  }
3548
- function fs(e, t, n, r, i) {
3548
+ function ps(e, t, n, r, i) {
3549
3549
  e.forEach((e, a) => {
3550
- let o = t + a * n + rs(e, "position");
3550
+ let o = t + a * n + is(e, "position");
3551
3551
  switch (e.localName) {
3552
3552
  case "msgroup":
3553
- fs([...e.children], o, rs(e, "shift"), r, i);
3553
+ ps([...e.children], o, is(e, "shift"), r, i);
3554
3554
  break;
3555
3555
  case "msline":
3556
- i.push(ds(e, o, r));
3556
+ i.push(fs(e, o, r));
3557
3557
  break;
3558
3558
  case "mscarries":
3559
- i.push(ls(e, o, r));
3559
+ i.push(us(e, o, r));
3560
3560
  break;
3561
3561
  case "msrow":
3562
3562
  case "mrow":
3563
- i.push(os([...e.children], o, r));
3563
+ i.push(ss([...e.children], o, r));
3564
3564
  break;
3565
- default: i.push(os([e], o, r));
3565
+ default: i.push(ss([e], o, r));
3566
3566
  }
3567
3567
  });
3568
3568
  }
3569
- function ps(e) {
3569
+ function ms(e) {
3570
3570
  return -e.anchor - e.position;
3571
3571
  }
3572
- function ms(e) {
3572
+ function hs(e) {
3573
3573
  return e.kind === "digits" ? e.cells.length : e.kind === "carries" ? e.carries.length : e.length;
3574
3574
  }
3575
- function hs(e) {
3576
- return ps(e) + ms(e) - 1;
3575
+ function gs(e) {
3576
+ return ms(e) + hs(e) - 1;
3577
3577
  }
3578
- function gs(e, t, n, r) {
3579
- let i = (e) => Z(r.document, "mpadded", [t], {
3578
+ function _s(e, t, n, r) {
3579
+ let i = (e) => X(r.document, "mpadded", [t], {
3580
3580
  width: "0",
3581
3581
  ...e ? { lspace: e } : {}
3582
- }), a = (e, t) => Z(r.document, e, t);
3582
+ }), a = (e, t) => X(r.document, e, t);
3583
3583
  switch (n) {
3584
3584
  case "s": return a("munder", [e, i("-0.5width")]);
3585
3585
  case "ne": return a("msup", [e, i()]);
@@ -3601,49 +3601,49 @@ function gs(e, t, n, r) {
3601
3601
  default: return a("mover", [e, i("-0.5width")]);
3602
3602
  }
3603
3603
  }
3604
- function _s(e, t, n) {
3605
- let r = Z(n.document, "menclose", [e], {
3604
+ function vs(e, t, n) {
3605
+ let r = X(n.document, "menclose", [e], {
3606
3606
  notation: t.join(" "),
3607
3607
  "data-padding": "0.1em",
3608
3608
  "data-thickness": "0.067em"
3609
3609
  }), i = t.some((e) => e.endsWith("diagonalstrike")) ? .167 : t.includes("horizontalstrike") ? .1 : 0;
3610
- return i ? Z(n.document, "mpadded", [r], {
3610
+ return i ? X(n.document, "mpadded", [r], {
3611
3611
  lspace: `-${i}em`,
3612
3612
  width: `-${2 * i}em`
3613
3613
  }) : r;
3614
3614
  }
3615
- function vs(e, t, n, r, i) {
3616
- let a = e && t.crossout.length ? _s(e, t.crossout, i) : e;
3615
+ function ys(e, t, n, r, i) {
3616
+ let a = e && t.crossout.length ? vs(e, t.crossout, i) : e;
3617
3617
  if (!t.content) return a;
3618
- let o = Z(i.document, "mstyle", [t.content], { scriptsizemultiplier: r });
3619
- return gs(a ?? ts(i), o, n, i);
3618
+ let o = X(i.document, "mstyle", [t.content], { scriptsizemultiplier: r });
3619
+ return _s(a ?? ns(i), o, n, i);
3620
3620
  }
3621
- function ys(e, t) {
3622
- return e.carries[t - ps(e)] ?? null;
3621
+ function bs(e, t) {
3622
+ return e.carries[t - ms(e)] ?? null;
3623
3623
  }
3624
- function bs(e, t, n, r) {
3624
+ function xs(e, t, n, r) {
3625
3625
  let i = e.content;
3626
3626
  n.forEach((e, a) => {
3627
- let o = n.length - 1 - a, s = n[o], c = ys(s, t), l = n.slice(0, o).some((e) => ys(e, t));
3627
+ let o = n.length - 1 - a, s = n[o], c = bs(s, t), l = n.slice(0, o).some((e) => bs(e, t));
3628
3628
  if (!c && !l) return;
3629
3629
  let u = c ?? {
3630
- content: ts(r),
3630
+ content: ns(r),
3631
3631
  location: "n",
3632
3632
  crossout: []
3633
3633
  }, d = a === 0 ? u.location : "n";
3634
- i = vs(i, u, d, s.scale, r);
3634
+ i = ys(i, u, d, s.scale, r);
3635
3635
  }), e.content = i;
3636
3636
  }
3637
- function xs(e, t) {
3638
- let n = e.filter((e) => ms(e) > 0), r = Math.min(0, ...n.map(ps)), i = Math.max(r, ...n.map(hs)) - r + 1, a = -r, o = [], s = /* @__PURE__ */ new Map(), c = () => Array.from({ length: i }, () => ({
3637
+ function Ss(e, t) {
3638
+ let n = e.filter((e) => hs(e) > 0), r = Math.min(0, ...n.map(ms)), i = Math.max(r, ...n.map(gs)) - r + 1, a = -r, o = [], s = /* @__PURE__ */ new Map(), c = () => Array.from({ length: i }, () => ({
3639
3639
  content: null,
3640
3640
  borders: {}
3641
- })), l = (e) => e.length === 0 ? Array.from({ length: i }, (e, t) => t) : Array.from({ length: e.length }, (t, n) => a + ps(e) + n), u = [], d = [], f = (e) => {
3641
+ })), l = (e) => e.length === 0 ? Array.from({ length: i }, (e, t) => t) : Array.from({ length: e.length }, (t, n) => a + ms(e) + n), u = [], d = [], f = (e) => {
3642
3642
  let n = c();
3643
3643
  e.cells.forEach((t, r) => {
3644
- n[a + ps(e) + r].content = t;
3644
+ n[a + ms(e) + r].content = t;
3645
3645
  }), u.length && n.forEach((e, n) => {
3646
- bs(e, n - a, u, t);
3646
+ xs(e, n - a, u, t);
3647
3647
  });
3648
3648
  for (let e of d) for (let t of l(e)) n[t].borders.top = e.border;
3649
3649
  u = [], d = [], s.set(e, o.length), o.push(n);
@@ -3663,44 +3663,44 @@ function xs(e, t) {
3663
3663
  origin: a
3664
3664
  };
3665
3665
  }
3666
- function Ss(e, { rows: t }, n) {
3667
- let r = Z(n.document, "mtable", t.map((e) => Z(n.document, "mtr", e.map((e) => {
3666
+ function Cs(e, { rows: t }, n) {
3667
+ let r = X(n.document, "mtable", t.map((e) => X(n.document, "mtr", e.map((e) => {
3668
3668
  let t = Object.entries(e.borders).map(([e, t]) => `border-${e}:${t}`).join(";");
3669
- return Z(n.document, "mtd", [e.content], {
3669
+ return X(n.document, "mtd", [e.content], {
3670
3670
  ...t ? { style: t } : {},
3671
3671
  ...e.align ? { columnalign: e.align } : {}
3672
3672
  });
3673
3673
  }))));
3674
- for (let { name: t, value: n } of [...e.attributes]) $o.has(t) || r.setAttribute(t, n);
3675
- let i = ns(e, "charspacing") ?? "medium", a = ns(e, "charalign");
3676
- return r.setAttribute("columnspacing", Jo[i] ?? (Yo.test(i) ? i : Jo.medium)), r.setAttribute("columnalign", a === "left" || a === "center" ? a : "right"), r.setAttribute("rowspacing", "0"), r.setAttribute("align", e.getAttribute("align") ?? "baseline"), r;
3674
+ for (let { name: t, value: n } of [...e.attributes]) es.has(t) || r.setAttribute(t, n);
3675
+ let i = rs(e, "charspacing") ?? "medium", a = rs(e, "charalign");
3676
+ return r.setAttribute("columnspacing", Yo[i] ?? (Xo.test(i) ? i : Yo.medium)), r.setAttribute("columnalign", a === "left" || a === "center" ? a : "right"), r.setAttribute("rowspacing", "0"), r.setAttribute("align", e.getAttribute("align") ?? "baseline"), r;
3677
3677
  }
3678
- function Cs(e) {
3678
+ function ws(e) {
3679
3679
  return {
3680
3680
  document: e.ownerDocument,
3681
- stackAlign: ns(e, "stackalign") ?? "decimalpoint",
3681
+ stackAlign: rs(e, "stackalign") ?? "decimalpoint",
3682
3682
  decimalPoint: e.closest("[decimalpoint]")?.getAttribute("decimalpoint")?.trim().charAt(0) || "."
3683
3683
  };
3684
3684
  }
3685
- function ws(e) {
3686
- let t = Cs(e), n = [];
3687
- return fs([...e.children], 0, 0, t, n), Ss(e, xs(n, t), t);
3685
+ function Ts(e) {
3686
+ let t = ws(e), n = [];
3687
+ return ps([...e.children], 0, 0, t, n), Cs(e, Ss(n, t), t);
3688
3688
  }
3689
- function Ts(e, t, n, r, i, a) {
3689
+ function Es(e, t, n, r, i, a) {
3690
3690
  for (let o = n; o <= r; o++) e[t][o].borders[i] = a;
3691
3691
  }
3692
- function Es(e, t) {
3693
- let n = es(t, ")");
3694
- return n.setAttribute("minsize", "1.2em"), [Z(t.document, "mrow", [e, Z(t.document, "mspace", [], { width: "0.2em" })]), Z(t.document, "mpadded", [n], {
3692
+ function Ds(e, t) {
3693
+ let n = ts(t, ")");
3694
+ return n.setAttribute("minsize", "1.2em"), [X(t.document, "mrow", [e, X(t.document, "mspace", [], { width: "0.2em" })]), X(t.document, "mpadded", [n], {
3695
3695
  voffset: "0.1em",
3696
3696
  lspace: "-0.15em",
3697
3697
  depth: "-0.2em",
3698
3698
  height: "-0.2em"
3699
3699
  })];
3700
3700
  }
3701
- function Ds(e) {
3702
- let t = Cs(e), [n, r, ...i] = [...e.children], a = n && !is(n) ? n : null, o = r && !is(r) ? r : null, s = ns(e, "longdivstyle") ?? "lefttop", c = us(e), l = [];
3703
- fs(i, 0, 0, t, l);
3701
+ function Os(e) {
3702
+ let t = ws(e), [n, r, ...i] = [...e.children], a = n && !as(n) ? n : null, o = r && !as(r) ? r : null, s = rs(e, "longdivstyle") ?? "lefttop", c = ds(e), l = [];
3703
+ ps(i, 0, 0, t, l);
3704
3704
  let u = l.find((e) => e.kind === "digits");
3705
3705
  u || (u = {
3706
3706
  kind: "digits",
@@ -3712,51 +3712,51 @@ function Ds(e) {
3712
3712
  u.cells.unshift(...e), u.anchor += e.length;
3713
3713
  }, p = (...e) => {
3714
3714
  let n = e.flatMap((e) => e ? e.localName === "mrow" ? [...e.children] : [e] : []);
3715
- u.cells.push(...os(n, 0, t).cells);
3715
+ u.cells.push(...ss(n, 0, t).cells);
3716
3716
  };
3717
3717
  switch (s) {
3718
3718
  case "left/\\right":
3719
- f(a, es(t, "/")), p(es(t, "\\"), o);
3719
+ f(a, ts(t, "/")), p(ts(t, "\\"), o);
3720
3720
  break;
3721
3721
  case "left)(right":
3722
- f(a, es(t, ")")), p(es(t, "("), o);
3722
+ f(a, ts(t, ")")), p(ts(t, "("), o);
3723
3723
  break;
3724
3724
  case ":right=right":
3725
- p(es(t, ":"), a, es(t, "="), o);
3725
+ p(ts(t, ":"), a, ts(t, "="), o);
3726
3726
  break;
3727
3727
  case "righttop":
3728
3728
  case "stackedleftlinetop":
3729
3729
  case "lefttop":
3730
- o && fs([o], 0, 0, t, d), l.splice(l.indexOf(u), 0, ...d), s === "righttop" ? p(a) : s === "stackedleftlinetop" ? f(a) : f(...Es(a, t));
3730
+ o && ps([o], 0, 0, t, d), l.splice(l.indexOf(u), 0, ...d), s === "righttop" ? p(a) : s === "stackedleftlinetop" ? f(a) : f(...Ds(a, t));
3731
3731
  break;
3732
3732
  }
3733
- let m = xs(l, t), h = m.rows, g = m.rowOf.get(u) ?? 0, _ = (e) => m.origin + ps(u) + e, v = Math.max(_(u.cells.length - 1), ...d.map((e) => m.origin + hs(e)));
3733
+ let m = Ss(l, t), h = m.rows, g = m.rowOf.get(u) ?? 0, _ = (e) => m.origin + ms(u) + e, v = Math.max(_(u.cells.length - 1), ...d.map((e) => m.origin + gs(e)));
3734
3734
  switch (s) {
3735
3735
  case "left/\\right":
3736
3736
  case "left)(right":
3737
3737
  case ":right=right": break;
3738
3738
  case "righttop": {
3739
3739
  let e = h[g][_(u.cells.length - 1)];
3740
- e.borders.left = c, e.borders.bottom = c, Ts(h, g, _(0), _(u.cells.length - 1), "top", c);
3740
+ e.borders.left = c, e.borders.bottom = c, Es(h, g, _(0), _(u.cells.length - 1), "top", c);
3741
3741
  break;
3742
3742
  }
3743
3743
  case "stackedleftlinetop": {
3744
3744
  let e = h[g][_(0)];
3745
- e.borders.right = c, e.borders.bottom = c, Ts(h, g, _(1), v, "top", c);
3745
+ e.borders.right = c, e.borders.bottom = c, Es(h, g, _(1), v, "top", c);
3746
3746
  break;
3747
3747
  }
3748
3748
  case "stackedrightright":
3749
3749
  case "mediumstackedrightright":
3750
3750
  case "shortstackedrightright":
3751
3751
  case "stackedleftleft":
3752
- Os(h, g, s, a, o, c, t);
3752
+ ks(h, g, s, a, o, c, t);
3753
3753
  break;
3754
- default: Ts(h, g, _(1), v, "top", c);
3754
+ default: Es(h, g, _(1), v, "top", c);
3755
3755
  }
3756
- return Ss(e, m, t);
3756
+ return Cs(e, m, t);
3757
3757
  }
3758
- function Os(e, t, n, r, i, a, o) {
3759
- let s = n === "stackedleftleft", c = s ? "right" : "left", l = (e) => e && Z(o.document, "mpadded", [e], {
3758
+ function ks(e, t, n, r, i, a, o) {
3759
+ let s = n === "stackedleftleft", c = s ? "right" : "left", l = (e) => e && X(o.document, "mpadded", [e], {
3760
3760
  lspace: "0.2em",
3761
3761
  width: "+0.4em"
3762
3762
  });
@@ -3775,134 +3775,409 @@ function Os(e, t, n, r, i, a, o) {
3775
3775
  }) : o === t + 1 ? (u.content = l(i), n !== "shortstackedrightright" && (u.borders[c] = a)) : o > t + 1 && (n === "stackedrightright" || s) && (u.borders[c] = a), s ? e.unshift(u) : e.push(u);
3776
3776
  });
3777
3777
  }
3778
- function ks(e) {
3779
- for (let t of [...e.querySelectorAll("mstack, mlongdiv")]) !t.closest("math") || t.closest("mjx-container") || t.replaceWith(t.localName === "mstack" ? ws(t) : Ds(t));
3778
+ function As(e) {
3779
+ for (let t of [...e.querySelectorAll("mstack, mlongdiv")]) !t.closest("math") || t.closest("mjx-container") || t.replaceWith(t.localName === "mstack" ? Ts(t) : Os(t));
3780
3780
  }
3781
- var As = "PIE-MJX-explorer-styles", js = "var(--pie-text, black)", Ms = "var(--pie-background, #ffffff)", Ns = "var(--pie-border-dark, #66686A)", Ps = "var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))", Fs = `color-mix(in srgb, ${Ps} 15%, transparent)`, Is = `
3781
+ var js = "PIE-MJX-explorer-styles", Ms = "var(--pie-text, black)", Ns = "var(--pie-background, #ffffff)", Ps = "var(--pie-border-dark, #66686A)", Fs = "var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))", Is = `color-mix(in srgb, ${Fs} 15%, transparent)`, Ls = `
3782
3782
  :root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
3783
- color: ${js} !important;
3784
- fill: ${js} !important;
3783
+ color: ${Ms} !important;
3784
+ fill: ${Ms} !important;
3785
3785
  }
3786
3786
  :root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
3787
- background-color: ${Fs} !important;
3787
+ background-color: ${Is} !important;
3788
3788
  }
3789
3789
  :root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
3790
- fill: ${Fs} !important;
3790
+ fill: ${Is} !important;
3791
3791
  }
3792
3792
  :root mjx-container .mjx-selected {
3793
- outline: 2px solid ${Ps} !important;
3793
+ outline: 2px solid ${Fs} !important;
3794
3794
  }
3795
3795
  :root mjx-container [data-sre-highlight-2] {
3796
- color: ${js} !important;
3796
+ color: ${Ms} !important;
3797
3797
  background-color: transparent !important;
3798
- fill: ${js} !important;
3799
- outline: 2px dashed ${Ps} !important;
3798
+ fill: ${Ms} !important;
3799
+ outline: 2px dashed ${Fs} !important;
3800
3800
  }
3801
3801
  :root mjx-container rect[data-sre-highlight-2] {
3802
3802
  fill: transparent !important;
3803
- stroke: ${Ps} !important;
3803
+ stroke: ${Fs} !important;
3804
3804
  stroke-width: 2px !important;
3805
3805
  vector-effect: non-scaling-stroke;
3806
3806
  }
3807
3807
  :root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
3808
- color: ${js} !important;
3809
- background-color: ${Ms} !important;
3810
- border-color: ${Ns} !important;
3808
+ color: ${Ms} !important;
3809
+ background-color: ${Ns} !important;
3810
+ border-color: ${Ps} !important;
3811
3811
  }
3812
3812
  :root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
3813
- color: ${js} !important;
3814
- background-color: ${Fs} !important;
3813
+ color: ${Ms} !important;
3814
+ background-color: ${Is} !important;
3815
3815
  }
3816
3816
  `;
3817
- function Ls(e = document) {
3817
+ function Rs(e = document) {
3818
3818
  if (e.getElementById("PIE-MJX-explorer-styles")) return;
3819
3819
  let t = e.createElement("style");
3820
- t.id = As, t.textContent = Is, e.head.appendChild(t);
3820
+ t.id = js, t.textContent = Ls, e.head.appendChild(t);
3821
+ }
3822
+ var zs = /[⁡-⁤]/g, Bs = {
3823
+ "+": "positive",
3824
+ "-": "negative",
3825
+ "−": "negative",
3826
+ "±": "plus or minus",
3827
+ "∓": "minus or plus"
3828
+ }, Vs = {
3829
+ "(": "open parenthesis",
3830
+ "[": "open bracket",
3831
+ "{": "open brace",
3832
+ "⟨": "open angle bracket",
3833
+ "⌊": "open floor",
3834
+ "⌈": "open ceiling"
3835
+ }, Hs = {
3836
+ ")": "close parenthesis",
3837
+ "]": "close bracket",
3838
+ "}": "close brace",
3839
+ "⟩": "close angle bracket",
3840
+ "⌋": "close floor",
3841
+ "⌉": "close ceiling"
3842
+ }, Us = {
3843
+ "!": "factorial",
3844
+ "%": "percent",
3845
+ "°": "degrees",
3846
+ "′": "prime",
3847
+ "″": "double prime"
3848
+ }, Ws = {
3849
+ "+": "plus",
3850
+ "-": "minus",
3851
+ "−": "minus",
3852
+ "±": "plus or minus",
3853
+ "∓": "minus or plus",
3854
+ "×": "times",
3855
+ "⋅": "times",
3856
+ "·": "times",
3857
+ "*": "times",
3858
+ "÷": "divided by",
3859
+ "/": "divided by",
3860
+ "=": "equals",
3861
+ "≠": "does not equal",
3862
+ "<": "is less than",
3863
+ ">": "is greater than",
3864
+ "≤": "is less than or equal to",
3865
+ "≥": "is greater than or equal to",
3866
+ "≈": "is approximately equal to",
3867
+ "≡": "is equivalent to",
3868
+ "∝": "is proportional to",
3869
+ "∈": "is an element of",
3870
+ "∉": "is not an element of",
3871
+ "⊂": "is a subset of",
3872
+ "⊆": "is a subset of or equal to",
3873
+ "∪": "union",
3874
+ "∩": "intersection",
3875
+ "→": "right arrow",
3876
+ "←": "left arrow",
3877
+ "⇒": "implies",
3878
+ "⇔": "if and only if",
3879
+ "∑": "sum",
3880
+ "∏": "product",
3881
+ "∫": "integral",
3882
+ "∞": "infinity",
3883
+ "∠": "angle",
3884
+ "⊥": "is perpendicular to",
3885
+ "∥": "is parallel to",
3886
+ "∴": "therefore",
3887
+ ",": "comma",
3888
+ ";": "semicolon",
3889
+ ":": "colon",
3890
+ "|": "vertical bar",
3891
+ "‖": "double vertical bar",
3892
+ ...Vs,
3893
+ ...Hs,
3894
+ ...Us
3895
+ }, Gs = /* @__PURE__ */ new Set(["|", "‖"]), Ks = /* @__PURE__ */ new Set([
3896
+ "∑",
3897
+ "∏",
3898
+ "∫",
3899
+ "∪",
3900
+ "∩"
3901
+ ]), qs = {
3902
+ α: "alpha",
3903
+ β: "beta",
3904
+ γ: "gamma",
3905
+ δ: "delta",
3906
+ ε: "epsilon",
3907
+ θ: "theta",
3908
+ λ: "lambda",
3909
+ μ: "mu",
3910
+ π: "pi",
3911
+ ρ: "rho",
3912
+ σ: "sigma",
3913
+ τ: "tau",
3914
+ φ: "phi",
3915
+ ω: "omega",
3916
+ Δ: "capital delta",
3917
+ Σ: "capital sigma",
3918
+ Ω: "capital omega",
3919
+ "∞": "infinity",
3920
+ sin: "sine",
3921
+ cos: "cosine",
3922
+ tan: "tangent",
3923
+ sec: "secant",
3924
+ csc: "cosecant",
3925
+ cot: "cotangent",
3926
+ ln: "natural log",
3927
+ lim: "limit"
3928
+ }, Js = {
3929
+ "¯": "bar",
3930
+ "‾": "bar",
3931
+ "―": "bar",
3932
+ "^": "hat",
3933
+ ˆ: "hat",
3934
+ "~": "tilde",
3935
+ "˜": "tilde",
3936
+ "→": "vector",
3937
+ "⃗": "vector",
3938
+ "˙": "dot"
3939
+ }, Ys = (e) => (e.textContent ?? "").replace(zs, "").replace(/\s+/g, " ").trim(), Xs = (e) => e.replace(/\s+/g, " ").trim(), Zs = (e) => [...e.children];
3940
+ function Qs(e) {
3941
+ return !e || [
3942
+ "mn",
3943
+ "mi",
3944
+ "mtext",
3945
+ "mo"
3946
+ ].includes(e.localName) ? !0 : ["mrow", "mstyle"].includes(e.localName) && e.children.length === 1 ? Qs(e.children[0]) : !1;
3947
+ }
3948
+ function $s(e) {
3949
+ let t = e ? Ys(e) : "";
3950
+ return /^\d{1,3}$/.test(t) ? Number(t) : void 0;
3951
+ }
3952
+ function ec(e) {
3953
+ return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
3954
+ 1: "st",
3955
+ 2: "nd",
3956
+ 3: "rd"
3957
+ }[e % 10] ?? "th"}`;
3958
+ }
3959
+ function tc(e) {
3960
+ return qs[e] ?? e;
3961
+ }
3962
+ function nc(e) {
3963
+ return Ws[e] ?? e;
3821
3964
  }
3822
- var Rs = Symbol.for("@pie-element/shared-math-rendering-mathjax/speech-worker-failed");
3823
- function zs() {
3965
+ function rc(e) {
3966
+ let t = [], n = !1;
3967
+ for (let r of e) {
3968
+ if (r.localName !== "mo") {
3969
+ t.push(Z(r)), n = !0;
3970
+ continue;
3971
+ }
3972
+ let e = Ys(r);
3973
+ e && (!n && Bs[e] ? t.push(Bs[e]) : e in Us ? t.push(Us[e]) : (t.push(nc(e)), n = e in Hs || Gs.has(e) && n));
3974
+ }
3975
+ return t.filter(Boolean).join(" ");
3976
+ }
3977
+ function ic(e) {
3978
+ let [t, ...n] = e, r = n[n.length - 1], i = (e) => e?.localName === "mo" && ["|", "‖"].includes(Ys(e)), a = n.slice(0, -1);
3979
+ if (a.length && i(t) && i(r) && Ys(t) === Ys(r) && !a.some(i)) {
3980
+ let e = Xs(rc(a));
3981
+ return Ys(t) === "|" ? `absolute value of ${e} end absolute value` : `norm of ${e} end norm`;
3982
+ }
3983
+ return rc(e);
3984
+ }
3985
+ function ac(e, t) {
3986
+ let n = e ? Z(e) : "", r = t ? Z(t) : "";
3987
+ return Qs(e) && Qs(t) ? `${n} over ${r}` : `the fraction with numerator ${n} and denominator ${r}`;
3988
+ }
3989
+ function oc(e, t, n) {
3990
+ return n ? `${t} of ${e}` : `${t} of ${e} end root`;
3991
+ }
3992
+ function sc(e, t) {
3993
+ let n = t ? Ys(t) : "";
3994
+ if (t && Qs(t)) {
3995
+ if (n === "2") return `${e} squared`;
3996
+ if (n === "3") return `${e} cubed`;
3997
+ if (n in Us) return `${e} ${Us[n]}`;
3998
+ }
3999
+ let r = t ? Z(t) : "";
4000
+ return Qs(t) ? `${e} to the power of ${r}` : `${e} to the power of ${r} end power`;
4001
+ }
4002
+ function cc(e, t) {
4003
+ let n = t ? Z(t) : "";
4004
+ return Qs(t) ? `${e} sub ${n}` : `${e} sub ${n} end sub`;
4005
+ }
4006
+ function lc(e, t, n) {
4007
+ let r = Ys(e);
4008
+ if (r === "lim") return `limit as ${t ? Z(t) : ""} of`;
4009
+ if (!Ks.has(r)) return;
4010
+ let i = t ? `from ${Z(t)}` : "", a = n ? `to ${Z(n)}` : "";
4011
+ return `${nc(r)} ${i} ${a} of`;
4012
+ }
4013
+ function uc(e) {
4014
+ let t = Zs(e).filter((e) => ["mtr", "mlabeledtr"].includes(e.localName)), n = t.map((e) => Zs(e).filter((e) => e.localName === "mtd")), r = Math.max(0, ...n.map((e) => e.length)), i = n.map((e, t) => `row ${t + 1}: ${e.map((e) => Xs(rc(Zs(e)))).join(", ")}`);
4015
+ return `table with ${t.length} ${t.length === 1 ? "row" : "rows"} and ${r} ${r === 1 ? "column" : "columns"}. ${i.join(". ")}`;
4016
+ }
4017
+ function dc(e) {
4018
+ let t = e.getAttribute("open") ?? "(", n = e.getAttribute("close") ?? ")", r = (e.getAttribute("separators") ?? ",").replace(/\s+/g, "").split(""), i = Zs(e).map((e, t, n) => t < n.length - 1 ? `${Z(e)} ${nc(r[Math.min(t, r.length - 1)] ?? ",")}` : Z(e));
4019
+ return [
4020
+ nc(t),
4021
+ ...i,
4022
+ nc(n)
4023
+ ].filter(Boolean).join(" ");
4024
+ }
4025
+ function Z(e) {
4026
+ let t = Zs(e);
4027
+ switch (e.localName) {
4028
+ case "mi": return tc(Ys(e));
4029
+ case "mn":
4030
+ case "mtext":
4031
+ case "ms": return Ys(e);
4032
+ case "mo": return nc(Ys(e));
4033
+ case "mspace":
4034
+ case "mphantom":
4035
+ case "annotation":
4036
+ case "annotation-xml": return "";
4037
+ case "semantics": return t[0] ? Z(t[0]) : "";
4038
+ case "mfrac": return ac(t[0], t[1]);
4039
+ case "msqrt": return oc(Xs(rc(t)), "square root", t.length === 1 && Qs(t[0]));
4040
+ case "mroot": {
4041
+ let e = $s(t[1]), n = e === 2 ? "square root" : e === 3 ? "cube root" : e ? `${ec(e)} root` : `root with index ${t[1] ? Z(t[1]) : ""}`;
4042
+ return oc(t[0] ? Z(t[0]) : "", n, Qs(t[0]));
4043
+ }
4044
+ case "msup": return sc(t[0] ? Z(t[0]) : "", t[1]);
4045
+ case "msub": return cc(t[0] ? Z(t[0]) : "", t[1]);
4046
+ case "msubsup": return (t[0] ? lc(t[0], t[1], t[2]) : void 0) || sc(cc(t[0] ? Z(t[0]) : "", t[1]), t[2]);
4047
+ case "munder":
4048
+ case "mover":
4049
+ case "munderover": {
4050
+ let [n, r, i] = t, a = e.localName === "mover" ? void 0 : r, o = e.localName === "munder" ? void 0 : e.localName === "mover" ? r : i, s = n ? lc(n, a, o) : void 0;
4051
+ if (s) return s;
4052
+ let c = n ? Z(n) : "", l = e.localName === "mover" && r ? Js[Ys(r)] : void 0;
4053
+ return l ? l === "vector" ? `vector ${c}` : `${c} ${l}` : [
4054
+ c,
4055
+ a ? `with ${Z(a)} below` : "",
4056
+ o ? `with ${Z(o)} above` : ""
4057
+ ].filter(Boolean).join(" ");
4058
+ }
4059
+ case "mfenced": return dc(e);
4060
+ case "mtable": return uc(e);
4061
+ case "mrow":
4062
+ case "math": return ic(t);
4063
+ default: return t.length ? rc(t) : Ys(e);
4064
+ }
4065
+ }
4066
+ function fc(e) {
4067
+ return Xs(Z(e));
4068
+ }
4069
+ var pc = [
4070
+ "a[href]",
4071
+ "button",
4072
+ "label",
4073
+ "summary",
4074
+ ...[
4075
+ "button",
4076
+ "checkbox",
4077
+ "combobox",
4078
+ "link",
4079
+ "menuitem",
4080
+ "menuitemcheckbox",
4081
+ "menuitemradio",
4082
+ "option",
4083
+ "radio",
4084
+ "switch",
4085
+ "tab",
4086
+ "treeitem"
4087
+ ].map((e) => `[role="${e}"]`)
4088
+ ].join(", ");
4089
+ function mc(e) {
4090
+ if (e.hasAttribute("aria-label") || !e.closest(pc)) return;
4091
+ let t = e.querySelector("math"), n = t ? fc(t) : "";
4092
+ n && e.setAttribute("aria-label", n);
4093
+ }
4094
+ function hc(e) {
4095
+ for (let t of e.querySelectorAll("mjx-container")) mc(t);
4096
+ }
4097
+ var gc = Symbol.for("@pie-element/shared-math-rendering-mathjax/speech-worker-failed");
4098
+ function _c() {
3824
4099
  let e = globalThis;
3825
- e[Rs] || (e[Rs] = !0, console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${po}`));
4100
+ e[gc] || (e[gc] = !0, console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${mo}`));
3826
4101
  }
3827
- function Bs(e) {
4102
+ function vc(e) {
3828
4103
  let t = e.webworker;
3829
4104
  if (!t || t.ready) return;
3830
4105
  e.options ??= {};
3831
4106
  let n = e.options;
3832
- n.enableSpeech = !1, n.enableBraille = !1, n.speechError = () => {}, t.Post = () => Promise.reject(/* @__PURE__ */ Error("The speech worker did not start")), t.Terminate(), zs();
4107
+ n.enableSpeech = !1, n.enableBraille = !1, n.speechError = () => {}, t.Post = () => Promise.reject(/* @__PURE__ */ Error("The speech worker did not start")), t.Terminate(), _c();
3833
4108
  }
3834
- function Vs(e) {
4109
+ function yc(e) {
3835
4110
  let t = e?.adaptor, n = t?.createWorker;
3836
4111
  !e || !t || !n || (t.createWorker = async (r, i) => {
3837
4112
  let a = await n.call(t, r, i);
3838
- return a.addEventListener("error", () => Bs(e), { once: !0 }), a;
4113
+ return a.addEventListener("error", () => vc(e), { once: !0 }), a;
3839
4114
  });
3840
4115
  }
3841
- `${go}`;
3842
- var Hs = {
4116
+ `${_o}`;
4117
+ var bc = {
3843
4118
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
3844
4119
  overarc: "\\overparen",
3845
4120
  napprox: "\\not\\approx",
3846
4121
  longdiv: "\\enclose{longdiv}",
3847
4122
  abs: ["\\left|#1\\right|", 1]
3848
- }, Us = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Ws = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Gs = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, Ks = /\\embed\{newLine\}\[\]/g, qs = [
4123
+ }, xc = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Sc = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Cc = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, wc = /\\embed\{newLine\}\[\]/g, Tc = [
3849
4124
  ["$$", "$$"],
3850
4125
  ["$", "$"],
3851
4126
  ["\\[", "\\]"],
3852
4127
  ["\\(", "\\)"]
3853
- ], Js = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), Ys = "MJX-CHTML-styles", Xs = "PIE-MJX-SVG-styles", Zs = "PIE-MathJax-Menu-Settings", Qs = { "mjx-container[overflow=\"linebreak\"][display]": {
4128
+ ], Ec = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), Dc = "MJX-CHTML-styles", Oc = "PIE-MJX-SVG-styles", kc = "PIE-MathJax-Menu-Settings", Ac = { "mjx-container[overflow=\"linebreak\"][display]": {
3854
4129
  overflow: "auto clip",
3855
4130
  "min-width": "initial !important"
3856
- } }, $s = 200, ec = 201;
3857
- function tc(e) {
4131
+ } }, jc = 200, Mc = 201, Nc = 202;
4132
+ function Pc(e) {
3858
4133
  let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
3859
4134
  for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
3860
4135
  }
3861
- function nc(e) {
3862
- for (let [t, n] of qs) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
4136
+ function Fc(e) {
4137
+ for (let [t, n] of Tc) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
3863
4138
  return e;
3864
4139
  }
3865
- function rc(e) {
3866
- return nc(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
4140
+ function Ic(e) {
4141
+ return Fc(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
3867
4142
  }
3868
- var ic = "mathjax_ignore", ac = "mathjax_process";
3869
- function oc(e, t) {
3870
- let n = e.closest(`.${ic}, .${ac}`);
3871
- return n !== null && t.contains(n) && !n.classList.contains(ac);
4143
+ var Lc = "mathjax_ignore", Rc = "mathjax_process";
4144
+ function zc(e, t) {
4145
+ let n = e.closest(`.${Lc}, .${Rc}`);
4146
+ return n !== null && t.contains(n) && !n.classList.contains(Rc);
3872
4147
  }
3873
- function sc(e) {
4148
+ function Bc(e) {
3874
4149
  for (let t of e.querySelectorAll("[data-latex]")) {
3875
- if (t.dataset.mathHandled || t.closest("mjx-container") || oc(t, e)) continue;
4150
+ if (t.dataset.mathHandled || t.closest("mjx-container") || zc(t, e)) continue;
3876
4151
  let n = t.textContent;
3877
- n && (t.textContent = `\\(${rc(n)}\\)`.replace(Ks, "\\newline "), t.dataset.mathHandled = "true");
4152
+ n && (t.textContent = `\\(${Ic(n)}\\)`.replace(wc, "\\newline "), t.dataset.mathHandled = "true");
3878
4153
  }
3879
4154
  }
3880
- function cc(e) {
4155
+ function Vc(e) {
3881
4156
  for (let t of e.querySelectorAll("math")) t.closest("mjx-container") || t.setAttribute("displaystyle", "true");
3882
4157
  }
3883
- function lc(e, t) {
4158
+ function Hc(e, t) {
3884
4159
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
3885
- return (t ? Gs : Ws).test(e.textContent ?? "");
4160
+ return (t ? Cc : Sc).test(e.textContent ?? "");
3886
4161
  }
3887
- function uc(e) {
4162
+ function Uc(e) {
3888
4163
  return new Promise((t, n) => {
3889
- let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = Co(e, import.meta.url), c = {
4164
+ let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = wo(e, import.meta.url), c = {
3890
4165
  loader: {
3891
4166
  load: i ? ["a11y/assistive-mml"] : [],
3892
4167
  failed: (e) => n(e),
3893
4168
  "output/svg": { ready: (e) => {
3894
- let t = Po();
3895
- return dc(t) && fc(t), e;
4169
+ let t = Fo();
4170
+ return Wc(t) && Gc(t), e;
3896
4171
  } }
3897
4172
  },
3898
4173
  startup: {
3899
4174
  typeset: !1,
3900
4175
  ready: () => {
3901
- let e = Po(), r = e?.startup, i = dc(e);
3902
- i && (fc(e), pc(e, s.speechLocales), wo(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (mc(r?.document), r?.document?.addStyles?.(Qs), Vs(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
4176
+ let e = Fo(), r = e?.startup, i = Wc(e);
4177
+ i && (Gc(e), Kc(e, s.speechLocales), To(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (qc(r?.document), Jc(r?.document), r?.document?.addStyles?.(Ac), yc(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
3903
4178
  }
3904
4179
  },
3905
- tex: { macros: { ...Hs } },
4180
+ tex: { macros: { ...bc } },
3906
4181
  output: { displayOverflow: "linebreak" },
3907
4182
  options: {
3908
4183
  enableMenu: i,
@@ -3914,9 +4189,9 @@ function uc(e) {
3914
4189
  a11y: { inTabOrder: !1 }
3915
4190
  }
3916
4191
  };
3917
- r && c.tex && (console.warn(Us), c.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], c.tex.processEscapes = !0), a || (c.chtml = { fontURL: "" });
3918
- let l = To(s.speechLocales);
3919
- l && c.options && (c.options.sre = { locale: l }), Io(c, {
4192
+ r && c.tex && (console.warn(xc), c.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], c.tex.processEscapes = !0), a || (c.chtml = { fontURL: "" });
4193
+ let l = Eo(s.speechLocales);
4194
+ l && c.options && (c.options.sre = { locale: l }), Lo(c, {
3920
4195
  ...s,
3921
4196
  srcUrl: o
3922
4197
  }).then((e) => {
@@ -3924,202 +4199,185 @@ function uc(e) {
3924
4199
  }, n);
3925
4200
  });
3926
4201
  }
3927
- function dc(e) {
4202
+ function Wc(e) {
3928
4203
  return !!e?.version?.startsWith("4.");
3929
4204
  }
3930
- function fc(e) {
4205
+ function Gc(e) {
3931
4206
  let t = e?._?.output, n = t?.chtml_ts?.CHTML;
3932
- n && (n.STYLESHEETID = Ro);
4207
+ n && (n.STYLESHEETID = zo);
3933
4208
  let r = t?.svg_ts?.SVG;
3934
- r && (r.STYLESHEETID = Xs);
4209
+ r && (r.STYLESHEETID = Oc);
3935
4210
  }
3936
- function pc(e, t) {
4211
+ function Kc(e, t) {
3937
4212
  let n = e?._?.ui?.menu?.Menu?.Menu;
3938
4213
  if (n) {
3939
- n.MENU_STORAGE = Zs;
4214
+ n.MENU_STORAGE = kc;
3940
4215
  try {
3941
- let e = localStorage.getItem(Zs);
4216
+ let e = localStorage.getItem(kc);
3942
4217
  if (!e) return;
3943
4218
  let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
3944
4219
  if (n === void 0 && a) return;
3945
- a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(Zs, JSON.stringify(i)) : localStorage.removeItem(Zs);
4220
+ a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(kc, JSON.stringify(i)) : localStorage.removeItem(kc);
3946
4221
  } catch {}
3947
4222
  }
3948
4223
  }
3949
- function mc(e) {
4224
+ function qc(e) {
3950
4225
  if (!e) return;
3951
4226
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
3952
4227
  let n = e.typesetRoot;
3953
- !n || t.has(n) || (tc(n), t.add(n));
4228
+ !n || t.has(n) || (Pc(n), t.add(n));
3954
4229
  };
3955
- e.addRenderAction?.("pie-strip-latex", ec, (e) => {
4230
+ e.addRenderAction?.("pie-strip-latex", Mc, (e) => {
3956
4231
  for (let t of e.math ?? []) n(t);
3957
4232
  return !1;
3958
4233
  }, (e) => {
3959
4234
  let t = e.typesetRoot;
3960
- return t && tc(t), !1;
4235
+ return t && Pc(t), !1;
3961
4236
  });
3962
4237
  let r = e.outputJax?.chtmlStyles;
3963
- r?.id === Ys && (r.id = Ro), _c();
4238
+ r?.id === Dc && (r.id = zo), Zc();
3964
4239
  }
3965
- function hc(e) {
3966
- return e instanceof HTMLStyleElement && zo.includes(e.id);
4240
+ function Jc(e) {
4241
+ let t = (e) => {
4242
+ e.typesetRoot && mc(e.typesetRoot);
4243
+ };
4244
+ e?.addRenderAction?.("pie-name-math", Nc, (e) => {
4245
+ for (let n of e.math ?? []) t(n);
4246
+ return !1;
4247
+ }, (e) => (t(e), !1));
3967
4248
  }
3968
- function gc(e) {
3969
- Mo("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
4249
+ function Yc(e) {
4250
+ return e instanceof HTMLStyleElement && Bo.includes(e.id);
3970
4251
  }
3971
- function _c() {
3972
- let e = document.head, t = [...e.children].find(hc);
4252
+ function Xc(e) {
4253
+ No("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
4254
+ }
4255
+ function Zc() {
4256
+ let e = document.head, t = [...e.children].find(Yc);
3973
4257
  if (t) {
3974
- gc(t);
4258
+ Xc(t);
3975
4259
  return;
3976
4260
  }
3977
4261
  let n = new MutationObserver((e) => {
3978
4262
  for (let t of e) {
3979
- let e = [...t.addedNodes].find(hc);
4263
+ let e = [...t.addedNodes].find(Yc);
3980
4264
  if (e) {
3981
- gc(e), n.disconnect();
4265
+ Xc(e), n.disconnect();
3982
4266
  return;
3983
4267
  }
3984
4268
  }
3985
4269
  });
3986
4270
  n.observe(e, { childList: !0 });
3987
4271
  }
3988
- function vc(e) {
4272
+ function Qc(e) {
3989
4273
  let t = e?.math;
3990
4274
  if (!t?.remove) return;
3991
- let n = [...t].filter((e) => (e.state?.() ?? 0) >= $s && e.typesetRoot?.isConnected === !1);
4275
+ let n = [...t].filter((e) => (e.state?.() ?? 0) >= jc && e.typesetRoot?.isConnected === !1);
3992
4276
  if (n.length !== 0) {
3993
4277
  for (let e of [...n].reverse()) e.clear?.();
3994
4278
  t.remove(...n);
3995
4279
  }
3996
4280
  }
3997
- function yc(e) {
4281
+ function $c(e) {
3998
4282
  return new Promise((t, n) => {
3999
4283
  let r = e.startup ?? {};
4000
4284
  e.startup = r;
4001
4285
  let i = r.ready;
4002
4286
  r.ready = () => {
4003
- let e = Po()?.startup;
4287
+ let e = Fo()?.startup;
4004
4288
  i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
4005
4289
  };
4006
4290
  });
4007
4291
  }
4008
- function bc(e) {
4009
- let t = Po();
4010
- return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : yc(t) : uc(e);
4292
+ function el(e) {
4293
+ let t = Fo();
4294
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : $c(t) : Uc(e);
4011
4295
  }
4012
- function xc(e) {
4013
- return bc(e).then(() => {
4014
- let e = Po();
4296
+ function tl(e) {
4297
+ return el(e).then(() => {
4298
+ let e = Fo();
4015
4299
  e && typeof e.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
4016
4300
  });
4017
4301
  }
4018
- function Sc(e) {
4019
- let t = Lo, n = t[Js];
4020
- return n || (n = xc(e), t[Js] = n), n;
4302
+ function nl(e) {
4303
+ let t = Ro, n = t[Ec];
4304
+ return n || (n = tl(e), t[Ec] = n), n;
4021
4305
  }
4022
- function Cc(e = {}) {
4306
+ function rl(e = {}) {
4023
4307
  let t = e.useSingleDollar ?? !1;
4024
4308
  return async (n) => {
4025
4309
  if (typeof window > "u") return;
4026
- let r = Bo();
4027
- r && Mo("mathjax-3-global", `window.MathJax is MathJax ${r}`), sc(n), Wo(n), cc(n), ks(n);
4028
- let i = Sc(e);
4029
- if (!lc(n, t)) {
4310
+ let r = Vo();
4311
+ r && No("mathjax-3-global", `window.MathJax is MathJax ${r}`), Bc(n), Go(n), Vc(n), As(n);
4312
+ let i = nl(e);
4313
+ if (!Hc(n, t)) {
4030
4314
  i.catch(() => {});
4031
4315
  return;
4032
4316
  }
4033
4317
  await i;
4034
- let a = Po();
4318
+ let a = Fo();
4035
4319
  if (await a?.startup?.promise, typeof a?.typesetPromise == "function") {
4036
- Ls(), vc(a.startup?.document);
4320
+ Rs(), Qc(a.startup?.document);
4037
4321
  try {
4038
4322
  await a.typesetPromise([n]);
4039
4323
  } catch (e) {
4040
4324
  throw a.typesetClear?.([n]), e;
4041
4325
  }
4042
- tc(n);
4326
+ Pc(n), hc(n);
4043
4327
  }
4044
4328
  };
4045
4329
  }
4046
- var wc = {
4047
- "(": "open parenthesis",
4048
- "[": "open bracket",
4049
- "{": "open brace",
4050
- "⟨": "open angle bracket",
4051
- "⌊": "open floor",
4052
- "⌈": "open ceiling"
4053
- }, Tc = {
4054
- ")": "close parenthesis",
4055
- "]": "close bracket",
4056
- "}": "close brace",
4057
- "⟩": "close angle bracket",
4058
- "⌋": "close floor",
4059
- "⌉": "close ceiling"
4060
- }, Ec = {
4061
- "!": "factorial",
4062
- "%": "percent",
4063
- "°": "degrees",
4064
- "′": "prime",
4065
- "″": "double prime"
4066
- };
4067
- ({
4068
- ...wc,
4069
- ...Tc,
4070
- ...Ec
4071
- });
4072
- var Dc = "@pie-lib/math-rendering", Oc = "@pie-lib/math-rendering@2", kc = "pie-print", Ac = 50, jc = 1e4, Mc = null;
4073
- function Nc() {
4074
- return !!window[Oc]?.opts?.useSingleDollar;
4330
+ var il = "@pie-lib/math-rendering", al = "@pie-lib/math-rendering@2", ol = "pie-print", sl = 50, cl = 1e4, ll = null;
4331
+ function ul() {
4332
+ return !!window[al]?.opts?.useSingleDollar;
4075
4333
  }
4076
- function Pc() {
4077
- return Mc ||= Cc({ useSingleDollar: Nc() }), Mc;
4334
+ function dl() {
4335
+ return ll ||= rl({ useSingleDollar: ul() }), ll;
4078
4336
  }
4079
- function Fc() {
4337
+ function fl() {
4080
4338
  if (typeof window > "u") return null;
4081
- let e = window[Dc];
4082
- return typeof e?.renderMath == "function" && e.renderMath !== zc ? e : null;
4339
+ let e = window[il];
4340
+ return typeof e?.renderMath == "function" && e.renderMath !== gl ? e : null;
4083
4341
  }
4084
- function Ic(e) {
4342
+ function pl(e) {
4085
4343
  let t = e;
4086
4344
  for (; t;) {
4087
- if (t instanceof Element && t.localName === kc) return t;
4345
+ if (t instanceof Element && t.localName === ol) return t;
4088
4346
  t = t instanceof ShadowRoot ? t.host : t.parentNode;
4089
4347
  }
4090
4348
  return null;
4091
4349
  }
4092
- function Lc() {
4350
+ function ml() {
4093
4351
  let e = window.renderMath;
4094
4352
  return typeof e == "function" ? e : null;
4095
4353
  }
4096
- async function Rc(e) {
4097
- let t = Ic(e);
4354
+ async function hl(e) {
4355
+ let t = pl(e);
4098
4356
  if (!t) return null;
4099
- let n = Lc();
4357
+ let n = ml();
4100
4358
  if (n || t.mathRenderingModuleUrlImported !== !0) return n;
4101
- let r = Date.now() + jc;
4359
+ let r = Date.now() + cl;
4102
4360
  for (; Date.now() < r;) {
4103
- await new Promise((e) => setTimeout(e, Ac));
4104
- let e = Lc();
4361
+ await new Promise((e) => setTimeout(e, sl));
4362
+ let e = ml();
4105
4363
  if (e) return e;
4106
4364
  }
4107
4365
  return null;
4108
4366
  }
4109
- var zc = async (e) => {
4367
+ var gl = async (e) => {
4110
4368
  if (typeof window > "u") return;
4111
4369
  let t = typeof e == "string", n;
4112
4370
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
4113
- let r = Fc(), i = r || t ? null : await Rc(n);
4114
- return r ? await r.renderMath?.(n) : i && i !== zc ? await i(n) : await Pc()(n), t ? n.innerHTML : void 0;
4115
- }, Bc = [
4371
+ let r = fl(), i = r || t ? null : await hl(n);
4372
+ return r ? (await r.renderMath?.(n), hc(n)) : i && i !== gl ? (await i(n), hc(n)) : await dl()(n), t ? n.innerHTML : void 0;
4373
+ }, _l = [
4116
4374
  "nbsp iexcl cent pound curren yen brvbar sect uml copy ordf laquo not shy reg macr",
4117
4375
  "deg plusmn sup2 sup3 acute micro para middot cedil sup1 ordm raquo frac14 frac12 frac34 iquest",
4118
4376
  "Agrave Aacute Acirc Atilde Auml Aring AElig Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml",
4119
4377
  "ETH Ntilde Ograve Oacute Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig",
4120
4378
  "agrave aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute icirc iuml",
4121
4379
  "eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute ucirc uuml yacute thorn yuml"
4122
- ].join(" "), Vc = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", Hc = new Map(Object.entries({
4380
+ ].join(" "), vl = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", yl = new Map(Object.entries({
4123
4381
  quot: 34,
4124
4382
  amp: 38,
4125
4383
  apos: 39,
@@ -4150,16 +4408,16 @@ var zc = async (e) => {
4150
4408
  le: 8804,
4151
4409
  ge: 8805
4152
4410
  }));
4153
- for (let [e, t] of Bc.split(" ").entries()) Hc.set(t, 160 + e);
4154
- for (let [e, t] of Vc.split(" ").entries()) Hc.set(t, 945 + e), t !== "sigmaf" && Hc.set(t[0].toUpperCase() + t.slice(1), 913 + e);
4155
- var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Gc = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Kc = (e, t) => {
4411
+ for (let [e, t] of _l.split(" ").entries()) yl.set(t, 160 + e);
4412
+ for (let [e, t] of vl.split(" ").entries()) yl.set(t, 945 + e), t !== "sigmaf" && yl.set(t[0].toUpperCase() + t.slice(1), 913 + e);
4413
+ var bl = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, xl = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Sl = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Cl = (e, t) => {
4156
4414
  if (t[0] === "#") {
4157
4415
  let e = t[1] === "x" || t[1] === "X", n = Number.parseInt(t.slice(e ? 2 : 1), e ? 16 : 10), r = n > 0 && n <= 1114111 && (n < 55296 || n > 57343);
4158
4416
  return String.fromCodePoint(r ? n : 65533);
4159
4417
  }
4160
- let n = Hc.get(t);
4418
+ let n = yl.get(t);
4161
4419
  return n === void 0 ? e : String.fromCodePoint(n);
4162
- }, qc = (e) => typeof e == "string" ? e.replace(Uc, " ").replace(Wc, "").replace(Gc, Kc).replace(/\s+/g, " ").trim() : "", Jc = {
4420
+ }, wl = (e) => typeof e == "string" ? e.replace(bl, " ").replace(xl, "").replace(Sl, Cl).replace(/\s+/g, " ").trim() : "", Tl = {
4163
4421
  translation: {
4164
4422
  categorize: {
4165
4423
  limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
@@ -4446,7 +4704,7 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4446
4704
  cancel: "Cancel",
4447
4705
  playAudio: "Play audio"
4448
4706
  }
4449
- }, Yc = {
4707
+ }, El = {
4450
4708
  translation: {
4451
4709
  categorize: {
4452
4710
  limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
@@ -4733,55 +4991,55 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4733
4991
  cancel: "Cancelar",
4734
4992
  playAudio: "Reproducir audio"
4735
4993
  }
4736
- }, Q = (e) => typeof e == "string", Xc = () => {
4994
+ }, Q = (e) => typeof e == "string", Dl = () => {
4737
4995
  let e, t, n = new Promise((n, r) => {
4738
4996
  e = n, t = r;
4739
4997
  });
4740
4998
  return n.resolve = e, n.reject = t, n;
4741
- }, Zc = (e) => e == null ? "" : "" + e, Qc = (e, t, n) => {
4999
+ }, Ol = (e) => e == null ? "" : "" + e, kl = (e, t, n) => {
4742
5000
  e.forEach((e) => {
4743
5001
  t[e] && (n[e] = t[e]);
4744
5002
  });
4745
- }, $c = /###/g, el = (e) => e && e.indexOf("###") > -1 ? e.replace($c, ".") : e, tl = (e) => !e || Q(e), nl = (e, t, n) => {
5003
+ }, Al = /###/g, jl = (e) => e && e.indexOf("###") > -1 ? e.replace(Al, ".") : e, Ml = (e) => !e || Q(e), Nl = (e, t, n) => {
4746
5004
  let r = Q(t) ? t.split(".") : t, i = 0;
4747
5005
  for (; i < r.length - 1;) {
4748
- if (tl(e)) return {};
4749
- let t = el(r[i]);
5006
+ if (Ml(e)) return {};
5007
+ let t = jl(r[i]);
4750
5008
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
4751
5009
  }
4752
- return tl(e) ? {} : {
5010
+ return Ml(e) ? {} : {
4753
5011
  obj: e,
4754
- k: el(r[i])
5012
+ k: jl(r[i])
4755
5013
  };
4756
- }, rl = (e, t, n) => {
4757
- let { obj: r, k: i } = nl(e, t, Object);
5014
+ }, Pl = (e, t, n) => {
5015
+ let { obj: r, k: i } = Nl(e, t, Object);
4758
5016
  if (r !== void 0 || t.length === 1) {
4759
5017
  r[i] = n;
4760
5018
  return;
4761
5019
  }
4762
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = nl(e, o, Object);
4763
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = nl(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
5020
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = Nl(e, o, Object);
5021
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = Nl(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
4764
5022
  s.obj[`${s.k}.${a}`] = n;
4765
- }, il = (e, t, n, r) => {
4766
- let { obj: i, k: a } = nl(e, t, Object);
5023
+ }, Fl = (e, t, n, r) => {
5024
+ let { obj: i, k: a } = Nl(e, t, Object);
4767
5025
  i[a] = i[a] || [], i[a].push(n);
4768
- }, al = (e, t) => {
4769
- let { obj: n, k: r } = nl(e, t);
5026
+ }, Il = (e, t) => {
5027
+ let { obj: n, k: r } = Nl(e, t);
4770
5028
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
4771
- }, ol = (e, t, n) => {
4772
- let r = al(e, n);
4773
- return r === void 0 ? al(t, n) : r;
4774
- }, sl = (e, t, n) => {
4775
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Q(e[r]) || e[r] instanceof String || Q(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : sl(e[r], t[r], n) : e[r] = t[r]);
5029
+ }, Ll = (e, t, n) => {
5030
+ let r = Il(e, n);
5031
+ return r === void 0 ? Il(t, n) : r;
5032
+ }, Rl = (e, t, n) => {
5033
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Q(e[r]) || e[r] instanceof String || Q(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : Rl(e[r], t[r], n) : e[r] = t[r]);
4776
5034
  return e;
4777
- }, cl = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ll = {
5035
+ }, zl = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Bl = {
4778
5036
  "&": "&amp;",
4779
5037
  "<": "&lt;",
4780
5038
  ">": "&gt;",
4781
5039
  "\"": "&quot;",
4782
5040
  "'": "&#39;",
4783
5041
  "/": "&#x2F;"
4784
- }, ul = (e) => Q(e) ? e.replace(/[&<>"'\/]/g, (e) => ll[e]) : e, dl = class {
5042
+ }, Vl = (e) => Q(e) ? e.replace(/[&<>"'\/]/g, (e) => Bl[e]) : e, Hl = class {
4785
5043
  constructor(e) {
4786
5044
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
4787
5045
  }
@@ -4791,23 +5049,23 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4791
5049
  let n = new RegExp(e);
4792
5050
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
4793
5051
  }
4794
- }, fl = [
5052
+ }, Ul = [
4795
5053
  " ",
4796
5054
  ",",
4797
5055
  "?",
4798
5056
  "!",
4799
5057
  ";"
4800
- ], pl = new dl(20), ml = (e, t, n) => {
5058
+ ], Wl = new Hl(20), Gl = (e, t, n) => {
4801
5059
  t ||= "", n ||= "";
4802
- let r = fl.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
5060
+ let r = Ul.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
4803
5061
  if (r.length === 0) return !0;
4804
- let i = pl.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
5062
+ let i = Wl.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
4805
5063
  if (!a) {
4806
5064
  let t = e.indexOf(n);
4807
5065
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
4808
5066
  }
4809
5067
  return a;
4810
- }, hl = (e, t, n = ".") => {
5068
+ }, Kl = (e, t, n = ".") => {
4811
5069
  if (!e) return;
4812
5070
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
4813
5071
  let r = t.split(n), i = e;
@@ -4826,7 +5084,7 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4826
5084
  i = t;
4827
5085
  }
4828
5086
  return i;
4829
- }, gl = (e) => e?.replace(/_/g, "-"), _l = {
5087
+ }, ql = (e) => e?.replace(/_/g, "-"), Jl = {
4830
5088
  type: "logger",
4831
5089
  log(e) {
4832
5090
  this.output("log", e);
@@ -4840,12 +5098,12 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4840
5098
  output(e, t) {
4841
5099
  console?.[e]?.apply?.(console, t);
4842
5100
  }
4843
- }, vl = new class e {
5101
+ }, Yl = new class e {
4844
5102
  constructor(e, t = {}) {
4845
5103
  this.init(e, t);
4846
5104
  }
4847
5105
  init(e, t = {}) {
4848
- this.prefix = t.prefix || "i18next:", this.logger = e || _l, this.options = t, this.debug = t.debug;
5106
+ this.prefix = t.prefix || "i18next:", this.logger = e || Jl, this.options = t, this.debug = t.debug;
4849
5107
  }
4850
5108
  log(...e) {
4851
5109
  return this.forward(e, "log", "", !0);
@@ -4871,7 +5129,7 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4871
5129
  clone(t) {
4872
5130
  return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
4873
5131
  }
4874
- }(), yl = class {
5132
+ }(), Xl = class {
4875
5133
  constructor() {
4876
5134
  this.observers = {};
4877
5135
  }
@@ -4898,7 +5156,7 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4898
5156
  for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
4899
5157
  });
4900
5158
  }
4901
- }, bl = class extends yl {
5159
+ }, Zl = class extends Xl {
4902
5160
  constructor(e, t = {
4903
5161
  ns: ["translation"],
4904
5162
  defaultNS: "translation"
@@ -4915,12 +5173,12 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4915
5173
  getResource(e, t, n, r = {}) {
4916
5174
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
4917
5175
  e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : Q(n) && i ? o.push(...n.split(i)) : o.push(n)));
4918
- let s = al(this.data, o);
4919
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Q(n) ? s : hl(this.data?.[e]?.[t], n, i);
5176
+ let s = Il(this.data, o);
5177
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Q(n) ? s : Kl(this.data?.[e]?.[t], n, i);
4920
5178
  }
4921
5179
  addResource(e, t, n, r, i = { silent: !1 }) {
4922
5180
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
4923
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), rl(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
5181
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Pl(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
4924
5182
  }
4925
5183
  addResources(e, t, n, r = { silent: !1 }) {
4926
5184
  for (let r in n) (Q(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
@@ -4932,11 +5190,11 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4932
5190
  }) {
4933
5191
  let o = [e, t];
4934
5192
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
4935
- let s = al(this.data, o) || {};
4936
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? sl(s, n, i) : s = {
5193
+ let s = Il(this.data, o) || {};
5194
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? Rl(s, n, i) : s = {
4937
5195
  ...s,
4938
5196
  ...n
4939
- }, rl(this.data, o, s), a.silent || this.emit("added", e, t, n);
5197
+ }, Pl(this.data, o, s), a.silent || this.emit("added", e, t, n);
4940
5198
  }
4941
5199
  removeResourceBundle(e, t) {
4942
5200
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -4957,7 +5215,7 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4957
5215
  toJSON() {
4958
5216
  return this.data;
4959
5217
  }
4960
- }, xl = {
5218
+ }, Ql = {
4961
5219
  processors: {},
4962
5220
  addPostProcessor(e) {
4963
5221
  this.processors[e.name] = e;
@@ -4967,22 +5225,22 @@ var Uc = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Wc = /<
4967
5225
  t = this.processors[e]?.process(t, n, r, i) ?? t;
4968
5226
  }), t;
4969
5227
  }
4970
- }, Sl = Symbol("i18next/PATH_KEY");
4971
- function Cl() {
5228
+ }, $l = Symbol("i18next/PATH_KEY");
5229
+ function eu() {
4972
5230
  let e = [], t = Object.create(null), n;
4973
- return t.get = (r, i) => (n?.revoke?.(), i === Sl ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
5231
+ return t.get = (r, i) => (n?.revoke?.(), i === $l ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
4974
5232
  }
4975
- function wl(e, t) {
4976
- let { [Sl]: n } = e(Cl()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
5233
+ function tu(e, t) {
5234
+ let { [$l]: n } = e(eu()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
4977
5235
  if (n.length > 1 && i) {
4978
5236
  let e = t?.ns, a = Array.isArray(e) ? e : null;
4979
5237
  if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
4980
5238
  }
4981
5239
  return n.join(r);
4982
5240
  }
4983
- var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number", Dl = class e extends yl {
5241
+ var nu = {}, ru = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number", iu = class e extends Xl {
4984
5242
  constructor(e, t = {}) {
4985
- super(), Qc([
5243
+ super(), kl([
4986
5244
  "resourceStore",
4987
5245
  "languageUtils",
4988
5246
  "pluralResolver",
@@ -4990,7 +5248,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
4990
5248
  "backendConnector",
4991
5249
  "i18nFormat",
4992
5250
  "utils"
4993
- ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = vl.create("translator");
5251
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Yl.create("translator");
4994
5252
  }
4995
5253
  changeLanguage(e) {
4996
5254
  e && (this.language = e);
@@ -5000,13 +5258,13 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5000
5258
  if (e == null) return !1;
5001
5259
  let r = this.resolve(e, n);
5002
5260
  if (r?.res === void 0) return !1;
5003
- let i = El(r.res);
5261
+ let i = ru(r.res);
5004
5262
  return !(n.returnObjects === !1 && i);
5005
5263
  }
5006
5264
  extractFromKey(e, t) {
5007
5265
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
5008
5266
  n === void 0 && (n = ":");
5009
- let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !ml(e, n, r);
5267
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Gl(e, n, r);
5010
5268
  if (a && !o) {
5011
5269
  let t = e.match(this.interpolator.nestingRegexp);
5012
5270
  if (t && t.length > 0) return {
@@ -5024,10 +5282,10 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5024
5282
  translate(t, n, r) {
5025
5283
  let i = typeof n == "object" ? { ...n } : n;
5026
5284
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
5027
- typeof t == "function" && (t = wl(t, {
5285
+ typeof t == "function" && (t = tu(t, {
5028
5286
  ...this.options,
5029
5287
  ...i
5030
- })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? wl(e, {
5288
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? tu(e, {
5031
5289
  ...this.options,
5032
5290
  ...i
5033
5291
  }) : String(e));
@@ -5055,7 +5313,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5055
5313
  "[object RegExp]"
5056
5314
  ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !Q(i.count), x = e.hasDefaultValue(i), ee = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", te = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", ne = b && !i.ordinal && i.count === 0, S = ne && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${ee}`] || i[`defaultValue${te}`] || i.defaultValue, C = m;
5057
5315
  y && !m && x && (C = S);
5058
- let re = El(C), ie = Object.prototype.toString.apply(C);
5316
+ let re = ru(C), ie = Object.prototype.toString.apply(C);
5059
5317
  if (y && C && re && _.indexOf(ie) < 0 && !(Q(v) && Array.isArray(C))) {
5060
5318
  if (!i.returnObjects && !this.options.returnObjects) {
5061
5319
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
@@ -5071,7 +5329,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5071
5329
  let r = `${n}${o}${e}`;
5072
5330
  x && !m ? t[e] = this.translate(r, {
5073
5331
  ...i,
5074
- defaultValue: El(S) ? S[e] : void 0,
5332
+ defaultValue: ru(S) ? S[e] : void 0,
5075
5333
  joinArrays: !1,
5076
5334
  ns: c
5077
5335
  }) : t[e] = this.translate(r, {
@@ -5142,7 +5400,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5142
5400
  !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
5143
5401
  }
5144
5402
  let a = n.postProcess || this.options.postProcess, o = Q(a) ? [a] : a;
5145
- return e != null && o?.length && n.applyPostProcessor !== !1 && (e = xl.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
5403
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = Ql.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
5146
5404
  i18nResolved: {
5147
5405
  ...r,
5148
5406
  usedParams: this.getUsedParamsDetails(n)
@@ -5152,7 +5410,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5152
5410
  }
5153
5411
  resolve(e, t = {}) {
5154
5412
  let n, r, i, a, o;
5155
- return Q(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? wl(e, {
5413
+ return Q(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? tu(e, {
5156
5414
  ...this.options,
5157
5415
  ...t
5158
5416
  }) : e)), e.forEach((e) => {
@@ -5163,7 +5421,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5163
5421
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
5164
5422
  let u = t.count !== void 0 && !Q(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (Q(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
5165
5423
  l.forEach((e) => {
5166
- this.isValidLookup(n) || (o = e, !Tl[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Tl[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
5424
+ this.isValidLookup(n) || (o = e, !nu[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (nu[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
5167
5425
  if (this.isValidLookup(n)) return;
5168
5426
  a = r;
5169
5427
  let o = [c];
@@ -5226,17 +5484,17 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5226
5484
  for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
5227
5485
  return !1;
5228
5486
  }
5229
- }, Ol = class {
5487
+ }, au = class {
5230
5488
  constructor(e) {
5231
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = vl.create("languageUtils");
5489
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Yl.create("languageUtils");
5232
5490
  }
5233
5491
  getScriptPartFromCode(e) {
5234
- if (e = gl(e), !e || e.indexOf("-") < 0) return null;
5492
+ if (e = ql(e), !e || e.indexOf("-") < 0) return null;
5235
5493
  let t = e.split("-");
5236
5494
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
5237
5495
  }
5238
5496
  getLanguagePartFromCode(e) {
5239
- if (e = gl(e), !e || e.indexOf("-") < 0) return e;
5497
+ if (e = ql(e), !e || e.indexOf("-") < 0) return e;
5240
5498
  let t = e.split("-");
5241
5499
  return this.formatLanguageCode(t[0]);
5242
5500
  }
@@ -5286,25 +5544,25 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5286
5544
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
5287
5545
  }), r;
5288
5546
  }
5289
- }, kl = {
5547
+ }, ou = {
5290
5548
  zero: 0,
5291
5549
  one: 1,
5292
5550
  two: 2,
5293
5551
  few: 3,
5294
5552
  many: 4,
5295
5553
  other: 5
5296
- }, Al = {
5554
+ }, su = {
5297
5555
  select: (e) => e === 1 ? "one" : "other",
5298
5556
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
5299
- }, jl = class {
5557
+ }, cu = class {
5300
5558
  constructor(e, t = {}) {
5301
- this.languageUtils = e, this.options = t, this.logger = vl.create("pluralResolver"), this.pluralRulesCache = {};
5559
+ this.languageUtils = e, this.options = t, this.logger = Yl.create("pluralResolver"), this.pluralRulesCache = {};
5302
5560
  }
5303
5561
  clearCache() {
5304
5562
  this.pluralRulesCache = {};
5305
5563
  }
5306
5564
  getRule(e, t = {}) {
5307
- let n = gl(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
5565
+ let n = ql(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
5308
5566
  cleanedCode: n,
5309
5567
  type: r
5310
5568
  });
@@ -5313,8 +5571,8 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5313
5571
  try {
5314
5572
  a = new Intl.PluralRules(n, { type: r });
5315
5573
  } catch {
5316
- if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Al;
5317
- if (!e.match(/-|_/)) return Al;
5574
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), su;
5575
+ if (!e.match(/-|_/)) return su;
5318
5576
  let n = this.languageUtils.getLanguagePartFromCode(e);
5319
5577
  a = this.getRule(n, t);
5320
5578
  }
@@ -5329,23 +5587,23 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5329
5587
  }
5330
5588
  getSuffixes(e, t = {}) {
5331
5589
  let n = this.getRule(e, t);
5332
- return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => kl[e] - kl[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
5590
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => ou[e] - ou[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
5333
5591
  }
5334
5592
  getSuffix(e, t, n = {}) {
5335
5593
  let r = this.getRule(e, n);
5336
5594
  return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
5337
5595
  }
5338
- }, Ml = (e, t, n, r = ".", i = !0) => {
5339
- let a = ol(e, t, n);
5340
- return !a && i && Q(n) && (a = hl(e, n, r), a === void 0 && (a = hl(t, n, r))), a;
5341
- }, Nl = (e) => e.replace(/\$/g, "$$$$"), Pl = class {
5596
+ }, lu = (e, t, n, r = ".", i = !0) => {
5597
+ let a = Ll(e, t, n);
5598
+ return !a && i && Q(n) && (a = Kl(e, n, r), a === void 0 && (a = Kl(t, n, r))), a;
5599
+ }, uu = (e) => e.replace(/\$/g, "$$$$"), du = class {
5342
5600
  constructor(e = {}) {
5343
- this.logger = vl.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
5601
+ this.logger = Yl.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
5344
5602
  }
5345
5603
  init(e = {}) {
5346
5604
  e.interpolation ||= { escapeValue: !0 };
5347
5605
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
5348
- this.escape = t === void 0 ? ul : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? cl(i) : a || "{{", this.suffix = o ? cl(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? cl(d) : f || cl("$t("), this.nestingSuffix = p ? cl(p) : m || cl(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
5606
+ this.escape = t === void 0 ? Vl : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? zl(i) : a || "{{", this.suffix = o ? zl(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? zl(d) : f || zl("$t("), this.nestingSuffix = p ? zl(p) : m || zl(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
5349
5607
  }
5350
5608
  reset() {
5351
5609
  this.options && this.init(this.options);
@@ -5357,7 +5615,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5357
5615
  interpolate(e, t, n, r) {
5358
5616
  let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
5359
5617
  if (e.indexOf(this.formatSeparator) < 0) {
5360
- let i = Ml(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
5618
+ let i = lu(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
5361
5619
  return this.alwaysFormat ? this.format(i, void 0, n, {
5362
5620
  ...r,
5363
5621
  ...t,
@@ -5365,7 +5623,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5365
5623
  }) : i;
5366
5624
  }
5367
5625
  let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
5368
- return this.format(Ml(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
5626
+ return this.format(lu(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
5369
5627
  ...r,
5370
5628
  ...t,
5371
5629
  interpolationkey: a
@@ -5375,10 +5633,10 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5375
5633
  let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
5376
5634
  return [{
5377
5635
  regex: this.regexpUnescape,
5378
- safeValue: (e) => Nl(e)
5636
+ safeValue: (e) => uu(e)
5379
5637
  }, {
5380
5638
  regex: this.regexp,
5381
- safeValue: (e) => this.escapeValue ? Nl(this.escape(e)) : Nl(e)
5639
+ safeValue: (e) => this.escapeValue ? uu(this.escape(e)) : uu(e)
5382
5640
  }].forEach((t) => {
5383
5641
  for (o = 0; i = t.regex.exec(e);) {
5384
5642
  let n = i[1].trim();
@@ -5390,7 +5648,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5390
5648
  a = i[0];
5391
5649
  continue;
5392
5650
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
5393
- else !Q(a) && !this.useRawValueToEscape && (a = Zc(a));
5651
+ else !Q(a) && !this.useRawValueToEscape && (a = Ol(a));
5394
5652
  let s = t.safeValue(a);
5395
5653
  if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
5396
5654
  }
@@ -5400,7 +5658,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5400
5658
  let r, i, a, o = (e, t) => {
5401
5659
  let n = this.nestingOptionsSeparator;
5402
5660
  if (e.indexOf(n) < 0) return e;
5403
- let r = e.split(RegExp(`${cl(n)}[ ]*{`)), i = `{${r[1]}`;
5661
+ let r = e.split(RegExp(`${zl(n)}[ ]*{`)), i = `{${r[1]}`;
5404
5662
  e = r[0], i = this.interpolate(i, a);
5405
5663
  let o = i.match(/'/g), s = i.match(/"/g);
5406
5664
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -5419,14 +5677,14 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5419
5677
  a = { ...n }, a = a.replace && !Q(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
5420
5678
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
5421
5679
  if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !Q(i)) return i;
5422
- Q(i) || (i = Zc(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
5680
+ Q(i) || (i = Ol(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
5423
5681
  ...n,
5424
5682
  interpolationkey: r[1].trim()
5425
5683
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
5426
5684
  }
5427
5685
  return e;
5428
5686
  }
5429
- }, Fl = (e) => {
5687
+ }, fu = (e) => {
5430
5688
  let t = e.toLowerCase().trim(), n = {};
5431
5689
  if (e.indexOf("(") > -1) {
5432
5690
  let r = e.split("(");
@@ -5443,7 +5701,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5443
5701
  formatName: t,
5444
5702
  formatOptions: n
5445
5703
  };
5446
- }, Il = (e) => {
5704
+ }, pu = (e) => {
5447
5705
  let t = {};
5448
5706
  return (n, r, i) => {
5449
5707
  let a = i;
@@ -5452,15 +5710,15 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5452
5710
  [i.interpolationkey]: void 0
5453
5711
  });
5454
5712
  let o = r + JSON.stringify(a), s = t[o];
5455
- return s || (s = e(gl(r), i), t[o] = s), s(n);
5713
+ return s || (s = e(ql(r), i), t[o] = s), s(n);
5456
5714
  };
5457
- }, Ll = (e) => (t, n, r) => e(gl(n), r)(t), Rl = class {
5715
+ }, mu = (e) => (t, n, r) => e(ql(n), r)(t), hu = class {
5458
5716
  constructor(e = {}) {
5459
- this.logger = vl.create("formatter"), this.options = e, this.init(e);
5717
+ this.logger = Yl.create("formatter"), this.options = e, this.init(e);
5460
5718
  }
5461
5719
  init(e, t = { interpolation: {} }) {
5462
5720
  this.formatSeparator = t.interpolation.formatSeparator || ",";
5463
- let n = t.cacheInBuiltFormats ? Il : Ll;
5721
+ let n = t.cacheInBuiltFormats ? pu : mu;
5464
5722
  this.formats = {
5465
5723
  number: n((e, t) => {
5466
5724
  let n = new Intl.NumberFormat(e, { ...t });
@@ -5491,7 +5749,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5491
5749
  this.formats[e.toLowerCase().trim()] = t;
5492
5750
  }
5493
5751
  addCached(e, t) {
5494
- this.formats[e.toLowerCase().trim()] = Il(t);
5752
+ this.formats[e.toLowerCase().trim()] = pu(t);
5495
5753
  }
5496
5754
  format(e, t, n, r = {}) {
5497
5755
  let i = t.split(this.formatSeparator);
@@ -5500,7 +5758,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5500
5758
  i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
5501
5759
  }
5502
5760
  return i.reduce((e, t) => {
5503
- let { formatName: i, formatOptions: a } = Fl(t);
5761
+ let { formatName: i, formatOptions: a } = fu(t);
5504
5762
  if (this.formats[i]) {
5505
5763
  let t = e;
5506
5764
  try {
@@ -5518,11 +5776,11 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5518
5776
  return e;
5519
5777
  }, e);
5520
5778
  }
5521
- }, zl = (e, t) => {
5779
+ }, gu = (e, t) => {
5522
5780
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
5523
- }, Bl = class extends yl {
5781
+ }, _u = class extends Xl {
5524
5782
  constructor(e, t, n, r = {}) {
5525
- super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = vl.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
5783
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Yl.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
5526
5784
  }
5527
5785
  queueLoad(e, t, n, r) {
5528
5786
  let i = {}, a = {}, o = {}, s = {};
@@ -5550,7 +5808,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5550
5808
  t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
5551
5809
  let o = {};
5552
5810
  this.queue.forEach((n) => {
5553
- il(n.loaded, [i], a), zl(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
5811
+ Fl(n.loaded, [i], a), gu(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
5554
5812
  o[e] || (o[e] = {});
5555
5813
  let t = n.loaded[e];
5556
5814
  t.length && t.forEach((t) => {
@@ -5640,7 +5898,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5640
5898
  !e || !e[0] || this.store.addResource(e[0], t, n, r);
5641
5899
  }
5642
5900
  }
5643
- }, Vl = () => ({
5901
+ }, vu = () => ({
5644
5902
  debug: !1,
5645
5903
  initAsync: !0,
5646
5904
  ns: ["translation"],
@@ -5697,15 +5955,15 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5697
5955
  skipOnVariables: !0
5698
5956
  },
5699
5957
  cacheInBuiltFormats: !0
5700
- }), Hl = (e) => (Q(e.ns) && (e.ns = [e.ns]), Q(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Q(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Ul = () => {}, Wl = (e) => {
5958
+ }), yu = (e) => (Q(e.ns) && (e.ns = [e.ns]), Q(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Q(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), bu = () => {}, xu = (e) => {
5701
5959
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
5702
5960
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
5703
5961
  });
5704
- }, Gl = "__i18next_supportNoticeShown", Kl = () => !!(typeof globalThis < "u" && globalThis[Gl] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), ql = () => {
5705
- typeof globalThis < "u" && (globalThis[Gl] = !0);
5706
- }, Jl = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends yl {
5962
+ }, Su = "__i18next_supportNoticeShown", Cu = () => !!(typeof globalThis < "u" && globalThis[Su] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), wu = () => {
5963
+ typeof globalThis < "u" && (globalThis[Su] = !0);
5964
+ }, Tu = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends Xl {
5707
5965
  constructor(e = {}, t) {
5708
- if (super(), this.options = Hl(e), this.services = {}, this.logger = vl, this.modules = { external: [] }, Wl(this), t && !this.isInitialized && !e.isClone) {
5966
+ if (super(), this.options = yu(e), this.services = {}, this.logger = Yl, this.modules = { external: [] }, xu(this), t && !this.isInitialized && !e.isClone) {
5709
5967
  if (!this.options.initAsync) return this.init(e, t), this;
5710
5968
  setTimeout(() => {
5711
5969
  this.init(e, t);
@@ -5714,35 +5972,35 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5714
5972
  }
5715
5973
  init(e = {}, t) {
5716
5974
  this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (Q(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
5717
- let n = Vl();
5975
+ let n = vu();
5718
5976
  this.options = {
5719
5977
  ...n,
5720
5978
  ...this.options,
5721
- ...Hl(e)
5979
+ ...yu(e)
5722
5980
  }, this.options.interpolation = {
5723
5981
  ...n.interpolation,
5724
5982
  ...this.options.interpolation
5725
- }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Jl(this) && !Kl() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), ql());
5983
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Tu(this) && !Cu() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), wu());
5726
5984
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
5727
5985
  if (!this.options.isClone) {
5728
- this.modules.logger ? vl.init(r(this.modules.logger), this.options) : vl.init(null, this.options);
5986
+ this.modules.logger ? Yl.init(r(this.modules.logger), this.options) : Yl.init(null, this.options);
5729
5987
  let e;
5730
- e = this.modules.formatter ? this.modules.formatter : Rl;
5731
- let t = new Ol(this.options);
5732
- this.store = new bl(this.options.resources, this.options);
5988
+ e = this.modules.formatter ? this.modules.formatter : hu;
5989
+ let t = new au(this.options);
5990
+ this.store = new Zl(this.options.resources, this.options);
5733
5991
  let i = this.services;
5734
- i.logger = vl, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new jl(t, {
5992
+ i.logger = Yl, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new cu(t, {
5735
5993
  prepend: this.options.pluralSeparator,
5736
5994
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
5737
- }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Pl(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Bl(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
5995
+ }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new du(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new _u(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
5738
5996
  this.emit(e, ...t);
5739
- }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Dl(this.services, this.options), this.translator.on("*", (e, ...t) => {
5997
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new iu(this.services, this.options), this.translator.on("*", (e, ...t) => {
5740
5998
  this.emit(e, ...t);
5741
5999
  }), this.modules.external.forEach((e) => {
5742
6000
  e.init && e.init(this);
5743
6001
  });
5744
6002
  }
5745
- if (this.format = this.options.interpolation.format, t ||= Ul, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
6003
+ if (this.format = this.options.interpolation.format, t ||= bu, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
5746
6004
  let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
5747
6005
  e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
5748
6006
  }
@@ -5761,7 +6019,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5761
6019
  ].forEach((e) => {
5762
6020
  this[e] = (...t) => (this.store[e](...t), this);
5763
6021
  });
5764
- let i = Xc(), a = () => {
6022
+ let i = Dl(), a = () => {
5765
6023
  let e = (e, n) => {
5766
6024
  this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
5767
6025
  };
@@ -5770,7 +6028,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5770
6028
  };
5771
6029
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
5772
6030
  }
5773
- loadResources(e, t = Ul) {
6031
+ loadResources(e, t = bu) {
5774
6032
  let n = t, r = Q(e) ? e : this.language;
5775
6033
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
5776
6034
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -5785,15 +6043,15 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5785
6043
  } else n(null);
5786
6044
  }
5787
6045
  reloadResources(e, t, n) {
5788
- let r = Xc();
5789
- return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Ul, this.services.backendConnector.reload(e, t, (e) => {
6046
+ let r = Dl();
6047
+ return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= bu, this.services.backendConnector.reload(e, t, (e) => {
5790
6048
  r.resolve(), n(e);
5791
6049
  }), r;
5792
6050
  }
5793
6051
  use(e) {
5794
6052
  if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
5795
6053
  if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
5796
- return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && xl.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
6054
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Ql.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
5797
6055
  }
5798
6056
  setResolvedLanguage(e) {
5799
6057
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
@@ -5809,7 +6067,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5809
6067
  }
5810
6068
  changeLanguage(e, t) {
5811
6069
  this.isLanguageChangingTo = e;
5812
- let n = Xc();
6070
+ let n = Dl();
5813
6071
  this.emit("languageChanging", e);
5814
6072
  let r = (e) => {
5815
6073
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -5832,9 +6090,9 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5832
6090
  ...this.options,
5833
6091
  ...a
5834
6092
  };
5835
- typeof a.keyPrefix == "function" && (a.keyPrefix = wl(a.keyPrefix, o));
6093
+ typeof a.keyPrefix == "function" && (a.keyPrefix = tu(a.keyPrefix, o));
5836
6094
  let s = this.options.keySeparator || ".", c;
5837
- return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = wl(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = wl(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
6095
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = tu(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = tu(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
5838
6096
  };
5839
6097
  return Q(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
5840
6098
  }
@@ -5863,7 +6121,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5863
6121
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
5864
6122
  }
5865
6123
  loadNamespaces(e, t) {
5866
- let n = Xc();
6124
+ let n = Dl();
5867
6125
  return this.options.ns ? (Q(e) && (e = [e]), e.forEach((e) => {
5868
6126
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
5869
6127
  }), this.loadResources((e) => {
@@ -5871,7 +6129,7 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5871
6129
  }), n) : (t && t(), Promise.resolve());
5872
6130
  }
5873
6131
  loadLanguages(e, t) {
5874
- let n = Xc();
6132
+ let n = Dl();
5875
6133
  Q(e) && (e = [e]);
5876
6134
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
5877
6135
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
@@ -5887,14 +6145,14 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5887
6145
  if (e && e.direction) return e.direction;
5888
6146
  }
5889
6147
  } catch {}
5890
- let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Ol(Vl());
6148
+ let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new au(vu());
5891
6149
  return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
5892
6150
  }
5893
6151
  static createInstance(t = {}, n) {
5894
6152
  let r = new e(t, n);
5895
6153
  return r.createInstance = e.createInstance, r;
5896
6154
  }
5897
- cloneInstance(t = {}, n = Ul) {
6155
+ cloneInstance(t = {}, n = bu) {
5898
6156
  let r = t.forkResourceStore;
5899
6157
  r && delete t.forkResourceStore;
5900
6158
  let i = {
@@ -5908,18 +6166,18 @@ var Tl = {}, El = (e) => !Q(e) && typeof e != "boolean" && typeof e != "number",
5908
6166
  "language"
5909
6167
  ].forEach((e) => {
5910
6168
  a[e] = this[e];
5911
- }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new bl(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
6169
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new Zl(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
5912
6170
  let e = {
5913
- ...Vl().interpolation,
6171
+ ...vu().interpolation,
5914
6172
  ...this.options.interpolation,
5915
6173
  ...t.interpolation
5916
6174
  }, n = {
5917
6175
  ...i,
5918
6176
  interpolation: e
5919
6177
  };
5920
- a.services.interpolator = new Pl(n);
6178
+ a.services.interpolator = new du(n);
5921
6179
  }
5922
- return a.translator = new Dl(a.services, i), a.translator.on("*", (e, ...t) => {
6180
+ return a.translator = new iu(a.services, i), a.translator.on("*", (e, ...t) => {
5923
6181
  a.emit(e, ...t);
5924
6182
  }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
5925
6183
  }
@@ -5940,13 +6198,13 @@ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.ch
5940
6198
  lng: "en",
5941
6199
  showSupportNotice: !1,
5942
6200
  resources: {
5943
- en: Jc,
5944
- es: Yc
6201
+ en: Tl,
6202
+ es: El
5945
6203
  }
5946
6204
  });
5947
6205
  //#endregion
5948
6206
  //#region src/i18n.ts
5949
- var { translator: Yl } = {
6207
+ var { translator: Eu } = {
5950
6208
  translator: {
5951
6209
  ...$,
5952
6210
  t: (e, t) => {
@@ -5978,23 +6236,23 @@ var { translator: Yl } = {
5978
6236
  label: "Spanish"
5979
6237
  }]
5980
6238
  };
5981
- function Xl(e, t) {
5982
- return Yl.t(`translation:simpleCloze:${e}`, { lng: t });
6239
+ function Du(e, t) {
6240
+ return Eu.t(`translation:simpleCloze:${e}`, { lng: t });
5983
6241
  }
5984
6242
  //#endregion
5985
6243
  //#region src/print/Print.svelte
5986
- var Zl = /* @__PURE__ */ mr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), Ql = /* @__PURE__ */ mr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), $l = /* @__PURE__ */ mr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), eu = /* @__PURE__ */ mr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), tu = /* @__PURE__ */ mr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), nu = {
6244
+ var Ou = /* @__PURE__ */ mr("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), ku = /* @__PURE__ */ mr("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Au = /* @__PURE__ */ mr("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), ju = /* @__PURE__ */ mr("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), Mu = /* @__PURE__ */ mr("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), Nu = {
5987
6245
  hash: "svelte-1fx5wwa",
5988
6246
  code: "\n /* Self-contained: print players ship no Tailwind or CSS reset. */.simple-cloze-print.svelte-1fx5wwa {padding:1rem;color:var(--pie-text, black);}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa,\n .simple-cloze-print-prompt.svelte-1fx5wwa {margin-bottom:1rem;}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa p,\n .simple-cloze-print-prompt.svelte-1fx5wwa p {margin:0.5em 0;}.simple-cloze-print-prompt.svelte-1fx5wwa strong {font-weight:600;}.simple-cloze-print-response.svelte-1fx5wwa {display:inline-flex;align-items:baseline;gap:0.5rem;}.simple-cloze-print-key-label.svelte-1fx5wwa {font-size:0.875rem;line-height:1.25rem;font-weight:600;}.simple-cloze-print-blank.svelte-1fx5wwa {display:inline-block;min-width:12rem;min-height:1.5rem;padding:0.5rem 0.75rem;border-bottom:2px solid var(--pie-text, black);}.simple-cloze-print-blank--key.svelte-1fx5wwa {min-width:6rem;font-weight:600;}\n\n @media print {.simple-cloze-print.svelte-1fx5wwa {padding:0;}\n }"
5989
6247
  };
5990
- function ru(e, t) {
5991
- Be(t, !0), Mr(e, nu);
5992
- let n = Wr(t, "model", 7, null), r = Wr(t, "options", 7, null), i = /* @__PURE__ */ it(() => r()?.role === "instructor"), a = /* @__PURE__ */ it(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ it(() => qc(n()?.correctAnswer)), s = /* @__PURE__ */ it(() => H(i) && !!H(o)), c = /* @__PURE__ */ it(() => H(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ L(null);
6248
+ function Pu(e, t) {
6249
+ Be(t, !0), Mr(e, Nu);
6250
+ let n = Wr(t, "model", 7, null), r = Wr(t, "options", 7, null), i = /* @__PURE__ */ it(() => r()?.role === "instructor"), a = /* @__PURE__ */ it(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ it(() => wl(n()?.correctAnswer)), s = /* @__PURE__ */ it(() => H(i) && !!H(o)), c = /* @__PURE__ */ it(() => H(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ L(null);
5993
6251
  dn(() => {
5994
6252
  if (!H(l) || !H(a)) return;
5995
6253
  let e = (e) => console.warn("simple-cloze: MathJax render failed", e);
5996
6254
  try {
5997
- Promise.resolve(zc(H(l))).catch(e);
6255
+ Promise.resolve(gl(H(l))).catch(e);
5998
6256
  } catch (t) {
5999
6257
  e(t);
6000
6258
  }
@@ -6004,49 +6262,49 @@ function ru(e, t) {
6004
6262
  return n();
6005
6263
  },
6006
6264
  set model(e = null) {
6007
- n(e), xt();
6265
+ n(e), bt();
6008
6266
  },
6009
6267
  get options() {
6010
6268
  return r();
6011
6269
  },
6012
6270
  set options(e = null) {
6013
- r(e), xt();
6271
+ r(e), bt();
6014
6272
  }
6015
- }, d = tu(), f = Yt(d), p = (e) => {
6016
- var t = Zl();
6017
- jr(t, () => uo(H(c)), !0), Se(t), hr(e, t);
6273
+ }, d = Mu(), f = Yt(d), p = (e) => {
6274
+ var t = Ou();
6275
+ jr(t, () => fo(H(c)), !0), Se(t), hr(e, t);
6018
6276
  };
6019
6277
  Ar(f, (e) => {
6020
6278
  H(c) && e(p);
6021
6279
  });
6022
6280
  var m = Qt(f, 2), h = (e) => {
6023
- var t = Ql();
6024
- jr(t, () => uo(H(a)), !0), Se(t), Vr(t, (e) => Nt(l, e), () => H(l)), hr(e, t);
6281
+ var t = ku();
6282
+ jr(t, () => fo(H(a)), !0), Se(t), Vr(t, (e) => Nt(l, e), () => H(l)), hr(e, t);
6025
6283
  };
6026
6284
  Ar(m, (e) => {
6027
6285
  H(a) && e(h);
6028
6286
  });
6029
6287
  var g = Qt(m, 2), _ = Yt(g), v = (e) => {
6030
- var t = $l(), r = Xt(t), i = Zt(r, !0), a = Zt(Qt(r, 2), !0);
6288
+ var t = Au(), r = Xt(t), i = Zt(r, !0), a = Zt(Qt(r, 2), !0);
6031
6289
  vn((e) => {
6032
6290
  Sr(i, e), Sr(a, H(o));
6033
- }, [() => Xl("printCorrectAnswer", n()?.language)]), hr(e, t);
6291
+ }, [() => Du("printCorrectAnswer", n()?.language)]), hr(e, t);
6034
6292
  }, y = (e) => {
6035
- var t = eu();
6036
- vn((e) => Ir(t, "aria-label", e), [() => Xl("printAnswerBlank", n()?.language)]), hr(e, t);
6293
+ var t = ju();
6294
+ vn((e) => Ir(t, "aria-label", e), [() => Du("printAnswerBlank", n()?.language)]), hr(e, t);
6037
6295
  };
6038
6296
  return Ar(_, (e) => {
6039
6297
  H(s) ? e(v) : e(y, -1);
6040
6298
  }), Se(g), Se(d), hr(e, d), Ve(u);
6041
6299
  }
6042
- Xr(ru, {
6300
+ Xr(Pu, {
6043
6301
  model: { type: "Object" },
6044
6302
  options: { type: "Object" }
6045
6303
  }, [], []);
6046
6304
  //#endregion
6047
6305
  //#region src/print/index.ts
6048
- var iu = ru.element;
6306
+ var Fu = Pu.element;
6049
6307
  //#endregion
6050
- export { iu as default };
6308
+ export { Fu as default };
6051
6309
 
6052
6310
  //# sourceMappingURL=print.js.map