@kubohiroya/turbowarp-bubble 0.8.0 → 0.10.0

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.
@@ -421,41 +421,41 @@ var O = /* @__PURE__ */ o(((e, t) => {
421
421
  function P(e) {
422
422
  this.m = e;
423
423
  }
424
- function F(e) {
424
+ function oe(e) {
425
425
  return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
426
426
  }
427
- function oe(e) {
427
+ function se(e) {
428
428
  return e;
429
429
  }
430
- function se(e) {
430
+ function ce(e) {
431
431
  e.divRemTo(this.m, null, e);
432
432
  }
433
- function ce(e, t, n) {
433
+ function le(e, t, n) {
434
434
  e.multiplyTo(t, n), this.reduce(n);
435
435
  }
436
- function le(e, t) {
436
+ function ue(e, t) {
437
437
  e.squareTo(t), this.reduce(t);
438
438
  }
439
- P.prototype.convert = F, P.prototype.revert = oe, P.prototype.reduce = se, P.prototype.mulTo = ce, P.prototype.sqrTo = le;
440
- function ue() {
439
+ P.prototype.convert = oe, P.prototype.revert = se, P.prototype.reduce = ce, P.prototype.mulTo = le, P.prototype.sqrTo = ue;
440
+ function de() {
441
441
  if (this.t < 1) return 0;
442
442
  var e = this[0];
443
443
  if (!(e & 1)) return 0;
444
444
  var t = e & 3;
445
445
  return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
446
446
  }
447
- function I(e) {
447
+ function F(e) {
448
448
  this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
449
449
  }
450
- function de(e) {
450
+ function fe(e) {
451
451
  var t = l();
452
452
  return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(c.ZERO) > 0 && this.m.subTo(t, t), t;
453
453
  }
454
- function fe(e) {
454
+ function pe(e) {
455
455
  var t = l();
456
456
  return e.copyTo(t), this.reduce(t), t;
457
457
  }
458
- function pe(e) {
458
+ function me(e) {
459
459
  for (; e.t <= this.mt2;) e[e.t++] = 0;
460
460
  for (var t = 0; t < this.m.t; ++t) {
461
461
  var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
@@ -463,17 +463,17 @@ var O = /* @__PURE__ */ o(((e, t) => {
463
463
  }
464
464
  e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
465
465
  }
466
- function me(e, t) {
466
+ function he(e, t) {
467
467
  e.squareTo(t), this.reduce(t);
468
468
  }
469
- function he(e, t, n) {
469
+ function ge(e, t, n) {
470
470
  e.multiplyTo(t, n), this.reduce(n);
471
471
  }
472
- I.prototype.convert = de, I.prototype.revert = fe, I.prototype.reduce = pe, I.prototype.mulTo = he, I.prototype.sqrTo = me;
473
- function ge() {
472
+ F.prototype.convert = fe, F.prototype.revert = pe, F.prototype.reduce = me, F.prototype.mulTo = ge, F.prototype.sqrTo = he;
473
+ function _e() {
474
474
  return (this.t > 0 ? this[0] & 1 : this.s) == 0;
475
475
  }
476
- function _e(e, t) {
476
+ function ve(e, t) {
477
477
  if (e > 4294967295 || e < 1) return c.ONE;
478
478
  var n = l(), r = l(), i = t.convert(this), a = O(e) - 1;
479
479
  for (i.copyTo(n); --a >= 0;) if (t.sqrTo(n, r), (e & 1 << a) > 0) t.mulTo(r, i, n);
@@ -483,16 +483,16 @@ var O = /* @__PURE__ */ o(((e, t) => {
483
483
  }
484
484
  return t.revert(n);
485
485
  }
486
- function ve(e, t) {
487
- var n = e < 256 || t.isEven() ? new P(t) : new I(t);
486
+ function ye(e, t) {
487
+ var n = e < 256 || t.isEven() ? new P(t) : new F(t);
488
488
  return this.exp(e, n);
489
489
  }
490
- c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = C, c.prototype.clamp = w, c.prototype.dlShiftTo = k, c.prototype.drShiftTo = A, c.prototype.lShiftTo = j, c.prototype.rShiftTo = ne, c.prototype.subTo = M, c.prototype.multiplyTo = re, c.prototype.squareTo = ie, c.prototype.divRemTo = ae, c.prototype.invDigit = ue, c.prototype.isEven = ge, c.prototype.exp = _e, c.prototype.toString = T, c.prototype.negate = E, c.prototype.abs = D, c.prototype.compareTo = ee, c.prototype.bitLength = te, c.prototype.mod = N, c.prototype.modPowInt = ve, c.ZERO = S(0), c.ONE = S(1);
491
- function ye() {
490
+ c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = C, c.prototype.clamp = w, c.prototype.dlShiftTo = k, c.prototype.drShiftTo = A, c.prototype.lShiftTo = j, c.prototype.rShiftTo = ne, c.prototype.subTo = M, c.prototype.multiplyTo = re, c.prototype.squareTo = ie, c.prototype.divRemTo = ae, c.prototype.invDigit = de, c.prototype.isEven = _e, c.prototype.exp = ve, c.prototype.toString = T, c.prototype.negate = E, c.prototype.abs = D, c.prototype.compareTo = ee, c.prototype.bitLength = te, c.prototype.mod = N, c.prototype.modPowInt = ye, c.ZERO = S(0), c.ONE = S(1);
491
+ function be() {
492
492
  var e = l();
493
493
  return this.copyTo(e), e;
494
494
  }
495
- function be() {
495
+ function xe() {
496
496
  if (this.s < 0) {
497
497
  if (this.t == 1) return this[0] - this.DV;
498
498
  if (this.t == 0) return -1;
@@ -500,25 +500,25 @@ var O = /* @__PURE__ */ o(((e, t) => {
500
500
  else if (this.t == 0) return 0;
501
501
  return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
502
502
  }
503
- function xe() {
503
+ function Se() {
504
504
  return this.t == 0 ? this.s : this[0] << 24 >> 24;
505
505
  }
506
- function Se() {
506
+ function Ce() {
507
507
  return this.t == 0 ? this.s : this[0] << 16 >> 16;
508
508
  }
509
- function Ce(e) {
509
+ function we(e) {
510
510
  return Math.floor(Math.LN2 * this.DB / Math.log(e));
511
511
  }
512
- function we() {
512
+ function Te() {
513
513
  return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
514
514
  }
515
- function L(e) {
515
+ function Ee(e) {
516
516
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
517
517
  var t = this.chunkSize(e), n = e ** +t, r = S(n), i = l(), a = l(), o = "";
518
518
  for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substr(1) + o, i.divRemTo(r, i, a);
519
519
  return a.intValue().toString(e) + o;
520
520
  }
521
- function Te(e, t) {
521
+ function De(e, t) {
522
522
  this.fromInt(0), t ??= 10;
523
523
  for (var n = this.chunkSize(t), r = t ** +n, i = !1, a = 0, o = 0, s = 0; s < e.length; ++s) {
524
524
  var l = y(e, s);
@@ -530,32 +530,32 @@ var O = /* @__PURE__ */ o(((e, t) => {
530
530
  }
531
531
  a > 0 && (this.dMultiply(t ** +a), this.dAddOffset(o, 0)), i && c.ZERO.subTo(this, this);
532
532
  }
533
- function Ee(e, t, n) {
533
+ function Oe(e, t, n) {
534
534
  if (typeof t == "number") {
535
535
  if (e < 2) this.fromInt(1);
536
- else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1), Pe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(c.ONE.shiftLeft(e - 1), this);
536
+ else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1), Fe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(c.ONE.shiftLeft(e - 1), this);
537
537
  } else {
538
538
  var r = [], i = e & 7;
539
539
  r.length = (e >> 3) + 1, t.nextBytes(r), i > 0 ? r[0] &= (1 << i) - 1 : r[0] = 0, this.fromString(r, 256);
540
540
  }
541
541
  }
542
- function De() {
542
+ function ke() {
543
543
  var e = this.t, t = [];
544
544
  t[0] = this.s;
545
545
  var n = this.DB - e * this.DB % 8, r, i = 0;
546
546
  if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
547
547
  return t;
548
548
  }
549
- function Oe(e) {
549
+ function I(e) {
550
550
  return this.compareTo(e) == 0;
551
551
  }
552
- function ke(e) {
552
+ function Ae(e) {
553
553
  return this.compareTo(e) < 0 ? this : e;
554
554
  }
555
- function Ae(e) {
555
+ function je(e) {
556
556
  return this.compareTo(e) > 0 ? this : e;
557
557
  }
558
- function je(e, t, n) {
558
+ function Me(e, t, n) {
559
559
  var r, i, a = Math.min(e.t, this.t);
560
560
  for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
561
561
  if (e.t < this.t) {
@@ -567,81 +567,81 @@ var O = /* @__PURE__ */ o(((e, t) => {
567
567
  }
568
568
  n.s = t(this.s, e.s), n.clamp();
569
569
  }
570
- function Me(e, t) {
570
+ function Ne(e, t) {
571
571
  return e & t;
572
572
  }
573
- function Ne(e) {
573
+ function Pe(e) {
574
574
  var t = l();
575
- return this.bitwiseTo(e, Me, t), t;
575
+ return this.bitwiseTo(e, Ne, t), t;
576
576
  }
577
- function Pe(e, t) {
577
+ function Fe(e, t) {
578
578
  return e | t;
579
579
  }
580
- function Fe(e) {
580
+ function Ie(e) {
581
581
  var t = l();
582
- return this.bitwiseTo(e, Pe, t), t;
582
+ return this.bitwiseTo(e, Fe, t), t;
583
583
  }
584
- function Ie(e, t) {
584
+ function Le(e, t) {
585
585
  return e ^ t;
586
586
  }
587
- function R(e) {
587
+ function Re(e) {
588
588
  var t = l();
589
- return this.bitwiseTo(e, Ie, t), t;
589
+ return this.bitwiseTo(e, Le, t), t;
590
590
  }
591
- function z(e, t) {
591
+ function ze(e, t) {
592
592
  return e & ~t;
593
593
  }
594
- function Le(e) {
594
+ function Be(e) {
595
595
  var t = l();
596
- return this.bitwiseTo(e, z, t), t;
596
+ return this.bitwiseTo(e, ze, t), t;
597
597
  }
598
- function Re() {
598
+ function Ve() {
599
599
  for (var e = l(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
600
600
  return e.t = this.t, e.s = ~this.s, e;
601
601
  }
602
- function ze(e) {
602
+ function L(e) {
603
603
  var t = l();
604
604
  return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
605
605
  }
606
- function Be(e) {
606
+ function R(e) {
607
607
  var t = l();
608
608
  return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
609
609
  }
610
- function Ve(e) {
610
+ function He(e) {
611
611
  if (e == 0) return -1;
612
612
  var t = 0;
613
613
  return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
614
614
  }
615
- function He() {
616
- for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + Ve(this[e]);
615
+ function Ue() {
616
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + He(this[e]);
617
617
  return this.s < 0 ? this.t * this.DB : -1;
618
618
  }
619
- function B(e) {
619
+ function We(e) {
620
620
  for (var t = 0; e != 0;) e &= e - 1, ++t;
621
621
  return t;
622
622
  }
623
- function Ue() {
624
- for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += B(this[n] ^ t);
623
+ function Ge() {
624
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += We(this[n] ^ t);
625
625
  return e;
626
626
  }
627
- function We(e) {
627
+ function Ke(e) {
628
628
  var t = Math.floor(e / this.DB);
629
629
  return t >= this.t ? this.s != 0 : !!(this[t] & 1 << e % this.DB);
630
630
  }
631
- function Ge(e, t) {
631
+ function qe(e, t) {
632
632
  var n = c.ONE.shiftLeft(e);
633
633
  return this.bitwiseTo(n, t, n), n;
634
634
  }
635
- function Ke(e) {
636
- return this.changeBit(e, Pe);
635
+ function z(e) {
636
+ return this.changeBit(e, Fe);
637
637
  }
638
- function V(e) {
639
- return this.changeBit(e, z);
638
+ function Je(e) {
639
+ return this.changeBit(e, ze);
640
640
  }
641
- function qe(e) {
642
- return this.changeBit(e, Ie);
641
+ function Ye(e) {
642
+ return this.changeBit(e, Le);
643
643
  }
644
- function Je(e, t) {
644
+ function Xe(e, t) {
645
645
  for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
646
646
  if (e.t < this.t) {
647
647
  for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -652,58 +652,58 @@ var O = /* @__PURE__ */ o(((e, t) => {
652
652
  }
653
653
  t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
654
654
  }
655
- function Ye(e) {
655
+ function Ze(e) {
656
656
  var t = l();
657
657
  return this.addTo(e, t), t;
658
658
  }
659
- function Xe(e) {
659
+ function B(e) {
660
660
  var t = l();
661
661
  return this.subTo(e, t), t;
662
662
  }
663
- function Ze(e) {
663
+ function Qe(e) {
664
664
  var t = l();
665
665
  return this.multiplyTo(e, t), t;
666
666
  }
667
- function Qe() {
667
+ function $e() {
668
668
  var e = l();
669
669
  return this.squareTo(e), e;
670
670
  }
671
- function $e(e) {
671
+ function et(e) {
672
672
  var t = l();
673
673
  return this.divRemTo(e, t, null), t;
674
674
  }
675
- function et(e) {
675
+ function tt(e) {
676
676
  var t = l();
677
677
  return this.divRemTo(e, null, t), t;
678
678
  }
679
- function tt(e) {
679
+ function nt(e) {
680
680
  var t = l(), n = l();
681
681
  return this.divRemTo(e, t, n), [t, n];
682
682
  }
683
- function nt(e) {
683
+ function rt(e) {
684
684
  this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
685
685
  }
686
- function rt(e, t) {
686
+ function it(e, t) {
687
687
  if (e != 0) {
688
688
  for (; this.t <= t;) this[this.t++] = 0;
689
689
  for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
690
690
  }
691
691
  }
692
- function it() {}
693
- function at(e) {
692
+ function at() {}
693
+ function ot(e) {
694
694
  return e;
695
695
  }
696
- function ot(e, t, n) {
696
+ function st(e, t, n) {
697
697
  e.multiplyTo(t, n);
698
698
  }
699
- function st(e, t) {
699
+ function ct(e, t) {
700
700
  e.squareTo(t);
701
701
  }
702
- it.prototype.convert = at, it.prototype.revert = at, it.prototype.mulTo = ot, it.prototype.sqrTo = st;
703
- function ct(e) {
704
- return this.exp(e, new it());
702
+ at.prototype.convert = ot, at.prototype.revert = ot, at.prototype.mulTo = st, at.prototype.sqrTo = ct;
703
+ function lt(e) {
704
+ return this.exp(e, new at());
705
705
  }
706
- function lt(e, t, n) {
706
+ function ut(e, t, n) {
707
707
  var r = Math.min(this.t + e.t, t);
708
708
  for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
709
709
  var i;
@@ -711,40 +711,40 @@ var O = /* @__PURE__ */ o(((e, t) => {
711
711
  for (i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
712
712
  n.clamp();
713
713
  }
714
- function ut(e, t, n) {
714
+ function dt(e, t, n) {
715
715
  --t;
716
716
  var r = n.t = this.t + e.t - t;
717
717
  for (n.s = 0; --r >= 0;) n[r] = 0;
718
718
  for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
719
719
  n.clamp(), n.drShiftTo(1, n);
720
720
  }
721
- function dt(e) {
721
+ function ft(e) {
722
722
  this.r2 = l(), this.q3 = l(), c.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
723
723
  }
724
- function ft(e) {
724
+ function pt(e) {
725
725
  if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
726
726
  if (e.compareTo(this.m) < 0) return e;
727
727
  var t = l();
728
728
  return e.copyTo(t), this.reduce(t), t;
729
729
  }
730
- function pt(e) {
730
+ function mt(e) {
731
731
  return e;
732
732
  }
733
- function mt(e) {
733
+ function ht(e) {
734
734
  for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
735
735
  for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
736
736
  }
737
- function ht(e, t) {
737
+ function gt(e, t) {
738
738
  e.squareTo(t), this.reduce(t);
739
739
  }
740
- function gt(e, t, n) {
740
+ function _t(e, t, n) {
741
741
  e.multiplyTo(t, n), this.reduce(n);
742
742
  }
743
- dt.prototype.convert = ft, dt.prototype.revert = pt, dt.prototype.reduce = mt, dt.prototype.mulTo = gt, dt.prototype.sqrTo = ht;
744
- function _t(e, t) {
743
+ ft.prototype.convert = pt, ft.prototype.revert = mt, ft.prototype.reduce = ht, ft.prototype.mulTo = _t, ft.prototype.sqrTo = gt;
744
+ function vt(e, t) {
745
745
  var n = e.bitLength(), r, i = S(1), a;
746
746
  if (n <= 0) return i;
747
- r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new P(t) : t.isEven() ? new dt(t) : new I(t);
747
+ r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new P(t) : t.isEven() ? new ft(t) : new F(t);
748
748
  var o = [], s = 3, c = r - 1, u = (1 << r) - 1;
749
749
  if (o[1] = a.convert(this), r > 1) {
750
750
  var d = l();
@@ -762,7 +762,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
762
762
  }
763
763
  return a.revert(i);
764
764
  }
765
- function vt(e) {
765
+ function yt(e) {
766
766
  var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
767
767
  if (t.compareTo(n) < 0) {
768
768
  var r = t;
@@ -773,7 +773,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
773
773
  for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
774
774
  return a > 0 && n.lShiftTo(a, n), n;
775
775
  }
776
- function yt(e) {
776
+ function bt(e) {
777
777
  if (e <= 0) return 0;
778
778
  var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
779
779
  if (this.t > 0) {
@@ -782,7 +782,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
782
782
  }
783
783
  return n;
784
784
  }
785
- function bt(e) {
785
+ function xt(e) {
786
786
  var t = e.isEven();
787
787
  if (this.isEven() && t || e.signum() == 0) return c.ZERO;
788
788
  for (var n = e.clone(), r = this.clone(), i = S(1), a = S(0), o = S(0), s = S(1); n.signum() != 0;) {
@@ -796,7 +796,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
796
796
  else return s;
797
797
  return s.signum() < 0 ? s.add(e) : s;
798
798
  }
799
- var H = [
799
+ var V = [
800
800
  2,
801
801
  3,
802
802
  5,
@@ -965,27 +965,27 @@ var O = /* @__PURE__ */ o(((e, t) => {
965
965
  983,
966
966
  991,
967
967
  997
968
- ], U = (1 << 26) / H[H.length - 1];
969
- function xt(e) {
968
+ ], St = (1 << 26) / V[V.length - 1];
969
+ function Ct(e) {
970
970
  var t, n = this.abs();
971
- if (n.t == 1 && n[0] <= H[H.length - 1]) {
972
- for (t = 0; t < H.length; ++t) if (n[0] == H[t]) return !0;
971
+ if (n.t == 1 && n[0] <= V[V.length - 1]) {
972
+ for (t = 0; t < V.length; ++t) if (n[0] == V[t]) return !0;
973
973
  return !1;
974
974
  }
975
975
  if (n.isEven()) return !1;
976
- for (t = 1; t < H.length;) {
977
- for (var r = H[t], i = t + 1; i < H.length && r < U;) r *= H[i++];
978
- for (r = n.modInt(r); t < i;) if (r % H[t++] == 0) return !1;
976
+ for (t = 1; t < V.length;) {
977
+ for (var r = V[t], i = t + 1; i < V.length && r < St;) r *= V[i++];
978
+ for (r = n.modInt(r); t < i;) if (r % V[t++] == 0) return !1;
979
979
  }
980
980
  return n.millerRabin(e);
981
981
  }
982
- function St(e) {
982
+ function wt(e) {
983
983
  var t = this.subtract(c.ONE), n = t.getLowestSetBit();
984
984
  if (n <= 0) return !1;
985
985
  var r = t.shiftRight(n);
986
- e = e + 1 >> 1, e > H.length && (e = H.length);
986
+ e = e + 1 >> 1, e > V.length && (e = V.length);
987
987
  for (var i = l(), a = 0; a < e; ++a) {
988
- i.fromInt(H[Math.floor(Math.random() * H.length)]);
988
+ i.fromInt(V[Math.floor(Math.random() * V.length)]);
989
989
  var o = i.modPow(r, this);
990
990
  if (o.compareTo(c.ONE) != 0 && o.compareTo(t) != 0) {
991
991
  for (var s = 1; s++ < n && o.compareTo(t) != 0;) if (o = o.modPowInt(2, this), o.compareTo(c.ONE) == 0) return !1;
@@ -994,29 +994,29 @@ var O = /* @__PURE__ */ o(((e, t) => {
994
994
  }
995
995
  return !0;
996
996
  }
997
- c.prototype.chunkSize = Ce, c.prototype.toRadix = L, c.prototype.fromRadix = Te, c.prototype.fromNumber = Ee, c.prototype.bitwiseTo = je, c.prototype.changeBit = Ge, c.prototype.addTo = Je, c.prototype.dMultiply = nt, c.prototype.dAddOffset = rt, c.prototype.multiplyLowerTo = lt, c.prototype.multiplyUpperTo = ut, c.prototype.modInt = yt, c.prototype.millerRabin = St, c.prototype.clone = ye, c.prototype.intValue = be, c.prototype.byteValue = xe, c.prototype.shortValue = Se, c.prototype.signum = we, c.prototype.toByteArray = De, c.prototype.equals = Oe, c.prototype.min = ke, c.prototype.max = Ae, c.prototype.and = Ne, c.prototype.or = Fe, c.prototype.xor = R, c.prototype.andNot = Le, c.prototype.not = Re, c.prototype.shiftLeft = ze, c.prototype.shiftRight = Be, c.prototype.getLowestSetBit = He, c.prototype.bitCount = Ue, c.prototype.testBit = We, c.prototype.setBit = Ke, c.prototype.clearBit = V, c.prototype.flipBit = qe, c.prototype.add = Ye, c.prototype.subtract = Xe, c.prototype.multiply = Ze, c.prototype.divide = $e, c.prototype.remainder = et, c.prototype.divideAndRemainder = tt, c.prototype.modPow = _t, c.prototype.modInverse = bt, c.prototype.pow = ct, c.prototype.gcd = vt, c.prototype.isProbablePrime = xt, c.prototype.square = Qe;
998
- var W = c;
999
- if (W.prototype.IsNegative = function() {
1000
- return this.compareTo(W.ZERO) == -1;
1001
- }, W.op_Equality = function(e, t) {
997
+ c.prototype.chunkSize = we, c.prototype.toRadix = Ee, c.prototype.fromRadix = De, c.prototype.fromNumber = Oe, c.prototype.bitwiseTo = Me, c.prototype.changeBit = qe, c.prototype.addTo = Xe, c.prototype.dMultiply = rt, c.prototype.dAddOffset = it, c.prototype.multiplyLowerTo = ut, c.prototype.multiplyUpperTo = dt, c.prototype.modInt = bt, c.prototype.millerRabin = wt, c.prototype.clone = be, c.prototype.intValue = xe, c.prototype.byteValue = Se, c.prototype.shortValue = Ce, c.prototype.signum = Te, c.prototype.toByteArray = ke, c.prototype.equals = I, c.prototype.min = Ae, c.prototype.max = je, c.prototype.and = Pe, c.prototype.or = Ie, c.prototype.xor = Re, c.prototype.andNot = Be, c.prototype.not = Ve, c.prototype.shiftLeft = L, c.prototype.shiftRight = R, c.prototype.getLowestSetBit = Ue, c.prototype.bitCount = Ge, c.prototype.testBit = Ke, c.prototype.setBit = z, c.prototype.clearBit = Je, c.prototype.flipBit = Ye, c.prototype.add = Ze, c.prototype.subtract = B, c.prototype.multiply = Qe, c.prototype.divide = et, c.prototype.remainder = tt, c.prototype.divideAndRemainder = nt, c.prototype.modPow = vt, c.prototype.modInverse = xt, c.prototype.pow = lt, c.prototype.gcd = yt, c.prototype.isProbablePrime = Ct, c.prototype.square = $e;
998
+ var H = c;
999
+ if (H.prototype.IsNegative = function() {
1000
+ return this.compareTo(H.ZERO) == -1;
1001
+ }, H.op_Equality = function(e, t) {
1002
1002
  return e.compareTo(t) == 0;
1003
- }, W.op_Inequality = function(e, t) {
1003
+ }, H.op_Inequality = function(e, t) {
1004
1004
  return e.compareTo(t) != 0;
1005
- }, W.op_GreaterThan = function(e, t) {
1005
+ }, H.op_GreaterThan = function(e, t) {
1006
1006
  return e.compareTo(t) > 0;
1007
- }, W.op_LessThan = function(e, t) {
1007
+ }, H.op_LessThan = function(e, t) {
1008
1008
  return e.compareTo(t) < 0;
1009
- }, W.op_Addition = function(e, t) {
1010
- return new W(e).add(new W(t));
1011
- }, W.op_Subtraction = function(e, t) {
1012
- return new W(e).subtract(new W(t));
1013
- }, W.Int128Mul = function(e, t) {
1014
- return new W(e).multiply(new W(t));
1015
- }, W.op_Division = function(e, t) {
1009
+ }, H.op_Addition = function(e, t) {
1010
+ return new H(e).add(new H(t));
1011
+ }, H.op_Subtraction = function(e, t) {
1012
+ return new H(e).subtract(new H(t));
1013
+ }, H.Int128Mul = function(e, t) {
1014
+ return new H(e).multiply(new H(t));
1015
+ }, H.op_Division = function(e, t) {
1016
1016
  return e.divide(t);
1017
- }, W.prototype.ToDouble = function() {
1017
+ }, H.prototype.ToDouble = function() {
1018
1018
  return parseFloat(this.toString());
1019
- }, Ct === void 0) var Ct = function(e, t) {
1019
+ }, U === void 0) var U = function(e, t) {
1020
1020
  var n;
1021
1021
  if (Object.getOwnPropertyNames === void 0) {
1022
1022
  for (n in t.prototype) (e.prototype[n] === void 0 || e.prototype[n] == Object.prototype[n]) && (e.prototype[n] = t.prototype[n]);
@@ -1072,7 +1072,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
1072
1072
  return this.m_Childs.length > 0 ? this.m_Childs[0] : null;
1073
1073
  }, e.PolyTree.prototype.Total = function() {
1074
1074
  return this.m_AllPolys.length;
1075
- }, Ct(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
1075
+ }, U(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
1076
1076
  return Math.abs(e);
1077
1077
  }, e.Math_Max_Int32_Int32 = function(e, t) {
1078
1078
  return Math.max(e, t);
@@ -1185,7 +1185,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
1185
1185
  } while (r != n);
1186
1186
  return !1;
1187
1187
  }, e.ClipperBase.prototype.PointOnLineSegment = function(e, t, n, r) {
1188
- return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && W.op_Equality(W.Int128Mul(e.X - t.X, n.Y - t.Y), W.Int128Mul(n.X - t.X, e.Y - t.Y)) : e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && (e.X - t.X) * (n.Y - t.Y) == (n.X - t.X) * (e.Y - t.Y);
1188
+ return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && H.op_Equality(H.Int128Mul(e.X - t.X, n.Y - t.Y), H.Int128Mul(n.X - t.X, e.Y - t.Y)) : e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && (e.X - t.X) * (n.Y - t.Y) == (n.X - t.X) * (e.Y - t.Y);
1189
1189
  }, e.ClipperBase.prototype.PointOnPolygon = function(e, t, n) {
1190
1190
  for (var r = t;;) {
1191
1191
  if (this.PointOnLineSegment(e, r.Pt, r.Next.Pt, n)) return !0;
@@ -1194,13 +1194,13 @@ var O = /* @__PURE__ */ o(((e, t) => {
1194
1194
  return !1;
1195
1195
  }, e.ClipperBase.prototype.SlopesEqual = e.ClipperBase.SlopesEqual = function() {
1196
1196
  var t = arguments, n = t.length, r, i, a, o, s, c, l;
1197
- return n == 3 ? (r = t[0], i = t[1], l = t[2], l ? W.op_Equality(W.Int128Mul(r.Delta.Y, i.Delta.X), W.Int128Mul(r.Delta.X, i.Delta.Y)) : e.Cast_Int64(r.Delta.Y * i.Delta.X) == e.Cast_Int64(r.Delta.X * i.Delta.Y)) : n == 4 ? (a = t[0], o = t[1], s = t[2], l = t[3], l ? W.op_Equality(W.Int128Mul(a.Y - o.Y, o.X - s.X), W.Int128Mul(a.X - o.X, o.Y - s.Y)) : e.Cast_Int64((a.Y - o.Y) * (o.X - s.X)) - e.Cast_Int64((a.X - o.X) * (o.Y - s.Y)) === 0) : (a = t[0], o = t[1], s = t[2], c = t[3], l = t[4], l ? W.op_Equality(W.Int128Mul(a.Y - o.Y, s.X - c.X), W.Int128Mul(a.X - o.X, s.Y - c.Y)) : e.Cast_Int64((a.Y - o.Y) * (s.X - c.X)) - e.Cast_Int64((a.X - o.X) * (s.Y - c.Y)) === 0);
1197
+ return n == 3 ? (r = t[0], i = t[1], l = t[2], l ? H.op_Equality(H.Int128Mul(r.Delta.Y, i.Delta.X), H.Int128Mul(r.Delta.X, i.Delta.Y)) : e.Cast_Int64(r.Delta.Y * i.Delta.X) == e.Cast_Int64(r.Delta.X * i.Delta.Y)) : n == 4 ? (a = t[0], o = t[1], s = t[2], l = t[3], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, o.X - s.X), H.Int128Mul(a.X - o.X, o.Y - s.Y)) : e.Cast_Int64((a.Y - o.Y) * (o.X - s.X)) - e.Cast_Int64((a.X - o.X) * (o.Y - s.Y)) === 0) : (a = t[0], o = t[1], s = t[2], c = t[3], l = t[4], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, s.X - c.X), H.Int128Mul(a.X - o.X, s.Y - c.Y)) : e.Cast_Int64((a.Y - o.Y) * (s.X - c.X)) - e.Cast_Int64((a.X - o.X) * (s.Y - c.Y)) === 0);
1198
1198
  }, e.ClipperBase.SlopesEqual3 = function(t, n, r) {
1199
- return r ? W.op_Equality(W.Int128Mul(t.Delta.Y, n.Delta.X), W.Int128Mul(t.Delta.X, n.Delta.Y)) : e.Cast_Int64(t.Delta.Y * n.Delta.X) == e.Cast_Int64(t.Delta.X * n.Delta.Y);
1199
+ return r ? H.op_Equality(H.Int128Mul(t.Delta.Y, n.Delta.X), H.Int128Mul(t.Delta.X, n.Delta.Y)) : e.Cast_Int64(t.Delta.Y * n.Delta.X) == e.Cast_Int64(t.Delta.X * n.Delta.Y);
1200
1200
  }, e.ClipperBase.SlopesEqual4 = function(t, n, r, i) {
1201
- return i ? W.op_Equality(W.Int128Mul(t.Y - n.Y, n.X - r.X), W.Int128Mul(t.X - n.X, n.Y - r.Y)) : e.Cast_Int64((t.Y - n.Y) * (n.X - r.X)) - e.Cast_Int64((t.X - n.X) * (n.Y - r.Y)) === 0;
1201
+ return i ? H.op_Equality(H.Int128Mul(t.Y - n.Y, n.X - r.X), H.Int128Mul(t.X - n.X, n.Y - r.Y)) : e.Cast_Int64((t.Y - n.Y) * (n.X - r.X)) - e.Cast_Int64((t.X - n.X) * (n.Y - r.Y)) === 0;
1202
1202
  }, e.ClipperBase.SlopesEqual5 = function(t, n, r, i, a) {
1203
- return a ? W.op_Equality(W.Int128Mul(t.Y - n.Y, r.X - i.X), W.Int128Mul(t.X - n.X, r.Y - i.Y)) : e.Cast_Int64((t.Y - n.Y) * (r.X - i.X)) - e.Cast_Int64((t.X - n.X) * (r.Y - i.Y)) === 0;
1203
+ return a ? H.op_Equality(H.Int128Mul(t.Y - n.Y, r.X - i.X), H.Int128Mul(t.X - n.X, r.Y - i.Y)) : e.Cast_Int64((t.Y - n.Y) * (r.X - i.X)) - e.Cast_Int64((t.X - n.X) * (r.Y - i.Y)) === 0;
1204
1204
  }, e.ClipperBase.prototype.Clear = function() {
1205
1205
  this.DisposeLocalMinimaList();
1206
1206
  for (var t = 0, n = this.m_edges.length; t < n; ++t) {
@@ -1878,16 +1878,16 @@ var O = /* @__PURE__ */ o(((e, t) => {
1878
1878
  }
1879
1879
  this.m_IntersectList.length = 0;
1880
1880
  };
1881
- var wt = function(e) {
1881
+ var Tt = function(e) {
1882
1882
  return e < 0 ? Math.ceil(e - .5) : Math.round(e);
1883
- }, Tt = function(e) {
1884
- return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
1885
1883
  }, Et = function(e) {
1884
+ return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
1885
+ }, W = function(e) {
1886
1886
  return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
1887
1887
  }, Dt = function(e) {
1888
1888
  return e < 0 ? (e -= .5, e < -2147483648 ? Math.ceil(e) : e | 0) : (e += .5, e > 2147483647 ? Math.floor(e) : e | 0);
1889
1889
  };
1890
- a.msie ? e.Clipper.Round = wt : a.chromium ? e.Clipper.Round = Et : a.safari ? e.Clipper.Round = Dt : e.Clipper.Round = Tt, e.Clipper.TopX = function(t, n) {
1890
+ a.msie ? e.Clipper.Round = Tt : a.chromium ? e.Clipper.Round = W : a.safari ? e.Clipper.Round = Dt : e.Clipper.Round = Et, e.Clipper.TopX = function(t, n) {
1891
1891
  return n == t.Top.Y ? t.Top.X : t.Bot.X + e.Clipper.Round(t.Dx * (n - t.Bot.Y));
1892
1892
  }, e.Clipper.prototype.IntersectPoint = function(t, n, r) {
1893
1893
  r.X = 0, r.Y = 0;
@@ -2265,7 +2265,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
2265
2265
  }, e.Clipper.ClosedPathsFromPolyTree = function(t) {
2266
2266
  var n = new e.Paths();
2267
2267
  return e.Clipper.AddPolyNodeToPaths(t, e.Clipper.NodeType.ntClosed, n), n;
2268
- }, Ct(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2268
+ }, U(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2269
2269
  ntAny: 0,
2270
2270
  ntOpen: 1,
2271
2271
  ntClosed: 2
@@ -2748,22 +2748,31 @@ var M = Object.freeze([
2748
2748
  "ANNOUNCEMENT",
2749
2749
  "NARRATION",
2750
2750
  "NO_BUBBLE"
2751
- ]);
2752
- function re(e) {
2751
+ ]), re = Object.freeze({
2752
+ height: 96,
2753
+ width: 176
2754
+ }), ie = Object.freeze({
2755
+ height: 0,
2756
+ width: 0
2757
+ });
2758
+ function ae(...e) {
2759
+ return e.some((e) => e === "THINKING" || e === "DREAMING") ? re : ie;
2760
+ }
2761
+ function N(e) {
2753
2762
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
2754
2763
  }
2755
- function ie(e, t) {
2764
+ function P(e, t) {
2756
2765
  let n = e ?? t;
2757
2766
  if (!Number.isFinite(n) || n <= 0) throw TypeError("Bubble SVG dimensions must be positive and finite.");
2758
2767
  return n;
2759
2768
  }
2760
- function ae(e) {
2769
+ function oe(e) {
2761
2770
  if (e === null) return null;
2762
2771
  let t = e ?? 180;
2763
2772
  if (!Number.isFinite(t)) throw TypeError("tailDirection must be finite.");
2764
2773
  return (t % 360 + 360) % 360;
2765
2774
  }
2766
- function N(e, t, n = 18) {
2775
+ function se(e, t, n = 18) {
2767
2776
  let r = e - 24, i = t - 24;
2768
2777
  return [
2769
2778
  {
@@ -2794,24 +2803,24 @@ function N(e, t, n = 18) {
2794
2803
  };
2795
2804
  }));
2796
2805
  }
2797
- function P(e, t) {
2806
+ function ce(e, t) {
2798
2807
  return e.x * t.y - e.y * t.x;
2799
2808
  }
2800
- function F(e, t) {
2809
+ function le(e, t) {
2801
2810
  return {
2802
2811
  x: e.x - t.x,
2803
2812
  y: e.y - t.y
2804
2813
  };
2805
2814
  }
2806
- function oe(e, t) {
2815
+ function ue(e, t) {
2807
2816
  return Math.hypot(e.x - t.x, e.y - t.y);
2808
2817
  }
2809
- function se(e, t, n, r) {
2818
+ function de(e, t, n, r) {
2810
2819
  let i = t, a = r;
2811
2820
  for (; a > 0;) {
2812
2821
  let t = (i + n + e.length) % e.length, r = e[i], o = e[t];
2813
2822
  if (!r || !o) throw Error("Bubble border path is invalid.");
2814
- let s = oe(r, o);
2823
+ let s = ue(r, o);
2815
2824
  if (a <= s) {
2816
2825
  let e = a / s;
2817
2826
  return {
@@ -2825,14 +2834,14 @@ function se(e, t, n, r) {
2825
2834
  if (!o) throw Error("Bubble border path is empty.");
2826
2835
  return o;
2827
2836
  }
2828
- function ce(e, t, n, r, i) {
2837
+ function F(e, t, n, r, i) {
2829
2838
  let a;
2830
2839
  for (let r = 0; r < e.length; r += 1) {
2831
2840
  let i = e[r], o = e[(r + 1) % e.length];
2832
2841
  if (!i || !o) continue;
2833
- let s = F(o, i), c = P(n, s);
2842
+ let s = le(o, i), c = ce(n, s);
2834
2843
  if (Math.abs(c) < 1e-9) continue;
2835
- let l = F(i, t), u = P(l, s) / c, d = P(l, n) / c;
2844
+ let l = le(i, t), u = ce(l, s) / c, d = ce(l, n) / c;
2836
2845
  u < 0 || d < -1e-9 || d > 1 + 1e-9 || a && u >= a.rayScale || (a = {
2837
2846
  edgeIndex: r,
2838
2847
  point: {
@@ -2850,58 +2859,58 @@ function ce(e, t, n, r, i) {
2850
2859
  ], s = a.edgeIndex + 1;
2851
2860
  return {
2852
2861
  borderPoint: a.point,
2853
- base: [se(o, s, -1, 9), se(o, s, 1, 9)],
2862
+ base: [de(o, s, -1, 9), de(o, s, 1, 9)],
2854
2863
  tip: {
2855
2864
  x: i?.x ?? t.x + n.x * (a.rayScale + r),
2856
2865
  y: i?.y ?? t.y + n.y * (a.rayScale + r)
2857
2866
  }
2858
2867
  };
2859
2868
  }
2860
- function le(e) {
2869
+ function fe(e) {
2861
2870
  let t = e * Math.PI / 180;
2862
2871
  return {
2863
2872
  x: Math.sin(t),
2864
2873
  y: -Math.cos(t)
2865
2874
  };
2866
2875
  }
2867
- function ue(e, t, n, r) {
2876
+ function pe(e, t, n, r) {
2868
2877
  return {
2869
2878
  x: n.x + (e.x - t.x) * r,
2870
2879
  y: n.y + (e.y - t.y) * r
2871
2880
  };
2872
2881
  }
2873
- function I(e, t, n, r, i, a) {
2882
+ function me(e, t, n, r, i, a) {
2874
2883
  let o = {
2875
2884
  x: t / 2,
2876
2885
  y: n / 2
2877
- }, s = le(r), c = ce(e, o, s, i), l = oe(o, c.borderPoint), u = a.scalePercent / 100, d = {
2886
+ }, s = fe(r), c = F(e, o, s, i), l = ue(o, c.borderPoint), u = a.scalePercent / 100, d = {
2878
2887
  x: o.x - s.x * l * (u - 1) + a.x,
2879
2888
  y: o.y - s.y * l * (u - 1) - a.y
2880
2889
  };
2881
2890
  return {
2882
- body: e.map((e) => ue(e, o, d, u)),
2891
+ body: e.map((e) => pe(e, o, d, u)),
2883
2892
  bodyCenter: d,
2884
2893
  tip: c.tip
2885
2894
  };
2886
2895
  }
2887
- function de(e) {
2896
+ function he(e) {
2888
2897
  let t = e[0];
2889
2898
  if (!t) throw Error("Bubble polygon is empty.");
2890
2899
  return `M ${t.x.toFixed(4)} ${t.y.toFixed(4)} ${e.slice(1).map(({ x: e, y: t }) => `L ${e.toFixed(4)} ${t.toFixed(4)}`).join(" ")} Z`;
2891
2900
  }
2892
- function fe(e) {
2901
+ function ge(e) {
2893
2902
  return Math.abs(e.reduce((t, n, r) => {
2894
2903
  let i = e[(r + 1) % e.length];
2895
2904
  return i ? t + n.x * i.y - i.x * n.y : t;
2896
2905
  }, 0) / 2);
2897
2906
  }
2898
- function pe(e, t, n, r = "") {
2899
- return `<path d="${de(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2907
+ function _e(e, t, n, r = "") {
2908
+ return `<path d="${he(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2900
2909
  }
2901
- function me(e, t, n, r, i, a = "") {
2902
- let o = F(n, t), s = Math.hypot(o.x, o.y);
2910
+ function ve(e, t, n, r, i, a = "") {
2911
+ let o = le(n, t), s = Math.hypot(o.x, o.y);
2903
2912
  if (!(s > 0)) throw TypeError("Bubble body center and tail tip must differ.");
2904
- let c = ce(e, t, {
2913
+ let c = F(e, t, {
2905
2914
  x: o.x / s,
2906
2915
  y: o.y / s
2907
2916
  }, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = te.default.union([l(e)], [[l([
@@ -2913,25 +2922,53 @@ function me(e, t, n, r, i, a = "") {
2913
2922
  let d = u.map((e) => e.map(([e, t]) => ({
2914
2923
  x: e,
2915
2924
  y: t
2916
- }))).sort((e, t) => fe(t) - fe(e))[0];
2925
+ }))).sort((e, t) => ge(t) - ge(e))[0];
2917
2926
  if (!d) throw Error("JSClipper returned an empty Bubble outline.");
2918
- return `<path d="${de(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
2919
- }
2920
- function he(e, t, n, r) {
2921
- let i = e - 24, a = t - 24, o = e / 2, s = t / 2;
2922
- return `<path d="M 42 ${s}
2923
- C 22 ${s - 20}, 32 42, 60 44
2924
- C 68 22, ${o - 18} 19, ${o} 37
2925
- C ${o + 24} 16, ${i - 28} 24, ${i - 30} 48
2926
- C ${i + 2} 42, ${i + 7} ${s - 3}, ${i - 3} ${s + 15}
2927
- C ${i + 8} ${a - 10}, ${i - 20} ${a + 7}, ${i - 42} ${a - 7}
2928
- C ${i - 55} ${a + 12}, ${o + 12} ${a + 7}, ${o} ${a - 7}
2929
- C ${o - 24} ${a + 12}, 66 ${a + 7}, 62 ${a - 12}
2930
- C 31 ${a + 2}, 17 ${s + 20}, 42 ${s} Z"
2931
- fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
2932
- }
2933
- function ge(e, t, n, r, i, a) {
2934
- let o = F(n, t), s = Math.hypot(o.x, o.y), c = ce(e, t, {
2927
+ return `<path d="${he(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
2928
+ }
2929
+ function ye(e) {
2930
+ let t = e[0];
2931
+ if (!t || e.length < 3) throw TypeError("Smooth Bubble path requires at least three points.");
2932
+ let n = (e) => e.toFixed(4), r = e.map((t, r) => {
2933
+ let i = e[(r - 1 + e.length) % e.length], a = e[(r + 1) % e.length], o = e[(r + 2) % e.length];
2934
+ if (!i || !a || !o) throw Error("Smooth Bubble path is invalid.");
2935
+ let s = {
2936
+ x: t.x + (a.x - i.x) / 6,
2937
+ y: t.y + (a.y - i.y) / 6
2938
+ }, c = {
2939
+ x: a.x - (o.x - t.x) / 6,
2940
+ y: a.y - (o.y - t.y) / 6
2941
+ };
2942
+ return `C ${n(s.x)} ${n(s.y)} ${n(c.x)} ${n(c.y)} ${n(a.x)} ${n(a.y)}`;
2943
+ });
2944
+ return `M ${n(t.x)} ${n(t.y)} ${r.join(" ")} Z`;
2945
+ }
2946
+ function be(e, t, n, r) {
2947
+ let i = e - 24, a = t - 24, o = i - 24, s = a - 24, c = (e, t) => ({
2948
+ x: 24 + o * e,
2949
+ y: 24 + s * t
2950
+ });
2951
+ return `<path d="${ye([
2952
+ c(0, .5),
2953
+ c(.03, .3),
2954
+ c(.18, .2),
2955
+ c(.28, .04),
2956
+ c(.5, .16),
2957
+ c(.68, .03),
2958
+ c(.84, .18),
2959
+ c(.98, .3),
2960
+ c(1, .52),
2961
+ c(.95, .7),
2962
+ c(.82, .82),
2963
+ c(.68, .97),
2964
+ c(.5, .84),
2965
+ c(.32, .97),
2966
+ c(.18, .82),
2967
+ c(.03, .7)
2968
+ ])}" fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
2969
+ }
2970
+ function xe(e, t, n, r, i, a) {
2971
+ let o = le(n, t), s = Math.hypot(o.x, o.y), c = F(e, t, {
2935
2972
  x: o.x / s,
2936
2973
  y: o.y / s
2937
2974
  }, 0, n), l = {
@@ -2959,7 +2996,7 @@ function ge(e, t, n, r, i, a) {
2959
2996
  radius: 3.5
2960
2997
  }]).map(({ ratio: e, radius: t }) => `<circle cx="${l.x + (c.tip.x - l.x) * e}" cy="${l.y + (c.tip.y - l.y) * e}" r="${t}" fill="${r}" stroke="${i}" stroke-width="2"/>`).join("");
2961
2998
  }
2962
- function _e(e, t) {
2999
+ function Se(e, t) {
2963
3000
  let n = e / 2, r = t / 2;
2964
3001
  return Array.from({ length: 28 }, (i, a) => {
2965
3002
  let o = a * Math.PI * 2 / 28 - Math.PI / 2, s = a % 2 == 0, c = s ? e / 2 - 6 : e / 2 - 22, l = s ? t / 2 - 6 : t / 2 - 22;
@@ -2969,7 +3006,7 @@ function _e(e, t) {
2969
3006
  };
2970
3007
  });
2971
3008
  }
2972
- function ve(e, t) {
3009
+ function Ce(e, t) {
2973
3010
  let n = e - 24, r = t - 24, i = Array.from({ length: 21 }, (e, t) => {
2974
3011
  let n = t / 20;
2975
3012
  return {
@@ -3002,61 +3039,61 @@ function ve(e, t) {
3002
3039
  }))
3003
3040
  ];
3004
3041
  }
3005
- function ye(e, t, n) {
3006
- return e === "YELLING" ? _e(t, n) : e === "WAVY" ? ve(t, n) : N(t, n);
3042
+ function we(e, t, n) {
3043
+ return e === "YELLING" ? Se(t, n) : e === "WAVY" ? Ce(t, n) : se(t, n);
3007
3044
  }
3008
- function be(e) {
3009
- let t = ie(e.width, 220), n = ie(e.height, 112), r = ae(e.tailDirection);
3010
- if (r === null) throw TypeError("Bubble body center offset requires a tail direction.");
3011
- let i = j(e.tailLength ?? k), a = ne(e.offset), o = {
3012
- x: t / 2,
3013
- y: n / 2
3014
- }, s = I(ye(e.style, t, n), t, n, r, i, a);
3045
+ function Te(e) {
3046
+ let t = ae(e.style), n = Math.max(P(e.width, 220), t.width), r = Math.max(P(e.height, 112), t.height), i = oe(e.tailDirection);
3047
+ if (i === null) throw TypeError("Bubble body center offset requires a tail direction.");
3048
+ let a = j(e.tailLength ?? k), o = ne(e.offset), s = {
3049
+ x: n / 2,
3050
+ y: r / 2
3051
+ }, c = me(we(e.style, n, r), n, r, i, a, o);
3015
3052
  return Object.freeze({
3016
- x: s.bodyCenter.x - o.x,
3017
- y: s.bodyCenter.y - o.y
3053
+ x: c.bodyCenter.x - s.x,
3054
+ y: c.bodyCenter.y - s.y
3018
3055
  });
3019
3056
  }
3020
- function xe(e, t, n, r, i, a, o, s) {
3021
- let c = N(t, n), l = (e) => r === null ? e : I(e, t, n, r, o, s).body, u = (e, c = "") => {
3022
- if (r === null) return pe(e, i, a, c);
3023
- let l = I(e, t, n, r, o, s);
3024
- return me(l.body, l.bodyCenter, l.tip, i, a, c);
3057
+ function Ee(e, t, n, r, i, a, o, s) {
3058
+ let c = se(t, n), l = (e) => r === null ? e : me(e, t, n, r, o, s).body, u = (e, c = "") => {
3059
+ if (r === null) return _e(e, i, a, c);
3060
+ let l = me(e, t, n, r, o, s);
3061
+ return ve(l.body, l.bodyCenter, l.tip, i, a, c);
3025
3062
  };
3026
3063
  switch (e) {
3027
3064
  case "NO_BUBBLE": return "";
3028
3065
  case "THINKING":
3029
3066
  case "DREAMING": {
3030
- if (r === null) return he(t, n, i, a);
3031
- let l = I(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
3067
+ if (r === null) return be(t, n, i, a);
3068
+ let l = me(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
3032
3069
  x: t / 2,
3033
3070
  y: n / 2
3034
3071
  }, f = l.bodyCenter.x - d.x * u, p = l.bodyCenter.y - d.y * u;
3035
- return `${ge(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${he(t, n, i, a)}</g>`;
3072
+ return `${xe(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${be(t, n, i, a)}</g>`;
3036
3073
  }
3037
- case "YELLING": return u(_e(t, n));
3038
- case "WAVY": return u(ve(t, n));
3074
+ case "YELLING": return u(Se(t, n));
3075
+ case "WAVY": return u(Ce(t, n));
3039
3076
  case "WHISPERING": return u(c, "stroke-dasharray=\"5 5\"");
3040
3077
  case "ANNOUNCEMENT": return `${u(c)}<rect x="30" y="30" width="${t - 60}" height="${n - 60}" rx="13" fill="none" stroke="${a}" stroke-width="1.5"/>`;
3041
- case "NARRATION": return pe(l(c), i, a);
3078
+ case "NARRATION": return _e(l(c), i, a);
3042
3079
  case "OFF_PANEL": return u(c);
3043
3080
  case "NORMAL": return u(c);
3044
3081
  }
3045
3082
  }
3046
- function Se(e) {
3083
+ function De(e) {
3047
3084
  if (!M.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
3048
3085
  if (!Array.isArray(e.lines) || e.lines.some((e) => typeof e != "string")) throw TypeError("lines must be an array of strings.");
3049
- let t = ie(e.width, 220), n = ie(e.height, 112), r = ie(e.fontSize, 15), i = ae(e.tailDirection), a = j(e.tailLength ?? k), o = e.offset === void 0 ? A : ne(e.offset), s = e.shapeTransition;
3086
+ let t = P(e.width, 220), n = P(e.height, 112), r = P(e.fontSize, 15), i = oe(e.tailDirection), a = j(e.tailLength ?? k), o = e.offset === void 0 ? A : ne(e.offset), s = e.shapeTransition;
3050
3087
  if (s !== void 0 && (!M.includes(s.from) || !M.includes(s.to) || !Number.isFinite(s.progress) || s.progress < 0 || s.progress > 1)) throw TypeError("Bubble shape transition is invalid.");
3051
- let c = e.fillColor ?? "#fff4cc", l = e.borderColor ?? "#6f5b45", u = e.textColor ?? "#25283a", d = e.fontFamily ?? "Noto Sans JP, sans-serif", f = r * 1.35, p = n / 2 - (e.lines.length - 1) * f / 2 + r * .35, m = i === null ? 1 : o.scalePercent / 100, h = i === null ? {
3052
- x: t / 2,
3053
- y: n / 2
3054
- } : I(N(t, n), t, n, i, a, o).bodyCenter, g = e.lines.map((e, t) => `<text x="${h.x}" y="${h.y + (p + t * f - n / 2) * m}" text-anchor="middle" fill="${re(u)}" font-family="${re(d)}" font-size="${r * m}">${re(e)}</text>`).join(""), _ = s === void 0 ? xe(e.style, t, n, i, c, l, a, o) : `<g opacity="${(1 - s.progress).toFixed(4)}">${xe(s.from, t, n, i, c, l, a, o)}</g><g opacity="${s.progress.toFixed(4)}">${xe(s.to, t, n, i, c, l, a, o)}</g>`, v = re(e.title ?? `${e.style} bubble`), y = s === void 0 ? "" : ` data-bubble-shape-transition-from="${s.from}" data-bubble-shape-transition-to="${s.to}" data-bubble-shape-transition-progress="${s.progress.toFixed(4)}"`;
3055
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}"${y}><title>${v}</title>${_}${g}</svg>`;
3088
+ let c = ae(e.style, ...s === void 0 ? [] : [s.from, s.to]), l = Math.max(t, c.width), u = Math.max(n, c.height), d = e.fillColor ?? "#fff4cc", f = e.borderColor ?? "#6f5b45", p = e.textColor ?? "#25283a", m = e.fontFamily ?? "Noto Sans JP, sans-serif", h = r * 1.35, g = u / 2 - (e.lines.length - 1) * h / 2 + r * .35, _ = i === null ? 1 : o.scalePercent / 100, v = i === null ? {
3089
+ x: l / 2,
3090
+ y: u / 2
3091
+ } : me(se(l, u), l, u, i, a, o).bodyCenter, y = e.lines.map((e, t) => `<text x="${v.x}" y="${v.y + (g + t * h - u / 2) * _}" text-anchor="middle" fill="${N(p)}" font-family="${N(m)}" font-size="${r * _}">${N(e)}</text>`).join(""), b = s === void 0 ? Ee(e.style, l, u, i, d, f, a, o) : `<g opacity="${(1 - s.progress).toFixed(4)}">${Ee(s.from, l, u, i, d, f, a, o)}</g><g opacity="${s.progress.toFixed(4)}">${Ee(s.to, l, u, i, d, f, a, o)}</g>`, x = N(e.title ?? `${e.style} bubble`), S = s === void 0 ? "" : ` data-bubble-shape-transition-from="${s.from}" data-bubble-shape-transition-to="${s.to}" data-bubble-shape-transition-progress="${s.progress.toFixed(4)}"`;
3092
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${u}" viewBox="0 0 ${l} ${u}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}" data-bubble-body-width="${l}" data-bubble-body-height="${u}"${S}><title>${x}</title>${b}${y}</svg>`;
3056
3093
  }
3057
3094
  //#endregion
3058
3095
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/constants.js
3059
- var Ce = 2048, we = 2112, L = Uint8Array, Te = Uint16Array, Ee = Int32Array, De = new L([
3096
+ var Oe = 2048, ke = 2112, I = Uint8Array, Ae = Uint16Array, je = Int32Array, Me = new I([
3060
3097
  0,
3061
3098
  0,
3062
3099
  0,
@@ -3089,7 +3126,7 @@ var Ce = 2048, we = 2112, L = Uint8Array, Te = Uint16Array, Ee = Int32Array, De
3089
3126
  0,
3090
3127
  0,
3091
3128
  0
3092
- ]), Oe = new L([
3129
+ ]), Ne = new I([
3093
3130
  0,
3094
3131
  0,
3095
3132
  0,
@@ -3122,7 +3159,7 @@ var Ce = 2048, we = 2112, L = Uint8Array, Te = Uint16Array, Ee = Int32Array, De
3122
3159
  13,
3123
3160
  0,
3124
3161
  0
3125
- ]), ke = new L([
3162
+ ]), Pe = new I([
3126
3163
  16,
3127
3164
  17,
3128
3165
  18,
@@ -3142,51 +3179,51 @@ var Ce = 2048, we = 2112, L = Uint8Array, Te = Uint16Array, Ee = Int32Array, De
3142
3179
  14,
3143
3180
  1,
3144
3181
  15
3145
- ]), Ae = function(e, t) {
3146
- for (var n = new Te(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
3147
- for (var i = new Ee(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
3182
+ ]), Fe = function(e, t) {
3183
+ for (var n = new Ae(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
3184
+ for (var i = new je(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
3148
3185
  return {
3149
3186
  b: n,
3150
3187
  r: i
3151
3188
  };
3152
- }, je = Ae(De, 2), Me = je.b, Ne = je.r;
3153
- Me[28] = 258, Ne[258] = 28;
3154
- var Pe = Ae(Oe, 0), Fe = Pe.b;
3155
- Pe.r;
3156
- for (var Ie = new Te(32768), R = 0; R < 32768; ++R) {
3157
- var z = (R & 43690) >> 1 | (R & 21845) << 1;
3158
- z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, Ie[R] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
3159
- }
3160
- for (var Le = (function(e, t, n) {
3161
- for (var r = e.length, i = 0, a = new Te(t); i < r; ++i) e[i] && ++a[e[i] - 1];
3162
- var o = new Te(t);
3189
+ }, Ie = Fe(Me, 2), Le = Ie.b, Re = Ie.r;
3190
+ Le[28] = 258, Re[258] = 28;
3191
+ var ze = Fe(Ne, 0), Be = ze.b;
3192
+ ze.r;
3193
+ for (var Ve = new Ae(32768), L = 0; L < 32768; ++L) {
3194
+ var R = (L & 43690) >> 1 | (L & 21845) << 1;
3195
+ R = (R & 52428) >> 2 | (R & 13107) << 2, R = (R & 61680) >> 4 | (R & 3855) << 4, Ve[L] = ((R & 65280) >> 8 | (R & 255) << 8) >> 1;
3196
+ }
3197
+ for (var He = (function(e, t, n) {
3198
+ for (var r = e.length, i = 0, a = new Ae(t); i < r; ++i) e[i] && ++a[e[i] - 1];
3199
+ var o = new Ae(t);
3163
3200
  for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
3164
3201
  var s;
3165
3202
  if (n) {
3166
- s = new Te(1 << t);
3203
+ s = new Ae(1 << t);
3167
3204
  var c = 15 - t;
3168
- for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Ie[d] >> c] = l;
3169
- } else for (s = new Te(r), i = 0; i < r; ++i) e[i] && (s[i] = Ie[o[e[i] - 1]++] >> 15 - e[i]);
3205
+ for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Ve[d] >> c] = l;
3206
+ } else for (s = new Ae(r), i = 0; i < r; ++i) e[i] && (s[i] = Ve[o[e[i] - 1]++] >> 15 - e[i]);
3170
3207
  return s;
3171
- }), Re = new L(288), R = 0; R < 144; ++R) Re[R] = 8;
3172
- for (var R = 144; R < 256; ++R) Re[R] = 9;
3173
- for (var R = 256; R < 280; ++R) Re[R] = 7;
3174
- for (var R = 280; R < 288; ++R) Re[R] = 8;
3175
- for (var ze = new L(32), R = 0; R < 32; ++R) ze[R] = 5;
3176
- var Be = /*#__PURE__*/ Le(Re, 9, 1), Ve = /*#__PURE__*/ Le(ze, 5, 1), He = function(e) {
3208
+ }), Ue = new I(288), L = 0; L < 144; ++L) Ue[L] = 8;
3209
+ for (var L = 144; L < 256; ++L) Ue[L] = 9;
3210
+ for (var L = 256; L < 280; ++L) Ue[L] = 7;
3211
+ for (var L = 280; L < 288; ++L) Ue[L] = 8;
3212
+ for (var We = new I(32), L = 0; L < 32; ++L) We[L] = 5;
3213
+ var Ge = /*#__PURE__*/ He(Ue, 9, 1), Ke = /*#__PURE__*/ He(We, 5, 1), qe = function(e) {
3177
3214
  for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
3178
3215
  return t;
3179
- }, B = function(e, t, n) {
3216
+ }, z = function(e, t, n) {
3180
3217
  var r = t / 8 | 0;
3181
3218
  return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
3182
- }, Ue = function(e, t) {
3219
+ }, Je = function(e, t) {
3183
3220
  var n = t / 8 | 0;
3184
3221
  return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
3185
- }, We = function(e) {
3222
+ }, Ye = function(e) {
3186
3223
  return (e + 7) / 8 | 0;
3187
- }, Ge = function(e, t, n) {
3188
- return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new L(e.subarray(t, n));
3189
- }, Ke = [
3224
+ }, Xe = function(e, t, n) {
3225
+ return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new I(e.subarray(t, n));
3226
+ }, Ze = [
3190
3227
  "unexpected EOF",
3191
3228
  "invalid block type",
3192
3229
  "invalid length/literal",
@@ -3201,121 +3238,121 @@ var Be = /*#__PURE__*/ Le(Re, 9, 1), Ve = /*#__PURE__*/ Le(ze, 5, 1), He = funct
3201
3238
  "filename too long",
3202
3239
  "stream finishing",
3203
3240
  "invalid zip data"
3204
- ], V = function(e, t, n) {
3205
- var r = Error(t || Ke[e]);
3206
- if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, V), !n) throw r;
3241
+ ], B = function(e, t, n) {
3242
+ var r = Error(t || Ze[e]);
3243
+ if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, B), !n) throw r;
3207
3244
  return r;
3208
- }, qe = function(e, t, n, r) {
3245
+ }, Qe = function(e, t, n, r) {
3209
3246
  var i = e.length, a = r ? r.length : 0;
3210
- if (!i || t.f && !t.l) return n || new L(0);
3247
+ if (!i || t.f && !t.l) return n || new I(0);
3211
3248
  var o = !n, s = o || t.i != 2, c = t.i;
3212
- o && (n = new L(i * 3));
3249
+ o && (n = new I(i * 3));
3213
3250
  var l = function(e) {
3214
3251
  var t = n.length;
3215
3252
  if (e > t) {
3216
- var r = new L(Math.max(t * 2, e));
3253
+ var r = new I(Math.max(t * 2, e));
3217
3254
  r.set(n), n = r;
3218
3255
  }
3219
3256
  }, u = t.f || 0, d = t.p || 0, f = t.b || 0, p = t.l, m = t.d, h = t.m, g = t.n, _ = i * 8;
3220
3257
  do {
3221
3258
  if (!p) {
3222
- u = B(e, d, 1);
3223
- var v = B(e, d + 1, 3);
3259
+ u = z(e, d, 1);
3260
+ var v = z(e, d + 1, 3);
3224
3261
  if (d += 3, !v) {
3225
- var y = We(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3262
+ var y = Ye(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3226
3263
  if (x > i) {
3227
- c && V(0);
3264
+ c && B(0);
3228
3265
  break;
3229
3266
  }
3230
3267
  s && l(f + b), n.set(e.subarray(y, x), f), t.b = f += b, t.p = d = x * 8, t.f = u;
3231
3268
  continue;
3232
3269
  }
3233
- if (v == 1) p = Be, m = Ve, h = 9, g = 5;
3270
+ if (v == 1) p = Ge, m = Ke, h = 9, g = 5;
3234
3271
  else if (v == 2) {
3235
- var S = B(e, d, 31) + 257, C = B(e, d + 10, 15) + 4, w = S + B(e, d + 5, 31) + 1;
3272
+ var S = z(e, d, 31) + 257, C = z(e, d + 10, 15) + 4, w = S + z(e, d + 5, 31) + 1;
3236
3273
  d += 14;
3237
- for (var T = new L(w), E = new L(19), D = 0; D < C; ++D) E[ke[D]] = B(e, d + D * 3, 7);
3274
+ for (var T = new I(w), E = new I(19), D = 0; D < C; ++D) E[Pe[D]] = z(e, d + D * 3, 7);
3238
3275
  d += C * 3;
3239
- for (var ee = He(E), O = (1 << ee) - 1, te = Le(E, ee, 1), D = 0; D < w;) {
3240
- var k = te[B(e, d, O)];
3276
+ for (var ee = qe(E), O = (1 << ee) - 1, te = He(E, ee, 1), D = 0; D < w;) {
3277
+ var k = te[z(e, d, O)];
3241
3278
  d += k & 15;
3242
3279
  var y = k >> 4;
3243
3280
  if (y < 16) T[D++] = y;
3244
3281
  else {
3245
3282
  var A = 0, j = 0;
3246
- for (y == 16 ? (j = 3 + B(e, d, 3), d += 2, A = T[D - 1]) : y == 17 ? (j = 3 + B(e, d, 7), d += 3) : y == 18 && (j = 11 + B(e, d, 127), d += 7); j--;) T[D++] = A;
3283
+ for (y == 16 ? (j = 3 + z(e, d, 3), d += 2, A = T[D - 1]) : y == 17 ? (j = 3 + z(e, d, 7), d += 3) : y == 18 && (j = 11 + z(e, d, 127), d += 7); j--;) T[D++] = A;
3247
3284
  }
3248
3285
  }
3249
3286
  var ne = T.subarray(0, S), M = T.subarray(S);
3250
- h = He(ne), g = He(M), p = Le(ne, h, 1), m = Le(M, g, 1);
3251
- } else V(1);
3287
+ h = qe(ne), g = qe(M), p = He(ne, h, 1), m = He(M, g, 1);
3288
+ } else B(1);
3252
3289
  if (d > _) {
3253
- c && V(0);
3290
+ c && B(0);
3254
3291
  break;
3255
3292
  }
3256
3293
  }
3257
3294
  s && l(f + 131072);
3258
3295
  for (var re = (1 << h) - 1, ie = (1 << g) - 1, ae = d;; ae = d) {
3259
- var A = p[Ue(e, d) & re], N = A >> 4;
3296
+ var A = p[Je(e, d) & re], N = A >> 4;
3260
3297
  if (d += A & 15, d > _) {
3261
- c && V(0);
3298
+ c && B(0);
3262
3299
  break;
3263
3300
  }
3264
- if (A || V(2), N < 256) n[f++] = N;
3301
+ if (A || B(2), N < 256) n[f++] = N;
3265
3302
  else if (N == 256) {
3266
3303
  ae = d, p = null;
3267
3304
  break;
3268
3305
  } else {
3269
3306
  var P = N - 254;
3270
3307
  if (N > 264) {
3271
- var D = N - 257, F = De[D];
3272
- P = B(e, d, (1 << F) - 1) + Me[D], d += F;
3308
+ var D = N - 257, oe = Me[D];
3309
+ P = z(e, d, (1 << oe) - 1) + Le[D], d += oe;
3273
3310
  }
3274
- var oe = m[Ue(e, d) & ie], se = oe >> 4;
3275
- oe || V(3), d += oe & 15;
3276
- var M = Fe[se];
3277
- if (se > 3) {
3278
- var F = Oe[se];
3279
- M += Ue(e, d) & (1 << F) - 1, d += F;
3311
+ var se = m[Je(e, d) & ie], ce = se >> 4;
3312
+ se || B(3), d += se & 15;
3313
+ var M = Be[ce];
3314
+ if (ce > 3) {
3315
+ var oe = Ne[ce];
3316
+ M += Je(e, d) & (1 << oe) - 1, d += oe;
3280
3317
  }
3281
3318
  if (d > _) {
3282
- c && V(0);
3319
+ c && B(0);
3283
3320
  break;
3284
3321
  }
3285
3322
  s && l(f + 131072);
3286
- var ce = f + P;
3323
+ var le = f + P;
3287
3324
  if (f < M) {
3288
- var le = a - M, ue = Math.min(M, ce);
3289
- for (le + f < 0 && V(3); f < ue; ++f) n[f] = r[le + f];
3325
+ var ue = a - M, de = Math.min(M, le);
3326
+ for (ue + f < 0 && B(3); f < de; ++f) n[f] = r[ue + f];
3290
3327
  }
3291
- for (; f < ce; ++f) n[f] = n[f - M];
3328
+ for (; f < le; ++f) n[f] = n[f - M];
3292
3329
  }
3293
3330
  }
3294
3331
  t.l = p, t.p = ae, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
3295
3332
  } while (!u);
3296
- return f != n.length && o ? Ge(n, 0, f) : n.subarray(0, f);
3297
- }, Je = /*#__PURE__*/ new L(0), Ye = function(e) {
3298
- (e[0] != 31 || e[1] != 139 || e[2] != 8) && V(6, "invalid gzip data");
3333
+ return f != n.length && o ? Xe(n, 0, f) : n.subarray(0, f);
3334
+ }, $e = /*#__PURE__*/ new I(0), et = function(e) {
3335
+ (e[0] != 31 || e[1] != 139 || e[2] != 8) && B(6, "invalid gzip data");
3299
3336
  var t = e[3], n = 10;
3300
3337
  t & 4 && (n += (e[10] | e[11] << 8) + 2);
3301
3338
  for (var r = (t >> 3 & 1) + (t >> 4 & 1); r > 0; r -= !e[n++]);
3302
3339
  return n + (t & 2);
3303
- }, Xe = function(e) {
3340
+ }, tt = function(e) {
3304
3341
  var t = e.length;
3305
3342
  return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
3306
3343
  };
3307
- function Ze(e, t) {
3308
- var n = Ye(e);
3309
- return n + 8 > e.length && V(6, "invalid gzip data"), qe(e.subarray(n, -8), { i: 2 }, t && t.out || new L(Xe(e)), t && t.dictionary);
3344
+ function nt(e, t) {
3345
+ var n = et(e);
3346
+ return n + 8 > e.length && B(6, "invalid gzip data"), Qe(e.subarray(n, -8), { i: 2 }, t && t.out || new I(tt(e)), t && t.dictionary);
3310
3347
  }
3311
- var Qe = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3348
+ var rt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3312
3349
  try {
3313
- Qe.decode(Je, { stream: !0 });
3350
+ rt.decode($e, { stream: !0 });
3314
3351
  } catch {}
3315
3352
  //#endregion
3316
3353
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/swap.js
3317
- var $e = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3318
- function et(e) {
3354
+ var it = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3355
+ function at(e) {
3319
3356
  let t = e.length;
3320
3357
  for (let n = 0; n < t; n += 4) [e[n], e[n + 1], e[n + 2], e[n + 3]] = [
3321
3358
  e[n + 3],
@@ -3324,15 +3361,15 @@ function et(e) {
3324
3361
  e[n]
3325
3362
  ];
3326
3363
  }
3327
- function tt(e) {}
3328
- var nt = $e ? et : tt, rt = new TextDecoder(), it = class e {
3364
+ function ot(e) {}
3365
+ var st = it ? at : ot, ct = new TextDecoder(), lt = class e {
3329
3366
  constructor(e) {
3330
3367
  if (e instanceof Uint8Array) {
3331
3368
  let t = 0, n = new DataView(e.buffer);
3332
3369
  if (this.highStart = n.getUint32(0, !0), this.errorValue = n.getUint32(4, !0), t = n.getUint32(8, !0), t !== 4294967295) throw Error("Trie created with old version of @cto.af/unicode-trie.");
3333
3370
  if (t = n.getUint32(12, !0), 16 + t > e.byteLength) throw RangeError("Invalid input length");
3334
3371
  let r = e.subarray(16 + t);
3335
- this.values = r.length ? JSON.parse(rt.decode(Ze(r))) : [], e = Ze(e.subarray(16, 16 + t)), nt(e), this.data = new Int32Array(e.buffer);
3372
+ this.values = r.length ? JSON.parse(ct.decode(nt(r))) : [], e = nt(e.subarray(16, 16 + t)), st(e), this.data = new Int32Array(e.buffer);
3336
3373
  } else ({data: this.data, highStart: this.highStart, errorValue: this.errorValue, values: this.values = []} = e);
3337
3374
  }
3338
3375
  static fromBase64(t) {
@@ -3345,10 +3382,10 @@ var nt = $e ? et : tt, rt = new TextDecoder(), it = class e {
3345
3382
  let n = (this.data[e >> 5] << 2) + (e & 31);
3346
3383
  t = this.data[n];
3347
3384
  } else if (e <= 65535) {
3348
- let n = (this.data[Ce + (e - 55296 >> 5)] << 2) + (e & 31);
3385
+ let n = (this.data[Oe + (e - 55296 >> 5)] << 2) + (e & 31);
3349
3386
  t = this.data[n];
3350
3387
  } else if (e < this.highStart) {
3351
- let n = this.data[we - 32 + (e >> 11)];
3388
+ let n = this.data[ke - 32 + (e >> 11)];
3352
3389
  n = this.data[n + (e >> 5 & 63)], n = (n << 2) + (e & 31), t = this.data[n];
3353
3390
  } else t = this.data[this.data.length - 4];
3354
3391
  return t;
@@ -3357,26 +3394,26 @@ var nt = $e ? et : tt, rt = new TextDecoder(), it = class e {
3357
3394
  let t = this.get(e);
3358
3395
  return this.values[t] ?? t;
3359
3396
  }
3360
- }, at = it.fromBase64("AAgOAAEAAAD/////nRQAAB+LCAC4xcFoAgPtnQnwlkUdx1+URLxABcUUghTEEK8Cmwp0LJAa\n MRrFbBSPSXHSAUYNdFQoBWMKyQrUCo/EyMIjD3TIAxXJM5NBHBm0RDSPzDOVdAz7/nB/07bt\n s8/e+/zhfef9zD7HPs/e129/u8/yzVutVWANeBl079xq9QJ9wUCwDxjqYQ4DI8BoMBYcBY4D\n 48FEw3NTwDTp/BxwAZgJLgaXgCvAAnADuA3cDe4Hj0rPLQerwLPgJfAaeBe8Az4EnT/Ram0D\n eoBdwe5gENgX0DsOhHkQGAlGgTHgaHACGA8mgilgGpgBLgJzweVgPlgIbgF3iPOl4BGwAqwG\n a8Er4C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97FsO\n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), ot = Object.fromEntries(at.values.map((e, t) => [e, t])), { values: st } = at, { AI: ct, AL: lt, CJ: ut, CM: dt, NS: ft, SA: pt, SG: mt, SP: ht, XX: gt } = ot;
3361
- function _t(e) {
3397
+ }, ut = lt.fromBase64("AAgOAAEAAAD/////nRQAAB+LCAC4xcFoAgPtnQnwlkUdx1+URLxABcUUghTEEK8Cmwp0LJAa\n MRrFbBSPSXHSAUYNdFQoBWMKyQrUCo/EyMIjD3TIAxXJM5NBHBm0RDSPzDOVdAz7/nB/07bt\n s8/e+/zhfef9zD7HPs/e129/u8/yzVutVWANeBl079xq9QJ9wUCwDxjqYQ4DI8BoMBYcBY4D\n 48FEw3NTwDTp/BxwAZgJLgaXgCvAAnADuA3cDe4Hj0rPLQerwLPgJfAa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/Et08k67f5dtmuupKN2FvMpOsKObeDnVx\n k3ofp1h6VrFIVVdV7T2fYm9013l7k/5rbNlKaBuXso7LLV+K1d67uuWiJ19ShhcjvUP97FsO\n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), dt = Object.fromEntries(ut.values.map((e, t) => [e, t])), { values: ft } = ut, { AI: pt, AL: mt, CJ: ht, CM: gt, NS: _t, SA: vt, SG: yt, SP: bt, XX: xt } = dt;
3398
+ function V(e) {
3362
3399
  switch (e) {
3363
3400
  case null: return null;
3364
3401
  case -1: return "sot";
3365
3402
  case -2: return "eot";
3366
- default: return st[e];
3403
+ default: return ft[e];
3367
3404
  }
3368
3405
  }
3369
- function vt(e, t) {
3406
+ function St(e, t) {
3370
3407
  switch (e) {
3371
- case ct:
3372
- case mt:
3373
- case gt: return lt;
3374
- case pt: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? dt : lt;
3375
- case ut: return ft;
3408
+ case pt:
3409
+ case yt:
3410
+ case xt: return mt;
3411
+ case vt: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? gt : mt;
3412
+ case ht: return _t;
3376
3413
  }
3377
3414
  return e;
3378
3415
  }
3379
- var yt = class {
3416
+ var Ct = class {
3380
3417
  cp = -Infinity;
3381
3418
  cls = -1;
3382
3419
  char = "";
@@ -3386,15 +3423,15 @@ var yt = class {
3386
3423
  this.cls = e, this.cp = t, this.char = n, this.len = r;
3387
3424
  }
3388
3425
  [Symbol.for("nodejs.util.inspect.custom")](e, t, n) {
3389
- return `${_t(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3426
+ return `${V(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3390
3427
  }
3391
- }, bt = class {
3428
+ }, wt = class {
3392
3429
  str = "";
3393
3430
  len = 0;
3394
3431
  prevChunk = 0;
3395
- prev = new yt(-1, -Infinity, "", 0);
3396
- cur = new yt(-1, -Infinity, "", 0);
3397
- next = new yt(-1, -Infinity, "", 0);
3432
+ prev = new Ct(-1, -Infinity, "", 0);
3433
+ cur = new Ct(-1, -Infinity, "", 0);
3434
+ next = new Ct(-1, -Infinity, "", 0);
3398
3435
  LB8 = !1;
3399
3436
  spaces = !1;
3400
3437
  RI = 0;
@@ -3407,13 +3444,13 @@ var yt = class {
3407
3444
  this.next.ignored ? this.cur.len = this.next.len : (this.prev = this.cur, this.cur = this.next), this.next = e;
3408
3445
  }
3409
3446
  pushEnd() {
3410
- this.push(new yt(-2, Infinity, "", this.next.len));
3447
+ this.push(new Ct(-2, Infinity, "", this.next.len));
3411
3448
  }
3412
3449
  *codePoints(e, t = !0) {
3413
3450
  if (t) for (; e < this.len;) if (e === this.cur.len && this.next.cls >= 0) yield this.next, e += this.next.char.length;
3414
3451
  else {
3415
- let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = at.get(t);
3416
- e += n.length, yield new yt(vt(r, n), t, n, e);
3452
+ let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = ut.get(t);
3453
+ e += n.length, yield new Ct(St(r, n), t, n, e);
3417
3454
  }
3418
3455
  else for (; e > 0;) if (e === this.cur.len) yield this.cur, e -= this.cur.char.length;
3419
3456
  else if (e === this.prev.len) yield this.prev, e -= this.prev.char.length;
@@ -3421,11 +3458,11 @@ var yt = class {
3421
3458
  let t = e - 1, n = this.str.charCodeAt(t);
3422
3459
  n >= 56320 && n <= 57343 && t--;
3423
3460
  let r = this.str.codePointAt(t), i = String.fromCodePoint(r);
3424
- yield new yt(vt(at.get(r), i), r, i, e), e = t;
3461
+ yield new Ct(St(ut.get(r), i), r, i, e), e = t;
3425
3462
  }
3426
3463
  }
3427
3464
  classAfterSpaces(e) {
3428
- for (let { cls: t } of this.codePoints(e)) if (t !== ht) return t;
3465
+ for (let { cls: t } of this.codePoints(e)) if (t !== bt) return t;
3429
3466
  return -2;
3430
3467
  }
3431
3468
  afterNext(e = 1) {
@@ -3445,180 +3482,180 @@ var yt = class {
3445
3482
  constructor(e, t = !1) {
3446
3483
  this.position = e, this.required = t;
3447
3484
  }
3448
- }, U = it.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRP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h15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/9UypX8DOa6bSa0hfAbsf33zE\n /EPLr7NtOYj4zlTfD+v7dG0r8uzhXM39qEPH9TtBvTNwUXK9dyv0frzE3DSxje8mZ0yNjuz8\n zlT+S6T1OnQh7M5oo+f+Bvk67EGY/OfiPeKfTL5+hr6ZuM13k/cT4R/QC86tMfdZbf4a2Un6\n H9L9OXNIGCoo12yDYdR7mzG+tP8yhjoTpt607tuh/6r7b1VG7yv5ya/OP7iZQXEdYyi9UNel\n WKM83YTQE/f8qftudz9y7G/OdWlXLxTPYRm9cu+ZMutMaYuK2tnjyqpb5jnPa8+xH7n3eJFO\n ivRGbTNC6su3PeHYM0V7OxZ/hUtWLP5ZFfzDmMYQSieU8qj78rF3fMsI+axX5fwWYvw+5t9u\n f0VnNR964yh31bdLOce8qfYb11ndVWeUvibHfCj8tZD2LNZvTRyyW/GfQr1/OM8gob/LcPn8\n If3iVmVT23Iu/69KaxHzOYn6XenTNw1551DW/3V5X7v6c9Tfh7jPX9TrFtqOhjgPttqeW28u\n 33192kvqs2vW7w7BeyuJcEoAAB+LCAC1xcFoAgOLVvJT0lGKVIoFANHfAiwJAAAA");
3449
3486
  Object.fromEntries(U.values.map((e, t) => [e, t]));
3450
- var { values: xt } = U, { AK: St, AL: W, AP: Ct, AS: wt, B2: Tt, BA: Et, BB: Dt, BK: Ot, CB: kt, CL: At, CM: jt, CP: Mt, CR: Nt, EB: Pt, EM: Ft, EX: It, GL: Lt, H2: Rt, H3: zt, HH: Bt, HL: G, HY: Vt, ID: Ht, IN: Ut, IS: Wt, JL: Gt, JT: Kt, JV: qt, LF: Jt, NU: K, OP: Yt, NL: Xt, NS: Zt, PO: Qt, PR: $t, RI: en, SP: q, SY: tn, QU: J, VF: nn, VI: rn, WJ: an, ZW: on, ZWJ: sn } = ot, cn = /* @__PURE__ */ new Set([
3487
+ var { values: Tt } = U, { AK: Et, AL: W, AP: Dt, AS: Ot, B2: kt, BA: At, BB: jt, BK: Mt, CB: Nt, CL: Pt, CM: Ft, CP: It, CR: Lt, EB: Rt, EM: zt, EX: Bt, GL: Vt, H2: Ht, H3: Ut, HH: Wt, HL: G, HY: Gt, ID: Kt, IN: qt, IS: Jt, JL: Yt, JT: Xt, JV: Zt, LF: Qt, NU: K, OP: $t, NL: en, NS: tn, PO: nn, PR: rn, RI: an, SP: q, SY: on, QU: J, VF: sn, VI: cn, WJ: ln, ZW: un, ZWJ: dn } = dt, fn = /* @__PURE__ */ new Set([
3451
3488
  W,
3452
3489
  G,
3453
3490
  K
3454
- ]), ln = /* @__PURE__ */ new Set([
3455
- Ot,
3456
- Nt,
3457
- Jt,
3458
- Xt,
3491
+ ]), pn = /* @__PURE__ */ new Set([
3492
+ Mt,
3493
+ Lt,
3494
+ Qt,
3495
+ en,
3459
3496
  q,
3460
- on
3461
- ]), un = /* @__PURE__ */ new Set([
3462
- Ht,
3463
- Pt,
3464
- Ft
3465
- ]), dn = /* @__PURE__ */ new Set([
3466
- Gt,
3467
- qt,
3468
- Rt,
3469
- zt
3470
- ]), fn = /* @__PURE__ */ new Set([
3471
- Gt,
3472
- qt,
3497
+ un
3498
+ ]), mn = /* @__PURE__ */ new Set([
3473
3499
  Kt,
3474
3500
  Rt,
3475
3501
  zt
3476
- ]), pn = /* @__PURE__ */ new Set([qt, Kt]), mn = /* @__PURE__ */ new Set([
3502
+ ]), hn = /* @__PURE__ */ new Set([
3503
+ Yt,
3504
+ Zt,
3505
+ Ht,
3506
+ Ut
3507
+ ]), gn = /* @__PURE__ */ new Set([
3508
+ Yt,
3509
+ Zt,
3510
+ Xt,
3511
+ Ht,
3512
+ Ut
3513
+ ]), _n = /* @__PURE__ */ new Set([Zt, Xt]), vn = /* @__PURE__ */ new Set([
3477
3514
  q,
3478
- Lt,
3479
- an,
3480
- At,
3515
+ Vt,
3516
+ ln,
3517
+ Pt,
3481
3518
  J,
3482
- Mt,
3483
3519
  It,
3484
- Wt,
3485
- tn,
3486
- Ot,
3487
- Nt,
3520
+ Bt,
3488
3521
  Jt,
3489
- Xt,
3490
- on
3491
- ]), hn = /* @__PURE__ */ new Set([
3522
+ on,
3523
+ Mt,
3524
+ Lt,
3525
+ Qt,
3526
+ en,
3527
+ un
3528
+ ]), yn = /* @__PURE__ */ new Set([
3492
3529
  -1,
3493
- Ot,
3494
- Nt,
3495
- Jt,
3496
- Xt,
3497
- Yt,
3498
- J,
3530
+ Mt,
3499
3531
  Lt,
3532
+ Qt,
3533
+ en,
3534
+ $t,
3535
+ J,
3536
+ Vt,
3500
3537
  q,
3501
- on
3502
- ]), Y = Symbol("PASS"), X = Symbol("NO_BREAK"), Z = Symbol("MAY_BREAK"), gn = Symbol("MUST_BREAK");
3503
- function _n(e) {
3538
+ un
3539
+ ]), Y = Symbol("PASS"), X = Symbol("NO_BREAK"), Z = Symbol("MAY_BREAK"), bn = Symbol("MUST_BREAK");
3540
+ function xn(e) {
3504
3541
  return e.cur.cls === -1 && e.next.cls !== -2 ? X : Y;
3505
3542
  }
3506
- function vn(e) {
3507
- return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? gn : Y;
3543
+ function Sn(e) {
3544
+ return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? bn : Y;
3508
3545
  }
3509
- function yn(e) {
3510
- return e.cur.cls === Ot ? gn : Y;
3546
+ function Cn(e) {
3547
+ return e.cur.cls === Mt ? bn : Y;
3511
3548
  }
3512
- function bn(e) {
3549
+ function wn(e) {
3513
3550
  switch (e.cur.cls) {
3514
- case Nt: return e.next.cls === Jt ? X : gn;
3515
- case Jt:
3516
- case Xt: return gn;
3551
+ case Lt: return e.next.cls === Qt ? X : bn;
3552
+ case Qt:
3553
+ case en: return bn;
3517
3554
  }
3518
3555
  return Y;
3519
3556
  }
3520
- function xn(e) {
3557
+ function Tn(e) {
3521
3558
  switch (e.next.cls) {
3522
- case Ot:
3523
- case Nt:
3524
- case Jt:
3525
- case Xt: return X;
3559
+ case Mt:
3560
+ case Lt:
3561
+ case Qt:
3562
+ case en: return X;
3526
3563
  }
3527
3564
  return Y;
3528
3565
  }
3529
- function Sn(e) {
3530
- return e.cur.cls !== en && (e.RI = 0), e.spaces ? (e.next.cls !== q && (e.spaces = !1), X) : Y;
3566
+ function En(e) {
3567
+ return e.cur.cls !== an && (e.RI = 0), e.spaces ? (e.next.cls !== q && (e.spaces = !1), X) : Y;
3531
3568
  }
3532
- function Cn(e) {
3533
- if (e.next.cls === on) return X;
3569
+ function Dn(e) {
3570
+ if (e.next.cls === un) return X;
3534
3571
  if (e.next.cls === q) switch (e.cur.cls) {
3535
- case on:
3536
- case Yt:
3572
+ case un:
3573
+ case $t:
3537
3574
  case J:
3538
- case At:
3539
- case Mt:
3540
- case Tt: break;
3575
+ case Pt:
3576
+ case It:
3577
+ case kt: break;
3541
3578
  default: return X;
3542
3579
  }
3543
3580
  return Y;
3544
3581
  }
3545
- function wn(e) {
3546
- return e.LB8 ? (e.LB8 = !1, Z) : e.cur.cls === on ? e.next.cls === q ? (e.LB8 = !0, X) : Z : Y;
3582
+ function On(e) {
3583
+ return e.LB8 ? (e.LB8 = !1, Z) : e.cur.cls === un ? e.next.cls === q ? (e.LB8 = !0, X) : Z : Y;
3547
3584
  }
3548
- function Tn(e) {
3549
- return e.cur.cls === sn ? X : Y;
3585
+ function kn(e) {
3586
+ return e.cur.cls === dn ? X : Y;
3550
3587
  }
3551
- function En(e) {
3552
- return !ln.has(e.cur.cls) && (e.next.cls === jt || e.next.cls === sn) ? (e.next.ignored = !0, X) : Y;
3588
+ function An(e) {
3589
+ return !pn.has(e.cur.cls) && (e.next.cls === Ft || e.next.cls === dn) ? (e.next.ignored = !0, X) : Y;
3553
3590
  }
3554
- function Dn(e) {
3555
- return e.cur.cls === jt && (e.cur.cls = W), e.next.cls === jt && (e.next.cls = W), Y;
3591
+ function jn(e) {
3592
+ return e.cur.cls === Ft && (e.cur.cls = W), e.next.cls === Ft && (e.next.cls = W), Y;
3556
3593
  }
3557
- function On(e) {
3558
- return e.next.cls === an || e.cur.cls === an ? X : Y;
3594
+ function Mn(e) {
3595
+ return e.next.cls === ln || e.cur.cls === ln ? X : Y;
3559
3596
  }
3560
- function kn(e) {
3561
- return e.cur.cls === Lt ? X : Y;
3597
+ function Nn(e) {
3598
+ return e.cur.cls === Vt ? X : Y;
3562
3599
  }
3563
- function An(e) {
3564
- if (e.next.cls === Lt) switch (e.cur.cls) {
3600
+ function Pn(e) {
3601
+ if (e.next.cls === Vt) switch (e.cur.cls) {
3565
3602
  case q:
3566
- case Et:
3567
- case Vt:
3568
- case Bt: return Y;
3603
+ case At:
3604
+ case Gt:
3605
+ case Wt: return Y;
3569
3606
  default: return X;
3570
3607
  }
3571
3608
  return Y;
3572
3609
  }
3573
- function jn(e) {
3610
+ function Fn(e) {
3574
3611
  switch (e.next.cls) {
3575
- case At:
3576
- case Mt:
3612
+ case Pt:
3577
3613
  case It:
3578
- case tn: return X;
3614
+ case Bt:
3615
+ case on: return X;
3579
3616
  }
3580
3617
  return Y;
3581
3618
  }
3582
- function Mn(e) {
3583
- return e.cur.cls === Yt ? (e.next.cls === q && (e.spaces = !0), X) : Y;
3619
+ function In(e) {
3620
+ return e.cur.cls === $t ? (e.next.cls === q && (e.spaces = !0), X) : Y;
3584
3621
  }
3585
- function Nn(e) {
3586
- return hn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === J ? (e.spaces = !0, X) : Y;
3622
+ function Ln(e) {
3623
+ return yn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === J ? (e.spaces = !0, X) : Y;
3587
3624
  }
3588
- function Pn(e) {
3625
+ function Rn(e) {
3589
3626
  if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === J) {
3590
3627
  let t = e.afterNext();
3591
- if (!t || mn.has(t.cls)) return X;
3628
+ if (!t || vn.has(t.cls)) return X;
3592
3629
  }
3593
3630
  return Y;
3594
3631
  }
3595
- function Fn(e) {
3596
- return e.cur.cls === q && e.next.cls === Wt && e.afterNext()?.cls === K ? Z : Y;
3632
+ function zn(e) {
3633
+ return e.cur.cls === q && e.next.cls === Jt && e.afterNext()?.cls === K ? Z : Y;
3597
3634
  }
3598
- function In(e) {
3599
- return e.next.cls === Wt ? X : Y;
3635
+ function Bn(e) {
3636
+ return e.next.cls === Jt ? X : Y;
3600
3637
  }
3601
- function Ln(e) {
3602
- if (e.cur.cls === At || e.cur.cls === Mt) {
3603
- if (e.classAfterSpaces(e.cur.len) === Zt) return e.next.cls === q && (e.spaces = !0), X;
3638
+ function Vn(e) {
3639
+ if (e.cur.cls === Pt || e.cur.cls === It) {
3640
+ if (e.classAfterSpaces(e.cur.len) === tn) return e.next.cls === q && (e.spaces = !0), X;
3604
3641
  if (e.next.cls === q) return X;
3605
3642
  }
3606
3643
  return Y;
3607
3644
  }
3608
- function Rn(e) {
3609
- if (e.cur.cls === Tt) {
3610
- if (e.classAfterSpaces(e.cur.len) === Tt) return e.next.cls === q && (e.spaces = !0), X;
3645
+ function Hn(e) {
3646
+ if (e.cur.cls === kt) {
3647
+ if (e.classAfterSpaces(e.cur.len) === kt) return e.next.cls === q && (e.spaces = !0), X;
3611
3648
  if (e.next.cls === q) return X;
3612
3649
  }
3613
3650
  return Y;
3614
3651
  }
3615
- function zn(e) {
3652
+ function Un(e) {
3616
3653
  return e.cur.cls === q ? Z : Y;
3617
3654
  }
3618
- function Bn(e) {
3655
+ function Wn(e) {
3619
3656
  return e.next.cls === J && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === J && !/^\p{Pf}$/u.test(e.cur.char) ? X : Y;
3620
3657
  }
3621
- function Vn(e) {
3658
+ function Gn(e) {
3622
3659
  if (!U.get(e.cur.cp) && e.next.cls === J) return X;
3623
3660
  if (e.next.cls === J) {
3624
3661
  let t = e.afterNext();
@@ -3626,43 +3663,43 @@ function Vn(e) {
3626
3663
  }
3627
3664
  return e.cur.cls === J && !U.get(e.next.cp) || (e.prev.cls === -1 || !U.get(e.prev.cp)) && e.cur.cls === J ? X : Y;
3628
3665
  }
3629
- function Hn(e) {
3630
- return e.cur.cls === kt || e.next.cls === kt ? Z : Y;
3666
+ function Kn(e) {
3667
+ return e.cur.cls === Nt || e.next.cls === Nt ? Z : Y;
3631
3668
  }
3632
- var Un = /* @__PURE__ */ new Set([
3669
+ var qn = /* @__PURE__ */ new Set([
3633
3670
  -1,
3634
- Ot,
3635
- Nt,
3636
- Jt,
3637
- Xt,
3671
+ Mt,
3672
+ Lt,
3673
+ Qt,
3674
+ en,
3638
3675
  q,
3639
- on,
3640
- kt,
3641
- Lt
3676
+ un,
3677
+ Nt,
3678
+ Vt
3642
3679
  ]);
3643
- function Wn(e) {
3644
- return Un.has(e.prev.cls) && (e.cur.cls === Vt || e.cur.cls === Bt) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3680
+ function Jn(e) {
3681
+ return qn.has(e.prev.cls) && (e.cur.cls === Gt || e.cur.cls === Wt) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3645
3682
  }
3646
- function Gn(e) {
3647
- if (e.cur.cls === Dt) return X;
3683
+ function Yn(e) {
3684
+ if (e.cur.cls === jt) return X;
3648
3685
  switch (e.next.cls) {
3649
- case Et:
3650
- case Bt:
3651
- case Vt:
3652
- case Zt: return X;
3686
+ case At:
3687
+ case Wt:
3688
+ case Gt:
3689
+ case tn: return X;
3653
3690
  }
3654
3691
  return Y;
3655
3692
  }
3656
- function Kn(e) {
3657
- return e.prev.cls === G && (e.cur.cls === Vt || e.cur.cls === Bt) && e.next.cls !== G ? X : Y;
3693
+ function Xn(e) {
3694
+ return e.prev.cls === G && (e.cur.cls === Gt || e.cur.cls === Wt) && e.next.cls !== G ? X : Y;
3658
3695
  }
3659
- function qn(e) {
3660
- return e.cur.cls === tn && e.next.cls === G ? X : Y;
3696
+ function Zn(e) {
3697
+ return e.cur.cls === on && e.next.cls === G ? X : Y;
3661
3698
  }
3662
- function Jn(e) {
3663
- return e.next.cls === Ut ? X : Y;
3699
+ function Qn(e) {
3700
+ return e.next.cls === qt ? X : Y;
3664
3701
  }
3665
- function Yn(e) {
3702
+ function $n(e) {
3666
3703
  switch (e.cur.cls) {
3667
3704
  case W:
3668
3705
  case G:
@@ -3672,97 +3709,93 @@ function Yn(e) {
3672
3709
  }
3673
3710
  return Y;
3674
3711
  }
3675
- function Xn(e) {
3676
- return e.cur.cls === $t && un.has(e.next.cls) || e.next.cls === Qt && un.has(e.cur.cls) ? X : Y;
3712
+ function er(e) {
3713
+ return e.cur.cls === rn && mn.has(e.next.cls) || e.next.cls === nn && mn.has(e.cur.cls) ? X : Y;
3677
3714
  }
3678
- function Zn(e) {
3679
- return (e.cur.cls === $t || e.cur.cls === Qt) && (e.next.cls === W || e.next.cls === G) || (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === $t || e.next.cls === Qt) ? X : Y;
3715
+ function tr(e) {
3716
+ return (e.cur.cls === rn || e.cur.cls === nn) && (e.next.cls === W || e.next.cls === G) || (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === rn || e.next.cls === nn) ? X : Y;
3680
3717
  }
3681
- var Qn = /* @__PURE__ */ new Set([Qt, $t]), $n = /* @__PURE__ */ new Set([At, Mt]);
3682
- function er(e) {
3718
+ var nr = /* @__PURE__ */ new Set([nn, rn]), rr = /* @__PURE__ */ new Set([Pt, It]);
3719
+ function ar(e) {
3683
3720
  let t = null;
3684
- if (Qn.has(e.next.cls) ? t = $n.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === K && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
3685
- case tn:
3686
- case Wt: continue;
3721
+ if (nr.has(e.next.cls) ? t = rr.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === K && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
3722
+ case on:
3723
+ case Jt: continue;
3687
3724
  case K: return X;
3688
3725
  default: break SyIsLoop;
3689
3726
  }
3690
- if (e.cur.cls === Qt || e.cur.cls === $t) {
3691
- if (e.next.cls === Yt) {
3727
+ if (e.cur.cls === nn || e.cur.cls === rn) {
3728
+ if (e.next.cls === $t) {
3692
3729
  let t = e.afterNext();
3693
- if (t && (t.cls === K || t.cls === Wt && e.afterNext(2)?.cls === K)) return X;
3730
+ if (t && (t.cls === K || t.cls === Jt && e.afterNext(2)?.cls === K)) return X;
3694
3731
  } else if (e.next.cls === K) return X;
3695
3732
  }
3696
- return e.cur.cls === Vt && e.next.cls === K || e.cur.cls === Wt && e.next.cls === K ? X : Y;
3733
+ return e.cur.cls === Gt && e.next.cls === K || e.cur.cls === Jt && e.next.cls === K ? X : Y;
3697
3734
  }
3698
- function tr(e) {
3735
+ function or(e) {
3699
3736
  switch (e.cur.cls) {
3700
- case Gt:
3701
- if (dn.has(e.next.cls)) return X;
3737
+ case Yt:
3738
+ if (hn.has(e.next.cls)) return X;
3702
3739
  break;
3703
- case qt:
3704
- case Rt:
3705
- if (pn.has(e.next.cls)) return X;
3740
+ case Zt:
3741
+ case Ht:
3742
+ if (_n.has(e.next.cls)) return X;
3706
3743
  break;
3707
- case Kt:
3708
- case zt: if (e.next.cls === Kt) return X;
3744
+ case Xt:
3745
+ case Ut: if (e.next.cls === Xt) return X;
3709
3746
  }
3710
3747
  return Y;
3711
3748
  }
3712
- function nr(e) {
3749
+ function sr(e) {
3713
3750
  switch (e.cur.cls) {
3714
- case Gt:
3715
- case qt:
3716
- case Kt:
3717
- case Rt:
3718
- case zt:
3719
- if (e.next.cls === Qt) return X;
3751
+ case Yt:
3752
+ case Zt:
3753
+ case Xt:
3754
+ case Ht:
3755
+ case Ut:
3756
+ if (e.next.cls === nn) return X;
3720
3757
  break;
3721
- case $t: if (fn.has(e.next.cls)) return X;
3758
+ case rn: if (gn.has(e.next.cls)) return X;
3722
3759
  }
3723
3760
  return Y;
3724
3761
  }
3725
- function rr(e) {
3762
+ function cr(e) {
3726
3763
  return (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3727
3764
  }
3728
- function ar(e) {
3765
+ function lr(e) {
3729
3766
  let { prev: t, cur: n, next: r } = e;
3730
3767
  function i(e) {
3731
- return e.cls === St || e.char === "◌" || e.cls === wt;
3768
+ return e.cls === Et || e.char === "◌" || e.cls === Ot;
3732
3769
  }
3733
- return n.cls === Ct && i(r) || i(n) && (r.cls === nn || r.cls === rn) || i(t) && n.cls === rn && (r.cls === St || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === nn ? X : Y;
3770
+ return n.cls === Dt && i(r) || i(n) && (r.cls === sn || r.cls === cn) || i(t) && n.cls === cn && (r.cls === Et || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === sn ? X : Y;
3734
3771
  }
3735
- function or(e) {
3736
- return e.cur.cls === Wt && (e.next.cls === W || e.next.cls === G) ? X : Y;
3772
+ function ur(e) {
3773
+ return e.cur.cls === Jt && (e.next.cls === W || e.next.cls === G) ? X : Y;
3737
3774
  }
3738
- function sr(e) {
3775
+ function dr(e) {
3739
3776
  switch (e.cur.cls) {
3740
3777
  case W:
3741
3778
  case G:
3742
3779
  case K:
3743
- if (e.next.cls === Yt && !U.get(e.next.cp)) return X;
3780
+ if (e.next.cls === $t && !U.get(e.next.cp)) return X;
3744
3781
  break;
3745
- case Mt: if (!U.get(e.cur.cp) && cn.has(e.next.cls)) return X;
3782
+ case It: if (!U.get(e.cur.cp) && fn.has(e.next.cls)) return X;
3746
3783
  }
3747
3784
  return Y;
3748
3785
  }
3749
- function cr(e) {
3750
- if (e.cur.cls === en) {
3751
- if (e.next.cls === en && ++e.RI % 2 != 0) return X;
3786
+ function fr(e) {
3787
+ if (e.cur.cls === an) {
3788
+ if (e.next.cls === an && ++e.RI % 2 != 0) return X;
3752
3789
  } else e.RI = 0;
3753
3790
  return Y;
3754
3791
  }
3755
- function lr(e) {
3756
- return e.cur.cls === Pt && e.next.cls === Ft || e.next.cls === Ft && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? X : Y;
3792
+ function pr(e) {
3793
+ return e.cur.cls === Rt && e.next.cls === zt || e.next.cls === zt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? X : Y;
3757
3794
  }
3758
- function ur() {
3795
+ function mr() {
3759
3796
  return Z;
3760
3797
  }
3761
- var dr = [
3762
- _n,
3763
- vn,
3764
- yn,
3765
- bn,
3798
+ var hr = [
3766
3799
  xn,
3767
3800
  Sn,
3768
3801
  Cn,
@@ -3785,25 +3818,29 @@ var dr = [
3785
3818
  Bn,
3786
3819
  Vn,
3787
3820
  Hn,
3821
+ Un,
3788
3822
  Wn,
3789
- Kn,
3790
3823
  Gn,
3791
- qn,
3824
+ Kn,
3792
3825
  Jn,
3793
- Yn,
3794
3826
  Xn,
3827
+ Yn,
3795
3828
  Zn,
3829
+ Qn,
3830
+ $n,
3796
3831
  er,
3797
3832
  tr,
3798
- nr,
3799
- rr,
3800
3833
  ar,
3801
3834
  or,
3802
3835
  sr,
3803
3836
  cr,
3804
3837
  lr,
3805
- ur
3806
- ], fr = class {
3838
+ ur,
3839
+ dr,
3840
+ fr,
3841
+ pr,
3842
+ mr
3843
+ ], gr = class {
3807
3844
  #e;
3808
3845
  constructor(e = {}) {
3809
3846
  if (this.#e = {
@@ -3811,7 +3848,7 @@ var dr = [
3811
3848
  example7: !1,
3812
3849
  verbose: !1,
3813
3850
  ...e
3814
- }, this.rules = [...dr], this.#e.example7) throw Error("'example7' flag deprecated");
3851
+ }, this.rules = [...hr], this.#e.example7) throw Error("'example7' flag deprecated");
3815
3852
  this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), Y));
3816
3853
  }
3817
3854
  removeRule(...e) {
@@ -3840,7 +3877,7 @@ var dr = [
3840
3877
  case Y: break;
3841
3878
  case X: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
3842
3879
  case Z: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new H(e.cur.len);
3843
- case gn: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new H(e.cur.len, !0);
3880
+ case bn: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new H(e.cur.len, !0);
3844
3881
  default: throw Error(`Invalid state: "${n}"`);
3845
3882
  }
3846
3883
  }
@@ -3851,44 +3888,44 @@ var dr = [
3851
3888
  t && (this.#e.string && (t.string = e.str.slice(e.prevChunk, e.cur.len)), e.props &&= (t.props = e.props, void 0), yield t, e.prevChunk = e.cur.len);
3852
3889
  }
3853
3890
  *breaks(e) {
3854
- let t = new bt(e);
3891
+ let t = new wt(e);
3855
3892
  for (let e of t.codePoints(0)) t.push(e), yield* this.#n(t);
3856
3893
  t.pushEnd(), yield* this.#n(t);
3857
3894
  }
3858
3895
  };
3859
3896
  //#endregion
3860
3897
  //#region src/text-layout.ts
3861
- function pr(e, t) {
3898
+ function _r(e, t) {
3862
3899
  let n = new Intl.Segmenter(t, { granularity: "grapheme" }), r = /* @__PURE__ */ new Set([0]);
3863
3900
  for (let t of n.segment(e)) r.add(t.index + t.segment.length);
3864
3901
  return r;
3865
3902
  }
3866
- var mr = class {
3867
- #e = new fr();
3903
+ var vr = class {
3904
+ #e = new gr();
3868
3905
  #t;
3869
3906
  constructor(e = "ja") {
3870
3907
  this.#t = e;
3871
3908
  }
3872
3909
  getBreakOpportunities(e) {
3873
- let t = pr(e, this.#t), n = /* @__PURE__ */ new Map();
3910
+ let t = _r(e, this.#t), n = /* @__PURE__ */ new Map();
3874
3911
  for (let r of this.#e.breaks(e)) t.has(r.position) && n.set(r.position, (n.get(r.position) ?? !1) || r.required);
3875
3912
  return Object.freeze([...n].sort(([e], [t]) => e - t).map(([e, t]) => Object.freeze({
3876
3913
  position: e,
3877
3914
  required: t
3878
3915
  })));
3879
3916
  }
3880
- }, hr = /* @__PURE__ */ new Map(), gr = /\r\n|[\n\r\v\f\u0085\u2028\u2029]/gu;
3881
- function _r(e) {
3882
- let t = hr.get(e);
3917
+ }, yr = /* @__PURE__ */ new Map(), br = /\r\n|[\n\r\v\f\u0085\u2028\u2029]/gu;
3918
+ function xr(e) {
3919
+ let t = yr.get(e);
3883
3920
  if (t) return t;
3884
- let n = new mr(e);
3885
- return hr.set(e, n), n;
3921
+ let n = new vr(e);
3922
+ return yr.set(e, n), n;
3886
3923
  }
3887
- function vr(e, t) {
3924
+ function Sr(e, t) {
3888
3925
  if (!Number.isFinite(e) || e < 0) throw TypeError(`${t} must return a non-negative finite number.`);
3889
3926
  return e;
3890
3927
  }
3891
- function yr(e, t, n) {
3928
+ function Cr(e, t, n) {
3892
3929
  let r = /* @__PURE__ */ new Map();
3893
3930
  for (let i of t.getBreakOpportunities(e)) {
3894
3931
  let { position: t, required: a } = i;
@@ -3899,28 +3936,28 @@ function yr(e, t, n) {
3899
3936
  required: t
3900
3937
  }));
3901
3938
  }
3902
- function br(e, t, n, r, i) {
3939
+ function wr(e, t, n, r, i) {
3903
3940
  if (e.length === 0) return [{
3904
3941
  text: "",
3905
3942
  start: t,
3906
3943
  end: t,
3907
3944
  width: 0
3908
3945
  }];
3909
- let a = pr(e, i), o = [...a].sort((e, t) => e - t), s = yr(e, r, a), c = [], l = 0;
3946
+ let a = _r(e, i), o = [...a].sort((e, t) => e - t), s = Cr(e, r, a), c = [], l = 0;
3910
3947
  for (; l < e.length;) {
3911
3948
  let r = s.find((e) => e.position > l && e.required)?.position ?? e.length, i, a = 0;
3912
3949
  for (let t of s) {
3913
3950
  if (t.position <= l || t.position > r) continue;
3914
- let o = e.slice(l, t.position), s = vr(n.measureText(o), "measureText");
3951
+ let o = e.slice(l, t.position), s = Sr(n.measureText(o), "measureText");
3915
3952
  s <= n.maxWidth && (i = t.position, a = s);
3916
3953
  }
3917
3954
  if (i === void 0) {
3918
3955
  let t = o.filter((e) => e > l && e <= r);
3919
3956
  for (let r of t) {
3920
- let t = e.slice(l, r), o = vr(n.measureText(t), "measureText");
3957
+ let t = e.slice(l, r), o = Sr(n.measureText(t), "measureText");
3921
3958
  o <= n.maxWidth && (i = r, a = o);
3922
3959
  }
3923
- i === void 0 && (i = t[0] ?? r, a = vr(n.measureText(e.slice(l, i)), "measureText"));
3960
+ i === void 0 && (i = t[0] ?? r, a = Sr(n.measureText(e.slice(l, i)), "measureText"));
3924
3961
  }
3925
3962
  c.push({
3926
3963
  text: e.slice(l, i),
@@ -3931,37 +3968,37 @@ function br(e, t, n, r, i) {
3931
3968
  }
3932
3969
  return c;
3933
3970
  }
3934
- function xr(e) {
3971
+ function Tr(e) {
3935
3972
  if (typeof e.text != "string") throw TypeError("text must be a string.");
3936
3973
  if (!Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw TypeError("maxWidth must be a positive finite number.");
3937
3974
  if (typeof e.measureText != "function") throw TypeError("measureText must be a function.");
3938
- let t = e.locale ?? "ja", n = e.lineBreakProvider ?? _r(t), r = [], i = 0;
3939
- for (let a of e.text.matchAll(gr)) {
3975
+ let t = e.locale ?? "ja", n = e.lineBreakProvider ?? xr(t), r = [], i = 0;
3976
+ for (let a of e.text.matchAll(br)) {
3940
3977
  let o = a.index;
3941
- r.push(...br(e.text.slice(i, o), i, e, n, t)), i = o + a[0].length;
3978
+ r.push(...wr(e.text.slice(i, o), i, e, n, t)), i = o + a[0].length;
3942
3979
  }
3943
- return r.push(...br(e.text.slice(i), i, e, n, t)), Object.freeze({
3980
+ return r.push(...wr(e.text.slice(i), i, e, n, t)), Object.freeze({
3944
3981
  lines: Object.freeze(r.map((e) => Object.freeze(e))),
3945
3982
  maxLineWidth: Math.max(0, ...r.map((e) => e.width))
3946
3983
  });
3947
3984
  }
3948
3985
  //#endregion
3949
3986
  //#region src/reveal.ts
3950
- var Sr = Object.freeze([
3987
+ var Er = Object.freeze([
3951
3988
  "CHARACTER",
3952
3989
  "WORD",
3953
3990
  "LINE",
3954
3991
  "BLOCK"
3955
3992
  ]);
3956
- function Cr(e) {
3993
+ function Dr(e) {
3957
3994
  let t = globalThis.Intl?.Segmenter;
3958
3995
  return typeof t == "function" ? [...new t(void 0, { granularity: "grapheme" }).segment(e)].map(({ segment: e }) => e) : Array.from(e);
3959
3996
  }
3960
- function wr(e) {
3961
- if (typeof e != "string" || !Sr.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
3997
+ function Or(e) {
3998
+ if (typeof e != "string" || !Er.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
3962
3999
  return e;
3963
4000
  }
3964
- function Tr(e) {
4001
+ function kr(e) {
3965
4002
  if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError("Bubble reveal must be an object.");
3966
4003
  let t = e, n = /* @__PURE__ */ new Set([
3967
4004
  "unit",
@@ -3972,7 +4009,7 @@ function Tr(e) {
3972
4009
  "sound"
3973
4010
  ]);
3974
4011
  if (Object.keys(t).filter((e) => !n.has(e)).length > 0 || t.unit === void 0) throw TypeError("Bubble reveal has unknown or missing properties.");
3975
- let r = wr(t.unit), i = t.delimiters ?? " \r\n";
4012
+ let r = Or(t.unit), i = t.delimiters ?? " \r\n";
3976
4013
  if (typeof i != "string" || i.length === 0) throw TypeError("Bubble WORD delimiters must be a non-empty string.");
3977
4014
  let a = t.showDelimiters ?? !1;
3978
4015
  if (typeof a != "boolean") throw TypeError("Bubble reveal showDelimiters must be boolean.");
@@ -3991,16 +4028,16 @@ function Tr(e) {
3991
4028
  ...c === void 0 ? {} : { sound: c }
3992
4029
  });
3993
4030
  }
3994
- function Er(e, t, n) {
4031
+ function Ar(e, t, n) {
3995
4032
  let r = new Set(Array.from(t)), i = [], a = "";
3996
- for (let t of Cr(e)) a += t, r.has(t) && ((n || a.slice(0, -t.length).length > 0) && i.push(n ? a : a.slice(0, -t.length)), a = "");
4033
+ for (let t of Dr(e)) a += t, r.has(t) && ((n || a.slice(0, -t.length).length > 0) && i.push(n ? a : a.slice(0, -t.length)), a = "");
3997
4034
  return a.length > 0 && i.push(a), i.filter((e) => e.length > 0);
3998
4035
  }
3999
- function Dr(e, t) {
4036
+ function jr(e, t) {
4000
4037
  if (e.length === 0) return Object.freeze([""]);
4001
- if (t.unit === "CHARACTER") return Object.freeze(Cr(e));
4038
+ if (t.unit === "CHARACTER") return Object.freeze(Dr(e));
4002
4039
  if (t.unit === "WORD") {
4003
- let n = Er(e, t.delimiters, t.showDelimiters);
4040
+ let n = Ar(e, t.delimiters, t.showDelimiters);
4004
4041
  if (t.showDelimiters) return Object.freeze(n);
4005
4042
  let r = [], i = 0;
4006
4043
  for (let a of n) {
@@ -4018,30 +4055,30 @@ function Dr(e, t) {
4018
4055
  let i = r;
4019
4056
  return Object.freeze(i.length > 0 ? i : [e]);
4020
4057
  }
4021
- function Or(e, t) {
4058
+ function Mr(e, t) {
4022
4059
  return e.slice(0, Math.max(0, Math.min(t, e.length))).join("");
4023
4060
  }
4024
4061
  //#endregion
4025
4062
  //#region src/portrait-layout.ts
4026
- var kr = Object.freeze([
4063
+ var Nr = Object.freeze([
4027
4064
  "left",
4028
4065
  "right",
4029
4066
  "top-left",
4030
4067
  "top-right",
4031
4068
  "bottom-left",
4032
4069
  "bottom-right"
4033
- ]), Ar = "left", jr = Object.freeze({
4070
+ ]), Pr = "left", Fr = Object.freeze({
4034
4071
  x: 0,
4035
4072
  y: 0,
4036
4073
  zoomPercent: 100
4037
- }), Mr = 0;
4038
- function Nr(e) {
4074
+ }), Ir = 0;
4075
+ function Lr(e) {
4039
4076
  if (typeof e != "string") throw TypeError("Bubble portrait placement must be a string.");
4040
4077
  let t = e.trim().toLowerCase().replaceAll("_", "-");
4041
- if (!kr.includes(t)) throw TypeError(`Unsupported Bubble portrait placement: ${e}`);
4078
+ if (!Nr.includes(t)) throw TypeError(`Unsupported Bubble portrait placement: ${e}`);
4042
4079
  return t;
4043
4080
  }
4044
- function Pr(e) {
4081
+ function Rr(e) {
4045
4082
  if (!Array.isArray(e) || e.length !== 2 && e.length !== 3) throw TypeError("Bubble portrait offset must be [x, y] or [x, y, zoom].");
4046
4083
  let [t, n, r = 100] = e;
4047
4084
  if (![
@@ -4055,22 +4092,137 @@ function Pr(e) {
4055
4092
  zoomPercent: r
4056
4093
  });
4057
4094
  }
4058
- function Fr(e) {
4095
+ function zr(e) {
4059
4096
  if (typeof e != "number" || !Number.isFinite(e) || e < 0) throw TypeError("Bubble portrait corner radius must be zero or greater.");
4060
4097
  return e;
4061
4098
  }
4062
4099
  //#endregion
4100
+ //#region src/scratch-default.ts
4101
+ var Br = 330, Vr = 170, Hr = 50, Ur = 4, Wr = 10, Gr = 16, Kr = 12, qr = 14, Jr = 16, Yr = Object.freeze([
4102
+ "placement",
4103
+ "maxWidth",
4104
+ "textLocale",
4105
+ "distance",
4106
+ "tailLength",
4107
+ "offset",
4108
+ "visualStyle",
4109
+ "portrait",
4110
+ "continueIndicator",
4111
+ "reveal",
4112
+ "audio",
4113
+ "showAnimation",
4114
+ "hideAnimation"
4115
+ ]);
4116
+ function Xr(e) {
4117
+ return typeof e == "object" && !!e && !Array.isArray(e);
4118
+ }
4119
+ function Zr(e) {
4120
+ return !Xr(e) || typeof e.textStyle != "string" || e.textStyle.trim() !== "default" ? "custom" : Yr.every((t) => e[t] === void 0) ? "scratch-default" : "custom";
4121
+ }
4122
+ function Qr(e) {
4123
+ return Zr(e) === "scratch-default";
4124
+ }
4125
+ function $r(e) {
4126
+ let t = e;
4127
+ return typeof e == "number" && Math.abs(e) >= .01 && e % 1 != 0 && (t = e.toFixed(2)), String(t).slice(0, 330);
4128
+ }
4129
+ function ei(e) {
4130
+ let t = 0;
4131
+ for (let n of e) if (!/\p{Mark}/u.test(n)) {
4132
+ if (/\s/u.test(n)) {
4133
+ t += .35;
4134
+ continue;
4135
+ }
4136
+ t += (n.codePointAt(0) ?? 0) <= 127 ? .62 : 1;
4137
+ }
4138
+ return t * 14;
4139
+ }
4140
+ function ti(e, t = ei) {
4141
+ let n = Tr({
4142
+ text: e.slice(0, 330),
4143
+ maxWidth: 170,
4144
+ measureText: (e) => {
4145
+ let n;
4146
+ try {
4147
+ n = t(e);
4148
+ } catch {
4149
+ return ei(e);
4150
+ }
4151
+ return Number.isFinite(n) && n >= 0 ? n : ei(e);
4152
+ }
4153
+ }), r = Object.freeze(n.lines.map((e) => Object.freeze({
4154
+ text: e.text,
4155
+ width: e.width
4156
+ })));
4157
+ return Object.freeze({
4158
+ lines: r,
4159
+ maxLineWidth: Math.max(0, ...r.map((e) => e.width)),
4160
+ text: r.map((e) => e.text).join("\n")
4161
+ });
4162
+ }
4163
+ function ni(e) {
4164
+ let t = Math.max(1, e.lines.length), n = Math.max(e.maxLineWidth, 50) + 20, r = 16 * t + 20;
4165
+ return Object.freeze({
4166
+ bodyHeight: r + 4,
4167
+ bodyWidth: n + 4,
4168
+ height: r + 4 + 12,
4169
+ paddedHeight: r,
4170
+ paddedWidth: n,
4171
+ width: n + 4
4172
+ });
4173
+ }
4174
+ function ri(e) {
4175
+ let t = -e.stageWidth / 2, n = e.stageWidth / 2, r = e.stageHeight / 2, i = e.pointsLeft;
4176
+ !i && e.width + e.bounds.right > n && e.bounds.left - e.width > t ? i = !0 : i && e.bounds.left - e.width < t && e.width + e.bounds.right < n && (i = !1);
4177
+ let a = i ? Math.min(n - e.width, Math.max(t, e.bounds.left - e.width)) : Math.max(t, Math.min(n - e.width, e.bounds.right)), o = Math.min(r, e.bounds.bottom + e.height);
4178
+ return Object.freeze({
4179
+ centerX: a + e.width / 2,
4180
+ centerY: o - e.height / 2,
4181
+ left: a,
4182
+ pointsLeft: i,
4183
+ top: o
4184
+ });
4185
+ }
4186
+ function ii(e) {
4187
+ return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
4188
+ }
4189
+ function ai(e) {
4190
+ let { paddedHeight: t, paddedWidth: n } = e, r = Math.min(16, n / 2, t / 2);
4191
+ return [
4192
+ `M ${r} ${t}`,
4193
+ `Q 0 ${t} 0 ${t - r}`,
4194
+ `L 0 ${r}`,
4195
+ `Q 0 0 ${r} 0`,
4196
+ `L ${n - r} 0`,
4197
+ `Q ${n} 0 ${n} ${r}`,
4198
+ `L ${n} ${t - r}`,
4199
+ `Q ${n} ${t} ${n - r} ${t}`
4200
+ ].join(" ");
4201
+ }
4202
+ function oi(e) {
4203
+ let { paddedHeight: t, paddedWidth: n } = e;
4204
+ return `<path d="${`${ai(e)} C ${n - 16} ${t + 4} ${n - 12} ${t + 8} ${n - 12} ${t + 10} Q ${n - 12} ${t + 12} ${n - 14} ${t + 12} C ${n - 17} ${t + 12} ${n - 27} ${t + 8} ${n - 32} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/>`;
4205
+ }
4206
+ function si(e) {
4207
+ let { paddedHeight: t, paddedWidth: n } = e;
4208
+ return `<path d="${`${ai(e)} L ${n - 28} ${t} A 4 4 0 0 1 ${n - 36} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/><circle cx="${n - 25.25}" cy="${t + 7.25}" r="2.25" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/><circle cx="${n - 17.5}" cy="${t + 9.5}" r="1.5" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/>`;
4209
+ }
4210
+ function ci(e) {
4211
+ let t = ni(e.layout), n = e.kind === "say" ? oi(t) : si(t), r = e.pointsLeft ? "translate(2 2)" : `translate(${t.width} 0) scale(-1 1) translate(2 2)`, i = e.layout.lines.map((e, t) => `<text x="12" y="${24.6 + 16 * t}" fill="#575E75" font-family="Helvetica, sans-serif" font-size="14" xml:space="preserve">${ii(e.text)}</text>`).join(""), a = ii(e.title ?? `${e.kind} bubble`);
4212
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${t.width}" height="${t.height}" viewBox="0 0 ${t.width} ${t.height}" role="img" data-bubble-profile="scratch-default" data-bubble-kind="${e.kind}"><title>${a}</title><g transform="${r}">${n}</g>${i}</svg>`;
4213
+ }
4214
+ //#endregion
4063
4215
  //#region src/composition.ts
4064
4216
  var Q = class extends Error {
4065
4217
  code;
4066
4218
  constructor(e, t) {
4067
4219
  super(t), this.name = "BubbleCompositionError", this.code = e;
4068
4220
  }
4069
- }, Ir = /* @__PURE__ */ new Set(["say", "think"]), Lr = /* @__PURE__ */ new Set([
4221
+ }, li = /* @__PURE__ */ new Set(["say", "think"]), ui = /* @__PURE__ */ new Set([
4070
4222
  "idle",
4071
4223
  "talking",
4072
4224
  "awaiting-continue"
4073
- ]), Rr = /* @__PURE__ */ new Set([
4225
+ ]), di = /* @__PURE__ */ new Set([
4074
4226
  "fadeIn",
4075
4227
  "fadeOut",
4076
4228
  "floatIn",
@@ -4082,7 +4234,7 @@ var Q = class extends Error {
4082
4234
  "shake",
4083
4235
  "explode",
4084
4236
  "animateBubbleShape"
4085
- ]), zr = /* @__PURE__ */ new Set([
4237
+ ]), fi = /* @__PURE__ */ new Set([
4086
4238
  "linear",
4087
4239
  "easeIn",
4088
4240
  "easeOut",
@@ -4091,45 +4243,45 @@ var Q = class extends Error {
4091
4243
  function $(e) {
4092
4244
  return typeof e == "object" && !!e && !Array.isArray(e);
4093
4245
  }
4094
- function Br(e, t, n, r) {
4246
+ function pi(e, t, n, r) {
4095
4247
  let i = /* @__PURE__ */ new Set([...t, ...n]), a = t.filter((t) => !Object.prototype.hasOwnProperty.call(e, t)), o = Object.keys(e).filter((e) => !i.has(e));
4096
4248
  if (a.length > 0 || o.length > 0) throw new Q("BUBBLE-COMPOSITION-001", `${r} has missing or unknown properties.`);
4097
4249
  }
4098
- function Vr(e, t) {
4250
+ function mi(e, t) {
4099
4251
  if (typeof e != "string" || e.trim().length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
4100
4252
  return e.trim();
4101
4253
  }
4102
- function Hr(e, t) {
4254
+ function hi(e, t) {
4103
4255
  if (typeof e != "string" || e.length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
4104
4256
  return e;
4105
4257
  }
4106
- function Ur(e, t, n) {
4258
+ function gi(e, t, n) {
4107
4259
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
4108
- if (Br(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
4109
- let r = Object.freeze(e.frames.map((e, n) => Hr(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
4260
+ if (pi(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
4261
+ let r = Object.freeze(e.frames.map((e, n) => hi(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
4110
4262
  if (typeof i != "number" || !Number.isFinite(i) || i <= 0) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frameIntervalSeconds must be a positive finite number.`);
4111
4263
  return Object.freeze({
4112
4264
  frames: r,
4113
4265
  frameIntervalSeconds: i
4114
4266
  });
4115
4267
  }
4116
- function Wr(e) {
4268
+ function _i(e) {
4117
4269
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble portrait must be an object.");
4118
- Br(e, ["base"], [
4270
+ pi(e, ["base"], [
4119
4271
  "blink",
4120
4272
  "lipSync",
4121
4273
  "placement",
4122
4274
  "offset",
4123
4275
  "cornerRadius"
4124
4276
  ], "Bubble portrait");
4125
- let t = e.blink === void 0 ? void 0 : Ur(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : Ur(e.lipSync, "Bubble portrait lip-sync", 1), r, i, a;
4277
+ let t = e.blink === void 0 ? void 0 : gi(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : gi(e.lipSync, "Bubble portrait lip-sync", 1), r, i, a;
4126
4278
  try {
4127
- r = Nr(e.placement ?? "left"), i = e.offset === void 0 ? jr : Pr(e.offset), a = Fr(e.cornerRadius ?? 0);
4279
+ r = Lr(e.placement ?? "left"), i = e.offset === void 0 ? Fr : Rr(e.offset), a = zr(e.cornerRadius ?? 0);
4128
4280
  } catch (e) {
4129
4281
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble portrait layout is invalid.");
4130
4282
  }
4131
4283
  return Object.freeze({
4132
- base: Hr(e.base, "Bubble portrait base"),
4284
+ base: hi(e.base, "Bubble portrait base"),
4133
4285
  ...t === void 0 ? {} : { blink: t },
4134
4286
  ...n === void 0 ? {} : { lipSync: n },
4135
4287
  placement: r,
@@ -4137,9 +4289,9 @@ function Wr(e) {
4137
4289
  cornerRadius: a
4138
4290
  });
4139
4291
  }
4140
- function Gr(e, t) {
4292
+ function vi(e, t) {
4141
4293
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
4142
- if (Br(e, ["name"], [
4294
+ if (pi(e, ["name"], [
4143
4295
  "durationSeconds",
4144
4296
  "ease",
4145
4297
  "direction",
@@ -4147,7 +4299,7 @@ function Gr(e, t) {
4147
4299
  "relativeScale",
4148
4300
  "speed",
4149
4301
  "visualStyle"
4150
- ], t), !Rr.has(e.name)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
4302
+ ], t), !di.has(e.name)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
4151
4303
  let n = (n, r, i = !1) => {
4152
4304
  let a = e[n];
4153
4305
  if (a !== void 0) {
@@ -4157,7 +4309,7 @@ function Gr(e, t) {
4157
4309
  }, r = n("durationSeconds", 0), i = n("count", 1, !0), a = n("relativeScale", 0), o = n("speed", 0), s = e.direction;
4158
4310
  if (s !== void 0 && typeof s != "number" && typeof s != "string") throw new Q("BUBBLE-COMPOSITION-001", `${t}.direction is invalid.`);
4159
4311
  let c = e.ease ?? "easeInOut";
4160
- if (typeof c != "string" || !zr.has(c)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
4312
+ if (typeof c != "string" || !fi.has(c)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
4161
4313
  let l = e.visualStyle;
4162
4314
  if (l !== void 0 && (typeof l != "string" || !M.includes(l))) throw new Q("BUBBLE-COMPOSITION-001", `${t}.visualStyle is invalid.`);
4163
4315
  return Object.freeze({
@@ -4171,10 +4323,10 @@ function Gr(e, t) {
4171
4323
  ...l === void 0 ? {} : { visualStyle: l }
4172
4324
  });
4173
4325
  }
4174
- function Kr(e) {
4326
+ function yi(e) {
4175
4327
  if (e === void 0) return;
4176
4328
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble audio must be an object.");
4177
- Br(e, [], [
4329
+ pi(e, [], [
4178
4330
  "voice",
4179
4331
  "reveal",
4180
4332
  "finish"
@@ -4186,13 +4338,13 @@ function Kr(e) {
4186
4338
  "finish"
4187
4339
  ]) {
4188
4340
  let r = e[n];
4189
- r !== void 0 && (t[n] = Hr(r, `Bubble audio ${n}`));
4341
+ r !== void 0 && (t[n] = hi(r, `Bubble audio ${n}`));
4190
4342
  }
4191
4343
  return Object.freeze(t);
4192
4344
  }
4193
- function qr(e) {
4345
+ function bi(e) {
4194
4346
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style must be an object.");
4195
- Br(e, ["name", "textStyle"], [
4347
+ pi(e, ["name", "textStyle"], [
4196
4348
  "placement",
4197
4349
  "maxWidth",
4198
4350
  "textLocale",
@@ -4207,13 +4359,13 @@ function qr(e) {
4207
4359
  "showAnimation",
4208
4360
  "hideAnimation"
4209
4361
  ], "Bubble style");
4210
- let t = e.portrait === void 0 ? void 0 : Wr(e.portrait), n = e.continueIndicator === void 0 ? void 0 : Ur(e.continueIndicator, "Bubble continue indicator", 2), r;
4362
+ let t = e.portrait === void 0 ? void 0 : _i(e.portrait), n = e.continueIndicator === void 0 ? void 0 : gi(e.continueIndicator, "Bubble continue indicator", 2), r;
4211
4363
  if (e.reveal !== void 0) try {
4212
- r = Tr(e.reveal);
4364
+ r = kr(e.reveal);
4213
4365
  } catch (e) {
4214
4366
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4215
4367
  }
4216
- let i = Kr(e.audio), a = e.showAnimation === void 0 ? void 0 : Gr(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : Gr(e.hideAnimation, "Bubble hideAnimation"), s;
4368
+ let i = yi(e.audio), a = e.showAnimation === void 0 ? void 0 : vi(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : vi(e.hideAnimation, "Bubble hideAnimation"), s;
4217
4369
  try {
4218
4370
  s = y(e.placement ?? "up-right");
4219
4371
  } catch (e) {
@@ -4232,10 +4384,11 @@ function qr(e) {
4232
4384
  if (typeof e.maxWidth != "number" || !Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style maxWidth must be a positive finite number.");
4233
4385
  f = e.maxWidth;
4234
4386
  }
4235
- let p = e.textLocale === void 0 ? void 0 : Vr(e.textLocale, "Bubble style text locale");
4387
+ let p = e.textLocale === void 0 ? void 0 : mi(e.textLocale, "Bubble style text locale"), m = Zr(e);
4236
4388
  return Object.freeze({
4237
- name: Vr(e.name, "Bubble style name"),
4238
- textStyle: Vr(e.textStyle, "Bubble text style name"),
4389
+ name: mi(e.name, "Bubble style name"),
4390
+ textStyle: mi(e.textStyle, "Bubble text style name"),
4391
+ layoutProfile: m,
4239
4392
  ...f === void 0 ? {} : { maxWidth: f },
4240
4393
  ...p === void 0 ? {} : { textLocale: p },
4241
4394
  placement: s,
@@ -4251,13 +4404,13 @@ function qr(e) {
4251
4404
  ...o === void 0 ? {} : { hideAnimation: o }
4252
4405
  });
4253
4406
  }
4254
- function Jr(e) {
4407
+ function xi(e) {
4255
4408
  if (e !== void 0) {
4256
4409
  if (!$(e) || typeof e.applyToTarget != "function" || typeof e.getMimeType != "function" || typeof e.isRegistered != "function") throw TypeError("Bubble image capability must provide applyToTarget, getMimeType, and isRegistered.");
4257
4410
  return e;
4258
4411
  }
4259
4412
  }
4260
- function Yr(e) {
4413
+ function Si(e) {
4261
4414
  if (e !== void 0) {
4262
4415
  if (!$(e) || typeof e.playSound != "function") throw TypeError("Bubble audio capability must provide playSound.");
4263
4416
  if (e.isRegistered !== void 0 && typeof e.isRegistered != "function") throw TypeError("Bubble audio capability isRegistered must be a function.");
@@ -4265,67 +4418,71 @@ function Yr(e) {
4265
4418
  return e;
4266
4419
  }
4267
4420
  }
4268
- function Xr(e) {
4421
+ function Ci(e) {
4269
4422
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", "Bubble image assets require an image capability. Provide options.imageResolver.");
4270
4423
  return e;
4271
4424
  }
4272
- function Zr(e) {
4425
+ function wi(e) {
4273
4426
  if (!$(e) || typeof e.setText != "function" || typeof e.releaseTarget != "function") throw TypeError("Bubble text capability must provide setText and releaseTarget.");
4274
4427
  return e;
4275
4428
  }
4276
- function Qr() {
4429
+ function Ti() {
4277
4430
  return Object.freeze({
4278
4431
  setTimeout: (e, t) => globalThis.setTimeout(e, t),
4279
4432
  clearTimeout: (e) => globalThis.clearTimeout(e)
4280
4433
  });
4281
4434
  }
4282
- function $r(e) {
4435
+ function Ei(e) {
4283
4436
  if (!$(e) || typeof e.setTimeout != "function" || typeof e.clearTimeout != "function") throw TypeError("Bubble scheduler must provide setTimeout and clearTimeout.");
4284
4437
  return e;
4285
4438
  }
4286
- function ei(e, t) {
4439
+ function Di(e, t) {
4287
4440
  if (!$(e) || typeof e.id != "string" || e.id.length === 0 || typeof e.isStage != "boolean") throw new Q("BUBBLE-COMPOSITION-004", `${t} must provide id and isStage.`);
4288
4441
  return e;
4289
4442
  }
4290
- function ti(e) {
4443
+ function Oi(e) {
4291
4444
  if (typeof e != "object" || !e) throw new Q("BUBBLE-COMPOSITION-004", "Bubble text target must be a non-null object.");
4292
4445
  return e;
4293
4446
  }
4294
- function ni(e, t) {
4447
+ function ki(e, t) {
4295
4448
  if (!$(e) || !$(e.targets) || typeof e.setLayerVisible != "function" || typeof e.updateStyle != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Q("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
4296
4449
  let n = e.targets;
4297
- ti(n.text);
4450
+ Oi(n.text);
4298
4451
  let r = /* @__PURE__ */ new Set(), i = (e, t) => {
4299
4452
  let i = n[e];
4300
4453
  if (!t && i === void 0) return;
4301
- let a = ei(i, `Bubble surface ${e}`);
4454
+ let a = Di(i, `Bubble surface ${e}`);
4302
4455
  if (r.has(a.id)) throw new Q("BUBBLE-COMPOSITION-004", "Bubble image layers must use distinct target IDs.");
4303
4456
  r.add(a.id);
4304
4457
  };
4305
4458
  return i("portraitBase", t.portrait !== void 0), i("portraitBlink", t.portrait?.blink !== void 0), i("portraitLipSync", t.portrait?.lipSync !== void 0), i("continueIndicator", t.continueIndicator !== void 0), e;
4306
4459
  }
4307
- function ri(e, t) {
4460
+ function Ai(e, t) {
4308
4461
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble image capability is required for: ${t}. Provide options.imageResolver.`);
4309
4462
  if (!e.isRegistered(t)) throw new Q("BUBBLE-COMPOSITION-003", `Bubble image asset is not registered: ${t}`);
4310
4463
  if (!e.getMimeType(t).startsWith("image/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not an image: ${t}`);
4311
4464
  }
4312
- function ii(e, t) {
4465
+ function ji(e, t) {
4313
4466
  if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble audio assets require an audio capability: ${t}. Provide options.audio.`);
4314
4467
  if (e.isRegistered?.(t) === !1) throw new Q("BUBBLE-COMPOSITION-003", `Bubble audio asset is not registered: ${t}`);
4315
4468
  let n = e.getMimeType?.(t);
4316
4469
  if (n !== void 0 && !n.startsWith("audio/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not audio: ${t}`);
4317
4470
  }
4318
- function ai(e) {
4471
+ function Mi(e) {
4319
4472
  return [...e.portrait === void 0 ? [] : [
4320
4473
  e.portrait.base,
4321
4474
  ...e.portrait.blink?.frames ?? [],
4322
4475
  ...e.portrait.lipSync?.frames ?? []
4323
4476
  ], ...e.continueIndicator?.frames ?? []];
4324
4477
  }
4325
- function oi(e, t, n) {
4478
+ function Ni(e, t, n) {
4479
+ if (t.layoutProfile === "scratch-default") return ti(e, (e) => typeof n.measureText == "function" ? n.measureText({
4480
+ styleName: t.textStyle,
4481
+ text: e
4482
+ }) : NaN).text;
4326
4483
  if (t.maxWidth === void 0) return e;
4327
4484
  if (typeof n.measureText != "function") throw new Q("BUBBLE-COMPOSITION-007", "Bubble style maxWidth requires the text capability measureText method.");
4328
- return xr({
4485
+ return Tr({
4329
4486
  text: e,
4330
4487
  maxWidth: t.maxWidth,
4331
4488
  ...t.textLocale === void 0 ? {} : { locale: t.textLocale },
@@ -4335,11 +4492,11 @@ function oi(e, t, n) {
4335
4492
  }) ?? 0
4336
4493
  }).lines.map(({ text: e }) => e).join("\n");
4337
4494
  }
4338
- function si(e, t) {
4495
+ function Pi(e, t) {
4339
4496
  if (e.length === 1) throw e[0];
4340
4497
  if (e.length > 1) throw AggregateError(e, t);
4341
4498
  }
4342
- function ci(e) {
4499
+ function Fi(e) {
4343
4500
  let t = !1, n = 0, r = 0, i, a = Promise.resolve(), o = async (t) => {
4344
4501
  let n = e.animation.frames[t];
4345
4502
  n !== void 0 && await e.imageResolver.applyToTarget(n, e.target);
@@ -4374,40 +4531,40 @@ function ci(e) {
4374
4531
  }
4375
4532
  });
4376
4533
  }
4377
- function li(e) {
4534
+ function Ii(e) {
4378
4535
  if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Show bubble input must be an object.");
4379
- if (Br(e, [
4536
+ if (pi(e, [
4380
4537
  "actor",
4381
4538
  "actorKey",
4382
4539
  "kind",
4383
4540
  "text",
4384
4541
  "styleName"
4385
- ], ["animationMode", "reveal"], "Show bubble input"), !Ir.has(e.kind)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4542
+ ], ["animationMode", "reveal"], "Show bubble input"), !li.has(e.kind)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4386
4543
  if (typeof e.text != "string") throw new Q("BUBBLE-COMPOSITION-001", "Bubble text must be a string.");
4387
4544
  let t = e.animationMode ?? "talking";
4388
- if (!Lr.has(t)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4545
+ if (!ui.has(t)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4389
4546
  let n;
4390
4547
  if (e.reveal !== void 0) try {
4391
- n = Tr(e.reveal);
4548
+ n = kr(e.reveal);
4392
4549
  } catch (e) {
4393
4550
  throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4394
4551
  }
4395
4552
  return {
4396
4553
  actor: e.actor,
4397
- actorKey: Vr(e.actorKey, "Bubble actor key"),
4554
+ actorKey: mi(e.actorKey, "Bubble actor key"),
4398
4555
  kind: e.kind,
4399
4556
  text: e.text,
4400
- styleName: Vr(e.styleName, "Bubble style name"),
4557
+ styleName: mi(e.styleName, "Bubble style name"),
4401
4558
  animationMode: t,
4402
4559
  ...n === void 0 ? {} : { reveal: n }
4403
4560
  };
4404
4561
  }
4405
- function ui(e) {
4562
+ function Li(e) {
4406
4563
  if (!$(e)) throw TypeError("Bubble composition options must be an object.");
4407
- let t = Jr(e.imageResolver), n = Yr(e.audio), r = Zr(e.textCapability);
4564
+ let t = xi(e.imageResolver), n = Si(e.audio), r = wi(e.textCapability);
4408
4565
  if (typeof e.createSurface != "function") throw TypeError("Bubble composition createSurface must be a function.");
4409
4566
  if (e.onAnimationError !== void 0 && typeof e.onAnimationError != "function") throw TypeError("Bubble composition onAnimationError must be a function.");
4410
- let i = $r(e.scheduler ?? Qr()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
4567
+ let i = Ei(e.scheduler ?? Ti()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
4411
4568
  if (c) throw new Q("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
4412
4569
  }, u = async (e, t) => {
4413
4570
  let n = (s.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
@@ -4424,11 +4581,12 @@ function ui(e) {
4424
4581
  let u = c;
4425
4582
  s.reveal !== void 0 && (u = Object.freeze({
4426
4583
  ...c,
4584
+ layoutProfile: "custom",
4427
4585
  reveal: s.reveal
4428
4586
  }));
4429
4587
  let d = s.text, f = (e) => {
4430
- let n = new Set(ai(e)), r = n.size === 0 ? void 0 : Xr(t);
4431
- for (let e of n) ri(r, e);
4588
+ let n = new Set(Mi(e)), r = n.size === 0 ? void 0 : Ci(t);
4589
+ for (let e of n) Ai(r, e);
4432
4590
  return r;
4433
4591
  }, p = f(u);
4434
4592
  for (let e of [
@@ -4436,13 +4594,13 @@ function ui(e) {
4436
4594
  u.audio?.reveal,
4437
4595
  u.audio?.finish,
4438
4596
  u.reveal?.sound
4439
- ]) e !== void 0 && ii(n, e);
4597
+ ]) e !== void 0 && ji(n, e);
4440
4598
  let m = async (e, t = !1) => {
4441
4599
  e !== void 0 && n !== void 0 && await n.playSound(e, { untilDone: t });
4442
4600
  }, h = async (e, t, n) => {
4443
- let r = ai(e).length === 0 ? void 0 : Xr(t), i = [];
4601
+ let r = Mi(e).length === 0 ? void 0 : Ci(t), i = [];
4444
4602
  if (e.portrait) {
4445
- let t = Xr(r);
4603
+ let t = Ci(r);
4446
4604
  i.push(Promise.resolve(t.applyToTarget(e.portrait.base, n.targets.portraitBase)));
4447
4605
  let a = e.portrait.blink?.frames[0];
4448
4606
  a !== void 0 && i.push(Promise.resolve(t.applyToTarget(a, n.targets.portraitBlink)));
@@ -4451,64 +4609,74 @@ function ui(e) {
4451
4609
  }
4452
4610
  let a = e.continueIndicator?.frames[0];
4453
4611
  if (a !== void 0) {
4454
- let e = Xr(r);
4612
+ let e = Ci(r);
4455
4613
  i.push(Promise.resolve(e.applyToTarget(a, n.targets.continueIndicator)));
4456
4614
  }
4457
4615
  await Promise.all(i);
4458
4616
  }, g = (t, n, r) => {
4459
- x = t.portrait?.blink === void 0 ? void 0 : ci({
4617
+ x = t.portrait?.blink === void 0 ? void 0 : Fi({
4460
4618
  actorKey: s.actorKey,
4461
4619
  layer: "portraitBlink",
4462
4620
  animation: t.portrait.blink,
4463
4621
  target: r.targets.portraitBlink,
4464
- imageResolver: Xr(n),
4622
+ imageResolver: Ci(n),
4465
4623
  scheduler: i,
4466
4624
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4467
- }), S = t.portrait?.lipSync === void 0 ? void 0 : ci({
4625
+ }), S = t.portrait?.lipSync === void 0 ? void 0 : Fi({
4468
4626
  actorKey: s.actorKey,
4469
4627
  layer: "portraitLipSync",
4470
4628
  animation: t.portrait.lipSync,
4471
4629
  target: r.targets.portraitLipSync,
4472
- imageResolver: Xr(n),
4630
+ imageResolver: Ci(n),
4473
4631
  scheduler: i,
4474
4632
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4475
- }), C = t.continueIndicator === void 0 ? void 0 : ci({
4633
+ }), C = t.continueIndicator === void 0 ? void 0 : Fi({
4476
4634
  actorKey: s.actorKey,
4477
4635
  layer: "continueIndicator",
4478
4636
  animation: t.continueIndicator,
4479
4637
  target: r.targets.continueIndicator,
4480
- imageResolver: Xr(n),
4638
+ imageResolver: Ci(n),
4481
4639
  scheduler: i,
4482
4640
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4483
4641
  });
4484
4642
  }, _ = o.get(s.actorKey);
4485
4643
  _ && await _.close();
4486
- let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? Dr(s.text, w) : Object.freeze([s.text]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
4644
+ let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? jr(s.text, w) : Object.freeze([s.text]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
4487
4645
  try {
4488
- v = ni(await e.createSurface(Object.freeze({
4646
+ v = ki(await e.createSurface(Object.freeze({
4489
4647
  actor: s.actor,
4490
4648
  actorKey: s.actorKey,
4491
4649
  kind: s.kind,
4492
4650
  style: u
4493
4651
  })), u);
4494
- let t = oi(s.text, u, r);
4495
- w?.layout === "RESERVED" && (r.setText({
4496
- styleName: u.textStyle,
4497
- target: v.targets.text,
4498
- text: t
4499
- }), v.captureTextLayout?.()), r.setText({
4500
- styleName: u.textStyle,
4501
- target: v.targets.text,
4502
- text: oi(w ? Or(T, E) : s.text, u, r)
4503
- }), y = !0, await h(u, p, v), g(u, p, v);
4504
- let a = "idle", c = !1, l = Promise.resolve(), _ = async () => {
4505
- if (!v) return;
4506
- let e = w ? Or(T, E) : d;
4652
+ let t = async (e, t = u) => {
4653
+ if (t.layoutProfile === "scratch-default" && v?.renderScratchText) {
4654
+ let n = ti(e, (e) => typeof r.measureText == "function" ? r.measureText({
4655
+ styleName: t.textStyle,
4656
+ text: e
4657
+ }) : NaN);
4658
+ await v.renderScratchText(n);
4659
+ return;
4660
+ }
4661
+ v && (r.setText({
4662
+ styleName: t.textStyle,
4663
+ target: v.targets.text,
4664
+ text: Ni(e, t, r)
4665
+ }), y = !0);
4666
+ };
4667
+ if (w?.layout === "RESERVED") {
4668
+ let e = Ni(s.text, u, r);
4507
4669
  r.setText({
4508
4670
  styleName: u.textStyle,
4509
4671
  target: v.targets.text,
4510
- text: oi(e, u, r)
4511
- }), await v.show();
4672
+ text: e
4673
+ }), y = !0, v.captureTextLayout?.();
4674
+ }
4675
+ await t(w ? Mr(T, E) : s.text), await h(u, p, v), g(u, p, v);
4676
+ let a = "idle", c = !1, l = Promise.resolve(), _ = async () => {
4677
+ if (!v) return;
4678
+ let e = w ? Mr(T, E) : d;
4679
+ await t(e), await v.show();
4512
4680
  }, O = () => {
4513
4681
  ee += 1, D !== void 0 && i.clearTimeout(D), D = void 0;
4514
4682
  }, te = async () => !w || E >= T.length ? !1 : (E += 1, await _(), await m(w.sound ?? u.audio?.reveal), E >= T.length && O(), !0), k = () => {
@@ -4534,55 +4702,51 @@ function ui(e) {
4534
4702
  },
4535
4703
  setText(e) {
4536
4704
  return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : typeof e == "string" ? (l = l.then(async () => {
4537
- v && (O(), d = e, w ? (T = Dr(e, w), E = Math.min(1, T.length), w.layout === "RESERVED" && (r.setText({
4705
+ v && (O(), d = e, w ? (T = jr(e, w), E = Math.min(1, T.length), w.layout === "RESERVED" && (r.setText({
4538
4706
  styleName: u.textStyle,
4539
4707
  target: v.targets.text,
4540
- text: oi(e, u, r)
4541
- }), v.captureTextLayout?.()), await _(), k()) : await _());
4708
+ text: Ni(e, u, r)
4709
+ }), y = !0, v.captureTextLayout?.()), await _(), k()) : await _());
4542
4710
  }), l) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble text must be a string."));
4543
4711
  },
4544
4712
  updateStyle(e) {
4545
4713
  if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4546
- let t;
4714
+ let i;
4547
4715
  try {
4548
- t = qr(e);
4716
+ i = bi(e);
4549
4717
  } catch (e) {
4550
4718
  return Promise.reject(e);
4551
4719
  }
4552
4720
  return l = l.then(async () => {
4553
4721
  if (!v) return;
4554
- ni(v, t);
4555
- let e = f(t);
4722
+ ki(v, i);
4723
+ let e = f(i);
4556
4724
  for (let e of [
4557
- t.audio?.voice,
4558
- t.audio?.reveal,
4559
- t.audio?.finish,
4560
- t.reveal?.sound
4561
- ]) e !== void 0 && ii(n, e);
4725
+ i.audio?.voice,
4726
+ i.audio?.reveal,
4727
+ i.audio?.finish,
4728
+ i.reveal?.sound
4729
+ ]) e !== void 0 && ji(n, e);
4562
4730
  await Promise.all([
4563
4731
  x?.stop(),
4564
4732
  S?.stop(),
4565
4733
  C?.stop()
4566
- ]), await h(t, e, v), await v.updateStyle(t), u = t, w = t.reveal, T = w ? Dr(d, w) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, O(), w?.layout === "RESERVED" && (r.setText({
4567
- styleName: t.textStyle,
4568
- target: v.targets.text,
4569
- text: oi(d, t, r)
4570
- }), v.captureTextLayout?.()), r.setText({
4571
- styleName: t.textStyle,
4734
+ ]), await h(i, e, v), await v.updateStyle(i), u = i, w = i.reveal, T = w ? jr(d, w) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, O(), w?.layout === "RESERVED" && (r.setText({
4735
+ styleName: i.textStyle,
4572
4736
  target: v.targets.text,
4573
- text: oi(d, t, r)
4574
- }), g(t, e, v), await Promise.all([
4575
- v.setLayerVisible("portraitBase", t.portrait !== void 0),
4576
- v.setLayerVisible("portraitBlink", t.portrait?.blink !== void 0),
4737
+ text: Ni(d, i, r)
4738
+ }), y = !0, v.captureTextLayout?.()), await t(d, i), g(i, e, v), await Promise.all([
4739
+ v.setLayerVisible("portraitBase", i.portrait !== void 0),
4740
+ v.setLayerVisible("portraitBlink", i.portrait?.blink !== void 0),
4577
4741
  v.setLayerVisible("portraitLipSync", !1),
4578
4742
  v.setLayerVisible("continueIndicator", !1)
4579
4743
  ]);
4580
- let i = a;
4581
- a = "idle", await x?.start({ primed: !0 }), await A(i), await _(), k(), await m(u.audio?.voice);
4744
+ let o = a;
4745
+ a = "idle", await x?.start({ primed: !0 }), await A(o), await _(), k(), await m(u.audio?.voice);
4582
4746
  }), l;
4583
4747
  },
4584
4748
  setAnimationMode(e) {
4585
- return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : Lr.has(e) ? (l = l.then(() => A(e)), l) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4749
+ return c ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : ui.has(e) ? (l = l.then(() => A(e)), l) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4586
4750
  },
4587
4751
  revealNext() {
4588
4752
  if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
@@ -4600,14 +4764,14 @@ function ui(e) {
4600
4764
  if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4601
4765
  let t = e.timeoutSeconds ?? 0;
4602
4766
  return !Number.isFinite(t) || t < 0 ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish timeoutSeconds must be zero or greater.")) : e.condition !== void 0 && typeof e.condition != "function" ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish condition must be a function.")) : (l = l.then(async () => {
4603
- if (O(), e.unit !== void 0 && (w = Tr({
4767
+ if (O(), e.unit !== void 0 && (w = kr({
4604
4768
  ...w ?? {},
4605
4769
  unit: e.unit
4606
- }), T = Dr(d, w), E = Math.min(1, T.length), w.layout === "RESERVED" && v && (r.setText({
4770
+ }), T = jr(d, w), E = Math.min(1, T.length), w.layout === "RESERVED" && v && (r.setText({
4607
4771
  styleName: u.textStyle,
4608
4772
  target: v.targets.text,
4609
- text: oi(d, u, r)
4610
- }), v.captureTextLayout?.())), w) for (; await te(););
4773
+ text: Ni(d, u, r)
4774
+ }), y = !0, v.captureTextLayout?.())), w) for (; await te(););
4611
4775
  let n = e.condition;
4612
4776
  if (n === void 0 && t === 0) {
4613
4777
  await m(u.audio?.finish);
@@ -4638,22 +4802,25 @@ function ui(e) {
4638
4802
  },
4639
4803
  animate(e) {
4640
4804
  if (c) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4641
- let t;
4805
+ let n;
4642
4806
  try {
4643
- t = Gr(e, "Bubble motion");
4807
+ n = vi(e, "Bubble motion");
4644
4808
  } catch (e) {
4645
4809
  return Promise.reject(e);
4646
4810
  }
4647
4811
  return l = l.then(async () => {
4648
- if (t.name === "animateBubbleShape" && t.visualStyle) {
4812
+ if (n.name === "animateBubbleShape" && n.visualStyle) {
4649
4813
  let e = Object.freeze({
4650
4814
  ...u,
4651
- visualStyle: t.visualStyle
4815
+ layoutProfile: "custom"
4816
+ }), r = Object.freeze({
4817
+ ...e,
4818
+ visualStyle: n.visualStyle
4652
4819
  });
4653
- await v?.animate?.(t), u = e, await v?.updateStyle(u);
4820
+ u.layoutProfile === "scratch-default" && (await v?.updateStyle(e), await t(d, e), await v?.show()), await v?.animate?.(n), u = r, await v?.updateStyle(u);
4654
4821
  return;
4655
4822
  }
4656
- await v?.animate?.(t);
4823
+ await v?.animate?.(n);
4657
4824
  }), l;
4658
4825
  },
4659
4826
  async close() {
@@ -4683,7 +4850,7 @@ function ui(e) {
4683
4850
  } catch (t) {
4684
4851
  e.push(t);
4685
4852
  }
4686
- o.get(s.actorKey) === j && o.delete(s.actorKey), si(e, `Failed to close bubble: ${s.actorKey}`);
4853
+ o.get(s.actorKey) === j && o.delete(s.actorKey), Pi(e, `Failed to close bubble: ${s.actorKey}`);
4687
4854
  }
4688
4855
  });
4689
4856
  return o.set(s.actorKey, j), k(), u.showAnimation !== void 0 && await j.animate(u.showAnimation), j;
@@ -4715,34 +4882,34 @@ function ui(e) {
4715
4882
  return Object.freeze({
4716
4883
  defineStyle(e) {
4717
4884
  l();
4718
- let t = qr(e);
4885
+ let t = bi(e);
4719
4886
  a.set(t.name, t);
4720
4887
  },
4721
4888
  hasActiveBubble(e) {
4722
- return o.has(Vr(e, "Bubble actor key"));
4889
+ return o.has(mi(e, "Bubble actor key"));
4723
4890
  },
4724
4891
  async show(e) {
4725
4892
  l();
4726
- let t = li(e);
4893
+ let t = Ii(e);
4727
4894
  return u(t.actorKey, () => d(t));
4728
4895
  },
4729
4896
  releaseTarget(e) {
4730
4897
  l();
4731
- let t = Vr(e, "Bubble actor key");
4898
+ let t = mi(e, "Bubble actor key");
4732
4899
  return u(t, async () => {
4733
4900
  await o.get(t)?.close();
4734
4901
  });
4735
4902
  },
4736
4903
  async releaseAll() {
4737
- l(), await Promise.allSettled([...s.values()]), si((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
4904
+ l(), await Promise.allSettled([...s.values()]), Pi((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
4738
4905
  },
4739
4906
  async dispose() {
4740
4907
  if (c) return;
4741
4908
  c = !0, await Promise.allSettled([...s.values()]);
4742
4909
  let e = await Promise.allSettled([...o.values()].map((e) => e.close()));
4743
- a.clear(), si(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
4910
+ a.clear(), Pi(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
4744
4911
  }
4745
4912
  });
4746
4913
  }
4747
4914
  //#endregion
4748
- export { Q as BubbleCompositionError, mr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, be as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, kr as bubblePortraitPlacements, Sr as bubbleRevealUnits, M as bubbleVisualStyles, ui as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, Mr as defaultBubblePortraitCornerRadius, jr as defaultBubblePortraitOffset, Ar as defaultBubblePortraitPlacement, S as defaultBubbleTailLength, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, Fr as normalizeBubblePortraitCornerRadius, Pr as normalizeBubblePortraitOffset, Nr as normalizeBubblePortraitPlacement, Tr as normalizeBubbleReveal, E as normalizeBubbleTailLength, Se as renderBubbleSvg, Or as revealedBubbleText, Dr as splitBubbleText, xr as wrapText };
4915
+ export { Q as BubbleCompositionError, vr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, Te as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, Zr as bubbleLayoutProfileForStyleInput, Nr as bubblePortraitPlacements, Er as bubbleRevealUnits, M as bubbleVisualStyles, Li as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, Ir as defaultBubblePortraitCornerRadius, Fr as defaultBubblePortraitOffset, Pr as defaultBubblePortraitPlacement, S as defaultBubbleTailLength, $r as formatScratchBubbleArgument, Qr as isScratchDefaultBubbleStyleInput, ti as layoutScratchBubbleText, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, zr as normalizeBubblePortraitCornerRadius, Rr as normalizeBubblePortraitOffset, Lr as normalizeBubblePortraitPlacement, kr as normalizeBubbleReveal, E as normalizeBubbleTailLength, ri as positionScratchBubble, De as renderBubbleSvg, ci as renderScratchBubbleSvg, Mr as revealedBubbleText, Gr as scratchBubbleCornerRadius, qr as scratchBubbleFontSize, Jr as scratchBubbleLineHeight, Vr as scratchBubbleMaximumLineWidth, ni as scratchBubbleMetrics, Hr as scratchBubbleMinimumTextWidth, Wr as scratchBubblePadding, Ur as scratchBubbleStrokeWidth, Kr as scratchBubbleTailHeight, Br as scratchBubbleTextLimit, jr as splitBubbleText, Tr as wrapText };