@kubohiroya/turbowarp-bubble 0.17.0 → 0.17.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.
- package/README.ja.md +3 -3
- package/README.md +3 -3
- package/dist/composition.js +525 -521
- package/dist/turbowarp-adapter.js +1035 -961
- package/dist/turbowarp-bubble.js +188 -57
- package/dist/types/bubble-svg.d.ts +15 -0
- package/docs/assets/bubble-style-gallery.svg +2 -2
- package/docs/assets/width-linebreak-guide.svg +6 -6
- package/docs/block-manual.ja.md +1 -1
- package/docs/block-manual.md +1 -1
- package/docs/index.html +2 -2
- package/docs/ja/index.html +2 -2
- package/package.json +1 -1
package/dist/composition.js
CHANGED
|
@@ -546,10 +546,10 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
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
|
|
549
|
+
function ke(e) {
|
|
550
550
|
return this.compareTo(e) == 0;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function L(e) {
|
|
553
553
|
return this.compareTo(e) < 0 ? this : e;
|
|
554
554
|
}
|
|
555
555
|
function Ae(e) {
|
|
@@ -599,21 +599,21 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
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
|
|
602
|
+
function Ve(e) {
|
|
603
603
|
var t = l();
|
|
604
604
|
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function R(e) {
|
|
607
607
|
var t = l();
|
|
608
608
|
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function z(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
615
|
function He() {
|
|
616
|
-
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB +
|
|
616
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + z(this[e]);
|
|
617
617
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
618
618
|
}
|
|
619
619
|
function Ue(e) {
|
|
@@ -632,10 +632,10 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
632
632
|
var n = c.ONE.shiftLeft(e);
|
|
633
633
|
return this.bitwiseTo(n, t, n), n;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function qe(e) {
|
|
636
636
|
return this.changeBit(e, Pe);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function B(e) {
|
|
639
639
|
return this.changeBit(e, Re);
|
|
640
640
|
}
|
|
641
641
|
function Je(e) {
|
|
@@ -656,11 +656,11 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
656
656
|
var t = l();
|
|
657
657
|
return this.addTo(e, t), t;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Ze(e) {
|
|
660
660
|
var t = l();
|
|
661
661
|
return this.subTo(e, t), t;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function V(e) {
|
|
664
664
|
var t = l();
|
|
665
665
|
return this.multiplyTo(e, t), t;
|
|
666
666
|
}
|
|
@@ -994,7 +994,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
994
994
|
}
|
|
995
995
|
return !0;
|
|
996
996
|
}
|
|
997
|
-
c.prototype.chunkSize = Ce, c.prototype.toRadix = Te, c.prototype.fromRadix = Ee, c.prototype.fromNumber = De, c.prototype.bitwiseTo = je, c.prototype.changeBit = Ke, c.prototype.addTo = Ye, c.prototype.dMultiply = nt, c.prototype.dAddOffset = rt, c.prototype.multiplyLowerTo = lt, c.prototype.multiplyUpperTo = ut, c.prototype.modInt = yt, c.prototype.millerRabin = Ct, c.prototype.clone = ye, c.prototype.intValue = be, c.prototype.byteValue = xe, c.prototype.shortValue = Se, c.prototype.signum = we, c.prototype.toByteArray = Oe, c.prototype.equals =
|
|
997
|
+
c.prototype.chunkSize = Ce, c.prototype.toRadix = Te, c.prototype.fromRadix = Ee, c.prototype.fromNumber = De, c.prototype.bitwiseTo = je, c.prototype.changeBit = Ke, c.prototype.addTo = Ye, c.prototype.dMultiply = nt, c.prototype.dAddOffset = rt, c.prototype.multiplyLowerTo = lt, c.prototype.multiplyUpperTo = ut, c.prototype.modInt = yt, c.prototype.millerRabin = Ct, c.prototype.clone = ye, c.prototype.intValue = be, c.prototype.byteValue = xe, c.prototype.shortValue = Se, c.prototype.signum = we, c.prototype.toByteArray = Oe, c.prototype.equals = ke, c.prototype.min = L, c.prototype.max = Ae, c.prototype.and = Ne, c.prototype.or = Fe, c.prototype.xor = Le, c.prototype.andNot = ze, c.prototype.not = Be, c.prototype.shiftLeft = Ve, c.prototype.shiftRight = R, c.prototype.getLowestSetBit = He, c.prototype.bitCount = We, c.prototype.testBit = Ge, c.prototype.setBit = qe, c.prototype.clearBit = B, c.prototype.flipBit = Je, c.prototype.add = Xe, c.prototype.subtract = Ze, c.prototype.multiply = V, 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 = St, c.prototype.square = Qe;
|
|
998
998
|
var U = c;
|
|
999
999
|
if (U.prototype.IsNegative = function() {
|
|
1000
1000
|
return this.compareTo(U.ZERO) == -1;
|
|
@@ -1016,7 +1016,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
1016
1016
|
return e.divide(t);
|
|
1017
1017
|
}, U.prototype.ToDouble = function() {
|
|
1018
1018
|
return parseFloat(this.toString());
|
|
1019
|
-
},
|
|
1019
|
+
}, wt === void 0) var wt = function(e, t) {
|
|
1020
1020
|
var n;
|
|
1021
1021
|
if (Object.getOwnPropertyNames === void 0) {
|
|
1022
1022
|
for (n in t.prototype) (e.prototype[n] === void 0 || e.prototype[n] == Object.prototype[n]) && (e.prototype[n] = t.prototype[n]);
|
|
@@ -1072,7 +1072,7 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
1072
1072
|
return this.m_Childs.length > 0 ? this.m_Childs[0] : null;
|
|
1073
1073
|
}, e.PolyTree.prototype.Total = function() {
|
|
1074
1074
|
return this.m_AllPolys.length;
|
|
1075
|
-
},
|
|
1075
|
+
}, wt(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);
|
|
@@ -1878,16 +1878,16 @@ var O = /* @__PURE__ */ o(((e, t) => {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
this.m_IntersectList.length = 0;
|
|
1880
1880
|
};
|
|
1881
|
-
var
|
|
1881
|
+
var W = function(e) {
|
|
1882
1882
|
return e < 0 ? Math.ceil(e - .5) : Math.round(e);
|
|
1883
1883
|
}, Tt = function(e) {
|
|
1884
1884
|
return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
|
|
1885
|
-
}, G = function(e) {
|
|
1886
|
-
return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
|
|
1887
1885
|
}, Et = function(e) {
|
|
1886
|
+
return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
|
|
1887
|
+
}, G = 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 =
|
|
1890
|
+
a.msie ? e.Clipper.Round = W : a.chromium ? e.Clipper.Round = Et : a.safari ? e.Clipper.Round = G : 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 O = /* @__PURE__ */ o(((e, t) => {
|
|
|
2265
2265
|
}, e.Clipper.ClosedPathsFromPolyTree = function(t) {
|
|
2266
2266
|
var n = new e.Paths();
|
|
2267
2267
|
return e.Clipper.AddPolyNodeToPaths(t, e.Clipper.NodeType.ntClosed, n), n;
|
|
2268
|
-
},
|
|
2268
|
+
}, wt(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
|
|
2269
2269
|
ntAny: 0,
|
|
2270
2270
|
ntOpen: 1,
|
|
2271
2271
|
ntClosed: 2
|
|
@@ -2772,27 +2772,27 @@ function ae(e) {
|
|
|
2772
2772
|
if (!Number.isFinite(t)) throw TypeError("tailDirection must be finite.");
|
|
2773
2773
|
return (t % 360 + 360) % 360;
|
|
2774
2774
|
}
|
|
2775
|
-
function oe(e, t, n = 18) {
|
|
2776
|
-
let r = e -
|
|
2775
|
+
function oe(e, t, n = 18, r = 24) {
|
|
2776
|
+
let i = r, a = r, o = e - r, s = t - r;
|
|
2777
2777
|
return [
|
|
2778
2778
|
{
|
|
2779
|
-
centerX:
|
|
2780
|
-
centerY:
|
|
2779
|
+
centerX: o - n,
|
|
2780
|
+
centerY: a + n,
|
|
2781
2781
|
start: -90
|
|
2782
2782
|
},
|
|
2783
2783
|
{
|
|
2784
|
-
centerX:
|
|
2785
|
-
centerY:
|
|
2784
|
+
centerX: o - n,
|
|
2785
|
+
centerY: s - n,
|
|
2786
2786
|
start: 0
|
|
2787
2787
|
},
|
|
2788
2788
|
{
|
|
2789
|
-
centerX:
|
|
2790
|
-
centerY:
|
|
2789
|
+
centerX: i + n,
|
|
2790
|
+
centerY: s - n,
|
|
2791
2791
|
start: 90
|
|
2792
2792
|
},
|
|
2793
2793
|
{
|
|
2794
|
-
centerX:
|
|
2795
|
-
centerY:
|
|
2794
|
+
centerX: i + n,
|
|
2795
|
+
centerY: a + n,
|
|
2796
2796
|
start: 180
|
|
2797
2797
|
}
|
|
2798
2798
|
].flatMap(({ centerX: e, centerY: t, start: r }) => Array.from({ length: 11 }, (i, a) => {
|
|
@@ -2926,48 +2926,52 @@ function _e(e, t, n, r, i, a = "") {
|
|
|
2926
2926
|
if (!d) throw Error("JSClipper returned an empty Bubble outline.");
|
|
2927
2927
|
return `<path d="${me(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
|
|
2928
2928
|
}
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2929
|
+
var ve = Object.freeze([
|
|
2930
|
+
1,
|
|
2931
|
+
.78,
|
|
2932
|
+
1.14,
|
|
2933
|
+
.88,
|
|
2934
|
+
1.06,
|
|
2935
|
+
.8,
|
|
2936
|
+
1.2,
|
|
2937
|
+
.92
|
|
2938
|
+
]);
|
|
2939
|
+
function ye(e, t) {
|
|
2940
|
+
let n = e - 48, r = t - 48, i = e / 2, a = t / 2, o = Math.min(40, Math.max(22, 20 + Math.min(n, r) * .12 + Math.max(n, r) * .03)), s = o * .34, c = Math.max(1, n / 2 - s), l = Math.max(1, r / 2 - s), u = (e) => {
|
|
2941
|
+
let t = Math.cos(e), n = Math.sin(e);
|
|
2942
|
+
return {
|
|
2943
|
+
x: i + c * Math.sign(t) * Math.abs(t) ** (2 / 3),
|
|
2944
|
+
y: a + l * Math.sign(n) * Math.abs(n) ** (2 / 3)
|
|
2941
2945
|
};
|
|
2942
|
-
|
|
2946
|
+
}, d = [0], f = u(-Math.PI / 2);
|
|
2947
|
+
for (let e = 1; e <= 720; e += 1) {
|
|
2948
|
+
let t = u(-Math.PI / 2 + e * Math.PI * 2 / 720);
|
|
2949
|
+
d.push((d[e - 1] ?? 0) + Math.hypot(t.x - f.x, t.y - f.y)), f = t;
|
|
2950
|
+
}
|
|
2951
|
+
let p = d[720] ?? 0, m = ve.reduce((e, t) => e + t, 0), h = Math.max(8, Math.round(p / (o * m) * ve.length)), g = Array.from({ length: h }, (e, t) => ve[t % ve.length] ?? 1), _ = g.reduce((e, t) => e + t, 0), v = (e) => {
|
|
2952
|
+
let t = 0, n = 720;
|
|
2953
|
+
for (; n - t > 1;) {
|
|
2954
|
+
let r = t + n >> 1;
|
|
2955
|
+
(d[r] ?? 0) <= e ? t = r : n = r;
|
|
2956
|
+
}
|
|
2957
|
+
let r = d[t] ?? 0, i = d[n] ?? r, a = i > r ? (e - r) / (i - r) : 0;
|
|
2958
|
+
return u(-Math.PI / 2 + (t + a) * Math.PI * 2 / 720);
|
|
2959
|
+
}, y = 0;
|
|
2960
|
+
return g.map((e) => {
|
|
2961
|
+
let t = v(y / _ * p);
|
|
2962
|
+
return y += e, t;
|
|
2943
2963
|
});
|
|
2944
|
-
return `M ${n(t.x)} ${n(t.y)} ${r.join(" ")} Z`;
|
|
2945
2964
|
}
|
|
2946
|
-
function
|
|
2947
|
-
let i = e
|
|
2948
|
-
|
|
2949
|
-
|
|
2965
|
+
function be(e, t, n, r) {
|
|
2966
|
+
let i = (e) => e.toFixed(4), a = ye(e, t), o = a[0];
|
|
2967
|
+
if (!o) throw Error("Cloud Bubble path is invalid.");
|
|
2968
|
+
let s = a.map((e, t) => {
|
|
2969
|
+
let n = a[t] ?? o, r = a[(t + 1) % a.length] ?? o, s = Math.hypot(r.x - n.x, r.y - n.y) * .56;
|
|
2970
|
+
return `A ${i(s)} ${i(s)} 0 0 1 ${i(r.x)} ${i(r.y)}`;
|
|
2950
2971
|
});
|
|
2951
|
-
return `<path d="${
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
c(.18, .2),
|
|
2955
|
-
c(.28, .04),
|
|
2956
|
-
c(.5, .16),
|
|
2957
|
-
c(.68, .03),
|
|
2958
|
-
c(.84, .18),
|
|
2959
|
-
c(.98, .3),
|
|
2960
|
-
c(1, .52),
|
|
2961
|
-
c(.95, .7),
|
|
2962
|
-
c(.82, .82),
|
|
2963
|
-
c(.68, .97),
|
|
2964
|
-
c(.5, .84),
|
|
2965
|
-
c(.32, .97),
|
|
2966
|
-
c(.18, .82),
|
|
2967
|
-
c(.03, .7)
|
|
2968
|
-
])}" fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
|
|
2969
|
-
}
|
|
2970
|
-
function be(e, t, n, r, i, a) {
|
|
2972
|
+
return `<path d="M ${i(o.x)} ${i(o.y)} ${s.join(" ")} Z" fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
|
|
2973
|
+
}
|
|
2974
|
+
function xe(e, t, n, r, i, a) {
|
|
2971
2975
|
let o = ce(n, t), s = Math.hypot(o.x, o.y), c = I(e, t, {
|
|
2972
2976
|
x: o.x / s,
|
|
2973
2977
|
y: o.y / s
|
|
@@ -2996,7 +3000,7 @@ function be(e, t, n, r, i, a) {
|
|
|
2996
3000
|
radius: 3.5
|
|
2997
3001
|
}]).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("");
|
|
2998
3002
|
}
|
|
2999
|
-
function
|
|
3003
|
+
function Se(e, t) {
|
|
3000
3004
|
let n = e / 2, r = t / 2;
|
|
3001
3005
|
return Array.from({ length: 28 }, (i, a) => {
|
|
3002
3006
|
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;
|
|
@@ -3006,7 +3010,7 @@ function xe(e, t) {
|
|
|
3006
3010
|
};
|
|
3007
3011
|
});
|
|
3008
3012
|
}
|
|
3009
|
-
function
|
|
3013
|
+
function Ce(e, t) {
|
|
3010
3014
|
let n = e - 24, r = t - 24, i = Array.from({ length: 21 }, (e, t) => {
|
|
3011
3015
|
let n = t / 20;
|
|
3012
3016
|
return {
|
|
@@ -3039,22 +3043,22 @@ function Se(e, t) {
|
|
|
3039
3043
|
}))
|
|
3040
3044
|
];
|
|
3041
3045
|
}
|
|
3042
|
-
function
|
|
3043
|
-
return e === "YELLING" ?
|
|
3046
|
+
function we(e, t, n) {
|
|
3047
|
+
return e === "YELLING" ? Se(t, n) : e === "WAVY" ? Ce(t, n) : oe(t, n);
|
|
3044
3048
|
}
|
|
3045
|
-
function
|
|
3049
|
+
function Te(e) {
|
|
3046
3050
|
let t = ie(e.style), n = Math.max(F(e.width, 220), t.width), r = Math.max(F(e.height, 112), t.height), i = ae(e.tailDirection);
|
|
3047
3051
|
if (i === null) throw TypeError("Bubble body center offset requires a tail direction.");
|
|
3048
3052
|
let a = j(e.tailLength ?? te), o = M(e.offset), s = {
|
|
3049
3053
|
x: n / 2,
|
|
3050
3054
|
y: r / 2
|
|
3051
|
-
}, c = pe(
|
|
3055
|
+
}, c = pe(we(e.style, n, r), n, r, i, a, o);
|
|
3052
3056
|
return Object.freeze({
|
|
3053
3057
|
x: c.bodyCenter.x - s.x,
|
|
3054
3058
|
y: c.bodyCenter.y - s.y
|
|
3055
3059
|
});
|
|
3056
3060
|
}
|
|
3057
|
-
function
|
|
3061
|
+
function Ee(e, t, n, r, i, a, o, s) {
|
|
3058
3062
|
let c = oe(t, n), l = (e) => r === null ? e : pe(e, t, n, r, o, s).body, u = (e, c = "") => {
|
|
3059
3063
|
if (r === null) return ge(e, i, a, c);
|
|
3060
3064
|
let l = pe(e, t, n, r, o, s);
|
|
@@ -3064,15 +3068,15 @@ function Te(e, t, n, r, i, a, o, s) {
|
|
|
3064
3068
|
case "NO_BUBBLE": return "";
|
|
3065
3069
|
case "THINKING":
|
|
3066
3070
|
case "DREAMING": {
|
|
3067
|
-
if (r === null) return
|
|
3071
|
+
if (r === null) return be(t, n, i, a);
|
|
3068
3072
|
let l = pe(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
|
|
3069
3073
|
x: t / 2,
|
|
3070
3074
|
y: n / 2
|
|
3071
3075
|
}, f = l.bodyCenter.x - d.x * u, p = l.bodyCenter.y - d.y * u;
|
|
3072
|
-
return `${
|
|
3076
|
+
return `${xe(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${be(t, n, i, a)}</g>`;
|
|
3073
3077
|
}
|
|
3074
|
-
case "YELLING": return u(
|
|
3075
|
-
case "WAVY": return u(
|
|
3078
|
+
case "YELLING": return u(Se(t, n));
|
|
3079
|
+
case "WAVY": return u(Ce(t, n));
|
|
3076
3080
|
case "WHISPERING": return u(c, "stroke-dasharray=\"5 5\"");
|
|
3077
3081
|
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"/>`;
|
|
3078
3082
|
case "NARRATION": return ge(l(c), i, a);
|
|
@@ -3080,7 +3084,7 @@ function Te(e, t, n, r, i, a, o, s) {
|
|
|
3080
3084
|
case "NORMAL": return u(c);
|
|
3081
3085
|
}
|
|
3082
3086
|
}
|
|
3083
|
-
function
|
|
3087
|
+
function De(e) {
|
|
3084
3088
|
if (!N.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
|
|
3085
3089
|
if (!Array.isArray(e.lines) || e.lines.some((e) => typeof e != "string")) throw TypeError("lines must be an array of strings.");
|
|
3086
3090
|
let t = F(e.width, 220), n = F(e.height, 112), r = F(e.fontSize, 15), i = ae(e.tailDirection), a = j(e.tailLength ?? te), o = e.offset === void 0 ? A : M(e.offset), s = e.shapeTransition;
|
|
@@ -3088,12 +3092,12 @@ function Ee(e) {
|
|
|
3088
3092
|
let c = ie(e.style, ...s === void 0 ? [] : [s.from, s.to]), l = Math.max(t, c.width), u = Math.max(n, c.height), d = e.fillColor ?? "#fff4cc", f = e.borderColor ?? "#6f5b45", p = e.textColor ?? "#25283a", m = e.fontFamily ?? "Noto Sans JP, sans-serif", h = r * 1.35, g = u / 2 - (e.lines.length - 1) * h / 2 + r * .35, _ = i === null ? 1 : o.scalePercent / 100, v = i === null ? {
|
|
3089
3093
|
x: l / 2,
|
|
3090
3094
|
y: u / 2
|
|
3091
|
-
} : pe(oe(l, u), l, u, i, a, o).bodyCenter, y = e.lines.map((e, t) => `<text x="${v.x}" y="${v.y + (g + t * h - u / 2) * _}" text-anchor="middle" fill="${P(p)}" font-family="${P(m)}" font-size="${r * _}">${P(e)}</text>`).join(""), b = s === void 0 ?
|
|
3095
|
+
} : pe(oe(l, u), l, u, i, a, o).bodyCenter, y = e.lines.map((e, t) => `<text x="${v.x}" y="${v.y + (g + t * h - u / 2) * _}" text-anchor="middle" fill="${P(p)}" font-family="${P(m)}" font-size="${r * _}">${P(e)}</text>`).join(""), b = s === void 0 ? Ee(e.style, l, u, i, d, f, a, o) : `<g opacity="${(1 - s.progress).toFixed(4)}">${Ee(s.from, l, u, i, d, f, a, o)}</g><g opacity="${s.progress.toFixed(4)}">${Ee(s.to, l, u, i, d, f, a, o)}</g>`, x = P(e.title ?? `${e.style} bubble`), S = s === void 0 ? "" : ` data-bubble-shape-transition-from="${s.from}" data-bubble-shape-transition-to="${s.to}" data-bubble-shape-transition-progress="${s.progress.toFixed(4)}"`;
|
|
3092
3096
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${u}" viewBox="0 0 ${l} ${u}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}" data-bubble-body-width="${l}" data-bubble-body-height="${u}"${S}><title>${x}</title>${b}${y}</svg>`;
|
|
3093
3097
|
}
|
|
3094
3098
|
//#endregion
|
|
3095
3099
|
//#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/constants.js
|
|
3096
|
-
var
|
|
3100
|
+
var Oe = 2048, ke = 2112, L = Uint8Array, Ae = Uint16Array, je = Int32Array, Me = new L([
|
|
3097
3101
|
0,
|
|
3098
3102
|
0,
|
|
3099
3103
|
0,
|
|
@@ -3126,7 +3130,7 @@ var De = 2048, Oe = 2112, L = Uint8Array, ke = Uint16Array, Ae = Int32Array, je
|
|
|
3126
3130
|
0,
|
|
3127
3131
|
0,
|
|
3128
3132
|
0
|
|
3129
|
-
]),
|
|
3133
|
+
]), Ne = new L([
|
|
3130
3134
|
0,
|
|
3131
3135
|
0,
|
|
3132
3136
|
0,
|
|
@@ -3159,7 +3163,7 @@ var De = 2048, Oe = 2112, L = Uint8Array, ke = Uint16Array, Ae = Int32Array, je
|
|
|
3159
3163
|
13,
|
|
3160
3164
|
0,
|
|
3161
3165
|
0
|
|
3162
|
-
]),
|
|
3166
|
+
]), Pe = new L([
|
|
3163
3167
|
16,
|
|
3164
3168
|
17,
|
|
3165
3169
|
18,
|
|
@@ -3179,51 +3183,51 @@ var De = 2048, Oe = 2112, L = Uint8Array, ke = Uint16Array, Ae = Int32Array, je
|
|
|
3179
3183
|
14,
|
|
3180
3184
|
1,
|
|
3181
3185
|
15
|
|
3182
|
-
]),
|
|
3183
|
-
for (var n = new
|
|
3184
|
-
for (var i = new
|
|
3186
|
+
]), Fe = function(e, t) {
|
|
3187
|
+
for (var n = new Ae(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
|
|
3188
|
+
for (var i = new je(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
|
|
3185
3189
|
return {
|
|
3186
3190
|
b: n,
|
|
3187
3191
|
r: i
|
|
3188
3192
|
};
|
|
3189
|
-
},
|
|
3190
|
-
|
|
3191
|
-
var
|
|
3192
|
-
|
|
3193
|
-
for (var
|
|
3193
|
+
}, Ie = Fe(Me, 2), Le = Ie.b, Re = Ie.r;
|
|
3194
|
+
Le[28] = 258, Re[258] = 28;
|
|
3195
|
+
var ze = Fe(Ne, 0), Be = ze.b;
|
|
3196
|
+
ze.r;
|
|
3197
|
+
for (var Ve = new Ae(32768), R = 0; R < 32768; ++R) {
|
|
3194
3198
|
var z = (R & 43690) >> 1 | (R & 21845) << 1;
|
|
3195
|
-
z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4,
|
|
3199
|
+
z = (z & 52428) >> 2 | (z & 13107) << 2, z = (z & 61680) >> 4 | (z & 3855) << 4, Ve[R] = ((z & 65280) >> 8 | (z & 255) << 8) >> 1;
|
|
3196
3200
|
}
|
|
3197
|
-
for (var
|
|
3198
|
-
for (var r = e.length, i = 0, a = new
|
|
3199
|
-
var o = new
|
|
3201
|
+
for (var He = (function(e, t, n) {
|
|
3202
|
+
for (var r = e.length, i = 0, a = new Ae(t); i < r; ++i) e[i] && ++a[e[i] - 1];
|
|
3203
|
+
var o = new Ae(t);
|
|
3200
3204
|
for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
|
|
3201
3205
|
var s;
|
|
3202
3206
|
if (n) {
|
|
3203
|
-
s = new
|
|
3207
|
+
s = new Ae(1 << t);
|
|
3204
3208
|
var c = 15 - t;
|
|
3205
|
-
for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[
|
|
3206
|
-
} else for (s = new
|
|
3209
|
+
for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[Ve[d] >> c] = l;
|
|
3210
|
+
} else for (s = new Ae(r), i = 0; i < r; ++i) e[i] && (s[i] = Ve[o[e[i] - 1]++] >> 15 - e[i]);
|
|
3207
3211
|
return s;
|
|
3208
|
-
}),
|
|
3209
|
-
for (var R = 144; R < 256; ++R)
|
|
3210
|
-
for (var R = 256; R < 280; ++R)
|
|
3211
|
-
for (var R = 280; R < 288; ++R)
|
|
3212
|
-
for (var
|
|
3213
|
-
var
|
|
3212
|
+
}), Ue = new L(288), R = 0; R < 144; ++R) Ue[R] = 8;
|
|
3213
|
+
for (var R = 144; R < 256; ++R) Ue[R] = 9;
|
|
3214
|
+
for (var R = 256; R < 280; ++R) Ue[R] = 7;
|
|
3215
|
+
for (var R = 280; R < 288; ++R) Ue[R] = 8;
|
|
3216
|
+
for (var We = new L(32), R = 0; R < 32; ++R) We[R] = 5;
|
|
3217
|
+
var Ge = /*#__PURE__*/ He(Ue, 9, 1), Ke = /*#__PURE__*/ He(We, 5, 1), qe = function(e) {
|
|
3214
3218
|
for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
|
|
3215
3219
|
return t;
|
|
3216
3220
|
}, B = function(e, t, n) {
|
|
3217
3221
|
var r = t / 8 | 0;
|
|
3218
3222
|
return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
|
|
3219
|
-
},
|
|
3223
|
+
}, Je = function(e, t) {
|
|
3220
3224
|
var n = t / 8 | 0;
|
|
3221
3225
|
return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
|
|
3222
|
-
},
|
|
3226
|
+
}, Ye = function(e) {
|
|
3223
3227
|
return (e + 7) / 8 | 0;
|
|
3224
|
-
},
|
|
3228
|
+
}, Xe = function(e, t, n) {
|
|
3225
3229
|
return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new L(e.subarray(t, n));
|
|
3226
|
-
},
|
|
3230
|
+
}, Ze = [
|
|
3227
3231
|
"unexpected EOF",
|
|
3228
3232
|
"invalid block type",
|
|
3229
3233
|
"invalid length/literal",
|
|
@@ -3239,10 +3243,10 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3239
3243
|
"stream finishing",
|
|
3240
3244
|
"invalid zip data"
|
|
3241
3245
|
], V = function(e, t, n) {
|
|
3242
|
-
var r = Error(t ||
|
|
3246
|
+
var r = Error(t || Ze[e]);
|
|
3243
3247
|
if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, V), !n) throw r;
|
|
3244
3248
|
return r;
|
|
3245
|
-
},
|
|
3249
|
+
}, Qe = function(e, t, n, r) {
|
|
3246
3250
|
var i = e.length, a = r ? r.length : 0;
|
|
3247
3251
|
if (!i || t.f && !t.l) return n || new L(0);
|
|
3248
3252
|
var o = !n, s = o || t.i != 2, c = t.i;
|
|
@@ -3259,7 +3263,7 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3259
3263
|
u = B(e, d, 1);
|
|
3260
3264
|
var v = B(e, d + 1, 3);
|
|
3261
3265
|
if (d += 3, !v) {
|
|
3262
|
-
var y =
|
|
3266
|
+
var y = Ye(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
|
|
3263
3267
|
if (x > i) {
|
|
3264
3268
|
c && V(0);
|
|
3265
3269
|
break;
|
|
@@ -3267,13 +3271,13 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3267
3271
|
s && l(f + b), n.set(e.subarray(y, x), f), t.b = f += b, t.p = d = x * 8, t.f = u;
|
|
3268
3272
|
continue;
|
|
3269
3273
|
}
|
|
3270
|
-
if (v == 1) p =
|
|
3274
|
+
if (v == 1) p = Ge, m = Ke, h = 9, g = 5;
|
|
3271
3275
|
else if (v == 2) {
|
|
3272
3276
|
var S = B(e, d, 31) + 257, C = B(e, d + 10, 15) + 4, w = S + B(e, d + 5, 31) + 1;
|
|
3273
3277
|
d += 14;
|
|
3274
|
-
for (var T = new L(w), E = new L(19), D = 0; D < C; ++D) E[
|
|
3278
|
+
for (var T = new L(w), E = new L(19), D = 0; D < C; ++D) E[Pe[D]] = B(e, d + D * 3, 7);
|
|
3275
3279
|
d += C * 3;
|
|
3276
|
-
for (var ee =
|
|
3280
|
+
for (var ee = qe(E), O = (1 << ee) - 1, k = He(E, ee, 1), D = 0; D < w;) {
|
|
3277
3281
|
var te = k[B(e, d, O)];
|
|
3278
3282
|
d += te & 15;
|
|
3279
3283
|
var y = te >> 4;
|
|
@@ -3284,7 +3288,7 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3284
3288
|
}
|
|
3285
3289
|
}
|
|
3286
3290
|
var M = T.subarray(0, S), N = T.subarray(S);
|
|
3287
|
-
h =
|
|
3291
|
+
h = qe(M), g = qe(N), p = He(M, h, 1), m = He(N, g, 1);
|
|
3288
3292
|
} else V(1);
|
|
3289
3293
|
if (d > _) {
|
|
3290
3294
|
c && V(0);
|
|
@@ -3293,7 +3297,7 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3293
3297
|
}
|
|
3294
3298
|
s && l(f + 131072);
|
|
3295
3299
|
for (var ne = (1 << h) - 1, re = (1 << g) - 1, ie = d;; ie = d) {
|
|
3296
|
-
var A = p[
|
|
3300
|
+
var A = p[Je(e, d) & ne], P = A >> 4;
|
|
3297
3301
|
if (d += A & 15, d > _) {
|
|
3298
3302
|
c && V(0);
|
|
3299
3303
|
break;
|
|
@@ -3305,15 +3309,15 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3305
3309
|
} else {
|
|
3306
3310
|
var F = P - 254;
|
|
3307
3311
|
if (P > 264) {
|
|
3308
|
-
var D = P - 257, ae =
|
|
3309
|
-
F = B(e, d, (1 << ae) - 1) +
|
|
3312
|
+
var D = P - 257, ae = Me[D];
|
|
3313
|
+
F = B(e, d, (1 << ae) - 1) + Le[D], d += ae;
|
|
3310
3314
|
}
|
|
3311
|
-
var oe = m[
|
|
3315
|
+
var oe = m[Je(e, d) & re], se = oe >> 4;
|
|
3312
3316
|
oe || V(3), d += oe & 15;
|
|
3313
|
-
var N =
|
|
3317
|
+
var N = Be[se];
|
|
3314
3318
|
if (se > 3) {
|
|
3315
|
-
var ae =
|
|
3316
|
-
N +=
|
|
3319
|
+
var ae = Ne[se];
|
|
3320
|
+
N += Je(e, d) & (1 << ae) - 1, d += ae;
|
|
3317
3321
|
}
|
|
3318
3322
|
if (d > _) {
|
|
3319
3323
|
c && V(0);
|
|
@@ -3330,29 +3334,29 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3330
3334
|
}
|
|
3331
3335
|
t.l = p, t.p = ie, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
|
|
3332
3336
|
} while (!u);
|
|
3333
|
-
return f != n.length && o ?
|
|
3334
|
-
},
|
|
3337
|
+
return f != n.length && o ? Xe(n, 0, f) : n.subarray(0, f);
|
|
3338
|
+
}, $e = /*#__PURE__*/ new L(0), et = function(e) {
|
|
3335
3339
|
(e[0] != 31 || e[1] != 139 || e[2] != 8) && V(6, "invalid gzip data");
|
|
3336
3340
|
var t = e[3], n = 10;
|
|
3337
3341
|
t & 4 && (n += (e[10] | e[11] << 8) + 2);
|
|
3338
3342
|
for (var r = (t >> 3 & 1) + (t >> 4 & 1); r > 0; r -= !e[n++]);
|
|
3339
3343
|
return n + (t & 2);
|
|
3340
|
-
},
|
|
3344
|
+
}, tt = function(e) {
|
|
3341
3345
|
var t = e.length;
|
|
3342
3346
|
return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
|
|
3343
3347
|
};
|
|
3344
|
-
function
|
|
3345
|
-
var n =
|
|
3346
|
-
return n + 8 > e.length && V(6, "invalid gzip data"),
|
|
3348
|
+
function nt(e, t) {
|
|
3349
|
+
var n = et(e);
|
|
3350
|
+
return n + 8 > e.length && V(6, "invalid gzip data"), Qe(e.subarray(n, -8), { i: 2 }, t && t.out || new L(tt(e)), t && t.dictionary);
|
|
3347
3351
|
}
|
|
3348
|
-
var
|
|
3352
|
+
var rt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
|
|
3349
3353
|
try {
|
|
3350
|
-
|
|
3354
|
+
rt.decode($e, { stream: !0 });
|
|
3351
3355
|
} catch {}
|
|
3352
3356
|
//#endregion
|
|
3353
3357
|
//#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/swap.js
|
|
3354
|
-
var
|
|
3355
|
-
function
|
|
3358
|
+
var it = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
|
|
3359
|
+
function at(e) {
|
|
3356
3360
|
let t = e.length;
|
|
3357
3361
|
for (let n = 0; n < t; n += 4) [e[n], e[n + 1], e[n + 2], e[n + 3]] = [
|
|
3358
3362
|
e[n + 3],
|
|
@@ -3361,15 +3365,15 @@ function it(e) {
|
|
|
3361
3365
|
e[n]
|
|
3362
3366
|
];
|
|
3363
3367
|
}
|
|
3364
|
-
function
|
|
3365
|
-
var
|
|
3368
|
+
function ot(e) {}
|
|
3369
|
+
var st = it ? at : ot, ct = new TextDecoder(), lt = class e {
|
|
3366
3370
|
constructor(e) {
|
|
3367
3371
|
if (e instanceof Uint8Array) {
|
|
3368
3372
|
let t = 0, n = new DataView(e.buffer);
|
|
3369
3373
|
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.");
|
|
3370
3374
|
if (t = n.getUint32(12, !0), 16 + t > e.byteLength) throw RangeError("Invalid input length");
|
|
3371
3375
|
let r = e.subarray(16 + t);
|
|
3372
|
-
this.values = r.length ? JSON.parse(
|
|
3376
|
+
this.values = r.length ? JSON.parse(ct.decode(nt(r))) : [], e = nt(e.subarray(16, 16 + t)), st(e), this.data = new Int32Array(e.buffer);
|
|
3373
3377
|
} else ({data: this.data, highStart: this.highStart, errorValue: this.errorValue, values: this.values = []} = e);
|
|
3374
3378
|
}
|
|
3375
3379
|
static fromBase64(t) {
|
|
@@ -3382,10 +3386,10 @@ var ot = rt ? it : at, st = new TextDecoder(), ct = class e {
|
|
|
3382
3386
|
let n = (this.data[e >> 5] << 2) + (e & 31);
|
|
3383
3387
|
t = this.data[n];
|
|
3384
3388
|
} else if (e <= 65535) {
|
|
3385
|
-
let n = (this.data[
|
|
3389
|
+
let n = (this.data[Oe + (e - 55296 >> 5)] << 2) + (e & 31);
|
|
3386
3390
|
t = this.data[n];
|
|
3387
3391
|
} else if (e < this.highStart) {
|
|
3388
|
-
let n = this.data[
|
|
3392
|
+
let n = this.data[ke - 32 + (e >> 11)];
|
|
3389
3393
|
n = this.data[n + (e >> 5 & 63)], n = (n << 2) + (e & 31), t = this.data[n];
|
|
3390
3394
|
} else t = this.data[this.data.length - 4];
|
|
3391
3395
|
return t;
|
|
@@ -3394,26 +3398,26 @@ var ot = rt ? it : at, st = new TextDecoder(), ct = class e {
|
|
|
3394
3398
|
let t = this.get(e);
|
|
3395
3399
|
return this.values[t] ?? t;
|
|
3396
3400
|
}
|
|
3397
|
-
},
|
|
3398
|
-
function
|
|
3401
|
+
}, ut = lt.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 55F0XTBGOlY5GhwHxoOJYAqYBn4AfiyOLwVXgvnSc9dKxzeC28XxEoNbbdq0iQvXEe24aNOm\n TZs2bdq0aePC0ob55yFhPg5IHlI3Rl4Je8+I/vALMN+T7v3DMN5+B/c+BJ23hhwQ0LUeMM+G\n OQrshuM9AMkJ94b5WfBF8GVwKPg6+CYgOc7xME8BLFsiJuH8LPA9MFO8/yJhMnNxfjm4AlwJ\n rgK/AleD+e177Xvte+177XvR7/0O3ARuBSQzLcmd8ENJSoe/TZsmE9qfvR9l7FHwhNL3c+Ep\n zbPP4trz4FXwT/AB2Gyb/7WzJc67g16gLxgIBgOasxkCcxgoXf/c2+1jDu7ean0fLDbwDvjc\n 9pi7Aj8H8r1V4vxlmLvtgLlCMBesBNvs+PG9g2GeBxaB5aB7j1brOczh9UN8nAiuBs8BGg8c\n BqgP/xOqI2n+VvAQzile53T6L6NwLts5G+eLwSpxfT3M4dtiTg0sAevB8O1wDuT35GZJA9yX\n 461NmzZtNiXWow6cTrpKaCNGU3uhtPNjcW0cOEFq28fjeAI4HUwWz8iQbIvsrYM5VTw3HSbp\n Fs2EebG4dpnGPYL0hM4n3SfcXyDsLhTmzTBvA3eI86VKn6MK0lshfao/kt9x/pjk7ydFW7lG\n vIt0rl4W99+EuQ58BEh3jP3bBW1oVxHObjjeCfQB7B7bG8DXYJ5OelYwvwS+Ath9fuY0KT4O\n E88dKcxjYJIs8NswT5WeVSG/k/0zYOcccL54nuLvh+QHmD8V5jJA8fILnP8Lz10N87eAdMRu\n grlY9Bfo/AGYfwYrxPl9eOdqHK8l/+D47zDfFv76AOZmyFeTcLwVzB1AL9AXDAT7gSFgGBgB\n yH87ks4ZjseK86+CcdQ+a8JI90/GvQniPtufjPOp4vkLYc4Gc8Hl4NfgesP7Fin3OE3uwvVl\n 4BGwQrKzGsd/BS+C18Hb4APhdif0J7sC1unbHsf83C7SMd3vh/O9yC4YCoaBQ8Aoyd4YHB8J\n jgUngVMBlQ8qG2dI9nScg/sXgJngYsnupTi+EvxG+DMnXI7UuCZuNPjn9pqwboxQOeXwc50Q\n gyUinh8wxPfDFfeW4/qqAvmmaVDb6PvsGiX+XvLM2/1Qb76xEZeLGOlEdTC1i+tEnNMx1Z8f\n ivPOGJtvDXYEJNfw9eeueL4uHLvDziBA/Rb5+gG4Rvq0n5feQTKJXHp8rlBfaiT8R7KcKnnV\n 4Yb42BQ4wjL9joG9E8Apjul9uBL3TS+/kxC+74LzGpAvTHl7BvznUyYuwnM05iGoLM/F+Tzl\n XdyHqStbZM4S5/PxjoXgJvEuWqvAdkmuKIeL6hV5TET9e6r/qsJPazHIvBfveQgsF248BXMF\n 1YcOcXGERXv4AslIPeNXhuL3TVFnroO5HmwB2WtT8j21Mdsa/NMT93qDDevFkJ79Fbsb1s7g\n 2hDLMFE/cZh434iAeKD3jDY8T/fHGu5TuMfVuH+y8KeOCeJZPp+cIU1JD4fcmiq5NVvIIaqe\n oXJyIezPBpeAK8AC8Xxvi/5YXd1+A951C6C1R4uFeTdMurdMmC78Cc+sBM+ANdLzNF/xBlgH\n PpKud8G8xXagB9gZ9AF0fQ+Yg8QxcQCOh4rz4TBHimM5TQ/HNT5egHDQfdZFOkrcI/nEcTge\n Dyh+JsKcIt41TZgzYM5S3j9H8gsxD+dXSe4x10rXrleeyc2iwu6XhsJ/F8WBqMeJ/ysfBpaJ\n PNKReXzzThvYDKd1YFn0hscg/tsALZ21ec4GsTS0hWLZou4kDX9oaELHdI1EeiT24ntUtVGX\n g0yq7igpbCD7BL2HIXfl89RQWCgMHJ7ckPuUlpj63XBO8Y9pyE2aTf2nK5NQC4hWvuvoKfIl\n lXkqGwzlz50EfMx1BOVhztP8HNvdWXlWhp6Xz8ndlOWN/V6K0u43Dc4fch7gc9s4U/OU/Azn\n vZLkKrdNheqTKnzeVxff/FOvc19D/dW9SzZjkuKdMfPmxlrn5Ix3mzzWBKhs9NL4l9rxqj5J\n 06HwcD6W8zQf01iDzLrfLhmpc1vNVza/qvGXnP7UZ2PUcZlLnHOcksk0KZ+nyGe2412KW13c\n p65rOQ3qwmCyo8afzi7bsY2PmPV4yfYqZl7qKO1F6nhyreNs6rvY+S9XnOjaai7TssxAHqfn\n 8GuV/9XrVfZi5PVcZaXK367u636hfuP8bCtL8u3np+6vURhK9BObUPZjxm+scZ0810DkrFfV\n 8uY6zgotWy5ygSq35DJYlyZqedWVX5s2UTeeqQqT6pZr+vJ4QRc/fF1uj6rCZYprU1hypG/d\n sRznpnS1Sd+6dKzLa3X5wzZ9dfWEa5/Mtfzq0qRE+vqWX10eqErfkL6tOubxLb8s1zG54RLO\n nPWzb/3pkl9z1J8ufcQqP9fl9ao6w9Re6cKsS7u6a3Xto2s81NWvpjxqW/5s5IEpxpncTtr2\n 4XPWpbHGWa79Idv0NMWZKR5i1aemn+38oxwum2dKpm+M9jJm+pr6RrHSV9eH9dXnyN0XijEO\n i5GedX16VzluqvZXHr9UpY1P/9a1zSs176m2kbb+NY13qvKLjYwqtP1V/eLT//5kQ1B/1G8I\n eZ/LfA3LgUzxw8dVcZYiLuvcjB33IX7wybe6NKM+gox8jfRq+JjSi87l+ViGrut0buvaqdhy\n QPKj3MawSbqApBfLZoi81kcuXqV3XXc9VHbeBH0L+nF5N7W/Nm2NnBer+rasD9bEute1flTD\n lst9Ux1vK8PWjZFD+x27Fma3wvQujG/fMFQ/0iX/hD7f9PClnr9OHX8+Mh65PTS1Iyn9UULX\n M/b8vq9uKf9ID7KkjkvOtOe+om/8cxvu6meXubpY+jcuc0Wx3TeNBVOH33e+LKQ+rZM55pQd\n cNz3kc4578rygFhy7Fj1H4872f88FpD1hNV1Iy76tbnr35Dyn1v3yCT3KhEnJdpnG1mui46u\n ryzBNNaiH5eH0HFfbPlWqvouVX0ZKjdW65S68XQqfWC1nJSUO8eoj0OfjxGGUjI1V/erZGIh\n P507n8qIa7z1tXinLK/sZwnb/7TS7+drNtj43+Y9sttN00121aMOnR+wTb/UuIZ/d4FrfydV\n PSOXCRmf+jfl/E9KuUMpuVPMfnKMdQIucze69X6m8YPvngAl9yOwqWNt5Wsu+hSp9xRoytr0\n UN3tunhPHQ91brDsoqqOZSivyed7iDzXX8p/JJ8le2QSA4C8lwntkcP7bvGxfC7bJfaUIDd5\n j7CqsiCv/dYh+4HcIbkTYdpLgOWwbNdk31R/k/tqnKpy2oGB43o1H9js0cPhk/ebUfegsZVT\n h8pW5D2aVNQ9nFzQPStf4+MQN4jYfZ4Q+TDndzUNTfqAVfs7uazFtc03KfaP0u3LZYvP877u\n ++6zpf5SuOfiJ9+w6PylXtPdZ1Pdx80UZ1VxoYahLl/Y7tflUxbqwhyr7OjioCpuTOexymmM\n 99vGWe5960LdoT5PrDlkNn39yrIdFzdTxKkqa0o9n5NyfjbFL6T9i03O9jTEjVT9CZt61qWe\n DAmTbX1rkw4ubWysflyu/Uh19Utdv8QUb/wevs/vlN3YK0J95hvGWP26FP0CXV0ix6XOfmi8\n lNw7tlSc284PqXnZlKf5umpfVx7Ue3K5q4onnT9079H5h8ubyX5VGZHfIVOiPynLz2RkPSTV\n /2p/0NZM2Ufw7dPm3tveJp46kn5prDC7miXDUCoOc7QdKeU9KeZZbNZTsw6ZKjPna6G6jLZ6\n v6Y9S0rqHMbaN8j3flUbVIdpnonTleaP+JsiapunntfVOer7WUdXNw+jCyvNYxE6P9Ix+7Mu\n TCa3uM3mb9JUmfLe1q59N19yulXnD5dfU/yRyn/8vR2Cr9H8JB/btsm29undfCw/56tbVmVX\n d53nXtV0+Iw4rjNTk8udOvdtwl13j1B1YuT5b04HMpsW/7HCr8t/dF0Of846J3W9HPtdNnUf\n x7UvpdsiV1mJjawiFLWODEm73G1mLF1J2/GB7X7UtvqhJeeTfPc4T7mPtLpuWqWJ66malIZV\n Oq6uerCp9Oh1dlzCzrpIudKf92/hsZbP+hIbHa0Q/fQYe/v4lmd5T5s6veq6vYViyzJT69KV\n 2t/FlN451zKFrm3i9U0264J0fQOX9U5Vfe6S+xPRL8VaHJe8rK69qpNJqe92jX81XX3X2fr8\n XPaHsq1PdPWWa12Sag1GaXmwT98pZ/2vy8+h7e8gsHdGcrvn+ou5l5j6K7GfmPobXJiY4xLb\n d9C3GKnM2H7Xkd7j+z1I03X5ftWxjd9KwDLy0mNPV/fUtSCh4wyeF5DXS8nzWnSd9Jqrfrye\n UWfa3NP1O131E9TnTDItvs/rn9Qwm9y3lS/yuiSdDK2J32LmH61l4/l7DpMcFl0cy/HpKvNU\n 5Z6yuzmgsPj4PZX78jydfMzx1BFk7Gr61smlU9yXf7w+UL7Pa5Fc9pe3lTntI+YJYvTvQ9Y9\n x9gbNOU66lxyYJPsuqPtBRpjvW7uX6n9Y3LpfMUe8+fYy6sJ+99x2QyVR1TJrEvlz9Lxmzq8\n Kct+jO8mpnIrV35pYv3rso+6j2w1RzkxpWeOslpV38Xey7lJ7XVVnDdFVyDn2o2m7A1s871r\n U3+hbp661LfjbL6l6vL9O5v5uiqdcd/9mG3sVrlrktHl3m+5Ln46Qply/f51rDq2afV3U92P\n 9Z2CVPu71+kExf4uhm265Mpfcrjl9S+p/WGjb9FEeYmrHlhsXTLb772b2v3U8bKvoAk6VaQ3\n ZdqvWf2FytNd9g1W/c57VNf9+JuMuXT+ZJ1tnZ6T7U+un1PXpSm/BxKiZ+b6nUC5P+bybdoU\n 3wWR9zP1WcOrrtc06dG7rA9gf6lzCCVlQKl1cKvW16r7MjdxPqHue3m55l5M6yRy1q8p6i+d\n GzbfR5Dtqeeu1D2rulVlp+67ulXfzlDPqS/AP52us+kb5aoetdp226wrqOtHuvxc9InlsMrX\n 5HCkgvtULt80VtPB5tvHlLbU51R1leQ+nW0ftknjClM7Ktf7Pt9n161FKfULHbeU/P5brO/5\n 8PeveZ2l+s31OpmmizxP5z/VrssvNP7Vb9XbUGr+LWSdWKr4c/lemct7U/1KfJcs5nfiXNcz\n Va3lCf2OXi75c+gaSd/4SyH/pmds+8G2fWCbvmwMeZapf6v2g9hU16vF7l/65K8cc6uh7bIs\n W8jdLyyxp4BPPOru6+Qx8rd8beIyhew8xjoMtU8l90dcyldseUOJPpPLevpc7ZnvL8f4oaRO\n ad34WVeefPYVSdG+27T7vPdESj0VV5leyvXoufQvffKZTpZmGy+27UNKfYCc5dWmj2fbp44Z\n P6G/WN9X1cl8beoieS7ad7+PGP14nz1ATO1q3Xx2jHnpWO1xR1uPovumYQndrFD9uyrdvpD4\n b9L8Yaz9wxl5bbVu/XlT9j2X/Rr6Hl7brYPd0V1jM5bOk+84oUn7xpeeH7IhVJ7j25+IrU9s\n ig+XOi7lGMtGj9pGB903/kuMQVPuORpjv7+c35AvvYYkNO1CviFvU4/HkF+qe2ZTG+VTn1bt\n fV7y5/PtqNR76oeuy4zlH3n/9ND3qPuxu7xb3cuj7heahiXq4ljrC1R5vm5M39HGFz7yzRLr\n k1PoMMfcPzeGvDPWPssxw6Rzo8QcXmp3XGSSHX2/Et08k67f5dtmuupKN2FvMpOsKObeDnVx\n k3ofp1h6VrFIVVdV7T2fYm9013l7k/5rbNlKaBuXso7LLV+K1d67uuWiJ19ShhcjvUP97FsO\n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), dt = Object.fromEntries(ut.values.map((e, t) => [e, t])), { values: ft } = ut, { AI: pt, AL: mt, CJ: ht, CM: gt, NS: _t, SA: vt, SG: yt, SP: bt, XX: H } = dt;
|
|
3402
|
+
function xt(e) {
|
|
3399
3403
|
switch (e) {
|
|
3400
3404
|
case null: return null;
|
|
3401
3405
|
case -1: return "sot";
|
|
3402
3406
|
case -2: return "eot";
|
|
3403
|
-
default: return
|
|
3407
|
+
default: return ft[e];
|
|
3404
3408
|
}
|
|
3405
3409
|
}
|
|
3406
|
-
function
|
|
3410
|
+
function St(e, t) {
|
|
3407
3411
|
switch (e) {
|
|
3408
|
-
case
|
|
3409
|
-
case
|
|
3410
|
-
case
|
|
3411
|
-
case
|
|
3412
|
-
case
|
|
3412
|
+
case pt:
|
|
3413
|
+
case yt:
|
|
3414
|
+
case H: return mt;
|
|
3415
|
+
case vt: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? gt : mt;
|
|
3416
|
+
case ht: return _t;
|
|
3413
3417
|
}
|
|
3414
3418
|
return e;
|
|
3415
3419
|
}
|
|
3416
|
-
var
|
|
3420
|
+
var Ct = class {
|
|
3417
3421
|
cp = -Infinity;
|
|
3418
3422
|
cls = -1;
|
|
3419
3423
|
char = "";
|
|
@@ -3423,15 +3427,15 @@ var St = class {
|
|
|
3423
3427
|
this.cls = e, this.cp = t, this.char = n, this.len = r;
|
|
3424
3428
|
}
|
|
3425
3429
|
[Symbol.for("nodejs.util.inspect.custom")](e, t, n) {
|
|
3426
|
-
return `${
|
|
3430
|
+
return `${xt(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
|
|
3427
3431
|
}
|
|
3428
|
-
},
|
|
3432
|
+
}, U = class {
|
|
3429
3433
|
str = "";
|
|
3430
3434
|
len = 0;
|
|
3431
3435
|
prevChunk = 0;
|
|
3432
|
-
prev = new
|
|
3433
|
-
cur = new
|
|
3434
|
-
next = new
|
|
3436
|
+
prev = new Ct(-1, -Infinity, "", 0);
|
|
3437
|
+
cur = new Ct(-1, -Infinity, "", 0);
|
|
3438
|
+
next = new Ct(-1, -Infinity, "", 0);
|
|
3435
3439
|
LB8 = !1;
|
|
3436
3440
|
spaces = !1;
|
|
3437
3441
|
RI = 0;
|
|
@@ -3444,13 +3448,13 @@ var St = class {
|
|
|
3444
3448
|
this.next.ignored ? this.cur.len = this.next.len : (this.prev = this.cur, this.cur = this.next), this.next = e;
|
|
3445
3449
|
}
|
|
3446
3450
|
pushEnd() {
|
|
3447
|
-
this.push(new
|
|
3451
|
+
this.push(new Ct(-2, Infinity, "", this.next.len));
|
|
3448
3452
|
}
|
|
3449
3453
|
*codePoints(e, t = !0) {
|
|
3450
3454
|
if (t) for (; e < this.len;) if (e === this.cur.len && this.next.cls >= 0) yield this.next, e += this.next.char.length;
|
|
3451
3455
|
else {
|
|
3452
|
-
let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r =
|
|
3453
|
-
e += n.length, yield new St(
|
|
3456
|
+
let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = ut.get(t);
|
|
3457
|
+
e += n.length, yield new Ct(St(r, n), t, n, e);
|
|
3454
3458
|
}
|
|
3455
3459
|
else for (; e > 0;) if (e === this.cur.len) yield this.cur, e -= this.cur.char.length;
|
|
3456
3460
|
else if (e === this.prev.len) yield this.prev, e -= this.prev.char.length;
|
|
@@ -3458,11 +3462,11 @@ var St = class {
|
|
|
3458
3462
|
let t = e - 1, n = this.str.charCodeAt(t);
|
|
3459
3463
|
n >= 56320 && n <= 57343 && t--;
|
|
3460
3464
|
let r = this.str.codePointAt(t), i = String.fromCodePoint(r);
|
|
3461
|
-
yield new St(
|
|
3465
|
+
yield new Ct(St(ut.get(r), i), r, i, e), e = t;
|
|
3462
3466
|
}
|
|
3463
3467
|
}
|
|
3464
3468
|
classAfterSpaces(e) {
|
|
3465
|
-
for (let { cls: t } of this.codePoints(e)) if (t !==
|
|
3469
|
+
for (let { cls: t } of this.codePoints(e)) if (t !== bt) return t;
|
|
3466
3470
|
return -2;
|
|
3467
3471
|
}
|
|
3468
3472
|
afterNext(e = 1) {
|
|
@@ -3476,186 +3480,186 @@ var St = class {
|
|
|
3476
3480
|
let r = `${n(this.prev)} => ${n(this.cur)} => ${n(this.next)}`;
|
|
3477
3481
|
return this.LB8 && (r += " LB8"), this.spaces && (r += " spaces"), this.RI > 0 && (r += ` RI: ${this.RI}`), this.props && (r += ` ${JSON.stringify(this.props)}`), r;
|
|
3478
3482
|
}
|
|
3479
|
-
},
|
|
3483
|
+
}, wt = class {
|
|
3480
3484
|
string = void 0;
|
|
3481
3485
|
props = void 0;
|
|
3482
3486
|
constructor(e, t = !1) {
|
|
3483
3487
|
this.position = e, this.required = t;
|
|
3484
3488
|
}
|
|
3485
|
-
}, W =
|
|
3489
|
+
}, W = lt.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");
|
|
3486
3490
|
Object.fromEntries(W.values.map((e, t) => [e, t]));
|
|
3487
|
-
var { values:
|
|
3491
|
+
var { values: Tt } = W, { AK: Et, AL: G, AP: Dt, AS: Ot, B2: kt, BA: At, BB: jt, BK: Mt, CB: Nt, CL: Pt, CM: Ft, CP: It, CR: Lt, EB: Rt, EM: zt, EX: Bt, GL: Vt, H2: Ht, H3: Ut, HH: Wt, HL: K, HY: Gt, ID: Kt, IN: qt, IS: Jt, JL: Yt, JT: Xt, JV: Zt, LF: Qt, NU: q, OP: $t, NL: en, NS: tn, PO: nn, PR: rn, RI: an, SP: J, SY: on, QU: Y, VF: sn, VI: cn, WJ: ln, ZW: un, ZWJ: dn } = dt, fn = /* @__PURE__ */ new Set([
|
|
3488
3492
|
G,
|
|
3489
3493
|
K,
|
|
3490
3494
|
q
|
|
3491
|
-
]), fn = /* @__PURE__ */ new Set([
|
|
3492
|
-
jt,
|
|
3493
|
-
It,
|
|
3494
|
-
Zt,
|
|
3495
|
-
$t,
|
|
3496
|
-
J,
|
|
3497
|
-
ln
|
|
3498
3495
|
]), pn = /* @__PURE__ */ new Set([
|
|
3499
|
-
|
|
3496
|
+
Mt,
|
|
3500
3497
|
Lt,
|
|
3501
|
-
|
|
3498
|
+
Qt,
|
|
3499
|
+
en,
|
|
3500
|
+
J,
|
|
3501
|
+
un
|
|
3502
3502
|
]), mn = /* @__PURE__ */ new Set([
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
Ht
|
|
3503
|
+
Kt,
|
|
3504
|
+
Rt,
|
|
3505
|
+
zt
|
|
3507
3506
|
]), hn = /* @__PURE__ */ new Set([
|
|
3508
|
-
Jt,
|
|
3509
|
-
Xt,
|
|
3510
3507
|
Yt,
|
|
3511
|
-
|
|
3512
|
-
Ht
|
|
3513
|
-
|
|
3508
|
+
Zt,
|
|
3509
|
+
Ht,
|
|
3510
|
+
Ut
|
|
3511
|
+
]), gn = /* @__PURE__ */ new Set([
|
|
3512
|
+
Yt,
|
|
3513
|
+
Zt,
|
|
3514
|
+
Xt,
|
|
3515
|
+
Ht,
|
|
3516
|
+
Ut
|
|
3517
|
+
]), _n = /* @__PURE__ */ new Set([Zt, Xt]), vn = /* @__PURE__ */ new Set([
|
|
3514
3518
|
J,
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3519
|
+
Vt,
|
|
3520
|
+
ln,
|
|
3521
|
+
Pt,
|
|
3518
3522
|
Y,
|
|
3519
|
-
Ft,
|
|
3520
|
-
zt,
|
|
3521
|
-
qt,
|
|
3522
|
-
an,
|
|
3523
|
-
jt,
|
|
3524
3523
|
It,
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3524
|
+
Bt,
|
|
3525
|
+
Jt,
|
|
3526
|
+
on,
|
|
3527
|
+
Mt,
|
|
3528
|
+
Lt,
|
|
3529
|
+
Qt,
|
|
3530
|
+
en,
|
|
3531
|
+
un
|
|
3532
|
+
]), yn = /* @__PURE__ */ new Set([
|
|
3529
3533
|
-1,
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
Zt,
|
|
3533
|
-
$t,
|
|
3534
|
+
Mt,
|
|
3535
|
+
Lt,
|
|
3534
3536
|
Qt,
|
|
3537
|
+
en,
|
|
3538
|
+
$t,
|
|
3535
3539
|
Y,
|
|
3536
|
-
|
|
3540
|
+
Vt,
|
|
3537
3541
|
J,
|
|
3538
|
-
|
|
3539
|
-
]), X = Symbol("PASS"), Z = Symbol("NO_BREAK"),
|
|
3540
|
-
function xn(e) {
|
|
3541
|
-
return e.cur.cls === -1 && e.next.cls !== -2 ? Z : X;
|
|
3542
|
-
}
|
|
3542
|
+
un
|
|
3543
|
+
]), X = Symbol("PASS"), Z = Symbol("NO_BREAK"), bn = Symbol("MAY_BREAK"), xn = Symbol("MUST_BREAK");
|
|
3543
3544
|
function Sn(e) {
|
|
3544
|
-
return e.
|
|
3545
|
+
return e.cur.cls === -1 && e.next.cls !== -2 ? Z : X;
|
|
3545
3546
|
}
|
|
3546
3547
|
function Cn(e) {
|
|
3547
|
-
return e.
|
|
3548
|
+
return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? xn : X;
|
|
3548
3549
|
}
|
|
3549
3550
|
function wn(e) {
|
|
3551
|
+
return e.cur.cls === Mt ? xn : X;
|
|
3552
|
+
}
|
|
3553
|
+
function Tn(e) {
|
|
3550
3554
|
switch (e.cur.cls) {
|
|
3551
|
-
case
|
|
3552
|
-
case
|
|
3553
|
-
case
|
|
3555
|
+
case Lt: return e.next.cls === Qt ? Z : xn;
|
|
3556
|
+
case Qt:
|
|
3557
|
+
case en: return xn;
|
|
3554
3558
|
}
|
|
3555
3559
|
return X;
|
|
3556
3560
|
}
|
|
3557
|
-
function
|
|
3561
|
+
function En(e) {
|
|
3558
3562
|
switch (e.next.cls) {
|
|
3559
|
-
case
|
|
3560
|
-
case
|
|
3561
|
-
case
|
|
3562
|
-
case
|
|
3563
|
+
case Mt:
|
|
3564
|
+
case Lt:
|
|
3565
|
+
case Qt:
|
|
3566
|
+
case en: return Z;
|
|
3563
3567
|
}
|
|
3564
3568
|
return X;
|
|
3565
3569
|
}
|
|
3566
|
-
function En(e) {
|
|
3567
|
-
return e.cur.cls !== rn && (e.RI = 0), e.spaces ? (e.next.cls !== J && (e.spaces = !1), Z) : X;
|
|
3568
|
-
}
|
|
3569
3570
|
function Dn(e) {
|
|
3570
|
-
|
|
3571
|
+
return e.cur.cls !== an && (e.RI = 0), e.spaces ? (e.next.cls !== J && (e.spaces = !1), Z) : X;
|
|
3572
|
+
}
|
|
3573
|
+
function On(e) {
|
|
3574
|
+
if (e.next.cls === un) return Z;
|
|
3571
3575
|
if (e.next.cls === J) switch (e.cur.cls) {
|
|
3572
|
-
case
|
|
3573
|
-
case
|
|
3576
|
+
case un:
|
|
3577
|
+
case $t:
|
|
3574
3578
|
case Y:
|
|
3575
|
-
case
|
|
3576
|
-
case
|
|
3577
|
-
case
|
|
3579
|
+
case Pt:
|
|
3580
|
+
case It:
|
|
3581
|
+
case kt: break;
|
|
3578
3582
|
default: return Z;
|
|
3579
3583
|
}
|
|
3580
3584
|
return X;
|
|
3581
3585
|
}
|
|
3582
|
-
function On(e) {
|
|
3583
|
-
return e.LB8 ? (e.LB8 = !1, yn) : e.cur.cls === ln ? e.next.cls === J ? (e.LB8 = !0, Z) : yn : X;
|
|
3584
|
-
}
|
|
3585
3586
|
function kn(e) {
|
|
3586
|
-
return e.cur.cls === un ? Z : X;
|
|
3587
|
+
return e.LB8 ? (e.LB8 = !1, bn) : e.cur.cls === un ? e.next.cls === J ? (e.LB8 = !0, Z) : bn : X;
|
|
3587
3588
|
}
|
|
3588
3589
|
function An(e) {
|
|
3589
|
-
return
|
|
3590
|
+
return e.cur.cls === dn ? Z : X;
|
|
3590
3591
|
}
|
|
3591
3592
|
function jn(e) {
|
|
3592
|
-
return e.cur.cls
|
|
3593
|
+
return !pn.has(e.cur.cls) && (e.next.cls === Ft || e.next.cls === dn) ? (e.next.ignored = !0, Z) : X;
|
|
3593
3594
|
}
|
|
3594
3595
|
function Mn(e) {
|
|
3595
|
-
return e.
|
|
3596
|
+
return e.cur.cls === Ft && (e.cur.cls = G), e.next.cls === Ft && (e.next.cls = G), X;
|
|
3596
3597
|
}
|
|
3597
3598
|
function Nn(e) {
|
|
3598
|
-
return e.cur.cls ===
|
|
3599
|
+
return e.next.cls === ln || e.cur.cls === ln ? Z : X;
|
|
3599
3600
|
}
|
|
3600
3601
|
function Pn(e) {
|
|
3601
|
-
|
|
3602
|
+
return e.cur.cls === Vt ? Z : X;
|
|
3603
|
+
}
|
|
3604
|
+
function Fn(e) {
|
|
3605
|
+
if (e.next.cls === Vt) switch (e.cur.cls) {
|
|
3602
3606
|
case J:
|
|
3603
|
-
case
|
|
3604
|
-
case
|
|
3605
|
-
case
|
|
3607
|
+
case At:
|
|
3608
|
+
case Gt:
|
|
3609
|
+
case Wt: return X;
|
|
3606
3610
|
default: return Z;
|
|
3607
3611
|
}
|
|
3608
3612
|
return X;
|
|
3609
3613
|
}
|
|
3610
|
-
function
|
|
3614
|
+
function In(e) {
|
|
3611
3615
|
switch (e.next.cls) {
|
|
3612
|
-
case
|
|
3613
|
-
case
|
|
3614
|
-
case
|
|
3615
|
-
case
|
|
3616
|
+
case Pt:
|
|
3617
|
+
case It:
|
|
3618
|
+
case Bt:
|
|
3619
|
+
case on: return Z;
|
|
3616
3620
|
}
|
|
3617
3621
|
return X;
|
|
3618
3622
|
}
|
|
3619
|
-
function In(e) {
|
|
3620
|
-
return e.cur.cls === Qt ? (e.next.cls === J && (e.spaces = !0), Z) : X;
|
|
3621
|
-
}
|
|
3622
3623
|
function Ln(e) {
|
|
3623
|
-
return
|
|
3624
|
+
return e.cur.cls === $t ? (e.next.cls === J && (e.spaces = !0), Z) : X;
|
|
3624
3625
|
}
|
|
3625
3626
|
function Rn(e) {
|
|
3627
|
+
return yn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === Y ? (e.spaces = !0, Z) : X;
|
|
3628
|
+
}
|
|
3629
|
+
function zn(e) {
|
|
3626
3630
|
if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === Y) {
|
|
3627
3631
|
let t = e.afterNext();
|
|
3628
|
-
if (!t ||
|
|
3632
|
+
if (!t || vn.has(t.cls)) return Z;
|
|
3629
3633
|
}
|
|
3630
3634
|
return X;
|
|
3631
3635
|
}
|
|
3632
|
-
function zn(e) {
|
|
3633
|
-
return e.cur.cls === J && e.next.cls === qt && e.afterNext()?.cls === q ? yn : X;
|
|
3634
|
-
}
|
|
3635
3636
|
function Bn(e) {
|
|
3636
|
-
return e.next.cls ===
|
|
3637
|
+
return e.cur.cls === J && e.next.cls === Jt && e.afterNext()?.cls === q ? bn : X;
|
|
3637
3638
|
}
|
|
3638
3639
|
function Vn(e) {
|
|
3639
|
-
|
|
3640
|
-
if (e.classAfterSpaces(e.cur.len) === en) return e.next.cls === J && (e.spaces = !0), Z;
|
|
3641
|
-
if (e.next.cls === J) return Z;
|
|
3642
|
-
}
|
|
3643
|
-
return X;
|
|
3640
|
+
return e.next.cls === Jt ? Z : X;
|
|
3644
3641
|
}
|
|
3645
3642
|
function Hn(e) {
|
|
3646
|
-
if (e.cur.cls ===
|
|
3647
|
-
if (e.classAfterSpaces(e.cur.len) ===
|
|
3643
|
+
if (e.cur.cls === Pt || e.cur.cls === It) {
|
|
3644
|
+
if (e.classAfterSpaces(e.cur.len) === tn) return e.next.cls === J && (e.spaces = !0), Z;
|
|
3648
3645
|
if (e.next.cls === J) return Z;
|
|
3649
3646
|
}
|
|
3650
3647
|
return X;
|
|
3651
3648
|
}
|
|
3652
3649
|
function Un(e) {
|
|
3653
|
-
|
|
3650
|
+
if (e.cur.cls === kt) {
|
|
3651
|
+
if (e.classAfterSpaces(e.cur.len) === kt) return e.next.cls === J && (e.spaces = !0), Z;
|
|
3652
|
+
if (e.next.cls === J) return Z;
|
|
3653
|
+
}
|
|
3654
|
+
return X;
|
|
3654
3655
|
}
|
|
3655
3656
|
function Wn(e) {
|
|
3656
|
-
return e.
|
|
3657
|
+
return e.cur.cls === J ? bn : X;
|
|
3657
3658
|
}
|
|
3658
3659
|
function Gn(e) {
|
|
3660
|
+
return e.next.cls === Y && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === Y && !/^\p{Pf}$/u.test(e.cur.char) ? Z : X;
|
|
3661
|
+
}
|
|
3662
|
+
function Kn(e) {
|
|
3659
3663
|
if (!W.get(e.cur.cp) && e.next.cls === Y) return Z;
|
|
3660
3664
|
if (e.next.cls === Y) {
|
|
3661
3665
|
let t = e.afterNext();
|
|
@@ -3663,43 +3667,43 @@ function Gn(e) {
|
|
|
3663
3667
|
}
|
|
3664
3668
|
return e.cur.cls === Y && !W.get(e.next.cp) || (e.prev.cls === -1 || !W.get(e.prev.cp)) && e.cur.cls === Y ? Z : X;
|
|
3665
3669
|
}
|
|
3666
|
-
function
|
|
3667
|
-
return e.cur.cls ===
|
|
3670
|
+
function qn(e) {
|
|
3671
|
+
return e.cur.cls === Nt || e.next.cls === Nt ? bn : X;
|
|
3668
3672
|
}
|
|
3669
|
-
var
|
|
3673
|
+
var Jn = /* @__PURE__ */ new Set([
|
|
3670
3674
|
-1,
|
|
3671
|
-
jt,
|
|
3672
|
-
It,
|
|
3673
|
-
Zt,
|
|
3674
|
-
$t,
|
|
3675
|
-
J,
|
|
3676
|
-
ln,
|
|
3677
3675
|
Mt,
|
|
3678
|
-
|
|
3676
|
+
Lt,
|
|
3677
|
+
Qt,
|
|
3678
|
+
en,
|
|
3679
|
+
J,
|
|
3680
|
+
un,
|
|
3681
|
+
Nt,
|
|
3682
|
+
Vt
|
|
3679
3683
|
]);
|
|
3680
|
-
function Jn(e) {
|
|
3681
|
-
return qn.has(e.prev.cls) && (e.cur.cls === Wt || e.cur.cls === Ut) && (e.next.cls === G || e.next.cls === K) ? Z : X;
|
|
3682
|
-
}
|
|
3683
3684
|
function Yn(e) {
|
|
3684
|
-
|
|
3685
|
+
return Jn.has(e.prev.cls) && (e.cur.cls === Gt || e.cur.cls === Wt) && (e.next.cls === G || e.next.cls === K) ? Z : X;
|
|
3686
|
+
}
|
|
3687
|
+
function Xn(e) {
|
|
3688
|
+
if (e.cur.cls === jt) return Z;
|
|
3685
3689
|
switch (e.next.cls) {
|
|
3686
|
-
case
|
|
3687
|
-
case Ut:
|
|
3690
|
+
case At:
|
|
3688
3691
|
case Wt:
|
|
3689
|
-
case
|
|
3692
|
+
case Gt:
|
|
3693
|
+
case tn: return Z;
|
|
3690
3694
|
}
|
|
3691
3695
|
return X;
|
|
3692
3696
|
}
|
|
3693
|
-
function Xn(e) {
|
|
3694
|
-
return e.prev.cls === K && (e.cur.cls === Wt || e.cur.cls === Ut) && e.next.cls !== K ? Z : X;
|
|
3695
|
-
}
|
|
3696
3697
|
function Zn(e) {
|
|
3697
|
-
return e.cur.cls ===
|
|
3698
|
+
return e.prev.cls === K && (e.cur.cls === Gt || e.cur.cls === Wt) && e.next.cls !== K ? Z : X;
|
|
3698
3699
|
}
|
|
3699
3700
|
function Qn(e) {
|
|
3700
|
-
return e.next.cls ===
|
|
3701
|
+
return e.cur.cls === on && e.next.cls === K ? Z : X;
|
|
3701
3702
|
}
|
|
3702
3703
|
function $n(e) {
|
|
3704
|
+
return e.next.cls === qt ? Z : X;
|
|
3705
|
+
}
|
|
3706
|
+
function er(e) {
|
|
3703
3707
|
switch (e.cur.cls) {
|
|
3704
3708
|
case G:
|
|
3705
3709
|
case K:
|
|
@@ -3709,94 +3713,93 @@ function $n(e) {
|
|
|
3709
3713
|
}
|
|
3710
3714
|
return X;
|
|
3711
3715
|
}
|
|
3712
|
-
function er(e) {
|
|
3713
|
-
return e.cur.cls === nn && pn.has(e.next.cls) || e.next.cls === tn && pn.has(e.cur.cls) ? Z : X;
|
|
3714
|
-
}
|
|
3715
3716
|
function tr(e) {
|
|
3716
|
-
return
|
|
3717
|
+
return e.cur.cls === rn && mn.has(e.next.cls) || e.next.cls === nn && mn.has(e.cur.cls) ? Z : X;
|
|
3718
|
+
}
|
|
3719
|
+
function nr(e) {
|
|
3720
|
+
return (e.cur.cls === rn || e.cur.cls === nn) && (e.next.cls === G || e.next.cls === K) || (e.cur.cls === G || e.cur.cls === K) && (e.next.cls === rn || e.next.cls === nn) ? Z : X;
|
|
3717
3721
|
}
|
|
3718
|
-
var
|
|
3719
|
-
function
|
|
3722
|
+
var rr = /* @__PURE__ */ new Set([nn, rn]), ar = /* @__PURE__ */ new Set([Pt, It]);
|
|
3723
|
+
function or(e) {
|
|
3720
3724
|
let t = null;
|
|
3721
|
-
if (
|
|
3722
|
-
case
|
|
3723
|
-
case
|
|
3725
|
+
if (rr.has(e.next.cls) ? t = ar.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === q && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
|
|
3726
|
+
case on:
|
|
3727
|
+
case Jt: continue;
|
|
3724
3728
|
case q: return Z;
|
|
3725
3729
|
default: break SyIsLoop;
|
|
3726
3730
|
}
|
|
3727
|
-
if (e.cur.cls ===
|
|
3728
|
-
if (e.next.cls ===
|
|
3731
|
+
if (e.cur.cls === nn || e.cur.cls === rn) {
|
|
3732
|
+
if (e.next.cls === $t) {
|
|
3729
3733
|
let t = e.afterNext();
|
|
3730
|
-
if (t && (t.cls === q || t.cls ===
|
|
3734
|
+
if (t && (t.cls === q || t.cls === Jt && e.afterNext(2)?.cls === q)) return Z;
|
|
3731
3735
|
} else if (e.next.cls === q) return Z;
|
|
3732
3736
|
}
|
|
3733
|
-
return e.cur.cls ===
|
|
3737
|
+
return e.cur.cls === Gt && e.next.cls === q || e.cur.cls === Jt && e.next.cls === q ? Z : X;
|
|
3734
3738
|
}
|
|
3735
|
-
function
|
|
3739
|
+
function sr(e) {
|
|
3736
3740
|
switch (e.cur.cls) {
|
|
3737
|
-
case
|
|
3738
|
-
if (
|
|
3741
|
+
case Yt:
|
|
3742
|
+
if (hn.has(e.next.cls)) return Z;
|
|
3739
3743
|
break;
|
|
3740
|
-
case
|
|
3741
|
-
case
|
|
3742
|
-
if (
|
|
3744
|
+
case Zt:
|
|
3745
|
+
case Ht:
|
|
3746
|
+
if (_n.has(e.next.cls)) return Z;
|
|
3743
3747
|
break;
|
|
3744
|
-
case
|
|
3745
|
-
case
|
|
3748
|
+
case Xt:
|
|
3749
|
+
case Ut: if (e.next.cls === Xt) return Z;
|
|
3746
3750
|
}
|
|
3747
3751
|
return X;
|
|
3748
3752
|
}
|
|
3749
|
-
function
|
|
3753
|
+
function cr(e) {
|
|
3750
3754
|
switch (e.cur.cls) {
|
|
3751
|
-
case Jt:
|
|
3752
|
-
case Xt:
|
|
3753
3755
|
case Yt:
|
|
3754
|
-
case
|
|
3756
|
+
case Zt:
|
|
3757
|
+
case Xt:
|
|
3755
3758
|
case Ht:
|
|
3756
|
-
|
|
3759
|
+
case Ut:
|
|
3760
|
+
if (e.next.cls === nn) return Z;
|
|
3757
3761
|
break;
|
|
3758
|
-
case
|
|
3762
|
+
case rn: if (gn.has(e.next.cls)) return Z;
|
|
3759
3763
|
}
|
|
3760
3764
|
return X;
|
|
3761
3765
|
}
|
|
3762
|
-
function
|
|
3766
|
+
function lr(e) {
|
|
3763
3767
|
return (e.cur.cls === G || e.cur.cls === K) && (e.next.cls === G || e.next.cls === K) ? Z : X;
|
|
3764
3768
|
}
|
|
3765
|
-
function
|
|
3769
|
+
function ur(e) {
|
|
3766
3770
|
let { prev: t, cur: n, next: r } = e;
|
|
3767
3771
|
function i(e) {
|
|
3768
|
-
return e.cls ===
|
|
3772
|
+
return e.cls === Et || e.char === "◌" || e.cls === Ot;
|
|
3769
3773
|
}
|
|
3770
|
-
return n.cls ===
|
|
3771
|
-
}
|
|
3772
|
-
function ur(e) {
|
|
3773
|
-
return e.cur.cls === qt && (e.next.cls === G || e.next.cls === K) ? Z : X;
|
|
3774
|
+
return n.cls === Dt && i(r) || i(n) && (r.cls === sn || r.cls === cn) || i(t) && n.cls === cn && (r.cls === Et || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === sn ? Z : X;
|
|
3774
3775
|
}
|
|
3775
3776
|
function dr(e) {
|
|
3777
|
+
return e.cur.cls === Jt && (e.next.cls === G || e.next.cls === K) ? Z : X;
|
|
3778
|
+
}
|
|
3779
|
+
function fr(e) {
|
|
3776
3780
|
switch (e.cur.cls) {
|
|
3777
3781
|
case G:
|
|
3778
3782
|
case K:
|
|
3779
3783
|
case q:
|
|
3780
|
-
if (e.next.cls ===
|
|
3784
|
+
if (e.next.cls === $t && !W.get(e.next.cp)) return Z;
|
|
3781
3785
|
break;
|
|
3782
|
-
case
|
|
3786
|
+
case It: if (!W.get(e.cur.cp) && fn.has(e.next.cls)) return Z;
|
|
3783
3787
|
}
|
|
3784
3788
|
return X;
|
|
3785
3789
|
}
|
|
3786
|
-
function
|
|
3787
|
-
if (e.cur.cls ===
|
|
3788
|
-
if (e.next.cls ===
|
|
3790
|
+
function pr(e) {
|
|
3791
|
+
if (e.cur.cls === an) {
|
|
3792
|
+
if (e.next.cls === an && ++e.RI % 2 != 0) return Z;
|
|
3789
3793
|
} else e.RI = 0;
|
|
3790
3794
|
return X;
|
|
3791
3795
|
}
|
|
3792
|
-
function
|
|
3793
|
-
return e.cur.cls ===
|
|
3796
|
+
function mr(e) {
|
|
3797
|
+
return e.cur.cls === Rt && e.next.cls === zt || e.next.cls === zt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? Z : X;
|
|
3794
3798
|
}
|
|
3795
|
-
function
|
|
3796
|
-
return
|
|
3799
|
+
function hr() {
|
|
3800
|
+
return bn;
|
|
3797
3801
|
}
|
|
3798
|
-
var
|
|
3799
|
-
xn,
|
|
3802
|
+
var gr = [
|
|
3800
3803
|
Sn,
|
|
3801
3804
|
Cn,
|
|
3802
3805
|
wn,
|
|
@@ -3822,15 +3825,15 @@ var hr = [
|
|
|
3822
3825
|
Wn,
|
|
3823
3826
|
Gn,
|
|
3824
3827
|
Kn,
|
|
3825
|
-
|
|
3826
|
-
Xn,
|
|
3828
|
+
qn,
|
|
3827
3829
|
Yn,
|
|
3828
3830
|
Zn,
|
|
3831
|
+
Xn,
|
|
3829
3832
|
Qn,
|
|
3830
3833
|
$n,
|
|
3831
3834
|
er,
|
|
3832
3835
|
tr,
|
|
3833
|
-
|
|
3836
|
+
nr,
|
|
3834
3837
|
or,
|
|
3835
3838
|
sr,
|
|
3836
3839
|
cr,
|
|
@@ -3839,8 +3842,9 @@ var hr = [
|
|
|
3839
3842
|
dr,
|
|
3840
3843
|
fr,
|
|
3841
3844
|
pr,
|
|
3842
|
-
mr
|
|
3843
|
-
|
|
3845
|
+
mr,
|
|
3846
|
+
hr
|
|
3847
|
+
], _r = class {
|
|
3844
3848
|
#e;
|
|
3845
3849
|
constructor(e = {}) {
|
|
3846
3850
|
if (this.#e = {
|
|
@@ -3848,7 +3852,7 @@ var hr = [
|
|
|
3848
3852
|
example7: !1,
|
|
3849
3853
|
verbose: !1,
|
|
3850
3854
|
...e
|
|
3851
|
-
}, this.rules = [...
|
|
3855
|
+
}, this.rules = [...gr], this.#e.example7) throw Error("'example7' flag deprecated");
|
|
3852
3856
|
this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), X));
|
|
3853
3857
|
}
|
|
3854
3858
|
removeRule(...e) {
|
|
@@ -3876,8 +3880,8 @@ var hr = [
|
|
|
3876
3880
|
switch (n) {
|
|
3877
3881
|
case X: break;
|
|
3878
3882
|
case Z: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
|
|
3879
|
-
case
|
|
3880
|
-
case
|
|
3883
|
+
case bn: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new wt(e.cur.len);
|
|
3884
|
+
case xn: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new wt(e.cur.len, !0);
|
|
3881
3885
|
default: throw Error(`Invalid state: "${n}"`);
|
|
3882
3886
|
}
|
|
3883
3887
|
}
|
|
@@ -3888,44 +3892,44 @@ var hr = [
|
|
|
3888
3892
|
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);
|
|
3889
3893
|
}
|
|
3890
3894
|
*breaks(e) {
|
|
3891
|
-
let t = new
|
|
3895
|
+
let t = new U(e);
|
|
3892
3896
|
for (let e of t.codePoints(0)) t.push(e), yield* this.#n(t);
|
|
3893
3897
|
t.pushEnd(), yield* this.#n(t);
|
|
3894
3898
|
}
|
|
3895
3899
|
};
|
|
3896
3900
|
//#endregion
|
|
3897
3901
|
//#region src/text-layout.ts
|
|
3898
|
-
function
|
|
3902
|
+
function vr(e, t) {
|
|
3899
3903
|
let n = new Intl.Segmenter(t, { granularity: "grapheme" }), r = /* @__PURE__ */ new Set([0]);
|
|
3900
3904
|
for (let t of n.segment(e)) r.add(t.index + t.segment.length);
|
|
3901
3905
|
return r;
|
|
3902
3906
|
}
|
|
3903
|
-
var
|
|
3904
|
-
#e = new
|
|
3907
|
+
var yr = class {
|
|
3908
|
+
#e = new _r();
|
|
3905
3909
|
#t;
|
|
3906
3910
|
constructor(e = "ja") {
|
|
3907
3911
|
this.#t = e;
|
|
3908
3912
|
}
|
|
3909
3913
|
getBreakOpportunities(e) {
|
|
3910
|
-
let t =
|
|
3914
|
+
let t = vr(e, this.#t), n = /* @__PURE__ */ new Map();
|
|
3911
3915
|
for (let r of this.#e.breaks(e)) t.has(r.position) && n.set(r.position, (n.get(r.position) ?? !1) || r.required);
|
|
3912
3916
|
return Object.freeze([...n].sort(([e], [t]) => e - t).map(([e, t]) => Object.freeze({
|
|
3913
3917
|
position: e,
|
|
3914
3918
|
required: t
|
|
3915
3919
|
})));
|
|
3916
3920
|
}
|
|
3917
|
-
},
|
|
3918
|
-
function
|
|
3919
|
-
let t =
|
|
3921
|
+
}, br = /* @__PURE__ */ new Map(), xr = /\r\n|[\n\r\v\f\u0085\u2028\u2029]/gu;
|
|
3922
|
+
function Sr(e) {
|
|
3923
|
+
let t = br.get(e);
|
|
3920
3924
|
if (t) return t;
|
|
3921
|
-
let n = new
|
|
3922
|
-
return
|
|
3925
|
+
let n = new yr(e);
|
|
3926
|
+
return br.set(e, n), n;
|
|
3923
3927
|
}
|
|
3924
|
-
function
|
|
3928
|
+
function Cr(e, t) {
|
|
3925
3929
|
if (!Number.isFinite(e) || e < 0) throw TypeError(`${t} must return a non-negative finite number.`);
|
|
3926
3930
|
return e;
|
|
3927
3931
|
}
|
|
3928
|
-
function
|
|
3932
|
+
function wr(e, t, n) {
|
|
3929
3933
|
let r = /* @__PURE__ */ new Map();
|
|
3930
3934
|
for (let i of t.getBreakOpportunities(e)) {
|
|
3931
3935
|
let { position: t, required: a } = i;
|
|
@@ -3936,28 +3940,28 @@ function Cr(e, t, n) {
|
|
|
3936
3940
|
required: t
|
|
3937
3941
|
}));
|
|
3938
3942
|
}
|
|
3939
|
-
function
|
|
3943
|
+
function Tr(e, t, n, r, i) {
|
|
3940
3944
|
if (e.length === 0) return [{
|
|
3941
3945
|
text: "",
|
|
3942
3946
|
start: t,
|
|
3943
3947
|
end: t,
|
|
3944
3948
|
width: 0
|
|
3945
3949
|
}];
|
|
3946
|
-
let a =
|
|
3950
|
+
let a = vr(e, i), o = [...a].sort((e, t) => e - t), s = wr(e, r, a), c = [], l = 0;
|
|
3947
3951
|
for (; l < e.length;) {
|
|
3948
3952
|
let r = s.find((e) => e.position > l && e.required)?.position ?? e.length, i, a = 0;
|
|
3949
3953
|
for (let t of s) {
|
|
3950
3954
|
if (t.position <= l || t.position > r) continue;
|
|
3951
|
-
let o = e.slice(l, t.position), s =
|
|
3955
|
+
let o = e.slice(l, t.position), s = Cr(n.measureText(o), "measureText");
|
|
3952
3956
|
s <= n.maxWidth && (i = t.position, a = s);
|
|
3953
3957
|
}
|
|
3954
3958
|
if (i === void 0) {
|
|
3955
3959
|
let t = o.filter((e) => e > l && e <= r);
|
|
3956
3960
|
for (let r of t) {
|
|
3957
|
-
let t = e.slice(l, r), o =
|
|
3961
|
+
let t = e.slice(l, r), o = Cr(n.measureText(t), "measureText");
|
|
3958
3962
|
o <= n.maxWidth && (i = r, a = o);
|
|
3959
3963
|
}
|
|
3960
|
-
i === void 0 && (i = t[0] ?? r, a =
|
|
3964
|
+
i === void 0 && (i = t[0] ?? r, a = Cr(n.measureText(e.slice(l, i)), "measureText"));
|
|
3961
3965
|
}
|
|
3962
3966
|
c.push({
|
|
3963
3967
|
text: e.slice(l, i),
|
|
@@ -3968,38 +3972,38 @@ function wr(e, t, n, r, i) {
|
|
|
3968
3972
|
}
|
|
3969
3973
|
return c;
|
|
3970
3974
|
}
|
|
3971
|
-
function
|
|
3975
|
+
function Er(e) {
|
|
3972
3976
|
if (typeof e.text != "string") throw TypeError("text must be a string.");
|
|
3973
3977
|
if (!Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw TypeError("maxWidth must be a positive finite number.");
|
|
3974
3978
|
if (typeof e.measureText != "function") throw TypeError("measureText must be a function.");
|
|
3975
|
-
let t = e.locale ?? "ja", n = e.lineBreakProvider ??
|
|
3976
|
-
for (let a of e.text.matchAll(
|
|
3979
|
+
let t = e.locale ?? "ja", n = e.lineBreakProvider ?? Sr(t), r = [], i = 0;
|
|
3980
|
+
for (let a of e.text.matchAll(xr)) {
|
|
3977
3981
|
let o = a.index;
|
|
3978
|
-
r.push(...
|
|
3982
|
+
r.push(...Tr(e.text.slice(i, o), i, e, n, t)), i = o + a[0].length;
|
|
3979
3983
|
}
|
|
3980
|
-
return r.push(...
|
|
3984
|
+
return r.push(...Tr(e.text.slice(i), i, e, n, t)), Object.freeze({
|
|
3981
3985
|
lines: Object.freeze(r.map((e) => Object.freeze(e))),
|
|
3982
3986
|
maxLineWidth: Math.max(0, ...r.map((e) => e.width))
|
|
3983
3987
|
});
|
|
3984
3988
|
}
|
|
3985
3989
|
//#endregion
|
|
3986
3990
|
//#region src/content-run.ts
|
|
3987
|
-
function
|
|
3991
|
+
function Dr(e) {
|
|
3988
3992
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
3989
3993
|
}
|
|
3990
|
-
function
|
|
3994
|
+
function Or(e, t) {
|
|
3991
3995
|
let n = /* @__PURE__ */ new Set(["type", ...t]), r = Object.keys(e).filter((e) => !n.has(e));
|
|
3992
3996
|
if (r.length > 0) throw TypeError(`Bubble content run has unknown properties: ${r.join(", ")}.`);
|
|
3993
3997
|
for (let n of t) if (typeof e[n] != "string") throw TypeError(`Bubble content run ${n} must be a string.`);
|
|
3994
3998
|
}
|
|
3995
|
-
function
|
|
3996
|
-
if (!
|
|
3997
|
-
if (e.type === "text") return
|
|
3999
|
+
function kr(e) {
|
|
4000
|
+
if (!Dr(e)) throw TypeError("Bubble content run must be an object.");
|
|
4001
|
+
if (e.type === "text") return Or(e, ["text"]), Object.freeze({
|
|
3998
4002
|
text: e.text,
|
|
3999
4003
|
type: "text"
|
|
4000
4004
|
});
|
|
4001
4005
|
if (e.type === "ruby") {
|
|
4002
|
-
|
|
4006
|
+
Or(e, ["base", "reading"]);
|
|
4003
4007
|
let t = e.base, n = e.reading;
|
|
4004
4008
|
if (t.length === 0) throw TypeError("Bubble ruby run base must not be empty.");
|
|
4005
4009
|
if (n.length === 0) throw TypeError("Bubble ruby run reading must not be empty.");
|
|
@@ -4011,28 +4015,28 @@ function Or(e) {
|
|
|
4011
4015
|
}
|
|
4012
4016
|
throw TypeError("Bubble content run type must be text or ruby.");
|
|
4013
4017
|
}
|
|
4014
|
-
function
|
|
4018
|
+
function Ar(e) {
|
|
4015
4019
|
if (typeof e == "string") return Object.freeze([Object.freeze({
|
|
4016
4020
|
text: e,
|
|
4017
4021
|
type: "text"
|
|
4018
4022
|
})]);
|
|
4019
4023
|
if (!Array.isArray(e)) throw TypeError("Bubble text must be a string or content run array.");
|
|
4020
|
-
let t = e.map((e) =>
|
|
4024
|
+
let t = e.map((e) => kr(e)).filter((e) => e.type !== "text" || e.text.length > 0);
|
|
4021
4025
|
return t.length === 0 ? Object.freeze([Object.freeze({
|
|
4022
4026
|
text: "",
|
|
4023
4027
|
type: "text"
|
|
4024
4028
|
})]) : Object.freeze(t);
|
|
4025
4029
|
}
|
|
4026
|
-
function
|
|
4030
|
+
function jr(e) {
|
|
4027
4031
|
return e.every((e) => e.type === "text");
|
|
4028
4032
|
}
|
|
4029
|
-
function
|
|
4033
|
+
function Mr(e) {
|
|
4030
4034
|
return e.map((e) => e.type === "ruby" ? e.base : e.text).join("");
|
|
4031
4035
|
}
|
|
4032
|
-
function
|
|
4036
|
+
function Nr(e) {
|
|
4033
4037
|
return e.map((e) => e.type === "ruby" ? e.reading : "").join("");
|
|
4034
4038
|
}
|
|
4035
|
-
function
|
|
4039
|
+
function Pr(e) {
|
|
4036
4040
|
let t = [];
|
|
4037
4041
|
for (let n of e) {
|
|
4038
4042
|
let e = t[t.length - 1];
|
|
@@ -4049,21 +4053,21 @@ function Nr(e) {
|
|
|
4049
4053
|
}
|
|
4050
4054
|
//#endregion
|
|
4051
4055
|
//#region src/reveal.ts
|
|
4052
|
-
var
|
|
4056
|
+
var Fr = Object.freeze([
|
|
4053
4057
|
"CHARACTER",
|
|
4054
4058
|
"WORD",
|
|
4055
4059
|
"LINE",
|
|
4056
4060
|
"BLOCK"
|
|
4057
4061
|
]);
|
|
4058
|
-
function
|
|
4062
|
+
function Ir(e) {
|
|
4059
4063
|
let t = globalThis.Intl?.Segmenter;
|
|
4060
4064
|
return typeof t == "function" ? [...new t(void 0, { granularity: "grapheme" }).segment(e)].map(({ segment: e }) => e) : Array.from(e);
|
|
4061
4065
|
}
|
|
4062
|
-
function
|
|
4063
|
-
if (typeof e != "string" || !
|
|
4066
|
+
function Lr(e) {
|
|
4067
|
+
if (typeof e != "string" || !Fr.includes(e)) throw TypeError("Bubble reveal unit must be CHARACTER, WORD, LINE, or BLOCK.");
|
|
4064
4068
|
return e;
|
|
4065
4069
|
}
|
|
4066
|
-
function
|
|
4070
|
+
function Rr(e) {
|
|
4067
4071
|
if (typeof e != "object" || !e || Array.isArray(e)) throw TypeError("Bubble reveal must be an object.");
|
|
4068
4072
|
let t = e, n = /* @__PURE__ */ new Set([
|
|
4069
4073
|
"unit",
|
|
@@ -4074,7 +4078,7 @@ function Lr(e) {
|
|
|
4074
4078
|
"sound"
|
|
4075
4079
|
]);
|
|
4076
4080
|
if (Object.keys(t).filter((e) => !n.has(e)).length > 0 || t.unit === void 0) throw TypeError("Bubble reveal has unknown or missing properties.");
|
|
4077
|
-
let r =
|
|
4081
|
+
let r = Lr(t.unit), i = t.delimiters ?? " \r\n";
|
|
4078
4082
|
if (typeof i != "string" || i.length === 0) throw TypeError("Bubble WORD delimiters must be a non-empty string.");
|
|
4079
4083
|
let a = t.showDelimiters ?? !1;
|
|
4080
4084
|
if (typeof a != "boolean") throw TypeError("Bubble reveal showDelimiters must be boolean.");
|
|
@@ -4093,16 +4097,16 @@ function Lr(e) {
|
|
|
4093
4097
|
...c === void 0 ? {} : { sound: c }
|
|
4094
4098
|
});
|
|
4095
4099
|
}
|
|
4096
|
-
function
|
|
4100
|
+
function zr(e, t, n) {
|
|
4097
4101
|
let r = new Set(Array.from(t)), i = [], a = "";
|
|
4098
|
-
for (let t of
|
|
4102
|
+
for (let t of Ir(e)) a += t, r.has(t) && ((n || a.slice(0, -t.length).length > 0) && i.push(n ? a : a.slice(0, -t.length)), a = "");
|
|
4099
4103
|
return a.length > 0 && i.push(a), i.filter((e) => e.length > 0);
|
|
4100
4104
|
}
|
|
4101
|
-
function
|
|
4105
|
+
function Br(e, t) {
|
|
4102
4106
|
if (e.length === 0) return Object.freeze([""]);
|
|
4103
|
-
if (t.unit === "CHARACTER") return Object.freeze(
|
|
4107
|
+
if (t.unit === "CHARACTER") return Object.freeze(Ir(e));
|
|
4104
4108
|
if (t.unit === "WORD") {
|
|
4105
|
-
let n =
|
|
4109
|
+
let n = zr(e, t.delimiters, t.showDelimiters);
|
|
4106
4110
|
if (t.showDelimiters) return Object.freeze(n);
|
|
4107
4111
|
let r = [], i = 0;
|
|
4108
4112
|
for (let a of n) {
|
|
@@ -4120,21 +4124,21 @@ function zr(e, t) {
|
|
|
4120
4124
|
let i = r;
|
|
4121
4125
|
return Object.freeze(i.length > 0 ? i : [e]);
|
|
4122
4126
|
}
|
|
4123
|
-
function
|
|
4127
|
+
function Vr(e, t) {
|
|
4124
4128
|
return e.slice(0, Math.max(0, Math.min(t, e.length))).join("");
|
|
4125
4129
|
}
|
|
4126
|
-
function Vr(e) {
|
|
4127
|
-
return Object.freeze(Nr(Object.freeze([...e])));
|
|
4128
|
-
}
|
|
4129
4130
|
function Hr(e) {
|
|
4131
|
+
return Object.freeze(Pr(Object.freeze([...e])));
|
|
4132
|
+
}
|
|
4133
|
+
function Ur(e) {
|
|
4130
4134
|
return Object.freeze({
|
|
4131
4135
|
text: e,
|
|
4132
4136
|
type: "text"
|
|
4133
4137
|
});
|
|
4134
4138
|
}
|
|
4135
|
-
function
|
|
4139
|
+
function Wr(e, t) {
|
|
4136
4140
|
let n = [], r = [], i = () => {
|
|
4137
|
-
r.length !== 0 && (n.push(
|
|
4141
|
+
r.length !== 0 && (n.push(Hr(r)), r = []);
|
|
4138
4142
|
};
|
|
4139
4143
|
for (let n of e) {
|
|
4140
4144
|
if (n.type === "ruby") {
|
|
@@ -4142,53 +4146,53 @@ function Ur(e, t) {
|
|
|
4142
4146
|
continue;
|
|
4143
4147
|
}
|
|
4144
4148
|
if (t === "LINE") {
|
|
4145
|
-
for (let e of n.text.split(/(?<=\n)/u)) e.length !== 0 && (r.push(
|
|
4149
|
+
for (let e of n.text.split(/(?<=\n)/u)) e.length !== 0 && (r.push(Ur(e)), e.endsWith("\n") && i());
|
|
4146
4150
|
continue;
|
|
4147
4151
|
}
|
|
4148
4152
|
let e = n.text.split(/(\n{2,})/u);
|
|
4149
|
-
for (let [t, n] of e.entries()) n.length !== 0 && (r.push(
|
|
4153
|
+
for (let [t, n] of e.entries()) n.length !== 0 && (r.push(Ur(n)), t % 2 == 1 && i());
|
|
4150
4154
|
}
|
|
4151
|
-
return i(), Object.freeze(n.length > 0 ? n : [
|
|
4155
|
+
return i(), Object.freeze(n.length > 0 ? n : [Hr(e)]);
|
|
4152
4156
|
}
|
|
4153
|
-
function
|
|
4154
|
-
if (
|
|
4155
|
-
if (t.unit === "LINE" || t.unit === "BLOCK") return
|
|
4157
|
+
function Gr(e, t) {
|
|
4158
|
+
if (jr(e)) return Object.freeze(Br(Mr(e), t).map((e) => Object.freeze([Ur(e)])));
|
|
4159
|
+
if (t.unit === "LINE" || t.unit === "BLOCK") return Wr(e, t.unit);
|
|
4156
4160
|
let n = [];
|
|
4157
4161
|
for (let r of e) {
|
|
4158
4162
|
if (r.type === "ruby") {
|
|
4159
4163
|
n.push(Object.freeze([r]));
|
|
4160
4164
|
continue;
|
|
4161
4165
|
}
|
|
4162
|
-
let e = t.unit === "CHARACTER" ?
|
|
4163
|
-
for (let t of e) n.push(Object.freeze([
|
|
4166
|
+
let e = t.unit === "CHARACTER" ? Ir(r.text) : zr(r.text, t.delimiters, t.showDelimiters);
|
|
4167
|
+
for (let t of e) n.push(Object.freeze([Ur(t)]));
|
|
4164
4168
|
}
|
|
4165
|
-
return Object.freeze(n.length > 0 ? n : [Object.freeze([
|
|
4169
|
+
return Object.freeze(n.length > 0 ? n : [Object.freeze([Ur("")])]);
|
|
4166
4170
|
}
|
|
4167
|
-
function
|
|
4171
|
+
function Kr(e, t) {
|
|
4168
4172
|
let n = e.slice(0, Math.max(0, Math.min(t, e.length)));
|
|
4169
|
-
return
|
|
4173
|
+
return Pr(Object.freeze(n.flat()));
|
|
4170
4174
|
}
|
|
4171
4175
|
//#endregion
|
|
4172
4176
|
//#region src/portrait-layout.ts
|
|
4173
|
-
var
|
|
4177
|
+
var qr = Object.freeze([
|
|
4174
4178
|
"left",
|
|
4175
4179
|
"right",
|
|
4176
4180
|
"top-left",
|
|
4177
4181
|
"top-right",
|
|
4178
4182
|
"bottom-left",
|
|
4179
4183
|
"bottom-right"
|
|
4180
|
-
]),
|
|
4184
|
+
]), Jr = "left", Yr = Object.freeze({
|
|
4181
4185
|
x: 0,
|
|
4182
4186
|
y: 0,
|
|
4183
4187
|
zoomPercent: 100
|
|
4184
|
-
}),
|
|
4185
|
-
function
|
|
4188
|
+
}), Xr = 0;
|
|
4189
|
+
function Zr(e) {
|
|
4186
4190
|
if (typeof e != "string") throw TypeError("Bubble portrait placement must be a string.");
|
|
4187
4191
|
let t = e.trim().toLowerCase().replaceAll("_", "-");
|
|
4188
|
-
if (!
|
|
4192
|
+
if (!qr.includes(t)) throw TypeError(`Unsupported Bubble portrait placement: ${e}`);
|
|
4189
4193
|
return t;
|
|
4190
4194
|
}
|
|
4191
|
-
function
|
|
4195
|
+
function Qr(e) {
|
|
4192
4196
|
if (!Array.isArray(e) || e.length !== 2 && e.length !== 3) throw TypeError("Bubble portrait offset must be [x, y] or [x, y, zoom].");
|
|
4193
4197
|
let [t, n, r = 100] = e;
|
|
4194
4198
|
if (![
|
|
@@ -4202,13 +4206,13 @@ function Zr(e) {
|
|
|
4202
4206
|
zoomPercent: r
|
|
4203
4207
|
});
|
|
4204
4208
|
}
|
|
4205
|
-
function
|
|
4209
|
+
function $r(e) {
|
|
4206
4210
|
if (typeof e != "number" || !Number.isFinite(e) || e < 0) throw TypeError("Bubble portrait corner radius must be zero or greater.");
|
|
4207
4211
|
return e;
|
|
4208
4212
|
}
|
|
4209
4213
|
//#endregion
|
|
4210
4214
|
//#region src/scratch-default.ts
|
|
4211
|
-
var
|
|
4215
|
+
var ei = 330, ti = 170, ni = 50, ri = 4, ii = 10, ai = 16, oi = 12, si = 14, ci = 16, li = Object.freeze([
|
|
4212
4216
|
"placement",
|
|
4213
4217
|
"maxWidth",
|
|
4214
4218
|
"textLocale",
|
|
@@ -4223,20 +4227,20 @@ var $r = 330, ei = 170, ti = 50, ni = 4, ri = 10, ii = 16, ai = 12, oi = 14, si
|
|
|
4223
4227
|
"showAnimation",
|
|
4224
4228
|
"hideAnimation"
|
|
4225
4229
|
]);
|
|
4226
|
-
function li(e) {
|
|
4227
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4228
|
-
}
|
|
4229
4230
|
function ui(e) {
|
|
4230
|
-
return
|
|
4231
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4231
4232
|
}
|
|
4232
4233
|
function di(e) {
|
|
4233
|
-
return ui(e) === "scratch-default";
|
|
4234
|
+
return !ui(e) || typeof e.textStyle != "string" || e.textStyle.trim() !== "default" ? "custom" : li.every((t) => e[t] === void 0) ? "scratch-default" : "custom";
|
|
4234
4235
|
}
|
|
4235
4236
|
function fi(e) {
|
|
4237
|
+
return di(e) === "scratch-default";
|
|
4238
|
+
}
|
|
4239
|
+
function pi(e) {
|
|
4236
4240
|
let t = e;
|
|
4237
4241
|
return typeof e == "number" && Math.abs(e) >= .01 && e % 1 != 0 && (t = e.toFixed(2)), String(t).slice(0, 330);
|
|
4238
4242
|
}
|
|
4239
|
-
function
|
|
4243
|
+
function mi(e) {
|
|
4240
4244
|
let t = 0;
|
|
4241
4245
|
for (let n of e) if (!/\p{Mark}/u.test(n)) {
|
|
4242
4246
|
if (/\s/u.test(n)) {
|
|
@@ -4247,8 +4251,8 @@ function pi(e) {
|
|
|
4247
4251
|
}
|
|
4248
4252
|
return t * 14;
|
|
4249
4253
|
}
|
|
4250
|
-
function
|
|
4251
|
-
let n =
|
|
4254
|
+
function hi(e, t = mi) {
|
|
4255
|
+
let n = Er({
|
|
4252
4256
|
text: e.slice(0, 330),
|
|
4253
4257
|
maxWidth: 170,
|
|
4254
4258
|
measureText: (e) => {
|
|
@@ -4256,9 +4260,9 @@ function mi(e, t = pi) {
|
|
|
4256
4260
|
try {
|
|
4257
4261
|
n = t(e);
|
|
4258
4262
|
} catch {
|
|
4259
|
-
return
|
|
4263
|
+
return mi(e);
|
|
4260
4264
|
}
|
|
4261
|
-
return Number.isFinite(n) && n >= 0 ? n :
|
|
4265
|
+
return Number.isFinite(n) && n >= 0 ? n : mi(e);
|
|
4262
4266
|
}
|
|
4263
4267
|
}), r = Object.freeze(n.lines.map((e) => Object.freeze({
|
|
4264
4268
|
text: e.text,
|
|
@@ -4270,7 +4274,7 @@ function mi(e, t = pi) {
|
|
|
4270
4274
|
text: r.map((e) => e.text).join("\n")
|
|
4271
4275
|
});
|
|
4272
4276
|
}
|
|
4273
|
-
function
|
|
4277
|
+
function gi(e) {
|
|
4274
4278
|
let t = Math.max(1, e.lines.length), n = Math.max(e.maxLineWidth, 50) + 20, r = 16 * t + 20;
|
|
4275
4279
|
return Object.freeze({
|
|
4276
4280
|
bodyHeight: r + 4,
|
|
@@ -4281,7 +4285,7 @@ function hi(e) {
|
|
|
4281
4285
|
width: n + 4
|
|
4282
4286
|
});
|
|
4283
4287
|
}
|
|
4284
|
-
function
|
|
4288
|
+
function _i(e) {
|
|
4285
4289
|
let t = -e.stageWidth / 2, n = e.stageWidth / 2, r = e.stageHeight / 2, i = e.pointsLeft;
|
|
4286
4290
|
!i && e.width + e.bounds.right > n && e.bounds.left - e.width > t ? i = !0 : i && e.bounds.left - e.width < t && e.width + e.bounds.right < n && (i = !1);
|
|
4287
4291
|
let a = i ? Math.min(n - e.width, Math.max(t, e.bounds.left - e.width)) : Math.max(t, Math.min(n - e.width, e.bounds.right)), o = Math.min(r, e.bounds.bottom + e.height);
|
|
@@ -4293,10 +4297,10 @@ function gi(e) {
|
|
|
4293
4297
|
top: o
|
|
4294
4298
|
});
|
|
4295
4299
|
}
|
|
4296
|
-
function
|
|
4300
|
+
function vi(e) {
|
|
4297
4301
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
4298
4302
|
}
|
|
4299
|
-
function
|
|
4303
|
+
function yi(e) {
|
|
4300
4304
|
let { paddedHeight: t, paddedWidth: n } = e, r = Math.min(16, n / 2, t / 2);
|
|
4301
4305
|
return [
|
|
4302
4306
|
`M ${r} ${t}`,
|
|
@@ -4309,16 +4313,16 @@ function vi(e) {
|
|
|
4309
4313
|
`Q ${n} ${t} ${n - r} ${t}`
|
|
4310
4314
|
].join(" ");
|
|
4311
4315
|
}
|
|
4312
|
-
function yi(e) {
|
|
4313
|
-
let { paddedHeight: t, paddedWidth: n } = e;
|
|
4314
|
-
return `<path d="${`${vi(e)} C ${n - 16} ${t + 4} ${n - 12} ${t + 8} ${n - 12} ${t + 10} Q ${n - 12} ${t + 12} ${n - 14} ${t + 12} C ${n - 17} ${t + 12} ${n - 27} ${t + 8} ${n - 32} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/>`;
|
|
4315
|
-
}
|
|
4316
4316
|
function bi(e) {
|
|
4317
4317
|
let { paddedHeight: t, paddedWidth: n } = e;
|
|
4318
|
-
return `<path d="${`${
|
|
4318
|
+
return `<path d="${`${yi(e)} C ${n - 16} ${t + 4} ${n - 12} ${t + 8} ${n - 12} ${t + 10} Q ${n - 12} ${t + 12} ${n - 14} ${t + 12} C ${n - 17} ${t + 12} ${n - 27} ${t + 8} ${n - 32} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/>`;
|
|
4319
4319
|
}
|
|
4320
4320
|
function xi(e) {
|
|
4321
|
-
let
|
|
4321
|
+
let { paddedHeight: t, paddedWidth: n } = e;
|
|
4322
|
+
return `<path d="${`${yi(e)} L ${n - 28} ${t} A 4 4 0 0 1 ${n - 36} ${t} Z`}" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" stroke-linejoin="round" paint-order="stroke fill"/><circle cx="${n - 25.25}" cy="${t + 7.25}" r="2.25" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/><circle cx="${n - 17.5}" cy="${t + 9.5}" r="1.5" fill="white" stroke="rgba(0, 0, 0, 0.15)" stroke-width="4" paint-order="stroke fill"/>`;
|
|
4323
|
+
}
|
|
4324
|
+
function Si(e) {
|
|
4325
|
+
let t = gi(e.layout), n = e.kind === "say" ? bi(t) : xi(t), r = e.pointsLeft ? "translate(2 2)" : `translate(${t.width} 0) scale(-1 1) translate(2 2)`, i = e.layout.lines.map((e, t) => `<text x="12" y="${24.6 + 16 * t}" fill="#575E75" font-family="Helvetica, sans-serif" font-size="14" xml:space="preserve">${vi(e.text)}</text>`).join(""), a = vi(e.title ?? `${e.kind} bubble`);
|
|
4322
4326
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t.width}" height="${t.height}" viewBox="0 0 ${t.width} ${t.height}" role="img" data-bubble-profile="scratch-default" data-bubble-kind="${e.kind}"><title>${a}</title><g transform="${r}">${n}</g>${i}</svg>`;
|
|
4323
4327
|
}
|
|
4324
4328
|
//#endregion
|
|
@@ -4328,11 +4332,11 @@ var Q = class extends Error {
|
|
|
4328
4332
|
constructor(e, t) {
|
|
4329
4333
|
super(t), this.name = "BubbleCompositionError", this.code = e;
|
|
4330
4334
|
}
|
|
4331
|
-
},
|
|
4335
|
+
}, Ci = /* @__PURE__ */ new Set(["say", "think"]), wi = /* @__PURE__ */ new Set([
|
|
4332
4336
|
"idle",
|
|
4333
4337
|
"talking",
|
|
4334
4338
|
"awaiting-continue"
|
|
4335
|
-
]),
|
|
4339
|
+
]), Ti = /* @__PURE__ */ new Set([
|
|
4336
4340
|
"fadeIn",
|
|
4337
4341
|
"fadeOut",
|
|
4338
4342
|
"floatIn",
|
|
@@ -4344,7 +4348,7 @@ var Q = class extends Error {
|
|
|
4344
4348
|
"shake",
|
|
4345
4349
|
"explode",
|
|
4346
4350
|
"animateBubbleShape"
|
|
4347
|
-
]),
|
|
4351
|
+
]), Ei = /* @__PURE__ */ new Set([
|
|
4348
4352
|
"linear",
|
|
4349
4353
|
"easeIn",
|
|
4350
4354
|
"easeOut",
|
|
@@ -4353,45 +4357,45 @@ var Q = class extends Error {
|
|
|
4353
4357
|
function $(e) {
|
|
4354
4358
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4355
4359
|
}
|
|
4356
|
-
function
|
|
4360
|
+
function Di(e, t, n, r) {
|
|
4357
4361
|
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));
|
|
4358
4362
|
if (a.length > 0 || o.length > 0) throw new Q("BUBBLE-COMPOSITION-001", `${r} has missing or unknown properties.`);
|
|
4359
4363
|
}
|
|
4360
|
-
function
|
|
4364
|
+
function Oi(e, t) {
|
|
4361
4365
|
if (typeof e != "string" || e.trim().length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
|
|
4362
4366
|
return e.trim();
|
|
4363
4367
|
}
|
|
4364
|
-
function
|
|
4368
|
+
function ki(e, t) {
|
|
4365
4369
|
if (typeof e != "string" || e.length === 0) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be a non-empty string.`);
|
|
4366
4370
|
return e;
|
|
4367
4371
|
}
|
|
4368
|
-
function
|
|
4372
|
+
function Ai(e, t, n) {
|
|
4369
4373
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
|
|
4370
|
-
if (
|
|
4371
|
-
let r = Object.freeze(e.frames.map((e, n) =>
|
|
4374
|
+
if (Di(e, ["frames", "frameIntervalSeconds"], [], t), !Array.isArray(e.frames) || e.frames.length < n) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frames must contain at least ${n} image asset name${n === 1 ? "" : "s"}.`);
|
|
4375
|
+
let r = Object.freeze(e.frames.map((e, n) => ki(e, `${t}.frames[${n}]`))), i = e.frameIntervalSeconds;
|
|
4372
4376
|
if (typeof i != "number" || !Number.isFinite(i) || i <= 0) throw new Q("BUBBLE-COMPOSITION-001", `${t}.frameIntervalSeconds must be a positive finite number.`);
|
|
4373
4377
|
return Object.freeze({
|
|
4374
4378
|
frames: r,
|
|
4375
4379
|
frameIntervalSeconds: i
|
|
4376
4380
|
});
|
|
4377
4381
|
}
|
|
4378
|
-
function
|
|
4382
|
+
function ji(e) {
|
|
4379
4383
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble portrait must be an object.");
|
|
4380
|
-
|
|
4384
|
+
Di(e, ["base"], [
|
|
4381
4385
|
"blink",
|
|
4382
4386
|
"lipSync",
|
|
4383
4387
|
"placement",
|
|
4384
4388
|
"offset",
|
|
4385
4389
|
"cornerRadius"
|
|
4386
4390
|
], "Bubble portrait");
|
|
4387
|
-
let t = e.blink === void 0 ? void 0 :
|
|
4391
|
+
let t = e.blink === void 0 ? void 0 : Ai(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : Ai(e.lipSync, "Bubble portrait lip-sync", 1), r, i, a;
|
|
4388
4392
|
try {
|
|
4389
|
-
r =
|
|
4393
|
+
r = Zr(e.placement ?? "left"), i = e.offset === void 0 ? Yr : Qr(e.offset), a = $r(e.cornerRadius ?? 0);
|
|
4390
4394
|
} catch (e) {
|
|
4391
4395
|
throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble portrait layout is invalid.");
|
|
4392
4396
|
}
|
|
4393
4397
|
return Object.freeze({
|
|
4394
|
-
base:
|
|
4398
|
+
base: ki(e.base, "Bubble portrait base"),
|
|
4395
4399
|
...t === void 0 ? {} : { blink: t },
|
|
4396
4400
|
...n === void 0 ? {} : { lipSync: n },
|
|
4397
4401
|
placement: r,
|
|
@@ -4399,9 +4403,9 @@ function Ai(e) {
|
|
|
4399
4403
|
cornerRadius: a
|
|
4400
4404
|
});
|
|
4401
4405
|
}
|
|
4402
|
-
function
|
|
4406
|
+
function Mi(e, t) {
|
|
4403
4407
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", `${t} must be an object.`);
|
|
4404
|
-
if (
|
|
4408
|
+
if (Di(e, ["name"], [
|
|
4405
4409
|
"durationSeconds",
|
|
4406
4410
|
"ease",
|
|
4407
4411
|
"direction",
|
|
@@ -4409,7 +4413,7 @@ function ji(e, t) {
|
|
|
4409
4413
|
"relativeScale",
|
|
4410
4414
|
"speed",
|
|
4411
4415
|
"visualStyle"
|
|
4412
|
-
], t), !
|
|
4416
|
+
], t), !Ti.has(e.name)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.name is not a supported Bubble motion.`);
|
|
4413
4417
|
let n = (n, r, i = !1) => {
|
|
4414
4418
|
let a = e[n];
|
|
4415
4419
|
if (a !== void 0) {
|
|
@@ -4419,7 +4423,7 @@ function ji(e, t) {
|
|
|
4419
4423
|
}, r = n("durationSeconds", 0), i = n("count", 1, !0), a = n("relativeScale", 0), o = n("speed", 0), s = e.direction;
|
|
4420
4424
|
if (s !== void 0 && typeof s != "number" && typeof s != "string") throw new Q("BUBBLE-COMPOSITION-001", `${t}.direction is invalid.`);
|
|
4421
4425
|
let c = e.ease ?? "easeInOut";
|
|
4422
|
-
if (typeof c != "string" || !
|
|
4426
|
+
if (typeof c != "string" || !Ei.has(c)) throw new Q("BUBBLE-COMPOSITION-001", `${t}.ease is invalid.`);
|
|
4423
4427
|
let l = e.visualStyle;
|
|
4424
4428
|
if (l !== void 0 && (typeof l != "string" || !N.includes(l))) throw new Q("BUBBLE-COMPOSITION-001", `${t}.visualStyle is invalid.`);
|
|
4425
4429
|
return Object.freeze({
|
|
@@ -4433,10 +4437,10 @@ function ji(e, t) {
|
|
|
4433
4437
|
...l === void 0 ? {} : { visualStyle: l }
|
|
4434
4438
|
});
|
|
4435
4439
|
}
|
|
4436
|
-
function
|
|
4440
|
+
function Ni(e) {
|
|
4437
4441
|
if (e === void 0) return;
|
|
4438
4442
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble audio must be an object.");
|
|
4439
|
-
|
|
4443
|
+
Di(e, [], [
|
|
4440
4444
|
"voice",
|
|
4441
4445
|
"reveal",
|
|
4442
4446
|
"finish"
|
|
@@ -4448,13 +4452,13 @@ function Mi(e) {
|
|
|
4448
4452
|
"finish"
|
|
4449
4453
|
]) {
|
|
4450
4454
|
let r = e[n];
|
|
4451
|
-
r !== void 0 && (t[n] =
|
|
4455
|
+
r !== void 0 && (t[n] = ki(r, `Bubble audio ${n}`));
|
|
4452
4456
|
}
|
|
4453
4457
|
return Object.freeze(t);
|
|
4454
4458
|
}
|
|
4455
|
-
function
|
|
4459
|
+
function Pi(e) {
|
|
4456
4460
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style must be an object.");
|
|
4457
|
-
|
|
4461
|
+
Di(e, ["name", "textStyle"], [
|
|
4458
4462
|
"placement",
|
|
4459
4463
|
"maxWidth",
|
|
4460
4464
|
"textLocale",
|
|
@@ -4469,13 +4473,13 @@ function Ni(e) {
|
|
|
4469
4473
|
"showAnimation",
|
|
4470
4474
|
"hideAnimation"
|
|
4471
4475
|
], "Bubble style");
|
|
4472
|
-
let t = e.portrait === void 0 ? void 0 :
|
|
4476
|
+
let t = e.portrait === void 0 ? void 0 : ji(e.portrait), n = e.continueIndicator === void 0 ? void 0 : Ai(e.continueIndicator, "Bubble continue indicator", 2), r;
|
|
4473
4477
|
if (e.reveal !== void 0) try {
|
|
4474
|
-
r =
|
|
4478
|
+
r = Rr(e.reveal);
|
|
4475
4479
|
} catch (e) {
|
|
4476
4480
|
throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
|
|
4477
4481
|
}
|
|
4478
|
-
let i =
|
|
4482
|
+
let i = Ni(e.audio), a = e.showAnimation === void 0 ? void 0 : Mi(e.showAnimation, "Bubble showAnimation"), o = e.hideAnimation === void 0 ? void 0 : Mi(e.hideAnimation, "Bubble hideAnimation"), s;
|
|
4479
4483
|
try {
|
|
4480
4484
|
s = y(e.placement ?? "up-right");
|
|
4481
4485
|
} catch (e) {
|
|
@@ -4494,10 +4498,10 @@ function Ni(e) {
|
|
|
4494
4498
|
if (typeof e.maxWidth != "number" || !Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw new Q("BUBBLE-COMPOSITION-001", "Bubble style maxWidth must be a positive finite number.");
|
|
4495
4499
|
f = e.maxWidth;
|
|
4496
4500
|
}
|
|
4497
|
-
let p = e.textLocale === void 0 ? void 0 :
|
|
4501
|
+
let p = e.textLocale === void 0 ? void 0 : Oi(e.textLocale, "Bubble style text locale"), m = di(e);
|
|
4498
4502
|
return Object.freeze({
|
|
4499
|
-
name:
|
|
4500
|
-
textStyle:
|
|
4503
|
+
name: Oi(e.name, "Bubble style name"),
|
|
4504
|
+
textStyle: Oi(e.textStyle, "Bubble text style name"),
|
|
4501
4505
|
layoutProfile: m,
|
|
4502
4506
|
...f === void 0 ? {} : { maxWidth: f },
|
|
4503
4507
|
...p === void 0 ? {} : { textLocale: p },
|
|
@@ -4514,13 +4518,13 @@ function Ni(e) {
|
|
|
4514
4518
|
...o === void 0 ? {} : { hideAnimation: o }
|
|
4515
4519
|
});
|
|
4516
4520
|
}
|
|
4517
|
-
function
|
|
4521
|
+
function Fi(e) {
|
|
4518
4522
|
if (e !== void 0) {
|
|
4519
4523
|
if (!$(e) || typeof e.applyToTarget != "function" || typeof e.getMimeType != "function" || typeof e.isRegistered != "function") throw TypeError("Bubble image capability must provide applyToTarget, getMimeType, and isRegistered.");
|
|
4520
4524
|
return e;
|
|
4521
4525
|
}
|
|
4522
4526
|
}
|
|
4523
|
-
function
|
|
4527
|
+
function Ii(e) {
|
|
4524
4528
|
if (e !== void 0) {
|
|
4525
4529
|
if (!$(e) || typeof e.playSound != "function") throw TypeError("Bubble audio capability must provide playSound.");
|
|
4526
4530
|
if (e.isRegistered !== void 0 && typeof e.isRegistered != "function") throw TypeError("Bubble audio capability isRegistered must be a function.");
|
|
@@ -4528,83 +4532,83 @@ function Fi(e) {
|
|
|
4528
4532
|
return e;
|
|
4529
4533
|
}
|
|
4530
4534
|
}
|
|
4531
|
-
function
|
|
4535
|
+
function Li(e) {
|
|
4532
4536
|
if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", "Bubble image assets require an image capability. Provide options.imageResolver.");
|
|
4533
4537
|
return e;
|
|
4534
4538
|
}
|
|
4535
|
-
function
|
|
4539
|
+
function Ri(e) {
|
|
4536
4540
|
if (!$(e) || typeof e.setText != "function" || typeof e.releaseTarget != "function") throw TypeError("Bubble text capability must provide setText and releaseTarget.");
|
|
4537
4541
|
return e;
|
|
4538
4542
|
}
|
|
4539
|
-
function
|
|
4543
|
+
function zi() {
|
|
4540
4544
|
return Object.freeze({
|
|
4541
4545
|
setTimeout: (e, t) => globalThis.setTimeout(e, t),
|
|
4542
4546
|
clearTimeout: (e) => globalThis.clearTimeout(e)
|
|
4543
4547
|
});
|
|
4544
4548
|
}
|
|
4545
|
-
function
|
|
4549
|
+
function Bi(e) {
|
|
4546
4550
|
if (!$(e) || typeof e.setTimeout != "function" || typeof e.clearTimeout != "function") throw TypeError("Bubble scheduler must provide setTimeout and clearTimeout.");
|
|
4547
4551
|
return e;
|
|
4548
4552
|
}
|
|
4549
|
-
function
|
|
4553
|
+
function Vi(e, t) {
|
|
4550
4554
|
if (!$(e) || typeof e.id != "string" || e.id.length === 0 || typeof e.isStage != "boolean") throw new Q("BUBBLE-COMPOSITION-004", `${t} must provide id and isStage.`);
|
|
4551
4555
|
return e;
|
|
4552
4556
|
}
|
|
4553
|
-
function
|
|
4557
|
+
function Hi(e) {
|
|
4554
4558
|
if (typeof e != "object" || !e) throw new Q("BUBBLE-COMPOSITION-004", "Bubble text target must be a non-null object.");
|
|
4555
4559
|
return e;
|
|
4556
4560
|
}
|
|
4557
|
-
function
|
|
4561
|
+
function Ui(e, t) {
|
|
4558
4562
|
if (!$(e) || !$(e.targets) || typeof e.setLayerVisible != "function" || typeof e.updateStyle != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Q("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
|
|
4559
4563
|
let n = e.targets;
|
|
4560
|
-
|
|
4564
|
+
Hi(n.text);
|
|
4561
4565
|
let r = /* @__PURE__ */ new Set(), i = (e, t) => {
|
|
4562
4566
|
let i = n[e];
|
|
4563
4567
|
if (!t && i === void 0) return;
|
|
4564
|
-
let a =
|
|
4568
|
+
let a = Vi(i, `Bubble surface ${e}`);
|
|
4565
4569
|
if (r.has(a.id)) throw new Q("BUBBLE-COMPOSITION-004", "Bubble image layers must use distinct target IDs.");
|
|
4566
4570
|
r.add(a.id);
|
|
4567
4571
|
};
|
|
4568
4572
|
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;
|
|
4569
4573
|
}
|
|
4570
|
-
function
|
|
4574
|
+
function Wi(e, t) {
|
|
4571
4575
|
if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble image capability is required for: ${t}. Provide options.imageResolver.`);
|
|
4572
4576
|
if (!e.isRegistered(t)) throw new Q("BUBBLE-COMPOSITION-003", `Bubble image asset is not registered: ${t}`);
|
|
4573
4577
|
if (!e.getMimeType(t).startsWith("image/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not an image: ${t}`);
|
|
4574
4578
|
}
|
|
4575
|
-
function
|
|
4579
|
+
function Gi(e, t) {
|
|
4576
4580
|
if (e === void 0) throw new Q("BUBBLE-COMPOSITION-006", `Bubble audio assets require an audio capability: ${t}. Provide options.audio.`);
|
|
4577
4581
|
if (e.isRegistered?.(t) === !1) throw new Q("BUBBLE-COMPOSITION-003", `Bubble audio asset is not registered: ${t}`);
|
|
4578
4582
|
let n = e.getMimeType?.(t);
|
|
4579
4583
|
if (n !== void 0 && !n.startsWith("audio/")) throw new Q("BUBBLE-COMPOSITION-003", `Bubble asset is not audio: ${t}`);
|
|
4580
4584
|
}
|
|
4581
|
-
function
|
|
4585
|
+
function Ki(e) {
|
|
4582
4586
|
return [...e.portrait === void 0 ? [] : [
|
|
4583
4587
|
e.portrait.base,
|
|
4584
4588
|
...e.portrait.blink?.frames ?? [],
|
|
4585
4589
|
...e.portrait.lipSync?.frames ?? []
|
|
4586
4590
|
], ...e.continueIndicator?.frames ?? []];
|
|
4587
4591
|
}
|
|
4588
|
-
function
|
|
4592
|
+
function qi(e) {
|
|
4589
4593
|
let t = e.setRichText;
|
|
4590
4594
|
if (typeof t != "function") throw new Q("BUBBLE-COMPOSITION-007", "Bubble ruby content requires the text capability setRichText method.");
|
|
4591
4595
|
return t;
|
|
4592
4596
|
}
|
|
4593
|
-
function
|
|
4594
|
-
return !
|
|
4597
|
+
function Ji(e, t, n, r) {
|
|
4598
|
+
return !jr(e) && typeof r.splitRichText == "function" ? r.splitRichText({
|
|
4595
4599
|
reveal: t,
|
|
4596
4600
|
runs: e,
|
|
4597
4601
|
styleName: n
|
|
4598
|
-
}) :
|
|
4602
|
+
}) : Gr(e, t);
|
|
4599
4603
|
}
|
|
4600
|
-
function
|
|
4601
|
-
if (t.layoutProfile === "scratch-default") return
|
|
4604
|
+
function Yi(e, t, n) {
|
|
4605
|
+
if (t.layoutProfile === "scratch-default") return hi(e, (e) => typeof n.measureText == "function" ? n.measureText({
|
|
4602
4606
|
styleName: t.textStyle,
|
|
4603
4607
|
text: e
|
|
4604
4608
|
}) : NaN).text;
|
|
4605
4609
|
if (t.maxWidth === void 0) return e;
|
|
4606
4610
|
if (typeof n.measureText != "function") throw new Q("BUBBLE-COMPOSITION-007", "Bubble style maxWidth requires the text capability measureText method.");
|
|
4607
|
-
return
|
|
4611
|
+
return Er({
|
|
4608
4612
|
text: e,
|
|
4609
4613
|
maxWidth: t.maxWidth,
|
|
4610
4614
|
...t.textLocale === void 0 ? {} : { locale: t.textLocale },
|
|
@@ -4614,11 +4618,11 @@ function Ji(e, t, n) {
|
|
|
4614
4618
|
}) ?? 0
|
|
4615
4619
|
}).lines.map(({ text: e }) => e).join("\n");
|
|
4616
4620
|
}
|
|
4617
|
-
function
|
|
4621
|
+
function Xi(e, t) {
|
|
4618
4622
|
if (e.length === 1) throw e[0];
|
|
4619
4623
|
if (e.length > 1) throw AggregateError(e, t);
|
|
4620
4624
|
}
|
|
4621
|
-
function
|
|
4625
|
+
function Zi(e) {
|
|
4622
4626
|
let t = !1, n = 0, r = 0, i, a = Promise.resolve(), o = async (t) => {
|
|
4623
4627
|
let n = e.animation.frames[t];
|
|
4624
4628
|
n !== void 0 && await e.imageResolver.applyToTarget(n, e.target);
|
|
@@ -4653,45 +4657,45 @@ function Xi(e) {
|
|
|
4653
4657
|
}
|
|
4654
4658
|
});
|
|
4655
4659
|
}
|
|
4656
|
-
function
|
|
4660
|
+
function Qi(e) {
|
|
4657
4661
|
if (!$(e)) throw new Q("BUBBLE-COMPOSITION-001", "Show bubble input must be an object.");
|
|
4658
|
-
if (
|
|
4662
|
+
if (Di(e, [
|
|
4659
4663
|
"actor",
|
|
4660
4664
|
"actorKey",
|
|
4661
4665
|
"kind",
|
|
4662
4666
|
"text",
|
|
4663
4667
|
"styleName"
|
|
4664
|
-
], ["animationMode", "reveal"], "Show bubble input"), !
|
|
4668
|
+
], ["animationMode", "reveal"], "Show bubble input"), !Ci.has(e.kind)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble kind must be say or think.");
|
|
4665
4669
|
let t;
|
|
4666
4670
|
try {
|
|
4667
|
-
t =
|
|
4671
|
+
t = Ar(e.text);
|
|
4668
4672
|
} catch (e) {
|
|
4669
4673
|
throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble text is invalid.");
|
|
4670
4674
|
}
|
|
4671
4675
|
let n = e.animationMode ?? "talking";
|
|
4672
|
-
if (!
|
|
4676
|
+
if (!wi.has(n)) throw new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid.");
|
|
4673
4677
|
let r;
|
|
4674
4678
|
if (e.reveal !== void 0) try {
|
|
4675
|
-
r =
|
|
4679
|
+
r = Rr(e.reveal);
|
|
4676
4680
|
} catch (e) {
|
|
4677
4681
|
throw new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble reveal is invalid.");
|
|
4678
4682
|
}
|
|
4679
4683
|
return {
|
|
4680
4684
|
actor: e.actor,
|
|
4681
|
-
actorKey:
|
|
4685
|
+
actorKey: Oi(e.actorKey, "Bubble actor key"),
|
|
4682
4686
|
kind: e.kind,
|
|
4683
4687
|
content: t,
|
|
4684
|
-
styleName:
|
|
4688
|
+
styleName: Oi(e.styleName, "Bubble style name"),
|
|
4685
4689
|
animationMode: n,
|
|
4686
4690
|
...r === void 0 ? {} : { reveal: r }
|
|
4687
4691
|
};
|
|
4688
4692
|
}
|
|
4689
|
-
function
|
|
4693
|
+
function $i(e) {
|
|
4690
4694
|
if (!$(e)) throw TypeError("Bubble composition options must be an object.");
|
|
4691
|
-
let t =
|
|
4695
|
+
let t = Fi(e.imageResolver), n = Ii(e.audio), r = Ri(e.textCapability);
|
|
4692
4696
|
if (typeof e.createSurface != "function") throw TypeError("Bubble composition createSurface must be a function.");
|
|
4693
4697
|
if (e.onAnimationError !== void 0 && typeof e.onAnimationError != "function") throw TypeError("Bubble composition onAnimationError must be a function.");
|
|
4694
|
-
let i =
|
|
4698
|
+
let i = Bi(e.scheduler ?? zi()), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = !1, l = () => {
|
|
4695
4699
|
if (c) throw new Q("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
|
|
4696
4700
|
}, u = async (e, t) => {
|
|
4697
4701
|
let n = (s.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
|
|
@@ -4712,8 +4716,8 @@ function Qi(e) {
|
|
|
4712
4716
|
reveal: s.reveal
|
|
4713
4717
|
}));
|
|
4714
4718
|
let d = s.content, f = (e) => {
|
|
4715
|
-
let n = new Set(
|
|
4716
|
-
for (let e of n)
|
|
4719
|
+
let n = new Set(Ki(e)), r = n.size === 0 ? void 0 : Li(t);
|
|
4720
|
+
for (let e of n) Wi(r, e);
|
|
4717
4721
|
return r;
|
|
4718
4722
|
}, p = f(u);
|
|
4719
4723
|
for (let e of [
|
|
@@ -4721,13 +4725,13 @@ function Qi(e) {
|
|
|
4721
4725
|
u.audio?.reveal,
|
|
4722
4726
|
u.audio?.finish,
|
|
4723
4727
|
u.reveal?.sound
|
|
4724
|
-
]) e !== void 0 &&
|
|
4728
|
+
]) e !== void 0 && Gi(n, e);
|
|
4725
4729
|
let m = async (e, t = !1) => {
|
|
4726
4730
|
e !== void 0 && n !== void 0 && await n.playSound(e, { untilDone: t });
|
|
4727
4731
|
}, h = async (e, t, n) => {
|
|
4728
|
-
let r =
|
|
4732
|
+
let r = Ki(e).length === 0 ? void 0 : Li(t), i = [];
|
|
4729
4733
|
if (e.portrait) {
|
|
4730
|
-
let t =
|
|
4734
|
+
let t = Li(r);
|
|
4731
4735
|
i.push(Promise.resolve(t.applyToTarget(e.portrait.base, n.targets.portraitBase)));
|
|
4732
4736
|
let a = e.portrait.blink?.frames[0];
|
|
4733
4737
|
a !== void 0 && i.push(Promise.resolve(t.applyToTarget(a, n.targets.portraitBlink)));
|
|
@@ -4736,63 +4740,63 @@ function Qi(e) {
|
|
|
4736
4740
|
}
|
|
4737
4741
|
let a = e.continueIndicator?.frames[0];
|
|
4738
4742
|
if (a !== void 0) {
|
|
4739
|
-
let e =
|
|
4743
|
+
let e = Li(r);
|
|
4740
4744
|
i.push(Promise.resolve(e.applyToTarget(a, n.targets.continueIndicator)));
|
|
4741
4745
|
}
|
|
4742
4746
|
await Promise.all(i);
|
|
4743
4747
|
}, g = (t, n, r) => {
|
|
4744
|
-
x = t.portrait?.blink === void 0 ? void 0 :
|
|
4748
|
+
x = t.portrait?.blink === void 0 ? void 0 : Zi({
|
|
4745
4749
|
actorKey: s.actorKey,
|
|
4746
4750
|
layer: "portraitBlink",
|
|
4747
4751
|
animation: t.portrait.blink,
|
|
4748
4752
|
target: r.targets.portraitBlink,
|
|
4749
|
-
imageResolver:
|
|
4753
|
+
imageResolver: Li(n),
|
|
4750
4754
|
scheduler: i,
|
|
4751
4755
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4752
|
-
}), S = t.portrait?.lipSync === void 0 ? void 0 :
|
|
4756
|
+
}), S = t.portrait?.lipSync === void 0 ? void 0 : Zi({
|
|
4753
4757
|
actorKey: s.actorKey,
|
|
4754
4758
|
layer: "portraitLipSync",
|
|
4755
4759
|
animation: t.portrait.lipSync,
|
|
4756
4760
|
target: r.targets.portraitLipSync,
|
|
4757
|
-
imageResolver:
|
|
4761
|
+
imageResolver: Li(n),
|
|
4758
4762
|
scheduler: i,
|
|
4759
4763
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4760
|
-
}), C = t.continueIndicator === void 0 ? void 0 :
|
|
4764
|
+
}), C = t.continueIndicator === void 0 ? void 0 : Zi({
|
|
4761
4765
|
actorKey: s.actorKey,
|
|
4762
4766
|
layer: "continueIndicator",
|
|
4763
4767
|
animation: t.continueIndicator,
|
|
4764
4768
|
target: r.targets.continueIndicator,
|
|
4765
|
-
imageResolver:
|
|
4769
|
+
imageResolver: Li(n),
|
|
4766
4770
|
scheduler: i,
|
|
4767
4771
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4768
4772
|
});
|
|
4769
4773
|
}, _ = o.get(s.actorKey);
|
|
4770
4774
|
_ && await _.close();
|
|
4771
|
-
let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ?
|
|
4775
|
+
let v, y = !1, b = !1, x, S, C, w = u.reveal, T = w ? Ji(s.content, w, u.textStyle, r) : Object.freeze([s.content]), E = w ? Math.min(1, T.length) : 1, D, ee = 0;
|
|
4772
4776
|
try {
|
|
4773
|
-
v =
|
|
4777
|
+
v = Ui(await e.createSurface(Object.freeze({
|
|
4774
4778
|
actor: s.actor,
|
|
4775
4779
|
actorKey: s.actorKey,
|
|
4776
4780
|
kind: s.kind,
|
|
4777
4781
|
style: u
|
|
4778
4782
|
})), u);
|
|
4779
4783
|
let t = (e, t, n) => {
|
|
4780
|
-
|
|
4784
|
+
qi(r)({
|
|
4781
4785
|
runs: e,
|
|
4782
4786
|
styleName: t.textStyle,
|
|
4783
4787
|
target: n,
|
|
4784
4788
|
...t.maxWidth === void 0 ? {} : { maxWidth: t.maxWidth }
|
|
4785
4789
|
}), y = !0;
|
|
4786
|
-
}, a = () => !
|
|
4790
|
+
}, a = () => !jr(d), c = async (e, n = u) => {
|
|
4787
4791
|
if (a()) {
|
|
4788
4792
|
if (!v) return;
|
|
4789
4793
|
if (n.layoutProfile === "scratch-default" && v.renderScratchText) throw new Q("BUBBLE-COMPOSITION-007", "Bubble ruby content requires a rich text capability; the scratch-default surface renders plain text only.");
|
|
4790
4794
|
t(e, n, v.targets.text);
|
|
4791
4795
|
return;
|
|
4792
4796
|
}
|
|
4793
|
-
let i =
|
|
4797
|
+
let i = Mr(e);
|
|
4794
4798
|
if (n.layoutProfile === "scratch-default" && v?.renderScratchText) {
|
|
4795
|
-
let e =
|
|
4799
|
+
let e = hi(i, (e) => typeof r.measureText == "function" ? r.measureText({
|
|
4796
4800
|
styleName: n.textStyle,
|
|
4797
4801
|
text: e
|
|
4798
4802
|
}) : NaN);
|
|
@@ -4802,19 +4806,19 @@ function Qi(e) {
|
|
|
4802
4806
|
v && (r.setText({
|
|
4803
4807
|
styleName: n.textStyle,
|
|
4804
4808
|
target: v.targets.text,
|
|
4805
|
-
text:
|
|
4809
|
+
text: Yi(i, n, r)
|
|
4806
4810
|
}), y = !0);
|
|
4807
4811
|
}, l = (e, n = u) => {
|
|
4808
4812
|
v && (a() ? t(e, n, v.targets.text) : (r.setText({
|
|
4809
4813
|
styleName: n.textStyle,
|
|
4810
4814
|
target: v.targets.text,
|
|
4811
|
-
text:
|
|
4815
|
+
text: Yi(Mr(e), n, r)
|
|
4812
4816
|
}), y = !0), v.captureTextLayout?.());
|
|
4813
4817
|
};
|
|
4814
|
-
w?.layout === "RESERVED" && l(s.content), await c(w ?
|
|
4818
|
+
w?.layout === "RESERVED" && l(s.content), await c(w ? Kr(T, E) : s.content), await h(u, p, v), g(u, p, v);
|
|
4815
4819
|
let _ = "idle", O = !1, k = Promise.resolve(), te = async () => {
|
|
4816
4820
|
if (!v) return;
|
|
4817
|
-
let e = w ?
|
|
4821
|
+
let e = w ? Kr(T, E) : d;
|
|
4818
4822
|
await c(e), await v.show();
|
|
4819
4823
|
}, A = () => {
|
|
4820
4824
|
ee += 1, D !== void 0 && i.clearTimeout(D), D = void 0;
|
|
@@ -4843,37 +4847,37 @@ function Qi(e) {
|
|
|
4843
4847
|
if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
|
|
4844
4848
|
let t;
|
|
4845
4849
|
try {
|
|
4846
|
-
t =
|
|
4850
|
+
t = Ar(e);
|
|
4847
4851
|
} catch (e) {
|
|
4848
4852
|
return Promise.reject(new Q("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble text is invalid."));
|
|
4849
4853
|
}
|
|
4850
4854
|
return k = k.then(async () => {
|
|
4851
|
-
v && (A(), d = t, w ? (T =
|
|
4855
|
+
v && (A(), d = t, w ? (T = Ji(t, w, u.textStyle, r), E = Math.min(1, T.length), w.layout === "RESERVED" && l(t), await te(), M()) : await te());
|
|
4852
4856
|
}), k;
|
|
4853
4857
|
},
|
|
4854
4858
|
updateStyle(e) {
|
|
4855
4859
|
if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
|
|
4856
4860
|
let t;
|
|
4857
4861
|
try {
|
|
4858
|
-
t =
|
|
4862
|
+
t = Pi(e);
|
|
4859
4863
|
} catch (e) {
|
|
4860
4864
|
return Promise.reject(e);
|
|
4861
4865
|
}
|
|
4862
4866
|
return k = k.then(async () => {
|
|
4863
4867
|
if (!v) return;
|
|
4864
|
-
|
|
4868
|
+
Ui(v, t);
|
|
4865
4869
|
let e = f(t);
|
|
4866
4870
|
for (let e of [
|
|
4867
4871
|
t.audio?.voice,
|
|
4868
4872
|
t.audio?.reveal,
|
|
4869
4873
|
t.audio?.finish,
|
|
4870
4874
|
t.reveal?.sound
|
|
4871
|
-
]) e !== void 0 &&
|
|
4875
|
+
]) e !== void 0 && Gi(n, e);
|
|
4872
4876
|
await Promise.all([
|
|
4873
4877
|
x?.stop(),
|
|
4874
4878
|
S?.stop(),
|
|
4875
4879
|
C?.stop()
|
|
4876
|
-
]), await h(t, e, v), await v.updateStyle(t), u = t, w = t.reveal, T = w ?
|
|
4880
|
+
]), await h(t, e, v), await v.updateStyle(t), u = t, w = t.reveal, T = w ? Ji(d, w, t.textStyle, r) : Object.freeze([d]), E = w ? Math.min(1, T.length) : 1, A(), w?.layout === "RESERVED" && l(d, t), await c(d, t), g(t, e, v), await Promise.all([
|
|
4877
4881
|
v.setLayerVisible("portraitBase", t.portrait !== void 0),
|
|
4878
4882
|
v.setLayerVisible("portraitBlink", t.portrait?.blink !== void 0),
|
|
4879
4883
|
v.setLayerVisible("portraitLipSync", !1),
|
|
@@ -4884,7 +4888,7 @@ function Qi(e) {
|
|
|
4884
4888
|
}), k;
|
|
4885
4889
|
},
|
|
4886
4890
|
setAnimationMode(e) {
|
|
4887
|
-
return O ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) :
|
|
4891
|
+
return O ? Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`)) : wi.has(e) ? (k = k.then(() => N(e)), k) : Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
|
|
4888
4892
|
},
|
|
4889
4893
|
revealNext() {
|
|
4890
4894
|
if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
|
|
@@ -4902,10 +4906,10 @@ function Qi(e) {
|
|
|
4902
4906
|
if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
|
|
4903
4907
|
let t = e.timeoutSeconds ?? 0;
|
|
4904
4908
|
return !Number.isFinite(t) || t < 0 ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish timeoutSeconds must be zero or greater.")) : e.condition !== void 0 && typeof e.condition != "function" ? Promise.reject(new Q("BUBBLE-COMPOSITION-001", "Bubble finish condition must be a function.")) : (k = k.then(async () => {
|
|
4905
|
-
if (A(), e.unit !== void 0 && (w =
|
|
4909
|
+
if (A(), e.unit !== void 0 && (w = Rr({
|
|
4906
4910
|
...w ?? {},
|
|
4907
4911
|
unit: e.unit
|
|
4908
|
-
}), T =
|
|
4912
|
+
}), T = Ji(d, w, u.textStyle, r), E = Math.min(1, T.length), w.layout === "RESERVED" && v && l(d)), w) for (; await j(););
|
|
4909
4913
|
let n = e.condition;
|
|
4910
4914
|
if (n === void 0 && t === 0) {
|
|
4911
4915
|
await m(u.audio?.finish);
|
|
@@ -4938,7 +4942,7 @@ function Qi(e) {
|
|
|
4938
4942
|
if (O) return Promise.reject(new Q("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${s.actorKey}`));
|
|
4939
4943
|
let t;
|
|
4940
4944
|
try {
|
|
4941
|
-
t =
|
|
4945
|
+
t = Mi(e, "Bubble motion");
|
|
4942
4946
|
} catch (e) {
|
|
4943
4947
|
return Promise.reject(e);
|
|
4944
4948
|
}
|
|
@@ -4984,7 +4988,7 @@ function Qi(e) {
|
|
|
4984
4988
|
} catch (t) {
|
|
4985
4989
|
e.push(t);
|
|
4986
4990
|
}
|
|
4987
|
-
o.get(s.actorKey) === ne && o.delete(s.actorKey),
|
|
4991
|
+
o.get(s.actorKey) === ne && o.delete(s.actorKey), Xi(e, `Failed to close bubble: ${s.actorKey}`);
|
|
4988
4992
|
}
|
|
4989
4993
|
});
|
|
4990
4994
|
return o.set(s.actorKey, ne), M(), u.showAnimation !== void 0 && await ne.animate(u.showAnimation), ne;
|
|
@@ -5016,34 +5020,34 @@ function Qi(e) {
|
|
|
5016
5020
|
return Object.freeze({
|
|
5017
5021
|
defineStyle(e) {
|
|
5018
5022
|
l();
|
|
5019
|
-
let t =
|
|
5023
|
+
let t = Pi(e);
|
|
5020
5024
|
a.set(t.name, t);
|
|
5021
5025
|
},
|
|
5022
5026
|
hasActiveBubble(e) {
|
|
5023
|
-
return o.has(
|
|
5027
|
+
return o.has(Oi(e, "Bubble actor key"));
|
|
5024
5028
|
},
|
|
5025
5029
|
async show(e) {
|
|
5026
5030
|
l();
|
|
5027
|
-
let t =
|
|
5031
|
+
let t = Qi(e);
|
|
5028
5032
|
return u(t.actorKey, () => d(t));
|
|
5029
5033
|
},
|
|
5030
5034
|
releaseTarget(e) {
|
|
5031
5035
|
l();
|
|
5032
|
-
let t =
|
|
5036
|
+
let t = Oi(e, "Bubble actor key");
|
|
5033
5037
|
return u(t, async () => {
|
|
5034
5038
|
await o.get(t)?.close();
|
|
5035
5039
|
});
|
|
5036
5040
|
},
|
|
5037
5041
|
async releaseAll() {
|
|
5038
|
-
l(), await Promise.allSettled([...s.values()]),
|
|
5042
|
+
l(), await Promise.allSettled([...s.values()]), Xi((await Promise.allSettled([...o.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
|
|
5039
5043
|
},
|
|
5040
5044
|
async dispose() {
|
|
5041
5045
|
if (c) return;
|
|
5042
5046
|
c = !0, await Promise.allSettled([...s.values()]);
|
|
5043
5047
|
let e = await Promise.allSettled([...o.values()].map((e) => e.close()));
|
|
5044
|
-
a.clear(),
|
|
5048
|
+
a.clear(), Xi(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
|
|
5045
5049
|
}
|
|
5046
5050
|
});
|
|
5047
5051
|
}
|
|
5048
5052
|
//#endregion
|
|
5049
|
-
export { Q as BubbleCompositionError,
|
|
5053
|
+
export { Q as BubbleCompositionError, yr as UnicodeLineBreakProvider, ee as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, Te as bubbleBodyCenterOffset, Mr as bubbleContentPlainText, Nr as bubbleContentReadingText, u as bubbleDirectionAliases, l as bubbleDirectionNames, di as bubbleLayoutProfileForStyleInput, qr as bubblePortraitPlacements, Fr as bubbleRevealUnits, N as bubbleVisualStyles, $i as createBubbleComposition, x as defaultBubbleDistance, C as defaultBubbleOffset, f as defaultBubblePlacementInput, Xr as defaultBubblePortraitCornerRadius, Yr as defaultBubblePortraitOffset, Jr as defaultBubblePortraitPlacement, S as defaultBubbleTailLength, pi as formatScratchBubbleArgument, jr as isPlainBubbleContent, fi as isScratchDefaultBubbleStyleInput, hi as layoutScratchBubbleText, Pr as mergeBubbleContent, Ar as normalizeBubbleContent, T as normalizeBubbleDistance, D as normalizeBubbleOffset, y as normalizeBubblePlacement, $r as normalizeBubblePortraitCornerRadius, Qr as normalizeBubblePortraitOffset, Zr as normalizeBubblePortraitPlacement, Rr as normalizeBubbleReveal, E as normalizeBubbleTailLength, _i as positionScratchBubble, De as renderBubbleSvg, Si as renderScratchBubbleSvg, Kr as revealedBubbleContent, Vr as revealedBubbleText, ai as scratchBubbleCornerRadius, si as scratchBubbleFontSize, ci as scratchBubbleLineHeight, ti as scratchBubbleMaximumLineWidth, gi as scratchBubbleMetrics, ni as scratchBubbleMinimumTextWidth, ii as scratchBubblePadding, ri as scratchBubbleStrokeWidth, oi as scratchBubbleTailHeight, ei as scratchBubbleTextLimit, Gr as splitBubbleContent, Br as splitBubbleText, Er as wrapText };
|