@kubohiroya/turbowarp-bubble 0.2.0 → 0.3.1

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.
@@ -173,28 +173,28 @@ function b(e) {
173
173
  }
174
174
  //#endregion
175
175
  //#region src/actor-transform.ts
176
- var x = 12, S = 18, ee = Object.freeze({
176
+ var x = 12, S = 18, C = Object.freeze({
177
177
  x: 0,
178
178
  y: 0,
179
179
  scalePercent: 100
180
180
  });
181
- function C(e, t) {
181
+ function w(e, t) {
182
182
  if (typeof e != "number" || !Number.isFinite(e)) throw TypeError(`${t} must be a finite number.`);
183
183
  return e;
184
184
  }
185
- function w(e) {
186
- let t = C(e, "Bubble distance");
185
+ function T(e) {
186
+ let t = w(e, "Bubble distance");
187
187
  if (t < 0) throw TypeError("Bubble distance must be zero or greater.");
188
188
  return t;
189
189
  }
190
- function te(e) {
191
- let t = C(e, "Bubble tail length");
190
+ function E(e) {
191
+ let t = w(e, "Bubble tail length");
192
192
  if (t <= 0) throw TypeError("Bubble tail length must be greater than zero.");
193
193
  return t;
194
194
  }
195
- function T(e) {
195
+ function D(e) {
196
196
  if (!Array.isArray(e) || e.length !== 2 && e.length !== 3) throw TypeError("Bubble offset must be [x, y] or [x, y, scale].");
197
- let t = C(e[0], "Bubble offset x"), n = C(e[1], "Bubble offset y"), r = C(e.length === 3 ? e[2] : 100, "Bubble offset scale");
197
+ let t = w(e[0], "Bubble offset x"), n = w(e[1], "Bubble offset y"), r = w(e.length === 3 ? e[2] : 100, "Bubble offset scale");
198
198
  if (r <= 0) throw TypeError("Bubble offset scale must be greater than zero.");
199
199
  return Object.freeze({
200
200
  x: t,
@@ -202,7 +202,7 @@ function T(e) {
202
202
  scalePercent: r
203
203
  });
204
204
  }
205
- function ne(e) {
205
+ function ee(e) {
206
206
  let t = (e.bounds.left + e.bounds.right) / 2, n = (e.bounds.top + e.bounds.bottom) / 2, r = b(e.direction), i = e.distance + e.tailLength, a = r.x < 0 ? t - e.bounds.left + i + e.bubbleWidth / 2 : e.bounds.right - t + i + e.bubbleWidth / 2, o = r.y < 0 ? n - e.bounds.bottom + i + e.bubbleHeight / 2 : e.bounds.top - n + i + e.bubbleHeight / 2, s = Math.min(r.x === 0 ? Infinity : a / Math.abs(r.x), r.y === 0 ? Infinity : o / Math.abs(r.y));
207
207
  return Object.freeze({
208
208
  x: t + r.x * s + e.offset.x,
@@ -211,7 +211,7 @@ function ne(e) {
211
211
  }
212
212
  //#endregion
213
213
  //#region node_modules/.pnpm/jsclipper@https+++codeload.github.com+platener+jsclipper+tar.gz+56aed19845113e1939d8971c47233054659436b1/node_modules/jsclipper/jsclipper.js
214
- var re = /* @__PURE__ */ o(((e, t) => {
214
+ var O = /* @__PURE__ */ o(((e, t) => {
215
215
  (function() {
216
216
  var e = {}, n = !1;
217
217
  t !== void 0 && t.exports ? (t.exports = e, n = !0) : typeof document < "u" ? window.ClipperLib = e : self.ClipperLib = e;
@@ -277,7 +277,7 @@ var re = /* @__PURE__ */ o(((e, t) => {
277
277
  var t = l();
278
278
  return t.fromInt(e), t;
279
279
  }
280
- function ee(e, t) {
280
+ function C(e, t) {
281
281
  var n;
282
282
  if (t == 16) n = 4;
283
283
  else if (t == 8) n = 3;
@@ -300,10 +300,10 @@ var re = /* @__PURE__ */ o(((e, t) => {
300
300
  }
301
301
  n == 8 && e[0] & 128 && (this.s = -1, a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)), this.clamp(), i && c.ZERO.subTo(this, this);
302
302
  }
303
- function C() {
303
+ function w() {
304
304
  for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;) --this.t;
305
305
  }
306
- function w(e) {
306
+ function T(e) {
307
307
  if (this.s < 0) return "-" + this.negate().toString(e);
308
308
  var t;
309
309
  if (e == 16) t = 4;
@@ -316,14 +316,14 @@ var re = /* @__PURE__ */ o(((e, t) => {
316
316
  if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = v(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += v(r));
317
317
  return i ? a : "0";
318
318
  }
319
- function te() {
319
+ function E() {
320
320
  var e = l();
321
321
  return c.ZERO.subTo(this, e), e;
322
322
  }
323
- function T() {
323
+ function D() {
324
324
  return this.s < 0 ? this.negate() : this;
325
325
  }
326
- function ne(e) {
326
+ function ee(e) {
327
327
  var t = this.s - e.s;
328
328
  if (t != 0) return t;
329
329
  var n = this.t;
@@ -331,30 +331,30 @@ var re = /* @__PURE__ */ o(((e, t) => {
331
331
  for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
332
332
  return 0;
333
333
  }
334
- function re(e) {
334
+ function O(e) {
335
335
  var t = 1, n;
336
336
  return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
337
337
  }
338
- function ie() {
339
- return this.t <= 0 ? 0 : this.DB * (this.t - 1) + re(this[this.t - 1] ^ this.s & this.DM);
338
+ function te() {
339
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + O(this[this.t - 1] ^ this.s & this.DM);
340
340
  }
341
- function ae(e, t) {
341
+ function k(e, t) {
342
342
  var n;
343
343
  for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
344
344
  for (n = e - 1; n >= 0; --n) t[n] = 0;
345
345
  t.t = this.t + e, t.s = this.s;
346
346
  }
347
- function E(e, t) {
347
+ function A(e, t) {
348
348
  for (var n = e; n < this.t; ++n) t[n - e] = this[n];
349
349
  t.t = Math.max(this.t - e, 0), t.s = this.s;
350
350
  }
351
- function D(e, t) {
351
+ function j(e, t) {
352
352
  var n = e % this.DB, r = this.DB - n, i = (1 << r) - 1, a = Math.floor(e / this.DB), o = this.s << n & this.DM, s;
353
353
  for (s = this.t - 1; s >= 0; --s) t[s + a + 1] = this[s] >> r | o, o = (this[s] & i) << n;
354
354
  for (s = a - 1; s >= 0; --s) t[s] = 0;
355
355
  t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
356
356
  }
357
- function oe(e, t) {
357
+ function ne(e, t) {
358
358
  t.s = this.s;
359
359
  var n = Math.floor(e / this.DB);
360
360
  if (n >= this.t) {
@@ -366,7 +366,7 @@ var re = /* @__PURE__ */ o(((e, t) => {
366
366
  for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
367
367
  r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
368
368
  }
369
- function O(e, t) {
369
+ function M(e, t) {
370
370
  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;
371
371
  if (e.t < this.t) {
372
372
  for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -377,13 +377,13 @@ var re = /* @__PURE__ */ o(((e, t) => {
377
377
  }
378
378
  t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
379
379
  }
380
- function se(e, t) {
380
+ function re(e, t) {
381
381
  var n = this.abs(), r = e.abs(), i = n.t;
382
382
  for (t.t = i + r.t; --i >= 0;) t[i] = 0;
383
383
  for (i = 0; i < r.t; ++i) t[i + n.t] = n.am(0, r[i], t, i, 0, n.t);
384
384
  t.s = 0, t.clamp(), this.s != e.s && c.ZERO.subTo(t, t);
385
385
  }
386
- function ce(e) {
386
+ function ie(e) {
387
387
  for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
388
388
  for (n = 0; n < t.t - 1; ++n) {
389
389
  var r = t.am(n, t[n], e, 2 * n, 0, 1);
@@ -391,7 +391,7 @@ var re = /* @__PURE__ */ o(((e, t) => {
391
391
  }
392
392
  e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
393
393
  }
394
- function le(e, t, n) {
394
+ function ae(e, t, n) {
395
395
  var r = e.abs();
396
396
  if (!(r.t <= 0)) {
397
397
  var i = this.abs();
@@ -400,7 +400,7 @@ var re = /* @__PURE__ */ o(((e, t) => {
400
400
  return;
401
401
  }
402
402
  n ??= l();
403
- var a = l(), o = this.s, s = e.s, u = this.DB - re(r[r.t - 1]);
403
+ var a = l(), o = this.s, s = e.s, u = this.DB - O(r[r.t - 1]);
404
404
  u > 0 ? (r.lShiftTo(u, a), i.lShiftTo(u, n)) : (r.copyTo(a), i.copyTo(n));
405
405
  var d = a.t, f = a[d - 1];
406
406
  if (f != 0) {
@@ -414,48 +414,48 @@ var re = /* @__PURE__ */ o(((e, t) => {
414
414
  }
415
415
  }
416
416
  }
417
- function k(e) {
417
+ function N(e) {
418
418
  var t = l();
419
419
  return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(c.ZERO) > 0 && e.subTo(t, t), t;
420
420
  }
421
- function A(e) {
421
+ function P(e) {
422
422
  this.m = e;
423
423
  }
424
- function j(e) {
424
+ function F(e) {
425
425
  return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
426
426
  }
427
- function ue(e) {
427
+ function oe(e) {
428
428
  return e;
429
429
  }
430
- function de(e) {
430
+ function se(e) {
431
431
  e.divRemTo(this.m, null, e);
432
432
  }
433
- function fe(e, t, n) {
433
+ function ce(e, t, n) {
434
434
  e.multiplyTo(t, n), this.reduce(n);
435
435
  }
436
- function pe(e, t) {
436
+ function le(e, t) {
437
437
  e.squareTo(t), this.reduce(t);
438
438
  }
439
- A.prototype.convert = j, A.prototype.revert = ue, A.prototype.reduce = de, A.prototype.mulTo = fe, A.prototype.sqrTo = pe;
440
- function me() {
439
+ P.prototype.convert = F, P.prototype.revert = oe, P.prototype.reduce = se, P.prototype.mulTo = ce, P.prototype.sqrTo = le;
440
+ function ue() {
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 M(e) {
447
+ function I(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 he(e) {
450
+ function de(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 ge(e) {
454
+ function fe(e) {
455
455
  var t = l();
456
456
  return e.copyTo(t), this.reduce(t), t;
457
457
  }
458
- function _e(e) {
458
+ function pe(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,19 +463,19 @@ var re = /* @__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 ve(e, t) {
466
+ function me(e, t) {
467
467
  e.squareTo(t), this.reduce(t);
468
468
  }
469
- function ye(e, t, n) {
469
+ function he(e, t, n) {
470
470
  e.multiplyTo(t, n), this.reduce(n);
471
471
  }
472
- M.prototype.convert = he, M.prototype.revert = ge, M.prototype.reduce = _e, M.prototype.mulTo = ye, M.prototype.sqrTo = ve;
473
- function be() {
472
+ I.prototype.convert = de, I.prototype.revert = fe, I.prototype.reduce = pe, I.prototype.mulTo = he, I.prototype.sqrTo = me;
473
+ function ge() {
474
474
  return (this.t > 0 ? this[0] & 1 : this.s) == 0;
475
475
  }
476
- function xe(e, t) {
476
+ function _e(e, t) {
477
477
  if (e > 4294967295 || e < 1) return c.ONE;
478
- var n = l(), r = l(), i = t.convert(this), a = re(e) - 1;
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);
480
480
  else {
481
481
  var o = n;
@@ -483,16 +483,16 @@ var re = /* @__PURE__ */ o(((e, t) => {
483
483
  }
484
484
  return t.revert(n);
485
485
  }
486
- function Se(e, t) {
487
- var n = e < 256 || t.isEven() ? new A(t) : new M(t);
486
+ function ve(e, t) {
487
+ var n = e < 256 || t.isEven() ? new P(t) : new I(t);
488
488
  return this.exp(e, n);
489
489
  }
490
- c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = ee, c.prototype.clamp = C, c.prototype.dlShiftTo = ae, c.prototype.drShiftTo = E, c.prototype.lShiftTo = D, c.prototype.rShiftTo = oe, c.prototype.subTo = O, c.prototype.multiplyTo = se, c.prototype.squareTo = ce, c.prototype.divRemTo = le, c.prototype.invDigit = me, c.prototype.isEven = be, c.prototype.exp = xe, c.prototype.toString = w, c.prototype.negate = te, c.prototype.abs = T, c.prototype.compareTo = ne, c.prototype.bitLength = ie, c.prototype.mod = k, c.prototype.modPowInt = Se, c.ZERO = S(0), c.ONE = S(1);
491
- function Ce() {
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() {
492
492
  var e = l();
493
493
  return this.copyTo(e), e;
494
494
  }
495
- function we() {
495
+ function be() {
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 re = /* @__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 Te() {
503
+ function xe() {
504
504
  return this.t == 0 ? this.s : this[0] << 24 >> 24;
505
505
  }
506
- function Ee() {
506
+ function Se() {
507
507
  return this.t == 0 ? this.s : this[0] << 16 >> 16;
508
508
  }
509
- function De(e) {
509
+ function Ce(e) {
510
510
  return Math.floor(Math.LN2 * this.DB / Math.log(e));
511
511
  }
512
- function Oe() {
512
+ function we() {
513
513
  return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
514
514
  }
515
- function N(e) {
515
+ function L(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 P(e, t) {
521
+ function Te(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 re = /* @__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 ke(e, t, n) {
533
+ function Ee(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), Le, 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), 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);
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 Ae() {
542
+ function De() {
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 je(e) {
549
+ function Oe(e) {
550
550
  return this.compareTo(e) == 0;
551
551
  }
552
- function Me(e) {
552
+ function ke(e) {
553
553
  return this.compareTo(e) < 0 ? this : e;
554
554
  }
555
- function Ne(e) {
555
+ function Ae(e) {
556
556
  return this.compareTo(e) > 0 ? this : e;
557
557
  }
558
- function Pe(e, t, n) {
558
+ function je(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 re = /* @__PURE__ */ o(((e, t) => {
567
567
  }
568
568
  n.s = t(this.s, e.s), n.clamp();
569
569
  }
570
- function Fe(e, t) {
570
+ function Me(e, t) {
571
571
  return e & t;
572
572
  }
573
- function Ie(e) {
573
+ function Ne(e) {
574
574
  var t = l();
575
- return this.bitwiseTo(e, Fe, t), t;
575
+ return this.bitwiseTo(e, Me, t), t;
576
576
  }
577
- function Le(e, t) {
577
+ function Pe(e, t) {
578
578
  return e | t;
579
579
  }
580
- function Re(e) {
580
+ function Fe(e) {
581
581
  var t = l();
582
- return this.bitwiseTo(e, Le, t), t;
582
+ return this.bitwiseTo(e, Pe, t), t;
583
583
  }
584
- function ze(e, t) {
584
+ function Ie(e, t) {
585
585
  return e ^ t;
586
586
  }
587
- function F(e) {
587
+ function R(e) {
588
588
  var t = l();
589
- return this.bitwiseTo(e, ze, t), t;
589
+ return this.bitwiseTo(e, Ie, t), t;
590
590
  }
591
- function I(e, t) {
591
+ function z(e, t) {
592
592
  return e & ~t;
593
593
  }
594
- function Be(e) {
594
+ function Le(e) {
595
595
  var t = l();
596
- return this.bitwiseTo(e, I, t), t;
596
+ return this.bitwiseTo(e, z, t), t;
597
597
  }
598
- function Ve() {
598
+ function Re() {
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 He(e) {
602
+ function ze(e) {
603
603
  var t = l();
604
604
  return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
605
605
  }
606
- function Ue(e) {
606
+ function Be(e) {
607
607
  var t = l();
608
608
  return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
609
609
  }
610
- function We(e) {
610
+ function Ve(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 Ge() {
616
- for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + We(this[e]);
615
+ function He() {
616
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + Ve(this[e]);
617
617
  return this.s < 0 ? this.t * this.DB : -1;
618
618
  }
619
- function L(e) {
619
+ function B(e) {
620
620
  for (var t = 0; e != 0;) e &= e - 1, ++t;
621
621
  return t;
622
622
  }
623
- function Ke() {
624
- for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += L(this[n] ^ t);
623
+ function Ue() {
624
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += B(this[n] ^ t);
625
625
  return e;
626
626
  }
627
- function qe(e) {
627
+ function We(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 Je(e, t) {
631
+ function Ge(e, t) {
632
632
  var n = c.ONE.shiftLeft(e);
633
633
  return this.bitwiseTo(n, t, n), n;
634
634
  }
635
- function Ye(e) {
636
- return this.changeBit(e, Le);
635
+ function Ke(e) {
636
+ return this.changeBit(e, Pe);
637
637
  }
638
- function R(e) {
639
- return this.changeBit(e, I);
638
+ function V(e) {
639
+ return this.changeBit(e, z);
640
640
  }
641
- function Xe(e) {
642
- return this.changeBit(e, ze);
641
+ function qe(e) {
642
+ return this.changeBit(e, Ie);
643
643
  }
644
- function Ze(e, t) {
644
+ function Je(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 re = /* @__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 Qe(e) {
655
+ function Ye(e) {
656
656
  var t = l();
657
657
  return this.addTo(e, t), t;
658
658
  }
659
- function $e(e) {
659
+ function Xe(e) {
660
660
  var t = l();
661
661
  return this.subTo(e, t), t;
662
662
  }
663
- function et(e) {
663
+ function Ze(e) {
664
664
  var t = l();
665
665
  return this.multiplyTo(e, t), t;
666
666
  }
667
- function tt() {
667
+ function Qe() {
668
668
  var e = l();
669
669
  return this.squareTo(e), e;
670
670
  }
671
- function nt(e) {
671
+ function $e(e) {
672
672
  var t = l();
673
673
  return this.divRemTo(e, t, null), t;
674
674
  }
675
- function rt(e) {
675
+ function et(e) {
676
676
  var t = l();
677
677
  return this.divRemTo(e, null, t), t;
678
678
  }
679
- function it(e) {
679
+ function tt(e) {
680
680
  var t = l(), n = l();
681
681
  return this.divRemTo(e, t, n), [t, n];
682
682
  }
683
- function at(e) {
683
+ function nt(e) {
684
684
  this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
685
685
  }
686
- function ot(e, t) {
686
+ function rt(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 z() {}
693
- function st(e) {
692
+ function it() {}
693
+ function at(e) {
694
694
  return e;
695
695
  }
696
- function ct(e, t, n) {
696
+ function ot(e, t, n) {
697
697
  e.multiplyTo(t, n);
698
698
  }
699
- function lt(e, t) {
699
+ function st(e, t) {
700
700
  e.squareTo(t);
701
701
  }
702
- z.prototype.convert = st, z.prototype.revert = st, z.prototype.mulTo = ct, z.prototype.sqrTo = lt;
703
- function ut(e) {
704
- return this.exp(e, new z());
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());
705
705
  }
706
- function dt(e, t, n) {
706
+ function lt(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,47 +711,47 @@ var re = /* @__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 ft(e, t, n) {
714
+ function ut(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 pt(e) {
721
+ function dt(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 mt(e) {
724
+ function ft(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 ht(e) {
730
+ function pt(e) {
731
731
  return e;
732
732
  }
733
- function gt(e) {
733
+ function mt(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 _t(e, t) {
737
+ function ht(e, t) {
738
738
  e.squareTo(t), this.reduce(t);
739
739
  }
740
- function vt(e, t, n) {
740
+ function gt(e, t, n) {
741
741
  e.multiplyTo(t, n), this.reduce(n);
742
742
  }
743
- pt.prototype.convert = mt, pt.prototype.revert = ht, pt.prototype.reduce = gt, pt.prototype.mulTo = vt, pt.prototype.sqrTo = _t;
744
- function yt(e, t) {
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) {
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 A(t) : t.isEven() ? new pt(t) : new M(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 dt(t) : new I(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();
751
751
  for (a.sqrTo(o[1], d); s <= u;) o[s] = l(), a.mulTo(d, o[s - 2], o[s]), s += 2;
752
752
  }
753
753
  var f = e.t - 1, p, m = !0, h = l(), g;
754
- for (n = re(e[f]) - 1; f >= 0;) {
754
+ for (n = O(e[f]) - 1; f >= 0;) {
755
755
  for (n >= c ? p = e[f] >> n - c & u : (p = (e[f] & (1 << n + 1) - 1) << c - n, f > 0 && (p |= e[f - 1] >> this.DB + n - c)), s = r; !(p & 1);) p >>= 1, --s;
756
756
  if ((n -= s) < 0 && (n += this.DB, --f), m) o[p].copyTo(i), m = !1;
757
757
  else {
@@ -762,7 +762,7 @@ var re = /* @__PURE__ */ o(((e, t) => {
762
762
  }
763
763
  return a.revert(i);
764
764
  }
765
- function bt(e) {
765
+ function vt(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 re = /* @__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 xt(e) {
776
+ function yt(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 re = /* @__PURE__ */ o(((e, t) => {
782
782
  }
783
783
  return n;
784
784
  }
785
- function St(e) {
785
+ function bt(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 re = /* @__PURE__ */ o(((e, t) => {
796
796
  else return s;
797
797
  return s.signum() < 0 ? s.add(e) : s;
798
798
  }
799
- var B = [
799
+ var H = [
800
800
  2,
801
801
  3,
802
802
  5,
@@ -965,27 +965,27 @@ var re = /* @__PURE__ */ o(((e, t) => {
965
965
  983,
966
966
  991,
967
967
  997
968
- ], V = (1 << 26) / B[B.length - 1];
969
- function Ct(e) {
968
+ ], U = (1 << 26) / H[H.length - 1];
969
+ function xt(e) {
970
970
  var t, n = this.abs();
971
- if (n.t == 1 && n[0] <= B[B.length - 1]) {
972
- for (t = 0; t < B.length; ++t) if (n[0] == B[t]) return !0;
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;
973
973
  return !1;
974
974
  }
975
975
  if (n.isEven()) return !1;
976
- for (t = 1; t < B.length;) {
977
- for (var r = B[t], i = t + 1; i < B.length && r < V;) r *= B[i++];
978
- for (r = n.modInt(r); t < i;) if (r % B[t++] == 0) 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;
979
979
  }
980
980
  return n.millerRabin(e);
981
981
  }
982
- function wt(e) {
982
+ function St(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 > B.length && (e = B.length);
986
+ e = e + 1 >> 1, e > H.length && (e = H.length);
987
987
  for (var i = l(), a = 0; a < e; ++a) {
988
- i.fromInt(B[Math.floor(Math.random() * B.length)]);
988
+ i.fromInt(H[Math.floor(Math.random() * H.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 re = /* @__PURE__ */ o(((e, t) => {
994
994
  }
995
995
  return !0;
996
996
  }
997
- c.prototype.chunkSize = De, c.prototype.toRadix = N, c.prototype.fromRadix = P, c.prototype.fromNumber = ke, c.prototype.bitwiseTo = Pe, c.prototype.changeBit = Je, c.prototype.addTo = Ze, c.prototype.dMultiply = at, c.prototype.dAddOffset = ot, c.prototype.multiplyLowerTo = dt, c.prototype.multiplyUpperTo = ft, c.prototype.modInt = xt, c.prototype.millerRabin = wt, c.prototype.clone = Ce, c.prototype.intValue = we, c.prototype.byteValue = Te, c.prototype.shortValue = Ee, c.prototype.signum = Oe, c.prototype.toByteArray = Ae, c.prototype.equals = je, c.prototype.min = Me, c.prototype.max = Ne, c.prototype.and = Ie, c.prototype.or = Re, c.prototype.xor = F, c.prototype.andNot = Be, c.prototype.not = Ve, c.prototype.shiftLeft = He, c.prototype.shiftRight = Ue, c.prototype.getLowestSetBit = Ge, c.prototype.bitCount = Ke, c.prototype.testBit = qe, c.prototype.setBit = Ye, c.prototype.clearBit = R, c.prototype.flipBit = Xe, c.prototype.add = Qe, c.prototype.subtract = $e, c.prototype.multiply = et, c.prototype.divide = nt, c.prototype.remainder = rt, c.prototype.divideAndRemainder = it, c.prototype.modPow = yt, c.prototype.modInverse = St, c.prototype.pow = ut, c.prototype.gcd = bt, c.prototype.isProbablePrime = Ct, c.prototype.square = tt;
998
- var H = c;
999
- if (H.prototype.IsNegative = function() {
1000
- return this.compareTo(H.ZERO) == -1;
1001
- }, H.op_Equality = function(e, t) {
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) {
1002
1002
  return e.compareTo(t) == 0;
1003
- }, H.op_Inequality = function(e, t) {
1003
+ }, W.op_Inequality = function(e, t) {
1004
1004
  return e.compareTo(t) != 0;
1005
- }, H.op_GreaterThan = function(e, t) {
1005
+ }, W.op_GreaterThan = function(e, t) {
1006
1006
  return e.compareTo(t) > 0;
1007
- }, H.op_LessThan = function(e, t) {
1007
+ }, W.op_LessThan = function(e, t) {
1008
1008
  return e.compareTo(t) < 0;
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) {
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) {
1016
1016
  return e.divide(t);
1017
- }, H.prototype.ToDouble = function() {
1017
+ }, W.prototype.ToDouble = function() {
1018
1018
  return parseFloat(this.toString());
1019
- }, Tt === void 0) var Tt = function(e, t) {
1019
+ }, Ct === void 0) var Ct = 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 re = /* @__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
- }, Tt(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
1075
+ }, Ct(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 re = /* @__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 && 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);
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);
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 re = /* @__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 ? 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);
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);
1198
1198
  }, e.ClipperBase.SlopesEqual3 = function(t, n, r) {
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);
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);
1200
1200
  }, e.ClipperBase.SlopesEqual4 = function(t, n, r, i) {
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;
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;
1202
1202
  }, e.ClipperBase.SlopesEqual5 = function(t, n, r, i, a) {
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;
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;
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 re = /* @__PURE__ */ o(((e, t) => {
1878
1878
  }
1879
1879
  this.m_IntersectList.length = 0;
1880
1880
  };
1881
- var Et = function(e) {
1881
+ var wt = function(e) {
1882
1882
  return e < 0 ? Math.ceil(e - .5) : Math.round(e);
1883
- }, Dt = function(e) {
1883
+ }, Tt = function(e) {
1884
1884
  return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
1885
- }, Ot = function(e) {
1885
+ }, Et = function(e) {
1886
1886
  return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
1887
- }, kt = function(e) {
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 = Et : a.chromium ? e.Clipper.Round = Ot : a.safari ? e.Clipper.Round = kt : e.Clipper.Round = Dt, e.Clipper.TopX = function(t, n) {
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) {
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 re = /* @__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
- }, Tt(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2268
+ }, Ct(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
2269
2269
  ntAny: 0,
2270
2270
  ntOpen: 1,
2271
2271
  ntClosed: 2
@@ -2528,8 +2528,8 @@ var re = /* @__PURE__ */ o(((e, t) => {
2528
2528
  return n;
2529
2529
  };
2530
2530
  })();
2531
- })), ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2532
- var n = re(), r = 10 ** 5;
2531
+ })), te = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2532
+ var n = O(), r = 10 ** 5;
2533
2533
  function i(e) {
2534
2534
  return e.map(function(e) {
2535
2535
  return {
@@ -2714,16 +2714,16 @@ var re = /* @__PURE__ */ o(((e, t) => {
2714
2714
  Polygon: _,
2715
2715
  ClipperLib: n
2716
2716
  };
2717
- })))(), 1), ae = 18, E = Object.freeze({
2717
+ })))(), 1), k = 18, A = Object.freeze({
2718
2718
  x: 0,
2719
2719
  y: 0,
2720
2720
  scalePercent: 100
2721
2721
  });
2722
- function D(e) {
2722
+ function j(e) {
2723
2723
  if (typeof e != "number" || !Number.isFinite(e) || e <= 0) throw TypeError("Bubble tail length must be greater than zero.");
2724
2724
  return e;
2725
2725
  }
2726
- function oe(e) {
2726
+ function ne(e) {
2727
2727
  if (e.length !== 2 && e.length !== 3) throw TypeError("Bubble offset must be [x, y] or [x, y, scale].");
2728
2728
  let [t, n, r = 100] = e;
2729
2729
  if (![
@@ -2737,7 +2737,7 @@ function oe(e) {
2737
2737
  scalePercent: r
2738
2738
  });
2739
2739
  }
2740
- var O = Object.freeze([
2740
+ var M = Object.freeze([
2741
2741
  "NORMAL",
2742
2742
  "THINKING",
2743
2743
  "DREAMING",
@@ -2749,21 +2749,21 @@ var O = Object.freeze([
2749
2749
  "NARRATION",
2750
2750
  "NO_BUBBLE"
2751
2751
  ]);
2752
- function se(e) {
2752
+ function re(e) {
2753
2753
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
2754
2754
  }
2755
- function ce(e, t) {
2755
+ function ie(e, t) {
2756
2756
  let n = e ?? t;
2757
2757
  if (!Number.isFinite(n) || n <= 0) throw TypeError("Bubble SVG dimensions must be positive and finite.");
2758
2758
  return n;
2759
2759
  }
2760
- function le(e) {
2760
+ function ae(e) {
2761
2761
  if (e === null) return null;
2762
2762
  let t = e ?? 180;
2763
2763
  if (!Number.isFinite(t)) throw TypeError("tailDirection must be finite.");
2764
2764
  return (t % 360 + 360) % 360;
2765
2765
  }
2766
- function k(e, t, n = 18) {
2766
+ function N(e, t, n = 18) {
2767
2767
  let r = e - 24, i = t - 24;
2768
2768
  return [
2769
2769
  {
@@ -2794,24 +2794,24 @@ function k(e, t, n = 18) {
2794
2794
  };
2795
2795
  }));
2796
2796
  }
2797
- function A(e, t) {
2797
+ function P(e, t) {
2798
2798
  return e.x * t.y - e.y * t.x;
2799
2799
  }
2800
- function j(e, t) {
2800
+ function F(e, t) {
2801
2801
  return {
2802
2802
  x: e.x - t.x,
2803
2803
  y: e.y - t.y
2804
2804
  };
2805
2805
  }
2806
- function ue(e, t) {
2806
+ function oe(e, t) {
2807
2807
  return Math.hypot(e.x - t.x, e.y - t.y);
2808
2808
  }
2809
- function de(e, t, n, r) {
2809
+ function se(e, t, n, r) {
2810
2810
  let i = t, a = r;
2811
2811
  for (; a > 0;) {
2812
2812
  let t = (i + n + e.length) % e.length, r = e[i], o = e[t];
2813
2813
  if (!r || !o) throw Error("Bubble border path is invalid.");
2814
- let s = ue(r, o);
2814
+ let s = oe(r, o);
2815
2815
  if (a <= s) {
2816
2816
  let e = a / s;
2817
2817
  return {
@@ -2825,14 +2825,14 @@ function de(e, t, n, r) {
2825
2825
  if (!o) throw Error("Bubble border path is empty.");
2826
2826
  return o;
2827
2827
  }
2828
- function fe(e, t, n, r, i) {
2828
+ function ce(e, t, n, r, i) {
2829
2829
  let a;
2830
2830
  for (let r = 0; r < e.length; r += 1) {
2831
2831
  let i = e[r], o = e[(r + 1) % e.length];
2832
2832
  if (!i || !o) continue;
2833
- let s = j(o, i), c = A(n, s);
2833
+ let s = F(o, i), c = P(n, s);
2834
2834
  if (Math.abs(c) < 1e-9) continue;
2835
- let l = j(i, t), u = A(l, s) / c, d = A(l, n) / c;
2835
+ let l = F(i, t), u = P(l, s) / c, d = P(l, n) / c;
2836
2836
  u < 0 || d < -1e-9 || d > 1 + 1e-9 || a && u >= a.rayScale || (a = {
2837
2837
  edgeIndex: r,
2838
2838
  point: {
@@ -2850,61 +2850,61 @@ function fe(e, t, n, r, i) {
2850
2850
  ], s = a.edgeIndex + 1;
2851
2851
  return {
2852
2852
  borderPoint: a.point,
2853
- base: [de(o, s, -1, 9), de(o, s, 1, 9)],
2853
+ base: [se(o, s, -1, 9), se(o, s, 1, 9)],
2854
2854
  tip: {
2855
2855
  x: i?.x ?? t.x + n.x * (a.rayScale + r),
2856
2856
  y: i?.y ?? t.y + n.y * (a.rayScale + r)
2857
2857
  }
2858
2858
  };
2859
2859
  }
2860
- function pe(e) {
2860
+ function le(e) {
2861
2861
  let t = e * Math.PI / 180;
2862
2862
  return {
2863
2863
  x: Math.sin(t),
2864
2864
  y: -Math.cos(t)
2865
2865
  };
2866
2866
  }
2867
- function me(e, t, n, r) {
2867
+ function ue(e, t, n, r) {
2868
2868
  return {
2869
2869
  x: n.x + (e.x - t.x) * r,
2870
2870
  y: n.y + (e.y - t.y) * r
2871
2871
  };
2872
2872
  }
2873
- function M(e, t, n, r, i, a) {
2873
+ function I(e, t, n, r, i, a) {
2874
2874
  let o = {
2875
2875
  x: t / 2,
2876
2876
  y: n / 2
2877
- }, s = pe(r), c = fe(e, o, s, i), l = ue(o, c.borderPoint), u = a.scalePercent / 100, d = {
2877
+ }, s = le(r), c = ce(e, o, s, i), l = oe(o, c.borderPoint), u = a.scalePercent / 100, d = {
2878
2878
  x: o.x - s.x * l * (u - 1) + a.x,
2879
2879
  y: o.y - s.y * l * (u - 1) - a.y
2880
2880
  };
2881
2881
  return {
2882
- body: e.map((e) => me(e, o, d, u)),
2882
+ body: e.map((e) => ue(e, o, d, u)),
2883
2883
  bodyCenter: d,
2884
2884
  tip: c.tip
2885
2885
  };
2886
2886
  }
2887
- function he(e) {
2887
+ function de(e) {
2888
2888
  let t = e[0];
2889
2889
  if (!t) throw Error("Bubble polygon is empty.");
2890
2890
  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
2891
  }
2892
- function ge(e) {
2892
+ function fe(e) {
2893
2893
  return Math.abs(e.reduce((t, n, r) => {
2894
2894
  let i = e[(r + 1) % e.length];
2895
2895
  return i ? t + n.x * i.y - i.x * n.y : t;
2896
2896
  }, 0) / 2);
2897
2897
  }
2898
- function _e(e, t, n, r = "") {
2899
- return `<path d="${he(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2898
+ function pe(e, t, n, r = "") {
2899
+ return `<path d="${de(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
2900
2900
  }
2901
- function ve(e, t, n, r, i, a = "") {
2902
- let o = j(n, t), s = Math.hypot(o.x, o.y);
2901
+ function me(e, t, n, r, i, a = "") {
2902
+ let o = F(n, t), s = Math.hypot(o.x, o.y);
2903
2903
  if (!(s > 0)) throw TypeError("Bubble body center and tail tip must differ.");
2904
- let c = fe(e, t, {
2904
+ let c = ce(e, t, {
2905
2905
  x: o.x / s,
2906
2906
  y: o.y / s
2907
- }, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = ie.default.union([l(e)], [[l([
2907
+ }, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = te.default.union([l(e)], [[l([
2908
2908
  c.base[0],
2909
2909
  c.tip,
2910
2910
  c.base[1]
@@ -2913,11 +2913,11 @@ function ve(e, t, n, r, i, a = "") {
2913
2913
  let d = u.map((e) => e.map(([e, t]) => ({
2914
2914
  x: e,
2915
2915
  y: t
2916
- }))).sort((e, t) => ge(t) - ge(e))[0];
2916
+ }))).sort((e, t) => fe(t) - fe(e))[0];
2917
2917
  if (!d) throw Error("JSClipper returned an empty Bubble outline.");
2918
- 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}/>`;
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
2919
  }
2920
- function ye(e, t, n, r) {
2920
+ function he(e, t, n, r) {
2921
2921
  let i = e - 24, a = t - 24, o = e / 2, s = t / 2;
2922
2922
  return `<path d="M 42 ${s}
2923
2923
  C 22 ${s - 20}, 32 42, 60 44
@@ -2930,8 +2930,8 @@ function ye(e, t, n, r) {
2930
2930
  C 31 ${a + 2}, 17 ${s + 20}, 42 ${s} Z"
2931
2931
  fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
2932
2932
  }
2933
- function be(e, t, n, r, i, a) {
2934
- let o = j(n, t), s = Math.hypot(o.x, o.y), c = fe(e, t, {
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, {
2935
2935
  x: o.x / s,
2936
2936
  y: o.y / s
2937
2937
  }, 0, n), l = {
@@ -2959,7 +2959,7 @@ function be(e, t, n, r, i, a) {
2959
2959
  radius: 3.5
2960
2960
  }]).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
2961
  }
2962
- function xe(e, t) {
2962
+ function _e(e, t) {
2963
2963
  let n = e / 2, r = t / 2;
2964
2964
  return Array.from({ length: 28 }, (i, a) => {
2965
2965
  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 +2969,7 @@ function xe(e, t) {
2969
2969
  };
2970
2970
  });
2971
2971
  }
2972
- function Se(e, t) {
2972
+ function ve(e, t) {
2973
2973
  let n = e - 24, r = t - 24, i = Array.from({ length: 21 }, (e, t) => {
2974
2974
  let n = t / 20;
2975
2975
  return {
@@ -3002,59 +3002,61 @@ function Se(e, t) {
3002
3002
  }))
3003
3003
  ];
3004
3004
  }
3005
- function Ce(e, t, n) {
3006
- return e === "YELLING" ? xe(t, n) : e === "WAVY" ? Se(t, n) : k(t, n);
3005
+ function ye(e, t, n) {
3006
+ return e === "YELLING" ? _e(t, n) : e === "WAVY" ? ve(t, n) : N(t, n);
3007
3007
  }
3008
- function we(e) {
3009
- let t = ce(e.width, 220), n = ce(e.height, 112), r = le(e.tailDirection);
3008
+ function be(e) {
3009
+ let t = ie(e.width, 220), n = ie(e.height, 112), r = ae(e.tailDirection);
3010
3010
  if (r === null) throw TypeError("Bubble body center offset requires a tail direction.");
3011
- let i = D(e.tailLength ?? ae), a = oe(e.offset), o = {
3011
+ let i = j(e.tailLength ?? k), a = ne(e.offset), o = {
3012
3012
  x: t / 2,
3013
3013
  y: n / 2
3014
- }, s = M(Ce(e.style, t, n), t, n, r, i, a);
3014
+ }, s = I(ye(e.style, t, n), t, n, r, i, a);
3015
3015
  return Object.freeze({
3016
3016
  x: s.bodyCenter.x - o.x,
3017
3017
  y: s.bodyCenter.y - o.y
3018
3018
  });
3019
3019
  }
3020
- function Te(e, t, n, r, i, a, o, s) {
3021
- let c = k(t, n), l = (e) => r === null ? e : M(e, t, n, r, o, s).body, u = (e, c = "") => {
3022
- if (r === null) return _e(e, i, a, c);
3023
- let l = M(e, t, n, r, o, s);
3024
- return ve(l.body, l.bodyCenter, l.tip, i, a, c);
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);
3025
3025
  };
3026
3026
  switch (e) {
3027
3027
  case "NO_BUBBLE": return "";
3028
3028
  case "THINKING":
3029
3029
  case "DREAMING": {
3030
- if (r === null) return ye(t, n, i, a);
3031
- let l = M(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
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 = {
3032
3032
  x: t / 2,
3033
3033
  y: n / 2
3034
3034
  }, f = l.bodyCenter.x - d.x * u, p = l.bodyCenter.y - d.y * u;
3035
- return `${be(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${ye(t, n, i, a)}</g>`;
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>`;
3036
3036
  }
3037
- case "YELLING": return u(xe(t, n));
3038
- case "WAVY": return u(Se(t, n));
3037
+ case "YELLING": return u(_e(t, n));
3038
+ case "WAVY": return u(ve(t, n));
3039
3039
  case "WHISPERING": return u(c, "stroke-dasharray=\"5 5\"");
3040
3040
  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 _e(l(c), i, a);
3041
+ case "NARRATION": return pe(l(c), i, a);
3042
3042
  case "OFF_PANEL": return u(c);
3043
3043
  case "NORMAL": return u(c);
3044
3044
  }
3045
3045
  }
3046
- function Ee(e) {
3047
- if (!O.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
3046
+ function Se(e) {
3047
+ if (!M.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
3048
3048
  if (!Array.isArray(e.lines) || e.lines.some((e) => typeof e != "string")) throw TypeError("lines must be an array of strings.");
3049
- let t = ce(e.width, 220), n = ce(e.height, 112), r = ce(e.fontSize, 15), i = le(e.tailDirection), a = D(e.tailLength ?? ae), o = e.offset === void 0 ? E : oe(e.offset), s = e.fillColor ?? "#fff4cc", c = e.borderColor ?? "#6f5b45", l = e.textColor ?? "#25283a", u = e.fontFamily ?? "Noto Sans JP, sans-serif", d = r * 1.35, f = n / 2 - (e.lines.length - 1) * d / 2 + r * .35, p = i === null ? 1 : o.scalePercent / 100, m = i === null ? {
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;
3050
+ 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 ? {
3050
3052
  x: t / 2,
3051
3053
  y: n / 2
3052
- } : M(k(t, n), t, n, i, a, o).bodyCenter, h = e.lines.map((e, t) => `<text x="${m.x}" y="${m.y + (f + t * d - n / 2) * p}" text-anchor="middle" fill="${se(l)}" font-family="${se(u)}" font-size="${r * p}">${se(e)}</text>`).join(""), g = se(e.title ?? `${e.style} bubble`);
3053
- 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}"><title>${g}</title>${Te(e.style, t, n, i, s, c, a, o)}${h}</svg>`;
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>`;
3054
3056
  }
3055
3057
  //#endregion
3056
3058
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/constants.js
3057
- var De = 2048, Oe = 2112, N = Uint8Array, P = Uint16Array, ke = Int32Array, Ae = new N([
3059
+ var Ce = 2048, we = 2112, L = Uint8Array, Te = Uint16Array, Ee = Int32Array, De = new L([
3058
3060
  0,
3059
3061
  0,
3060
3062
  0,
@@ -3087,7 +3089,7 @@ var De = 2048, Oe = 2112, N = Uint8Array, P = Uint16Array, ke = Int32Array, Ae =
3087
3089
  0,
3088
3090
  0,
3089
3091
  0
3090
- ]), je = new N([
3092
+ ]), Oe = new L([
3091
3093
  0,
3092
3094
  0,
3093
3095
  0,
@@ -3120,7 +3122,7 @@ var De = 2048, Oe = 2112, N = Uint8Array, P = Uint16Array, ke = Int32Array, Ae =
3120
3122
  13,
3121
3123
  0,
3122
3124
  0
3123
- ]), Me = new N([
3125
+ ]), ke = new L([
3124
3126
  16,
3125
3127
  17,
3126
3128
  18,
@@ -3140,51 +3142,51 @@ var De = 2048, Oe = 2112, N = Uint8Array, P = Uint16Array, ke = Int32Array, Ae =
3140
3142
  14,
3141
3143
  1,
3142
3144
  15
3143
- ]), Ne = function(e, t) {
3144
- for (var n = new P(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
3145
- for (var i = new ke(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
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;
3146
3148
  return {
3147
3149
  b: n,
3148
3150
  r: i
3149
3151
  };
3150
- }, Pe = Ne(Ae, 2), Fe = Pe.b, Ie = Pe.r;
3151
- Fe[28] = 258, Ie[258] = 28;
3152
- var Le = Ne(je, 0), Re = Le.b;
3153
- Le.r;
3154
- for (var ze = new P(32768), F = 0; F < 32768; ++F) {
3155
- var I = (F & 43690) >> 1 | (F & 21845) << 1;
3156
- I = (I & 52428) >> 2 | (I & 13107) << 2, I = (I & 61680) >> 4 | (I & 3855) << 4, ze[F] = ((I & 65280) >> 8 | (I & 255) << 8) >> 1;
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;
3157
3159
  }
3158
- for (var Be = (function(e, t, n) {
3159
- for (var r = e.length, i = 0, a = new P(t); i < r; ++i) e[i] && ++a[e[i] - 1];
3160
- var o = new P(t);
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);
3161
3163
  for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
3162
3164
  var s;
3163
3165
  if (n) {
3164
- s = new P(1 << t);
3166
+ s = new Te(1 << t);
3165
3167
  var c = 15 - t;
3166
- 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[ze[d] >> c] = l;
3167
- } else for (s = new P(r), i = 0; i < r; ++i) e[i] && (s[i] = ze[o[e[i] - 1]++] >> 15 - e[i]);
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]);
3168
3170
  return s;
3169
- }), Ve = new N(288), F = 0; F < 144; ++F) Ve[F] = 8;
3170
- for (var F = 144; F < 256; ++F) Ve[F] = 9;
3171
- for (var F = 256; F < 280; ++F) Ve[F] = 7;
3172
- for (var F = 280; F < 288; ++F) Ve[F] = 8;
3173
- for (var He = new N(32), F = 0; F < 32; ++F) He[F] = 5;
3174
- var Ue = /*#__PURE__*/ Be(Ve, 9, 1), We = /*#__PURE__*/ Be(He, 5, 1), Ge = function(e) {
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) {
3175
3177
  for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
3176
3178
  return t;
3177
- }, L = function(e, t, n) {
3179
+ }, B = function(e, t, n) {
3178
3180
  var r = t / 8 | 0;
3179
3181
  return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
3180
- }, Ke = function(e, t) {
3182
+ }, Ue = function(e, t) {
3181
3183
  var n = t / 8 | 0;
3182
3184
  return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
3183
- }, qe = function(e) {
3185
+ }, We = function(e) {
3184
3186
  return (e + 7) / 8 | 0;
3185
- }, Je = function(e, t, n) {
3186
- return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new N(e.subarray(t, n));
3187
- }, Ye = [
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 = [
3188
3190
  "unexpected EOF",
3189
3191
  "invalid block type",
3190
3192
  "invalid length/literal",
@@ -3199,121 +3201,121 @@ var Ue = /*#__PURE__*/ Be(Ve, 9, 1), We = /*#__PURE__*/ Be(He, 5, 1), Ge = funct
3199
3201
  "filename too long",
3200
3202
  "stream finishing",
3201
3203
  "invalid zip data"
3202
- ], R = function(e, t, n) {
3203
- var r = Error(t || Ye[e]);
3204
- if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, R), !n) throw r;
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;
3205
3207
  return r;
3206
- }, Xe = function(e, t, n, r) {
3208
+ }, qe = function(e, t, n, r) {
3207
3209
  var i = e.length, a = r ? r.length : 0;
3208
- if (!i || t.f && !t.l) return n || new N(0);
3210
+ if (!i || t.f && !t.l) return n || new L(0);
3209
3211
  var o = !n, s = o || t.i != 2, c = t.i;
3210
- o && (n = new N(i * 3));
3212
+ o && (n = new L(i * 3));
3211
3213
  var l = function(e) {
3212
3214
  var t = n.length;
3213
3215
  if (e > t) {
3214
- var r = new N(Math.max(t * 2, e));
3216
+ var r = new L(Math.max(t * 2, e));
3215
3217
  r.set(n), n = r;
3216
3218
  }
3217
3219
  }, 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;
3218
3220
  do {
3219
3221
  if (!p) {
3220
- u = L(e, d, 1);
3221
- var v = L(e, d + 1, 3);
3222
+ u = B(e, d, 1);
3223
+ var v = B(e, d + 1, 3);
3222
3224
  if (d += 3, !v) {
3223
- var y = qe(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3225
+ var y = We(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
3224
3226
  if (x > i) {
3225
- c && R(0);
3227
+ c && V(0);
3226
3228
  break;
3227
3229
  }
3228
3230
  s && l(f + b), n.set(e.subarray(y, x), f), t.b = f += b, t.p = d = x * 8, t.f = u;
3229
3231
  continue;
3230
3232
  }
3231
- if (v == 1) p = Ue, m = We, h = 9, g = 5;
3233
+ if (v == 1) p = Be, m = Ve, h = 9, g = 5;
3232
3234
  else if (v == 2) {
3233
- var S = L(e, d, 31) + 257, ee = L(e, d + 10, 15) + 4, C = S + L(e, d + 5, 31) + 1;
3235
+ var S = B(e, d, 31) + 257, C = B(e, d + 10, 15) + 4, w = S + B(e, d + 5, 31) + 1;
3234
3236
  d += 14;
3235
- for (var w = new N(C), te = new N(19), T = 0; T < ee; ++T) te[Me[T]] = L(e, d + T * 3, 7);
3236
- d += ee * 3;
3237
- for (var ne = Ge(te), re = (1 << ne) - 1, ie = Be(te, ne, 1), T = 0; T < C;) {
3238
- var ae = ie[L(e, d, re)];
3239
- d += ae & 15;
3240
- var y = ae >> 4;
3241
- if (y < 16) w[T++] = y;
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);
3238
+ 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)];
3241
+ d += k & 15;
3242
+ var y = k >> 4;
3243
+ if (y < 16) T[D++] = y;
3242
3244
  else {
3243
- var E = 0, D = 0;
3244
- for (y == 16 ? (D = 3 + L(e, d, 3), d += 2, E = w[T - 1]) : y == 17 ? (D = 3 + L(e, d, 7), d += 3) : y == 18 && (D = 11 + L(e, d, 127), d += 7); D--;) w[T++] = E;
3245
+ 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;
3245
3247
  }
3246
3248
  }
3247
- var oe = w.subarray(0, S), O = w.subarray(S);
3248
- h = Ge(oe), g = Ge(O), p = Be(oe, h, 1), m = Be(O, g, 1);
3249
- } else R(1);
3249
+ 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);
3250
3252
  if (d > _) {
3251
- c && R(0);
3253
+ c && V(0);
3252
3254
  break;
3253
3255
  }
3254
3256
  }
3255
3257
  s && l(f + 131072);
3256
- for (var se = (1 << h) - 1, ce = (1 << g) - 1, le = d;; le = d) {
3257
- var E = p[Ke(e, d) & se], k = E >> 4;
3258
- if (d += E & 15, d > _) {
3259
- c && R(0);
3258
+ 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;
3260
+ if (d += A & 15, d > _) {
3261
+ c && V(0);
3260
3262
  break;
3261
3263
  }
3262
- if (E || R(2), k < 256) n[f++] = k;
3263
- else if (k == 256) {
3264
- le = d, p = null;
3264
+ if (A || V(2), N < 256) n[f++] = N;
3265
+ else if (N == 256) {
3266
+ ae = d, p = null;
3265
3267
  break;
3266
3268
  } else {
3267
- var A = k - 254;
3268
- if (k > 264) {
3269
- var T = k - 257, j = Ae[T];
3270
- A = L(e, d, (1 << j) - 1) + Fe[T], d += j;
3269
+ var P = N - 254;
3270
+ if (N > 264) {
3271
+ var D = N - 257, F = De[D];
3272
+ P = B(e, d, (1 << F) - 1) + Me[D], d += F;
3271
3273
  }
3272
- var ue = m[Ke(e, d) & ce], de = ue >> 4;
3273
- ue || R(3), d += ue & 15;
3274
- var O = Re[de];
3275
- if (de > 3) {
3276
- var j = je[de];
3277
- O += Ke(e, d) & (1 << j) - 1, d += j;
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;
3278
3280
  }
3279
3281
  if (d > _) {
3280
- c && R(0);
3282
+ c && V(0);
3281
3283
  break;
3282
3284
  }
3283
3285
  s && l(f + 131072);
3284
- var fe = f + A;
3285
- if (f < O) {
3286
- var pe = a - O, me = Math.min(O, fe);
3287
- for (pe + f < 0 && R(3); f < me; ++f) n[f] = r[pe + f];
3286
+ var ce = f + P;
3287
+ 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];
3288
3290
  }
3289
- for (; f < fe; ++f) n[f] = n[f - O];
3291
+ for (; f < ce; ++f) n[f] = n[f - M];
3290
3292
  }
3291
3293
  }
3292
- t.l = p, t.p = le, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
3294
+ t.l = p, t.p = ae, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
3293
3295
  } while (!u);
3294
- return f != n.length && o ? Je(n, 0, f) : n.subarray(0, f);
3295
- }, Ze = /*#__PURE__*/ new N(0), Qe = function(e) {
3296
- (e[0] != 31 || e[1] != 139 || e[2] != 8) && R(6, "invalid gzip data");
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");
3297
3299
  var t = e[3], n = 10;
3298
3300
  t & 4 && (n += (e[10] | e[11] << 8) + 2);
3299
3301
  for (var r = (t >> 3 & 1) + (t >> 4 & 1); r > 0; r -= !e[n++]);
3300
3302
  return n + (t & 2);
3301
- }, $e = function(e) {
3303
+ }, Xe = function(e) {
3302
3304
  var t = e.length;
3303
3305
  return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
3304
3306
  };
3305
- function et(e, t) {
3306
- var n = Qe(e);
3307
- return n + 8 > e.length && R(6, "invalid gzip data"), Xe(e.subarray(n, -8), { i: 2 }, t && t.out || new N($e(e)), t && t.dictionary);
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);
3308
3310
  }
3309
- var tt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3311
+ var Qe = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
3310
3312
  try {
3311
- tt.decode(Ze, { stream: !0 });
3313
+ Qe.decode(Je, { stream: !0 });
3312
3314
  } catch {}
3313
3315
  //#endregion
3314
3316
  //#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/swap.js
3315
- var nt = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3316
- function rt(e) {
3317
+ var $e = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
3318
+ function et(e) {
3317
3319
  let t = e.length;
3318
3320
  for (let n = 0; n < t; n += 4) [e[n], e[n + 1], e[n + 2], e[n + 3]] = [
3319
3321
  e[n + 3],
@@ -3322,15 +3324,15 @@ function rt(e) {
3322
3324
  e[n]
3323
3325
  ];
3324
3326
  }
3325
- function it(e) {}
3326
- var at = nt ? rt : it, ot = new TextDecoder(), z = class e {
3327
+ function tt(e) {}
3328
+ var nt = $e ? et : tt, rt = new TextDecoder(), it = class e {
3327
3329
  constructor(e) {
3328
3330
  if (e instanceof Uint8Array) {
3329
3331
  let t = 0, n = new DataView(e.buffer);
3330
3332
  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.");
3331
3333
  if (t = n.getUint32(12, !0), 16 + t > e.byteLength) throw RangeError("Invalid input length");
3332
3334
  let r = e.subarray(16 + t);
3333
- this.values = r.length ? JSON.parse(ot.decode(et(r))) : [], e = et(e.subarray(16, 16 + t)), at(e), this.data = new Int32Array(e.buffer);
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);
3334
3336
  } else ({data: this.data, highStart: this.highStart, errorValue: this.errorValue, values: this.values = []} = e);
3335
3337
  }
3336
3338
  static fromBase64(t) {
@@ -3343,10 +3345,10 @@ var at = nt ? rt : it, ot = new TextDecoder(), z = class e {
3343
3345
  let n = (this.data[e >> 5] << 2) + (e & 31);
3344
3346
  t = this.data[n];
3345
3347
  } else if (e <= 65535) {
3346
- let n = (this.data[De + (e - 55296 >> 5)] << 2) + (e & 31);
3348
+ let n = (this.data[Ce + (e - 55296 >> 5)] << 2) + (e & 31);
3347
3349
  t = this.data[n];
3348
3350
  } else if (e < this.highStart) {
3349
- let n = this.data[Oe - 32 + (e >> 11)];
3351
+ let n = this.data[we - 32 + (e >> 11)];
3350
3352
  n = this.data[n + (e >> 5 & 63)], n = (n << 2) + (e & 31), t = this.data[n];
3351
3353
  } else t = this.data[this.data.length - 4];
3352
3354
  return t;
@@ -3355,26 +3357,26 @@ var at = nt ? rt : it, ot = new TextDecoder(), z = class e {
3355
3357
  let t = this.get(e);
3356
3358
  return this.values[t] ?? t;
3357
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.values.map((e, t) => [e, t])), { values: lt } = st, { AI: ut, AL: dt, CJ: ft, CM: pt, NS: mt, SA: ht, SG: gt, SP: _t, XX: vt } = ct;
3359
- function yt(e) {
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 a8Er4C2wDnwEumzRanUDPUFv0B8MBgeAL4BDwNfAN8C3wIngO+A0cCZowd/nwrwA/Eic/wzm\n L8EMHM+HuRDcDP4g7t8Hk3hYmI8BCv+TwvwLTOZvglfBawKyQ7wrjv8Ns1OXVqsroPNuwuwJ\n szfoL86JwTgeIp3HYJj0vhE4Hg3GgnHgZMDhnYDjyWCqZP9CHM8Gc8S1y2BeBa4FvweLxPN3\n wVwq7Dwirp0KVuB4NVgLXgSvg/fA+6C1Jf6gO+gF+oI9wQa3YQ4FwwDlwREwR4Mj+L6GY3Dv\n eMN9OY7JPAV2Jwn7Z8E8F0wHs8AcMA9cA64Dt4I7wT3gQfA4eAI8DdaKd7wizLdgvg86dUWa\n g+1BL0D3+sIcAAaLc5X9xfUDYR4EDlUYJR2PAUeCY8FJ4DRwJjgXTAezwBwwD1wDrgO3gjuF\n G/fAfBA8Js5XwnwaPF/htypeFfbfhvm+w7OdtkL6Axe3thP2uSzuhPM+YICA6tZ9YA4FwwGV\n 55F0XTBGOlY5GhwHxoOJYAqYBn4AfiyOLwVXgvnSc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ESSK7wecCscDJSxRXMbBAlfLCyIbTh\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) {
3360
3362
  switch (e) {
3361
3363
  case null: return null;
3362
3364
  case -1: return "sot";
3363
3365
  case -2: return "eot";
3364
- default: return lt[e];
3366
+ default: return st[e];
3365
3367
  }
3366
3368
  }
3367
- function bt(e, t) {
3369
+ function vt(e, t) {
3368
3370
  switch (e) {
3369
- case ut:
3370
- case gt:
3371
- case vt: return dt;
3372
- case ht: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? pt : dt;
3373
- case ft: return mt;
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;
3374
3376
  }
3375
3377
  return e;
3376
3378
  }
3377
- var xt = class {
3379
+ var yt = class {
3378
3380
  cp = -Infinity;
3379
3381
  cls = -1;
3380
3382
  char = "";
@@ -3384,15 +3386,15 @@ var xt = class {
3384
3386
  this.cls = e, this.cp = t, this.char = n, this.len = r;
3385
3387
  }
3386
3388
  [Symbol.for("nodejs.util.inspect.custom")](e, t, n) {
3387
- return `${yt(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3389
+ return `${_t(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
3388
3390
  }
3389
- }, St = class {
3391
+ }, bt = class {
3390
3392
  str = "";
3391
3393
  len = 0;
3392
3394
  prevChunk = 0;
3393
- prev = new xt(-1, -Infinity, "", 0);
3394
- cur = new xt(-1, -Infinity, "", 0);
3395
- next = new xt(-1, -Infinity, "", 0);
3395
+ prev = new yt(-1, -Infinity, "", 0);
3396
+ cur = new yt(-1, -Infinity, "", 0);
3397
+ next = new yt(-1, -Infinity, "", 0);
3396
3398
  LB8 = !1;
3397
3399
  spaces = !1;
3398
3400
  RI = 0;
@@ -3405,13 +3407,13 @@ var xt = class {
3405
3407
  this.next.ignored ? this.cur.len = this.next.len : (this.prev = this.cur, this.cur = this.next), this.next = e;
3406
3408
  }
3407
3409
  pushEnd() {
3408
- this.push(new xt(-2, Infinity, "", this.next.len));
3410
+ this.push(new yt(-2, Infinity, "", this.next.len));
3409
3411
  }
3410
3412
  *codePoints(e, t = !0) {
3411
3413
  if (t) for (; e < this.len;) if (e === this.cur.len && this.next.cls >= 0) yield this.next, e += this.next.char.length;
3412
3414
  else {
3413
- let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = st.get(t);
3414
- e += n.length, yield new xt(bt(r, n), t, n, e);
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);
3415
3417
  }
3416
3418
  else for (; e > 0;) if (e === this.cur.len) yield this.cur, e -= this.cur.char.length;
3417
3419
  else if (e === this.prev.len) yield this.prev, e -= this.prev.char.length;
@@ -3419,11 +3421,11 @@ var xt = class {
3419
3421
  let t = e - 1, n = this.str.charCodeAt(t);
3420
3422
  n >= 56320 && n <= 57343 && t--;
3421
3423
  let r = this.str.codePointAt(t), i = String.fromCodePoint(r);
3422
- yield new xt(bt(st.get(r), i), r, i, e), e = t;
3424
+ yield new yt(vt(at.get(r), i), r, i, e), e = t;
3423
3425
  }
3424
3426
  }
3425
3427
  classAfterSpaces(e) {
3426
- for (let { cls: t } of this.codePoints(e)) if (t !== _t) return t;
3428
+ for (let { cls: t } of this.codePoints(e)) if (t !== ht) return t;
3427
3429
  return -2;
3428
3430
  }
3429
3431
  afterNext(e = 1) {
@@ -3437,324 +3439,324 @@ var xt = class {
3437
3439
  let r = `${n(this.prev)} => ${n(this.cur)} => ${n(this.next)}`;
3438
3440
  return this.LB8 && (r += " LB8"), this.spaces && (r += " spaces"), this.RI > 0 && (r += ` RI: ${this.RI}`), this.props && (r += ` ${JSON.stringify(this.props)}`), r;
3439
3441
  }
3440
- }, B = class {
3442
+ }, H = class {
3441
3443
  string = void 0;
3442
3444
  props = void 0;
3443
3445
  constructor(e, t = !1) {
3444
3446
  this.position = e, this.required = t;
3445
3447
  }
3446
- }, V = z.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRPhuEQQh7vvPVuAe34q5x1lH\n uJFh15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/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");
3447
- Object.fromEntries(V.values.map((e, t) => [e, t]));
3448
- var { values: Ct } = V, { AK: wt, AL: H, AP: Tt, AS: Et, B2: Dt, BA: Ot, BB: kt, BK: At, CB: jt, CL: Mt, CM: Nt, CP: Pt, CR: Ft, EB: It, EM: Lt, EX: Rt, GL: zt, H2: Bt, H3: Vt, HH: Ht, HL: U, HY: Ut, ID: Wt, IN: Gt, IS: W, JL: Kt, JT: qt, JV: Jt, LF: Yt, NU: G, OP: Xt, NL: Zt, NS: Qt, PO: $t, PR: en, RI: tn, SP: K, SY: nn, QU: q, VF: rn, VI: an, WJ: on, ZW: sn, ZWJ: cn } = ct, ln = /* @__PURE__ */ new Set([
3449
- H,
3450
- U,
3451
- G
3448
+ }, U = it.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRPhuEQQh7vvPVuAe34q5x1lH\n uJFh15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/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
+ 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([
3451
+ W,
3452
+ G,
3453
+ K
3454
+ ]), ln = /* @__PURE__ */ new Set([
3455
+ Ot,
3456
+ Nt,
3457
+ Jt,
3458
+ Xt,
3459
+ q,
3460
+ on
3452
3461
  ]), un = /* @__PURE__ */ new Set([
3453
- At,
3454
- Ft,
3455
- Yt,
3456
- Zt,
3457
- K,
3458
- sn
3462
+ Ht,
3463
+ Pt,
3464
+ Ft
3459
3465
  ]), dn = /* @__PURE__ */ new Set([
3460
- Wt,
3461
- It,
3462
- Lt
3466
+ Gt,
3467
+ qt,
3468
+ Rt,
3469
+ zt
3463
3470
  ]), fn = /* @__PURE__ */ new Set([
3464
- Kt,
3465
- Jt,
3466
- Bt,
3467
- Vt
3468
- ]), pn = /* @__PURE__ */ new Set([
3469
- Kt,
3470
- Jt,
3471
+ Gt,
3471
3472
  qt,
3472
- Bt,
3473
- Vt
3474
- ]), mn = /* @__PURE__ */ new Set([Jt, qt]), hn = /* @__PURE__ */ new Set([
3475
- K,
3476
- zt,
3477
- on,
3478
- Mt,
3479
- q,
3480
- Pt,
3473
+ Kt,
3481
3474
  Rt,
3482
- W,
3483
- nn,
3475
+ zt
3476
+ ]), pn = /* @__PURE__ */ new Set([qt, Kt]), mn = /* @__PURE__ */ new Set([
3477
+ q,
3478
+ Lt,
3479
+ an,
3484
3480
  At,
3485
- Ft,
3486
- Yt,
3487
- Zt,
3488
- sn
3489
- ]), gn = /* @__PURE__ */ new Set([
3481
+ J,
3482
+ Mt,
3483
+ It,
3484
+ Wt,
3485
+ tn,
3486
+ Ot,
3487
+ Nt,
3488
+ Jt,
3489
+ Xt,
3490
+ on
3491
+ ]), hn = /* @__PURE__ */ new Set([
3490
3492
  -1,
3491
- At,
3492
- Ft,
3493
- Yt,
3494
- Zt,
3493
+ Ot,
3494
+ Nt,
3495
+ Jt,
3495
3496
  Xt,
3497
+ Yt,
3498
+ J,
3499
+ Lt,
3496
3500
  q,
3497
- zt,
3498
- K,
3499
- sn
3500
- ]), J = Symbol("PASS"), Y = Symbol("NO_BREAK"), X = Symbol("MAY_BREAK"), _n = Symbol("MUST_BREAK");
3501
+ on
3502
+ ]), Y = Symbol("PASS"), X = Symbol("NO_BREAK"), gn = Symbol("MAY_BREAK"), _n = Symbol("MUST_BREAK");
3501
3503
  function vn(e) {
3502
- return e.cur.cls === -1 && e.next.cls !== -2 ? Y : J;
3504
+ return e.cur.cls === -1 && e.next.cls !== -2 ? X : Y;
3503
3505
  }
3504
3506
  function yn(e) {
3505
- return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? _n : J;
3507
+ return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? _n : Y;
3506
3508
  }
3507
3509
  function bn(e) {
3508
- return e.cur.cls === At ? _n : J;
3510
+ return e.cur.cls === Ot ? _n : Y;
3509
3511
  }
3510
3512
  function xn(e) {
3511
3513
  switch (e.cur.cls) {
3512
- case Ft: return e.next.cls === Yt ? Y : _n;
3513
- case Yt:
3514
- case Zt: return _n;
3514
+ case Nt: return e.next.cls === Jt ? X : _n;
3515
+ case Jt:
3516
+ case Xt: return _n;
3515
3517
  }
3516
- return J;
3518
+ return Y;
3517
3519
  }
3518
3520
  function Sn(e) {
3519
3521
  switch (e.next.cls) {
3520
- case At:
3521
- case Ft:
3522
- case Yt:
3523
- case Zt: return Y;
3522
+ case Ot:
3523
+ case Nt:
3524
+ case Jt:
3525
+ case Xt: return X;
3524
3526
  }
3525
- return J;
3527
+ return Y;
3526
3528
  }
3527
3529
  function Cn(e) {
3528
- return e.cur.cls !== tn && (e.RI = 0), e.spaces ? (e.next.cls !== K && (e.spaces = !1), Y) : J;
3530
+ return e.cur.cls !== en && (e.RI = 0), e.spaces ? (e.next.cls !== q && (e.spaces = !1), X) : Y;
3529
3531
  }
3530
3532
  function wn(e) {
3531
- if (e.next.cls === sn) return Y;
3532
- if (e.next.cls === K) switch (e.cur.cls) {
3533
- case sn:
3534
- case Xt:
3535
- case q:
3533
+ if (e.next.cls === on) return X;
3534
+ if (e.next.cls === q) switch (e.cur.cls) {
3535
+ case on:
3536
+ case Yt:
3537
+ case J:
3538
+ case At:
3536
3539
  case Mt:
3537
- case Pt:
3538
- case Dt: break;
3539
- default: return Y;
3540
+ case Tt: break;
3541
+ default: return X;
3540
3542
  }
3541
- return J;
3543
+ return Y;
3542
3544
  }
3543
3545
  function Tn(e) {
3544
- return e.LB8 ? (e.LB8 = !1, X) : e.cur.cls === sn ? e.next.cls === K ? (e.LB8 = !0, Y) : X : J;
3546
+ return e.LB8 ? (e.LB8 = !1, gn) : e.cur.cls === on ? e.next.cls === q ? (e.LB8 = !0, X) : gn : Y;
3545
3547
  }
3546
3548
  function En(e) {
3547
- return e.cur.cls === cn ? Y : J;
3549
+ return e.cur.cls === sn ? X : Y;
3548
3550
  }
3549
3551
  function Dn(e) {
3550
- return !un.has(e.cur.cls) && (e.next.cls === Nt || e.next.cls === cn) ? (e.next.ignored = !0, Y) : J;
3552
+ return !ln.has(e.cur.cls) && (e.next.cls === jt || e.next.cls === sn) ? (e.next.ignored = !0, X) : Y;
3551
3553
  }
3552
3554
  function On(e) {
3553
- return e.cur.cls === Nt && (e.cur.cls = H), e.next.cls === Nt && (e.next.cls = H), J;
3555
+ return e.cur.cls === jt && (e.cur.cls = W), e.next.cls === jt && (e.next.cls = W), Y;
3554
3556
  }
3555
3557
  function kn(e) {
3556
- return e.next.cls === on || e.cur.cls === on ? Y : J;
3558
+ return e.next.cls === an || e.cur.cls === an ? X : Y;
3557
3559
  }
3558
3560
  function An(e) {
3559
- return e.cur.cls === zt ? Y : J;
3561
+ return e.cur.cls === Lt ? X : Y;
3560
3562
  }
3561
3563
  function jn(e) {
3562
- if (e.next.cls === zt) switch (e.cur.cls) {
3563
- case K:
3564
- case Ot:
3565
- case Ut:
3566
- case Ht: return J;
3567
- default: return Y;
3564
+ if (e.next.cls === Lt) switch (e.cur.cls) {
3565
+ case q:
3566
+ case Et:
3567
+ case Vt:
3568
+ case Bt: return Y;
3569
+ default: return X;
3568
3570
  }
3569
- return J;
3571
+ return Y;
3570
3572
  }
3571
3573
  function Mn(e) {
3572
3574
  switch (e.next.cls) {
3575
+ case At:
3573
3576
  case Mt:
3574
- case Pt:
3575
- case Rt:
3576
- case nn: return Y;
3577
+ case It:
3578
+ case tn: return X;
3577
3579
  }
3578
- return J;
3580
+ return Y;
3579
3581
  }
3580
3582
  function Nn(e) {
3581
- return e.cur.cls === Xt ? (e.next.cls === K && (e.spaces = !0), Y) : J;
3583
+ return e.cur.cls === Yt ? (e.next.cls === q && (e.spaces = !0), X) : Y;
3582
3584
  }
3583
3585
  function Pn(e) {
3584
- return gn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === q ? (e.spaces = !0, Y) : J;
3586
+ return hn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === J ? (e.spaces = !0, X) : Y;
3585
3587
  }
3586
3588
  function Fn(e) {
3587
- if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === q) {
3589
+ if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === J) {
3588
3590
  let t = e.afterNext();
3589
- if (!t || hn.has(t.cls)) return Y;
3591
+ if (!t || mn.has(t.cls)) return X;
3590
3592
  }
3591
- return J;
3593
+ return Y;
3592
3594
  }
3593
3595
  function In(e) {
3594
- return e.cur.cls === K && e.next.cls === W && e.afterNext()?.cls === G ? X : J;
3596
+ return e.cur.cls === q && e.next.cls === Wt && e.afterNext()?.cls === K ? gn : Y;
3595
3597
  }
3596
3598
  function Ln(e) {
3597
- return e.next.cls === W ? Y : J;
3599
+ return e.next.cls === Wt ? X : Y;
3598
3600
  }
3599
3601
  function Rn(e) {
3600
- if (e.cur.cls === Mt || e.cur.cls === Pt) {
3601
- if (e.classAfterSpaces(e.cur.len) === Qt) return e.next.cls === K && (e.spaces = !0), Y;
3602
- if (e.next.cls === K) return Y;
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;
3604
+ if (e.next.cls === q) return X;
3603
3605
  }
3604
- return J;
3606
+ return Y;
3605
3607
  }
3606
3608
  function zn(e) {
3607
- if (e.cur.cls === Dt) {
3608
- if (e.classAfterSpaces(e.cur.len) === Dt) return e.next.cls === K && (e.spaces = !0), Y;
3609
- if (e.next.cls === K) return Y;
3609
+ if (e.cur.cls === Tt) {
3610
+ if (e.classAfterSpaces(e.cur.len) === Tt) return e.next.cls === q && (e.spaces = !0), X;
3611
+ if (e.next.cls === q) return X;
3610
3612
  }
3611
- return J;
3613
+ return Y;
3612
3614
  }
3613
3615
  function Bn(e) {
3614
- return e.cur.cls === K ? X : J;
3616
+ return e.cur.cls === q ? gn : Y;
3615
3617
  }
3616
3618
  function Vn(e) {
3617
- return e.next.cls === q && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === q && !/^\p{Pf}$/u.test(e.cur.char) ? Y : J;
3619
+ 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;
3618
3620
  }
3619
3621
  function Hn(e) {
3620
- if (!V.get(e.cur.cp) && e.next.cls === q) return Y;
3621
- if (e.next.cls === q) {
3622
+ if (!U.get(e.cur.cp) && e.next.cls === J) return X;
3623
+ if (e.next.cls === J) {
3622
3624
  let t = e.afterNext();
3623
- if (!t || !V.get(t.cp)) return Y;
3625
+ if (!t || !U.get(t.cp)) return X;
3624
3626
  }
3625
- return e.cur.cls === q && !V.get(e.next.cp) || (e.prev.cls === -1 || !V.get(e.prev.cp)) && e.cur.cls === q ? Y : J;
3627
+ 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;
3626
3628
  }
3627
3629
  function Un(e) {
3628
- return e.cur.cls === jt || e.next.cls === jt ? X : J;
3630
+ return e.cur.cls === kt || e.next.cls === kt ? gn : Y;
3629
3631
  }
3630
3632
  var Wn = /* @__PURE__ */ new Set([
3631
3633
  -1,
3632
- At,
3633
- Ft,
3634
- Yt,
3635
- Zt,
3636
- K,
3637
- sn,
3638
- jt,
3639
- zt
3634
+ Ot,
3635
+ Nt,
3636
+ Jt,
3637
+ Xt,
3638
+ q,
3639
+ on,
3640
+ kt,
3641
+ Lt
3640
3642
  ]);
3641
3643
  function Gn(e) {
3642
- return Wn.has(e.prev.cls) && (e.cur.cls === Ut || e.cur.cls === Ht) && (e.next.cls === H || e.next.cls === U) ? Y : J;
3644
+ return Wn.has(e.prev.cls) && (e.cur.cls === Vt || e.cur.cls === Bt) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3643
3645
  }
3644
3646
  function Kn(e) {
3645
- if (e.cur.cls === kt) return Y;
3647
+ if (e.cur.cls === Dt) return X;
3646
3648
  switch (e.next.cls) {
3647
- case Ot:
3648
- case Ht:
3649
- case Ut:
3650
- case Qt: return Y;
3649
+ case Et:
3650
+ case Bt:
3651
+ case Vt:
3652
+ case Zt: return X;
3651
3653
  }
3652
- return J;
3654
+ return Y;
3653
3655
  }
3654
3656
  function qn(e) {
3655
- return e.prev.cls === U && (e.cur.cls === Ut || e.cur.cls === Ht) && e.next.cls !== U ? Y : J;
3657
+ return e.prev.cls === G && (e.cur.cls === Vt || e.cur.cls === Bt) && e.next.cls !== G ? X : Y;
3656
3658
  }
3657
3659
  function Jn(e) {
3658
- return e.cur.cls === nn && e.next.cls === U ? Y : J;
3660
+ return e.cur.cls === tn && e.next.cls === G ? X : Y;
3659
3661
  }
3660
3662
  function Yn(e) {
3661
- return e.next.cls === Gt ? Y : J;
3663
+ return e.next.cls === Ut ? X : Y;
3662
3664
  }
3663
3665
  function Xn(e) {
3664
3666
  switch (e.cur.cls) {
3665
- case H:
3666
- case U:
3667
- if (e.next.cls === G) return Y;
3667
+ case W:
3668
+ case G:
3669
+ if (e.next.cls === K) return X;
3668
3670
  break;
3669
- case G: if (e.next.cls === H || e.next.cls === U) return Y;
3671
+ case K: if (e.next.cls === W || e.next.cls === G) return X;
3670
3672
  }
3671
- return J;
3673
+ return Y;
3672
3674
  }
3673
3675
  function Zn(e) {
3674
- return e.cur.cls === en && dn.has(e.next.cls) || e.next.cls === $t && dn.has(e.cur.cls) ? Y : J;
3676
+ return e.cur.cls === $t && un.has(e.next.cls) || e.next.cls === Qt && un.has(e.cur.cls) ? X : Y;
3675
3677
  }
3676
3678
  function Qn(e) {
3677
- return (e.cur.cls === en || e.cur.cls === $t) && (e.next.cls === H || e.next.cls === U) || (e.cur.cls === H || e.cur.cls === U) && (e.next.cls === en || e.next.cls === $t) ? Y : J;
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;
3678
3680
  }
3679
- var $n = /* @__PURE__ */ new Set([$t, en]), er = /* @__PURE__ */ new Set([Mt, Pt]);
3681
+ var $n = /* @__PURE__ */ new Set([Qt, $t]), er = /* @__PURE__ */ new Set([At, Mt]);
3680
3682
  function tr(e) {
3681
3683
  let t = null;
3682
- if ($n.has(e.next.cls) ? t = er.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === G && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
3683
- case nn:
3684
- case W: continue;
3685
- case G: return Y;
3684
+ if ($n.has(e.next.cls) ? t = er.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;
3687
+ case K: return X;
3686
3688
  default: break SyIsLoop;
3687
3689
  }
3688
- if (e.cur.cls === $t || e.cur.cls === en) {
3689
- if (e.next.cls === Xt) {
3690
+ if (e.cur.cls === Qt || e.cur.cls === $t) {
3691
+ if (e.next.cls === Yt) {
3690
3692
  let t = e.afterNext();
3691
- if (t && (t.cls === G || t.cls === W && e.afterNext(2)?.cls === G)) return Y;
3692
- } else if (e.next.cls === G) return Y;
3693
+ if (t && (t.cls === K || t.cls === Wt && e.afterNext(2)?.cls === K)) return X;
3694
+ } else if (e.next.cls === K) return X;
3693
3695
  }
3694
- return e.cur.cls === Ut && e.next.cls === G || e.cur.cls === W && e.next.cls === G ? Y : J;
3696
+ return e.cur.cls === Vt && e.next.cls === K || e.cur.cls === Wt && e.next.cls === K ? X : Y;
3695
3697
  }
3696
3698
  function nr(e) {
3697
3699
  switch (e.cur.cls) {
3698
- case Kt:
3699
- if (fn.has(e.next.cls)) return Y;
3700
- break;
3701
- case Jt:
3702
- case Bt:
3703
- if (mn.has(e.next.cls)) return Y;
3700
+ case Gt:
3701
+ if (dn.has(e.next.cls)) return X;
3704
3702
  break;
3705
3703
  case qt:
3706
- case Vt: if (e.next.cls === qt) return Y;
3704
+ case Rt:
3705
+ if (pn.has(e.next.cls)) return X;
3706
+ break;
3707
+ case Kt:
3708
+ case zt: if (e.next.cls === Kt) return X;
3707
3709
  }
3708
- return J;
3710
+ return Y;
3709
3711
  }
3710
3712
  function rr(e) {
3711
3713
  switch (e.cur.cls) {
3712
- case Kt:
3713
- case Jt:
3714
+ case Gt:
3714
3715
  case qt:
3715
- case Bt:
3716
- case Vt:
3717
- if (e.next.cls === $t) return Y;
3716
+ case Kt:
3717
+ case Rt:
3718
+ case zt:
3719
+ if (e.next.cls === Qt) return X;
3718
3720
  break;
3719
- case en: if (pn.has(e.next.cls)) return Y;
3721
+ case $t: if (fn.has(e.next.cls)) return X;
3720
3722
  }
3721
- return J;
3723
+ return Y;
3722
3724
  }
3723
3725
  function ar(e) {
3724
- return (e.cur.cls === H || e.cur.cls === U) && (e.next.cls === H || e.next.cls === U) ? Y : J;
3726
+ return (e.cur.cls === W || e.cur.cls === G) && (e.next.cls === W || e.next.cls === G) ? X : Y;
3725
3727
  }
3726
3728
  function or(e) {
3727
3729
  let { prev: t, cur: n, next: r } = e;
3728
3730
  function i(e) {
3729
- return e.cls === wt || e.char === "◌" || e.cls === Et;
3731
+ return e.cls === St || e.char === "◌" || e.cls === wt;
3730
3732
  }
3731
- return n.cls === Tt && i(r) || i(n) && (r.cls === rn || r.cls === an) || i(t) && n.cls === an && (r.cls === wt || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === rn ? Y : J;
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;
3732
3734
  }
3733
3735
  function sr(e) {
3734
- return e.cur.cls === W && (e.next.cls === H || e.next.cls === U) ? Y : J;
3736
+ return e.cur.cls === Wt && (e.next.cls === W || e.next.cls === G) ? X : Y;
3735
3737
  }
3736
3738
  function cr(e) {
3737
3739
  switch (e.cur.cls) {
3738
- case H:
3739
- case U:
3740
+ case W:
3740
3741
  case G:
3741
- if (e.next.cls === Xt && !V.get(e.next.cp)) return Y;
3742
+ case K:
3743
+ if (e.next.cls === Yt && !U.get(e.next.cp)) return X;
3742
3744
  break;
3743
- case Pt: if (!V.get(e.cur.cp) && ln.has(e.next.cls)) return Y;
3745
+ case Mt: if (!U.get(e.cur.cp) && cn.has(e.next.cls)) return X;
3744
3746
  }
3745
- return J;
3747
+ return Y;
3746
3748
  }
3747
3749
  function lr(e) {
3748
- if (e.cur.cls === tn) {
3749
- if (e.next.cls === tn && ++e.RI % 2 != 0) return Y;
3750
+ if (e.cur.cls === en) {
3751
+ if (e.next.cls === en && ++e.RI % 2 != 0) return X;
3750
3752
  } else e.RI = 0;
3751
- return J;
3753
+ return Y;
3752
3754
  }
3753
3755
  function ur(e) {
3754
- return e.cur.cls === It && e.next.cls === Lt || e.next.cls === Lt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? Y : J;
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;
3755
3757
  }
3756
3758
  function dr() {
3757
- return X;
3759
+ return gn;
3758
3760
  }
3759
3761
  var fr = [
3760
3762
  vn,
@@ -3810,7 +3812,7 @@ var fr = [
3810
3812
  verbose: !1,
3811
3813
  ...e
3812
3814
  }, this.rules = [...fr], this.#e.example7) throw Error("'example7' flag deprecated");
3813
- this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), J));
3815
+ this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), Y));
3814
3816
  }
3815
3817
  removeRule(...e) {
3816
3818
  let t = [];
@@ -3835,10 +3837,10 @@ var fr = [
3835
3837
  for (let t of this.rules) {
3836
3838
  let n = t.call(this, e);
3837
3839
  switch (n) {
3838
- case J: break;
3839
- case Y: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
3840
- case X: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new B(e.cur.len);
3841
- case _n: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new B(e.cur.len, !0);
3840
+ case Y: break;
3841
+ case X: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
3842
+ case gn: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new H(e.cur.len);
3843
+ case _n: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new H(e.cur.len, !0);
3842
3844
  default: throw Error(`Invalid state: "${n}"`);
3843
3845
  }
3844
3846
  }
@@ -3849,7 +3851,7 @@ var fr = [
3849
3851
  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);
3850
3852
  }
3851
3853
  *breaks(e) {
3852
- let t = new St(e);
3854
+ let t = new bt(e);
3853
3855
  for (let e of t.codePoints(0)) t.push(e), yield* this.#n(t);
3854
3856
  t.pushEnd(), yield* this.#n(t);
3855
3857
  }
@@ -3944,21 +3946,114 @@ function Sr(e) {
3944
3946
  });
3945
3947
  }
3946
3948
  //#endregion
3949
+ //#region src/reveal.ts
3950
+ var Cr = Object.freeze([
3951
+ "CHARACTER",
3952
+ "WORD",
3953
+ "LINE",
3954
+ "BLOCK"
3955
+ ]);
3956
+ function wr(e) {
3957
+ let t = globalThis.Intl?.Segmenter;
3958
+ return typeof t == "function" ? [...new t(void 0, { granularity: "grapheme" }).segment(e)].map(({ segment: e }) => e) : Array.from(e);
3959
+ }
3960
+ function Tr(e) {
3961
+ if (typeof e != "string" || !Cr.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
3962
+ return e;
3963
+ }
3964
+ function Er(e) {
3965
+ if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError("Bubble reveal must be an object.");
3966
+ let t = e, n = /* @__PURE__ */ new Set([
3967
+ "unit",
3968
+ "delimiters",
3969
+ "showDelimiters",
3970
+ "layout",
3971
+ "intervalSeconds",
3972
+ "sound"
3973
+ ]);
3974
+ 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 = Tr(t.unit), i = t.delimiters ?? " \r\n";
3976
+ if (typeof i != "string" || i.length === 0) throw TypeError("Bubble WORD delimiters must be a non-empty string.");
3977
+ let a = t.showDelimiters ?? !1;
3978
+ if (typeof a != "boolean") throw TypeError("Bubble reveal showDelimiters must be boolean.");
3979
+ let o = t.layout ?? "DYNAMIC";
3980
+ if (o !== "DYNAMIC" && o !== "RESERVED") throw TypeError("Bubble reveal layout must be DYNAMIC or RESERVED.");
3981
+ let s = t.intervalSeconds ?? 0;
3982
+ if (typeof s != "number" || !Number.isFinite(s) || s < 0) throw TypeError("Bubble reveal intervalSeconds must be zero or greater.");
3983
+ let c = t.sound;
3984
+ if (c !== void 0 && (typeof c != "string" || c.length === 0)) throw TypeError("Bubble reveal sound must be a non-empty asset name.");
3985
+ return Object.freeze({
3986
+ unit: r,
3987
+ delimiters: i,
3988
+ showDelimiters: a,
3989
+ layout: o,
3990
+ intervalSeconds: s,
3991
+ ...c === void 0 ? {} : { sound: c }
3992
+ });
3993
+ }
3994
+ function Dr(e, t, n) {
3995
+ let r = new Set(Array.from(t)), i = [], a = "";
3996
+ for (let t of wr(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
+ return a.length > 0 && i.push(a), i.filter((e) => e.length > 0);
3998
+ }
3999
+ function Or(e, t) {
4000
+ if (e.length === 0) return Object.freeze([""]);
4001
+ if (t.unit === "CHARACTER") return Object.freeze(wr(e));
4002
+ if (t.unit === "WORD") {
4003
+ let n = Dr(e, t.delimiters, t.showDelimiters);
4004
+ if (t.showDelimiters) return Object.freeze(n);
4005
+ let r = [], i = 0;
4006
+ for (let a of n) {
4007
+ let n = e.indexOf(a, i);
4008
+ if (n < 0) r.push(a);
4009
+ else for (r.push(a), i = n + a.length; i < e.length && t.delimiters.includes(e[i] ?? "");) i += 1;
4010
+ }
4011
+ return Object.freeze(r);
4012
+ }
4013
+ let n = t.unit === "LINE" ? /(?<=\n)/u : /\n{2,}/u, r = e.split(n).filter((e) => e.length > 0);
4014
+ if (t.unit === "BLOCK") {
4015
+ let t = [...e.matchAll(/\n{2,}/gu)].map(([e]) => e), n = r.map((e, n) => n < t.length ? `${e}${t[n] ?? ""}` : e);
4016
+ return Object.freeze(n.length > 0 ? n : [e]);
4017
+ }
4018
+ let i = r;
4019
+ return Object.freeze(i.length > 0 ? i : [e]);
4020
+ }
4021
+ function kr(e, t) {
4022
+ return e.slice(0, Math.max(0, Math.min(t, e.length))).join("");
4023
+ }
4024
+ //#endregion
3947
4025
  //#region src/composition.ts
3948
4026
  var Z = class extends Error {
3949
4027
  code;
3950
4028
  constructor(e, t) {
3951
4029
  super(t), this.name = "BubbleCompositionError", this.code = e;
3952
4030
  }
3953
- }, Cr = /* @__PURE__ */ new Set(["say", "think"]), wr = /* @__PURE__ */ new Set([
4031
+ }, Ar = /* @__PURE__ */ new Set(["say", "think"]), jr = /* @__PURE__ */ new Set([
3954
4032
  "idle",
3955
4033
  "talking",
3956
4034
  "awaiting-continue"
4035
+ ]), Mr = /* @__PURE__ */ new Set([
4036
+ "fadeIn",
4037
+ "fadeOut",
4038
+ "floatIn",
4039
+ "floatOut",
4040
+ "zoomIn",
4041
+ "zoomOut",
4042
+ "riseUp",
4043
+ "sink",
4044
+ "shake",
4045
+ "explode",
4046
+ "animateBubbleShape"
4047
+ ]), Nr = /* @__PURE__ */ new Set([
4048
+ "linear",
4049
+ "easeIn",
4050
+ "easeOut",
4051
+ "easeInOut"
3957
4052
  ]);
3958
4053
  function Q(e) {
3959
4054
  return typeof e == "object" && !!e && !Array.isArray(e);
3960
4055
  }
3961
- function Tr(e, t, n, r) {
4056
+ function Pr(e, t, n, r) {
3962
4057
  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));
3963
4058
  if (a.length > 0 || o.length > 0) throw new Z("BUBBLE-COMPOSITION-001", `${r} has missing or unknown properties.`);
3964
4059
  }
@@ -3966,29 +4061,86 @@ function $(e, t) {
3966
4061
  if (typeof e != "string" || e.trim().length === 0) throw new Z("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
3967
4062
  return e.trim();
3968
4063
  }
3969
- function Er(e, t, n) {
4064
+ function Fr(e, t) {
4065
+ if (typeof e != "string" || e.length === 0) throw new Z("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
4066
+ return e;
4067
+ }
4068
+ function Ir(e, t, n) {
3970
4069
  if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
3971
- if (Tr(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Z("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
3972
- let r = Object.freeze(e.frames.map((e, n) => $(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
4070
+ if (Pr(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Z("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
4071
+ let r = Object.freeze(e.frames.map((e, n) => Fr(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
3973
4072
  if (typeof i != "number" || !Number.isFinite(i) || i <= 0) throw new Z("BUBBLE-COMPOSITION-001", `${t}.frameIntervalSeconds must be a positive finite number.`);
3974
4073
  return Object.freeze({
3975
4074
  frames: r,
3976
4075
  frameIntervalSeconds: i
3977
4076
  });
3978
4077
  }
3979
- function Dr(e) {
4078
+ function Lr(e) {
3980
4079
  if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble portrait must be an object.");
3981
- Tr(e, ["base"], ["blink", "lipSync"], "Bubble portrait");
3982
- let t = e.blink === void 0 ? void 0 : Er(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : Er(e.lipSync, "Bubble portrait lip-sync", 1);
4080
+ Pr(e, ["base"], ["blink", "lipSync"], "Bubble portrait");
4081
+ let t = e.blink === void 0 ? void 0 : Ir(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : Ir(e.lipSync, "Bubble portrait lip-sync", 1);
3983
4082
  return Object.freeze({
3984
- base: $(e.base, "Bubble portrait base"),
4083
+ base: Fr(e.base, "Bubble portrait base"),
3985
4084
  ...t === void 0 ? {} : { blink: t },
3986
4085
  ...n === void 0 ? {} : { lipSync: n }
3987
4086
  });
3988
4087
  }
3989
- function Or(e) {
4088
+ function Rr(e, t) {
4089
+ if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
4090
+ if (Pr(e, ["name"], [
4091
+ "durationSeconds",
4092
+ "ease",
4093
+ "direction",
4094
+ "count",
4095
+ "relativeScale",
4096
+ "speed",
4097
+ "visualStyle"
4098
+ ], t), !Mr.has(e.name)) throw new Z("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
4099
+ let n = (n, r, i = !1) => {
4100
+ let a = e[n];
4101
+ if (a !== void 0) {
4102
+ if (typeof a != "number" || !Number.isFinite(a) || a < r || i && !Number.isInteger(a)) throw new Z("BUBBLE-COMPOSITION-001", `${t}.${n} is invalid.`);
4103
+ return a;
4104
+ }
4105
+ }, r = n("durationSeconds", 0), i = n("count", 1, !0), a = n("relativeScale", 0), o = n("speed", 0), s = e.direction;
4106
+ if (s !== void 0 && typeof s != "number" && typeof s != "string") throw new Z("BUBBLE-COMPOSITION-001", `${t}.direction is invalid.`);
4107
+ let c = e.ease ?? "easeInOut";
4108
+ if (typeof c != "string" || !Nr.has(c)) throw new Z("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
4109
+ let l = e.visualStyle;
4110
+ if (l !== void 0 && (typeof l != "string" || !M.includes(l))) throw new Z("BUBBLE-COMPOSITION-001", `${t}.visualStyle is invalid.`);
4111
+ return Object.freeze({
4112
+ name: e.name,
4113
+ ...r === void 0 ? {} : { durationSeconds: r },
4114
+ ease: c,
4115
+ ...s === void 0 ? {} : { direction: s },
4116
+ ...i === void 0 ? {} : { count: i },
4117
+ ...a === void 0 ? {} : { relativeScale: a },
4118
+ ...o === void 0 ? {} : { speed: o },
4119
+ ...l === void 0 ? {} : { visualStyle: l }
4120
+ });
4121
+ }
4122
+ function zr(e) {
4123
+ if (e === void 0) return;
4124
+ if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble audio must be an object.");
4125
+ Pr(e, [], [
4126
+ "voice",
4127
+ "reveal",
4128
+ "finish"
4129
+ ], "Bubble audio");
4130
+ let t = {};
4131
+ for (let n of [
4132
+ "voice",
4133
+ "reveal",
4134
+ "finish"
4135
+ ]) {
4136
+ let r = e[n];
4137
+ r !== void 0 && (t[n] = Fr(r, `Bubble audio ${n}`));
4138
+ }
4139
+ return Object.freeze(t);
4140
+ }
4141
+ function Br(e) {
3990
4142
  if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble style must be an object.");
3991
- Tr(e, ["name", "textStyle"], [
4143
+ Pr(e, ["name", "textStyle"], [
3992
4144
  "placement",
3993
4145
  "maxWidth",
3994
4146
  "textLocale",
@@ -3997,100 +4149,128 @@ function Or(e) {
3997
4149
  "offset",
3998
4150
  "visualStyle",
3999
4151
  "portrait",
4000
- "continueIndicator"
4152
+ "continueIndicator",
4153
+ "reveal",
4154
+ "audio",
4155
+ "showAnimation",
4156
+ "hideAnimation"
4001
4157
  ], "Bubble style");
4002
- let t = e.portrait === void 0 ? void 0 : Dr(e.portrait), n = e.continueIndicator === void 0 ? void 0 : Er(e.continueIndicator, "Bubble continue indicator", 2), r;
4158
+ let t = e.portrait === void 0 ? void 0 : Lr(e.portrait), n = e.continueIndicator === void 0 ? void 0 : Ir(e.continueIndicator, "Bubble continue indicator", 2), r;
4159
+ if (e.reveal !== void 0) try {
4160
+ r = Er(e.reveal);
4161
+ } catch (e) {
4162
+ throw new Z("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4163
+ }
4164
+ let i = zr(e.audio), a = e.showAnimation === void 0 ? void 0 : Rr(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : Rr(e.hideAnimation, "Bubble hideAnimation"), s;
4003
4165
  try {
4004
- r = y(e.placement ?? "up-right");
4166
+ s = y(e.placement ?? "up-right");
4005
4167
  } catch (e) {
4006
4168
  throw new Z("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble placement is invalid.");
4007
4169
  }
4008
- let i, a, o;
4170
+ let c, l, u;
4009
4171
  try {
4010
- i = w(e.distance ?? 12), a = te(e.tailLength ?? 18), o = e.offset === void 0 ? ee : T(e.offset);
4172
+ c = T(e.distance ?? 12), l = E(e.tailLength ?? 18), u = e.offset === void 0 ? C : D(e.offset);
4011
4173
  } catch (e) {
4012
4174
  throw new Z("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble actor-relative transform is invalid.");
4013
4175
  }
4014
- let s = e.visualStyle ?? "NORMAL";
4015
- if (typeof s != "string" || !O.includes(s)) throw new Z("BUBBLE-COMPOSITION-001", `Unsupported Bubble visual style: ${String(s)}`);
4016
- let c;
4176
+ let d = e.visualStyle ?? "NORMAL";
4177
+ if (typeof d != "string" || !M.includes(d)) throw new Z("BUBBLE-COMPOSITION-001", `Unsupported Bubble visual style: ${String(d)}`);
4178
+ let f;
4017
4179
  if (e.maxWidth !== void 0) {
4018
4180
  if (typeof e.maxWidth != "number" || !Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw new Z("BUBBLE-COMPOSITION-001", "Bubble style maxWidth must be a positive finite number.");
4019
- c = e.maxWidth;
4181
+ f = e.maxWidth;
4020
4182
  }
4021
- let l = e.textLocale === void 0 ? void 0 : $(e.textLocale, "Bubble style text locale");
4183
+ let p = e.textLocale === void 0 ? void 0 : $(e.textLocale, "Bubble style text locale");
4022
4184
  return Object.freeze({
4023
4185
  name: $(e.name, "Bubble style name"),
4024
4186
  textStyle: $(e.textStyle, "Bubble text style name"),
4025
- ...c === void 0 ? {} : { maxWidth: c },
4026
- ...l === void 0 ? {} : { textLocale: l },
4027
- placement: r,
4028
- distance: i,
4029
- tailLength: a,
4030
- offset: o,
4031
- visualStyle: s,
4187
+ ...f === void 0 ? {} : { maxWidth: f },
4188
+ ...p === void 0 ? {} : { textLocale: p },
4189
+ placement: s,
4190
+ distance: c,
4191
+ tailLength: l,
4192
+ offset: u,
4193
+ visualStyle: d,
4032
4194
  ...t === void 0 ? {} : { portrait: t },
4033
- ...n === void 0 ? {} : { continueIndicator: n }
4195
+ ...n === void 0 ? {} : { continueIndicator: n },
4196
+ ...r === void 0 ? {} : { reveal: r },
4197
+ ...i === void 0 ? {} : { audio: i },
4198
+ ...a === void 0 ? {} : { showAnimation: a },
4199
+ ...o === void 0 ? {} : { hideAnimation: o }
4034
4200
  });
4035
4201
  }
4036
- function kr(e) {
4202
+ function Vr(e) {
4037
4203
  if (e !== void 0) {
4038
4204
  if (!Q(e) || typeof e.applyToTarget != "function" || typeof e.getMimeType != "function" || typeof e.isRegistered != "function") throw TypeError("Bubble image capability must provide applyToTarget, getMimeType, and isRegistered.");
4039
4205
  return e;
4040
4206
  }
4041
4207
  }
4042
- function Ar(e) {
4208
+ function Hr(e) {
4209
+ if (e !== void 0) {
4210
+ if (!Q(e) || typeof e.playSound != "function") throw TypeError("Bubble audio capability must provide playSound.");
4211
+ if (e.isRegistered !== void 0 && typeof e.isRegistered != "function") throw TypeError("Bubble audio capability isRegistered must be a function.");
4212
+ if (e.getMimeType !== void 0 && typeof e.getMimeType != "function") throw TypeError("Bubble audio capability getMimeType must be a function.");
4213
+ return e;
4214
+ }
4215
+ }
4216
+ function Ur(e) {
4043
4217
  if (e === void 0) throw new Z("BUBBLE-COMPOSITION-006", "Bubble image assets require an image capability. Provide options.imageResolver.");
4044
4218
  return e;
4045
4219
  }
4046
- function jr(e) {
4220
+ function Wr(e) {
4047
4221
  if (!Q(e) || typeof e.setText != "function" || typeof e.releaseTarget != "function") throw TypeError("Bubble SVG Text composition must provide setText and releaseTarget.");
4048
4222
  return e;
4049
4223
  }
4050
- function Mr() {
4224
+ function Gr() {
4051
4225
  return Object.freeze({
4052
4226
  setTimeout: (e, t) => globalThis.setTimeout(e, t),
4053
4227
  clearTimeout: (e) => globalThis.clearTimeout(e)
4054
4228
  });
4055
4229
  }
4056
- function Nr(e) {
4230
+ function Kr(e) {
4057
4231
  if (!Q(e) || typeof e.setTimeout != "function" || typeof e.clearTimeout != "function") throw TypeError("Bubble scheduler must provide setTimeout and clearTimeout.");
4058
4232
  return e;
4059
4233
  }
4060
- function Pr(e, t) {
4234
+ function qr(e, t) {
4061
4235
  if (!Q(e) || typeof e.id != "string" || e.id.length === 0 || typeof e.isStage != "boolean") throw new Z("BUBBLE-COMPOSITION-004", `${t} must provide id and isStage.`);
4062
4236
  return e;
4063
4237
  }
4064
- function Fr(e) {
4238
+ function Jr(e) {
4065
4239
  if (!Q(e) || typeof e.drawableID != "number" || !Number.isInteger(e.drawableID) || e.drawableID < 0) throw new Z("BUBBLE-COMPOSITION-004", "Bubble text target must provide a non-negative integer drawableID.");
4066
4240
  return e;
4067
4241
  }
4068
- function Ir(e, t) {
4242
+ function Yr(e, t) {
4069
4243
  if (!Q(e) || !Q(e.targets) || typeof e.setLayerVisible != "function" || typeof e.updateStyle != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Z("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
4070
4244
  let n = e.targets;
4071
- Fr(n.text);
4245
+ Jr(n.text);
4072
4246
  let r = /* @__PURE__ */ new Set(), i = (e, t) => {
4073
4247
  let i = n[e];
4074
4248
  if (!t && i === void 0) return;
4075
- let a = Pr(i, `Bubble surface ${e}`);
4249
+ let a = qr(i, `Bubble surface ${e}`);
4076
4250
  if (r.has(a.id)) throw new Z("BUBBLE-COMPOSITION-004", "Bubble image layers must use distinct target IDs.");
4077
4251
  r.add(a.id);
4078
4252
  };
4079
4253
  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;
4080
4254
  }
4081
- function Lr(e, t) {
4255
+ function Xr(e, t) {
4082
4256
  if (e === void 0) throw new Z("BUBBLE-COMPOSITION-006", `Bubble image capability is required for: ${t}. Provide options.imageResolver.`);
4083
4257
  if (!e.isRegistered(t)) throw new Z("BUBBLE-COMPOSITION-003", `Bubble image asset is not registered: ${t}`);
4084
4258
  if (!e.getMimeType(t).startsWith("image/")) throw new Z("BUBBLE-COMPOSITION-003", `Bubble asset is not an image: ${t}`);
4085
4259
  }
4086
- function Rr(e) {
4260
+ function Zr(e, t) {
4261
+ if (e === void 0) throw new Z("BUBBLE-COMPOSITION-006", `Bubble audio assets require an audio capability: ${t}. Provide options.audio.`);
4262
+ if (e.isRegistered?.(t) === !1) throw new Z("BUBBLE-COMPOSITION-003", `Bubble audio asset is not registered: ${t}`);
4263
+ let n = e.getMimeType?.(t);
4264
+ if (n !== void 0 && !n.startsWith("audio/")) throw new Z("BUBBLE-COMPOSITION-003", `Bubble asset is not audio: ${t}`);
4265
+ }
4266
+ function Qr(e) {
4087
4267
  return [...e.portrait === void 0 ? [] : [
4088
4268
  e.portrait.base,
4089
4269
  ...e.portrait.blink?.frames ?? [],
4090
4270
  ...e.portrait.lipSync?.frames ?? []
4091
4271
  ], ...e.continueIndicator?.frames ?? []];
4092
4272
  }
4093
- function zr(e, t, n) {
4273
+ function $r(e, t, n) {
4094
4274
  if (t.maxWidth === void 0) return e;
4095
4275
  if (typeof n.measureText != "function") throw new Z("BUBBLE-COMPOSITION-007", "Bubble style maxWidth requires the text capability measureText method.");
4096
4276
  return Sr({
@@ -4103,11 +4283,11 @@ function zr(e, t, n) {
4103
4283
  }) ?? 0
4104
4284
  }).lines.map(({ text: e }) => e).join("\n");
4105
4285
  }
4106
- function Br(e, t) {
4286
+ function ei(e, t) {
4107
4287
  if (e.length === 1) throw e[0];
4108
4288
  if (e.length > 1) throw AggregateError(e, t);
4109
4289
  }
4110
- function Vr(e) {
4290
+ function ti(e) {
4111
4291
  let t = !1, n = 0, r = 0, i, a = Promise.resolve(), o = async (t) => {
4112
4292
  let n = e.animation.frames[t];
4113
4293
  n !== void 0 && await e.imageResolver.applyToTarget(n, e.target);
@@ -4142,54 +4322,75 @@ function Vr(e) {
4142
4322
  }
4143
4323
  });
4144
4324
  }
4145
- function Hr(e) {
4325
+ function ni(e) {
4146
4326
  if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Show bubble input must be an object.");
4147
- if (Tr(e, [
4327
+ if (Pr(e, [
4148
4328
  "actor",
4149
4329
  "actorKey",
4150
4330
  "kind",
4151
4331
  "text",
4152
4332
  "styleName"
4153
- ], ["animationMode"], "Show bubble input"), !Cr.has(e.kind)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4333
+ ], ["animationMode", "reveal"], "Show bubble input"), !Ar.has(e.kind)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
4154
4334
  if (typeof e.text != "string") throw new Z("BUBBLE-COMPOSITION-001", "Bubble text must be a string.");
4155
4335
  let t = e.animationMode ?? "talking";
4156
- if (!wr.has(t)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4336
+ if (!jr.has(t)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
4337
+ let n;
4338
+ if (e.reveal !== void 0) try {
4339
+ n = Er(e.reveal);
4340
+ } catch (e) {
4341
+ throw new Z("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
4342
+ }
4157
4343
  return {
4158
4344
  actor: e.actor,
4159
4345
  actorKey: $(e.actorKey, "Bubble actor key"),
4160
4346
  kind: e.kind,
4161
4347
  text: e.text,
4162
4348
  styleName: $(e.styleName, "Bubble style name"),
4163
- animationMode: t
4349
+ animationMode: t,
4350
+ ...n === void 0 ? {} : { reveal: n }
4164
4351
  };
4165
4352
  }
4166
- function Ur(e) {
4353
+ function ri(e) {
4167
4354
  if (!Q(e)) throw TypeError("Bubble composition options must be an object.");
4168
- let t = kr(e.imageResolver), n = jr(e.svgText);
4355
+ let t = Vr(e.imageResolver), n = Hr(e.audio), r = Wr(e.svgText);
4169
4356
  if (typeof e.createSurface != "function") throw TypeError("Bubble composition createSurface must be a function.");
4170
4357
  if (e.onAnimationError !== void 0 && typeof e.onAnimationError != "function") throw TypeError("Bubble composition onAnimationError must be a function.");
4171
- let r = Nr(e.scheduler ?? Mr()), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = !1, c = () => {
4172
- if (s) throw new Z("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
4173
- }, l = async (e, t) => {
4174
- let n = (o.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
4175
- o.set(e, n);
4358
+ let i = Kr(e.scheduler ?? Gr()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
4359
+ if (c) throw new Z("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
4360
+ }, u = async (e, t) => {
4361
+ let n = (s.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
4362
+ s.set(e, n);
4176
4363
  try {
4177
4364
  return await n;
4178
4365
  } finally {
4179
- o.get(e) === n && o.delete(e);
4366
+ s.get(e) === n && s.delete(e);
4180
4367
  }
4181
- }, u = async (o) => {
4182
- c();
4183
- let s = i.get(o.styleName);
4184
- if (!s) throw new Z("BUBBLE-COMPOSITION-002", `Bubble style is not defined: ${o.styleName}`);
4185
- let l = s, u = o.text, d = (e) => {
4186
- let n = new Set(Rr(e)), r = n.size === 0 ? void 0 : Ar(t);
4187
- for (let e of n) Lr(r, e);
4368
+ }, d = async (s) => {
4369
+ l();
4370
+ let c = a.get(s.styleName);
4371
+ if (!c) throw new Z("BUBBLE-COMPOSITION-002", `Bubble style is not defined: ${s.styleName}`);
4372
+ let u = c;
4373
+ s.reveal !== void 0 && (u = Object.freeze({
4374
+ ...c,
4375
+ reveal: s.reveal
4376
+ }));
4377
+ let d = s.text, f = (e) => {
4378
+ let n = new Set(Qr(e)), r = n.size === 0 ? void 0 : Ur(t);
4379
+ for (let e of n) Xr(r, e);
4188
4380
  return r;
4189
- }, f = d(l), p = async (e, t, n) => {
4190
- let r = Rr(e).length === 0 ? void 0 : Ar(t), i = [];
4381
+ }, p = f(u);
4382
+ for (let e of [
4383
+ u.audio?.voice,
4384
+ u.audio?.reveal,
4385
+ u.audio?.finish,
4386
+ u.reveal?.sound
4387
+ ]) e !== void 0 && Zr(n, e);
4388
+ let m = async (e, t = !1) => {
4389
+ e !== void 0 && n !== void 0 && await n.playSound(e, { untilDone: t });
4390
+ }, h = async (e, t, n) => {
4391
+ let r = Qr(e).length === 0 ? void 0 : Ur(t), i = [];
4191
4392
  if (e.portrait) {
4192
- let t = Ar(r);
4393
+ let t = Ur(r);
4193
4394
  i.push(Promise.resolve(t.applyToTarget(e.portrait.base, n.targets.portraitBase)));
4194
4395
  let a = e.portrait.blink?.frames[0];
4195
4396
  a !== void 0 && i.push(Promise.resolve(t.applyToTarget(a, n.targets.portraitBlink)));
@@ -4198,191 +4399,298 @@ function Ur(e) {
4198
4399
  }
4199
4400
  let a = e.continueIndicator?.frames[0];
4200
4401
  if (a !== void 0) {
4201
- let e = Ar(r);
4402
+ let e = Ur(r);
4202
4403
  i.push(Promise.resolve(e.applyToTarget(a, n.targets.continueIndicator)));
4203
4404
  }
4204
4405
  await Promise.all(i);
4205
- }, m = (t, n, i) => {
4206
- y = t.portrait?.blink === void 0 ? void 0 : Vr({
4207
- actorKey: o.actorKey,
4406
+ }, g = (t, n, r) => {
4407
+ x = t.portrait?.blink === void 0 ? void 0 : ti({
4408
+ actorKey: s.actorKey,
4208
4409
  layer: "portraitBlink",
4209
4410
  animation: t.portrait.blink,
4210
- target: i.targets.portraitBlink,
4211
- imageResolver: Ar(n),
4212
- scheduler: r,
4411
+ target: r.targets.portraitBlink,
4412
+ imageResolver: Ur(n),
4413
+ scheduler: i,
4213
4414
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4214
- }), b = t.portrait?.lipSync === void 0 ? void 0 : Vr({
4215
- actorKey: o.actorKey,
4415
+ }), S = t.portrait?.lipSync === void 0 ? void 0 : ti({
4416
+ actorKey: s.actorKey,
4216
4417
  layer: "portraitLipSync",
4217
4418
  animation: t.portrait.lipSync,
4218
- target: i.targets.portraitLipSync,
4219
- imageResolver: Ar(n),
4220
- scheduler: r,
4419
+ target: r.targets.portraitLipSync,
4420
+ imageResolver: Ur(n),
4421
+ scheduler: i,
4221
4422
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4222
- }), x = t.continueIndicator === void 0 ? void 0 : Vr({
4223
- actorKey: o.actorKey,
4423
+ }), C = t.continueIndicator === void 0 ? void 0 : ti({
4424
+ actorKey: s.actorKey,
4224
4425
  layer: "continueIndicator",
4225
4426
  animation: t.continueIndicator,
4226
- target: i.targets.continueIndicator,
4227
- imageResolver: Ar(n),
4228
- scheduler: r,
4427
+ target: r.targets.continueIndicator,
4428
+ imageResolver: Ur(n),
4429
+ scheduler: i,
4229
4430
  ...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
4230
4431
  });
4231
- }, h = a.get(o.actorKey);
4232
- h && await h.close();
4233
- let g, _ = !1, v = !1, y, b, x;
4432
+ }, _ = o.get(s.actorKey);
4433
+ _ && await _.close();
4434
+ let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? Or(s.text, w) : Object.freeze([s.text]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
4234
4435
  try {
4235
- g = Ir(await e.createSurface(Object.freeze({
4236
- actor: o.actor,
4237
- actorKey: o.actorKey,
4238
- kind: o.kind,
4239
- style: l
4240
- })), l), n.setText({
4241
- styleName: l.textStyle,
4242
- target: g.targets.text,
4243
- text: zr(o.text, l, n)
4244
- }), _ = !0, await p(l, f, g), m(l, f, g);
4245
- let t = "idle", r = !1, i = Promise.resolve(), s = async (e) => {
4246
- e !== t && (e === "talking" ? (await x?.stop(), await g?.setLayerVisible("continueIndicator", !1), await g?.setLayerVisible("portraitLipSync", b !== void 0), await b?.start({ primed: !0 })) : e === "awaiting-continue" ? (await b?.stop({ reset: !0 }), await g?.setLayerVisible("portraitLipSync", !1), await g?.setLayerVisible("continueIndicator", x !== void 0), await x?.start({ primed: !0 })) : (await Promise.all([b?.stop({ reset: !0 }), x?.stop()]), await Promise.all([g?.setLayerVisible("portraitLipSync", !1), g?.setLayerVisible("continueIndicator", !1)])), t = e);
4436
+ v = Yr(await e.createSurface(Object.freeze({
4437
+ actor: s.actor,
4438
+ actorKey: s.actorKey,
4439
+ kind: s.kind,
4440
+ style: u
4441
+ })), u);
4442
+ let t = $r(s.text, u, r);
4443
+ w?.layout === "RESERVED" && (r.setText({
4444
+ styleName: u.textStyle,
4445
+ target: v.targets.text,
4446
+ text: t
4447
+ }), v.captureTextLayout?.()), r.setText({
4448
+ styleName: u.textStyle,
4449
+ target: v.targets.text,
4450
+ text: $r(w ? kr(T, E) : s.text, u, r)
4451
+ }), y = !0, await h(u, p, v), g(u, p, v);
4452
+ let a = "idle", c = !1, l = Promise.resolve(), _ = async () => {
4453
+ if (!v) return;
4454
+ let e = w ? kr(T, E) : d;
4455
+ r.setText({
4456
+ styleName: u.textStyle,
4457
+ target: v.targets.text,
4458
+ text: $r(e, u, r)
4459
+ }), await v.show();
4460
+ }, O = () => {
4461
+ ee += 1, D !== void 0 && i.clearTimeout(D), D = void 0;
4462
+ }, te = async () => !w || E >= T.length ? !1 : (E += 1, await _(), await m(w.sound ?? u.audio?.reveal), E >= T.length && O(), !0), k = () => {
4463
+ if (!w || w.intervalSeconds <= 0 || E >= T.length) return;
4464
+ let e = ee;
4465
+ D = i.setTimeout(() => {
4466
+ D = void 0, !(c || e !== ee) && (l = l.then(() => te()).then(() => k()));
4467
+ }, w.intervalSeconds * 1e3);
4468
+ }, A = async (e) => {
4469
+ e !== a && (e === "talking" ? (await C?.stop(), await v?.setLayerVisible("continueIndicator", !1), await v?.setLayerVisible("portraitLipSync", S !== void 0), await S?.start({ primed: !0 })) : e === "awaiting-continue" ? (await S?.stop({ reset: !0 }), await v?.setLayerVisible("portraitLipSync", !1), await v?.setLayerVisible("continueIndicator", C !== void 0), await C?.start({ primed: !0 })) : (await Promise.all([S?.stop({ reset: !0 }), C?.stop()]), await Promise.all([v?.setLayerVisible("portraitLipSync", !1), v?.setLayerVisible("continueIndicator", !1)])), a = e);
4247
4470
  };
4248
4471
  await Promise.all([
4249
- g.setLayerVisible("portraitBase", l.portrait !== void 0),
4250
- g.setLayerVisible("portraitBlink", l.portrait?.blink !== void 0),
4251
- g.setLayerVisible("portraitLipSync", !1),
4252
- g.setLayerVisible("continueIndicator", !1)
4253
- ]), await g.show(), v = !0, await y?.start({ primed: !0 }), await s(o.animationMode);
4254
- let c = Object.freeze({
4255
- actorKey: o.actorKey,
4256
- kind: o.kind,
4472
+ v.setLayerVisible("portraitBase", u.portrait !== void 0),
4473
+ v.setLayerVisible("portraitBlink", u.portrait?.blink !== void 0),
4474
+ v.setLayerVisible("portraitLipSync", !1),
4475
+ v.setLayerVisible("continueIndicator", !1)
4476
+ ]), await v.show(), b = !0, await m(u.audio?.voice), w !== void 0 && await m(w.sound ?? u.audio?.reveal), await x?.start({ primed: !0 }), await A(s.animationMode);
4477
+ let j = Object.freeze({
4478
+ actorKey: s.actorKey,
4479
+ kind: s.kind,
4257
4480
  get animationMode() {
4258
- return t;
4481
+ return a;
4259
4482
  },
4260
4483
  setText(e) {
4261
- return r ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`)) : typeof e == "string" ? (i = i.then(async () => {
4262
- g && (n.setText({
4263
- styleName: l.textStyle,
4264
- target: g.targets.text,
4265
- text: zr(e, l, n)
4266
- }), u = e, await g.show());
4267
- }), i) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble text must be a string."));
4484
+ return c ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : typeof e == "string" ? (l = l.then(async () => {
4485
+ v && (O(), d = e, w ? (T = Or(e, w), E = Math.min(1, T.length), w.layout === "RESERVED" && (r.setText({
4486
+ styleName: u.textStyle,
4487
+ target: v.targets.text,
4488
+ text: $r(e, u, r)
4489
+ }), v.captureTextLayout?.()), await _(), k()) : await _());
4490
+ }), l) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble text must be a string."));
4268
4491
  },
4269
4492
  updateStyle(e) {
4270
- if (r) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`));
4271
- let a;
4493
+ if (c) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4494
+ let t;
4272
4495
  try {
4273
- a = Or(e);
4496
+ t = Br(e);
4274
4497
  } catch (e) {
4275
4498
  return Promise.reject(e);
4276
4499
  }
4277
- return i = i.then(async () => {
4278
- if (!g) return;
4279
- Ir(g, a);
4280
- let e = d(a);
4500
+ return l = l.then(async () => {
4501
+ if (!v) return;
4502
+ Yr(v, t);
4503
+ let e = f(t);
4504
+ for (let e of [
4505
+ t.audio?.voice,
4506
+ t.audio?.reveal,
4507
+ t.audio?.finish,
4508
+ t.reveal?.sound
4509
+ ]) e !== void 0 && Zr(n, e);
4281
4510
  await Promise.all([
4282
- y?.stop(),
4283
- b?.stop(),
4284
- x?.stop()
4285
- ]), await p(a, e, g), await g.updateStyle(a), l = a, n.setText({
4286
- styleName: a.textStyle,
4287
- target: g.targets.text,
4288
- text: zr(u, a, n)
4289
- }), m(a, e, g), await Promise.all([
4290
- g.setLayerVisible("portraitBase", a.portrait !== void 0),
4291
- g.setLayerVisible("portraitBlink", a.portrait?.blink !== void 0),
4292
- g.setLayerVisible("portraitLipSync", !1),
4293
- g.setLayerVisible("continueIndicator", !1)
4511
+ x?.stop(),
4512
+ S?.stop(),
4513
+ C?.stop()
4514
+ ]), await h(t, e, v), await v.updateStyle(t), u = t, w = t.reveal, T = w ? Or(d, w) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, O(), w?.layout === "RESERVED" && (r.setText({
4515
+ styleName: t.textStyle,
4516
+ target: v.targets.text,
4517
+ text: $r(d, t, r)
4518
+ }), v.captureTextLayout?.()), r.setText({
4519
+ styleName: t.textStyle,
4520
+ target: v.targets.text,
4521
+ text: $r(d, t, r)
4522
+ }), g(t, e, v), await Promise.all([
4523
+ v.setLayerVisible("portraitBase", t.portrait !== void 0),
4524
+ v.setLayerVisible("portraitBlink", t.portrait?.blink !== void 0),
4525
+ v.setLayerVisible("portraitLipSync", !1),
4526
+ v.setLayerVisible("continueIndicator", !1)
4294
4527
  ]);
4295
- let r = t;
4296
- t = "idle", await y?.start({ primed: !0 }), await s(r), await g.show();
4297
- }), i;
4528
+ let i = a;
4529
+ a = "idle", await x?.start({ primed: !0 }), await A(i), await _(), k(), await m(u.audio?.voice);
4530
+ }), l;
4298
4531
  },
4299
4532
  setAnimationMode(e) {
4300
- return r ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`)) : wr.has(e) ? (i = i.then(() => s(e)), i) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4533
+ return c ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : jr.has(e) ? (l = l.then(() => A(e)), l) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
4534
+ },
4535
+ revealNext() {
4536
+ if (c) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4537
+ let e = !1;
4538
+ return l = l.then(async () => {
4539
+ e = await te(), e && k();
4540
+ }), l.then(() => e);
4541
+ },
4542
+ revealAll() {
4543
+ return c ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : (l = l.then(async () => {
4544
+ if (O(), w) for (; await te(););
4545
+ }), l);
4546
+ },
4547
+ finish(e = {}) {
4548
+ if (c) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4549
+ let t = e.timeoutSeconds ?? 0;
4550
+ return !Number.isFinite(t) || t < 0 ? Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble finish timeoutSeconds must be zero or greater.")) : e.condition !== void 0 && typeof e.condition != "function" ? Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble finish condition must be a function.")) : (l = l.then(async () => {
4551
+ if (O(), e.unit !== void 0 && (w = Er({
4552
+ ...w ?? {},
4553
+ unit: e.unit
4554
+ }), T = Or(d, w), E = Math.min(1, T.length), w.layout === "RESERVED" && v && (r.setText({
4555
+ styleName: u.textStyle,
4556
+ target: v.targets.text,
4557
+ text: $r(d, u, r)
4558
+ }), v.captureTextLayout?.())), w) for (; await te(););
4559
+ let n = e.condition;
4560
+ if (n === void 0 && t === 0) {
4561
+ await m(u.audio?.finish);
4562
+ return;
4563
+ }
4564
+ await new Promise((e, r) => {
4565
+ let a = !1, o, s, c = () => {
4566
+ a || (a = !0, o !== void 0 && i.clearTimeout(o), s !== void 0 && i.clearTimeout(s), m(u.audio?.finish).then(e, r));
4567
+ };
4568
+ if (t > 0 && (o = i.setTimeout(c, t * 1e3)), !n) return;
4569
+ let l = () => {
4570
+ let e;
4571
+ try {
4572
+ e = n();
4573
+ } catch (e) {
4574
+ a || (a = !0, o !== void 0 && i.clearTimeout(o), s !== void 0 && i.clearTimeout(s), r(e));
4575
+ return;
4576
+ }
4577
+ Promise.resolve(e).then((e) => {
4578
+ e ? c() : a || (s = i.setTimeout(l, 16));
4579
+ }, (e) => {
4580
+ a || (a = !0, o !== void 0 && i.clearTimeout(o), s !== void 0 && i.clearTimeout(s), r(e));
4581
+ });
4582
+ };
4583
+ l();
4584
+ });
4585
+ }), l);
4586
+ },
4587
+ animate(e) {
4588
+ if (c) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
4589
+ let t;
4590
+ try {
4591
+ t = Rr(e, "Bubble motion");
4592
+ } catch (e) {
4593
+ return Promise.reject(e);
4594
+ }
4595
+ return l = l.then(async () => {
4596
+ if (t.name === "animateBubbleShape" && t.visualStyle) {
4597
+ let e = Object.freeze({
4598
+ ...u,
4599
+ visualStyle: t.visualStyle
4600
+ });
4601
+ await v?.animate?.(t), u = e, await v?.updateStyle(u);
4602
+ return;
4603
+ }
4604
+ await v?.animate?.(t);
4605
+ }), l;
4301
4606
  },
4302
4607
  async close() {
4303
- if (r) return;
4304
- r = !0;
4608
+ if (c) return;
4609
+ c = !0;
4305
4610
  let e = [];
4611
+ O();
4306
4612
  try {
4307
- await i;
4613
+ await l;
4308
4614
  } catch (t) {
4309
4615
  e.push(t);
4310
4616
  }
4311
4617
  for (let t of [
4312
- () => y?.stop(),
4313
- () => b?.stop(),
4618
+ () => u.hideAnimation === void 0 ? void 0 : v?.animate?.(u.hideAnimation),
4314
4619
  () => x?.stop(),
4620
+ () => S?.stop(),
4621
+ () => C?.stop(),
4315
4622
  async () => {
4316
- v && await g?.hide();
4623
+ b && await v?.hide();
4317
4624
  },
4318
4625
  async () => {
4319
- _ && g && n.releaseTarget(g.targets.text);
4626
+ y && v && r.releaseTarget(v.targets.text);
4320
4627
  },
4321
- async () => g?.dispose()
4628
+ async () => v?.dispose()
4322
4629
  ]) try {
4323
4630
  await t();
4324
4631
  } catch (t) {
4325
4632
  e.push(t);
4326
4633
  }
4327
- a.get(o.actorKey) === c && a.delete(o.actorKey), Br(e, `Failed to close bubble: ${o.actorKey}`);
4634
+ o.get(s.actorKey) === j && o.delete(s.actorKey), ei(e, `Failed to close bubble: ${s.actorKey}`);
4328
4635
  }
4329
4636
  });
4330
- return a.set(o.actorKey, c), c;
4637
+ return o.set(s.actorKey, j), k(), u.showAnimation !== void 0 && await j.animate(u.showAnimation), j;
4331
4638
  } catch (e) {
4332
- let t = [], r = await Promise.allSettled([
4333
- y?.stop(),
4334
- b?.stop(),
4335
- x?.stop()
4639
+ o.delete(s.actorKey);
4640
+ let t = [], n = await Promise.allSettled([
4641
+ x?.stop(),
4642
+ S?.stop(),
4643
+ C?.stop()
4336
4644
  ]);
4337
- if (t.push(...r.flatMap((e) => e.status === "rejected" ? [e.reason] : [])), v && g) try {
4338
- await g.hide();
4645
+ if (t.push(...n.flatMap((e) => e.status === "rejected" ? [e.reason] : [])), b && v) try {
4646
+ await v.hide();
4339
4647
  } catch (e) {
4340
4648
  t.push(e);
4341
4649
  }
4342
- if (_ && g) try {
4343
- n.releaseTarget(g.targets.text);
4650
+ if (y && v) try {
4651
+ r.releaseTarget(v.targets.text);
4344
4652
  } catch (e) {
4345
4653
  t.push(e);
4346
4654
  }
4347
- if (g) try {
4348
- await g.dispose();
4655
+ if (v) try {
4656
+ await v.dispose();
4349
4657
  } catch (e) {
4350
4658
  t.push(e);
4351
4659
  }
4352
- throw t.length > 0 ? AggregateError([e, ...t], `Failed to show and clean up bubble: ${o.actorKey}`, { cause: e }) : e;
4660
+ throw t.length > 0 ? AggregateError([e, ...t], `Failed to show and clean up bubble: ${s.actorKey}`, { cause: e }) : e;
4353
4661
  }
4354
4662
  };
4355
4663
  return Object.freeze({
4356
4664
  defineStyle(e) {
4357
- c();
4358
- let t = Or(e);
4359
- i.set(t.name, t);
4665
+ l();
4666
+ let t = Br(e);
4667
+ a.set(t.name, t);
4360
4668
  },
4361
4669
  hasActiveBubble(e) {
4362
- return a.has($(e, "Bubble actor key"));
4670
+ return o.has($(e, "Bubble actor key"));
4363
4671
  },
4364
4672
  async show(e) {
4365
- c();
4366
- let t = Hr(e);
4367
- return l(t.actorKey, () => u(t));
4673
+ l();
4674
+ let t = ni(e);
4675
+ return u(t.actorKey, () => d(t));
4368
4676
  },
4369
4677
  releaseTarget(e) {
4370
- c();
4678
+ l();
4371
4679
  let t = $(e, "Bubble actor key");
4372
- return l(t, async () => {
4373
- await a.get(t)?.close();
4680
+ return u(t, async () => {
4681
+ await o.get(t)?.close();
4374
4682
  });
4375
4683
  },
4376
4684
  async releaseAll() {
4377
- c(), await Promise.allSettled([...o.values()]), Br((await Promise.allSettled([...a.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
4685
+ l(), await Promise.allSettled([...s.values()]), ei((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
4378
4686
  },
4379
4687
  async dispose() {
4380
- if (s) return;
4381
- s = !0, await Promise.allSettled([...o.values()]);
4382
- let e = await Promise.allSettled([...a.values()].map((e) => e.close()));
4383
- i.clear(), Br(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
4688
+ if (c) return;
4689
+ c = !0, await Promise.allSettled([...s.values()]);
4690
+ let e = await Promise.allSettled([...o.values()].map((e) => e.close()));
4691
+ a.clear(), ei(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
4384
4692
  }
4385
4693
  });
4386
4694
  }
4387
4695
  //#endregion
4388
- export { Z as BubbleCompositionError, hr as UnicodeLineBreakProvider, ne as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, we as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, O as bubbleVisualStyles, Ur as createBubbleComposition, x as defaultBubbleDistance, ee as defaultBubbleOffset, f as defaultBubblePlacementInput, S as defaultBubbleTailLength, w as normalizeBubbleDistance, T as normalizeBubbleOffset, y as normalizeBubblePlacement, te as normalizeBubbleTailLength, Ee as renderBubbleSvg, Sr as wrapText };
4696
+ export { Z as BubbleCompositionError, hr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, be as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, Cr as bubbleRevealUnits, M as bubbleVisualStyles, ri as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, S as defaultBubbleTailLength, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, Er as normalizeBubbleReveal, E as normalizeBubbleTailLength, Se as renderBubbleSvg, kr as revealedBubbleText, Or as splitBubbleText, Sr as wrapText };